PageSourceSearch

https://www.fnanicu.com/wp-content/cache/autoptimize/js/autoptimize_single_1471c0b9df6413340c8527d858c5d50c.js

js fnanicu.com collected 2026-10-09 22:10:25 UTC 2,224 bytes, 11 lines download raw bytes

1(function(){'use strict';function calculateCenter(locations){if(!locations.length){return null;}
2let x=0.0;let y=0.0;let z=0.0;locations.forEach(location=>{const latitude=location.lat*Math.PI/180;const longitude=location.lng*Math.PI/180;x+=Math.cos(latitude)*Math.cos(longitude);y+=Math.cos(latitude)*Math.sin(longitude);z+=Math.sin(latitude);});const total=locations.length;x=x/total;y=y/total;z=z/total;const centralLongitude=Math.atan2(y,x);const centralSquareRoot=Math.sqrt(x*x+y*y);const centralLatitude=Math.atan2(z,centralSquareRoot);return{lng:centralLongitude*180/Math.PI,lat:centralLatitude*180/Math.PI};}
3const locations=document.querySelectorAll('.pdir-locations-archive-item');const pages=[];locations.forEach(element=>{const title=element.getAttribute('data-title');const text_content=element.innerHTML;const lat=element.getAttribute('data-lat');const lng=element.getAttribute('data-lng');pages.push({title:title,text_content:text_content,location:{'lat':Number(lat),'lng':Number(lng)}});});let map;function initOAPMap(){if(typeof maplibregl==='undefined'){return;}
4if(!document.getElementById('pdir-map-element')){return;}
5if(!pages.length){return;}
6if(map){map.remove();}
7OapMaps.init({proxyUrl:'https://oap-prod-maps-proxy-rakvtqapla-ue.a.run.app'});const mapLocations=pages.map(page=>page.location);const center=calculateCenter(mapLocations);map=new maplibregl.Map(OapMaps.mapOptions("pdir-map-element",{center:center,zoom:8,cooperativeGestures:true,}));const bounds=new maplibregl.LngLatBounds();map.addControl(new maplibregl.NavigationControl(),"bottom-right");const newPopup=(m)=>new maplibregl.Popup({offset:25}).setHTML(`<div>
8                  ${m.text_content}
9              <\/div>`)
10pages.forEach((m)=>{const popup=newPopup(m);bounds.extend([m.location.lng,m.location.lat]);const marker=new maplibregl.Marker({color:"#DC3545"}).setLngLat([m.location.lng,m.location.lat]).setPopup(popup).addTo(map);});map.fitBounds(bounds,{padding:50});OapMaps.initTracking(map);}
11initOAPMap();const resetMap=document.getElementsByClassName('pdir-reset-map');for(let i=0;i<resetMap.length;i++){resetMap[i].addEventListener('click',()=>{console.log(`Re-initializing map from button ${i + 1}`);initOAPMap();});}})();

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.