PageSourceSearch

https://analyticsindiamag.com/assets/NotificationWidget-enRkpMwr.js

js analyticsindiamag.com collected 2026-09-24 08:26:17 UTC 2,955 bytes, 1 lines download raw bytes

1import{r as u,j as e,a1 as w,X as k,o as B,B as T}from"./index-KSWbwNeY.js";const P=(s,i)=>{const r=s.replace("#",""),a=r.length===3?r.split("").map(c=>c+c).join(""):r,o=parseInt(a.slice(0,2),16),l=parseInt(a.slice(2,4),16),n=parseInt(a.slice(4,6),16);if(![o,l,n].some(Number.isNaN))return`rgba(${o}, ${l}, ${n}, ${i})`},D=s=>!!s&&/^https?:\/\//i.test(s),E=({href:s,children:i,className:r,onClick:a})=>D(s)?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:r,onClick:a,children:i}):e.jsx(B,{to:s,className:r,onClick:a,children:i}),R=({title:s,description:i,imageUrl:r,icon:a,ctaLabel:o,ctaHref:l,onCtaClick:n,href:c,delay:h=2e3,duration:b=5e3,onClose:m,className:z,textColor:x,bgColor:j,bgOpacity:S=.95})=>{const[f,v]=u.useState(!1),[d,p]=u.useState(!1),g=j?P(j,S):void 0,I={...g?{backgroundColor:g,backdropFilter:"blur(12px)"}:{},...x?{color:x}:{}},N=x?{color:x}:void 0;if(u.useEffect(()=>{const t=setTimeout(()=>v(!0),h);return()=>clearTimeout(t)},[h]),u.useEffect(()=>{if(!f||d)return;const t=setTimeout(()=>p(!0),b);return()=>clearTimeout(t)},[f,d,b]),u.useEffect(()=>{if(!d)return;const t=setTimeout(()=>{v(!1),p(!1),m==null||m()},1500);return()=>clearTimeout(t)},[d,m]),!f)return null;const $=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation(),p(!0)},y=e.jsxs(e.Fragment,{children:[(r||a)&&e.jsx("div",{className:"mb-3 flex items-center justify-center",children:r?e.jsx("img",{src:r,alt:"",className:"max-h-[64px] w-auto max-w-full rounded-lg object-contain",loading:"lazy"}):e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary",children:a})}),e.jsx("h3",{className:"pr-6 text-sm font-semibold leading-tight text-foreground",style:N,children:s}),i&&e.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",style:N,children:i}),o&&(l||n)&&e.jsx("div",{className:"mt-3",children:l?e.jsx(E,{href:l,onClick:t=>{t.stopPropagation(),n==null||n()},className:"inline-block",children:e.jsx(T,{size:"sm",className:"h-8 text-xs",children:o})}):e.jsx(T,{size:"sm",className:"h-8 text-xs",onClick:t=>{t.stopPropagation(),n==null||n()},children:o})})]});return e.jsx("div",{role:"alert","aria-live":"polite",className:w("fixed right-4 top-[40%] z-[60] w-80 max-w-[calc(100vw-2rem)] -translate-y-1/2",d?"motion-safe:animate-slide-out-right-card":"motion-safe:animate-slide-in-right-card",z),children:e.jsxs("div",{className:w("relative rounded-xl border border-border/60 p-4 shadow-2xl backdrop-blur-xl",!g&&"bg-background/95 supports-[backdrop-filter]:bg-background/85"),style:I,children:[e.jsx("button",{type:"button",onClick:$,"aria-label":"Dismiss notification",className:"absolute right-2 top-2 z-10 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:e.jsx(k,{className:"h-4 w-4"})}),c?e.jsx(E,{href:c,className:"block",children:y}):y]})})};export{R 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.