(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{"2bHd":function(e,a,t){"use strict";t.d(a,"a",(function(){return N}));var n=t("q1tI"),l=t.n(n),r=t("CN8t"),m=t("vDqi"),c=t("tsAR"),o=t("dCQc"),s=t("95/9"),i=t("Ys8a");t("e4OT");var u=function(){const{0:e}=Object(n.useState)(9),{currentTrack:a,setTrack:t}=Object(c.b)();return Object(n.useEffect)(()=>{!async function(e){try{await Object(m.get)(Object(o.c)(e)).then(e=>{t(e.data.data[0])})}catch(a){t(null)}}(e)},[]),Object(n.useEffect)(()=>{const a=setInterval(()=>{!async function(e){try{await Object(m.get)(Object(o.c)(e)).then(e=>{t(e.data.data[0])})}catch(a){t(null)}}(e)},6e4);return()=>clearInterval(a)},[]),l.a.createElement("div",{className:"player-small"},l.a.createElement("div",{className:"player-small__inner"},l.a.createElement("div",{className:"player-small__current"},l.a.createElement("button",{onClick:()=>{window.open("/luister/playnostalgie","_blank","width=420,height=662")},className:"player-small__current--inner"},l.a.createElement("div",{className:"player-small__current--visual"},l.a.createElement("img",{src:a?a.cover_art:"",alt:""})),l.a.createElement("div",{className:"player-small__current--track"},l.a.createElement("h3",{className:"name"},a?a.title:""),l.a.createElement("h4",{className:"artist"},a?a.artist:"")),l.a.createElement("div",{className:"player-small__current--btn"},l.a.createElement("span",{className:"btn--play"},l.a.createElement(i.a,{name:"play"}))))),l.a.createElement("div",{className:"player-small__stations"},l.a.createElement(s.a,{isCompact:!0}))))},d=t("6fbM"),f=t("kx4G"),E=t("RS1n"),v=(t("7svR"),t("CzKt")),_=t("gsAb"),g=t("M6IM"),h=t("m5lB"),b=t("l1NG"),O=t("YwZP"),p=t("L2o3");function N(e){let{children:a,page:t,variant:m=""}=e;const{0:c,1:o}=Object(n.useState)(!1),{0:s,1:i}=Object(n.useState)(!1),{0:N,1:D}=Object(n.useState)("login"),T=()=>i(!s);_.a.modal=Object(g.a)(),_.a.tracks=Object(h.a)();const w=Object(O.useLocation)();Object(n.useEffect)(()=>{w.search.includes("show=register")?(D("register"),_.a.modal.setShowAuthModal(!_.a.modal.loginModal)):w.search.includes("show=login")&&(D("login"),_.a.modal.setShowAuthModal(!_.a.modal.loginModal))},[w]);return l.a.createElement(f.a,null,l.a.createElement(b.a,{onCookiesAccepted:()=>o(!0)},l.a.createElement("div",{className:"nostalgie "+m},l.a.createElement(v.a,{page:t,cookiesAccepted:c}),l.a.createElement(p.a,{variant:null!=m?m:"",onPressSearch:T,onPressLogin:()=>{_.a.modal.setShowAuthModal(!_.a.modal.loginModal)},theme:"Home"===t?"light":"dark"}),l.a.createElement("div",{className:"page-content"},a),l.a.createElement(r.a,{variant:null!=m?m:""}),l.a.createElement(d.a,{visible:s,handleClose:T}),l.a.createElement(E.a,{visible:_.a.modal.loginModal,close:()=>_.a.modal.setShowAuthModal(!_.a.modal.loginModal),activeTab:N})),l.a.createElement(u,null)))}},BlAv:function(e,a,t){"use strict";t.r(a),t.d(a,"default",(function(){return h}));var n=t("q1tI"),l=t.n(n),r=(t("v/9C"),t("Wbzz")),m=t("CZwz"),c=t("h6go"),o=t("KTnM"),s=t("Ys8a");t("TfdO");function i(e){const{item:a,index:t,date:i}=e,{0:u,1:d}=Object(n.useState)(!1);let f=!1;return Object(c.e)(a,i)&&(f=!0),a.show?l.a.createElement("div",{className:`mhc__slot duration-${Object(c.b)(a)} ${f?" now":""}`,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)},l.a.createElement("div",{className:"mhc__slot--front"},l.a.createElement("h3",{className:"program__name"},a.show.name),l.a.createElement("p",{className:"program__time"},l.a.createElement(s.a,{name:"clock"})," ",l.a.createElement("span",null," ",Object(c.a)(a)))),u&&l.a.createElement("div",{className:"mhc__slot--back",style:{backgroundColor:Object(c.c)(t)}},l.a.createElement("img",{src:Object(m.a)(Object(o.v)(a.show.cover),185,85),alt:a.show.name}),l.a.createElement("div",{className:"mhc__slot--inner"},l.a.createElement("h3",{className:"program__name"},a.show.name),l.a.createElement("hr",null),l.a.createElement("p",{className:"program__time"},l.a.createElement(s.a,{name:"clock"})," ",l.a.createElement("span",null," ",Object(c.a)(a))),l.a.createElement(r.Link,{to:(E=a.show.slug,E?"/programmas/"+E:"/programmas")},"Lees meer...")))):null;var E}var u=t("tsAR"),d=t("ExVU");function f(e){return d.DateTime.local().weekNumber===d.DateTime.fromISO(e.from).weekNumber}function E(e){return d.DateTime.fromISO(e).toISODate()===d.DateTime.fromJSDate(new Date).toISODate()}var v=function(){const{getProgramGuideRange:e}=Object(u.b)(),{0:a,1:t}=Object(n.useState)([]),{0:r,1:m}=Object(n.useState)({from:d.DateTime.local().startOf("week").toISODate(),until:d.DateTime.local().endOf("week").toISODate()});return Object(n.useEffect)(()=>{e(r.from,r.until).then(e=>{t(e)})},[e,r]),l.a.createElement("div",{className:"mhc-container"},l.a.createElement("div",{className:"mhc__arrows"},l.a.createElement("button",{className:"mhc__arrow "+(f(r)?"current":""),onClick:()=>function(){if(!f(r)){const e=d.DateTime.fromISO(r.from).minus({days:7}).toISODate(),a=d.DateTime.fromISO(r.until).minus({days:7}).toISODate();m({from:e,until:a})}}(),disabled:f(r)},"Deze week"),l.a.createElement("button",{className:"mhc__arrow "+(f(r)?"":"current"),onClick:()=>function(){const e=d.DateTime.fromISO(r.from).plus({days:7}).toISODate(),a=d.DateTime.fromISO(r.until).plus({days:7}).toISODate();m({from:e,until:a})}(),disabled:!f(r)},"Volgende week")),l.a.createElement("div",{className:"mhc-scroller"},l.a.createElement("div",{className:"mhc"},l.a.createElement("div",{className:"mhc__hours"},l.a.createElement("div",{className:"mhc__icon"},l.a.createElement(s.a,{name:"clock"})),["0u","1u","2u","3u","4u","5u","6u","7u","8u","9u","10u","11u","12u","13u","14u","15u","16u","17u","18u","19u","20u","21u","22u","23u","24u"].map((e,a)=>l.a.createElement("div",{className:"mhc__hour",key:a},l.a.createElement("span",null,e)))),a.map((e,a)=>{return l.a.createElement(n.Fragment,{key:a},l.a.createElement("div",{className:"mhc__weekday "+(E(e.date)?"today":null)},l.a.createElement("h3",null,1===(t=d.DateTime.fromISO(e.date).weekday)?"Maandag":2===t?"Dinsdag":3===t?"Woensdag":4===t?"Donderdag":5===t?"Vrijdag":6===t?"Zaterdag":7===t?"Zondag":void 0),l.a.createElement("h4",null,d.DateTime.fromISO(e.date).day,"/",d.DateTime.fromISO(e.date).month)),l.a.createElement("div",{className:"mhc__day "+(E(e.date)?"today":null)},e.slots.map((a,t)=>l.a.createElement(i,{date:e.date,item:a,index:t,key:t}))));var t}),l.a.createElement("div",{className:"mhc__footer"}))))},_=t("2bHd"),g=t("atoK");function h(){return l.a.createElement(_.a,{page:"Programmagids"},l.a.createElement("div",{className:"program-guide container"},l.a.createElement(g.a,null),l.a.createElement(v,null)))}},GuF3:function(e,a,t){},TfdO:function(e,a,t){},atoK:function(e,a,t){"use strict";t.d(a,"a",(function(){return m}));var n=t("q1tI"),l=t.n(n),r=t("Wbzz");t("GuF3");function m(e){let{active:a}=e;return l.a.createElement("ul",{className:"program__nav"},l.a.createElement("li",{className:"program__nav--item"},l.a.createElement(r.Link,{to:"/programmas",className:"program__nav--link",activeClassName:"active"},"Programma's")),l.a.createElement("li",{className:"program__nav--item"},l.a.createElement(r.Link,{to:"/programmagids",className:"program__nav--link",activeClassName:"active"},"Deze week bij Play Nostalgie")))}},e4OT:function(e,a,t){},h6go:function(e,a,t){"use strict";t.d(a,"e",(function(){return r})),t.d(a,"d",(function(){return m})),t.d(a,"a",(function(){return c})),t.d(a,"b",(function(){return o})),t.d(a,"c",(function(){return s}));var n=t("ExVU");const l=["#b01117","#a72ed0","#ea27c2","#FFA41F"];function r(e,a){if(a===n.DateTime.local().toISODate()){let a=n.DateTime.fromFormat(e.from,"HH:mm:ss"),t=n.DateTime.fromFormat(e.until,"HH:mm:ss");return n.DateTime.local().toUTC()>a&&n.DateTime.local().toUTC()<t}return!1}function m(e){let a=n.DateTime.fromFormat(e.from,"HH:mm:ss"),t=n.DateTime.fromFormat(e.until,"HH:mm:ss");return n.DateTime.local().toUTC()>a&&n.DateTime.local().toUTC()<t}function c(e){let a=n.DateTime.fromFormat(e.from,"HH:mm:ss"),t=n.DateTime.fromFormat(e.until,"HH:mm:ss");return`${a.toLocaleString(n.DateTime.TIME_24_SIMPLE)} - ${t.toLocaleString(n.DateTime.TIME_24_SIMPLE)}`}function o(e){let a=n.DateTime.fromFormat(e.from,"HH:mm:ss"),t=n.DateTime.fromFormat(e.until,"HH:mm:ss");return Math.round((t-a)/36e5)}function s(e){var a,t,n,r;return 0%e==0?null!==(a=l[e])&&void 0!==a?a:l[0]:1%e==0?null!==(t=l[e])&&void 0!==t?t:l[1]:2%e==0?null!==(n=l[e])&&void 0!==n?n:l[2]:3%e==0?null!==(r=l[e])&&void 0!==r?r:l[3]:l[0]}},"v/9C":function(e,a,t){}}]); //# sourceMappingURL=component---src-pages-programmagids-jsx-cafd609c6c6775a357b3.js.map