1import{j as e}from"./jsx-runtime-Cyy3VRf-.js";import{b as x,z as d,r as n,L as h}from"./chunk-6CSD65Y2-DEGEwpTx.js";import{I as g,u as f}from"./lang-DZB-6UuW.js";import{t as m,g as u}from"./analytics-B9EZy0Oz.js";const i=({to:s,children:t,analyticsLabel:r,analyticsPlacement:a,userStatus:c="anonymous"})=>s?e.jsx(g,{className:"truncate flex-grow flex items-center w-full h-full",to:s,onClick:()=>{!r||!a||m("navigation_click",{label:r,href:s,placement:a,user_status:c})},children:t}):e.jsx("span",{className:"truncate flex-grow flex items-center w-full h-full",children:t}),l=({className:s,children:t})=>{const r=s||"group flex items-center px-3 py-2 text-sm font-medium text-muted rounded-md hover:text-text hover:bg-bg";return e.jsx("li",{className:r,children:t})},p=()=>{const s=x(),t=d("root"),r=u(t==null?void 0:t.userData);return!s||!s.categories?null:e.jsxs("div",{className:"pt-10",children:[e.jsx("p",{className:"px-3 text-xs font-semibold text-muted uppercase tracking-wider",id:"categories-headline",children:"Categories"}),e.jsx("ul",{className:"mt-3 space-y-2","aria-labelledby":"categories-headline",children:s.categories.map((a,c)=>e.jsx(l,{children:e.jsx(i,{to:`/categories/${a.slug}`,analyticsLabel:a.name,analyticsPlacement:"category_navigation",userStatus:r,children:`${a.name} (${a.count})`})},`${a.id}-${c}`))})]})};function j({title:s,titleId:t,...r},a){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),s?n.createElement("title",{id:t},s):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}const b=n.forwardRef(j);function v({title:s,titleId:t,...r},a){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),s?n.createElement("title",{id:t},s):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m10.5 21 5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 0 1 6-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 0 1-3.827-5.802"}))}const o=n.forwardRef(v),w=()=>{const s=f(),t=d("root"),r=u(t==null?void 0:t.userData);return e.jsxs("ul",{children:[e.jsx(l,{children:e.jsxs(i,{to:"/",analyticsLabel:"Home",analyticsPlacement:"sidebar",userStatus:r,children:[e.jsx(b,{className:"text-muted group-hover:text-text flex-shrink-0 -ml-1 mr-3 h-6 w-6","aria-hidden":"true"}),"Home"]})}),s.map(a=>a.current?null:e.jsx(l,{children:a.current?e.jsxs("span",{className:"truncate flex-grow flex items-center w-full h-full",children:[e.jsx(o,{className:"text-muted group-hover:text-text flex-shrink-0 -ml-1 mr-3 h-6 w-6","aria-hidden":"true"}),a.label]}):e.jsxs(h,{className:"truncate flex-grow flex items-center w-full h-full",to:a.to,onClick:()=>{m("navigation_click",{label:a.label,href:a.to,placement:"sidebar",user_status:r})},children:[e.jsx(o,{className:"text-muted group-hover:text-text flex-shrink-0 -ml-1 mr-3 h-6 w-6","aria-hidden":"true"}),a.label]})},`nan-lang-${a.label}`)),e.jsx(l,{children:e.jsx(i,{to:"/random",analyticsLabel:"Random",analyticsPlacement:"sidebar",userStatus:r,children:"Random"})}),e.jsx(l,{children:e.jsx(i,{to:"/histories",analyticsLabel:"History",analyticsPlacement:"sidebar",userStatus:r,children:"History"})})]})};function E({children:s,submenu:t,aside:r}){return e.jsxs("div",{className:"max-w-3xl mx-auto sm:px-6 lg:max-w-7xl lg:px-8 lg:grid lg:grid-cols-12 lg:gap-8",children:[e.jsx("div",{className:"hidden lg:block lg:col-span-3 xl:col-span-2",children:e.jsxs("div",{className:"sticky top-4 divide-y divide-border",children:[e.jsx("nav",{"aria-label":"Sidebar",className:"mb-4",children:e.jsx(w,{})}),t??e.jsx("nav",{"aria-label":"Category",className:"top-4",children:e.jsx(p,{})})]})}),e.jsx("main",{className:r?"lg:col-span-9 xl:col-span-6":"lg:col-span-9 xl:col-span-9",children:s}),r?e.jsx("aside",{className:"hidden xl:block xl:col-span-4",children:r}):null]})}export{E as A};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.