"use strict";(()=>{(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7606],{17820:(at,K,v)=>{v.r(K),v.d(K,{default:()=>ft});var s=v(13952),O=v(73226),G=v(64826),_=function(i){var g=i.theme,c=i.inverse,y=i.heading,E=i.description,f=i.moreEventsEntryUrl,u=i.moreEventsEntryText,h=i.events,d=h.length>0;return s.createElement(s.Fragment,null,s.createElement(O.d4,{link:u&&f?{url:f,title:u,theme:g,inverse:c}:void 0,theme:g,description:E,inverse:c,cards:h||[],title:y||void 0,type:"promo",cardTitleTag:(0,G.A)(y),cardCopyIsRichText:!0,imageOrientation:"left"}),!d&&s.createElement(O.lq,{inverse:c,theme:g},s.createElement("h4",null,"There are no upcoming events")))},tt=v(99206),et=v(20471),X=v(38470),T=v(97175),p=v(76771),F=v(32832),rt=v(2026),nt=v(46271),st=function(i){return i==="h2"?"h3":i==="h3"?"h4":null};const ut=st;var lt=v(95945),ct=function(i){var g=i.theme,c=i.inverse,y=i.heading,E=i.description,f=i.moreEventsEntryUrl,u=i.moreEventsEntryText,h=i.events,d=h.length>0;return s.createElement(s.Fragment,null,s.createElement(O.Zh,{headingInfo:{theme:g,inverse:!0,htmlTag:"h3",title:y||void 0,description:E||void 0,fullWidth:!0,linkProps:f&&u?{title:u,url:f}:void 0},theme:g,showCategory:!1,cards:h}),!d&&s.createElement(O.lq,{inverse:c,theme:g},s.createElement("h4",null,"There are no upcoming events")))};function ot(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ot=function(){return i};var m,i={},g=Object.prototype,c=g.hasOwnProperty,y=Object.defineProperty||function(r,t,e){r[t]=e.value},E=typeof Symbol=="function"?Symbol:{},f=E.iterator||"@@iterator",u=E.asyncIterator||"@@asyncIterator",h=E.toStringTag||"@@toStringTag";function d(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{d({},"")}catch{d=function(e,n,a){return e[n]=a}}function H(r,t,e,n){var a=t&&t.prototype instanceof Z?t:Z,o=Object.create(a.prototype),l=new I(n||[]);return y(o,"_invoke",{value:J(r,e,l)}),o}function k(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(n){return{type:"throw",arg:n}}}i.wrap=H;var Y="suspendedStart",Q="suspendedYield",z="executing",C="completed",D={};function Z(){}function P(){}function A(){}var M={};d(M,f,function(){return this});var j=Object.getPrototypeOf,N=j&&j(j(b([])));N&&N!==g&&c.call(N,f)&&(M=N);var S=A.prototype=Z.prototype=Object.create(M);function $(r){["next","throw","return"].forEach(function(t){d(r,t,function(e){return this._invoke(t,e)})})}function L(r,t){function e(a,o,l,w){var x=k(r[a],r,o);if(x.type!=="throw"){var R=x.arg,U=R.value;return U&&typeof U=="object"&&c.call(U,"__await")?t.resolve(U.__await).then(function(B){e("next",B,l,w)},function(B){e("throw",B,l,w)}):t.resolve(U).then(function(B){R.value=B,l(R)},function(B){return e("throw",B,l,w)})}w(x.arg)}var n;y(this,"_invoke",{value:function(o,l){function w(){return new t(function(x,R){e(o,l,x,R)})}return n=n?n.then(w,w):w()}})}function J(r,t,e){var n=Y;return function(a,o){if(n===z)throw Error("Generator is already running");if(n===C){if(a==="throw")throw o;return{value:m,done:!0}}for(e.method=a,e.arg=o;;){var l=e.delegate;if(l){var w=W(l,e);if(w){if(w===D)continue;return w}}if(e.method==="next")e.sent=e._sent=e.arg;else if(e.method==="throw"){if(n===Y)throw n=C,e.arg;e.dispatchException(e.arg)}else e.method==="return"&&e.abrupt("return",e.arg);n=z;var x=k(r,t,e);if(x.type==="normal"){if(n=e.done?C:Q,x.arg===D)continue;return{value:x.arg,done:e.done}}x.type==="throw"&&(n=C,e.method="throw",e.arg=x.arg)}}}function W(r,t){var e=t.method,n=r.iterator[e];if(n===m)return t.delegate=null,e==="throw"&&r.iterator.return&&(t.method="return",t.arg=m,W(r,t),t.method==="throw")||e!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),D;var a=k(n,r.iterator,t.arg);if(a.type==="throw")return t.method="throw",t.arg=a.arg,t.delegate=null,D;var o=a.arg;return o?o.done?(t[r.resultName]=o.value,t.next=r.nextLoc,t.method!=="return"&&(t.method="next",t.arg=m),t.delegate=null,D):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,D)}function V(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function q(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(V,this),this.reset(!0)}function b(r){if(r||r===""){var t=r[f];if(t)return t.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var e=-1,n=function a(){for(;++e=0;--a){var o=this.tryEntries[a],l=o.completion;if(o.tryLoc==="root")return n("end");if(o.tryLoc<=this.prev){var w=c.call(o,"catchLoc"),x=c.call(o,"finallyLoc");if(w&&x){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&c.call(a,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),q(n),D}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var a=n.completion;if(a.type==="throw"){var o=a.arg;q(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:b(t),resultName:e,nextLoc:n},this.method==="next"&&(this.arg=m),D}},i}function it(m,i,g,c,y,E,f){try{var u=m[E](f),h=u.value}catch(d){return void g(d)}u.done?i(h):Promise.resolve(h).then(c,y)}function ht(m){return function(){var i=this,g=arguments;return new Promise(function(c,y){var E=m.apply(i,g);function f(h){it(E,c,y,f,u,"next",h)}function u(h){it(E,c,y,f,u,"throw",h)}f(void 0)})}}var vt=function(i){var g=(0,F.d4)(T.ph),c=(0,F.d4)(T.j7),y=(0,s.useState)([]),E=y[0],f=y[1],u=i||{},h=u.theme,d=u.inverse,H=u.heading,k=u.headingHtmlElement,Y=u.description,Q=u.moreEventsEntryUrl,z=u.moreEventsEntryText,C=u.isCoursePage,D=Object.assign({},et.vU,{description:["summary","searchDataDescription"],cardDescriptionIsRichText:function(){return!0},titleTag:function(){return H&&H.length>0?"h4":"h3"}}),Z=function(){var A=ht(ot().mark(function M(j,N,S,$){var L,J,W,V;return ot().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return L=new p.XK(p.Op.equalTo("sys.contentTypeId","events"),p.Op.equalTo("sys.versionStatus",N)),j&&j.length>0&&L.where.add(p.Op.contains("searchDataKeywords",j)),L.where.add(p.Op.greaterThanOrEqualTo("datetime.to",new Date().toISOString())),L.orderBy=p.mF.asc("datetime.from"),L.pageSize=S,L.pageIndex=0,I.next=8,X.deliveryApi.search(L,1,$);case 8:J=I.sent,C?f((0,X.mapEntries)(J.items,(W={},W[lt.Py.events]=D,W))):(V=(0,tt.Ay)(J.items),f(V.map(function(b){var r=(0,nt.A)(b.datetime);return Array.isArray(r)&&r.length>0&&(r=r[0]),{theme:h,inverse:d,title:b.title,titleTag:ut(k),image:(0,rt.e)(b.image||"",!0,"",!1),href:b.url,copy:b.paragraph,publishDate:r||void 0,location:b.venue}})));case 10:case"end":return I.stop()}},M)}));return function(j,N,S,$){return A.apply(this,arguments)}}();(0,s.useEffect)(function(){Z(i.searchTermProvided,c,i.maximumEventCount||3,g).catch(console.error)},[]);var P=E.length>0;return s.createElement(s.Fragment,null,P&&!C&&s.createElement(_,{theme:h,description:Y,inverse:d,events:E,heading:H,moreEventsEntryText:z,moreEventsEntryUrl:Q}),P&&C&&s.createElement(ct,{theme:h,inverse:!0,heading:H,description:Y,events:E,moreEventsEntryText:z,moreEventsEntryUrl:Q}),!P&&C&&s.createElement("div",null,"There are currently no upcoming events"))};const ft=vt},64826:(at,K,v)=>{v.d(K,{A:()=>s});function s(O,G){if(O===void 0||O.length<1)return"h2";switch(G){case"h1":return"h2";case"h2":return"h3";case"h3":return"h4"}return"h3"}},46271:(at,K,v)=>{v.d(K,{A:()=>et});var s=v(83937),O={weekday:"long",year:"numeric",month:"long",day:"numeric"},G=function(T,p,F){return F===void 0&&(F="en-GB"),new Date(T).toLocaleDateString(F,Object.assign({month:"short",day:"numeric"},p))},_=function(T){return G(T.from,O)+", "+(0,s.wX)(T.from)+" - "+G(T.to,O)+", "+(0,s.wX)(T.to)},tt=function(T){return T?T.map(function(p,F){if(p&&p.from){var rt=new Date(p.from),nt=new Date(p.to);return(0,s.IG)(rt,nt)?G(p.from,O)+", ("+(0,s.wX)(p.from)+" - "+(0,s.wX)(p.to)+")":""+_(p)}}):null};const et=tt}}]);})();