import{s as B}from"../chunks/scheduler.aZRR5A_O.js";import{S as D,i as M,g as $,s as P,r as T,h as k,x as z,c as j,u as U,j as E,f as h,a as g,v as F,d as G,t as J,w as K,B as N,m as y,n as w,k as S,y as v,o as A}from"../chunks/index.AIcdAWo0.js";import{e as L}from"../chunks/each.-oqiv04n.js";import{I as Q}from"../chunks/Info.bs_Ss2Q-.js";const R=async({fetch:o})=>({articles:await(await o("/api/articles")).json()}),te=Object.freeze(Object.defineProperty({__proto__:null,load:R},Symbol.toStringTag,{value:"Module"}));function O(o,t,c){const s=o.slice();return s[1]=t[c],s}function q(o){let t,c,s,r=o[1].meta.title+"",b,u,x,i,m,d=o[1].meta.date+"",p,l,e=o[1].meta.author+"",n,a;return{c(){t=$("li"),c=$("h2"),s=$("a"),b=y(r),x=P(),i=$("p"),m=y("Publié le : "),p=y(d),l=y(" par "),n=y(e),a=P(),this.h()},l(f){t=k(f,"LI",{class:!0});var _=E(t);c=k(_,"H2",{});var H=E(c);s=k(H,"A",{href:!0});var I=E(s);b=w(I,r),I.forEach(h),H.forEach(h),x=j(_),i=k(_,"P",{class:!0});var C=E(i);m=w(C,"Publié le : "),p=w(C,d),l=w(C," par "),n=w(C,e),C.forEach(h),a=j(_),_.forEach(h),this.h()},h(){S(s,"href",u=o[1].path),S(i,"class","pt-2"),S(t,"class","px-4 pb-4 my-4 rounded-lg bg-base-300 dark:bg-base-300 hover:bg-base-200 hover:dark:bg-base-200 border-1 border-color-base-100")},m(f,_){g(f,t,_),v(t,c),v(c,s),v(s,b),v(t,x),v(t,i),v(i,m),v(i,p),v(i,l),v(i,n),v(t,a)},p(f,_){_&1&&r!==(r=f[1].meta.title+"")&&A(b,r),_&1&&u!==(u=f[1].path)&&S(s,"href",u),_&1&&d!==(d=f[1].meta.date+"")&&A(p,d),_&1&&e!==(e=f[1].meta.author+"")&&A(n,e)},d(f){f&&h(t)}}}function V(o){let t,c="Articles",s,r,b,u,x="Articles publiés",i,m,d;r=new Q({props:{info:"Dada.",markdown:"false"}});let p=L(o[0].articles),l=[];for(let e=0;e<p.length;e+=1)l[e]=q(O(o,p,e));return{c(){t=$("h1"),t.textContent=c,s=P(),T(r.$$.fragment),b=P(),u=$("h2"),u.textContent=x,i=P(),m=$("ul");for(let e=0;e<l.length;e+=1)l[e].c()},l(e){t=k(e,"H1",{"data-svelte-h":!0}),z(t)!=="svelte-a2vclf"&&(t.textContent=c),s=j(e),U(r.$$.fragment,e),b=j(e),u=k(e,"H2",{"data-svelte-h":!0}),z(u)!=="svelte-6efz5p"&&(u.textContent=x),i=j(e),m=k(e,"UL",{});var n=E(m);for(let a=0;a<l.length;a+=1)l[a].l(n);n.forEach(h)},m(e,n){g(e,t,n),g(e,s,n),F(r,e,n),g(e,b,n),g(e,u,n),g(e,i,n),g(e,m,n);for(let a=0;a<l.length;a+=1)l[a]&&l[a].m(m,null);d=!0},p(e,[n]){if(n&1){p=L(e[0].articles);let a;for(a=0;a<p.length;a+=1){const f=O(e,p,a);l[a]?l[a].p(f,n):(l[a]=q(f),l[a].c(),l[a].m(m,null))}for(;a<l.length;a+=1)l[a].d(1);l.length=p.length}},i(e){d||(G(r.$$.fragment,e),d=!0)},o(e){J(r.$$.fragment,e),d=!1},d(e){e&&(h(t),h(s),h(b),h(u),h(i),h(m)),K(r,e),N(l,e)}}}function W(o,t,c){let{data:s}=t;return o.$$set=r=>{"data"in r&&c(0,s=r.data)},[s]}class ae extends D{constructor(t){super(),M(this,t,W,V,B,{data:0})}}export{ae as component,te as universal};
