1import{r as o,j as e}from"./vendor-tanstack-D3Q9Yyxk.js";import{C as M}from"./CertBoxMark-FzqeIGEx.js";import{b1 as L,bc as F,b6 as c}from"./index-DN5F4pPB.js";import{m as I,n as T,X as _}from"./vendor-icons-DsBP5CwP.js";import{L as r}from"./vendor-react-DrSAzhxl.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"8bad1ef1d1baf20043d4024cccb275075dbee4da"};var x=new t.Error().stack;x&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[x]="378a3024-4965-4766-9e6f-45eedcc744b7",t._sentryDebugIdIdentifier="sentry-dbid-378a3024-4965-4766-9e6f-45eedcc744b7")}catch{}})();const E=[{key:"certificates",label:"Certificates",href:t=>t?"/certificates":"/browse-certificates/"},{key:"how-it-works",label:"How it works",href:()=>"/how-it-works/"},{key:"features",label:"Features",href:()=>"/features/"},{key:"pricing",label:"Pricing",href:()=>"/pricing/"}],y=[{key:"guides",label:"Guides",href:()=>"/guides/"},{key:"symbols",label:"Symbols",href:()=>"/symbols/"},{key:"reference",label:"Reference",href:()=>"/reference/"},{key:"tools",label:"Tools",href:()=>"/tools/"},{key:"compare",label:"Compare",href:()=>"/compare/"}];function U({activePage:t,maxWidth:x="max-w-5xl",sticky:g,onDark:i}){const{user:d}=L(),{isFree:j}=F(),[h,a]=o.useState(!1),[m,f]=o.useState(!1),b=o.useRef(null),p=o.useRef(null),k=o.useRef(null),R=y.some(s=>s.key===t),S=i?"bg-hero":"bg-white border-b border-border",$=i?"text-white":"text-primary",w=i?"text-sm text-white/60 hover:text-white transition-colors":"text-sm text-text-secondary hover:text-primary transition-colors",v=i?"text-sm font-semibold text-white":"text-sm font-semibold text-primary",z=i?"text-white":"text-text-primary";return o.useEffect(()=>{if(!m)return;const s=l=>{p.current&&!p.current.contains(l.target)&&f(!1)},n=l=>{l.key==="Escape"&&f(!1)};return document.addEventListener("click",s),document.addEventListener("keydown",n),()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",n)}},[m]),o.useEffect(()=>{if(!h)return;k.current=document.activeElement,b.current?.querySelector("[data-close]")?.focus();const n=l=>{if(l.key==="Escape"){a(!1);return}if(l.key!=="Tab")return;const u=b.current?.querySelectorAll("a, button");if(!u?.length)return;const N=u[0],C=u[u.length-1];l.shiftKey&&document.activeElement===N?(l.preventDefault(),C.focus()):!l.shiftKey&&document.activeElement===C&&(l.preventDefault(),N.focus())};return document.addEventListener("keydown",n),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",n),document.body.style.overflow="",k.current?.focus()}},[h]),e.jsxs("header",{className:`${S}${g?" sticky top-0 z-10":""}`,children:[e.jsxs("div",{className:`${x} mx-auto px-4 h-14 flex items-center justify-between`,children:[e.jsxs(r,{to:"/",className:"flex items-center gap-2",children:[e.jsx(M,{size:24,className:i?"text-white":"text-primary"}),e.jsx("span",{className:`text-base font-semibold tracking-[-0.011em] ${$}`,children:"CertBox"})]}),e.jsxs("nav",{"aria-label":"Main",className:"flex items-center gap-2 sm:gap-3",children:[E.map(s=>e.jsxs(o.Fragment,{children:[s.key==="pricing"&&e.jsxs("div",{ref:p,className:"relative hidden sm:block",children:[e.jsxs("button",{type:"button","data-resources-toggle":!0,onClick:()=>f(n=>!n),"aria-haspopup":"true","aria-expanded":m,className:`flex items-center gap-1 ${R?v:w}`,children:["Resources",e.jsx(I,{size:14,className:`transition-transform ${m?"rotate-180":""}`})]}),e.jsx("div",{"data-resources-panel":!0,className:`absolute right-0 top-full mt-2 min-w-[172px] bg-white border border-border rounded-lg shadow-lg py-1 z-50${m?"":" hidden"}`,children:y.map(n=>e.jsx(r,{to:n.href(!!d),onClick:()=>f(!1),className:`block px-4 py-2.5 text-sm transition-colors ${t===n.key?"font-semibold text-primary bg-primary/5":"text-text-secondary hover:text-text-primary hover:bg-background-secondary"}`,children:n.label},n.key))})]}),t===s.key?e.jsx("span",{className:`hidden sm:block ${v}`,children:s.label}):e.jsx(r,{to:s.href(!!d),className:`hidden sm:block ${w}`,children:s.label})]},s.key)),d?e.jsxs(e.Fragment,{children:[j&&e.jsx(r,{to:"/pricing",className:"hidden sm:block",children:e.jsx(c,{variant:i?"secondary":"ghost",size:"sm",children:"Upgrade"})}),e.jsx(r,{to:"/",children:e.jsx(c,{variant:i?"secondary":"ghost",size:"sm",children:"Dashboard"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{to:"/login",className:"hidden sm:block",children:e.jsx(c,{variant:i?"secondary":"ghost",size:"sm",children:"Sign in"})}),e.jsx(r,{to:"/signup",children:e.jsx(c,{size:"sm",children:"Sign up"})})]}),e.jsx("button",{type:"button","data-mobile-toggle":!0,"aria-label":"Open menu",onClick:()=>a(!0),className:`sm:hidden min-h-[44px] min-w-[44px] flex items-center justify-center ${z}`,children:e.jsx(T,{size:22})})]})]}),e.jsxs("div",{"data-mobile-panel":!0,className:`fixed inset-0 z-50 sm:hidden${h?""
1:" hidden"}`,children:[e.jsx("div",{className:"absolute inset-0 bg-black/40","data-mobile-backdrop":!0,onClick:()=>a(!1)}),e.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":"Main menu",className:"absolute inset-y-0 right-0 w-full max-w-xs bg-white shadow-xl flex flex-col",children:[e.jsxs("div",{className:"h-14 px-4 flex items-center justify-between border-b border-border shrink-0",children:[e.jsx("span",{className:"text-base font-semibold text-primary",children:"Menu"}),e.jsx("button",{type:"button","data-close":!0,"aria-label":"Close menu",onClick:()=>a(!1),className:"min-h-[44px] min-w-[44px] flex items-center justify-center text-text-primary",children:e.jsx(_,{size:22})})]}),e.jsxs("nav",{"aria-label":"Main",className:"flex-1 overflow-y-auto py-2",children:[E.map(s=>e.jsx(r,{to:s.href(!!d),onClick:()=>a(!1),className:`flex items-center min-h-[44px] px-4 text-base tracking-[-0.011em] ${t===s.key?"font-semibold text-primary":"text-text-primary"}`,children:s.label},s.key)),e.jsxs("div",{className:"mt-2 pt-2 border-t border-border",children:[e.jsx("p",{className:"px-4 pt-1 pb-1 text-sm text-text-secondary",children:"Resources"}),y.map(s=>e.jsx(r,{to:s.href(!!d),onClick:()=>a(!1),className:`flex items-center min-h-[44px] px-4 text-base tracking-[-0.011em] ${t===s.key?"font-semibold text-primary":"text-text-primary"}`,children:s.label},s.key))]})]}),e.jsx("div",{className:"p-4 border-t border-border shrink-0 flex flex-col gap-2",children:d?e.jsxs(e.Fragment,{children:[e.jsx(r,{to:"/",onClick:()=>a(!1),children:e.jsx(c,{className:"w-full min-h-[44px]",children:"Dashboard"})}),j&&e.jsx(r,{to:"/pricing",onClick:()=>a(!1),children:e.jsx(c,{variant:"secondary",className:"w-full min-h-[44px]",children:"Upgrade to Pro"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{to:"/signup",onClick:()=>a(!1),children:e.jsx(c,{className:"w-full min-h-[44px]",children:"Sign up"})}),e.jsx(r,{to:"/login",onClick:()=>a(!1),children:e.jsx(c,{variant:"secondary",className:"w-full min-h-[44px]",children:"Sign in"})})]})})]})]})]})}export{U as P};
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.