PageSourceSearch

https://www.thingstodo.co.uk/_next/static/chunks/pages/map-view-afefcf60639ceea8.js

js thingstodo.co.uk collected 2026-10-09 22:17:18 UTC 12,282 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[15569107],{42726842:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/map-view",function(){return n(80447035)}])},58123997:function(t,e,n){"use strict";n.d(e,{AF:function(){return o},LK:function(){return i},dp:function(){return a},nB:function(){return r}});var a="Hide footer",o="Show footer",i="Back to top",r="View Footer"},19952421:function(t,e,n){"use strict";var a=n(78505152),o=n.n(a)()((function(){return Promise.resolve().then(n.bind(n,74641530))}),{loadableGenerated:{webpack:function(){return[74641530]}}});e.Z=o},64809790:function(t,e,n){"use strict";n.d(e,{$c:function(){return g},Uc:function(){return m},VA:function(){return v},cS:function(){return L},kY:function(){return b}});var a=n(6147568),o=n(40626042),i=n(84269396),r=n(31010253),s=n(97197582),c=n(42124010),u=n(97393238),l=n(26159439),d=n(15006840),p=n(83655384),f=n(35517182),h=function(t,e){var n=e.categories,a=e.lat,o=e.lon,i=e.bottomRightLat,s=e.bottomRightLon,c=e.filterPrice,l=e.sliderValues,d=e.topLeftLat,p=e.topLeftLon,f=e.pageSize,h=e.stacked;if(f&&t.searchParams.append("pageSize",f),i&&s&&d&&p?(t.searchParams.append("bottomRightLat",i),t.searchParams.append("bottomRightLon",s),t.searchParams.append("topLeftLat",d),t.searchParams.append("topLeftLon",p)):a&&o&&(t.searchParams.append("lat",a),t.searchParams.append("lon",o)),n&&n.forEach((function(e){e&&t.searchParams.append(u.I1,e)})),c&&l){var m=(0,r.Z)(l,2),g=m[0],L=m[1];g>0&&t.searchParams.append(u.oA,c[g].value),L<c.length-1&&t.searchParams.append(u.Ah,c[L].value)}return h&&t.searchParams.append("stacked",h),t},m=function(t){var e=t.categories,n=t.lat,a=t.lon,o=t.bottomRightLat,i=t.bottomRightLon,r=t.filterPrice,s=t.sliderValues,c=t.topLeftLat,u=t.topLeftLon,d=t.pageSize,p=new URL(l.Pw,window.location.origin),f=(p=h(p,{bottomRightLat:o,bottomRightLon:i,categories:e,filterPrice:r,lat:n,lon:a,pageSize:d,sliderValues:s,topLeftLat:c,topLeftLon:u})).pathname,m=p.search;return"".concat(f).concat(m)},g=function(){var t=(0,a.Z)((function(t){var e,n,a,o,i,r,u,l,m,g,L,v,b,_,P;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:e=t.bottomRightLat,n=t.bottomRightLon,a=t.categories,o=t.filterPrice,i=t.lat,r=t.lon,u=t.pageSize,l=t.sliderValues,m=t.topLeftLat,g=t.topLeftLon,L=t.stacked,v=[],b=function(t){var e=t.bottomRightLat,n=t.bottomRightLon,a=t.categories,o=t.filterPrice,i=t.lat,r=t.lon,s=t.pageSize,u=t.sliderValues,l=t.topLeftLat,d=t.topLeftLon,p=t.stacked,f=new URL("/v1/".concat(c.Hz.BRAND_HEADER,"/deal/mapview"),"https://public-api.thingstodo.co.uk");return(f=h(f,{bottomRightLat:e,bottomRightLon:n,categories:a,filterPrice:o,lat:i,lon:r,pageSize:s,sliderValues:u,stacked:p,topLeftLat:l,topLeftLon:d})).toString()}({bottomRightLat:e,bottomRightLon:n,categories:a,filterPrice:o,lat:i,lon:r,pageSize:u,sliderValues:l,stacked:L,topLeftLat:m,topLeftLon:g}),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,(0,d.ZP)(b,{cache:!1,headers:(0,f.Z)(),method:"GET",withCredentials:!0})];case 2:return _=s.sent(),v=200===_.status&&(null===_||void 0===_?void 0:_.data)?_.data:-1,[3,4];case 3:return P=s.sent(),v=-1,p.Z.logError(P),[3,4];case 4:return[2,v]}}))}));return function(e){return t.apply(this,arguments)}}(),L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t)return[];var n=t.slice();return e?(e.forEach((function(e){if(!t.some((function(t){return t.shortName===e}))){var a=u.Xi.ALL_CATEGORY_FILTERS.find((function(t){return t.shortName===e}));a&&n.push(a)}})),n):n},v=function(){var t=(0,a.Z)((function(t){var e,n,a,r=arguments;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return e=r.length>1&&void 0!==r[1]&&r[1],[4,g({lat:t.lat,lon:t.lon,stacked:e})];case 1:return[2,null===(a=s.sent())||void 0===a||null===(n=a.mapResults)||void 0===n?void 0:n.map((function(t){return(0,i.Z)((0,o.Z)({},t),{id:t.dealIid,images:[t.image],urlPath:t.urlPath})}))]}}))}));return function(e){return t.apply(this,arguments)}}(),b=function(t){var e="bottomRightLat=49.639&bottomRightLon=1.795&topLeftLat=58.228&topLeftLon=-6.444";switch(t){case"activities-entertainment":return"catpage=true&categories=activities&categories=entertainment";case"beauty":return"catpage=true&categories=beauty";case"health-fitness":return"catpage=true&categories=healthcare";case"restaurants-food":return"catpage=true&categories=restaurantandfood";case"uk-city-breaks":return"catpage=true&categories=ukcitybreaks&".concat(e);case"uk-seaside":return"catpage=true&categories=ukseaside&".concat(e);case"spas-country-house":return"catpage=true&categories=spascountryhouse&".concat(e);default:return""}}},80447035:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSP:function(){return D},default:function(){return O}});var a=n(6147568),o=n(40626042),i=n(84269396),r=n(97197582),s=n(36785893),c=n(71960357),u=n.n(c),l=n(14811163),d=n(70667294),p=n(30811768),f=n(42124010),h=n(97393238),m=n(78505152),g=n.n(m)()((function(){return Promise.all([n.e(97354931),n.e(53029269),n.e(37710615),n.e(17201216),n.e(37285506),n.e(17129238),n.e(50956024),n.e(77059039),n.e(22094942),n.e(41596907),n.e(68391033),n.e(26446066),n.e(21991103),n.e(59308216),n.e(63172673),n.e(70446129),n.e(43751779),n.e(86790320),n.e(53796052),n.e(41269965),n.e(17001268),n.e(99020692)]).then(n.bind(n,29793916))}),{loadableGenerated:{webpack:function(){return[29793916]}},ssr:!1}),L=n(32051436),v=n(9667814),b=n(98693967),_=n.n(b),P=n(36014416),y=n(58123997),E=n(84111610),S=n(11811102),x=n(36255158),R=n(19952421),w=function(){var t=(0,P.v9)((function(t){return t.locations.location})),e=(0,d.useContext)(x.ZP),n=(0,l.useRouter)(),a=(0,d.useState)(!1),o=a[0],i=a[1],r=function(){i(!1)},c=function(){i(!0)},p=(0,E.Ls)(t);return(0,d.useEffect)((function(){n.events.on("routeChangeStart",(function(){i(!1)}))}),[n]),(0,S.nI)()?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:u().dynamic([["437dd18bbcf66167",[e.colors.primary]]])+" "+(_()("footer-wrapper",{"footer-wrapper--fixed":!0})||""),children:[(0,s.jsxs)("div",{className:u().dynamic([["437dd18bbcf66167",[e.colors.primary]]])+" "+"pagination ".concat(o?"pagination-expanded":"pagination-collapsed"),children:[!
1o&&(0,s.jsxs)("div",{onClick:function(){return c()},onKeyDown:function(){return c()},role:"button",tabIndex:0,className:u().dynamic([["437dd18bbcf66167",[e.colors.primary]]])+" pagination-side",children:[y.AF,(0,s.jsx)(v.G,{className:"chevron",icon:L.gc2,title:y.AF})]}),o&&(0,s.jsxs)("div",{onClick:function(){r()},onKeyDown:function(){r()},role:"button",tabIndex:0,className:u().dynamic([["437dd18bbcf66167",[e.colors.primary]]])+" pagination-side",children:[y.dp,(0,s.jsx)(v.G,{className:"chevron",icon:L.onQ,title:"Hide Footer"})]})]}),o&&(0,s.jsx)("div",{className:u().dynamic([["437dd18bbcf66167",[e.colors.primary]]])+" footer",children:(0,s.jsx)(R.Z,{isSecurePage:!1,locationShortName:p,site:"thingstodo"})})]}),(0,s.jsx)(u(),{id:"437dd18bbcf66167",dynamic:[e.colors.primary],children:".footer-wrapper.__jsx-style-dynamic-selector{background-color:#e8e8e8;width:100%;z-index:2000}.footer-wrapper--fixed.__jsx-style-dynamic-selector{bottom:0;left:0;position:fixed;z-index:2001}.pagination.__jsx-style-dynamic-selector{-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;background-color:#e8e8e8;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:60px;padding:10px;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around;width:100%;z-index:1001}.pagination-side.__jsx-style-dynamic-selector{cursor:pointer}.chevron{color:".concat(e.colors.primary,";cursor:pointer;margin:0 10px;font-size:48px;vertical-align:middle}.footer.__jsx-style-dynamic-selector .footer{min-height:300px}")})]}):null},A=n(3353106),k=n(64809790),j=n(31010253),I=n(84045697),M=n.n(I),F=n(84979601),T=n(37842926),N=n(42264315),Z=n(78385758),C=function(t){var e=t.children,n=t.countdown,a=t.title,o=t.HeaderComponent,i=(0,l.useRouter)(),r=(0,P.I0)(),c=(0,S.OV)(),u=(0,j.Z)((0,P.v9)((function(t){return[t.user]})),1)[0],p=(0,d.useState)(!1),f=p[0],m=p[1];(0,d.useEffect)((function(){m((0,S.UM)())}),[c]),(0,d.useEffect)((function(){u.isAuthenticated||(0,N.qP)(i.asPath),r((0,Z.O6)(u,h.BB.DEALS_LAYOUT))}),[u.isAuthenticated,r,i]);var g=o||F.Z;return(0,s.jsxs)(s.Fragment,{children:[!f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(T.Z,{title:a}),(0,s.jsx)(g,{countdown:n,path:i.asPath})]}),(0,s.jsx)("main",{className:"app",id:"main-view",children:e})]})};C.propTypes={children:M().node,countdown:M().oneOfType([M().string,M().bool]),HeaderComponent:M().elementType,title:M().string},C.defaultProps={children:null,title:""},C.layoutKey="MapViewLayout";var z=function(){var t=(0,S.OV)(),e=(0,d.useState)((0,S.UM)()),n=e[0],c=e[1],m=(0,d.useState)(!1),L=m[0],v=m[1],b=(0,d.useState)(!1),_=b[0],P=b[1],y=(0,d.useState)(!1),E=y[0],x=y[1],R=(0,d.useState)(!1),j=R[0],I=R[1],M=(0,d.useState)(!1),F=M[0],T=M[1],N=(0,d.useState)([]),Z=N[0],C=N[1],z=(0,d.useState)([]),D=z[0],O=z[1],V=(0,d.useState)([]),U=V[0],X=V[1],B=(0,d.useState)([]),G=B[0],H=B[1],K=(0,d.useState)([(0,A.kp)(null!==0?0:null,h.Xi.FILTER_PRICE_MAPS,0),(0,A.kp)(null!==200?200:null,h.Xi.FILTER_PRICE_MAPS,h.Xi.FILTER_PRICE_MAPS.length-1)]),Y=K[0],q=K[1],$=(0,d.useState)(null),Q=$[0],W=$[1],J=(0,d.useState)(null),tt=J[0],et=J[1],nt=(0,d.useState)(!1),at=nt[0],ot=nt[1],it=(0,d.useState)(n?f.sc.MAP_DEALS_DEFAULT_MOBILE:f.sc.MAP_DEALS_DEFAULT),rt=it[0],st=it[1],ct=(0,l.useRouter)();return(0,d.useEffect)((function(){c((0,S.UM)())}),[t]),(0,d.useEffect)((function(){st(n?f.sc.MAP_DEALS_DEFAULT_MOBILE:f.sc.MAP_DEALS_DEFAULT)}),[n]),(0,d.useEffect)((function(){var t=function(){var t=(0,a.Z)((function(){var t,e,n,a,s,c,u,l,d,m,g,L,b,_,y,E,S,R,w,j,M,F,N,Z,z,D,V,U,B;return(0,r.__generator)(this,(function(r){switch(r.label){case 0:return v(!0),a=ct.query,s=a.categories,c=a.catpage,u=a.lat,l=a.lon,d=a.bottomRightLat,m=a.bottomRightLon,g=a.maxPrice,L=a.minPrice,b=a.topLeftLat,_=a.topLeftLon,y=a.pageSize,W(u),et(l),ot("true"===c),Array.isArray(s)?(E=s,H(s)):s?(E=[s],H([s])):(E=[],H([])),S=[(0,A.kp)(null!==L&&void 0!==L?L:null,h.Xi.FILTER_PRICE_MAPS,0),(0,A.kp)(null!==g&&void 0!==g?g:null,h.Xi.FILTER_PRICE_MAPS,h.Xi.FILTER_PRICE_MAPS.length-1)],q(S),R=f.PX,w=R.latLon.lat,j=R.latLon.lon,M=p.ZP.load(h.E9.location),u&&l?(w=u,j=l):M&&M.lat&&M.lon&&(w=M.lat,j=M.lon),F=Date.now(),[4,(0,k.$c)({bottomRightLat:d,bottomRightLon:m,categories:E,filterPrice:h.Xi.FILTER_PRICE_MAPS,lat:w,lon:j,pageSize:y||rt,sliderValues:S,topLeftLat:b,topLeftLon:_})];case 1:return N=r.sent(),Z=Date.now(),P(Z-F>f.sc.MAP_API_SLOW_TIME),x(-1===N),I(0===(null===N||void 0===N||null===(t=N.stackedLocations)||void 0===t?void 0:t.length)&&0===(null===N||void 0===N||null===(e=N.mapResults)||void 0===e?void 0:e.length)),z=setTimeout((function(){v(!1)}),1e3),D=(null===N||void 0===N?void 0:N.filters)?null===(n=null===N||void 0===N?void 0:N.filters[0])||void 0===n?void 0:n.categories.map((function(t){return{name:"".concat(t.name),shortName:t.shortName,value:t.shortName}})):[],V=D.length,D=(0,k.cS)(D,E),U=D.length,T(U>V),X(D),O((null===N||void 0===N?void 0:N.stackedLocations)||[]),B=(null===N||void 0===N?void 0:N.mapResults)?null===N||void 0===N?void 0:N.mapResults.map((function(t){return(0,i.Z)((0,o.Z)({},t),{id:t.dealIid,images:[t.image],urlPath:t.urlPath})})):[],C(B),[2,function(){clearTimeout(z)}]}}))}));return function(){return t.apply(this,arguments)}}();t()}),[ct]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g,{c
1ategoryFilters:U,centerLat:Q,centerLon:tt,isErrorApi:E,isLoadCategory:at,isLoading:L,isMissingFilter:F,isMobile:n,isNoResults:j,isSlowApi:_,pins:Z,selectedCategories:G,sliderValues:Y,stackedPins:D,updateZoom:function(t){st(n?f.sc.MAP_ZOOM_LEVEL_DEALS_MOBILE[t]:f.sc.MAP_ZOOM_LEVEL_DEALS[t])}}),(0,s.jsx)(w,{})]}),(0,s.jsx)(u(),{id:"5873751c22776b16",children:".map-container.jsx-5873751c22776b16{width:100%;height:-webkit-calc(100vh - 10rem);height:-moz-calc(100vh - 10rem);height:calc(100vh - 10rem)}"})]})};z.layout=C,z.propTypes={};var D=!0,O=z}},function(t){t.O(0,[18049774,85692888,1740179],(function(){return e=42726842,t(t.s=e);var e}));var e=t.O();_N_E=e}]);

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.