added scheduling

This commit is contained in:
Joren de Graaf
2026-10-10 16:03:14 +02:00
parent e967fc391e
commit 7220dd564f
53 changed files with 769 additions and 67 deletions
@@ -0,0 +1 @@
/* empty css *//* empty css */import"./fireworks-home.js-CZsCTUTv.js";import"./map.js-ZTK3kmoy.js";import"../../../manual-report-44fwUW4y.js";import"../../../theme-DXAi27ON.js";
@@ -0,0 +1 @@
/* empty css */import"../../../manual-report-44fwUW4y.js";import"../../../theme-DXAi27ON.js";
@@ -0,0 +1 @@
/* empty css *//* empty css */import"../../../theme-DXAi27ON.js";const e=window.BOOMCAST_I18N||{},u=document.getElementById("event-map"),f=u.dataset.h3Resolution,n=L.map(u,{zoomControl:!1,scrollWheelZoom:!1}).setView([52.1326,5.2913],7);L.control.zoom({position:"bottomleft"}).addTo(n);const m=L.control({position:"topright"});m.onAdd=()=>{const o=L.DomUtil.create("div","map-compass");return o.setAttribute("role","img"),o.setAttribute("aria-label",e.mapCompass||"Map compass: north is up"),o.innerHTML='<span class="compass-n">N</span><span class="compass-e">E</span><span class="compass-s">S</span><span class="compass-w">W</span><span class="compass-needle">↑</span>',L.DomEvent.disableClickPropagation(o),o};m.addTo(n);L.tileLayer("https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png",{maxZoom:18,attribution:"&copy; OpenStreetMap contributors"}).addTo(n);const M=JSON.parse(document.getElementById("h3-cells-data").textContent),y=JSON.parse(document.getElementById("map-events-data").textContent),d=L.latLngBounds([]);M.forEach(o=>{const s=o.manual_reports>0,c=o.sensor_reports>0,t=s&&c?"#a78bfa":c?"#22d3ee":"#f59e0b";L.polygon(o.boundary,{color:t,weight:2,fillColor:t,fillOpacity:.25}).addTo(n).bindPopup('<span class="popup-title">H3 '+o.cell+'</span><span class="popup-meta">'+o.reports+" "+(o.reports===1?e.report||"report":e.reports||"reports")+" · "+o.occurrences+" "+(o.occurrences===1?e.occurrence||"occurrence":e.occurrences||"occurrences")+" · "+(e.resolution||"resolution")+" "+f+"<br>"+o.manual_reports+" "+(e.manualReport||"Manual report")+" · "+o.sensor_reports+" "+(e.sensorEvent||"Sensor event")+"</span>"),d.extend(L.latLngBounds(o.boundary))});function v(o){return["N","NE","E","SE","S","SW","W","NW"][Math.floor((o+22.5)%360/45)]}function b(o,s,c){const a=s*Math.PI/180,r=o[0]*Math.PI/180,h=o[1]*Math.PI/180,i=c/6378137,l=Math.asin(Math.sin(r)*Math.cos(i)+Math.cos(r)*Math.sin(i)*Math.cos(a)),g=h+Math.atan2(Math.sin(a)*Math.sin(i)*Math.cos(r),Math.cos(i)-Math.sin(r)*Math.sin(l));return[l*180/Math.PI,g*180/Math.PI]}const S=L.divIcon({className:"",html:'<div class="report-icon">✦</div>',iconSize:[37,37],iconAnchor:[19,19]}),_=L.divIcon({className:"",html:'<div class="sensor-icon">S</div>',iconSize:[37,37],iconAnchor:[19,19]});y.forEach(o=>{const s=o.source_type==="sensor",c=o.visually_confirmed?e.visuallyConfirmed||"Visually confirmed":e.notVisuallyConfirmed||"Not visually confirmed";let t=o.occurrences+" "+(o.occurrences===1?e.occurrence||"occurrence":e.occurrences||"occurrences")+" · "+c+"<br>"+(e.reported||"Reported")+" "+o.reported_on;if(o.direction_degrees!==null&&(t+="<br>"+(e.compassDirection||"Compass direction")+" "+Math.round(o.direction_degrees)+"° ("+v(o.direction_degrees)+")",o.direction_accuracy_degrees!==null&&(t+=" (±"+Math.round(o.direction_accuracy_degrees)+"°)")),L.marker(o.center,{icon:s?_:S}).addTo(n).bindPopup('<span class="popup-title">'+(s?e.sensorEvent||"Sensor event":e.manualReport||"Manual report")+" · H3 "+o.cell+'</span><span class="popup-meta">'+t+"</span>"),o.direction_degrees!==null){const a=b(o.center,o.direction_degrees,900);L.polyline([o.center,a],{color:"#fff7e6",weight:9,opacity:.8}).addTo(n),L.polyline([o.center,a],{color:"#6d45a0",weight:5,opacity:1}).addTo(n);const r=L.divIcon({className:"",html:'<div class="direction-marker"><span style="transform:rotate('+o.direction_degrees+'deg)">↑</span></div>',iconSize:[56,56],iconAnchor:[28,28]});L.marker(a,{icon:r,interactive:!1}).addTo(n)}});d.isValid()&&n.fitBounds(d.pad(.18));const p=document.getElementById("range");p&&document.querySelectorAll("#from-date, #to-date").forEach(o=>{o.addEventListener("change",()=>{p.value="custom"})});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long