(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[396],{800:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/agenda",function(){return n(3101)}])},8142:function(e,t,n){"use strict";n.d(t,{XB:function(){return g},jf:function(){return h},lA:function(){return f}});var s=n(5893),a=n(9035),i=n.n(a),r=n(9090),l=n(2344),o=n(4171),c=n(4657),u=n(8227),d=n(4696),m=n(7294);function _(e){var t;let{item:n}=e,{logo:a,localized:r,fields:o,dates:u,t:d}=(0,c.p$)(n,{logo:!0,localized:!0,fields:!0,dates:!0}),m=(null===(t=u[0])||void 0===t?void 0:t.date)||new Date,_=d("Short Month "+m.getMonth());return(0,s.jsxs)("li",{className:i().item,children:[(0,s.jsx)("div",{className:i().image,children:(0,s.jsx)("img",{src:(0,l.$G)(a||"/images/logo.svg"),alt:""})}),(0,s.jsxs)("a",{className:i().date,href:o.link,target:"_blank",children:[(0,s.jsx)("span",{className:i().day,suppressHydrationWarning:!0,children:m.getDate()}),(0,s.jsx)("span",{className:i().month,suppressHydrationWarning:!0,children:_}),(0,s.jsx)("span",{className:i().year,suppressHydrationWarning:!0,children:m.getFullYear()})]}),(0,s.jsxs)("a",{className:i().content,href:o.link,children:[(0,s.jsx)("h3",{dangerouslySetInnerHTML:{__html:null==r?void 0:r.title}}),(null==o?void 0:o.location)&&(0,s.jsx)("p",{dangerouslySetInnerHTML:{__html:o.location}})]}),(null==o?void 0:o.link)&&(0,s.jsx)("a",{className:i().more,href:o.link,target:"_blank",children:d("Infos")})]},n.id)}function f(e){let{items:t,className:n,noReverse:a}=e,r=a?t:t.reverse();return(0,s.jsx)("section",{className:(0,o.cn)(i().list,n),children:(0,s.jsx)("ul",{children:r.map(e=>(0,s.jsx)(_,{item:e},e.id))})})}function g(e){let{content:t,className:n}=e,[a,r]=(0,m.useState)(6);return(0,s.jsx)(d.E,{className:(0,o.cn)(n,i().list),ItemComponent:_,items:t.sort((e,t)=>{var n,s;let a=new Date((null===(n=e.dates[0])||void 0===n?void 0:n.date)||0),i=new Date((null===(s=t.dates[0])||void 0===s?void 0:s.date)||0);return a.getTime()-i.getTime()}).slice(0,a),maxItems:t.length,onSeeMore:()=>{r(a+6)}})}function h(e){let{content:t,className:n,endDate:a,limit:l=6}=e;return(0,s.jsx)(r.A,{className:(0,o.cn)(i().list,n),ItemComponent:_,items:t.content,maxPage:t.pages-1,fetchPage:e=>(0,u.pb)({end:a,type:"event",limit:l,offset:e*l})})}},9090:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});var s=n(5893),a=n(7294),i=n(4696);function r(e){let{items:t,fetchPage:n,maxPage:r,...l}=e,[o,c]=(0,a.useState)(t),[u,d]=(0,a.useState)(0),[m,_]=(0,a.useState)(r||0),[f,g]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{if(f){g(!1);return}n(u).then(e=>{c([...o,...e.content]),_(e.pages-1)})},[u]),(0,s.jsx)(i.E,{items:o,...l,onSeeMore:()=>d(u+1),maxItems:u!==m?void 0:o.length})}},4696:function(e,t,n){"use strict";n.d(t,{E:function(){return l}});var s=n(5893),a=n(6346),i=n.n(a),r=n(6965);function l(e){let{seeMoreButtonLabel:t="See more",tagName:n="ul",ItemComponent:a,items:l,onSeeMore:o,className:c,maxItems:u}=e;return(0,s.jsxs)("section",{className:c,children:[(0,s.jsx)(n,{children:l.map((e,t)=>(0,s.jsx)(a,{item:e},t))}),(!u||l.length<u)&&(0,s.jsx)(r.z,{className:i().button,onClick:o,tone:r.R.Outlined,children:t})]})}},3101:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return c},default:function(){return u}});var s=n(5893),a=n(3987),i=n.n(a),r=n(8592),l=n(8142),o=n(4171),c=!0,u=function(e){let{future:t,past:n}=e,{t:a}=(0,r.Q)();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("section",{className:(0,o.cn)("mw padded",i().section),children:[(0,s.jsx)("h1",{children:a("Calendar")}),(0,s.jsx)(l.lA,{items:t||[]}),(0,s.jsx)("h2",{children:a("Past gigs")}),(0,s.jsx)(l.jf,{content:n,endDate:new Date})]})})}},2344:function(e,t,n){"use strict";function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let s=t.join(" ");return s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9_\-\. ]/g,"").replace(/\s+/g,"-")}function a(e){return e.startsWith("http")?e:e.replace(/contrib\//g,"https://www.collectifcoax.com/contrib/")}n.d(t,{$G:function(){return a},lV:function(){return s}})},9035:function(e){e.exports={list:"agenda-list_list__wbOfB",item:"agenda-list_item__wxMpW",content:"agenda-list_content__jpIoV",date:"agenda-list_date__TzS3n",more:"agenda-list_more__m5doz",day:"agenda-list_day__YjCaM",month:"agenda-list_month__xwy6r",year:"agenda-list_year__DXNeS",image:"agenda-list_image__Go7RD"}},6346:function(e){e.exports={button:"see-more-list_button__iuRSN"}},3987:function(e){e.exports={section:"agenda_section__mXEmG"}}},function(e){e.O(0,[774,888,179],function(){return e(e.s=800)}),_N_E=e.O()}]);