PageSourceSearch

https://www.cheshirewestandchester.gov.uk/_Nl7gMQ_7d09d6bc-3417-44…/eventListing.page.2ad8a4c571b8e4f7ef4b.mjs

js cheshirewestandchester.gov.uk collected 2026-09-24 08:58:35 UTC 13,569 bytes, 251 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[954],{99040($e,R,r){r.r(R),r.d(R,{default:()=>Pe});var e=r(48322),Z=r(97154),E=r.n(Z),k=r(77610),q=r(38990),B=r(18045),_=r(60559),ee=r(40424),S=r(71114),x=r(16357),b=r(88194);const Q=b.default.div`
2  ${({theme:t})=>(0,b.css)`
3      display: flex;
4      flex-direction: row;
5
6      padding: 3.6rem 0 1rem 0;
7
8      .row {
9        display: flex;
10        flex-direction: column;
11
12        @media only screen and (min-width: ${t.mediaQueries.medium}) {
13          flex-direction: row;
14          align-items: end;
15          justify-content: space-between;
16          padding: 0 2rem;
17        }
18      }
19
20      .filterItem {
21        display: flex;
22        flex-direction: column;
23        margin-bottom: 1.5rem;
24        align-items: left;
25        @media only screen and (min-width: ${t.mediaQueries.medium}) {
26          margin-right: 2rem;
27          margin-bottom: 2rem;
28          width: 25%;
29          position: relative;
30          align-items: center;
31        }
32
33        label {
34          width: 50%;
35          color: ${t.colors.primary.white};
36          font-weight: 700;
37          font-size: 2.5rem;
38          margin-bottom: 0;
39
40          @media only screen and (min-width: ${t.mediaQueries.medium}) {
41            font-size: 3.5rem;
42            margin-bottom: 1rem;
43            width: 100%;
44          }
45        }
46        .selectWrapper {
47          width: 100%;
48          position: relative;
49        }
50        input,
51        select {
52          min-height: 6rem;
53          border: none;
54          border-radius: 3px;
55          font-family: inherit;
56          font-size: 1em;
57          padding: 1.5rem;
58          text-align: left;
59          width: -webkit-fill-available;
60        }
61
62        select {
63          -moz-appearance: none;
64          -webkit-appearance: none;
65
66          & > option {
67          }
68        }
69
70        svg.eventCategory {
71          position: absolute;
72          height: 1.8rem;
73          width: 1.8rem;
74          top: 2.2rem;
75          right: 1.6rem;
76          @media only screen and (min-width: ${t.mediaQueries.medium}) {
77            height: 1.8rem;
78            width: 1.8rem;
79            top: unset;
80            bottom: 2rem;
81            right: 2rem;
82          }
83        }
84        svg.eventLocation {
85          position: absolute;
86          height: 1.8rem;
87          width: 1.8rem;
88          top: 2rem;
89          right: 1.6rem;
90          @media only screen and (min-width: ${t.mediaQueries.medium}) {
91            height: 1.8rem;
92            width: 1.8rem;
93            top: unset;
94            bottom: 2rem;
95            right: 2rem;
96          }
97        }
98      }
99      .whatsOnBtn {
100        background-color: ${t.colors.primary.white};
101        color: ${t.colors.primary.purple};
102        font-weight: 700;
103        font-size: 2rem;
104        box-shadow: none;
105        text-decoration: none;
106        border: none;
107        border-radius: 3px;
108        height: 6rem;
109
110        width: 100%;
111        margin-bottom: 2rem;
112
113        @media only screen and (min-width: ${t.mediaQueries.medium}) {
114          max-width: 250px;
115          &:hover {
116            cursor: pointer;
117            background-color: ${t.colors.primary.lightViolet};
118            color: ${t.colors.primary.white};
119          }
120          svg {
121            float: right;
122            margin-left: 0;
123            height: 1.8rem;
124            width: 1.8rem;
125          }
126          svg path {
127            fill: ${t.colors.primary.purple};
128          }
129        }
130      }
131    `}
132`;Q.defaultProps={theme:{}};const te=Q;var N=r(42965);const U=({filters:t,updateSelectedFilters:a,updateDateFilters:i})=>{if(Object.keys(t).length===0||typeof window=="undefined")return null;const y=new Date().toJSON().slice(0,10),f=new URLSearchParams(window.location.search),[c,$]=(0,e.useState)(f!==null&&(f==null?void 0:f.get("filterStartDate"))||""),[u,w]=(0,e.useState)(f!==null&&(f==null?void 0:f.get("filterEndDate"))||""),L=()=>{var n,m;location=((n=window==null?void 0:window.location)==null?void 0:n.origin)+((m=window==null?void 0:window.location)==null?void 0:m.pathname)},C=()=>{setTimeout(()=>{const n=new URL(window.location.href);c&&n.searchParams.set("filterStartDate",c),u&&n.searchParams.set("filterEndDate",u),window.history.replaceState({},"",n.toString())},0)};return(0,e.useEffect)(()=>
132{if(c||u){i(c,u);const n=new URL(window.location.href);c?n.searchParams.set("filterStartDate",c):n.searchParams.delete("filterStartDate"),u?n.searchParams.set("filterEndDate",u):n.searchParams.delete("filterEndDate"),window.history.replaceState({},"",n.toString())}},[c,u]),e.createElement(te,null,e.createElement(S.V,null,e.createElement(S.f,null,t&&Object.values(t).map(n=>{var m;let A=n.title=="Category"?"eventCategory":"eventLocation";if(n.title==="Category"||n.title==="Location")return e.createElement("div",{className:"filterItem",key:(0,x.A)()},e.createElement("label",{htmlFor:`${n.title}-select`},n.title),e.createElement("div",{className:"selectWrapper"},e.createElement("select",{id:`${n.title}-select`,name:n.title,onChange:o=>{a(A,o.target.value),C()}},e.createElement("option",{selected:!0,key:(0,x.A)(),value:"All"},"All"),(m=n.items)==null?void 0:m.map(o=>e.createElement("option",{key:(0,x.A)(),value:o.key,selected:o.isSelected?!0:void 0},o.title))),e.createElement(N.A,{className:A,name:"ChevronDown"})));if(n.title==="Start date")return e.createElement("div",{className:"filterItem",key:(0,x.A)()},e.createElement("label",{htmlFor:n.title},n.title),e.createElement("input",{type:"date",id:n.title,name:n.title,value:c,min:y,onChange:o=>{$(o.target.value)}}));if(n.title==="End date")return e.createElement("div",{className:"filterItem",key:(0,x.A)()},e.createElement("label",{htmlFor:n.title},n.title),e.createElement("input",{type:"date",id:n.title,name:n.title,value:u,min:y,onChange:o=>{w(o.target.value)}}))}),e.createElement("button",{type:"button",className:"whatsOnBtn",onClick:L},"Clear filters"))))};U.propTypes={filters:E().object,updateSelectedFilters:E().func,updateDateFilters:E().func};const ne=U,H=b.default.div`
133  ${({theme:t})=>(0,b.css)`
134      nav.wrapper {
135        background-color: ${t.colors.primary.purple};
136        color: ${t.colors.primary.white};
137        margin-top: 0;
138        width: 100%;
139        padding-top: 1.6rem;
140        max-width: 100%;
141
142        ol {
143          margin: 0 auto;
144          width: 126rem;
145        }
146      }
147      .eventBanner {
148        padding: 3.6rem 0 0 0;
149        background-color: ${t.colors.primary.purple};
150      }
151
152      h1 {
153        font-size: 4.5rem;
154        font-weight: 700;
155        color: ${t.colors.primary.white};
156      }
157
158      .events {
159        &__noResults {
160          display: flex;
161          flex-direction: column;
162          justify-content: center;
163          margin: 7rem 3rem 3rem;
164
165          h2 {
166            margin: 0;
167          }
168        }
169        &__results {
170          display: flex;
171          flex-direction: column;
172
173          @media only screen and (min-width: ${t.mediaQueries.medium}) {
174            flex-direction: row;
175            align-items: center;
176            flex-wrap: wrap;
177          }
178
179          .eventInfo {
180            flex: 0 0 calc(33% - 2.8rem);
181            margin: 1.6rem;
182
183            & a {
184              display: flex;
185              flex-direction: column;
186              transition: transform 0.2s;
187              &:hover {
188                transform: scale(1.05);
189              }
190            }
191            .listingCard {
192              &__text-container {
193                display: flex;
194                flex-direction: column;
195                border: 2px solid rgb(237, 237, 239);
196                padding: 2.8rem;
197                min-height: 250px;
198              }
199            }
200          }
201        }
202      }
203      .pagination-row {
204        margin: 4rem 0px 0px;
205        ul.rc-pagination {
206          text-align: center;
207          display: flex;
208          list-style: none;
209          margin: 3rem;
210          padding: 0px;
211          li {
212            font-weight: 700;
213            position: relative;
214            padding: 0px;
215            margin-bottom: 16px;
216            min-width: 44px;
217            height: 44px;
218            line-height: 24px;
219            font-size: 20px;
220            border: none;
221            text-decoration: none;
222            cursor: pointer;
223            color: rgb(34, 34, 34);
224            background-color: rgb(237, 237, 239);
225            &:first-child {
226              margin-left: 0px;
227            }
228            &:not(:last-child) {
229              margin-right: 16px;
230            }
231            &.rc-pagination-prev,
232            &.rc-pagination-next {
233              line-height: 44px;
234            }
235            &.rc-pagination-disabled {
236              display: none;
237            }
238            &.rc-pagination-item-active {
239              color: rgb(255, 255, 255);
240              background-color: rgb(204, 76, 30);
241            }
242            a {
243              display: block;
244              height: 44px;
245              line-height: 44px;
246            }
247          }
248        }
249      }
250    `}
251`;H.defaultProps={theme:{}};const re=H;var ae=r(87023),le=r(75737);const ie={composerProps:({composer:t})=>(0,ae.FL)(t,le.A),title:"title"};var oe=r(95769),se=r(90473),ce=r(80030),me=r(41539),M=r(68496);const de={type:M.Q8},pe=(t,a)=>({type:M.Mv,month:t,year:a});var ue=r(70833),O=r.n(ue),ge=r(18407),V=r(34706),fe=Object.defineProperty,ve=Object.defineProperties,he=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,G=(t,a,i)=>
251a in t?fe(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i,Ee=(t,a)=>{for(var i in a||(a={}))ye.call(a,i)&&G(t,i,a[i]);if(W)for(var i of W(a))we.call(a,i)&&G(t,i,a[i]);return t},xe=(t,a)=>ve(t,he(a));const J=({entry:t})=>{if(!t)return null;const[a,i]=(0,e.useState)(1),[y]=(0,e.useState)(9);let[f,c]=(0,e.useState)();const[$,u]=(0,e.useState)();(0,e.useEffect)(()=>{u({id:"events",mapper:_.A.results})},[]);const{results:w,filters:L,updateSelectedFilters:C}=(0,q.iQ)($),n=(l,s=!1)=>{if(typeof window=="undefined")return null;const g=new URLSearchParams(window.location.search).get(l);if(!g)return null;const h=new Date(g);return s&&h.setHours(23,59,59,999),h},[m,A]=(0,e.useState)(()=>n("filterStartDate")),[o,K]=(0,e.useState)(()=>n("filterEndDate",!0)),De=(l,s)=>{if(A(l?new Date(l):null),s){const p=new Date(s);p.setHours(23,59,59,999),K(p)}else K(null)},{title:Se,composerProps:Y}=(0,k.Vs)(t,ie),X=(0,B.useDispatch)(),{dictionaryIsLoaded:v,dictionaryResults:d}=(0,B.useSelector)(l=>{var s,p,g;return(0,me.D)(l,w,(g=(p=(s=L.weekdays)==null?void 0:s.items)==null?void 0:p.filter(h=>h.isSelected))==null?void 0:g.map(h=>h.key))});(0,e.useEffect)(()=>{if(!v){const l=new Date;X(pe(l.getMonth()+1,l.getFullYear())),X(de)}},[v]);const[P,F]=(0,e.useState)(d.slice(0,y)),[be,j]=(0,e.useState)(0),Le=()=>{typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})},I=l=>{i(l),Le();const s=y*l,p=y*l-y;let g=0;v&&m&&o?(F(O()(d.filter(D=>{if(!D.date)return!1;const z=D.date.split(",")[0],T=new Date(z);return T>=m&&T<=o?(g++,!0):!1}).slice(p,s))),j(g)):v&&m?(F(O()(d.filter(D=>{if(!D.date)return!1;const z=D.date.split(",")[0];return new Date(z)>=m?(g++,!0):!1}).slice(p,s))),j(g)):(F(O()(d.slice(p,s))),j(d.length)),c("Loading information...");const h=setTimeout(()=>{w.length>0&&d.length>0&&v?c(`Displaying <span class="totals">${p+1} - ${s>=d.length?d.length:s} of ${d.length}</span> results`):w.length===0&&d.length===0&&v&&c("No results")},1250);return()=>clearTimeout(h)};(0,e.useEffect)(()=>{I(1)},[v,w]),(0,e.useEffect)(()=>{v&&I(1)},[m,o]);const Ae={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},Ne=e.createElement(e.Fragment,null,e.createElement(N.A,{name:"chevronLeft",size:16}),e.createElement(V.A,null,"Previous")),Oe=e.createElement(e.Fragment,null,e.createElement(N.A,{name:"chevronRight",size:16}),e.createElement(V.A,null,"Next"));return console.info("dictionaryResults: ",d),console.info("results: ",w),console.info("collection: ",P),console.info("listingResultsText: ",f),e.createElement(ee.A,null," ",e.createElement(re,null,e.createElement("div",{className:"eventBanner"},e.createElement("h1",{className:"wrapper"},Se),e.createElement("div",null,e.createElement(ne,{filters:L,updateSelectedFilters:C,updateDateFilters:De}))),e.createElement(S.V,null,e.createElement(S.f,null,e.createElement("section",{className:"events"},P&&P.length>0?e.createElement("ul",{style:{padding:"0"},className:"events__results"},P==null?void 0:P.map(l=>e.createElement(e.Fragment,null,e.createElement("li",{key:l==null?void 0:l.id,style:{listStyle:"none"},className:"eventInfo"},e.createElement(oe.A,xe(Ee({},l),{date:l.date,fallbackImage:"/image-library/libraries-events-fallback-image.jpg",className:"listingCard"})))))):e.createElement("div",{className:"events__noResults"},e.createElement("h2",null,"There are currently no events matching your search."),e.createElement("br",null),"Please edit your search and try again."),e.createElement("div",{className:"pagination-row"},e.createElement(ge.A,{pageSize:9,onChange:I,current:a,total:be,locale:Ae,prevIcon:Ne,nextIcon:Oe,showSizeChanger:!1,showPrevNextJumpers:!1}))))),Y&&e.createElement(ce.A,{className:"content",content:Y,fullwidth:!0})))};J.propTypes={entry:E().object,fallbackImage:E().string};const Pe=(0,se.A)(J)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.