1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[108],{1108:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Z}});var r,o,l,i,u,a,c=t(7437);t(5046),t(4044);var s=t(759),f=t.n(s);function p(e,n){var t,r=s.DomUtil.create("div",e,document.body),o=function(e,n){for(var t,r=/url\(['"]?([^"']*?)['"]?\)/gi,o=[],l=r.exec(e);l;)o.push(n?(t=l[1]).substr(t.lastIndexOf("/")+1):l[1]),l=r.exec(e);return o}((t=h(r,"background-image"))&&"none"!==t?t:h(r,"cursor"),n),l=m(r,"width"),i=m(r,"height"),u=m(r,"margin-left"),a=m(r,"margin-top");return r.parentNode.removeChild(r),{Url:o[0],RetinaUrl:o[1],Size:[l,i],Anchor:[-u,-a]}}function d(e){var n=s.DomUtil.create("div",e,document.body),t=m(n,"margin-left"),r=m(n,"margin-top");return n.parentNode.removeChild(n),{Anchor:[t,r]}}function m(e,n){return parseInt(h(e,n),10)}function h(e,n){return s.DomUtil.getStyle(e,n)||s.DomUtil.getStyle(e,n.replace(/-(\w)/g,function(e,n){return n.toUpperCase()}))}s.Icon.Default.mergeOptions({iconUrl:null,iconRetinaUrl:null,shadowUrl:null,iconSize:null,iconAnchor:null,popupAnchor:null,tooltipAnchor:null,shadowSize:null,classNamePrefix:"leaflet-default-icon-"}),s.Icon.Default.include({_needsInit:!0,_getIconUrl:function(e){var n=this.options.imagePath||s.Icon.Default.imagePath||"";return this._needsInit&&this._initializeOptions(n),n+s.Icon.prototype._getIconUrl.call(this,e)},_initializeOptions:function(e){this._setOptions("icon",p,e),this._setOptions("shadow",p,e),this._setOptions("popup",d),this._setOptions("tooltip",d),this._needsInit=!1},_setOptions:function(e,n,t){var r=this.options,o=n(r.classNamePrefix+e,t);for(var l in o)r[e+l]=r[e+l]||o[l]}});var g=t(2265);function v(e,n){return Object.freeze({...e,...n})}let y=(0,g.createContext)(null),w=y.Provider;function x(){let e=(0,g.useContext)(y);if(null==e)throw Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function b(){return(b=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}let I=(0,g.forwardRef)(function({bounds:e,boundsOptions:n,center:t,children:r,className:o,id:l,placeholder:i,style:u,whenReady:a,zoom:c,...f},p){let[d]=(0,g.useState)({className:o,id:l,style:u}),[m,h]=(0,g.useState)(null);(0,g.useImperativeHandle)(p,()=>m?.map??null,[m]);let v=(0,g.useCallback)(r=>{if(null!==r&&null===m){let o=new s.Map(r,f);null!=t&&null!=c?o.setView(t,c):null!=e&&o.fitBounds(e,n),null!=a&&o.whenReady(a),h(Object.freeze({__version:1,map:o}))}},[]);(0,g.useEffect)(()=>()=>{m?.map.remove()},[m]);let y=m?g.createElement(w,{value:m},r):i??null;return g.createElement("div",b({},d,{ref:v}),y)});var O=t(4887);function C(e){return(0,g.forwardRef)(function(n,t){let{instance:r,context:o}=e(n).current;return(0,g.useImperativeHandle)(t,()=>r),null==n.children?null:g.createElement(w,{value:o},n.children)})}function P(e,n,t){return Object.freeze({instance:e,context:n,container:t})}function _(e,n){return null==n?function(n,t){let r=(0,g.useRef)();return r.current||(r.current=e(n,t)),r}:function(t,r){let o=(0,g.useRef)();o.current||(o.current=e(t,r));let l=(0,g.useRef)(t),{instance:i}=o.current;return(0,g.useEffect)(function(){l.current!==t&&(n(i,t,l.current),l.current=t)},[i,t,r]),o}}function E(e,n){let t=(0,g.useRef)(n);(0,g.useEffect)(function(){n!==t.current&&null!=e.attributionControl&&(null!=t.current&&e.attributionControl.removeAttribution(t.current),null!=n&&e.attributionControl.addAttribution(n)),t.current=n},[e,n])}function z(e,n){let t=(0,g.useRef)();(0,g.useEffect)(function(){return null!=n&&e.instance.on(n),t.current=n,function(){null!=t.current&&e.instance.off(t.current),t.current=null}},[e,n])}function j(e,n){let t=e.pane??n.pane;return t?{...e,pane:t}:e}function R(e,n){(0,g.useEffect)(function(){return(n.layerContainer??n.map).addLayer(e.instance),function(){n.layerContainer?.removeLayer(e.instance),n.map.removeLayer(e.instance)}},[n,e])}function S(e){return function(n){let t=x(),r=e(j(n,t),t);return E(t.map,n.attribution),z(r.current,n.eventHandlers),R(r.current,t),r}}let U=(r=S(_(function({url:e,...n},t){return P(new s.TileLayer(e,j(n,t)),t)},function(e,n,t){!function(e,n,t){let{opacity:r,zIndex:o}=n;null!=r&&r!==t.opacity&&e.setOpacity(r),null!=o&&o!==t.zIndex&&e.setZIndex(o)}(e,n,t);let{url:r}=n;null!=r&&r!==t.url&&e.setUrl(r)})),(0,g.forwardRef)(function(e,n){let{instance:t}=r(e).current;return(0,g.useImperativeHandle)(n,()=>t),null})),k=["mapPane","markerPane","overlayPane","popupPane","shadowPane","tilePane","tooltipPane"];function L(e,n){let{[n]:t,...r}=e;return r}let N=(0,g.forwardRef)(function(e,n){let[t]=(0,g.useState)(e.name),[r,o]=(0,g.useState)(null);(0,g.useImperativeHandle)(n,()=>r,[r]);let l=x(),i=(0,g.useMemo)(()=>({...l,pane:t}),[l]);return(0,g.useEffect)(()=>(o(function(e,n,t){if(-1!==k.indexOf(e))throw Error(`You must use a unique name for a pane that is not a default Leaflet pane: ${e}`);if(null!=t.map.getPane(e))throw Error(`A pane with this name already exists: ${e}`);let r=n.pane??t.pane,o=r?t.map.getPane(r):void 0,l=t.map.createPane(e,o);
1return null!=n.className&&function(e,n){n.split(" ").filter(Boolean).forEach(n=>{s.DomUtil.addClass(e,n)})}(l,n.className),null!=n.style&&Object.keys(n.style).forEach(e=>{l.style[e]=n.style[e]}),l}(t,e,l)),function(){let e=l.map.getPane(t);e?.remove?.(),null!=l.map._panes&&(l.map._panes=L(l.map._panes,t),l.map._paneRenderers=L(l.map._paneRenderers,t))}),[]),null!=e.children&&null!=r?(0,O.createPortal)(g.createElement(w,{value:i},e.children),r):null}),A=C((o=_(function({positions:e,...n},t){let r=new s.Polyline(e,n);return P(r,v(t,{overlayContainer:r}))},function(e,n,t){n.positions!==t.positions&&e.setLatLngs(n.positions)}),function(e){let n=x(),t=o(j(e,n),n);return z(t.current,e.eventHandlers),R(t.current,n),function(e,n){let t=(0,g.useRef)();(0,g.useEffect)(function(){if(n.pathOptions!==t.current){let r=n.pathOptions??{};e.instance.setStyle(r),t.current=r}},[e,n])}(t.current,e),t})),H=C(S(_(function({position:e,...n},t){let r=new s.Marker(e,n);return P(r,v(t,{overlayContainer:r}))},function(e,n,t){n.position!==t.position&&e.setLatLng(n.position),null!=n.icon&&n.icon!==t.icon&&e.setIcon(n.icon),null!=n.zIndexOffset&&n.zIndexOffset!==t.zIndexOffset&&e.setZIndexOffset(n.zIndexOffset),null!=n.opacity&&n.opacity!==t.opacity&&e.setOpacity(n.opacity),null!=e.dragging&&n.draggable!==t.draggable&&(!0===n.draggable?e.dragging.enable():e.dragging.disable())}))),M=(l=function(e,n){return P(new s.Popup(e,n.overlayContainer),n)},i=function(e,n,{position:t},r){(0,g.useEffect)(function(){let{instance:o}=e;function l(e){e.popup===o&&(o.update(),r(!0))}function i(e){e.popup===o&&r(!1)}return n.map.on({popupopen:l,popupclose:i}),null==n.overlayContainer?(null!=t&&o.setLatLng(t),o.openOn(n.map)):n.overlayContainer.bindPopup(o),function(){n.map.off({popupopen:l,popupclose:i}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(o)}},[e,n,r,t])},u=_(l),a=function(e,n){let t=x(),r=u(j(e,t),t);return E(t.map,e.attribution),z(r.current,e.eventHandlers),i(r.current,t,e,n),r},(0,g.forwardRef)(function(e,n){let[t,r]=(0,g.useState)(!1),{instance:o}=a(e,r).current;(0,g.useImperativeHandle)(n,()=>o),(0,g.useEffect)(function(){t&&o.update()},[o,t,e.children]);let l=o._contentNode;return l?(0,O.createPortal)(e.children,l):null})),D=e=>{let n=encodeURIComponent('\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 27 43">\n <path fill="'.concat(e,'" stroke="#000" stroke-width="1.5" d="M12.5 1C6.1 1 1 6.1 1 12.5c0 9.8 11.5 27 11.5 27S24 22.3 24 12.5C24 6.1 18.9 1 12.5 1z"/>\n <circle fill="#fff" cx="12.5" cy="12.5" r="4.5"/>\n </svg>\n ').trim());return new(f()).Icon({iconUrl:"data:image/svg+xml,".concat(n),iconSize:[27,43],iconAnchor:[13,43],popupAnchor:[0,-36]})},B=D("#145F32"),W=D("#999999");var Z=e=>{let{projects:n}=e,[t,r]=(0,g.useState)(null),o=(0,g.useMemo)(()=>{let e=new Map;n.forEach((n,t)=>{if(!n.connectionId)return;let r=e.get(n.connectionId);r?r.push(t):e.set(n.connectionId,[t])});let t=[];for(let n of e.values())for(let e=0;e<n.length;e++)for(let r=e+1;r<n.length;r++)t.push([n[e],n[r]]);return console.log("MapWithPins connections:",{groups:Object.fromEntries(e),pairs:t,projects:n.map(e=>({name:e.name,connectionId:e.connectionId}))}),t},[n]),l=new Set;if(null!==t)for(let[e,n]of(l.add(t),o))e===t&&l.add(n),n===t&&l.add(e);let i=null!==t?o.filter(e=>{let[n,r]=e;return n===t||r===t}):[];return(0,c.jsxs)(I,{center:[51,10.5],zoom:6,scrollWheelZoom:!1,style:{height:"600px",width:"100%",zIndex:0},children:[(0,c.jsx)(U,{attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,c.jsx)(N,{name:"connectionPane",style:{zIndex:650},children:i.map(e=>{let[t,r]=e;return(0,c.jsx)(A,{positions:[[n[t].latitude,n[t].longitude],[n[r].latitude,n[r].longitude]],pathOptions:{color:"#145F32",weight:3}},"".concat(t,"-").concat(r))})}),n.map((e,n)=>(0,c.jsx)(H,{position:[e.latitude,e.longitude],icon:l.has(n)?B:W,zIndexOffset:l.has(n)?1e3:0,eventHandlers:{click:()=>r(t===n?null:n)},children:(0,c.jsxs)(M,{children:[(0,c.jsx)("strong",{className:"text-sm",children:e.name}),(0,c.jsx)("br",{}),e.website&&(0,c.jsx)("div",{className:"pb-1.5 pt-0.5",children:(0,c.jsx)("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",children:"Website"})}),(0,c.jsx)("p",{className:"!m-0",children:e.description})]})}
1,n))]})}},4044:function(){},5046:function(){}}]);
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.