PageSourceSearch

https://sursaut-revue.fr/_nuxt/DZrc-AU7.js

js sursaut-revue.fr collected 2026-10-04 01:43:19 UTC 6,531 bytes, 1 lines download raw bytes

1import{Q as q,bq as F,br as H,bu as I,b5 as O,ax as R,az as V,H as u,A as m,aS as _,E as d,aZ as W,B as C,h as J,aL as Q,as as Z,N as b,au as G,bm as K,aI as f,y as X,bc as A,p as Y,bo as ee,aA as c,bD as te,_ as oe,o as se}from"./BPQrZ1XS.js";import{_ as re}from"./CMm4qzsM.js";import{_ as ae,a as ne}from"./CLhVxpSs.js";import"./6YqUFUZu.js";const ce={class:"max-w-3xl mx-auto w-full py-8 px-4"},le={key:0},ue={class:"font-serif text-4xl mb-4"},ie={class:"flex items-center justify-between mb-6"},de={key:0,class:"text-gray-500"},pe={key:0,class:"flex flex-wrap gap-2 mb-4"},me={key:1,class:"mb-6"},ve={class:"w-full rounded overflow-hidden bg-gray-100 aspect-[2/1]"},_e=["src"],ge={key:0,class:"mt-2 text-sm text-gray-500 italic"},fe={class:"space-y-2"},he={class:"font-semibold text-gray-900"},ye={key:0,class:"text-sm text-gray-600 line-clamp-3"},be={key:0,class:"pt-2 border-t border-gray-100 space-y-1"},xe={key:0,class:"text-xs text-gray-500"},ke={key:1,class:"text-xs text-gray-500"},we={key:1,class:"text-center py-20"},Se=q({__name:"[slug]",setup(Ce){F();const L=H(),B=K(),x=ee(),k=I(),T=String(B.params.slug),s=f(null),o=f(null),h=f({x:0,y:0}),g=f(null);let l=null;const w=t=>new Date(t).toLocaleDateString(),j=X(()=>{if(!s.value)return"object-center";switch(s.value.cover_crop){case"top":return"object-top";case"bottom":return"object-bottom";default:return"object-center"}}),E=()=>{o.value&&o.value.url&&(window.open(o.value.url,"_blank","noopener,noreferrer"),o.value=null)},$=()=>{l&&(clearTimeout(l),l=null),o.value=null},z=t=>{const e=t.target;if(e.classList.contains("source-mark")||e.closest(".source-mark")){t.preventDefault();const a=e.classList.contains("source-mark")?e:e.closest(".source-mark");if(a){const r=a.getAttribute("data-source-data");if(r)try{const n=JSON.parse(r);n.url&&window.open(n.url,"_blank","noopener,noreferrer")}catch(n){console.warn("Failed to parse source data:",n)}}return}if(e.classList.contains("citation-ref")){t.preventDefault();const a=e.getAttribute("data-source-id");if(a){const r=document.querySelector(`[data-source-id="${a}"]`);if(r){r.scrollIntoView({behavior:"smooth",block:"center"});const n=r.style.backgroundColor;r.style.backgroundColor="#fef3c7",r.style.transition="background-color 2s ease-out",setTimeout(()=>{r.style.backgroundColor=n},2e3)}}}},N=t=>{const e=t.target;if(e.classList.contains("source-mark")||e.closest(".source-mark")){const a=e.classList.contains("source-mark")?e:e.closest(".source-mark");a&&(l&&clearTimeout(l),l=setTimeout(()=>{const r=a.getAttribute("data-source-data");if(r)try{const n=JSON.parse(r);o.value=n;const p=a.getBoundingClientRect(),v=320;let i=p.left+p.width/2-v/2,y=p.bottom+8;i<10&&(i=10),i>window.innerWidth-v&&(i=window.innerWidth-v),y+200>window.innerHeight&&(y=p.top-200-8),h.value={x:i,y}}catch(n){console.warn("Failed to parse source data:",n)}},200))}},U=t=>{t.target;const e=t.relatedTarget;e&&(e.closest(".source-mark")||e===g.value||g.value?.contains(e))||(l&&(clearTimeout(l),l=null),setTimeout(()=>{g.value?.matches(":hover")||(o.value=null)},50))},{getArticleBySlug:D}=O(),P=async()=>{try{const t=await D(T);if(!t){k.add({title:"Article non trouvé",description:"L'article que vous cherchez n'existe pas.",color:"error"}),x.push("/");return}s.value=t,M(t)}catch{k.add({title:"Erreur",description:"Erreur lors du chargement de l'article",color:"error"}),x.push("/")}},M=t=>{const e=`${t.title} - Sursaut!`,a=t.description||`Lisez "${t.title}" sur Sursaut!, le journal des luttes de Bordeaux.`,r=t.categories?.map(v=>v.name).join(", ")||"",n=t.cover||"https://sursaut-revue.fr/icon-512x512.png",p=`https://sursaut-revue.fr/${t.slug}`;A({title:e,meta:[{name:"description",content:a},{name:"keywords",content:`${r}, Bordeaux, luttes sociales, politique, journal`},{name:"author",content:"Sursaut!"},{property:"og:title",content:e},{property:"og:description",content:a},{property:"og:image",content:n},{property:"og:url",content:p},{property:"og:type",content:"article"},{property:"og:site_name",content:"Sursaut!"},{property:"og:locale",content:"fr_FR"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:e},{name:"twitter:description",content:a},{name:"twitter:image",content:n},{property:"article:author",content:"Sursaut!"},{property:"article:published_time",content:t.published_at||""},{property:"article:section",content:r}]}),A({link:[{rel:"canonical",href:p}]})},S=()=>{o.value&&(l&&(clearTimeout(l),l=null),o.value=null)};return R(()=>{P(),window.addEventListener("scroll",S,{passive:!0})}),V(()=>{window.removeEventListener("scroll",S),l&&clearTimeout(l)}),(t,e)=>{const a=Y,r=re,n=oe,p=ae,v=ne;return c(),u("div",ce,[s.value?(c(),u("div",le,[m("h1",ue,_(s.value.title),
11),m("div",ie,[s.value.published_at?(c(),u("p",de,_(w(s.value.published_at)),1)):d("",!0),W(L)?(c(),C(a,{key:1,label:"Modifier l'article",icon:"i-mingcute-edit-line",color:"primary",variant:"outline",size:"sm",to:`/internal/articles/${s.value.id}`},null,8,["to"])):d("",!0)]),s.value.categories&&s.value.categories.length?(c(),u("div",pe,[(c(!0),u(J,null,Q(s.value.categories,i=>(c(),C(n,{key:i.name,to:`/category/${i.name.toLowerCase().replace(/\s+/g,"-")}`,class:"hover:opacity-80 transition-opacity"},{default:te(()=>[b(r,{color:"secondary",label:i.name,icon:i.icon?"mingcute:"+i.icon:void 0},null,8,["label","icon"])]),_:2},1032,["to"]))),128))])):d("",!0),s.value.cover?(c(),u("div",me,[m("div",ve,[m("img",{src:s.value.cover,alt:"Cover",class:Z(["w-full h-full object-cover",j.value])},null,10,_e)]),s.value.cover_label?(c(),u("p",ge,_(s.value.cover_label),1)):d("",!0)])):d("",!0),m("div",{onClick:z,onMouseover:N,onMouseleave:U},[b(p,{content:s.value.content},null,8,["content"])],32),o.value?(c(),u("div",{key:2,ref_key:"sourcePopover",ref:g,class:"source-popover fixed z-50 p-4 max-w-sm space-y-3 bg-white rounded-lg shadow-lg border border-gray-200 cursor-pointer hover:shadow-xl",style:G({left:h.value.x+"px",top:h.value.y+"px"}),onClick:E,onMouseleave:$},[m("div",fe,[m("h4",he,_(o.value.title||"Source"),1),o.value.description?(c(),u("p",ye,_(o.value.description),1)):d("",!0)]),o.value.author||o.value.publishedAt?(c(),u("div",be,[o.value.author?(c(),u("p",xe," Par "+_(o.value.author),1)):d("",!0),o.value.publishedAt?(c(),u("p",ke,_(w(o.value.publishedAt)),1)):d("",!0)])):d("",!0)],36)):d("",!0),b(v,{sources:s.value.sources},null,8,["sources"])])):(c(),u("div",we,[...e[0]||(e[0]=[m("p",null,"Chargement...",-1)])]))])}}}),je=se(Se,[["__scopeId","data-v-efd6ceea"]]);export{je 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.