1import{j as e,r as t,u as r,d as a,b as s,L as n}from"./vendor-react-BH6F5oQJ.js";import{y as i,H as l,s as o,ae as c,U as d,S as m,z as h,g as u,I as p,b as x,t as g,E as f,w as j,af as y,c as b,ag as v,d as w,f as N,r as _,ah as k,ai as S,i as C,B as E,e as A,a2 as $,k as L,aj as R}from"./index-dRqPaCFl.js";import{n as D,D as z,g as B}from"./ogImage-DWgnlfd6.js";import{P as U}from"./PersonCard-DIz01wNL.js";import{a as W}from"./vendor-query-CC4VRGyP.js";import{D as T,a as P,b as G,c as I,d as F,e as H}from"./dropdown-menu-DFEKpOvb.js";import{reportHydrationError as O}from"./sentry-NaBtq-CH.js";import{g as q,S as M,c as K,a as J}from"./socialSharing-6-VePqcu.js";import{c as Y,U as Q,a as V,C as X,D as Z,f as ee,g as te,h as re,i as ae,j as se,k as ne,l as ie,ao as le}from"./vendor-icons-CaI5__By.js";import"./vendor-ui-B4WC06Sp.js";import"./vendor-supabase-COwyE4EW.js";import"./index-D5Ei2fSx.js";import"./Combination-DzDAyqvK.js";import"./index-DhmtBasA.js";import"./exports-C9FZZXUj.js";function oe({title:t,description:r,image:a,url:s,type:n="website",publishedTime:o,modifiedTime:c,authors:d=[],section:m,keywords:h,imageAlt:u,siteName:p="Delphi Global Research Center",twitterSite:x="@DelphiGRC",twitterCreator:g="@DelphiGRC",noIndex:f=!1,children:j}){const y=i(),b=D(a),v=s.startsWith("http")?s:`${y}${s.startsWith("/")?"":"/"}${s}`,w=u||t,N=r.length>160?`${r.substring(0,157)}...`:r;return e.jsxs(l,{children:[e.jsx("link",{rel:"icon",type:"image/svg+xml",sizes:"any",href:`${y}/favicon.svg?v=2`}),e.jsx("link",{rel:"icon",type:"image/x-icon",sizes:"16x16 32x32",href:`${y}/favicon.ico?v=2`}),e.jsxs("title",{children:[t," | ",p]}),e.jsx("meta",{name:"title",content:t}),e.jsx("meta",{name:"description",content:N}),h&&e.jsx("meta",{name:"keywords",content:h}),d.length>0&&e.jsx("meta",{name:"author",content:d.join(", ")}),e.jsx("meta",{name:"robots",content:f?"noindex, nofollow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"}),e.jsx("meta",{property:"og:image",content:b}),e.jsx("meta",{property:"og:image:secure_url",content:b}),e.jsx("meta",{property:"og:image:type",content:"image/jpeg"}),e.jsx("meta",{property:"og:image:width",content:"1200"}),e.jsx("meta",{property:"og:image:height",content:"630"}),e.jsx("meta",{property:"og:image:alt",content:w}),e.jsx("meta",{property:"og:type",content:n}),e.jsx("meta",{property:"og:site_name",content:p}),e.jsx("meta",{property:"og:title",content:t}),e.jsx("meta",{property:"og:description",content:N}),e.jsx("meta",{property:"og:url",content:v}),e.jsx("meta",{property:"og:locale",content:"en_US"}),e.jsx("meta",{property:"fb:app_id",content:"1454378732920282"}),"article"===n&&o&&e.jsx("meta",{property:"article:published_time",content:o}),"article"===n&&c&&e.jsx("meta",{property:"article:modified_time",content:c}),"article"===n&&d.map((t,r)=>e.jsx("meta",{property:"article:author",content:t},`author-${r}`)),"article"===n&&m&&e.jsx("meta",{property:"article:section",content:m}),"article"===n&&h&&e.jsx("meta",{property:"article:tag",content:h}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:site",content:x}),e.jsx("meta",{name:"twitter:creator",content:g}),e.jsx("meta",{name:"twitter:title",content:t}),e.jsx("meta",{name:"twitter:description",content:N}),e.jsx("meta",{name:"twitter:image",content:b}),e.jsx("meta",{name:"twitter:image:alt",content:w}),e.jsx("link",{rel:"canonical",href:v}),j]})}const ce=e=>"PGRST116"===e||"406"===e;async function de(e){const t=await async function(e){const t=()=>o.from("articles").select("\n id,\n title,\n slug,\n subtitle,\n summary,\n content,\n template_type,\n layout_type,\n publication_type,\n author_id,\n editor_id,\n status,\n featured,\n featured_image_url,\n featured_image_alt,\n gallery_images,\n template_settings,\n seo_settings,\n view_count,\n published_at,\n created_at,\n updated_at,\n article_authors (\n author_id,\n author_order\n )\n").eq("status","published"),r=await t().eq("slug",e).maybeSingle();if(r.error&&!ce(r.error.code))throw r.error;if(r.data)return r.data;if(!d(e))return null;const a=await t().eq("id",e).maybeSingle();if(a.error&&!ce(a.error.code))throw a.error;return a.data??null}(e);if(!t)return null;const r=await async function(e){if(0===e.length)return[];const t=e.map(e=>e.author_id),[r,a]=await Promise.all([o.from("authors").select("id, name, role, avatar_url").in("id",t),o.from("fellows").select("id, slug, name, title, avatar_url").in("id",t)]);if(r.error)throw r.error;if(a.error)throw a.error;const s=r.data??[],n=a.data??[],i=[];
1return e.forEach(e=>{const t=n.find(t=>t.id===e.author_id);if(t)return void i.push({id:t.id,name:t.name,role:t.title,avatar_url:t.avatar_url??void 0,type:"fellow",slug:t.slug,author_order:e.author_order});const r=s.find(t=>t.id===e.author_id);r&&i.push({id:r.id,name:r.name,role:r.role,avatar_url:r.avatar_url??void 0,type:"author",author_order:e.author_order})}),i.sort((e,t)=>e.author_order-t.author_order)}(t.article_authors??[]),{article_authors:a,...s}=t;return{paper:c(s),authors:r}}function me(e,t,r){return W({queryKey:["related-articles",e,t],queryFn:async()=>{if(!e||!t)return[];const{data:r,error:a}=await o.from("articles").select("id,title,slug,subtitle,summary,template_settings,featured,featured_image_url,published_at,created_at,status").eq("status","published").neq("id",e).order("published_at",{ascending:!1}).limit(24);if(a)throw a;return(r??[]).map(e=>c(e)).filter(e=>{return r=e.category,a=t,(Array.isArray(r)?r:[r]).includes(a);var r,a}).slice(0,2)},enabled:r&&Boolean(e&&t),staleTime:3e5})}function he({hasHero:t=!0}){return e.jsxs("div",{children:[t&&e.jsx(m,{className:"mb-6 aspect-video max-h-[70vh] w-full rounded-none"}),e.jsxs("div",{className:"container max-w-7xl space-y-6 px-4 py-6 lg:px-6",children:[e.jsx(m,{className:"h-12 w-3/4"}),e.jsx(m,{className:"h-6 w-1/2"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(m,{className:"h-4 w-full"}),e.jsx(m,{className:"h-4 w-full"}),e.jsx(m,{className:"h-4 w-5/6"}),e.jsx(m,{className:"h-4 w-full"}),e.jsx(m,{className:"h-4 w-4/5"})]})]})]})}class ue extends t.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){const t=e.message.includes("Hydration")||e.message.includes("did not match")||e.message.includes("suppressHydrationWarning");return{hasError:t,error:t?e:void 0}}componentDidCatch(e,t){(e.message.includes("Hydration")||e.message.includes("did not match")||e.message.includes("suppressHydrationWarning"))&&(O(e.message,{component:this.props.componentName||"Unknown",componentStack:t.componentStack,errorInfo:t}),h("ð¨ Hydration Error Boundary caught error:",{error:e,component:this.props.componentName,stack:t.componentStack}))}render(){return this.state.hasError&&this.props.fallback?this.props.fallback:this.props.children}}function pe({src:r,alt:a,className:s,width:n=p.hero,srcSetWidths:i,sizes:l,lazy:o=!0,placeholder:c,showSkeleton:d=!1,onError:m,onLoad:h,...f}){const j=t.useMemo(()=>u(r,{width:n})??r,[r,n]),y=t.useMemo(()=>i?x(r,i):void 0,[r,i]),[b,v]=t.useState(c||j),[w,N]=t.useState(!0),[_,k]=t.useState(!1);t.useEffect(()=>{if(c&&j!==c){const e=new Image;e.onload=()=>{v(j),N(!1),null==h||h()},e.onerror=()=>{k(!0),N(!1),null==m||m()},e.src=j}else v(j),N(!1)},[j,c,h,m]);return _&&c?e.jsx("div",{className:g("flex items-center justify-center bg-muted text-muted-foreground",s),role:"img","aria-label":a,children:e.jsx("span",{className:"text-xs",children:"Image unavailable"})}):e.jsxs(e.Fragment,{children:[d&&w&&e.jsx("div",{className:g("animate-pulse bg-muted",s),"aria-hidden":"true"}),e.jsx("img",{sizes:b===j&&y?l:void 0,srcSet:b===j?y:void 0,src:b,alt:a,loading:o?"lazy":"eager",decoding:"async",className:g("transition-opacity duration-300",w&&"opacity-0",!w&&"opacity-100",s),onError:()=>{k(!0),N(!1),null==m||m()},onLoad:()=>{N(!1),null==h||h()},...f})]})}const xe=()=>{var l;const o=r(),c=a(),d=o.id??o.slug??o.articleId??Object.values(o).find(e=>e)??(()=>{const e=c.pathname.match(/^\/(research|articles|analysis|reports|opinion|announcements|publications)\/(.+)$/);return e?e[2]:""})(),{paper:m,authors:h,isLoading:g,isNotFound:D,isError:O}=function(e){var t,r;const a=W({queryKey:["article-by-slug",e],queryFn:async()=>e?de(e):null,enabled:Boolean(e),staleTime:3e5,retry:1});return{paper:(null==(t=a.data)?void 0:t.paper)??null,authors:(null==(r=a.data)?void 0:r.authors)??[],isLoading:a.isLoading,isFetching:a.isFetching,isNotFound:a.isSuccess&&null===a.data,isError:a.isError,error:a.error}}(d||void 0),{toast:ce}=j(),xe=s(),[ge,fe]=t.useState(!1),[je,ye]=t.useState(0),[be,ve]=t.useState(!1),we=t.useRef(null),Ne=g,_e=t.useMemo(()=>
1{if(!d)return null;return y[d]||null},[d]);t.useEffect(()=>{fe(!0)},[]);const ke=m?Array.isArray(m.category)?m.category[0]:m.category:(null==_e?void 0:_e.category)||"",Se=ke?b(ke):"",{data:Ce=[]}=me(null==m?void 0:m.id,Se||void 0,Boolean(m&&!g));t.useEffect(()=>{m&&m.id&&v(m.id)},[m]),t.useEffect(()=>{const e=()=>{const e=window.innerHeight,t=document.documentElement.scrollHeight,r=window.scrollY,a=r/(t-e)*100;ye(Math.min(a,100)),ve(r>400)};return window.addEventListener("scroll",e),e(),()=>window.removeEventListener("scroll",e)},[]);const Ee=e=>{if(!e)return z;const t={title:e.title,summary:e.excerpt||null,slug:e.slug||e.id,featured_image_url:e.imageUrl||null};return B(t)},Ae=()=>{const e=(null==m?void 0:m.slug)||(null==m?void 0:m.id);return e?`${window.location.origin}/s/${e}`:window.location.href},$e=()=>({url:Ae(),title:(null==m?void 0:m.title)||"",description:(null==m?void 0:m.excerpt)||"",imageUrl:Ee(m),articleSlug:(null==m?void 0:m.slug)||(null==m?void 0:m.id)||void 0});if(!ge||g){const t=i(),r=(null==_e?void 0:_e.title)||"Research Article",a=(null==_e?void 0:_e.summary)||"Expert research and analysis from Delphi Global Research Center.",s=(()=>{if(!_e)return z;const e={title:_e.title,summary:_e.summary,slug:_e.slug,featured_image_url:_e.featured_image_url};return B(e)})(),n=`${t}${c.pathname}`,l=(null==_e?void 0:_e.featured_image_url)||null,o=l?u(l,{width:p.hero}):null;return e.jsxs("div",{className:"flex min-h-screen flex-col",children:[e.jsx(oe,{title:r,description:a,image:s,url:n,type:"article",children:l&&o?e.jsx("link",{rel:"preload",as:"image",href:o,imageSrcSet:x(l,w.hero),imageSizes:"100vw",fetchPriority:"high"}):null}),e.jsx("main",{className:"flex-1",children:e.jsx(he,{hasHero:Boolean(l)})})]})}if(D){const t=c.pathname.startsWith("/announcements")?{path:"/announcements",label:"Announcements"}:c.pathname.startsWith("/articles")?{path:"/articles",label:"Articles"}:c.pathname.startsWith("/reports")?{path:"/reports",label:"Reports"}:c.pathname.startsWith("/opinion")?{path:"/opinion",label:"Opinion"}:{path:"/research",label:"Research"};return e.jsx("div",{className:"flex min-h-screen flex-col",children:e.jsx("main",{className:"flex flex-1 items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-4 font-heading text-4xl font-bold text-foreground",children:"Publication Not Found"}),e.jsx("p",{className:"mb-8 text-muted-foreground",children:"The research paper you're looking for doesn't exist."}),e.jsx(N,{asChild:!0,children:e.jsxs(n,{to:t.path,children:[e.jsx(Y,{className:"mr-2 h-4 w-4"}),"Back to ",t.label]})})]})})})}if(O||!m)return e.jsx("div",{className:"flex min-h-screen flex-col",children:e.jsx("main",{className:"flex flex-1 items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-4 font-heading text-4xl font-bold text-foreground",children:"Unable to Load Publication"}),e.jsx("p",{className:"mb-8 text-muted-foreground",children:"Something went wrong while loading this article. Please try again."}),e.jsx(N,{onClick:()=>xe(0),children:"Retry"})]})})});const Le=function(e,t="Expert research and analysis from Delphi Global Research Center."){return a=160,(r=e||t).length<=a?r:r.substring(0,a-3).trim()+"...";var r,a}(m.excerpt,`${m.title} - Expert research and analysis on Eurasian security from Delphi Global Research Center.`),Re=function(e,t,r){const a=[];return e&&a.push(e),t&&(Array.isArray(t)?a.push(...t):a.push(t)),r&&a.push(...r),a.push("research","Eurasian security","geopolitics","Delphi Global"),a.filter(e=>e&&e.trim().length>0).map(e=>e.trim()).join(", ")}(Se||void 0,m.title,["Eurasian security","international relations","think tank","research","analysis"]),De=(null==m?void 0:m.publication_type)||(null==_e?void 0:_e.publication_type)||"research",ze="research"===De?"/research":R(De),Be="announcement"===De?"Announcements":"article"===De?"Articles":"report"===De?"Reports":"opinion"===De?"Opinion":"Research",Ue=i(),We=`${Ue}${m?_(m.slug||m.id,De):`/research/${d}`}`,Te=m.slug||m.id,Pe=function(e,t){var r;const{publisherName:a="Delphi Global Research Center",publisherL
1ogo:s=`${f}/main-logo.png`,siteUrl:n=f}=t||{},i=e.url??`${n}/research/${e.slug}`,l=(null==(r=e.authors)?void 0:r.map(e=>({"@type":"Person",name:e.name})))||[{"@type":"Person",name:"Delphi Global Research Center"}],o={"@context":"https://schema.org","@type":"Article",headline:e.title,description:e.description,datePublished:e.publishedAt||(new Date).toISOString(),author:1===l.length?l[0]:l,publisher:{"@type":"Organization",name:a,logo:{"@type":"ImageObject",url:s}},mainEntityOfPage:{"@type":"WebPage","@id":i}};return e.modifiedAt&&(o.dateModified=e.modifiedAt),e.imageUrl&&(o.image=e.imageUrl),e.category&&(o.articleSection=e.category),e.keywords&&(o.keywords=e.keywords),o}({title:m.title,description:Le,slug:Te,url:We,imageUrl:Ee(m),publishedAt:m.date,modifiedAt:m.date,authors:h.length>0?h.map(e=>({name:e.name,id:e.id})):[{name:m.author,id:""}],category:Se||void 0,keywords:Re},{publisherName:"Delphi Global Research Center",publisherLogo:`${Ue}${S.startsWith("/")?S:`/${S}`}`,siteUrl:Ue});"Article"===Pe["@type"]&&(Pe["@type"]="ScholarlyArticle",Pe.inLanguage="en",Array.isArray(Pe.author)&&(Pe.author=Pe.author.map((e,t)=>{var r;return{...e,jobTitle:null==(r=h[t])?void 0:r.role,affiliation:{"@type":"Organization",name:"Delphi Global Research Center"}}})));const Ge={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{name:"Home",url:Ue},{name:Be,url:`${Ue}${ze}`},{name:m.title,url:We}].map((e,t)=>({"@type":"ListItem",position:t+1,name:e.name,item:e.url}))};return e.jsx(ue,{componentName:`ResearchDetail-${(null==m?void 0:m.slug)||(null==m?void 0:m.id)||d}`,children:e.jsxs("div",{className:"flex min-h-screen flex-col",children:[e.jsxs(oe,{title:m.title,description:Le,image:Ee(m),url:We,type:"article",publishedTime:m.date,modifiedTime:m.date,authors:h.length>0?h.map(e=>e.name):[m.author],section:Se||void 0,keywords:Re,children:[e.jsx("link",{rel:"canonical",href:We}),e.jsx("link",{rel:"alternate",hrefLang:"en",href:We}),e.jsx("link",{rel:"alternate",hrefLang:"x-default",href:We}),e.jsx("link",{rel:"alternate",type:"application/rss+xml",title:"Delphi Global Research Center RSS Feed",href:`${Ue}/rss.xml`}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(Pe)}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(Ge)})]}),e.jsx("div",{className:"fixed top-0 left-0 right-0 h-1 bg-muted z-50 print-hide",children:e.jsx("div",{className:"h-full bg-primary transition-all duration-150 ease-out",style:{width:`${je}%`}})}),m.imageUrl&&e.jsx("div",{className:"mb-6 w-full aspect-video max-h-[70vh] overflow-hidden bg-muted/40",children:e.jsx(pe,{src:m.imageUrl||"",alt:m.title,className:"h-full w-full object-cover object-center",srcSetWidths:w.hero,sizes:"100vw",lazy:!1,...k(!0)})}),e.jsx("main",{className:"flex-1 py-6",children:e.jsxs("article",{className:"container max-w-7xl px-4 lg:px-6",children:[e.jsx("div",{className:"print-header",style:{display:"none"},children:e.jsxs("div",{style:{textAlign:"center",marginBottom:"30px",paddingBottom:"20px",borderBottom:"2px solid #e5e7eb"},children:[e.jsx("img",{src:S,alt:"Delphi Global Research Center",style:{maxWidth:"200px",height:"auto",margin:"0 auto 20px",display:"block"}}),e.jsxs("div",{style:{fontSize:"10pt",color:"#666",marginTop:"10px"},children:[e.jsx("p",{style:{margin:"5px 0"},children:e.jsx(C,{date:m.date,options:{year:"numeric",month:"long",day:"numeric"}})}),e.jsx("p",{style:{margin:"5px 0"},children:!Ne&&h.length>0?`By ${h.map(e=>e.name).join(", ")}`:`By ${m.author}`}),e.jsx("p",{style:{margin:"5px 0"},children:Se})]})]})}),e.jsx("header",{className:"mb-8 text-center",children:e.jsx("h1",{className:"mb-4 font-heading text-4xl font-medium leading-tight text-foreground md:text-5xl",children:m.title})}),e.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 lg:gap-8",children:[e.jsx("aside",{className:"lg:w-72 lg:flex-shrink-0 relative z-30 pointer-events-auto",children:e.jsxs("div",{className:"lg:sticky lg:top-24 space-y-6 pointer-events-auto",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-start gap-2",children:["opinion"===De&&e.jsx(E,{variant:"accent",className:"text-base px-3 py-1 uppercase tracking-wide print-badge",children:"Opinion"}),A[Se]?e.jsx(n,{to:A[Se],children:e.jsx(E,{variant:"secondary",className:"text-base px-3 py-1 cursor-pointer hover:bg-secondary/80 transition-colors print-badge",children:Se})}):e.jsx(E,{variant:"secondary",className:"text-base px-3 py-1 print-badge",children:Se})]}),!Ne&&h.length>0?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Q,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:1===h.length?"Author":"Authors"})]}),e.jsx("div",{className:"grid w-full gap-3 grid-cols-1",children:h.map(t=>{const r="fellow"===t.type?t.slug?`/fellows/${t.slug}`:`/fellows/${t.id}`:`/authors/${t.id}`;return e.jsx(U,{name:t.name,subtitle:t.role,avatarUrl:t.avatar_url,className:"print-author-card relative z-40",onNavigate:()=>xe(r)},t.id)})})]}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Q,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:"Author"})]}),e.jsx(U,{name:m.author})]}),e.jsxs("div",{className:"space-y-3 pt-3 border-t border-border",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm print-meta",children:[e.jsx(V,{className:"h-4 w-4 text-muted-foreground"}),e.jsx(C,{date:m.date,options:{year:"numeric",month:"long",day:"numeric"},className:"text-foreground"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm print-meta",children:[e.jsx(X,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-foreground",children:m.readTime})]})]}),e.jsxs("div",{className:"space-y-2 pt-3 border-t border-border print-hide",children:[e.jsxs(N,{variant:"outline",size:"sm",onClick:()=>{window.print()},className:"w-full justify-start text-sm h-10 px-3",children:[e.jsx(Z,{className:"mr-2 h-4 w-4"}),"Download PDF"]}),e.jsxs(T,{children:[e.jsx(P,{asChild:!0,children:e.jsxs(N,{variant:"outline",size:"sm",className:"w-full justify-start text-sm h-10 px-3",children:[e.jsx(ee,{className:"mr-2 h-4 w-4"}),"Share"]})}),e.jsxs(G,{align:"start",className:"w-56",children:[e.jsx(I,{children:"Share this publication"}),e.jsx(F,{}),e.jsx(H,{asChild:!0,children:e.jsxs("a",{href:q(M.FACEBOOK,$e()),target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{className:"mr-2 h-4 w-4"}),"Share on Facebook"]})}),e.jsx(H,{asChild:!0,children:e.jsxs("a",{href:q(M.BLUESKY,$e()),target:"_blank",rel:"noopener noreferrer",children:[e.jsx("img",{src:$,alt:"Bluesky",className:"mr-2 h-4 w-4"}),"Share on Bluesky"]})}),e.jsx(H,{asChild:!0,children:e.jsxs("a",{href:q(M.LINKEDIN,$e()),target:"_blank",rel:"noopener noreferrer",children:[e.jsx(re,{className:"mr-2 h-4 w-4"}),"Share on LinkedIn"]})}),e.jsx(H,{asChild:!0,children:e.jsxs("a",{href:q(M.WHATSAPP,$e()),target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ae,{className:"mr-2 h-4 w-4"}),"Share on WhatsApp"]})}),e.jsx(H,{asChild:!0,children:e.jsxs("a",{href:q(M.TELEGRAM,$e()),target:"_blank",rel:"noopener noreferrer",children:[e.jsx(se,{className:"mr-2 h-4 w-4"}),"Share on Telegram"]})}),e.jsx(H,{asChild:!0,children:e.jsxs("a",{href:q(M.EMAIL,$e()),children:[e.jsx(ne,{className:"mr-2 h-4 w-4"}),"Share via Email"]})}),e.jsx(F,{}),e.jsxs(H,{onClick:async()=>{const e=$e(),t=J(e),r=await K(t);ce(r?{title:"Link copied!",description:"The shareable link has been copied to clipboard."}:{title:"Copy failed",description:"Could not copy link to clipboard.",variant:"destructive"})},children:[e.jsx(ie,{className:"mr-2 h-4 w-4"}),"Copy Link"]})]})]})]})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"mb-8 pb-6 border-b border-border",children:e.jsxs("div",{className:"flex items-center justify-end gap-3 text-sm text-muted-foreground",children:[!Ne&&h.length>0?e.jsxs("span",{children:["By ",h.map(e=>
1e.name).join(", ")]}):e.jsxs("span",{children:["By ",m.author]}),e.jsx("span",{children:"â¢"}),e.jsx("span",{children:m.date})]})}),m.excerpt&&e.jsx("div",{className:"mb-8 p-6 rounded-lg bg-blue-50/50 dark:bg-blue-950/20 border border-blue-100 dark:border-blue-900/30 print-summary",children:e.jsx("p",{className:"text-lg leading-relaxed text-[hsl(var(--summary-text))]",children:m.excerpt})}),m.designrrUrl&&(()=>{let t=m.designrrUrl.trim();const r=t.match(/src=["']([^"']+)["']/);return r&&(t=r[1]),t.startsWith("http")&&t.includes("designrr.page")?e.jsx("div",{className:"mb-8 rounded-lg overflow-hidden border border-border bg-muted/30",children:e.jsx("iframe",{src:t,title:"Designrr publication",className:"w-full border-0",style:{height:"600px",minHeight:"480px"},allowFullScreen:!0,loading:"lazy"})}):null})(),e.jsx("div",{ref:we,className:"article-preview-content prose prose-sm sm:prose lg:prose-lg xl:prose-xl max-w-none animate-fade-in",style:{wordWrap:"break-word",overflowWrap:"break-word"},dangerouslySetInnerHTML:{__html:L("string"==typeof m.content?m.content:(null==(l=null==m?void 0:m.content)?void 0:l.text)||(null==m?void 0:m.content)||"")}})]})]}),e.jsxs("div",{className:"mt-12 print-hide",children:[e.jsx("h3",{className:"mb-6 font-heading text-2xl font-bold text-foreground",children:"Related Research"}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:Ce.map(t=>e.jsxs(n,{to:`/research/${t.slug}`,className:"group rounded-lg border border-border bg-card p-4 shadow-card transition-all hover:shadow-elevated",children:[e.jsx("h4",{className:"mb-2 font-heading text-lg font-bold text-foreground transition-colors group-hover:text-primary",children:t.title}),e.jsx("p",{className:"mb-2 text-sm text-muted-foreground line-clamp-2",children:t.excerpt}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsx("span",{children:t.author}),e.jsx("span",{children:"â¢"}),e.jsx("span",{children:t.date})]})]},t.id))})]})]})}),be&&e.jsx(N,{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},size:"icon",className:"fixed bottom-6 right-6 z-40 shadow-elevated rounded-full h-12 w-12 print-hide animate-fade-in","aria-label":"Back to top",children:e.jsx(le,{className:"h-5 w-5"})})]})})};export{xe 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.