(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[3],{321:function(e,t,a){"use strict";a.d(t,"b",(function(){return m})),a.d(t,"c",(function(){return w})),a.d(t,"a",(function(){return j}));var l=a(0),r=a.n(l),n=a(1),i=a.n(n),o=a(32),c=a(69);const s=e=>r.a.createElement(r.a.Fragment,null,r.a.Children.map(e.children,t=>r.a.cloneElement(t,{...e,...t.props})));s.propTypes={className:i.a.string,children:i.a.any};var m=Object(o.h)(c.a)(s),d=a(18),p=a(77),u=a(81),g=a(47),f=a(121),_=a(329),b=a(62),y=a(328);function h(){return(h=Object.assign||function(e){for(var t=1;t{var s,m,v,w,E;const N=Object(b.a)(),j=Object(d.g)(),{programmeType:x,startDate:k,location:O,subjectArea:S,programmeFormat:L,taxonomyStartDate:I}=a,[C,F]=Object(l.useState)(!1);function D(e,t=""){if("online"===t){if(e instanceof Array&&"undefined"!=typeof window){const t=new URL(window.location.href);let a="";t.searchParams.delete("programmeFormat"),e.map(e=>{a=a+=e+","}),F(!0),t.searchParams.append("programmeFormat",a),j.push(t.pathname+t.search,{shallow:!0})}}else F(!1),n("programmeFormat",e)}console.info(I);const P=function(e){var t,a;let l;return l=null==e||null===(t=e.items)||void 0===t?void 0:t.filter(({key:e})=>e),null===(a=l)||void 0===a?void 0:a.map(({isSelected:e,title:t,key:a})=>({isSelected:e,key:a,title:N?t:new Date(t)}))}(k);let T;T=N?P.sort((e,t)=>{const a=p.DateTime.fromFormat(e.title,"LLLL yyyy"),l=p.DateTime.fromFormat(t.title,"LLLL yyyy");return a.isValid&&l.isValid?a-l:-1}):null==P?void 0:P.sort((e,t)=>e.title-t.title);const A=[...t,...e],[q,B]=Object(l.useState)("card"),G=e=>{B(e),localStorage.setItem("lse-view-programmes",e)};Object(l.useEffect)(()=>{const e=localStorage.getItem("lse-view-programmes");e&&B(e)},[q]);const V=N||"list"!==q?"programmes-cards":"programmes-list",z=N||"list"!==q?void 0:"list",U="list"===q,H="card"===q;return r.a.createElement(r.a.Fragment,null,r.a.createElement("section",{className:"programmes-listing"},r.a.createElement("div",{className:"wrapper"},r.a.createElement("aside",{className:"programmes-filter"},r.a.createElement("h3",null,"Filter programmes"),x&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Programme type",uniqueId:Object(u.a)(),icon:"chevron_down"},null==x||null===(s=x.items)||void 0===s?void 0:s.map(({isSelected:e,title:t,key:a})=>r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:e,text:t,onClick:()=>n("programmeType",a)}))),I&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Start date",uniqueId:Object(u.a)(),icon:"chevron_down"},null==I||null===(m=I.items)||void 0===m?void 0:m.map(({key:e,isSelected:t,title:a})=>a<=new Date?null:r.a.createElement(f.a,{className:"programmes-filter__pill",key:e,selected:t,text:a,onClick:()=>n("taxonomyStartDate",e)}))),N&&k&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Start date",uniqueId:Object(u.a)(),icon:"chevron_down"},T.map(e=>{const{key:t,isSelected:a,title:l}=e,i=new Date;return e.title<=i?null:r.a.createElement(f.a,{className:"programmes-filter__pill",key:t,selected:a,text:l.toLocaleString("en-GB",{month:"short",year:"numeric"}),onClick:()=>n("startDate",t)})})),!N&&O&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Location",uniqueId:Object(u.a)(),icon:"chevron_down"},null==O||null===(v=O.items)||void 0===v?void 0:v.map(({key:e,isSelected:t,title:a})=>r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>n("location",e)}))),S&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Subject area",uniqueId:Object(u.a)(),icon:"chevron_down"},null==S||null===(w=S.items)||void 0===w?void 0:w.map(({key:e,isSelected:t,title:a})=>r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>n("subjectArea",e)}))),L&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Format",uniqueId:Object(u.a)(),icon:"chevron_down"},null==L||null===(E=L.items)||void 0===E?void 0:E.map(({key:e,isSelected:t,title:a})=>"Online"===a?r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:C,text:a,onClick:()=>D(e,"online")}):r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>D(e)}))),!N&&r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Change view:"),r.a.createElement("div",{className:"programmes-change-view"},r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:U,text:"List",onClick:()=>G("list")}),r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:H,text:"Card",onClick:()=>G("card")})))),r.a.createElement("section",{className:V},c?"Loading results":A&&A.length>0?A.map(e=>r.a.createElement(y.a,h({},e,{key:Object(u.a)(),className:z,isLseOnline:N}))):r.a.createElement(g.c,{title:"No results...",content:"Sorry, we don't have any results for those categories."})))),r.a.createElement("div",{className:"wrapper"},r.a.createElement(_.a,{paging:i,updatePageIndex:o})))};v.propTypes={className:i.a.string,standfirst:i.a.string,results:i.a.array,resultsInfo:i.a.object,paging:i.a.object,filters:i.a.object,updateSelectedFilters:i.a.func,updatePageIndex:i.a.func,updateSortOrder:i.a.func,sortOrder:i.a.array,isLoading:i.a.bool};var w=v;function E(){return(E=Object.assign||function(e){for(var t=1;t{var s,m,d;const h=Object(b.a)(),{startDate:v,location:w,subjectArea:N,programmeFormat:j}=a;const x=null==(k=v)||null===(O=k.items)||void 0===O?void 0:O.map(({isSelected:e,title:t,key:a})=>({isSelected:e,key:a,title:h?t:new Date(t)}));var k,O;let S;S=h?x.sort((e,t)=>{const a=p.DateTime.fromFormat(e.title,"LLLL yyyy"),l=p.DateTime.fromFormat(t.title,"LLLL yyyy");return a.isValid&&l.isValid?a-l:-1}):null==x?void 0:x.sort((e,t)=>e.title-t.title);const[L,I]=Object(l.useState)("card"),C=e=>{"undefined"!=typeof window&&void 0!==window.localStorage&&(I(e),localStorage.setItem("lse-view-programmes",e))};Object(l.useEffect)(()=>{if("undefined"!=typeof window&&void 0!==window.localStorage){const e=localStorage.getItem("lse-view-programmes");e&&I(e)}},[L]);const[F,D]=Object(l.useState)(()=>{if("undefined"!=typeof window&&void 0!==window.localStorage){const e=localStorage.getItem("scrollPosition");return e?parseInt(e,10):0}}),[P,T]=Object(l.useState)(Date.now()),A=()=>{if("undefined"!=typeof window&&void 0!==window.localStorage){const e="undefined"!=typeof window?window.scrollY:0;D(e),localStorage.setItem("scrollPosition",e),T(Date.now())}};Object(l.useEffect)(()=>{const e=setTimeout(()=>{window.scrollTo(0,F)},1e3);return()=>clearTimeout(e)},[P,F]);const q=h||"list"!==L?"programmes-cards":"programmes-list",B=h||"list"!==L?void 0:"list",G="list"===L,V="card"===L,z=[...t,...e];return r.a.createElement(r.a.Fragment,null,r.a.createElement("section",{className:"programmes-listing"},r.a.createElement("div",{className:"wrapper"},r.a.createElement("aside",{className:"programmes-filter"},r.a.createElement("h3",null,"Filter programmes"),v&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Start date",uniqueId:Object(u.a)(),icon:"chevron_down"},S.map(e=>{const{key:t,isSelected:a,title:l}=e,i=new Date;return e.title<=i?null:r.a.createElement(f.a,{className:"programmes-filter__pill",key:t,selected:a,text:l.toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),onClick:()=>{n("startDate",t),A()}})})),!h&&w&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Location",uniqueId:Object(u.a)(),icon:"chevron_down"},null==w||null===(s=w.items)||void 0===s?void 0:s.map(({key:e,isSelected:t,title:a})=>r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>{n("location",e),A()}}))),N&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Subject area",uniqueId:Object(u.a)(),icon:"chevron_down"},null==N||null===(m=N.items)||void 0===m?void 0:m.map(({key:e,isSelected:t,title:a})=>r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>{n("subjectArea",e),A()}}))),j&&r.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Format",uniqueId:Object(u.a)(),icon:"chevron_down"},null==j||null===(d=j.items)||void 0===d?void 0:d.map(({key:e,isSelected:t,title:a})=>r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>{n("programmeFormat",e),A()}}))),!h&&r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Change view:"),r.a.createElement("div",{className:"programmes-change-view"},r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:G,text:"List",onClick:()=>C("list")}),r.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:V,text:"Card",onClick:()=>C("card")})))),r.a.createElement("section",{className:q},c?"Loading results":z&&z.length>0?z.map(e=>r.a.createElement(y.a,E({},e,{key:Object(u.a)(),className:B,isLseOnline:h}))):r.a.createElement(g.c,{title:"No results...",content:"Sorry, we don't have any results for those categories."})))),r.a.createElement("div",{className:"wrapper"},r.a.createElement(_.a,{paging:i,updatePageIndex:o})))};N.propTypes={className:i.a.string,standfirst:i.a.string,results:i.a.array,resultsInfo:i.a.object,paging:i.a.object,filters:i.a.object,updateSelectedFilters:i.a.func,updatePageIndex:i.a.func,updateSortOrder:i.a.func,sortOrder:i.a.array,isLoading:i.a.bool,courseTypeListing:i.a.object};var j=N},326:function(e,t,a){"use strict";var l=a(0),r=a.n(l),n=a(1),i=a.n(n),o=a(8);var c=o.default.div.withConfig({displayName:"paginationstyled__PaginationStyled",componentId:"sc-12en0v7-0"})(["",""],({theme:e})=>Object(o.css)(["display:flex;align-items:center;justify-content:center;margin:0 0 4.8rem 0;@media ","{justify-content:flex-end;}"],e.mq.laptop));var s=o.default.button.withConfig({displayName:"paginationItemstyled__PaginationItemStyled",componentId:"sc-rdvzwr-0"})(["",""],({theme:e})=>Object(o.css)(["cursor:pointer;background:",";width:3.2rem;height:3.2rem;border:0.1rem solid #f5f5f5;text-align:center;display:inline-flex;align-items:center;justify-content:center;margin-left:1.6rem;font-size:1.4rem;line-height:3.2rem;display:block;color:",";&:enabled:hover{background:",";}&:disabled{opacity:0.5;cursor:default;}&.active{text-decoration:underline;text-underline-offset:2px;color:",";}.icon{display:flex;align-items:center;justify-content:center;svg{height:2.4rem;path:{fill:",";}}}"],e.colors.white,e.colors.black,e.colors.lightGrey,e.colors.red,e.colors.red)),m=a(47);const d=({isActive:e,className:t,label:a,updatePageIndex:l,index:n,disabled:i})=>r.a.createElement(s,{disabled:i,isActive:e,className:t,onClick:()=>(e=>{e>-1&&l(e)})(n)},"Back"===a||"Next"===a?r.a.createElement(m.e,{type:"Back"===a?"chevron_left":"chevron_right",className:"icon"}):a&&a.toString());d.propTypes={className:i.a.string,index:i.a.number,isActive:i.a.bool,label:i.a.oneOfType([i.a.string,i.a.number]),theme:i.a.object,updatePageIndex:i.a.func,disabled:i.a.bool};var p=d;const u=e=>{const{className:t,paging:a,updatePageIndex:l}=e;let{pageIndex:n,pageCount:i}={...a},o=Math.ceil(n-2.5);o<0&&(o=0);let s=o+5-1;s>i-1&&(s=i-1,o=i-5,o<0&&(o=0));let m=[];for(let e=o;e<=s;e++){let t=e==n;m.push(r.a.createElement(p,{index:e,isActive:t,key:e,label:e+1,updatePageIndex:l,disabled:t,className:t?"inactive":"active"}))}return r.a.createElement(c,{className:t},i>1&&r.a.createElement(r.a.Fragment,null,r.a.createElement(p,{className:"control prev "+(n>0?"":"disabled"),disabled:!(n>0),index:n-1,label:"Back",updatePageIndex:l}),m,r.a.createElement(p,{className:"control next "+(nObject(o.css)(["position:relative;display:flex;flex-direction:column;word-wrap:break-word;text-decoration:none;background-color:",";height:100%;box-shadow:",";p{line-height:2.4rem;}&:hover,&:focus-within{.card__title{text-decoration:underline;}}.card-media,#image-modal__content{overflow:hidden;width:100%;height:24rem !important;@media (max-width:48.1rem){max-height:20rem;}}img{display:block;height:inherit;width:100%;object-fit:cover;height:24rem !important;@media (max-width:48.1rem){max-height:20rem;}}.card__label{position:absolute;right:0;padding:0.8rem;background-color:",";color:#000;&.red{background-color:",";color:#fff;}}.card-content{display:flex;flex:1 1 auto;flex-direction:column;padding:1.6rem 1.6rem 3.2rem 1.6rem;}.card__deadline-date{color:",";}.card__format{font-size:1.4rem;margin-top:0;}.card__title{margin:0;text-transform:none;a{position:static;color:inherit;text-decoration:none;&::after{content:'';display:block;position:absolute;top:0;left:0;width:100%;height:100%;}}}.card__role{font-weight:bold;}.card__quote{border-left:3px solid ",";padding-left:1rem;line-height:1.5;}.video-modal{button{background-color:",";}}.video-modal p{display:none;}.card__subject-area{margin-top:auto;p{font-style:italic;margin-bottom:0;}}&.list{border-radius:30px;.card-media,img{display:none;}@supports (display:grid){width:100%;}.card__label{position:absolute;top:2px;right:6px;border-top-right-radius:20px;}.card__text{display:none;}}.card__footer{margin-top:auto;padding:1.6rem;.card__programme-title{font-style:italic;margin:0;}.card__date{display:flex;justify-content:space-between;span{color:",";margin:0 1rem;}}.card__dates-location{max-width:75%;}}"],e.colors.white,e.effects.cardShadow,e.colors.secondary.lightGrey,e.colors.red,e.colors.red,e.colors.red,e.colors.black,e.colors.red)),s=a(111),m=a(325),d=a(304),p=a(305),u=a(62);let g;t.a=({title:e,readingTime:t,date:a,image:l,link:o,role:f,format:_,location:b,startDates:y,deadlineDate:h,imageAlt:v,thumbnail:w,source:E,relatedProgramme:N,watchTime:j,featuredTestimonial:x,className:k,featured:O,tagTitle:S})=>{const L=Object(u.a)();if(g=L?p.a:d.a,!e)return null;const I="list"===k;return r.a.createElement(c,{className:"standard-card "+k},E&&(null==E?void 0:E.length)>0?r.a.createElement(m.a,{id:e,source:E,thumbnail:w,className:"video-modal",title:e}):l||l&&!I?r.a.createElement("div",{className:"card-media"},r.a.createElement("img",{src:l+"?w=800&f=webp",alt:`${v||""} ${e||""}`})):r.a.createElement("img",{src:g+"?w=800&f=webp",alt:"ÐÓ°ÉÂÛ̳ fallback"}),S&&r.a.createElement("div",{className:"card__label "+(O?"red":"")},S),!S&&O&&r.a.createElement("div",{className:"card__label "+(O?"red":"")},"Featured"),x&&!0===x||!S&&O&&!0===O?r.a.createElement("div",{className:"card__label red"},"Featured"):null,r.a.createElement("div",{className:"card-content"},_&&r.a.createElement("p",{className:"card__format"},_),r.a.createElement("h2",{className:"card__title h4"},r.a.createElement(s.a,{uri:o},e)),f&&r.a.createElement("p",{className:"card__role"},f),!L&&h&&r.a.createElement("p",{className:"card__deadline-date"},"Next application deadline:"," ",Object(n.b)(h))),r.a.createElement("div",{className:"card__footer"},N&&N.map((e,t)=>void 0!==e.programmeTitle?r.a.createElement("p",{className:"card__programme-title",key:t},e.programmeTitle):null),a||t||j?r.a.createElement("p",{className:"card__date"},a&&r.a.createElement("time",{dateTime:a},Object(n.b)(a)),a&&t||a&&j?r.a.createElement("span",null,"•"):null,t&&t,j&&j):null,(y||b)&&r.a.createElement(r.a.Fragment,null,y&&r.a.createElement("p",{className:"card__dates-location"},null==y?void 0:y.map(({startDate:e},t)=>void 0===e?null:r.a.createElement(r.a.Fragment,{key:Object(i.a)()},Object(n.b)(e),t===(null==y?void 0:y.length)-1?null:" & "))),b&&r.a.createElement("p",{className:"card__location"},b))))}},329:function(e,t,a){"use strict";var l=a(326);a.d(t,"a",(function(){return l.a}))}}]);