PageSourceSearch

https://regattagrove.com/_next/static/chunks/0pf_emjfw.pw7.js?dpl=dpl_RgWWMVRWpo6dYvjL15ZPG3Hu7mp8

js regattagrove.com collected 2026-10-05 05:40:27 UTC 112,885 bytes, 49 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86564,e=>{"use strict";var t=e.i(71645),r=e.i(88227),a=e.i(43476),s=e.i(75254);let o=(0,s.default)("volume",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}]]),l=(0,s.default)("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);var n=e.i(37727);let i=(0,s.default)("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),d=(0,s.default)("minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]);var c=e.i(87652),p=e.i(26999),x=e.i(41947),x=x,m=e.i(47163);function u({...e}){return(0,a.jsx)(p.Root,{"data-slot":"dialog",...e})}function h({...e}){return(0,a.jsx)(p.Portal,{"data-slot":"dialog-portal",...e})}function g({...e}){return(0,a.jsx)(p.Close,{"data-slot":"dialog-close",...e})}function b({className:e,...t}){return(0,a.jsx)(p.Overlay,{"data-slot":"dialog-overlay",className:(0,m.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function f({className:e,children:t,showCloseButton:r=!0,...s}){return(0,a.jsxs)(h,{"data-slot":"dialog-portal",children:[(0,a.jsx)(b,{}),(0,a.jsxs)(p.Content,{"data-slot":"dialog-content",className:(0,m.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...s,children:[t,r&&(0,a.jsxs)(p.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,a.jsx)(x.default,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function v({className:e,...t}){return(0,a.jsx)(p.Title,{"data-slot":"dialog-title",className:(0,m.cn)("text-lg leading-none font-semibold",e),...t})}var y=e.i(35223);let j=({url:e,shortVersion:r,imgCover:s,vidCover:p,mode:x="inline",autoPlay:m=!0,className:h="",videoClasses:b="",overlay:j,captions:N})=>{let w=(0,t.useRef)(null),k=(0,t.useRef)(null),_=(0,c.useInView)(k),[S,C]=(0,t.useState)(!1),[L,T]=(0,t.useState)(!0),[I,A]=(0,t.useState)(!1),[M,E]=(0,t.useState)(r||e),[P,z]=(0,t.useState)(!1),[D,B]=(0,t.useState)(!1),[F,O]=(0,t.useState)(!1),R=(0,t.useCallback)(e=>{e?.stopPropagation(),w.current&&(S?(w.current.pause(),C(!1),B(!0)):(w.current.play().catch(()=>{}),C(!0),B(!1)))},[S]),$=(0,t.useCallback)(e=>{e.stopPropagation(),"bg"!==x&&T(!L)},[L,x]),q=(0,t.useCallback)(t=>
1{t?.stopPropagation(),!P&&"bg"!==x&&("lightbox"!==x||s||p)&&(z(!0),E(e),T(!1),w.current&&(w.current.currentTime=0,w.current.play().catch(()=>{}),C(!0)))},[P,x,e]),H=(0,t.useCallback)(t=>{t.stopPropagation(),"lightbox"===x&&(s||p||!w.current||(w.current.pause(),C(!1)),A(!0),E(e),T(!1))},[x,e,s,p]),U=(0,t.useCallback)(e=>{if(A(e),!e){let e=document.querySelector(".dialog-content video");e instanceof HTMLVideoElement&&e.pause(),"lightbox"!==x||s||p||!w.current||D||!_||(T(!0),w.current.play().catch(()=>{}),C(!0))}},[x,s,p,D,_]),K=(0,t.useCallback)(e=>{e.stopPropagation();let t=w.current,r=k.current;if(t&&r)if(document.fullscreenElement)document.exitFullscreen?document.exitFullscreen().then(()=>{O(!1)}).catch(e=>{console.error(`Error exiting fullscreen: ${e.message}`)}):document.webkitExitFullscreen&&(document.webkitExitFullscreen(),O(!1));else try{r.requestFullscreen().then(()=>{O(!0)}).catch(e=>{console.log("Container fullscreen failed, trying video element",e),t.requestFullscreen?t.requestFullscreen().then(()=>{O(!0)}).catch(e=>{console.error(`Video fullscreen failed: ${e.message}`)}):t.webkitEnterFullscreen?(t.webkitEnterFullscreen(),O(!0)):t.webkitRequestFullscreen&&(t.webkitRequestFullscreen(),O(!0))})}catch(e){console.error("Error with fullscreen:",e);try{t.webkitEnterFullscreen?(t.webkitEnterFullscreen(),O(!0)):t.requestFullscreen&&(t.requestFullscreen(),O(!0))}catch(e){console.error("All fullscreen attempts failed:",e)}}},[]);return(0,t.useEffect)(()=>{w.current&&m&&"lightbox"!==x&&P&&(_&&!D?(w.current.play().catch(e=>{if(console.error("Video playback failed:",e),"bg"===x&&s){let e=k.current?.querySelector("img");e?.classList.add("video-failed")}}),C(!0)):(w.current.pause(),C(!1)))},[_,m,x,D,s,P]),(0,t.useEffect)(()=>{let e=()=>{O(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e)}},[]),(0,a.jsxs)("div",{ref:k,className:`${h}`,children:[(0,a.jsxs)("div",{className:"video-html-wrap relative overflow-hidden w-full h-full",children:["inline"!==x&&"lightbox"!==x||P?null:p?(0,a.jsx)("video",{src:p,className:`absolute inset-0 w-full h-full object-cover z-[50] transition-opacity duration-1000 ${P?"opacity-0":"opacity-100"}`,autoPlay:!0,muted:!0,loop:!0,playsInline:!0}):s?(0,a.jsx)(y.LoadImage,{src:s.url,width:1920,height:1080,alt:s.alt||"",className:"absolute inset-0 w-full h-full object-cover z-[50]"}):null,"bg"===x&&s&&(0,a.jsx)(y.LoadImage,{src:s.url,width:1920,height:1080,alt:s.alt||"",className:"absolute inset-0 w-full h-full object-cover opacity-0 [&.video-failed]:opacity-100 transition-opacity duration-300"}),(0,a.jsx)("video",{ref:w,src:M,className:`w-full h-full object-cover ${b}`,muted:L,loop:!0,playsInline:!0,autoPlay:m&&("lightbox"!==x||!s&&!p),controls:!1,preload:P?"auto":"none",children:N&&(0,a.jsx)("track",{default:!0,kind:"captions",srcLang:"en",src:N,label:"English"})}),(()=>{if(!j)return null;let e=!P||P&&!S,t="bg"===x||!P||!S,r=!P&&s&&!p;return(0,a.jsxs)(a.Fragment,{children:[!r&&(0,a.jsx)("div",{className:`absolute inset-0 pointer-events-none blend-screen blend-soak transition-opacity duration-700 z-[51] ${t?"opacity-100":"opacity-0"} ${j.classes||""}`,style:{backgroundColor:j.color||"black",opacity:t?j.opacity||.5:0,backgroundImage:j.pattern?`url(${j.pattern})`:"none",transitionProperty:"opacity",transitionDuration:"700ms",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)"}}),j.content&&(0,a.jsx)("div",{className:`absolute inset-0 z-[53] pointer-events-none transition-opacity duration-700 ${e?"opacity-100":"opacity-0"} ${j.classes||""}`,dangerouslySetInnerHTML:{__html:j.content}})]})})(),"bg"===x||"lightbox"===x||!P&&(p||s)?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mute-indicator absolute top-4 right-4 flex gap-2 z-[53]",children:(0,a.jsx)("button",{onClick:$,className:"p-2 text-white/80 hover:text-white transition-colors",children:L?(0,a.jsx)("div",{className:"transform transition-all duration-300 animate-in-from-top",children:(0,a.jsx)(l,{})}):(0,a.jsx)("div",{className:"transform transition-all duration-30 animate-in-from-bottom",children:(0,a.jsx)(o,{})})})}),(0,a.jsx)("div",{className:"fullscreen-indicator absolute bottom-4 right-4 flex gap-2 z-[53]",children:(0,a.jsx)("button",{onClick:K,className:"p-2 text-white/80 hover:text-white transition-colors",children:F?(0,a.jsx)("div",{className:"transform transition-all duration-300 animate-in-from-top",children:(0,a.jsx)(d,{})}):(0,a.jsx)("div",{className:"transform transition-all duration-300 animate-in-from-bottom",children:(0,a.jsx)(i,{})})})})]}),(()=>{if("bg"===x)return null;let e=!P||P&&!S;return(0,a.jsx)("button",{onClick:e=>{"lightbox"===x?H(e):P?R(e):q(e)},className:"absolute inset-0 flex items-center justify-center z-[52] bg-black/20 hover:bg-black/30 transition-colors group",children:e&&(0,a.jsx)("div",{className:"p-4 w-20 h-20 max-md:w-12 max-md:h-12 group-hover:scale-110 transition bg-[url('/videos/play.png')] bg-center bg-no-repeat bg-contain"})})})()]}),"lightbox"!==x?null:(0,a.jsx)(u,{open:I,onOpenChange:U,children:(0,a.jsxs)(f,{className:"flex w-auto min-w-[66vw] max-w-[90vw] max-h-[86vh] p-0 bg-black [&>*:last-child]:hidden",children:[(0,a.jsx)(v,{className:"sr-only",children:"Video Lightbox"}),(0,a.jsx)(g,{className:"absolute top-4 right-4 p-2 text-white hover:text-gray-300 z-10",children:(0,a.jsx)(n.X,{size:24})}),(0,a.jsx)("div",{className:"w-full h-auto max-h-full max-w-full flex items-center justify-center",children:(0,a.jsx)("video",{src:e,className:"w-full h-full object-contain",controls:!0,autoPlay:!0,playsInl
1ine:!0},e)})]})})]})},N=e.i(96449).blogCptDefaults.data,w=e.i(42653).culinaryLineupCptDefaults.data,k={blog:function(e,t={}){return{...N,...t,_ui:t._ui??N._ui}},culinary:function(e,t={}){return{...w,...t,_ui:t._ui??w._ui}}};function _(e,t,r={}){let a=k[e];return a?a(t,r):r}let S=!1;e.s(["CmsHostInit",0,function(){let e=(0,t.useRef)(!1);return e.current||(S||(S=!0,(0,r.registerCptHydrator)("blog",(e,t)=>_("blog",e,t)),(0,r.registerCptHydrator)("culinary",(e,t)=>_("culinary",e,t)),(0,r.registerVideoComponent)(j),(0,r.setCmsHostOptions)({objectWrapSection:!0,enablePush:!1,enablePageSettings:!1})),e.current=!0),null}],86564)},2355,e=>{"use strict";var t=e.i(47167),r=e.i(71645),a=e.i(18566);function s(){return"u">typeof window}function o(){return"production"}function l(){return"development"===((s()?window.vam:o())||"production")}function n(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function i(e){return(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,r.useEffect)(()=>{!function(e={debug:!0}){var t;if(!s())return;!function(e="auto"){if("auto"===e){window.vam=o();return}window.vam=e}(e.mode),window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)}),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let r=e.scriptSrc?e.scriptSrc:l()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?`${e.basePath}/insights/script.js`:"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${r}"]`))return;let a=document.createElement("script");a.src=r,a.defer=!0,a.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),a.dataset.sdkv="1.6.1",e.disableAutoTrack&&(a.dataset.disableAutoTrack="1"),e.endpoint?a.dataset.endpoint=e.endpoint:e.basePath&&(a.dataset.endpoint=`${e.basePath}/insights`),e.dsn&&(a.dataset.dsn=e.dsn),a.onerror=()=>{let e=l()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${r}. ${e}`)},l()&&!1===e.debug&&(a.dataset.debug="false"),document.head.appendChild(a)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,r.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}function d(e){let s,o,l,{route:d,path:c}=(s=(0,a.useParams)(),o=(0,a.useSearchParams)(),l=(0,a.usePathname)(),s?{route:function(e,t){if(!e||!t)return e;let r=e;try{let e=Object.entries(t);for(let[t,a]of e)if(!Array.isArray(a)){let e=n(a);e.test(r)&&(r=r.replace(e,`/[${t}]`))}for(let[t,a]of e)if(Array.isArray(a)){let e=n(a.join("/"));e.test(r)&&(r=r.replace(e,`/[...${t}]`))}return r}catch(t){return e}}(l,Object.keys(s).length?s:Object.fromEntries(o.entries())),path:l}:{route:null,path:l});return r.default.createElement(i,{path:c,route:d,...e,basePath:function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}(),framework:"next"})}e.s(["Analytics",0,function(e){return r.default.createElement(r.Suspense,{fallback:null},r.default.createElement(d,{...e}))}])},96923,e=>{"use strict";var t=e.i(43476),r=e.i(83956);e.s(["Providers",0,function({children:e}){return(0,t.jsx)(r.SevenRoomsProvider,{children:e})}])},93622,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(18655),s=e.i(91536),o=e.i(75254);let l=(0,o.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function n({onClick:e}){let{isVisible:r}=(0,a.useKonami)();return r?(0,t.jsx)("button",{onClick:e,className:"zero bg-background text-foreground fixed bottom-18 left-4.5 z-[350] w-12 h-12 rounded-full shadow-lg hover:shadow-xl transition-all duration-200 hover:scale-105 flex items-center justify-center cursor-pointer","aria-label":"Open CMS Settings",children:(0,t.jsx)(l,{className:"w-6 h-6"})}):null}var i=e.i(95187);let d=(0,i.createServerReference)("00cc18d11b0765b3f296701e1b95a3fdca0e007aa4",i.callServer,void 0,i.findSourceMapURL,"signOutAction"),c=(0,i.createServerReference)("40a3c916c09db93fc935eb294f4718ff2194124c91",i.callServer,void 0,i.findSourceMapURL,"signInAction");e.i(47167);var p=e.i(74080),x=e.i(18566),m=e.i(86925),u=e.i(65725),h=e.i(30774);let g=(0,o.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),b=(0,o.default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);var f=e.i(85170);let v=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);var y=e.i(7386);let j=(0,o.default)("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);var N=e.i(22016);let w=Symbol.for("constructDateFrom");var k=e.i(2003);function _(){var e;return(0,t.jsxs)(k.Dialog,{children:[(0,t.jsx)(k.DialogTrigger,{className:"     justify-self-end self-center mt-auto p-2 text-xs group cursor-pointer     text-foreground
1/35 hover:text-foreground/85    ",children:(0,t.jsxs)("p",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"group-hover:-translate-x-1 transition",children:["© ",("function"==typeof(e=new Date)?e(e):e&&"object"==typeof e&&w in e?e[w](e):e instanceof Date?new e.constructor(e):new Date(e)).getFullYear(),". Made with"]}),(0,t.jsx)("span",{className:"mx-1 group-hover:scale-[1.65] group-hover:text-rose-500 group-hover:-rotate-6 transition",children:(0,t.jsx)(j,{className:"mx-auto group-hover:animate-heartbeat",size:14})}),(0,t.jsx)("span",{className:"group-hover:translate-x-1 transition",children:"by EvG"})]})}),(0,t.jsx)(k.DialogContent,{className:"zero bg-background text-foreground",children:(0,t.jsxs)(k.DialogHeader,{children:[(0,t.jsxs)(k.DialogTitle,{children:[(0,t.jsx)("span",{className:"inline-block mr-2 -mb-1.5 text-rose-500 -rotate-6 transition",children:(0,t.jsx)(j,{className:"animate-heartbeat",size:26})}),(0,t.jsx)("span",{className:"font-bold",children:"Hello there!"})]}),(0,t.jsxs)("p",{className:"!mt-3",children:["I'm proud to present you the ",(0,t.jsx)("span",{className:"text-accent",children:"0-CMS"})," platform. Hope you enjoy it!",(0,t.jsx)("br",{}),"I'll be adding more features and improvements in the future.",(0,t.jsx)("br",{})]}),(0,t.jsxs)("p",{className:"!mt-3 text-xs opacity-70",children:["This is a project by EvG from MicroPrism / HyperLink. You can find me here:",(0,t.jsx)(N.default,{href:"https://www.microprism.co",target:"_blank",className:"ml-1 text-accent hover:text-foreground underline",children:"MicroPrism.co"}),(0,t.jsx)(N.default,{href:"https://www.hyperlinkmiami.com",target:"_blank",className:"ml-1 text-accent hover:text-foreground underline",children:"HyperLinkMiami.com"})]})]})})]})}var S=e.i(61653),S=S,C=e.i(38155),L=e.i(72591),T=e.i(49231),I=e.i(27389),A=e.i(35223),M=e.i(64659),E=e.i(55900),P=e.i(7233);let z=(0,o.default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),D=(0,o.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]),B=(0,o.default)("rectangle-ellipsis",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),F=[{type:"LocalBusiness",label:"Local Business",description:"For any local business — restaurant, store, office, salon, etc.",fields:[{key:"@type",label:"Specific Type",type:"select",options:["LocalBusiness","Restaurant","BarOrPub","CafeOrCoffeeShop","Bakery","Store","AutoRepair","BeautySalon","Dentist","LegalService","RealEstateAgent","FinancialService","HealthAndBeautyBusiness","HomeAndConstructionBusiness","MedicalBusiness","SportingGoodsStore"],placeholder:"LocalBusiness"},{key:"name",label:"Business Name",type:"text",required:!0,placeholder:"Acme Co."},{key:"description",label:"Description",type:"textarea",placeholder:"A short business description"},{key:"url",label:"Website URL",type:"url",placeholder:"https://example.com"},{key:"telephone",label:"Phone",type:"text",placeholder:"+1-305-555-0100"},{key:"email",label:"Email",type:"text",placeholder:"[email protected]"},{key:"image",label:"Image URL",type:"url",placeholder:"https://example.com/photo.jpg"},{key:"priceRange",label:"Price Range",type:"text",placeholder:"$$"},{key:"servesCuisine",label:"Cuisine (if restaurant)",type:"text",placeholder:"Cuban, Latin American"},{key:"address.streetAddress",label:"Street Address",type:"text",placeholder:"123 Main St"},{key:"address.addressLocality",label:"City",type:"text",placeholder:"Miami"},{key:"address.addressRegion",label:"State",type:"text",placeholder:"FL"},{key:"address.postalCode",label:"ZIP Code",type:"text",placeholder:"33101"},{key:"address.addressCountry",label:"Country",type:"text",placeholder:"US"},{key:"geo.latitude",label:"Latitude",type:"number",placeholder:"25.7617"},{key:"geo.longitude",label:"Longitude",type:"number",placeholder:"-80.1918"},{key:"openingHours",label:"Opening Hours",type:"text",placeholder:"Mo-Fr 09:00-17:00"}]},{type:"Organization",label:"Organization",description:"Company, non-profit, or brand — typically site-wide.",fields:[{key:"name",label:"Organization Name",type:"text",required:!0,placeholder:"Acme Corp"},{key:"url",label:"Website",type:"url",placeholder:"https://example.com"},{key:"logo",label:"Logo URL",type:"url",placeholder:"https://example.com/logo.png"},{key:"description",label:"Description",type:"textarea",placeholder:"Brief description"},{key:"telephone",label:"Phone",type:"text",placeholder:"+1-305-555-0100"},{key:"email",label:"Email",type:"text",placeholder:"[email protected]"},{key:"sameAs",label:"Social Profiles (one per line)",type:"textarea",placeholder:"https://facebook.com/...\nhttps://instagram.com/..."},{key:"address.streetAddress",label:"Street Address",type:"text",placeholder:"123 Main St"},{key:"address.addressLocality",label:"City",type:"text",placeholder:"Miami"},{key:"address.addressRegion",label:"State",type:"text",placeholder:"FL"},{key:"address.postalCode",label:"ZIP Code",type:"text",placeholder:"33101"},{key:"address.addressCountry",label:"Country",type:"text",placeholder:"US"}]},{type:"Article",label:"Article / Blog Post",description:"For news articles, blog posts, editorial content.",fields:[{key:"@type",label:"Specific Type",type:"select",options:["Article","BlogPosting","NewsArticle","TechArticle"],placeholder:"Article"},{key:"headline",label:"Headline",type:"text",required:!0,placeholder:"Article title"},{key:"description",label:"Description",type:"textarea",placeholder:"Brief summary"},{key:"image",label:"Image URL",type:"url",placeholder:"https://example.com/article.jpg"},{key:"author.name",label:"Author Name",type:"text",placeholder:"Jane Doe"},{key:"author.url",label:"Author URL",type:"url",placeholder:"https://example.com/author"},{key:"publisher.name",label:"Publisher Name",type:"text",placeholder:"Acme News"},{key:"publisher.logo",label:"Publisher Logo URL",type:"url",placeholder:"https://example.com/logo.png"},{key:"datePublished",label:"Date Published",type:"text",placeholder:"2025-01-15"},{key:"dateModified",label:"Date Modified",type:"text",placeholder:"2025-02-01"}]},{type:"FAQPage",label:"FAQ Page",description:"For pages with frequently asked questions.",fields:[{key:"name",label:"Page Title",type:"text",placeholder:"Frequently Asked Questions"}]},{type:"BreadcrumbList",label:"Breadcrumb List",description:"Breadcrumb navigation trail for the page.",fields:[{key:"itemListElement",label:"Breadcrumbs (name|url, one per line)",type:"textarea",required:!0,placeholder:"Home|https://example.com\nMenu|https://example.com/menu"}]},{type:"WebSite",label:"Website",description:"Site-wide schema — name, search action, etc.",fields:[{key:"name",label:"Site Name",type:"text",required:!0,placeholder:"My Website"},{key:"url",label:"Site URL",type:"url",required:!0,placeholder:"https://example.com"},{key:"description",label:"Description",type:"textarea",placeholder:"Brief site description"}]},{type:"Product",label:"Product",description:"For product pages — e-commerce or services.",f
1ields:[{key:"name",label:"Product Name",type:"text",required:!0,placeholder:"Widget Pro"},{key:"description",label:"Description",type:"textarea",placeholder:"Product description"},{key:"image",label:"Image URL",type:"url",placeholder:"https://example.com/product.jpg"},{key:"sku",label:"SKU",type:"text",placeholder:"WP-001"},{key:"brand.name",label:"Brand",type:"text",placeholder:"Acme"},{key:"offers.price",label:"Price",type:"number",placeholder:"29.99"},{key:"offers.priceCurrency",label:"Currency",type:"text",placeholder:"USD"},{key:"offers.availability",label:"Availability",type:"select",options:["https://schema.org/InStock","https://schema.org/OutOfStock","https://schema.org/PreOrder"],placeholder:"InStock"}]},{type:"Custom",label:"Custom Schema",description:"Free-form JSON-LD — for any schema type not listed above.",fields:[]}];function O(e,t){let r={"@context":"https://schema.org","@type":t["@type"]||e.type};for(let a of e.fields){let e=t[a.key];if(null==e||""===e||"@type"===a.key)continue;if("sameAs"===a.key&&"string"==typeof e){let t=e.split("\n").map(e=>e.trim()).filter(Boolean);t.length&&(r.sameAs=t);continue}if("itemListElement"===a.key&&"string"==typeof e){let t=e.split("\n").map((e,t)=>{let[r,a]=e.split("|").map(e=>e.trim());return r?{"@type":"ListItem",position:t+1,name:r,...a?{item:a}:{}}:null}).filter(Boolean);t.length&&(r.itemListElement=t);continue}let s=a.key.split(".");if(1===s.length)r[a.key]="number"===a.type?Number(e):e;else{let t=r;for(let e=0;e<s.length-1;e++)t[s[e]]&&"object"==typeof t[s[e]]||(t[s[e]]={}),t=t[s[e]];t[s[s.length-1]]="number"===a.type?Number(e):e}}return r.address&&"object"==typeof r.address&&!r.address["@type"]&&(r.address["@type"]="PostalAddress"),r.geo&&"object"==typeof r.geo&&!r.geo["@type"]&&(r.geo["@type"]="GeoCoordinates"),r.author&&"object"==typeof r.author&&!r.author["@type"]&&(r.author["@type"]="Person"),r.publisher&&"object"==typeof r.publisher&&(r.publisher["@type"]||(r.publisher["@type"]="Organization"),r.publisher.logo&&"string"==typeof r.publisher.logo&&(r.publisher.logo={"@type":"ImageObject",url:r.publisher.logo})),r.offers&&"object"==typeof r.offers&&!r.offers["@type"]&&(r.offers["@type"]="Offer"),r.brand&&"object"==typeof r.brand&&!r.brand["@type"]&&(r.brand["@type"]="Brand"),r}function R({schema:e,index:a,onUpdate:s,onRemove:o}){let[l,n]=(0,r.useState)(!0),[i,d]=(0,r.useState)(!1),[c,p]=(0,r.useState)(""),x=e?.["@type"]||"Custom",m=F.find(e=>e.type===x||e.fields.some(e=>"@type"===e.key&&e.options?.includes(x)))||F.find(e=>"Custom"===e.type),u="Custom"===m.type,h=(0,r.useMemo)(()=>(function(e,t){let r={};for(let a of e.fields){let s=a.key.split(".");if("@type"===a.key){r["@type"]=t["@type"]||e.type;continue}if("sameAs"===a.key){let e=t.sameAs;r.sameAs=Array.isArray(e)?e.join("\n"):e||"";continue}if("itemListElement"===a.key){let e=t.itemListElement;Array.isArray(e)?r.itemListElement=e.sort((e,t)=>(e.position||0)-(t.position||0)).map(e=>`${e.name||""}${e.item?"|"+e.item:""}`).join("\n"):r.itemListElement="";continue}if(1===s.length)r[a.key]=t[a.key]??"";else{let e=t;for(let t=0;t<s.length-1;t++)if(!(e=e?.[s[t]])||"object"!=typeof e){e=null;break}let o=s[s.length-1],l=e?.[o]??"";"publisher.logo"===a.key&&"object"==typeof l&&(l=l.url||""),r[a.key]=l}}return r})(m,e||{}),[e,m]),g=(0,r.useMemo)(()=>{if(!i)return!0;try{return JSON.parse(c),!0}catch{return!1}},[c,i]),b=(t,r)=>{let o=O(m,{...h,[t]:r});s(a,{...e,...o})},f=m.label+(x!==m.type?` (${x})`:"");return(0,t.jsxs)("div",{className:"border rounded-md bg-card overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>n(!l),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(D,{className:"h-3 w-3 shrink-0 text-primary"}),(0,t.jsx)("span",{className:"text-xs font-bold truncate",children:f})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("button",{type:"button",className:"p-1 hover:text-red-500 transition-colors",onClick:e=>{e.stopPropagation(),o(a)},title:"Remove schema",children:(0,t.jsx)(z,{className:"h-3 w-3"})}),l?(0,t.jsx)(E.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(M.ChevronDown,{className:"h-3.5 w-3.5"})]})]}),l&&(0,t.jsxs)("div",{className:"px-3 pb-3 space-y-2 border-t",children:[!u&&(0,t.jsxs)("div",{className:"flex gap-1 pt-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>i?(()=>{if(g)try{let e=JSON.parse(c);s(a,e)}catch{return}d(!1)})():null,className:`flex items-center gap-1 text-[10px] px-2 py-1 rounded transition-colors ${!i?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(B,{className:"h-3 w-3"})," Form"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>i?null:void(p(JSON.stringify(e,null,2)),d(!0)),className:`flex items-center gap-1 text-[10px] px-2 py-1 rounded transition-colors ${i?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(D,{className:"h-3 w-3"})," JSON-LD"]})]}),!i&&!u&&(0,t.jsx)("div",{className:"space-y-2 pt-1",children:m.fields.map(e=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(T.Label,{className:"text-[10px] text-muted-foreground",children:[e.label,e.required&&(0,t.jsx)("span",{className:"text-red-500 ml-0.5",children:"*"})]}),"select"===e.type?(0,t.jsx)("select",{value:h[e.key]||"",onChange:t=>b(e.key,t.target.value),className:"w-full h-8 text-xs rounded-md border bg-background px-2",children:e.options?.map(e=>{let r=e.replace("https://schema.org/","");return(0,t.jsx)("option",{value:e,children:r},e)})}):"textarea"===e.type?(0,t.jsx)(I.Textarea,{value:h[e.key]||"",onChange:t=>b(e.key,t.target.value),placeholder:e.placeholder,className:"text-xs min-h-[48px]"}):(0,t.jsx)(L.Input,{type:"number"===e.type?"number":"url"===e.type?"url":"text",value:h[e.key]||"",onChange:t=>b(e.key,t.target.value),placeholder:e.placeholder,className:"text-xs",step:"number"===e.type?"any":void 0})]},e.key))}),(i||u)&&(0,t.jsxs)("div",{className:"space-y-2 pt-1",children:[(0,t.jsx)(I.Textarea,{value:u?JSON.stringify(e,null,2):c,onChange:e=>{if(u){try{let t=JSON.parse(e.target.value);s(a,t)}catch{}p(e.target.value)}else p(e.target.value)},placeholder:'{"@context": "https://schema.org", "@type": "Thing", ...}',className:"text-xs font-mono min-h-[120px]"}),!g&&(0,t.jsx)("p",{className:"text-[10px] text-red-500",children:"Invalid JSON — fix before switching back to form."}),i&&!u&&(0,t.jsx)(C.Button,{size:"sm",variant:"outline",onClick:()=>
1{if(g)try{let e=JSON.parse(c);s(a,e),d(!1)}catch{}},disabled:!g,className:"text-xs h-7",children:"Apply JSON"})]}),!i&&!u&&(0,t.jsxs)("details",{className:"pt-1",children:[(0,t.jsx)("summary",{className:"text-[10px] text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:"Preview JSON-LD"}),(0,t.jsx)("pre",{className:"text-[10px] font-mono bg-muted/50 rounded p-2 mt-1 overflow-x-auto max-h-48 whitespace-pre-wrap break-all",children:JSON.stringify(e,null,2)})]})]})]})}function $({schemas:e,onChange:a}){let[s,o]=(0,r.useState)(!1),l=(t,r)=>{let s=[...e];s[t]=r,a(s)},n=t=>{a(e.filter((e,r)=>r!==t))};return(0,t.jsxs)("div",{className:"space-y-2",children:[e.map((e,r)=>(0,t.jsx)(R,{schema:e,index:r,onUpdate:l,onRemove:n},r)),s?(0,t.jsxs)("div",{className:"border rounded-md p-2 bg-card space-y-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold text-muted-foreground uppercase mb-1",children:"Choose schema type:"}),F.map(r=>(0,t.jsxs)("button",{type:"button",onClick:()=>{a([...e,"Custom"===r.type?{"@context":"https://schema.org","@type":"Thing"}:O(r,{"@type":r.type})]),o(!1)},className:"w-full text-left px-2 py-1.5 rounded hover:bg-muted/50 transition-colors group",children:[(0,t.jsx)("span",{className:"text-xs font-medium group-hover:text-primary transition-colors",children:r.label}),(0,t.jsx)("span",{className:"block text-[10px] text-muted-foreground",children:r.description})]},r.type)),(0,t.jsx)("button",{type:"button",onClick:()=>o(!1),className:"text-[10px] text-muted-foreground hover:text-foreground mt-1",children:"Cancel"})]}):(0,t.jsxs)(C.Button,{size:"sm",variant:"outline",onClick:()=>o(!0),className:"w-full text-xs h-7 gap-1",children:[(0,t.jsx)(P.Plus,{className:"h-3 w-3"})," Add Schema"]})]})}let q={title:{min:30,optimal:[50,60],max:60},description:{min:120,optimal:[150,160],max:160},ogTitle:{min:30,optimal:[40,60],max:60},ogDescription:{min:120,optimal:[150,200],max:200},twitterTitle:{min:30,optimal:[50,70],max:70},twitterDescription:{min:120,optimal:[180,200],max:200}},H=(e,t)=>{let r=e.length,a=q[t];return 0===r?{color:"text-muted-foreground",status:"empty"}:r<a.min?{color:"text-red-500",status:"too-short"}:r>=a.optimal[0]&&r<=a.optimal[1]?{color:"text-green-500",status:"optimal"}:r>a.max?{color:"text-red-500",status:"too-long"}:{color:"text-orange-500",status:"moderate"}};function U({seoData:e,onChange:a,onSave:s,isSaving:o,saved:l,disabled:n,schemas:i=[],onSchemasChange:d}){let c=e.title||"Your Page Title - Brand Name",p=e.description||"Your page description appears here. This is what users will see in search results when they find your page.",x="https://yoursite.com/page-url",m=(()=>{try{return(window?.location?.pathname||"/").replace(/^\/+/,"")}catch{return""}})(),u=(e.focusKeyphrase||"").trim().toLowerCase(),h=e=>(e||"").toLowerCase().includes(u),g=(e.keywords||"").toLowerCase(),b=u?[{label:"In title",ok:h(e.title)},{label:"In description",ok:h(e.description)},{label:"In slug",ok:h(m)},{label:"In keywords",ok:u&&g.split(",").map(e=>e.trim()).includes(u)}]:[],f=(e.description||"").split(/[.!?]+\s+/).filter(Boolean),v=(e.description||"").toLowerCase().match(/[a-zA-Z0-9']+/g)||[],y=f.length?v.length/f.length:0,j=v.reduce((e,t)=>{let r;return e+((r=t.toLowerCase())?Math.max(1,(r.replace(/e$/i,"").match(/[aeiouy]{1,2}/g)||[]).length):0)},0),N=f.length&&v.length?Math.round(206.835-1.015*(v.length/f.length)-84.6*(j/Math.max(1,v.length))):0,w=/\b(am|is|are|was|were|be|been|being)\b\s+\b(\w+ed)\b/.test((e.description||"").toLowerCase()),k=N>=60?"text-green-500":N>=45?"text-orange-500":N?"text-red-500":"text-muted-foreground",[_,M]=(0,r.useState)(null),[E,P]=(0,r.useState)([]);return(0,r.useEffect)(()=>{try{let t=document.querySelector("main");if(!t){M(null),P([]);return}let r=(t.innerText||"").replace(/\s+/g," ").trim(),a=r.match(/[a-zA-Z0-9']+/g)||[],s=a.length,o=r.split(/[.!?]+\s+/).filter(Boolean),l=Array.from(t.querySelectorAll("h1,h2,h3")),n=l.filter(e=>"h1"===e.tagName.toLowerCase()),i=l.filter(e=>/h2|h3/i.test(e.tagName)),d=t.querySelector("p")?.innerText||"",c=Array.from(t.querySelectorAll("img")),p=c.filter(e=>!(e.getAttribute("alt")||"").trim()).length,x=Array.from(t.querySelectorAll("a[href]")).filter(e=>{let t=(e.getAttribute("href")||"").trim();return t.startsWith("/")&&!t.startsWith("//")});Array.from(t.querySelectorAll("a[href]")).filter(e=>{let t=(e.getAttribute("href")||"").trim();return/^https?:\/\//i.test(t)});let m=(e.focusKeyphrase||"").trim().toLowerCase(),u=!!n.find(e=>(e.innerText||"").toLowerCase().includes(m)),h=!!i.find(e=>(e.innerText||"").toLowerCase().includes(m)),g=(d||"").toLowerCase().includes(m),b=m?(r.toLowerCase().match(RegExp(m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"))||[]).length:0,f=m&&s?b/s:0,v=a.reduce((e,t)=>
1{let r=t.toLowerCase().replace(/e$/i,"").match(/[aeiouy]{1,2}/g)||[];return e+Math.max(1,r.length)},0),y=o.length&&a.length?Math.round(206.835-1.015*(a.length/o.length)-84.6*(v/Math.max(1,a.length))):0,j=!!document.querySelector('link[rel="canonical"]'),N=!!document.querySelector('meta[property="og:image"]'),w=100,k=[],_=(e,t,r,a)=>{if(r)w-=e,k.push({msg:t,ok:!1,severity:e>=10?"major":e>=6?"moderate":"minor"});else k.push({msg:a,ok:!0})};_(15,"Missing or multiple H1",1!==n.length,"Single H1 present"),_(8,"No H2/H3 subheadings",0===i.length,"Subheadings present"),_(10,"Low word count (< 300)",s<300,"Word count is sufficient"),_(6,"Intro paragraph too long (> 300 chars)",(d||"").length>300,"Intro length is good");let S=c.length||1;_(6,"Too many images missing alt (> 30%)",p/S>.3,"Images have alt text"),_(10,"Too few internal links (< 2)",x.length<2,"Has internal links"),m&&(_(8,"Keyphrase not in H1",!u,"Keyphrase in H1"),_(5,"Keyphrase not in any subheading",!h,"Keyphrase in subheadings"),_(5,"Keyphrase not in first paragraph",!g,"Keyphrase in first paragraph"),_(8,"Keyphrase density out of range (0.5%–2.5%)",!(f>=.005&&f<=.025),"Keyphrase density in range")),_(10,"Low readability (Flesch < 45)",y>0&&y<45,"Readability acceptable (Flesch ≥ 45)"),_(3,"Missing canonical link tag",!j,"Canonical link present"),_(3,"Missing Open Graph image",!N,"Open Graph image present"),w=Math.max(0,Math.min(100,w)),M(w),P(k)}catch{M(null),P([])}},[e.focusKeyphrase]),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:`
2          relative w-full mx-auto
3          shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
4          dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
5          pt-1
6        `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"This page:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("seo-focus-keyphrase")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"seo-focus-keyphrase",className:"text-xs",children:"Focus Keyphrase"}),(0,t.jsx)(L.Input,{id:"seo-focus-keyphrase",value:e.focusKeyphrase||"",onChange:e=>a("focusKeyphrase",e.target.value),placeholder:"e.g. cuban restaurant miami",className:"text-xs"}),!!u&&(0,t.jsx)("div",{className:"flex gap-2 flex-wrap text-[10px]",children:b.map((e,r)=>(0,t.jsxs)("span",{className:`${e.ok?"text-green-500":"text-red-500"}`,children:["• ",e.label]},r))}),null!==_&&(0,t.jsxs)("div",{className:"space-y-1 mt-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase",children:(e.focusKeyphrase||"").trim()?"Keyphrase Focus Score":"Content Score"}),(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${_>=80?"bg-green-600/20 text-green-500":_>=60?"bg-orange-600/20 text-orange-500":"bg-red-600/20 text-red-500"}`,children:_})]}),E.length>0&&(0,t.jsx)("ul",{className:"text-[10px] space-y-0.5",children:E.slice().sort((e,t)=>e.ok===t.ok?0:e.ok?-1:1).map((e,r)=>{let a=e.ok?"bg-green-500":"major"===e.severity?"bg-red-500":"moderate"===e.severity?"bg-orange-500":"bg-yellow-500";return(0,t.jsxs)("li",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${a}`}),(0,t.jsx)("span",{children:e.msg})]},r)})})]})]})]})]}),(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:`
7          relative w-full mx-auto
8          shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
9          dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
10          pt-1
11        `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"Basic SEO:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500 pt-3.5",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsx)("div",{className:"flex-1 space-y-2 pb-1",children:(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-card space-y-3",children:[(0,t.jsx)("h5",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Google Search Result"}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"text-xs text-lime-600 break-all",children:x}),(0,t.jsxs)("div",{className:"text-sm text-blue-600 hover:underline cursor-pointer font-medium leading-tight",children:[c.slice(0,60),c.length>60?"...":""]}),(0,t.jsxs)("div",{className:"text-xs text-gray-600 leading-relaxed",children:[p.slice(0,160),p.length>160?"...":""]})]})]})})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("seo-title")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"seo-title",className:"text-xs",children:"Meta Title"}),(0,t.jsx)(L.Input,{id:"seo-title",value:e.title,onChange:e=>a("title",e.target.value),placeholder:"Enter page title...",className:"text-xs"}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsxs)("span",{className:H(e.title,"title").color,children:[e.title.length,"/",q.t
11itle.max," characters"]}),"optimal"===H(e.title,"title").status&&(0,t.jsx)("span",{className:"text-green-500 text-xs",children:"✓ Optimal"}),"too-short"===H(e.title,"title").status&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too short"]}),"too-long"===H(e.title,"title").status&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too long"]})]})]})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("seo-description")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"seo-description",className:"text-xs",children:"Meta Description"}),(0,t.jsx)(I.Textarea,{id:"seo-description",value:e.description,onChange:e=>a("description",e.target.value),placeholder:"Enter page description...",className:"text-xs min-h-[60px]"}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsxs)("span",{className:H(e.description,"description").color,children:[e.description.length,"/",q.description.max," characters"]}),"optimal"===H(e.description,"description").status&&(0,t.jsx)("span",{className:"text-green-500 text-xs",children:"✓ Optimal"}),"too-short"===H(e.description,"description").status&&e.description.length>0&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too short"]}),"too-long"===H(e.description,"description").status&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too long"]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-[10px] mt-1",children:[(0,t.jsxs)("div",{className:"flex gap-2 text-muted-foreground",children:[(0,t.jsxs)("span",{children:["Sentences: ",f.length||0]}),(0,t.jsxs)("span",{children:["Words/Sentence: ",y?y.toFixed(1):"0.0"]}),(0,t.jsxs)("span",{children:["Passive: ",w?(0,t.jsx)("span",{className:"text-red-500",children:"possible"}):(0,t.jsx)("span",{className:"text-green-500",children:"ok"})]})]}),(0,t.jsxs)("span",{className:`font-medium ${k}`,children:["Flesch: ",N]})]})]})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("seo-keywords")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"seo-keywords",className:"text-xs",children:"Keywords"}),(0,t.jsx)(L.Input,{id:"seo-keywords",value:e.keywords,onChange:e=>a("keywords",e.target.value),placeholder:"keyword1, keyword2, keyword3",className:"text-xs"})]})]}),s&&(0,t.jsx)("div",{className:"flex justify-end mt-2",children:(0,t.jsx)(C.Button,{size:"sm",onClick:s,disabled:o||n,children:l?"Saved":o?"Saving...":"Save Basic SEO"})})]}),(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:`
12          relative w-full mx-auto
13          shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
14          dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
15          pt-1
16        `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"Open Graph:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500 pt-3.5",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsx)("div",{className:"flex-1 space-y-2 pb-1",children:(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-card space-y-3",children:[(0,t.jsx)("h5",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Facebook/LinkedIn Preview"}),(0,t.jsxs)("div",{className:"space-y-2",children:[e.ogImage&&(0,t.jsx)("div",{className:"w-full h-32 bg-muted rounded border flex items-center justify-center text-xs text-muted-foreground",children:(0,t.jsx)(A.LoadImage,{src:e.ogImage,alt:"OG Image Preview",width:1200,height:630,className:"w-full h-full object-cover"})}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"text-xs text-muted-foreground uppercase",children:x}),(0,t.jsx)("div",{className:"text-sm font-medium text-foreground leading-tight",children:(e.ogTitle||c).slice(0,60)}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground leading-relaxed",children:(e.ogDescription||p).slice(0,160)})]})]})]})})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("og-title")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"og-title",className:"text-xs",children:"OG Title"}),(0,t.jsx)(L.Input,{id:"og-title",value:e.ogTitle,onChange:e=>a("ogTitle",e.target.value),placeholder:"Facebook/LinkedIn title...",className:"text-xs"}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsxs)("span",{className:H(e.ogTitle,"ogTitle").color,children:[e.ogTitle.length,"/",q.ogTitle.max," characters"]}),"optimal"===H(e.ogTitle,"ogTitle").status&&(0,t.jsx)("span",{className:"text-green-500 text-xs",children:"✓ Optimal"}),"too-short"===H(e.ogTitle,"ogTitle").status&&e.ogTitle.length>0&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too short"]}),"too-long"===H(e.ogTitle,"ogTitle").status&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too long"]})]})]})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("og-description")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"og-description",className:"text-xs",children:"OG Description"}),(0,t.jsx)(I.Textarea,{id:"og-description",value:e.ogDescription,onChange:e=>a("ogDescription",e.target.value),placeholder:"Facebook/LinkedIn description...",className:"text-xs min-h-[60
16px]"}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsxs)("span",{className:H(e.ogDescription,"ogDescription").color,children:[e.ogDescription.length,"/",q.ogDescription.max," characters"]}),"optimal"===H(e.ogDescription,"ogDescription").status&&(0,t.jsx)("span",{className:"text-green-500 text-xs",children:"✓ Optimal"}),"too-short"===H(e.ogDescription,"ogDescription").status&&e.ogDescription.length>0&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too short"]}),"too-long"===H(e.ogDescription,"ogDescription").status&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too long"]})]})]})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("og-image")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"og-image",className:"text-xs",children:"OG Image URL"}),(0,t.jsx)(L.Input,{id:"og-image",value:e.ogImage,onChange:e=>a("ogImage",e.target.value),placeholder:"https://example.com/image.jpg",className:"text-xs"})]})]}),s&&(0,t.jsx)("div",{className:"flex justify-end mt-2",children:(0,t.jsx)(C.Button,{size:"sm",onClick:s,disabled:o||n,children:l?"Saved":o?"Saving...":"Save Open Graph"})})]}),(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:`
17          relative w-full mx-auto
18          shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
19          dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
20          pt-1
21        `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"Twitter Cards:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500 pt-3.5",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsx)("div",{className:"flex-1 space-y-2 pb-1",children:(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-card space-y-3",children:[(0,t.jsx)("h5",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Twitter/X Preview"}),(0,t.jsxs)("div",{className:"space-y-2",children:[e.twitterImage&&(0,t.jsx)("div",{className:"w-full h-32 bg-muted rounded border flex items-center justify-center text-xs text-muted-foreground",children:(0,t.jsx)(A.LoadImage,{src:e.twitterImage,alt:"Twitter Image Preview",width:1200,height:630,className:"w-full h-full object-cover"})}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-foreground leading-tight",children:(e.twitterTitle||c).slice(0,60)}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground leading-relaxed",children:(e.twitterDescription||p).slice(0,160)}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:x})]})]})]})})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("twitter-title")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"twitter-title",className:"text-xs",children:"Twitter Title"}),(0,t.jsx)(L.Input,{id:"twitter-title",value:e.twitterTitle,onChange:e=>a("twitterTitle",e.target.value),placeholder:"Twitter/X title...",className:"text-xs"}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsxs)("span",{className:H(e.twitterTitle,"twitterTitle").color,children:[e.twitterTitle.length,"/",q.twitterTitle.max," characters"]}),"optimal"===H(e.twitterTitle,"twitterTitle").status&&(0,t.jsx)("span",{className:"text-green-500 text-xs",children:"✓ Optimal"}),"too-short"===H(e.twitterTitle,"twitterTitle").status&&e.twitterTitle.length>0&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too short"]}),"too-long"===H(e.twitterTitle,"twitterTitle").status&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too long"]})]})]})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("twitter-description")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"twitter-description",className:"text-xs",children:"Twitter Description"}),(0,t.jsx)(I.Textarea,{id:"twitter-description",value:e.twitterDescription,onChange:e=>a("twitterDescription",e.target.value),placeholder:"Twitter/X description...",className:"text-xs min-h-[60
21px]"}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsxs)("span",{className:H(e.twitterDescription,"twitterDescription").color,children:[e.twitterDescription.length,"/",q.twitterDescription.max," characters"]}),"optimal"===H(e.twitterDescription,"twitterDescription").status&&(0,t.jsx)("span",{className:"text-green-500 text-xs",children:"✓ Optimal"}),"too-short"===H(e.twitterDescription,"twitterDescription").status&&e.twitterDescription.length>0&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too short"]}),"too-long"===H(e.twitterDescription,"twitterDescription").status&&(0,t.jsxs)("span",{className:"text-red-500 text-xs flex items-center gap-1",children:[(0,t.jsx)(S.default,{className:"h-3 w-3"}),"Too long"]})]})]})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("twitter-image")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"twitter-image",className:"text-xs",children:"Twitter Image URL"}),(0,t.jsx)(L.Input,{id:"twitter-image",value:e.twitterImage,onChange:e=>a("twitterImage",e.target.value),placeholder:"https://example.com/twitter-image.jpg",className:"text-xs"})]})]}),s&&(0,t.jsx)("div",{className:"flex justify-end mt-2",children:(0,t.jsx)(C.Button,{size:"sm",onClick:s,disabled:o||n,children:l?"Saved":o?"Saving...":"Save Twitter"})})]}),(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:`
22          relative w-full mx-auto
23          shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
24          dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
25          pt-1
26        `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"Robots & Canonical:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button","aria-pressed":!!(e.robotsIndex??!0),onClick:()=>a("robotsIndex",!(e.robotsIndex??!0)),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors mt-[4px] ${e.robotsIndex??!0?"bg-primary":"bg-muted"}`,children:(0,t.jsx)("span",{className:`inline-block h-4 w-4 transform bg-background rounded-full transition-transform ${e.robotsIndex??!0?"translate-x-4":"translate-x-1"}`})}),(0,t.jsx)(T.Label,{className:"text-xs mt-[4px]",children:"Index"})]})})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button","aria-pressed":!!(e.robotsFollow??!0),onClick:()=>a("robotsFollow",!(e.robotsFollow??!0)),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors mt-[4px] ${e.robotsFollow??!0?"bg-primary":"bg-muted"}`,children:(0,t.jsx)("span",{className:`inline-block h-4 w-4 transform bg-background rounded-full transition-transform ${e.robotsFollow??!0?"translate-x-4":"translate-x-1"}`})}),(0,t.jsx)(T.Label,{className:"text-xs mt-[4px]",children:"Follow"})]})})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button","aria-pressed":!!e.robotsNoImageIndex,onClick:()=>a("robotsNoImageIndex",!e.robotsNoImageIndex),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors mt-[4px] ${e.robotsNoImageIndex?"bg-primary":"bg-muted"}`,children:(0,t.jsx)("span",{className:`inline-block h-4 w-4 transform bg-background rounded-full transition-transform ${e.robotsNoImageIndex?"translate-x-4":"translate-x-1"}`})}),(0,t.jsx)(T.Label,{className:"text-xs mt-[4px]",children:"No Image Index"})]})})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-1 pb-1",children:[(0,t.jsx)(T.Label,{className:"text-xs",children:"Max Snippet"}),(0,t.jsx)(L.Input,{value:e.robotsMaxSnippet||"",onChange:e=>{a("robotsMaxSnippet",e.target.value.replace(/[^0-9-]/g,"").replace(/(?!^)-/g,""))},placeholder:"e.g. 160, 0, -1",className:"text-xs"})]})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-1 pb-1",children:[(0,t.jsx)(T.Label,{className:"text-xs",children:"Canonical URL override"}),(0,t.jsx)(L.Input,{value:e.canonical||"",onChange:e=>a("canonical",e.target.value),placeholder:"https://example.com/your-canonical",className:"text-xs"})]})]}),s&&(0,t.jsx)("div",{className:"flex justify-end mt-2",children:(0,t.jsx)(C.Button,{size:"sm",onClick:s,disabled:o||n,children:l?"Saved":o?"Saving...":"Save SEO Settings"})})]}),(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:`
27          relative w-full mx-auto
28          shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
29          dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
30          pt-1
31        `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"Schema.org / JSON-LD:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsx)("div",{className:"flex-1 space-y-2 pb-1",children:(0,t.jsx)($,{schemas:i,onChange:d||
31(()=>{})})})]}),s&&(0,t.jsx)("div",{className:"flex justify-end mt-2",children:(0,t.jsx)(C.Button,{size:"sm",onClick:s,disabled:o||n,children:l?"Saved":o?"Saving...":"Save Schemas"})})]}),(0,t.jsxs)("div",{className:"space-y-0",children:[(0,t.jsxs)("div",{className:`
32          relative w-full mx-auto
33          shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
34          dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
35          pt-1
36        `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"SEO Tools:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-2 bg-border"})]}),(0,t.jsxs)("ul",{className:"flex flex-col gap-0 pb-3",children:[(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors cursor-pointer group relative",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-1.5"}),(0,t.jsxs)("a",{className:"flex w-full items-center",href:"https://www.checkbot.io/",target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsxs)("svg",{className:"h-3 w-3 mr-2 text-muted-foreground group-hover:text-foreground transition",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,t.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),(0,t.jsx)("p",{className:"shrink-0 w-auto text-sm text-muted-foreground transition group-hover:text-foreground truncate",children:"SEO Analyzer"}),(0,t.jsx)("div",{className:"grow h-[1px] bg-gradient-to-r mr-[calc(0.75rem-3px)] from-border transition to-transparent group-hover:bg-primary ml-[calc(0.75rem-3px)]"})]})]}),(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors cursor-pointer group relative",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-1.5"}),(0,t.jsxs)("a",{className:"flex w-full items-center",href:"https://developers.facebook.com/tools/debug/",target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsxs)("svg",{className:"h-3 w-3 mr-2 text-muted-foreground group-hover:text-foreground transition",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),(0,t.jsx)("path",{d:"M2 12a15.3 15.3 0 0 1 20 0"})]}),(0,t.jsx)("p",{className:"shrink-0 w-auto text-sm text-muted-foreground transition group-hover:text-foreground truncate",children:"FaceBook Meta Debugger"}),(0,t.jsx)("div",{className:"grow h-[1px] bg-gradient-to-r mr-[calc(0.75rem-3px)] from-border transition to-transparent group-hover:bg-primary ml-[calc(0.75rem-3px)]"})]})]}),(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors cursor-pointer group relative",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-1.5"}),(0,t.jsxs)("a",{className:"flex w-full items-center",href:"https://tools.pingdom.com/",target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsxs)("svg",{className:"h-3 w-3 mr-2 text-muted-foreground group-hover:text-foreground transition",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M4 4h16v16H4z"}),(0,t.jsx)("path",{d:"M8 8h8v8H8z"})]}),(0,t.jsx)("p",{className:"shrink-0 w-auto text-sm text-muted-foreground transition group-hover:text-foreground truncate",children:"Speed Test Tool"}),(0,t.jsx)("div",{className:"grow h-[1px] bg-gradient-to-r mr-[calc(0.75rem-3px)] from-border transition to-transparent group-hover:bg-primary ml-[calc(0.75rem-3px)]"})]})]})]})]})]})}let K=(0,i.createServerReference)("608404c404147b560a41dc6ad542fd3b89017b7150",i.callServer,void 0,i.findSourceMapURL,"createPageAction"),G=["Default","Landing","EventLanding","Blog","Docs"],V={Default:"Default (simple)",Landing:"Landing (marketing)",EventLanding:"Event landing (ads / multi-day)",Blog:"Blog layout",Docs:"Documentation"};function J({newPage:e,templates:a,onChange:o,onCreate:l}){let[n,i]=(0,r.useState)([]),[d,c]=(0,r.useState)(!1),[p,x]=(0,r.useState)(null),[m,u]=(0,r.useState)(null),h="regattagrove",g=`${h}-`,b=async()=>{console.log("[CMS] ContentSection.loadPages start");let t=(0,s.createClient)(),{data:r}=await t.from("pages").select("slug, template").or(`slug.eq.${h},slug.ilike.${g}%`).order("slug",{ascending:!0}
36),a=(r||[]).filter(Boolean);console.log("[CMS] ContentSection.loadPages fetched",{count:a.length,prefix:g}),i(a),console.log("[CMS] ContentSection.loadPages home check",{homeSlug:h,hasHome:!!a.find(e=>e.slug===h)});let o=!!a.find(e=>e.slug===h);if(h&&!o)try{console.log("[CMS] ContentSection.loadPages auto-create home",{homeSlug:h,template:e.template||"Default"}),await K("",e.template||"Default");let{data:r}=await t.from("pages").select("slug, template").or(`slug.eq.${h},slug.ilike.${g}%`).order("slug",{ascending:!0});i((r||[]).filter(Boolean)),console.log("[CMS] ContentSection.loadPages auto-create done",{count:(r||[]).length})}catch{}};(0,r.useEffect)(()=>{b()},[]);let f=async()=>{if(l)return l();let t=(e.slug||"").replace(/^\/+/,"").trim().toLowerCase();console.log("[CMS] ContentSection.handleCreate",{slug:t,template:e.template}),c(!0),u(null);try{let r=await K(t,e.template);if(console.log("[CMS] ContentSection.handleCreate response",r),!r?.ok)return void u(r?.error||"Could not create page");await b(),o({slug:""}),x(t?`/${t}`:"/"),setTimeout(()=>x(null),2e3)}finally{c(!1)}};return(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:`
37        relative w-full mx-auto pt-1
38        shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
39        dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
40      `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"Create New Page:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group cursor-pointer hover:bg-gradient-to-r hover:from-primary/6 hover:via-primary/2 hover:to-transparent duration-500",onClick:()=>document.getElementById("page-slug")?.focus(),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"page-slug",className:"text-xs",children:"Slug"}),(0,t.jsx)(L.Input,{id:"page-slug",value:e.slug,onChange:e=>o({slug:e.target.value}),placeholder:"/landing",className:"text-xs"})]})]}),(0,t.jsxs)("div",{className:"flex w-full py-1.5 relative rounded-md transition-colors group",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-2.5 h-[1px] translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-0 mt-[calc(.625rem+3px)] transition"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2 pb-1",children:[(0,t.jsx)(T.Label,{htmlFor:"page-template",className:"text-xs",children:"Template"}),(0,t.jsx)("select",{id:"page-template",className:"text-xs h-8 w-full rounded-md border bg-background px-2",value:e.template,onChange:e=>o({template:e.target.value}),children:a.map(e=>(0,t.jsx)("option",{value:e,children:V[e]??e},e))})]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Pages (",n.length,")"]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,t.jsx)("span",{className:"text-xs text-red-500 max-w-[12rem] truncate",title:m,children:m}),p&&(0,t.jsxs)(N.default,{href:p,className:"text-xs text-green-500 underline underline-offset-2",rel:"noreferrer",children:["Created ",p]}),(0,t.jsx)(C.Button,{size:"sm",className:"text-xs",onClick:f,disabled:d||!e.slug,children:"Create Page"})]})]}),(0,t.jsxs)("ul",{className:"flex flex-col gap-0 pb-3 mt-2",children:[(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors cursor-pointer group relative",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[8px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-1.5"}),(0,t.jsxs)(N.default,{className:"flex w-full items-center",href:"/",rel:"noreferrer",children:[(0,t.jsx)("p",{className:"shrink-0 w-auto text-sm text-muted-foreground transition group-hover:text-foreground truncate",children:"/"}),(0,t.jsx)("div",{className:"grow h-[1px] bg-gradient-to-r mr-[calc(0.75rem-3px)] from-border transition to-transparent group-hover:bg-primary ml-[calc(0.75rem-3px)]"}),(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:"FrontPage"})]})]},"__frontpage"),n.filter(e=>"regattagrove"!==e.slug).map(e=>{let r=e.slug.startsWith(g)?e.slug.slice(g.length):e.slug;return(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors cursor-pointer group relative",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[8px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-1.5"}),(0,t.jsxs)(N.default,{className:"flex w-full items-center",href:`/${r}`,rel:"noreferrer",children:[(0,t.jsxs)("p",{className:"shrink-0 w-auto text-sm text-muted-foreground transition group-hover:text-foreground truncate",children:["/",r]}),(0,t.jsx)("div",{className:"grow h-[1px] bg-gradient-to-r mr-[calc(0.75rem-3px)] from-border transition to-transparent group-hover:bg-primary ml-[calc(0.75rem-3px)]"}),(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.template})]})]},e.slug)}),0===n.length&&(0,t.jsx)("li",{className:"text-xs text-muted-foreground px-1.5 py-1",children:"No pages yet"})]})]})}var W=e.i(37727);function X({navItems:e,onChange:r}){let a=(t,a)=>{r(e.map((e,r)=>r===t?{...e,...a}:e))};return(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:`
41        relative w-full mx-auto pt-1
42        shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
43        dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
44      `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"Main Navigation:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsx)("ul",{className:"flex flex-col pb-2",children:e.map((s,o)=>(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors group relative",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-primary"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-primary rounded-full mt-2.5"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-primary mr-1.5 mt-[calc(.625rem+3px)]"}),(0,t.jsxs)("div",{className:"flex-1 grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(T.Label,{className:"text-xs",children:"Label"}),(0,t.jsx)(L.Input,{className:"text-xs",value:s.label,onChange:e=>a(o,{label:e.target.value}),placeholder:"Page Title"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(T.Label,{className:"text-xs",children:"URL"}
44),(0,t.jsx)(L.Input,{className:"text-xs",value:s.href,onChange:e=>a(o,{href:e.target.value}),placeholder:"/"})]})]}),(0,t.jsx)("div",{className:"ml-2 flex items-end",children:(0,t.jsx)(C.Button,{variant:"ghost",size:"sm",className:"text-xs mt-6",onClick:()=>r(e.filter((e,t)=>t!==o)),children:(0,t.jsx)(W.X,{className:"h-3 w-3"})})})]},o))}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(C.Button,{size:"sm",className:"text-xs",onClick:()=>r([...e,{label:"",href:""}]),children:"Add Navigation Item"})})]})}let Y=(0,o.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Z=(0,o.default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),Q=(0,o.default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),ee=(0,i.createServerReference)("400048d5b9b306ed7f22779550a9e12d308a9e01a2",i.callServer,void 0,i.findSourceMapURL,"revalidatePageAction");function et({components:e,getComponentsByType:a,onEdit:s}){let o=(0,x.usePathname)(),[l,n]=(0,r.useTransition)(),i=a("text"),d=a("media"),c=a("object"),p=(e,t)=>{let r=document.getElementById(e);r&&(r.scrollIntoView({behavior:"smooth",block:"center"}),r.classList.add("outline","outline-2","text"===t?"outline-[hsl(var(--zero-text))]":"image"===t?"outline-[hsl(var(--zero-image))]":"outline-[hsl(var(--zero-object))]","outline-offset-2"),r.setAttribute("data-hover-highlight",t))},m=(e,t)=>{let r=document.getElementById(e);r&&!r.hasAttribute("data-dialog-open")&&(r.classList.remove("outline","outline-2","text"===t?"outline-[hsl(var(--zero-text))]":"image"===t?"outline-[hsl(var(--zero-image))]":"outline-[hsl(var(--zero-object))]","outline-offset-2"),r.removeAttribute("data-hover-highlight"))};return(0,t.jsx)("div",{className:"space-y-6",children:(0,t.jsxs)("div",{className:"space-y-0",children:[(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(C.Button,{variant:"secondary",size:"sm",disabled:l,onClick:()=>n(async()=>{await ee(o||"/")}),className:"gap-2 w-full",children:[(0,t.jsx)(Q,{className:`h-4 w-4 ${l?"animate-spin":""}`}),l?"Revalidating…":"Revalidate this page"]})}),(0,t.jsxs)("div",{className:`
45          relative w-full mx-auto
46          shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025]
47          dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]
48          pt-3
49        `,children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsx)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5",children:"Components Registry:"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-2 bg-border"})]}),(0,t.jsxs)("div",{className:"text-sm text-muted-foreground px-1.5 mb-4",children:["Active components detected on this page (",e.length," total)"]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2 px-1.5",children:[(0,t.jsx)(f.FileText,{className:"h-4 w-4 text-[hsl(var(--zero-text))]"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Text Components (",i.length,")"]})]}),(0,t.jsxs)("ul",{className:"flex flex-col gap-1 pb-3",children:[i.map(e=>(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors cursor-pointer group relative hover:bg-[hsl(var(--zero-text))]/10",onClick:()=>s(e.id),onMouseEnter:()=>p(e.id,"text"),onMouseLeave:()=>m(e.id,"text"),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-[hsl(var(--zero-text))]"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-[hsl(var(--zero-text))] rounded-full"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-[hsl(var(--zero-text))] mr-1.5"}),(0,t.jsxs)("div",{className:"flex w-full items-center",children:[(0,t.jsx)(f.FileText,{className:"h-3 w-3 mr-2 text-muted-foreground group-hover:text-foreground transition"}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,t.jsx)("p",{className:"text-xs text-foreground font-mono",children:e.id}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e.value?String(e.value).substring(0,40)+(String(e.value).length>40?"...":""):"Empty"})]})]})]},e.id)),0===i.length&&(0,t.jsx)("li",{className:"text-xs text-muted-foreground px-1.5 py-2",children:"No text components found"})]})]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2 px-1.5",children:[(0,t.jsx)(Y,{className:"h-4 w-4 text-[hsl(var(--zero-image))]"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Media Components (",d.length,")"]})]}),(0,t.jsxs)("ul",{className:"flex flex-col gap-1 pb-3",children:[d.map(e=>(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors cursor-pointer group relative hover:bg-[hsl(var(--zero-image))]/10",onClick:()=>s(e.id),onMouseEnter:()=>p(e.id,"image"),onMouseLeave:()=>m(e.id,"image"),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-[hsl(var(--zero-image))]"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-[hsl(var(--zero-image))] rounded-full"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-[hsl(var(--zero-image))] mr-1.5"}),(0,t.jsxs)("div",{className:"flex w-full items-center",children:[(0,t.jsx)(Y,{className:"h-3 w-3 mr-2 text-muted-foreground group-hover:text-foreground transition"}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,t.jsx)("p",{className:"text-xs text-foreground font-mono",children:e.id}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e.metadata?.alt||"No alt text"})]})]})]},e.id)),0===d.length&&(0,t.jsx)("li",{className:"text-xs text-muted-foreground px-1.5 py-2",children:"No media components found"})]})]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2 px-1.5",children:[(0,t.jsx)(Z,{className:"h-4 w-4 text-[hsl(var(--zero-object))]"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Object Components (",c.length,")"]})]}),(0,t.jsxs)("ul",{className:"flex flex-col gap-1 pb-3",children:[c.map(e=>(0,t.jsxs)("li",{className:"flex w-full items-center py-1.5 rounded-md transition-colors cursor-pointer group relative hover:bg-[hsl(var(--zero-object))]/10",onClick:()=>s(e.id),onMouseEnter:()=>p(e.id,"object"),onMouseLeave:()=>m(e.id,"object"),children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[1px] bg-border group-hover:bg-[hsl(var(--zero-object))]"}),(0,t.jsx)("div",{className:"w-[7px] h-[7px] translate-x-[-3px] border-[3px] border-background bg-border group-hover:bg-[hsl(var(--zero-object))] rounded-full"}),(0,t.jsx)("div",{className:"w-3 h-[1px] transition translate-x-[-3px] bg-gradient-to-r from-border to-transparent group-hover:bg-[hsl(var(--zero-object))] mr-1.5"}),(0,t.jsxs)("div",{className:"flex w-full items-center",children:[(0,t.jsx)(Z,{className:"h-3 w-3 mr-2 text-muted-foreground group-hover:text-foreground transition"}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,t.jsx)("p",{className:"text-xs text-foreground font-mono",children:e.id}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e.value?JSON.stringify(e.value).substring(0,40)+"...":"Empty object"})]})]})]},e.id)),0===c.length&&(0,t.jsx)("li",{className:"text-xs text-muted-foreground px-1.5 py-2",children:"No object c
49omponents found"})]})]})]})})}var er=e.i(25913),ea=e.i(8311);let es=(0,er.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function eo({className:e,variant:r,...a}){return(0,t.jsx)("div",{className:(0,ea.cn)(es({variant:r}),e),...a})}function el({message:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2 w-full max-w-md text-sm",children:["success"in e&&(0,t.jsx)("div",{className:"text-foreground border-l-2 border-foreground px-4",children:e.success}),"error"in e&&(0,t.jsx)("div",{className:"text-destructive-foreground border-l-2 border-destructive-foreground px-4",children:e.error}),"message"in e&&(0,t.jsx)("div",{className:"text-foreground border-l-2 px-4",children:e.message})]})}function en({children:e,pendingText:r="Submitting...",...a}){let{pending:s}=(0,p.useFormStatus)();return(0,t.jsx)(C.Button,{type:"submit","aria-disabled":s,...a,children:s?r:e})}function ei({isLoading:e,hasEnvVars:r,user:a,signOutAction:s,signInAction:o,searchError:l,searchMessage:n}){return a?(0,t.jsx)("div",{className:"pb-1 space-y-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Auth: ",(0,t.jsx)("span",{className:"font-mono",children:a.email})]}),(0,t.jsx)("form",{action:s,children:(0,t.jsx)(C.Button,{type:"submit",variant:"ghost",className:"text-xs border",size:"sm",children:"Sign out"})})]})}):e?(0,t.jsx)("div",{className:"pb-2",children:"Loading..."}):r?(0,t.jsx)("div",{className:"py-2 pt-6 space-y-4",children:(0,t.jsxs)("form",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Sign in"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Access CMS features"})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(T.Label,{htmlFor:"email",children:"Email"}),(0,t.jsx)(L.Input,{name:"email",placeholder:"[email protected]",required:!0})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(T.Label,{htmlFor:"password",children:"Password"}),(0,t.jsx)(N.default,{className:"text-xs text-muted-foreground underline",href:"/forgot-password",children:"Forgot Password?"})]}),(0,t.jsx)(L.Input,{type:"password",name:"password",placeholder:"Your password",required:!0})]}),(0,t.jsx)(en,{pendingText:"Signing In...",formAction:o,size:"sm",className:"w-full",children:"Sign in"}),(l||n)&&(0,t.jsx)(el,{message:l?{error:l}:{message:n}})]})]})}):(0,t.jsxs)("div",{className:"pb-2 space-y-4",children:[(0,t.jsx)(eo,{variant:"destructive",className:"font-normal",children:"Please update .env.local file with anon key and url"}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(C.Button,{size:"sm",variant:"outline",disabled:!0,className:"opacity-75",children:"Sign in"}),(0,t.jsx)(C.Button,{size:"sm",variant:"default",disabled:!0,className:"opacity-75",children:"Sign up"})]})]})}var S=S,ed=e.i(6321),ed=ed;let ec=(0,i.createServerReference)("4005f4d232409d52c24d54a3b49ea030f82f69cb90",i.callServer,void 0,i.findSourceMapURL,"sendPushAction"),ep={title:"",body:"",subtitle:"",customData:""};function ex(e){if(!e.trim())return{};try{let t=JSON.parse(e);if("object"!=typeof t||Array.isArray(t)||null===t)return null;return t}catch{return null}}function em({label:e,value:r,accent:a,danger:s}){let o=s&&r>0?"text-red-400":a?"text-green-400":"text-foreground";return(0,t.jsxs)("div",{className:"bg-muted rounded-lg p-2.5 text-center",children:[(0,t.jsx)("div",{className:`text-lg font-bold ${o}`,children:r}),(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground mt-0.5 uppercase tracking-wider",children:e})]})}function eu({title:e,body:r,subtitle:a}){let s=e||r;return(0,t.jsxs)("div",{className:"rounded-xl bg-muted/40 border border-border overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-3 py-2 border-b border-border flex items-center gap-1.5",children:[(0,t.jsx)(v,{className:"h-2.5 w-2.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground uppercase tracking-widest",children:"Preview"})]}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsxs)("div",{className:`rounded-xl border border-border bg-background/60 backdrop-blur p-3 flex items-start gap-2.5 transition-opacity ${s?"opacity-100":"opacity-40"}`,children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-lg bg-muted flex items-center justify-center shrink-0 text-sm",children:"🔔"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-1 mb-0.5",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold text-foreground leading-tight truncate",children:e||"Title"}),(0,t.jsx)("span",{className:"text-[9px] text-muted-foreground shrink-0",children:"now"})]}),a&&(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground leading-tight mb-0.5 truncate",children:a}),(0,t.jsx)("div",{className:"text-[11px] text-muted-foreground leading-snug line-clamp-2",children:r||"Message body…"})]})]})})]})}function eh(){let[e,a]=(0,r.useTransition)(),[s,o]=(0,r.useState)(ep),[l,n]=(0,r.useState)(""),[i,d]=(0,r.useState)(!1),[c,p]=(0,r.useState)(null),x=e=>o(t=>({...t,...e})),m=()=>{let e=ex(s.customData);return null===e?(n("Invalid JSON — must be a plain object"),null):(n(""),e)},u=!e&&s.title.trim().length>0&&s.body.trim().length>0;return(0,t.jsxs)("div",{className:"w-full min-w-0 space-y-4 overflow-x-hidden pr-2",children:[(0,t.jsxs)("div",{className:"relative w-full mx-auto pt-1",children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsxs)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(v,{className:"h-3 w-3"}),"Push Notifications"]}),(0,t.jsx)("div",{className:"px-1.5 mb-1.5 text-[10px] text-muted-foreground",children:"Broadcasts via APNs & FCM"}),(0,t.jsx)("div",{className:"w-8 h-[1px] bg-border"}),(0,t.jsx)("div",{className:"w-[1px] h-1 bg-border"})]}),(0,t.jsx)(eu,{title:s.title,body:s.body,subtitle:s.subtitle||void 0}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("label",{className:"text-[10px] text-muted-foreground uppercase tracking-wider px-0.5",children:["Title ",(0,t.jsx)("span",{className:"text-muted-foreground
49/40",children:"*"})]}),(0,t.jsx)(L.Input,{value:s.title,onChange:e=>x({title:e.target.value}),placeholder:"Notification title",className:"text-xs h-8"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("label",{className:"text-[10px] text-muted-foreground uppercase tracking-wider px-0.5",children:["Body ",(0,t.jsx)("span",{className:"text-muted-foreground/40",children:"*"})]}),(0,t.jsx)(I.Textarea,{value:s.body,onChange:e=>x({body:e.target.value}),placeholder:"Notification message",rows:3,className:"text-xs resize-none"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("label",{className:"text-[10px] text-muted-foreground uppercase tracking-wider px-0.5",children:["Subtitle ",(0,t.jsx)("span",{className:"text-muted-foreground/40",children:"iOS only"})]}),(0,t.jsx)(L.Input,{value:s.subtitle,onChange:e=>x({subtitle:e.target.value}),placeholder:"Optional",className:"text-xs h-8"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("label",{className:"text-[10px] text-muted-foreground uppercase tracking-wider px-0.5",children:["Data ",(0,t.jsx)("span",{className:"text-muted-foreground/40",children:"JSON object"})]}),(0,t.jsx)(I.Textarea,{value:s.customData,onChange:e=>{x({customData:e.target.value}),l&&null!==ex(e.target.value)&&n("")},placeholder:'{\n  "url": "/events/..."\n}',rows:3,className:`text-xs font-mono resize-none ${l?"border-red-500":""}`}),l&&(0,t.jsxs)("p",{className:"text-red-400 text-[10px] flex items-center gap-1 px-0.5",children:[(0,t.jsx)(S.default,{className:"h-3 w-3 shrink-0"}),l]})]}),(0,t.jsx)(C.Button,{onClick:()=>{m()&&d(!0)},disabled:!u,variant:"secondary",size:"sm",className:"w-full gap-2",children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Q,{className:"h-3.5 w-3.5 animate-spin"}),"Sending…"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v,{className:"h-3.5 w-3.5"}),"Review push"]})}),(0,t.jsx)(k.Dialog,{open:i,onOpenChange:d,children:(0,t.jsxs)(k.DialogContent,{className:"zero max-w-[380px] overflow-hidden border-border bg-background p-0 text-foreground shadow-[0px_25px_120px_-40px_#000000]",children:[(0,t.jsxs)(k.DialogHeader,{className:"border-b border-border p-4 pb-3 text-left shadow-[0px_20px_20px_-20px_#000000aa]",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(v,{className:"h-3 w-3"}),"Push Notifications"]}),(0,t.jsx)(k.DialogTitle,{className:"text-sm font-mono font-semibold tracking-tight",children:"Send push notification?"}),(0,t.jsx)(k.DialogDescription,{className:"text-xs leading-relaxed text-muted-foreground",children:"This will broadcast the notification to all registered devices."})]}),(0,t.jsxs)("div",{className:"space-y-3 p-2",children:[(0,t.jsx)(eu,{title:s.title,body:s.body,subtitle:s.subtitle||void 0}),s.customData.trim()&&(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:[(0,t.jsx)("div",{className:"mb-1.5 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Custom data"}),(0,t.jsx)("pre",{className:"max-h-32 overflow-auto whitespace-pre-wrap break-words text-[10px] text-muted-foreground",children:s.customData})]})]}),(0,t.jsxs)(k.DialogFooter,{className:"gap-2 border-t border-border bg-background p-3 shadow-[0px_-20px_20px_-20px_#000000aa] sm:gap-2",children:[(0,t.jsx)(C.Button,{type:"button",variant:"ghost",size:"sm",disabled:e,onClick:()=>d(!1),children:"Cancel"}),(0,t.jsx)(C.Button,{type:"button",variant:"default",size:"sm",disabled:e,onClick:()=>{let e=m();if(!e)return;p(null);let t={title:s.title,body:s.body,subtitle:s.subtitle||void 0,data:e,targetMode:"all"};a(async()=>{p(await ec(t)),d(!1)})},className:"gap-2",children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Q,{className:"h-3.5 w-3.5 animate-spin"}),"Sending…"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v,{className:"h-3.5 w-3.5"}),"Confirm send"]})})]})]})}),c&&(0,t.jsx)("div",{className:`rounded-xl border p-3.5 space-y-3 ${c.ok?"bg-muted/40 border-border":"bg-red-950/20 border-red-900/40"}`,children:c.ok?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-green-400 text-xs font-semibold",children:[(0,t.jsx)(ed.default,{className:"h-3.5 w-3.5"}),"Notification sent"]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-1.5",children:[(0,t.jsx)(em,{label:"Sent",value:c.result.sent,accent:!0}),(0,t.jsx)(em,{label:"Failed",value:c.result.failed,danger:!0}),(0,t.jsx)(em,{label:"Cleaned",value:c.result.removedTokens}
49)]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-1.5",children:[(0,t.jsx)(em,{label:"iOS",value:c.result.recipients.apns}),(0,t.jsx)(em,{label:"Android",value:c.result.recipients.fcm})]}),c.result.errors.fcm.length>0&&(0,t.jsxs)("div",{className:"bg-red-950/30 rounded-lg p-2.5 space-y-1",children:[(0,t.jsx)("p",{className:"text-[9px] text-red-400 uppercase tracking-wider",children:"FCM errors"}),c.result.errors.fcm.map((e,r)=>(0,t.jsxs)("p",{className:"text-[10px] text-red-300 font-mono",children:[e.code,": ",e.message]},r))]})]}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-red-400 text-xs",children:[(0,t.jsx)(S.default,{className:"h-3.5 w-3.5 shrink-0"}),c.error]})})]})}var eg=e.i(46552);let eb=(0,i.createServerReference)("40170897c30b0e62c91d741984c6e80a01b68a55fa",i.callServer,void 0,i.findSourceMapURL,"saveSeoAction");var ef=e.i(3949),ev=e.i(88227);function ey({open:e,onOpenChange:a}){let o,n=(0,x.useRouter)(),{user:i,isLoading:j,hasSiteAccess:N}=(0,ef.useAuth)(),w={seo:!0,content:!0,components:!0,push:(o=(0,ev.getCmsHostOptions)()).enablePush,settings:o.enablePageSettings},k=["seo","content","components","push","settings"].filter(e=>w[e]),S=k[0]||"seo",[C,L]=(0,r.useState)(S),[T,I]=(0,r.useState)(null),A=(0,r.useRef)(null),[M,E]=(0,r.useState)({left:0,width:0}),[P,z]=(0,r.useState)({title:"",description:"",keywords:"",ogTitle:"",ogDescription:"",ogImage:"",twitterTitle:"",twitterDescription:"",twitterImage:"",focusKeyphrase:"",robotsIndex:!0,robotsFollow:!0,robotsNoImageIndex:!1,robotsMaxSnippet:"",canonical:""}),[D,B]=(0,r.useState)([]),[F,O]=(0,r.useState)(null),[R,$]=(0,r.useState)(!1),[q,H]=(0,r.useState)(!1),[K,V]=(0,r.useState)({slug:"",template:"Default"}),[W,Y]=(0,r.useState)([{label:"Home",href:"/"},{label:"About",href:"/about"}]),{components:Z,getComponentsByType:Q,openComponentDialog:ee}=(0,y.useComponentRegistry)(),er=(0,x.useSearchParams)(),ea=(0,x.usePathname)();(0,r.useEffect)(()=>{(async()=>{let e=(0,s.createClient)(),t=(ea||"/").replace(/^\/+/,"").trim(),r=(0,eg.withCmsPrefix)("seo"),a=""===t?null:(0,eg.withCmsPrefix)(`${t}-seo`),o=null;if(a){let t=await e.from("seo").select("data").eq("id",a).maybeSingle();t.data?.data&&(o=t.data)}if(!o){let t=await e.from("seo").select("data").eq("id",r).maybeSingle();t.data?.data&&(o=t.data)}let l=o?.data;if(l){let e,t;O(l),z({title:l.title||"",description:l.description||"",keywords:Array.isArray(l.keywords)?l.keywords.join(", "):l.keywords||"",ogTitle:l.openGraph?.title||"",ogDescription:l.openGraph?.description||"",ogImage:(e=l.openGraph?.images?.[0])?"string"==typeof e?e:e.url||"":"",twitterTitle:l.twitter?.title||"",twitterDescription:l.twitter?.description||"",twitterImage:(t=l.twitter?.images?.[0])?"string"==typeof t?t:t.url||"":"",focusKeyphrase:l.focusKeyphrase||"",robotsIndex:"boolean"!=typeof l.robots?.index||l.robots.index,robotsFollow:"boolean"!=typeof l.robots?.follow||l.robots.follow,robotsNoImageIndex:!!(l.robots?.noimageindex||l.robots?.noImageIndex),robotsMaxSnippet:"number"==typeof l.robots?.["max-snippet"]?String(l.robots["max-snippet"]):"",canonical:l.alternates?.canonical||""}),B(Array.isArray(l.schemas)?l.schemas:[])}})()},[ea]),(0,r.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>I(document.getElementById("tabs-list")),100);return()=>clearTimeout(t)},[e]),(0,r.useEffect)(()=>(document.documentElement.classList.toggle("cms-left-drawer-open",e),()=>document.documentElement.classList.remove("cms-left-drawer-open")),[e]),(0,r.useEffect)(()=>{let e=()=>{let e=A.current;if(!e)return;let t=e.querySelector('[data-state="active"]');if(!t)return;let r=e.getBoundingClientRect(),a=t.getBoundingClientRect();E({left:a.left-r.left,width:a.width})};e();let t=new ResizeObserver(e);return A.current&&t.observe(A.current),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[C,T]);let es=async()=>{$(!0);try{let e,t=(0,s.createClient)(),{data:r}=await t.auth.getUser();if(!r.user)return;let a=F||{},o={...a,title:P.title||a.title,description:P.description||a.description,keywords:P.keywords?P.keywords.split(",").map(e=>
49e.trim()).filter(Boolean):a.keywords,openGraph:{...a.openGraph||{},title:P.ogTitle||a.openGraph?.title,description:P.ogDescription||a.openGraph?.description,images:P.ogImage?["object"==typeof a.openGraph?.images?.[0]?{...a.openGraph?.images?.[0]||{},url:P.ogImage}:{url:P.ogImage}]:a.openGraph?.images},twitter:{...a.twitter||{},title:P.twitterTitle||a.twitter?.title,description:P.twitterDescription||a.twitter?.description,images:P.twitterImage?[P.twitterImage]:a.twitter?.images},focusKeyphrase:P.focusKeyphrase||a.focusKeyphrase,robots:{...a.robots||{},index:"boolean"==typeof P.robotsIndex?P.robotsIndex:a.robots?.index??!0,follow:"boolean"==typeof P.robotsFollow?P.robotsFollow:a.robots?.follow??!0,...P.robotsNoImageIndex?{noimageindex:!0}:{noimageindex:!1},...(e=Number(P.robotsMaxSnippet),!isNaN(e)&&(e>=0||-1===e)?{"max-snippet":e}:{})},alternates:{...a.alternates||{},...P.canonical?{canonical:P.canonical}:{}},schemas:D.length?D:void 0},l=new FormData;l.set("data",JSON.stringify(o)),l.set("path",window.location.pathname);let i=(window.location.pathname||"/").replace(/^\/+/,"").trim();l.set("id",""===i?"seo":`${i}-seo`);let d=await eb(l);d?.ok&&(O(o),n.refresh(),H(!0),setTimeout(()=>H(!1),1500))}finally{$(!1)}},eo=(e,r)=>(0,t.jsx)(u.TabsTrigger,{value:e,className:"relative z-10 flex items-center justify-center w-full h-8 rounded-sm data-[state=active]:bg-transparent data-[state=active]:shadow-none data-[state=active]:text-foreground hover:text-foreground",children:r}),el=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative w-full mx-auto pt-1",children:[(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mb-3.5"}),(0,t.jsxs)("div",{className:"text-xs font-bold font-montserrat uppercase px-1.5 mb-1 transition-all duration-300",children:[(e=>{switch(e){case"seo":return"SEO & Metadata";case"content":default:return"Content Management";case"components":return"Components Registry";case"push":return"Push Notifications";case"settings":return"Site Settings"}})(C),":"]})]}),(0,t.jsxs)(u.TabsList,{ref:A,className:"relative grid w-full h-11 mb-4 bg-muted rounded-md p-1 overflow-hidden",style:{gridTemplateColumns:`repeat(${k.length}, minmax(0, 1fr))`},children:[(0,t.jsx)("span",{className:"pointer-events-none absolute top-1 bottom-1 left-0 z-0 rounded-sm bg-black/40 transition-[transform,width] duration-300",style:{transform:`translateX(${M.left}px)`,width:M.width}}),w.seo&&eo("seo",(0,t.jsx)(g,{className:"h-4 w-4"})),w.content&&eo("content",(0,t.jsx)(b,{className:"h-4 w-4"})),w.components&&eo("components",(0,t.jsx)(f.FileText,{className:"h-4 w-4"})),w.push&&eo("push",(0,t.jsx)(v,{className:"h-4 w-4"})),w.settings&&eo("settings",(0,t.jsx)(l,{className:"h-4 w-4"}))]})]}),en=(0,t.jsx)("div",{className:"px-4 py-10 text-center text-sm text-muted-foreground",children:"Sorry, you have no access to this site."}),ed=(0,t.jsx)("div",{className:"px-4 py-10 text-center text-sm text-muted-foreground",children:"Checking access…"});return(0,t.jsx)(m.Sheet,{open:e,onOpenChange:a,children:(0,t.jsx)(m.SheetContent,{side:"left",className:"z-[350] w-96 p-0 zero bg-background text-foreground overflow-hidden shadow-[inset_20px_0px_20px_-10px_#00000025] dark:shadow-[inset_20px_0px_20px_-10px_#000000aa] border-l border-border",children:(0,t.jsxs)("div",{className:"flex flex-col h-full mt-6",children:[(0,t.jsxs)(m.SheetHeader,{className:"py-2 px-6 gap-0",children:[(0,t.jsxs)(m.SheetTitle,{className:"flex items-center text-xl font-mono tracking-tight",children:[(0,t.jsx)(l,{className:"h-4 w-4 mr-2"}),(0,t.jsx)("p",{className:"font-mono mr-0",children:"0-CMS"})]}),(0,t.jsx)(ei,{isLoading:j,hasEnvVars:!0,user:i,signOutAction:d,signInAction:c,searchError:er.get("error"),searchMessage:er.get("message")})]}),(0,t.jsxs)("div",{className:"relative flex-1 flex flex-col overflow-hidden border-y border-black mx-2 shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025] dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[(0,t.jsx)("div",{id:"tabs-list",className:"px-4 shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025] dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa] z-100"}),i&&T&&N&&(0,p.createPortal)((0,t.jsx)(u.Tabs,{value:C,onValueChange:L,className:"w-full",children:el}),T),(0,t.jsx)(h.ScrollArea,{className:"ungabunga flex-1 px-4",children:(0,t.jsx)("div",{className:"flex-1 grow-0 flex flex-col h-full pr-[4px]",children:(0,t.jsxs)("div",{className:"flex-1 space-y-4",children:[i&&!j&&!1===N&&en,i&&!j&&!0===N&&(0,t.jsxs)(u.Tabs,{value:C,onValueChange:L,className:"w-full",children:[(0,t.jsx)(u.TabsContent,{value:"seo",className:"mt-0",children:(0,t.jsx)(U,{seoData:P,onChange:(e,t)=>
49z(r=>({...r,[e]:t})),onSave:es,isSaving:R,saved:q,disabled:!i,schemas:D,onSchemasChange:B})}),w.content&&(0,t.jsx)(u.TabsContent,{value:"content",className:"mt-0",children:(0,t.jsx)(J,{newPage:K,templates:G,onChange:e=>V(t=>({...t,...e}))})}),w.components&&(0,t.jsx)(u.TabsContent,{value:"components",className:"mt-0",children:(0,t.jsx)(et,{components:Z,getComponentsByType:Q,onEdit:ee})}),w.push&&(0,t.jsx)(u.TabsContent,{value:"push",className:"mt-0",children:(0,t.jsx)(eh,{})}),w.settings&&(0,t.jsx)(u.TabsContent,{value:"settings",className:"mt-0",children:(0,t.jsx)(X,{navItems:W,onChange:Y})})]}),i&&j&&ed]})})}),(0,t.jsx)("div",{className:"flex flex-col gap-2 justify-center items-center mt-auto py-4 z-100 shadow-[0px_-25px_20px_-20px_#00000025,0px_25px_20px_-20px_#00000025] dark:shadow-[0px_-25px_20px_-20px_#000000aa,0px_25px_20px_-20px_#000000aa]",children:(0,t.jsx)(_,{})})]}),(0,t.jsx)("div",{className:"w-full h-[1px] bg-[#ffffff11] mx-auto mt-1"})]})]})})})}var ej=e.i(74656);e.s(["CMSPanel",0,function(){let[e,o]=(0,r.useState)(!1),[l,i]=(0,r.useState)(null),[d,c]=(0,r.useState)(!0),{isVisible:p}=(0,a.useKonami)(),m=(0,x.usePathname)(),[u,h]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=(0,s.createClient)();(async()=>{let{data:{user:t}}=await e.auth.getUser();i(t),c(!1)})()},[]),(0,r.useEffect)(()=>{!p||d||l||o(!0)},[p,d,l]),(0,r.useEffect)(()=>{let e=!1;return(async()=>{if(!p)return h(null);let t=(m||"").split("/").filter(Boolean);if(t.length<2)return h(null);let r=t[0],a=t.slice(1).join("/"),o=(0,eg.withCmsPrefix)(`${r}-${a}`);try{let t=(0,s.createClient)(),{data:a,error:l}=await t.from("cpt").select("slug,type").eq("slug",o).maybeSingle();!e&&a&&a.type===r?h(r):e||h(null)}catch{e||h(null)}})(),()=>{e=!0}},[m,p]),p)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n,{onClick:()=>{o(!0)}}),(0,t.jsx)(ey,{open:e,onOpenChange:e=>{o(e)}}),u&&(0,t.jsx)(ej.default,{data:{type:u,data:{}},hideCreate:!0})]}):null}],93622)},21272,e=>{"use strict";var t=e.i(71645),r=e.i(18566);function a(e){}e.s(["RouteMonitor",0,()=>{let e=(0,t.useRef)(""),s=(0,r.useSearchParams)(),o=(0,r.usePathname)();return(0,t.useEffect)(()=>{let e=0,t=()=>{e=window.requestAnimationFrame(()=>{let e=document.querySelectorAll(".anchor-measure"),t=window.innerHeight;e?.forEach(e=>{(e?.offsetHeight|0)>t?e.classList.add("big"):e.classList.remove("big")})})},r=()=>t();window.addEventListener("resize",r),t();let a=setTimeout(t,500);return()=>{window.removeEventListener("resize",r),cancelAnimationFrame(e),clearTimeout(a)}},[o]),(0,t.useEffect)(()=>{let t=t=>{if("A"!==t.target.tagName)return;let r=t.target,s=r.hash.slice(1)?.split("?")?.[0];if(s&&r.origin===window.location.origin){if(r.pathname===window.location.pathname)return void a(s);e.current=s}};return a(window.location.hash.slice(1)?.split("?")?.[0]),document.addEventListener("click",t),()=>document.removeEventListener("click",t)},[]),(0,t.useEffect)(()=>{e.current&&(a(e.current),e.current="")},[o,s]),null}])}]);

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.