1"use strict";if(window.localStorage.getItem("compareObjID")!==null){postloadCss("css/mdObjectComparison.min.css");postloadScript('mdObjectComparison.min.js')} 2async function mdObjGenerateJumpNav(){if(window.matchMedia&&window.matchMedia('(min-width: 80em)').matches){const objectImages=document.getElementById("objectImages");if(objectImages===undefined||objectImages===null)return;function runJumpNavi(){const jumpNavi=document.createElement("div");jumpNavi.id="jumpNavi";jumpNavi.classList.add("invisible");const jumpNaviOptions=document.createElement("div");jumpNaviOptions.id="jumpNaviOptions";const jumpNaviClose=document.createElement("span");jumpNaviClose.textContent="x";jumpNaviOptions.appendChild(jumpNaviClose);(async function(){const jumpNaviToggleEnlarge=document.createElement("span");jumpNaviToggleEnlarge.textContent="<";jumpNaviOptions.appendChild(jumpNaviToggleEnlarge);jumpNaviToggleEnlarge.addEventListener('click',function(){jumpNavi.classList.toggle("enlarge")},{passive:!0});jumpNavi.appendChild(jumpNaviOptions);const objectMainImage=document.getElementById("objectMainImage");const jumpNaviLink=document.createElement("a");jumpNaviLink.href=objectMainImage.getElementsByTagName("a")[0].href;const jumpNaviImg=document.createElement("img");const picturePreview=objectMainImage.getElementsByTagName("picture")[0].getAttribute("data-preview");if(picturePreview!==undefined&&picturePreview!==null){jumpNaviImg.src=picturePreview}else jumpNaviImg.src=objectMainImage.getElementsByTagName("img")[0].src;jumpNaviImg.alt=document.getElementById("pageTitle").getElementsByTagName("h1")[0].textContent;jumpNaviLink.appendChild(jumpNaviImg);jumpNavi.appendChild(jumpNaviLink)})();document.body.appendChild(jumpNavi);function handleIntersection(entries,observer){for(let entry of entries){if(entry.isIntersecting===!1){if(jumpNavi.classList.contains("invisible")){jumpNavi.classList.remove("invisible")}}else{if(!(jumpNavi.classList.contains("invisible"))){jumpNavi.classList.add("invisible")}}}} 3const observer=new IntersectionObserver(handleIntersection);observer.observe(objectImages);jumpNaviClose.addEventListener('click',function(){document.body.removeChild(jumpNavi);observer.disconnect()},{passive:!0})}(async function(){function handleIntersection(entries,observer){for(let entry of entries){if(entry.isIntersecting===!1){runJumpNavi();observer.disconnect()}}} 4const observer=new IntersectionObserver(handleIntersection);observer.observe(objectImages)})()}} 5mdObjGenerateJumpNav();(async function(){"use strict";function getDirection(e,elem){if(window.innerHeight<e.clientY+elem.clientHeight){elem.style.top="";elem.style.bottom=(window.innerHeight-e.clientY)+"px"}else{elem.style.bottom="";elem.style.top=(e.clientY+4)+"px"} 6if(window.innerWidth<e.clientX+elem.clientWidth){elem.style.left="";elem.style.right=(window.innerWidth-e.clientX)+"px"}else{elem.style.right="";elem.style.left=(e.clientX+3)+"px"}} 7function positionMobile(newMain){if(window.matchMedia&&window.matchMedia('(max-width:75em)').matches){newMain.style.left="";newMain.style.right="";newMain.style.top="";newMain.style.bottom="";if(newMain.classList.contains("atBottom")===!1){newMain.classList.add("atBottom")}}} 8function triggerMouseMove(e){const newMain=document.getElementById("newToolTipMain");if(newMain===undefined||newMain===null)return;getDirection(e,newMain);positionMobile(newMain)} 9function triggerMouseOut(e){const newMain=document.getElementById("newToolTipMain");if(newMain!==undefined&&newMain!==null){newMain.classList.remove("visible");document.body.removeChild(newMain)} 10e.target.removeEventListener('mouseout',triggerMouseOut)} 11function generateNodaTree(higher,name){const list=document.createElement("ul");const listItem=document.createElement("li");listItem.textContent=higher.name;if(higher.lower!==undefined){listItem.appendChild(generateNodaTree(higher.lower,name))}else{const lowest=document.createElement("ul");const lowestLi=document.createElement("li");lowestLi.textContent=name;lowest.appendChild(lowestLi);listItem.appendChild(lowest)} 12list.appendChild(listItem);return list} 13function addObjectTooltip(tLink,urlBase="/json/object/"){const placeID=parseInt(tLink.getAttribute("data-id"));if(placeID===NaN){return} 14const curURL=urlBase+placeID;tLink.addEventListener('mouseover',function(e){window.fetch(curURL,{method:'GET',cache:'no-cache',credentials:'same-origin',}).then(function(response){return response.json()}).then(function(elements){let newMain=document.getElementById("newToolTipMain");
14if(newMain!==null)return;newMain=document.createElement("div");newMain.classList.add("newToolTip");newMain.id="newToolTipMain";newMain.setAttribute("data-title",elements.object_name);const tooltipDesc=document.createElement("p");let desc="";if(elements.object_description.length>300){desc=elements.object_description.substr(0,300);desc=desc.substr(0,desc.lastIndexOf(" "))+" ..."}else desc=elements.object_description;tooltipDesc.textContent=desc;newMain.appendChild(tooltipDesc);const tooltipImg=document.createElement("img");tooltipImg.src="/data/"+elements.md_subset+"/"+elements.object_images[0].folder+"/"+elements.object_images[0].preview.replace("200w_","500w_");tooltipImg.classList.add("fullToolTipImg");newMain.appendChild(tooltipImg);document.body.appendChild(newMain);newMain.classList.add("visible");getDirection(e,newMain);positionMobile(newMain);newMain.addEventListener("mouseout",function(e){const newMain=document.getElementById("newToolTipMain");if(newMain!==undefined&&newMain!==null){newMain.classList.remove("visible");document.body.removeChild(newMain)}});tLink.addEventListener("mouseout",triggerMouseOut)})},{passive:!0});tLink.addEventListener("mousemove",triggerMouseMove,{passive:!0})} 15function addNodaTooltip(tLink,urlBase="/apis/getPlaceInfo.php?q="){let placeID=parseInt(tLink.getAttribute("data-id"));if(placeID===NaN){return} 16const curURL=urlBase+placeID;function buildPlaceTooltip(e,elements){let newMain=document.getElementById("newToolTipMain");if(newMain!==null)return;newMain=document.createElement("div");newMain.classList.add("newToolTip");newMain.id="newToolTipMain";newMain.setAttribute("data-title",elements.name);const tooltipDesc=document.createElement("p");tooltipDesc.textContent=elements.description;newMain.appendChild(tooltipDesc);if(elements.higher!==undefined){const hierarchy=generateNodaTree(elements.higher,elements.name);hierarchy.classList.add("toolTipHierarchy");newMain.appendChild(hierarchy)} 17if(elements.relations!==undefined){const relations=elements.relations;const dList=document.createElement("dl");dList.classList.add("toolTipDL");for(let invType in relations){const dDef=document.createElement("dt");dDef.textContent=invType;dList.appendChild(dDef);const dCont=document.createElement("dd");dCont.textContent=relations[invType].join(", ");dList.appendChild(dCont)} 18newMain.appendChild(dList)} 19if(elements.image!==undefined&&elements.image!==""){const tooltipImg=document.createElement("img");tooltipImg.src=elements.image;tooltipImg.classList.add("fullToolTipImg");newMain.appendChild(tooltipImg)} 20document.body.appendChild(newMain);newMain.classList.add("visible");getDirection(e,newMain);positionMobile(newMain);newMain.addEventListener("mouseout",function(e){const newMain=document.getElementById("newToolTipMain");if(newMain!==undefined&&newMain!==null){newMain.classList.remove("visible");document.body.removeChild(newMain)}},{passive:!0});e.target.addEventListener("mouseout",triggerMouseOut,{passive:!0})} 21let placeElems={};tLink.addEventListener('mouseover',function(e){if(placeElems[placeID]===undefined){window.fetch(curURL,{method:'GET',cache:'no-cache',credentials:'same-origin',}).then(function(response){return response.json()}).then(function(elements){buildPlaceTooltip(e,elements);placeElems[placeID]=elements})}else{buildPlaceTooltip(e,placeElems[placeID])}},{passive:!0});tLink.addEventListener("mousemove",triggerMouseMove,{passive:!0})}(async function(){const links=document.getElementsByClassName("placeToolTip");for(let tLink of links){addNodaTooltip(tLink,"/apis/getPlaceInfo.php?q=")}})();(async function(){const links=document.getElementsByClassName("tagToolTip");for(let tLink of links){addNodaTooltip(tLink,"/apis/getTagInfo.php?q=")}})();(async function(){const links=document.getElementsByClassName("actorToolTip");for(let tLink of links){addNodaTooltip(tLink,"/apis/getPersinstInfo.php?q=")}})();(async function(){const links=document.getElementsByClassName("objectToolTip");for(let tLink of links){addObjectTooltip(tLink)}})()})();(async function(){"use strict";function calcCrow(lat1,lon1,lat2,lon2){const R=6371;const dLat=toRad(lat2-lat1);const dLon=toRad(lon2-lon1);lat1=toRad(lat1);lat2=toRad(lat2);const a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.sin(dLon/2)*Math.sin(dLon/2)*Math.cos(lat1)*Math.cos(lat2);const c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));const d=R*c;return d} 22const targetElem=document.getElementById("distanceMarker");function geolocationError(error){if(error.code==error.PERMISSION_DENIED&&localStorage.getItem("useLocation")==="true"){localStorage.setItem("useLocation","false");targetElem.parentElement.removeChild(targetElem)}} 23if(targetElem===undefined||targetElem===null)return;
23const targetLon=targetElem.getAttribute("data-lon");const targetLat=targetElem.getAttribute("data-lat");const useLocation=localStorage.getItem("useLocation");if(useLocation!=="true"||targetLon===undefined||targetLon===null||targetLat===undefined||targetLat===null){if(navigator.geolocation){targetElem.addEventListener('click',function(){localStorage.setItem("useLocation","true");targetElem.textContent=targetElem.getAttribute("data-tl-getting-pos");navigator.geolocation.getCurrentPosition(showPositionForInst,geolocationError)},{passive:!0})}else targetElem.parentElement.removeChild(targetElem);return} 24function showPositionForInst(position){const distance=calcCrow(position.coords.latitude,position.coords.longitude,parseFloat(targetLat),parseFloat(targetLon)).toFixed(1);targetElem.target="_blank";targetElem.href="https://www.openstreetmap.org/directions?engine=graphhopper_foot&route="+encodeURIComponent(position.coords.latitude)+"%2C"+encodeURIComponent(position.coords.longitude)+"%3B"+encodeURIComponent(targetLat)+"%2C"+encodeURIComponent(targetLon)+"#map=7/"+encodeURIComponent(position.coords.latitude)+"/"+encodeURIComponent(position.coords.longitude);targetElem.textContent=distance+targetElem.getAttribute("data-tl-km-away")} 25if(navigator.geolocation){targetElem.textContent=targetElem.getAttribute("data-tl-getting-pos");navigator.geolocation.getCurrentPosition(showPositionForInst,geolocationError)}else targetElem.parentElement.removeChild(targetElem)})();(async function(){const compareObjLink=document.getElementById("compareObjLink");if(compareObjLink!==null&&compareObjLink!==!1){compareObjLink.addEventListener("click",function(){const objectId=parseInt(document.documentElement.getAttribute("data-subject-id"));if(objectId===undefined||objectId===null)return'';window.localStorage.setItem("compareObjID",objectId);if(document.getElementById("objectMainImage").getElementsByTagName("img")[0]!==null){const thumbPath=document.getElementById("objectMainImage").getElementsByTagName("img")[0].src;window.localStorage.setItem("compareObjThumb",thumbPath)} 26window.localStorage.setItem("compareObjTitle",document.getElementById("pageTitle").getElementsByTagName("h1")[0].textContent);const notifRemoved=document.createElement("p");notifRemoved.textContent=getTranslation(translations,"setForComparing");notifRemoved.classList.add("notifLine");document.body.appendChild(notifRemoved)},{passive:!0})}})()
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.