1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[132,738],{36846:function(t,n,r){var e=r(4278),o=r(84707),a=r(93172),i,u=Object.prototype.hasOwnProperty;function c(t){if(!e(t))return a(t);var n=o(t),r=[];for(var i in t)("constructor"!=i||!n&&u.call(t,i))&&r.push(i);return r}t.exports=c},93172:function(t){function n(t){var n=[];if(null!=t)for(var r in Object(t))n.push(r);return n}t.exports=n},20570:function(t,n,r){var e=r(4278),o=r(74632),a=r(12453),i="Expected a function",u=Math.max,c=Math.min;function l(t,n,r){var l,s,f,d,p,v,m=0,g=!1,h=!1,y=!0;if("function"!=typeof t)throw new TypeError(i);function b(n){var r=l,e=s;return l=s=void 0,m=n,d=t.apply(e,r)}function x(t){return m=t,p=setTimeout(w,n),g?b(t):d}function _(t){var r,e,o=n-(t-v);return h?c(o,f-(t-m)):o}function C(t){var r=t-v,e;return void 0===v||r>=n||r<0||h&&t-m>=f}function w(){var t=o();if(C(t))return j(t);p=setTimeout(w,_(t))}function j(t){return p=void 0,y&&l?b(t):(l=s=void 0,d)}function I(){void 0!==p&&clearTimeout(p),m=0,l=v=s=p=void 0}function S(){return void 0===p?d:j(o())}function k(){var t=o(),r=C(t);if(l=arguments,s=this,v=t,r){if(void 0===p)return x(v);if(h)return clearTimeout(p),p=setTimeout(w,n),b(v)}return void 0===p&&(p=setTimeout(w,n)),d}return n=a(n)||0,e(r)&&(g=!!r.leading,f=(h="maxWait"in r)?u(a(r.maxWait)||0,n):f,y="trailing"in r?!!r.trailing:y),k.cancel=I,k.flush=S,k}t.exports=l},1744:function(t,n,r){var e=r(15738),o=r(36846),a=r(1691);function i(t){return a(t)?e(t,!0):o(t)}t.exports=i},74632:function(t,n,r){var e=r(11217),o=function(){return e.Date.now()};t.exports=o},51563:function(t,n,r){"use strict";r.r(n);var e=r(8014),o=r(56168),a=r(77013),i=r(41738),u=r(6638),c=r(81047);function l(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function s(t){if(Array.isArray(t))return t}function f(t,n){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e=[],o=!0,a=!1,i,u;try{for(r=r.call(t);!(o=(i=r.next()).done)&&(e.push(i.value),!n||e.length!==n);o=!0);}catch(c){a=!0,u=c}finally{try{o||null==r.return||r.return()}finally{if(a)throw u}}return e}}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(t,n){return s(t)||f(t,n)||v(t,n)||d()}function v(t,n){if(t){if("string"===typeof t)return l(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,n):void 0}}var m="".concat("/_accommodation","/assets/images/big-marker.svg"),g="property",h=5,y=function(t){var n=t.mapId,r=t.coords,l=t.countryCode,s=(0,o.useState)(null),f=s[0],d=s[1],v=(0,o.useRef)(),h=function(){var t=p(r,2),e=t[0],o=t[1];v.current=new a.Z(n,{style:c.Xp,zoom:5,navigationControlPosition:"bottom-right"},{markerIcon:m,poiRadius:100}),v.current.setCenter({lat:o,lng:e}),v.current.addMarkers([{id:g,coord:[e,o]}]),v.current.fitBoundsToMarkers()};(0,u.y)(h),(0,o.useEffect)((function(){return function(){var t;null===(t=v.current)||void 0===t||t.destroy()}}),[]),(0,o.useEffect)((function(){v.current&&(f?(v.current.addPointOfInterest(f),v.current.fitBoundsToMarkers()):(v.current.removePointOfInterest(),v.current.fitBoundsToMarkers()))}),[f]);var y=function(t){d(t)},b={lat:parseFloat(r[1]),lng:parseFloat(r[0])};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"interactive-map__header absolute top-20 lg:top-24 left-8 z-10 w-auto",children:(0,e.jsx)(i.default,{flat:!0,boundCoords:b,pointOfInterest:f,onPlaceSelected:y,countryCode:l})}),(0,e.jsx)("div",{className:"interactive-map__map w-full rounded-2xl h-100vh-100px",id:n})]})};n.default=y},81047:function(t,n,r){"use strict";r.d(n,{Xp:function(){return e},l9:function(){return o},f6:function(){return a},yI:function(){return i},pK:function(){return u}});var e="streets-v4",o="#ffccef",a="".concat("/_accommodation","/assets/images/poi-marker.svg"),i=1e3,u=16},41738:function(t,n,r){"use strict";r.r(n),r.d(n,{default:function(){return W}});var e=r(44453),o=r.n(e),a=r(8014),i=r(56168),u=r(62044),c=r(20570),l=r.n(c),s=function(t){return t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().replace(/\s/g,"_"):""},f=function(t){return t.normalize("NFD").replace(/\p{Diacritic}/gu,"")},d=function(t,n){if(!t||!n)return{offset:0,length:0};var r=f(t).toLowerCase().indexOf(f(n).toLowerCase());return r>=0?{offset:r,length:n.length}:{offset:0,length:0}};function p(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function v(t){if(Array.isArray(t))return p(t)}function m(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function g(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(t){return v(t)||m(t)||y(t)||g()}function y(t,n){if(t){if("string"===typeof t)return p(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,n):void 0}}var b=function(t,n){var r=n&&n.length?n[0]:{offset:0,length:t.length},e=r.offset,o=r.length,a=h(t.split("")),i=t.slice(e,e+o);return a.splice(e,o,"<span>".concat(i,"</span>")),a.join("")},x,_=function(t){var n=t.structuredFormatting,r=t.onClick;return(0,a.jsxs)("li",{onClick:r,className:"places-autocomplete-suggestion",role:"button",tabIndex:0,children:[(0,a.jsx)("span",{dangerouslySetInnerHTML:{__html:b(n.main_text,n.main_text_matched_substrings)}}),n.secondary_text?", ".concat(n.secondary_text):""]})};function C(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function w(t){if(Array.isArray(t))return t}function j(t,n,r,e,o,a,i){try{var u=t[a](i),c=u.value}catch(l){return void r(l)}u.done?n(c):Promise.resolve(c).then(e,o)}function I(t){return function(){var n=this,r=arguments;
1return new Promise((function(e,o){var a=t.apply(n,r);function i(t){j(a,e,o,i,u,"next",t)}function u(t){j(a,e,o,i,u,"throw",t)}i(void 0)}))}}function S(t,n){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e=[],o=!0,a=!1,i,u;try{for(r=r.call(t);!(o=(i=r.next()).done)&&(e.push(i.value),!n||e.length!==n);o=!0);}catch(c){a=!0,u=c}finally{try{o||null==r.return||r.return()}finally{if(a)throw u}}return e}}function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(t,n){return w(t)||S(t,n)||O(t,n)||k()}function O(t,n){if(t){if("string"===typeof t)return C(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(t,n):void 0}}var E="places-autocomplete",N="https://api.maptiler.com/geocoding",T=3,L="poi,address,place,locality,neighbourhood,postal_code,region,subregion,municipality",M=function(t){var n,r=null===(n=t.context)||void 0===n?void 0:n.find((function(t){var n;return null===(n=t.id)||void 0===n?void 0:n.startsWith("place.")})),e=(null===r||void 0===r?void 0:r.text)||t.text||"";return s(e)},P=function(t){var n=Array.isArray(t.context)?t.context:[],r=function(t){var r;return null===(r=n.find((function(n){return n.text&&t(n)})))||void 0===r?void 0:r.text},e=r((function(t){var n;return null===(n=t.id)||void 0===n?void 0:n.startsWith("address.")})),o=r((function(t){return["neighbourhood","quarter"].includes(t.place_designation)})),a=r((function(t){var n;return null===(n=t.id)||void 0===n?void 0:n.startsWith("municipality.")})),i=a?void 0:r((function(t){var n;return null===(n=t.id)||void 0===n?void 0:n.startsWith("region.")})),u=function(t,n){return t.toLowerCase()===n.toLowerCase()};return[e,o,a,i].filter(Boolean).filter((function(n){return!u(n,t.text||"")})).filter((function(t,n,r){return r.findIndex((function(n){return u(n,t)}))===n})).join(" \xb7 ")},R=function(t){var n=t.countryCode,r=t.boundCoords,e=t.pointOfInterest,a=t.onPlaceSelected,u=t.lang,c=(0,i.useRef)(null),s=(0,i.useState)((null===e||void 0===e?void 0:e.name)||""),f=s[0],p=s[1],v=(0,i.useState)([]),m=v[0],g=v[1],h=(0,i.useRef)({}),y=(0,i.useRef)(null),b=(0,i.useRef)({boundCoords:r,countryCode:n,lang:u});b.current={boundCoords:r,countryCode:n,lang:u};var x=function(){g([]),h.current={}},_=(0,i.useRef)(l()(function(){var t=I(o().mark((function t(n){var r,e,a,i,u,c,l,s,f,p,v,m,_;return o().wrap((function t(o){for(;;)switch(o.prev=o.next){case 0:if(r=b.current,e=r.boundCoords,a=r.countryCode,i=r.lang,u="IGOlIANu5BLpkiVybdJf"){o.next=5;break}return x(),o.abrupt("return");case 5:return o.prev=5,l=new URLSearchParams({key:u,autocomplete:"true",limit:"5",language:i,types:L}),(null===e||void 0===e?void 0:e.lat)&&(null===e||void 0===e?void 0:e.lng)&&l.set("proximity","".concat(parseFloat(e.lng),",").concat(parseFloat(e.lat))),a&&l.set("country",a),null===(c=y.current)||void 0===c||c.abort(),s=new AbortController,y.current=s,o.next=15,fetch("".concat(N,"/").concat(encodeURIComponent(n),".json?").concat(l),{signal:s.signal});case 15:if((f=o.sent).ok){o.next=18;break}throw new Error("MapTiler geocoding responded ".concat(f.status));case 18:return o.next=20,f.json();case 20:if(p=o.sent,0!==(v=(null===p||void 0===p?void 0:p.features)||[]).length){o.next=25;break}return x(),o.abrupt("return");case 25:m={},_=v.map((function(t){var r=t.place_name||t.text,e=t.text||r,o=P(t);return m[t.id]=t,{description:r,place_id:t.id,structured_formatting:{main_text:e,secondary_text:o,main_text_matched_substrings:[d(e,n)]}}})),h.current=m,g(_),o.next=36;break;case 31:if(o.prev=31,o.t0=o.catch(5),"AbortError"!==o.t0.name){o.next=35;break}return o.abrupt("return");case 35:x();case 36:case"end":return o.stop()}}),t,null,[[5,31]])})));return function(n){return t.apply(this,arguments)}}(),300)),C=function(){var t;_.current.cancel(),null===(t=y.current)||void 0===t||t.abort(),x()},w=function(t){c.current&&!c.current.contains(t.target)&&C()},j,S;return(0,i.useEffect)((function(){return document.addEventListener("click",w),function(){return document.removeEventListener("click",w)}}),[]),(0,i.useEffect)((function(){p(e?e.name:"")}),[e]),{handleInput:function(t){var n=t.target.value;p(n),n.length<3?C():_.current(n)},suggestionList:m,inputValue:f,placesRef:c,handleSelect:function(t,n){return function(){var r;if(t){var e=h.current[t],o=null===e||void 0===e||null===(r=e.geometry)||void 0===r?void 0:r.coordinates;if(o){var i=A(o,2),u=i[0],c=i[1];p(n),C(),a({placeId:t,cityId:M(e),lat:c,lng:u,name:n})}}}}}}
1,F,W=function(t){var n=t.pointOfInterest,r=t.boundCoords,e=t.countryCode,o=t.onPlaceSelected,i=t.flat,c=(0,u.Z)("common"),l=c.t,s=c.lang,f=R({boundCoords:r,countryCode:e,pointOfInterest:n,onPlaceSelected:o,lang:s}),d=f.handleInput,p=f.inputValue,v=f.suggestionList,m=f.placesRef,g=f.handleSelect;return(0,a.jsxs)("div",{className:E,"data-test":"map-search-bar",ref:m,children:[(0,a.jsxs)("div",{className:"".concat(E,"__box"),children:[(0,a.jsx)("i",{className:"u-icon-search text-[24px]"}),(0,a.jsx)("input",{className:"".concat(E,"__input ").concat(i?"".concat(E,"__input--flat"):""),value:p,onChange:d,placeholder:l("Search")}),n&&(0,a.jsx)("button",{type:"button",onClick:function(){return o(null)},className:"".concat(E,"__clear"),tabIndex:0,"aria-label":"Clear search",children:(0,a.jsx)("i",{className:"u-icon-close text-s24"})})]}),v.length?(0,a.jsx)("ul",{className:"".concat(E,"__suggestions"),"data-test":"poi-search-suggestions",children:v.map((function(t){return(0,a.jsx)(_,{structuredFormatting:t.structured_formatting,onClick:g(t.place_id,t.description)},t.place_id)}))}):null]})}}}]);
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.