PageSourceSearch

https://viamala.ch/layout/3509.83062fe1.js

js viamala.ch collected 2026-10-02 11:15:41 UTC 13,330 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3509],{23509:(e,o,n)=>{n.r(o),n.d(o,{POPUP_MAX_WIDTH:()=>u,POPUP_MIN_WIDTH:()=>s,addLayersToMap:()=>w,createGeoJsonLayer:()=>v,createKmlLayer:()=>b,createLeafletMap:()=>y,createMarkerCluster:()=>L,createMarkerLayer:()=>f,getGeolocationPosition:()=>m,initLeafletMap:()=>P,searchNominatim:()=>d});var t=n(53481),r=n.n(t),i=(n(39389),n(72189),n(56233),n(68980)),a=n(71272),l={en:{loading:"Loading…",markerAriaLabel:"{title} – show on map",routingHeadline:"Route planner",routingPlaceholder:"Enter your location…",routingNoResults:"No results found.",routingError:"The routing could not be computed. Please try again later.",geolocationErrorUnavailable:"Geolocation is not supported by your browser.",geolocationErrorPermissionDenied:"Location sharing is disabled. Please enable sharing in your browser settings.",geolocationErrorPositionUnavailable:"Location information is currently unavailable. Please try again later.",geolocationErrorTimeout:"The request for location information took too long. Please check your connection and try again."},de:{loading:"Laden…",markerAriaLabel:"{title} – auf Karte anzeigen",routingHeadline:"Routenplaner",routingPlaceholder:"Geben Sie Ihren Standort ein…",routingNoResults:"Keine Ergebnisse gefunden.",routingError:"Die Route konnte nicht berechnet werden. Bitte versuchen Sie es später erneut.",geolocationErrorUnavailable:"Geolokalisierung wird von Ihrem Browser nicht unterstützt.",geolocationErrorPermissionDenied:"Die Standortfreigabe ist deaktiviert. Bitte aktivieren Sie die Freigabe in Ihren Browsereinstellungen.",geolocationErrorPositionUnavailable:"Standortinformationen sind derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",geolocationErrorTimeout:"Der Abruf der Standortinformationen hat zu lange gedauert. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut."},fr:{loading:"Chargement…",markerAriaLabel:"{title} – afficher sur la carte",routingHeadline:"Planificateur d’itinéraire",routingPlaceholder:"Entrez votre emplacement…",routingNoResults:"Aucun résultat trouvé.",routingError:"L’itinéraire n’a pas pu être calculé. Veuillez réessayer plus tard.",geolocationErrorUnavailable:"La géolocalisation n’est pas prise en charge par votre navigateur.",geolocationErrorPermissionDenied:"Le partage de localisation est désactivé. Veuillez activer le partage dans les paramètres de votre navigateur.",geolocationErrorPositionUnavailable:"Les informations de localisation sont actuellement indisponibles. Veuillez réessayer plus tard.",geolocationErrorTimeout:"La demande d’informations de localisation a pris trop de temps. Veuillez vérifier votre connexion et réessayer."},it:{loading:"Caricamento…",routingHeadline:"Pianificatore di percorsi",routingPlaceholder:"Inserisci la tua posizione…",routingNoResults:"Nessun risultato trovato.",routingError:"Il percorso non può essere calcolato. Riprova più tardi.",geolocationErrorUnavailable:"La geolocalizzazione non è supportata dal tuo browser.",geolocationErrorPermissionDenied:"La condivisione della posizione è disattivata. Attiva la condivisione nelle impostazioni del browser.",geolocationErrorPositionUnavailable:"Le informazioni sulla posizione non sono attualmente disponibili. Riprova più tardi.",geolocationErrorTimeout:"La richiesta di informazioni sulla posizione ha impiegato troppo tempo. Controlla la tua connessione e riprova."}};function c(e){return l[document.documentElement.lang.substring(0,2)][e]||l.en[e]||e}var s=220,u=390;function d(e){var o=new window.URL("https://nominatim.openstreetmap.org/search"),n=new window.URLSearchParams({"accept-language":document.documentElement.lang,countrycodes:"ch,li",format:"json",layer:"address",limit:5,q:e});return o.search=n.toString(),fetch(o.toString(),{method:"GET",headers:{Accept:"application/json"}}).then((function(e){return e.json()})).then((function(e){return new Promise((function(o){return o(e.filter((function(e){return"state"!==e.addresstype})))}))}))}
1function m(){return new Promise((function(e,o){window.navigator.geolocation?window.navigator.geolocation.getCurrentPosition((function(o){return e(o)}),(function(e){switch(e.code){case e.PERMISSION_DENIED:o(c("geolocationErrorPermissionDenied"));break;case e.POSITION_UNAVAILABLE:o(c("geolocationErrorPositionUnavailable"));break;case e.TIMEOUT:o(c("geolocationErrorTimeout"));break;default:o(c("geolocationErrorUnavailable"))}})):o()}))}function g(e,o){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",t=null,i=null,a=function(){return k.disabled=""===b.value},l=function(n,a,l){t&&o.removeLayer(t),i&&o.removeLayer(i),fetch("https://router.project-osrm.org/route/v1/driving/".concat(e.coordinates[1],",").concat(e.coordinates[0],";").concat(a,",").concat(n,"?geometries=geojson")).then((function(e){return e.json()})).then((function(c){var s=null;if("icon"===e.markerType){var u=e.markerIconSvg.match(/fill="([^"]+)"/);u&&(s=u[1])}t=f({coordinates:[n,a],markerType:"geolocation",markerSize:e.markerSize||null,markerAnchor:e.markerSize?[e.markerSize[0]/2,e.markerSize[1]/2]:null,markerColor:s},o).addTo(o),l&&t.bindTooltip(r().tooltip({content:l})),i=r().geoJSON(c.routes[0].geometry,{style:{color:s}}).addTo(o),o.fitBounds(i.getBounds())})).catch((function(){u(c("routingError"))}))},s=function(){b.value&&(k.classList.add("loading"),d(b.value).then((function(e){if(k.classList.remove("loading"),0===e.length)throw new Error("No results");var o=e[0];b.value=o.display_name,v.classList.add("d-none"),l(o.lat,o.lon,o.display_name)})).catch((function(){u(c("routingNoResults")),b.focus()})))},u=function(e){v.classList.remove("d-none"),v.textContent=e},g=r().DomUtil.create("div","leaflet-routing-popup");r().DomEvent.disableClickPropagation(g),r().DomUtil.create("div","h6",g).textContent=n?"".concat(c("routingHeadline"),": ").concat(n):c("routingHeadline");var p=r().DomUtil.create("div","input-group",g),v=r().DomUtil.create("div","alert alert-info mt-1 mb-0 d-none",g);if(window.navigator.geolocation){var h=r().DomUtil.create("button","btn btn-icon btn-outline-secondary",p);h.type="button",h.innerHTML='<svg class="of-icon" width="16" height="16" viewBox="0 0 16 16">\n<path d="M8 0a.5.5 0 0 1 .5.5v.518A7 7 0 0 1 14.982 7.5h.518a.5.5 0 0 1 0 1h-.518A7 7 0 0 1 8.5 14.982v.518a.5.5 0 0 1-1 0v-.518A7 7 0 0 1 1.018 8.5H.5a.5.5 0 0 1 0-1h.518A7 7 0 0 1 7.5 1.018V.5A.5.5 0 0 1 8 0m-.5 2.02A6 6 0 0 0 2.02 7.5h1.005A5 5 0 0 1 7.5 3.025zm1 1.005A5 5 0 0 1 12.975 7.5h1.005A6 6 0 0 0 8.5 2.02zM12.975 8.5A5 5 0 0 1 8.5 12.975v1.005a6 6 0 0 0 5.48-5.48zM7.5 12.975A5 5 0 0 1 3.025 8.5H2.02a6 6 0 0 0 5.48 5.48zM10 8a2 2 0 1 0-4 0 2 2 0 0 0 4 0"/>\n</svg>',r().DomEvent.on(h,"click",(function(){m().then((function(e){v.classList.add("d-none"),b.value="".concat(e.coords.latitude,",").concat(e.coords.longitude),l(e.coords.latitude,e.coords.longitude,"".concat(e.coords.latitude,",").concat(e.coords.longitude))}),(function(e){return u(e)}))}))}var b=r().DomUtil.create("input","form-control",p);b.placeholder=c("routingPlaceholder"),b.type="search",r().DomEvent.on(b,"keyup",(function(e){a(),"Enter"===e.key&&s()}));var k=r().DomUtil.create("button","btn btn-icon btn-outline-secondary loader",p);return k.type="button",k.innerHTML='<span class="loader-content">\n<svg class="of-icon" width="16" height="16" fill="#404040" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg>\n</span>\n<span class="loader-indicator spinner-border spinner-border-em" role="status">\n<span class="visually-hidden">'.concat(c("loading"),"</span>\n</span>"),r().DomEvent.on(k,"click",(function(){return s()})),a(),r().popup({content:g})}function p(){return r().icon({iconSize:[25,41],iconAnchor:[10,41],popupAnchor:[2,-40],iconUrl:a,shadowUrl:i})}function f(e,o){var n={};switch(e.markerType){case"geolocation":n.icon=r().divIcon({className:"leaflet-pulsing-icon",html:'<div style="--marker-color:'.concat(e.markerColor||"#38f",'"><span></span><span></span><span></span><span></span></div>'),markerSize:e.markerSize||[32,32],markerAnchor:e.markerAnchor||[16,16]});break;case"html":n.icon=r().divIcon({className:e.className,html:e.html,iconSize:e.markerSize,iconAnchor:e.markerAnchor});break;case"icon":n.icon=r().icon({iconUrl:"data:image/svg+xml;charset=UTF-8;base64,".concat(window.btoa(e.markerIconSvg)),iconSize:e.markerSize});break;case"image":n.icon=r().icon({iconUrl:e.markerImage,iconSize:e.markerSize,iconAnchor:e.markerAnchor});break;case"regular":n.icon=p()}var t=r().marker(e.coordinates,n),i={minWidth:s,maxWidth:u};switch(e.onClickAction){case"url":t.on("click",(function(){e.newWindow?window.open(e.url,"_blank"):window.location=e.url}));break;case"tooltip":var a=document.querySelector('[data-map-marker="'.concat(e.id,'"]'));
1if(a&&(t.bindPopup(a.innerHTML,i),e.routing)){var l=new Map,d=t.getPopup();t.on("popupopen",(function(){d.getElement().querySelectorAll("[data-map-marker-routing-link]").forEach((function(n){n.addEventListener("click",(function(r){r.preventDefault(),l.has(t)||l.set(t,g(e,o,n.dataset.mapMarkerRoutingLink)),t.bindPopup(l.get(t),i).openPopup()}))}))})),t.on("popupclose",(function(){t.bindPopup(d,i)}))}break;default:e.routing&&t.bindPopup(g(e,o),i)}return e.name&&t.on("add",(function(o){return o.target._icon.ariaLabel=c("markerAriaLabel").replace("{title}",e.name)})),t}function v(e,o){var n={weight:e.lineWidth||3};return e.lineColor&&(n.color="#".concat(e.lineColor)),e.lineOpacity&&(n.opacity=e.lineOpacity/100),e.fillColor&&(n.fill=!0,n.fillColor="#".concat(e.fillColor),n.fillOpacity=e.fillOpacity/100),e.hasOwnProperty("onEachFeature")&&(n.onEachFeature=e.onEachFeature),n.pointToLayer=function(e,o){return r().marker(o,{icon:p()})},r().geoJSON(e.geoJson,n).addTo(o)}function h(e,o){var n=0,t=1/0;return e.forEach((function(e,i){var a=r().latLng([e[1],e[0]]).distanceTo(o);a<t&&(t=a,n=i)})),n}function b(e,o){n.e(8357).then(n.t.bind(n,98357,23)).then((function(){fetch(e.kmlUrl).then((function(e){return e.text()})).then((function(e){var n=new(r().KML)((new DOMParser).parseFromString(e,"text/xml"));o.addLayer(n),o.fitBounds(n.getBounds())}))}))}function k(e,o){if(0!==o.length&&(1!==o.length||o[0]instanceof r().GeoJSON)){var n=r().latLngBounds();o.forEach((function(e){e instanceof r().Marker?n.extend(e.getLatLng()):e instanceof r().GeoJSON&&n.extend(e.getBounds())})),e.fitBounds(n,{padding:[20,20]})}}function E(e,o,n,t){e.contains(o)&&(n.invalidateSize(),o.dataset.lightboxInitialized||(o.dataset.lightboxInitialized="1",k(n,t)))}function y(e,o){var n,t,i,a=r().map(e,{boxZoom:!o.disableZoom,keyboard:!o.disableZoom,scrollWheelZoom:!o.disableZoom,doubleClickZoom:!o.disableZoom,touchZoom:!o.disableZoom,maxZoom:18,zoomControl:!1}).setView(o.coordinates,o.zoom||10);return o.tiles.forEach((function(e){return r().tileLayer(e.url,{attribution:e.attributionText,maxZoom:19}).addTo(a)})),null!==(n=o.controls)&&void 0!==n&&n.includes("scale")&&function(e){r().control.scale({position:"bottomright"}).addTo(e)}(a),null!==(t=o.controls)&&void 0!==t&&t.includes("full-screen")&&function(e){r().control.fullscreen({position:"bottomright"}).addTo(e)}(a),null!==(i=o.controls)&&void 0!==i&&i.includes("zoom")&&function(e){r().control.zoom({position:"bottomright"}).addTo(e)}(a),o.customJsIdentifier&&window[o.customJsIdentifier]({L:r(),map:a}),a}function L(e){return r().markerClusterGroup({showCoverageOnHover:!1}).addTo(e)}function w(e,o){var n,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=[];return null===(n=o.layers)||void 0===n||n.forEach((function(n){switch(n.type){case"marker":var a=f(n,e);null!==t?t.addLayer(a):a.addTo(e),i.push(a);break;case"geoJson":var l=v(n,e);o.elevationProfileId&&function(e,o,n,t){var i=document.getElementById(e);if(!i)return;var a=n.geoJson.features[0].geometry.coordinates,l=r().circleMarker([a[0][1],a[0][0]],{radius:10,color:"#fff",weight:2,opacity:1,fill:!0,fillColor:n.lineColor?"#".concat(n.lineColor):"#3388ff",fillOpacity:1,interactive:!1});i.addEventListener("elevationProfileHover",(function(e){var o=e.detail.index;l.setLatLng([a[o][1],a[o][0]]),l.addTo(t)})),i.addEventListener("elevationProfileLeave",(function(){t.removeLayer(l)}));var c=r().geoJSON(n.geoJson,{style:{color:"transparent",weight:30,opacity:0,fillOpacity:0},interactive:!0}).addTo(t);c.on("mousemove",(function(e){t.getContainer().dispatchEvent(new CustomEvent("mapElevationProfileLayerHover",{detail:{index:h(a,e.latlng)}}))})),c.on("mouseout",(function(){t.getContainer().dispatchEvent(new CustomEvent("mapElevationProfileLayerLeave"))}))}(o.elevationProfileId,0,n,e),i.push(l);break;case"kml":b(n,e)}})),i}function P(e,o){if(!e.dataset.leafletMapInitialized){e.dataset.leafletMapInitialized="1";var n=y(e,o),t=L(n),r=w(n,o,t);k(n,r),document.addEventListener("open.of.lightbox",(function(o){return E(o.detail.lightbox.modal,e,n,r)})),document.addEventListener("show.bs.collapse",(function(o){return setTimeout((function(){return E(o.target,e,n,r)}),10)})),document.addEventListener("show.bs.tab",(function(o){setTimeout((function(){return o.target.ariaControl
1sElements.forEach((function(o){return E(o,e,n,r)}))}),10)}))}}}}]);

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.