PageSourceSearch

https://analyticsindiamag.com/assets/TableOfContents-D9HS_YgU.js

js analyticsindiamag.com collected 2026-10-01 08:37:31 UTC 2,102 bytes, 1 lines download raw bytes

1import{r as l,j as e,y as a}from"./index-Bpe3UPrl.js";import{L as p}from"./type-Cc1am6eB.js";const w=({items:n,activeId:d,nextArticle:s})=>{const[r,c]=l.useState(!0),[m,f]=l.useState(!1);l.useEffect(()=>{const t=()=>{const o=document.querySelector("footer");if(o){const i=o.getBoundingClientRect();f(i.top<=window.innerHeight+600)}};return window.addEventListener("scroll",t),t(),()=>window.removeEventListener("scroll",t)},[]);const u=t=>{const o=document.getElementById(t);if(o){const x=o.getBoundingClientRect().top+window.pageYOffset-100;window.scrollTo({top:x,behavior:"smooth"})}};return n.length===0&&!s?null:e.jsx("div",{className:"no-print hidden lg:block sticky top-24 transition-all duration-300",children:m&&s?e.jsxs("div",{className:"border-l-2 border-primary pl-4 animate-fade-in",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-3",children:[e.jsx(a,{className:"h-4 w-4"}),e.jsx("span",{children:"Up Next"})]}),e.jsx("a",{href:`/${s.slug}`,className:"block p-4 bg-muted/50 rounded-lg hover:bg-muted transition-colors",children:e.jsx("p",{className:"text-sm font-semibold text-foreground line-clamp-3",children:s.title})})]}):n.length>0?e.jsxs("div",{className:"border-l-2 border-border pl-4",children:[e.jsxs("button",{onClick:()=>c(!r),className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-4 hover:text-foreground transition-colors",children:[e.jsx(p,{className:"h-4 w-4"}),e.jsx("span",{children:"In This Article"}),e.jsx(a,{className:`h-3 w-3 transition-transform ${r?"rotate-90":""}`})]}),r&&e.jsx("nav",{className:"space-y-2",children:n.map(t=>e.jsx("button",{onClick:()=>u(t.id),className:`block w-full text-left text-sm transition-colors ${t.level===2?"font-medium":t.level===3?"pl-4 font-normal":"pl-8 font-normal text-xs"} ${d===t.id?"text-foreground font-semibold":"text-muted-foreground hover:text-foreground"}`,style:{lineHeight:"1.4",paddingTop:"0.25rem",paddingBottom:"0.25rem"},children:t.text},t.id))})]}):null})};export{w as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.