1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2529],{33383:()=>{},82529:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var o=r(95155),n=r(12115),a=r(20063),l=r(87856),i=r.n(l);r(33383);var s=r(86948);let c="pk.eyJ1IjoiYWRtaW5yZWR1Y28iLCJhIjoiY21reTQ2aGh0MDE5bTNmcjM0bTR1amQwMiJ9.DZd426xfreqs2GORQw2awA";function d(e){let{projects:t}=e,r=(0,a.useRouter)(),l=(0,n.useRef)(null),d=(0,n.useRef)(null),p=(0,n.useRef)(null),[u,m]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=l.current;if(!e)return;let t=new IntersectionObserver(e=>{let[r]=e;r.isIntersecting&&(m(!0),t.disconnect())},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[]),(0,n.useEffect)(()=>{if(!u||!d.current||!c)return;i().accessToken=c;let e=new(i()).Map({container:d.current,style:"mapbox://styles/mapbox/dark-v11",center:[10.4,51.1],zoom:4,attributionControl:!1,dragRotate:!1,pitchWithRotate:!1});return p.current=e,e.on("load",()=>{let o=t.filter(e=>{var t;return null==(t=e.centroid_geom)?void 0:t.coordinates}).map(e=>({type:"Feature",geometry:{type:"Point",coordinates:e.centroid_geom.coordinates},properties:{label:e.project_name&&e.project_name!=="Dekarbonisierung ".concat(e.building_id)?e.project_name:e.address||e.project_name||"Projekt ".concat(e.building_id),projectId:e.project_id,riskColor:function(e){var t;let r=null!=(t=e.final_heating_demand_kwh_m2a)?t:e.heating_demand_kwh_m2a;return null==r||r<=0?"#737373":r<=180?"#329d60":r<=225?"#eab308":"#ef4444"}(e)}}));e.addSource("projects",{type:"geojson",data:{type:"FeatureCollection",features:o}}),e.addLayer({id:"project-dots",type:"circle",source:"projects",paint:{"circle-radius":6,"circle-color":["get","riskColor"],"circle-stroke-width":0,"cir
1cle-stroke-color":"transparent"}});let n=new(i()).Popup({closeButton:!1,closeOnClick:!0,offset:10,anchor:"bottom",className:"portfolio-map-popup"}),a=null,l=()=>{a&&(clearTimeout(a),a=null)},s=()=>{l(),a=setTimeout(()=>n.remove(),250)};e.on("mouseenter","project-dots",t=>{var r,o,a;l(),e.getCanvas().style.cursor="pointer";let i=null==(r=t.features)?void 0:r[0];if(i&&"Point"===i.geometry.type){let r=i.geometry.coordinates.slice(),c=e.queryRenderedFeatures(t.point,{layers:["project-dots"]}),d=new Set,p=[];for(let e of c){let t=null==(o=e.properties)?void 0:o.projectId;t&&!d.has(t)&&(d.add(t),p.push({label:(null==(a=e.properties)?void 0:a.label)||t,projectId:t}))}let u=p.map(e=>'<div data-project-id="'.concat(e.projectId,'" style="font-size:13px;font-weight:500;padding:4px 6px;cursor:pointer;border-radius:4px;transition:background 0.15s" onmouseenter="this.style.textDecoration=\'underline\'" onmouseleave="this.style.textDecoration=\'none\'">').concat(e.label,"</div>")).join("");n.setLngLat(r).setHTML(u).addTo(e);let m=n.getElement();m.addEventListener("mouseenter",l),m.addEventListener("mouseleave",s)}}),e.on("mouseleave","project-dots",()=>{e.getCanvas().style.cursor="",s()}),d.current.addEventListener("click",e=>{let t=e.target.closest("[data-project-id]");if(t){let e=t.getAttribute("data-project-id");e&&r.push("/reporting?projectId=".concat(e))}})}),()=>{e.remove(),p.current=null}},[u,t]),(0,o.jsx)("div",{ref:l,className:"h-full",children:(0,o.jsx)(s.Zp,{className:"overflow-hidden p-0 h-full",children:u?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("style",{children:"\n .portfolio-map-popup .mapboxgl-popup-tip { display: none; }\n .portfolio-map-popup .mapboxgl-popup-content { border-radius: 12px; padding: 4px 2px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }\n "}),(0,o.jsx)("div",{ref:d,style:{height:"100%",minHeight:"340px",width:"100%"}})]}):(0,o.jsx)("div",{style:{height:"340px",width:"100%"},className:"flex items-center justify-center bg-neutral-100 rounded-lg",children:(0,o.jsx)("span",{className:"text-sm text-neutral-400",children:"Karte wird geladenâ¦"})})})})}}}]);
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.