1(self.webpackChunklib=self.webpackChunklib||[]).push([[4580],{4580:(e,t,a)=>{"use strict";a.r(t),a.d(t,{mapObject:()=>o});a(5243),a(9712),a(2970),a(5757);var i=a(9755);class s{constructor(e){this.options=e||{},this.cache={},this.init(),this.mapMouse=this.mapMouse.bind(this)}init(){this.initializeCache(),this.initializeEvents()}initializeCache(){this.cache.__template_text=null,this.cache.this=this}initializeEvents(){this.initTemplateText()}initTemplateText(){var e=this.getTemplateNode("{{text}}"),t=document.createElement("div");t.appendChild(e),this.cache.__template_text=t.innerHTML}mapSearch(e,t){if(""!==e&&t){var a=t.getMap(),s=t.getGeocoder();a&&s&&s.geocode(e,(e=>{if(i(".map-error").is(":visible")&&i(".map-error").hide(),e.length>0){var t=e[0];t&&(i(".map-center").is(":visible")||i(".map-center, .map-info").show(),i(".map-info").html(t.name),t.bbox?a.fitBounds(t.bbox):a.setView(t.center,17),L.Icon.Default.imagePath="/build/packs/images",L.marker(t.center).addTo(a))}else i(".map-center, .map-info").hide(""),i(".map-error").show()}),t)}}initMapSearch(e,t){var a=e.getMap(),s=e.getGeocoder();if(e&&s){var r=i("input",i(t));i(r).autocomplete({appendTo:"#".concat(i(t).attr("id")),source:(t,a)=>{s.geocode(t.term,(()=>{a(i.map(results,(e=>({value:e.name,label:e.name,bbox:e.bbox,center:e.center})))),console.info(results)}),e)},select:(e,t)=>{t.item.bbox?a.fitBounds(t.item.bbox):a.setView(t.item.center,17),L.Icon.Default.imagePath="/build/packs/images",L.marker(t.item.center).addTo(a)},delay:100,minLength:2}),i(t).on("submit",(()=>(this.mapSearch(i(r).val(),e),!1))),i(t).on("click",".map-find-button",(()=>(this.mapSearch(i(r).val(),e),!1)))}}createMapInfo(e,t){return e.html?e.html:(i.ajax({url:"/map.php",type:"GET",data:{page:"hotel",id:e.id,price:e.mr,ui:travel.options.uuid}}).done((a=>{e.html=a,this.mapMouse.call(this,t)})).fail((a=>{404!==a.status&&setTimeout((()=>{this.createMapInfo(e,t)}),1e3)})),"")}mapMouse(e){if(e&&e.marker&&e.type&&e.id&&e.event){var t=this.options,a=this.options.map;if(a){var s=a.latLngToContainerPoint(e.marker.getLatLng()),r=travel.options.page,o=i("#map-info-win");if(o.length||(o=i("<div />").attr("id","map-info-win")).appendTo("map"==r?".js-map-cont":"body"),"click"===e.event){var h=[];if("hotel"===e.type){var l=t.hotels.list[e.id];h=this.createMapInfo(l,e)}else if("landmark"===e.type){var n=t.landmark.list[e.id];h.push('<div class="landmarkblock lm-'.concat(n.t,'"><div class="title"><h3>').concat(n.name,"</h3></div></div>"))}var c="";if(""!==(c="Array"==typeof h?h.join(""):h)){o.html(c);var d="",m="";travel.isMobile()?(d="50%",m="50%"):(d=Math.floor(s.y)+"px",m=Math.floor(s.x-o.width()/2)+"px"),o.css({top:d,left:m}).show()}}}}}mapClosePopup(){i("#map-info-win").hide()}getTemplateNode(e,t){var a;a||((a=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("text-anchor","middle"),a.setAttribute("font-weight","bold"),a.setAttribute("font-family","Verdana, sans-serif"),a.setAttribute("font-size","12"),a.setAttribute("stroke-opacity","null"),a.setAttribute("stroke-width","0"),a.setAttribute("stroke","#000"),a.setAttribute("fill","#ffffff"),a.setAttribute("width","10"),a.setAttribute("x","18"),a.setAttribute("y","17"));var s=a.cloneNode(!0);return s.appendChild(document.createTextNode(e)),i.each(t||{},((e,t)=>{s.setAttribute(e,t)})),s}getTextWidth(e){var t=0,a=e.length;if(0===a)return 0;if(0!==t)return t*a;var s=i("#marker_svg");s.length||(i('<svg id="marker_svg" />').appendTo(i("body")),s=i("#marker_svg"));var r=this.getTemplateNode("0",{id:"svg_text"});return s.empty()[0].appendChild(r),t=parseInt(r.getBBox().width),s.detach(),t*a}getSvg(e,t){var a=t||"#004d8c",i=this.getTextWidth(e);return'<svg width="'+(i+22)+'" height="34" xmlns="http://www.w3.org/2000/svg"> <defs> <filter id="svg_2_blur"> <feGaussianBlur stdDeviation="0" in="SourceGraphic"/> </filter> <filter id="svg_3_blur"> <feGaussianBlur stdDeviation="0" in="SourceGraphic"/> </filter> </defs> <g> <title>background</title> <rect x="-1" y="-1" width="64" height="36" id="canvas_background" fill="none"/> </g> <g>
1 <rect filter="url(#svg_2_blur)" rx="5" stroke="#000" height="24.999992" width="'+(i+18)+'" y="0.750002" x="0.821444" stroke-width="0" fill= "'+a+'" /> <path filter="url(#svg_3_blur)" stroke="#000" transform="rotate(-180 0,27.528299331665036) " id="svg_path" d="m-'+(i/2+11+6)+'.678581,33.956869l7.499997,-12.85714l7.499997,12.85714l-14.999995,0z" stroke-opacity="null" stroke-width="0" fill= "'+a+'"/> '+this.cache.__template_text.replace("{{text}}",e).replace('x="18"','x="'+(i+18)/2+'"')+" </g> </svg>"}getPriceIcon(e){var t=travel.options.currency+" "+e,a=this.getSvg(t);return{url:"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(a)}}getCustomMarker(e,t,a){var i=[];if(a)return e;var s=t.mr;0===s&&(s=100+Math.floor(50*Math.random()),s=Math.floor(s/travel.options.currencyRate),t.mr=s);var r="hotel-svg-"+s,o=i[r];if(o)return o;var h=this.getPriceIcon(s);return h._key=r,i[r]=h,h}}var r=a(9755);var o=new class{constructor(e){this.options=e||{},this.cache={},this.init(),this.mapAdd=new s(this.cache)}run(){this.setting={type:0,version:"1",language:{id:"1",code:"en"},labels:{hotels:"Hotels",landmarks:"Landmarks",book_now:"Book now"},containers:{map:"#map-container"},provider:0,urls:{list:"map_list",hotels_avail:"/?page=map_avail",hotel_avail:"/?page=map_havail",hotelinfo:"/?page=map_hotel&id=[ID]",hotel:"/?page=hotel&hotelID=[ID]&prevurl=1"},markers:{normal:{class:"mh-marker-empty",center_offset_x:5,center_offset_y:5},advanced:{class:"mh-marker",center_offset_x:19,center_offset_y:37},landmark:{class:"mh-marker",center_offset_x:19,center_offset_y:37},adv_landmark:{class:"mh-marker",center_offset_x:19,center_offset_y:69}},orderby:0,orderhow:1,zoom:2,history:0,history_prefix:"map",timer:500,limit:10,max_pages:11,callbacks:{},avail:{},ajax_traditional:!0,min_zoom:12};var e={containers:{map:"#map-container"},debug:1,provider:travel.options.mapParameters.mapProvider,ajax_traditional:!1,disable_load_hotels:!0,disable_load_landmarks:!0,center:{lat:travel.options.mapParameters.hotelLatitude,lon:travel.options.mapParameters.hotelLongitude,zoom:12},history:1,callbacks:{mouse:this.mapAdd.mapMouse,click:this.mapAdd.mapClosePopup,center_changed:this.mapAdd.mapClosePopup,zoom_changed:this.mapAdd.mapClosePopup},language:{id:travel.options.lang_id,code:travel.options.code}};"object"==typeof this.options&&r.extend(this.setting,e)}init(){this.initializeCache()}initializeCache(){this.cache.hotels={},this.cache.hotels.list={},this.cache.hotels.cids=[],this.cache.hotels.vids=[],this.cache.hotels.visiable=[],this.cache.hotels.markers=[],this.cache.landmarks={},this.cache.landmarks.list={},this.cache.landmarks.cids=[],this.cache.landmarks.markers=[],this.cache.loadedCodes={},this.cache.markerImages={},this.cache.mapCenter=new L.latLng(0,0),travel.options.center&&(this.cache.mapCenter=new L.latLng(travel.options.center.lat,travel.options.center.lng));r(".js-map").each((function(){var e=r(this);if(!e.hasClass("js-map-ready")){e.addClass("js-map-ready");var t=e.data("type");t||(t="static");var a=e.data("zoom");a||(a=15);e.data("width");var i=e.data("height");if(e.data("map")&&(t="dynamic"),"window"==i){var s=r(window).height();e.css({height:s+"px"})}if("undefined"!=typeof L){var o={};"static"==t&&(o={dragging:!1,touchZoom:!1,scrollWheelZoom:!1,doubleClickZoom:!1,boxZoom:!1,zoomControl:!1,attributionControl:!1});var h,l=L.map(e.get(0),o);l.setView([travel.options.mapParameters.hotelLatitude,travel.options.mapParameters.hotelLongitude],a),"https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',h=L.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",{attribution:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',maxZoom:18}),l.addLayer(h),l.scrollWheelZoom.disable(),window.travel.city_map=l,r(document).on("page-map-active page-location-active",(function(){l.invali
1dateSize()}))}}})),this.cache.map=window.travel.city_map,this.cache.geocoder=new L.Control.Geocoder.Nominatim,this.cache.cluster=null,this.cache.helper=null,this.cache.timeoutHandler=null,r(".leaflet-control-attribution").remove()}initializeEvents(){this.initMarkerImages(),this.initMapEvent()}initMapEvent(){this.cache.map.on("moveend",(()=>{this.setValue("center_changed",1),this.trigger("center_changed",""),window.clearTimeout(this.cache.timeoutHandler),this.cache.timeoutHandler=window.setTimeout((()=>{this.cache.map.fire("idle")}),500)})),this.cache.map.on("zoomend",(()=>{this.setValue("zoom_changed",1),this.trigger("zoom_changed","")})),this.cache.map.on("idle",(()=>{this.getValue("ready_load")||(this.trigger("ready"),this.setValue("ready_load",1));var e=this.getValue("zoom_changed"),t=this.getValue("center_changed");(e||t)&&(this.updateHash(),this.updateMap(),this.trigger("map_idle"),this.trigger("map_changed"),e&&(this.trigger("zoom_changed"),this.updateMarkers()),t&&this.trigger("center_chenged"))})),this.cache.map.on("click",(()=>{this.trigger("click","")})),this.cache.map.setView(this.cache.mapCenter),this.setValue("zoom_changed",1),window.clearTimeout(this.cache.timeoutHandler),this.cache.timeoutHandler=window.setTimeout((()=>{this.cache.map.fire("idle")})),this.parseHash(),this.trigger("map_loaded"),r.ajaxSettings.traditional=this.setting.ajax_traditional}initMarkerImages(){var e=["","sm"],t=["other","page","current"];for(var a in e){var i=e[a];for(var s in t){var r=t[s],o="hotel";""!==r&&(o+="-".concat(r)),""!==i&&(o+="-".concat(i));var h="/images/";this.setting.images_prefix&&(h+=this.setting.images_prefix,h+="/"),h+="map/".concat(o,".png");var l=L.point(5,5);""===i&&(l=L.point(10,20));var n=L.icon({iconUrl:h,iconAnchor:l});n._key=o,this.cache.markerImages[o]=n}}for(var c in t=["airport","business","museum","railway","sm","attraction","general","park","sport","citycenter","metro","food"]){var d=t[c],m="landmark";""!==d&&(m+="-".concat(d));var p="/images/";this.setting.images_prefix&&(p+=this.setting.images_prefix,p+="/"),p+="map/".concat(m,".png");var g=L.point(10,20),u=L.icon({iconUrl:p,iconAnchor:g});u._key=m,this.cache.markerImages[m]=u}}getGeocoders(e,t,a,i,s){if(!(e<-90||e>90||a<-90||a>90||t<-180||t>180||i<-180||i>180))if(e+=90,a+=90,(i+=180)<(t+=180))this.getGeocoders(e-90,t-180,a-90,180,s),this.getGeocoders(e-90,-180,a-90,i-180,s);else{var r=Math.floor(20*e),o=Math.floor(20*t),h=Math.floor(20*a),l=Math.floor(20*i);if((h-r)*(l-o)>1e4)return;for(var n=r;n<=h;++n)for(var c=o;c<=l;++c){var d=360*n*20+c;s.push(d)}}}getGeocoder(){return this.cache.geocoder}getMap(){return void 0!==this.cache.map?null:this.cache.map}updateHash(){if(this.setting.history){var e=this.setting.history_prefix,t=this.cache.map.getCenter();e+="-[".concat(t.lat,",").concat(t.lng,",").concat(this.cache.map.getZoom(),"]"),void 0!==this.setting.containers.searchtext&&r(this.setting.containers.searchtext).size()&&!r(this.setting.containers.searchtext).hasClass("default-value")&&""!==r(this.setting.containers.searchtext).val()&&(e+="-s[",e+=r(this.setting.containers.searchtext).val(),e+="]"),window.location.hash=e}}parseHash(){if(this.setting.history){var e=decodeURI(window.location.hash),t=this.setting.history_prefix+"-[",a=e.indexOf(t);if(!(a<0)){var i=e.indexOf("]",a+t.length+1);if(!(i<0)){var s=e.substring(a+t.length,i);if(!((a=s.indexOf(","))<0)){var o=s.substring(0,a),h=s.indexOf(",",a+1);if(!(h<0)){var l=s.substring(a+1,h),n=Math.floor(s.substring(h+1,s.length)),c=new L.latLng(o,l);if(this.cache.map.setView(c,n),!((a=e.indexOf("-s[",i+1))<0||(i=e.indexOf("]",a+1))<0)){var d=e.substring(a+3,i);void 0!==this.setting.containers.searchtext&&(r(this.setting.containers.searchtext).removeClass("default-value").attr("val",r(this).val()).val(d),this.updateHash())}}}}}}}resize(){this.cache.map.fire("resize")}trigger(e,t){var a=300;this._triggerTimers||(this._triggerTimers=[]);var i=this._triggerTimers[e];i&&clearTimeout(i),a=50,this._triggerTimers[e]=setTimeout((()=>{this.triggerReal(e,t)}),a)}triggerReal(e,t){"function"==typeof this.setting.callbacks[e]&&this.setting.callbacks[e].call(this,t)}processMarkerMouse(e,t,a){var i=1e7;"click"===a||("mouseover"===a?((!e.options.zIndexOffset||e.options.zIndexOffset<i)&&(e.options._old_zindex=e.options.zIndexOffset,e.setZIndexOffset(10000100)),this.trigger("".concat(t,"_mouseover"),e.options._id)):(e.setZIndexOffset(e.options._old_zindex),this.trigger("".concat(t,"_mouseout"),e.options._id))),this.trigger("mouse",{marker:e,event:a,id:e.options._id,type:t})}updateMarkers(){var e=this,t=this.cache.map,a=t.getZoom(),i=0,s=[],r=this.getValue("selected_hotel"),o=this.cache.hotels.vids.length;for(var h in this.cache.hotels.list){var l=this.cache.hotels.list[h];l.mtype="other",r&&l.id===r&&!l.selected&&(l.mtype="current"),l.visible=o?0:1}for(var n=0;n<o;++n){var c=this.cache.hotels.list[this.cache.hotels.visiable[n]];c&&(c.visible=1)}if(this.cache.hotels.cids)for(var d=this.cache.hotels.cids.length,m=0;m<d;++m){var p=this.cache.hotels.list[this.cache.hotels.cids[m]];void 0!==p&&("other"===p.mtype&&(p.mtype="page"))}var g=this.getValue("custom_marker");for(var u in this.cache.hotels.list){var v=this.cache.hotels.list[u],f="hotel-".concat(v.mtype),_=this.cache.markerImages[f];if(i&&"current"!==v.mtype&&(f+="-sm"),"function"==typeof g){var k=g(_,v,i);if(f=k._key,!i){var b=L.point((this.mapAdd.getTextWidth("$".concat(v.mr))+22)/2,34);
1(_=L.icon({iconUrl:k.url,iconAnchor:b}))._key=f}}if(void 0===v.marker||null===v.marker){if("NULL"===v.lat||"NULL"===v.lng)continue;var x=L.latLng(v.lat,v.lng),y=L.marker(x,{icon:_,_id:v.id,zIndexOffset:Math.round(Math.log(10*(v.r+1)))});y._show=v.visible,v.marker=y,y.on("click",(function(){e.processMarkerMouse(this,"hotel","click")})),y.on("mouseover",(function(){e.processMarkerMouse(this,"hotel","mouseover")})),y.on("mouseout",(function(){e.processMarkerMouse(this,"hotel","mouseout")}))}else{v.marker._show=v.visible,v.marker.options.icon._key!==f&&v.marker.setIcon(_)}v.marker._show&&s.push(v.marker)}null===this.cache.cluster&&(this.cache.cluster=L.markerClusterGroup({chunkedLoading:!0}),t.addLayer(this.cache.cluster)),this.cache.cluster.clearLayers();for(var w=0;w<s.length;++w)this.cache.cluster.addLayer(s[w])}fitView(){var e=[];for(var t in this.cache.hotels.list){var a=this.cache.hotels.list[t];a.marker._show&&e.push(a.marker)}if(e.length){var i=L.featureGroup(e).getBounds();this.cache.map.fitBounds(i)}}clearAll(){var e=this.cache.cluster,t=this.cache.hotels.markers.length,a=this.cache.landmarks.markers.length;e&&e.clearLayers();for(var i=0;i<t;++i)this.cache.hotels.markers[i]&&(this.cache.map.removeLayer(hotels.markers[i]),this.cache.hotels.markers[i]=null);for(var s=0;s<a;++s)this.cache.landmarks.markers[s]&&(this.cache.map.removeLayer(landmarks.markers[s]),this.cache.landmarks.markers[s]=null);this.cache.landmarks.markers=[],this.cache.hotels.codes={},this.cache.landmarks.codes={}}getValue(e){return void 0===this.setting[e]?null:this.setting[e]}setValue(e,t){this.setting[e]=t}updateMap(){if(!this.getValue("disable_load_hotels")||!this.getValue("disable_load_landmarks")){var e=this.getValue("load_timer"),t=this.getValue("load_xhr");e&&(clearTimeout(e),this.setValue("load_timer",null)),t&&(t.abort(),this.setValue("load_xhr",null));var a=this.cache.map.getZoom(),i=this.getValue("min_zoom"),s=this.getValue("brand");if(!s||!this.getValue("brand_loaded"))if(a<i&&!s)this.clearAll();else{var o=this.cache.map.getBounds();
1if(void 0!==o&&o){var h=o.getSouthWest(),l=o.getNorthEast(),n=[];s||this.getGeocoders(h.lat,h.lng,l.lat,l.lng,n);for(var c=[],d=0;d<n.length;++d){var m=n[d];this.cache.loadedCodes[m]||c.push(m)}if(c.length||s){var p=this.getValue("urls").list,g=(new Date,{shl:this.getValue("disable_load_landmarks")?0:1,shh:this.getValue("disable_load_hotels")?0:1,ll:500,r:data.getTime(),ui:travel.options.uuid});s?(this.setValue("brand_loaded",!0),g.brand=this.setting.brand):g.geocodes=c.join(","),this.setValue("load_xhr",r.ajax({url:p,data:g,type:"POST",dataType:"json",error:(e,t,a)=>{},success:(e,t)=>{if(void 0!==e){for(var a=c.length,i=0;i<a;++i){var s=c[i];this.cache.loadedCodes[s]=1}if(!this.getValue("disable_load_hotels")&&void 0!==e.hotels)for(var r=e.hotels.length,o=0;o<r;++o){var h=e.hotels[o];this.cache.hotels.list[h.id]=h,this.cache.hotels.cids.push(h.id)}if(!this.getValue("disable_load_landmarks")&&void 0!==e.landmarks)for(var l=e.landmarks.length,n=0;n<l;++n){var d=e.landmarks[n];this.cache.landmarks.list[d.id]=d,this.cache.landmarks.cids.push(d.id)}this.updateMarkers(),this.setValue("load_xhr",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.