PageSourceSearch

https://knuckl.com/assets/WorkersMap-DOqaKB9j.js

js knuckl.com collected 2026-10-02 01:37:12 UTC 47,704 bytes, 19 lines download raw bytes

1import{a as m,j as ft}from"./vendor-query-CRhh6spR.js";import{u as It,L as S,t as xt,m as pt,a as Tt,b as Gt,c as Zt,d as Rt,M as zt,i as At}from"./MapUnavailable-B5MbGmNr.js";import{s as Ut,m as Ft,c as Pt,e as wt,h as Ot}from"./viewed-entities-BBR1nlgw.js";import{b as Et,K as Q}from"./map-pins-C2PZr5Kz.js";import"./vendor-leaflet-hfhF5hzr.js";import"./index-BkVb42KZ.js";import"./vendor-react-BAmwgVqg.js";import"./vendor-charts-BVeOEGzI.js";import"./vendor-stripe-2y4Jo9_W.js";import"./vendor-supabase-Csx7YFID.js";import"./external-link-ibDNud24.js";import"./entity-icons-BRGQ7M58.js";import"./clipboard-list-DxTA222t.js";import"./message-square-BwPXUwfW.js";import"./hard-hat-DFuF37sz.js";import"./globe-BUYI8zey.js";import"./house-0Xv-8BDy.js";import"./building-2-C8te0Xoz.js";var at={exports:{}},Nt=at.exports,bt;function Dt(){return bt||(bt=1,function(M,g){(function(v,w){w(g)})(Nt,function(v){var w=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i=this._featureGroup,n=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,u=t.length,o=0,l=!0,h;if(this._map){var k=new Date().getTime(),c=L.bind(function(){var I=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();o<u;o++){if(r&&o%200===0){var H=new Date().getTime()-I;if(H>a)break}if(h=t[o],h instanceof L.LayerGroup){l&&(t=t.slice(),l=!1),this._extractNonGroupLayers(h,t),u=t.length;continue}if(!h.getLatLng){n.addLayer(h),e||this.fire("layeradd",{layer:h});continue}if(!this.hasLayer(h)&&(this._addLayer(h,this._maxZoom),e||this.fire("layeradd",{layer:h}),h.__parent&&h.__parent.getChildCount()===2)){var P=h.__parent.getAllChildMarkers(),x=P[0]===h?P[1]:P[0];i.removeLayer(x)}}s&&s(o,u,new Date().getTime()-k),o===u?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(c,this.options.chunkDelay)},this);c()}else for(var y=this._needsClustering;o<u;o++){if(h=t[o],h instanceof L.LayerGroup){l&&(t=t.slice(),l=!1),this._extractNonGroupLayers(h,t),u=t.length;continue}if(!h.getLatLng){n.addLayer(h);continue}this.hasLayer(h)||y.push(h)}return this},removeLayers:function(t){var e,i,n=t.length,r=this._featureGroup,a=this._nonPointGroup,s=!0;if(!this._map){for(e=0;e<n;e++){if(i=t[e],i instanceof L.LayerGroup){s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(i,t),n=t.length;continue}this._arraySplice(this._needsClustering,i),a.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i})}return this}if(this._unspiderfy){this._unspiderfy();var u=t.slice(),o=n;for(e=0;e<o;e++){if(i=u[e],i instanceof L.LayerGroup){this._extractNonGroupLayers(i,u),o=u.length;continue}this._unspiderfyLayer(i)}}for(e=0;e<n;e++){if(i=t[e],i instanceof L.LayerGroup){s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(i,t),n=t.length;continue}if(!i.__parent){a.removeLayer(i),this.fire("layerremove",{layer:i});continue}this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),r.hasLayer(i)&&(r.removeLayer(i),i.clusterShow&&i.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i=this._needsClustering.slice(),n=this._needsRemoving,r,a,s;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(i),a=i.length-1;a>=0;a--){for(r=!0,s=n.length-1;s>=0;s--)if(n[s].layer===i[a]){r=!1;break}r&&t.call(e,i[a])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e].layer===t)return!1;return!!(t.__parent&&t.__parent._group===this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;typeof e!="function"&&(e=function(){});var n=function(){(i.hasLayer(t)||i.hasLayer(t.__parent))&&!this._inZoomAnimation&&(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),t.__parent.zoomToBounds())},onAdd:function(t){this._map=t;var e,i,n;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";
1for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],n.newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());e>=r&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,r=this._gridUnclustered,a=this._featureGroup,s=this._map,u=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var o=t.__parent,l=o._markers,h;for(this._arraySplice(l,t);o&&(o._childCount--,o._boundsNeedUpdate=!0,!(o._zoom<u));)e&&o._childCount<=1?(h=o._markers[0]===t?o._markers[1]:o._markers[0],n[o._zoom].removeObject(o,s.project(o._cLatLng,o._zoom)),r[o._zoom].addObject(h,s.project(h.getLatLng(),o._zoom)),this._arraySplice(o.__parent._childClusters,o),o.__parent._markers.push(h),h.__parent=o.__parent,o._icon&&(a.removeLayer(o),i||a.addLayer(h))):o._iconNeedsUpdate=!0,o=o.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return e<10?i+="small":e<100?i+="medium":i+="large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,r=this.options.spiderfyOnEveryZoom;(e||n||r)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if(!(t.type==="clusterkeypress"&&t.originalEvent&&t.originalEvent.keyCode!==13)){for(;i._childClusters.length===1;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&t.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,r=this._map;(t||i||n)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),r.off("zoomend",this._hideCoverage,this))}
1,_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;typeof i!="function"&&(n=function(){return i}),this.options.disableClusteringAtZoom!==null&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var r=t;r>=e;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i=this._gridClusters,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom()),a,s;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=r;e--){a=this._map.project(t.getLatLng(),e);var u=i[e].getNearObject(a);if(u){u._addChild(t),t.__parent=u;return}if(u=n[e].getNearObject(a),u){var o=u.__parent;o&&this._removeLayer(u,!1);var l=new this._markerCluster(this,e,u,t);i[e].addObject(l,this._map.project(l._cLatLng,e)),u.__parent=l,t.__parent=l;var h=l;for(s=e-1;s>o._zoom;s--)h=new this._markerCluster(this,s,h),i[s].addObject(h,this._map.project(u.getLatLng(),s));o._addChild(h),this._removeFromGridUnclustered(u,e);return}n[e].addObject(t,a)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(L.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(t){var e=this._maxLat;return e!==void 0&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(e._childCount===2){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i=t.getLayers(),n=0,r;for(e=e||[];n<i.length;n++){if(r=i[n],r instanceof L.LayerGroup){this._extractNonGroupLayers(r,e);continue}e.push(r)}return e},_overrideMarkerIcon:function(t){var e=t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}});return e}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i=this._getExpandedVisibleBounds(),n=this._featureGroup,r=Math.floor(this._map.getMinZoom()),a;this._ignoreMove=!0,this._topClusterLevel._recursively(i,t,r,function(s){var u=s._latlng,o=s._markers,l;
vendor: 3,210 bytes, line 1
1for(i.contains(u)||(u=null),s._isSingleParent()&&t+1===e?(n.removeLayer(s),s._recursivelyAddChildrenToMap(null,e,i)):(s.clusterHide(),s._recursivelyAddChildrenToMap(u,e,i)),a=o.length-1;a>=0;a--)l=o[a],i.contains(l._latlng)||n.removeLayer(l)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(i,e),n.eachLayer(function(s){!(s instanceof L.MarkerCluster)&&s._icon&&s.clusterShow()}),this._topClusterLevel._recursively(i,t,e,function(s){s._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(i,t,r,function(s){n.removeLayer(s),s.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,e+1,i);var a=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(t._childCount===1){var s=t._markers[0];this._ignoreMove=!0,s.setLatLng(s.getLatLng()),this._ignoreMove=!1,s.clusterShow&&s.clusterShow()}else t._recursively(n,i,r,function(u){u._recursivelyRemoveChildrenFromMap(n,r,e+1)});a._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var F=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e=this._childClusters.slice(),i=this._group._map,n=i.getBoundsZoom(this._bounds),r=this._zoom+1,a=i.getZoom(),s;e.length>0&&n>r;){r++;var u=[];for(s=0;s<e.length;s++)u=u.concat(e[s]._childClusters);e=u}n>
vendor: 10,931 bytes, line 1
1r?this._group._map.setView(this._latlng,r):n<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t=this._markers,e=this._childClusters,i=0,n=0,r=this._childCount,a,s,u,o;if(r!==0){for(this._resetBounds(),a=0;a<t.length;a++)u=t[a]._latlng,this._bounds.extend(u),i+=u.lat,n+=u.lng;for(a=0;a<e.length;a++)s=e[a],s._boundsNeedUpdate&&s._recalculateBounds(),this._bounds.extend(s._bounds),u=s._wLatLng,o=s._childCount,i+=u.lat*o,n+=u.lng*o;this._latlng=this._wLatLng=new L.LatLng(i/r,n/r),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,function(n){var r=n._markers,a,s;for(a=r.length-1;a>=0;a--)s=r[a],s._icon&&(s._setPos(e),s.clusterHide())},function(n){var r=n._childClusters,a,s;for(a=r.length-1;a>=0;a--)s=r[a],s._icon&&(s._setPos(e),s.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(r){r._recursivelyAnimateChildrenIn(t,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(t,e,i)):r.clusterHide(),r._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(i){i.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(n){if(e!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var a=n._markers[r];i.contains(a._latlng)&&(t&&(a._backupLatlng=a.getLatLng(),a.setLatLng(t),a.clusterHide&&a.clusterHide()),n._group._featureGroup.addLayer(a))}},function(n){n._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var r,a;this._recursively(t,e-1,i-1,function(s){for(a=s._markers.length-1;a>=0;a--)r=s._markers[a],(!n||!n.contains(r._latlng))&&(s._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(s){for(a=s._childClusters.length-1;a>=0;a--)r=s._childClusters[a],(!n||!n.contains(r._latlng))&&(s._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(t,e,i,n,r){var a=this._childClusters,s=this._zoom,u,o;if(e<=s&&(n&&n(this),r&&s===i&&r(this)),s<e||s<i)for(u=a.length-1;u>=0;u--)o=a[u],o._boundsNeedUpdate&&o._recalculateBounds(),t.intersects(o._bounds)&&o._recursively(t,e,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),r=this._grid,a=r[n]=r[n]||{},s=a[i]=a[i]||[],u=L.Util.stamp(t);this._objectPoint[u]=e,s.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),r=this._grid,a=r[n]=r[n]||{},s=a[i]=a[i]||[],u,o;for(delete this._objectPoint[L.Util.stamp(t)],u=0,o=s.length;u<o;u++)if(s[u]===t)return s.splice(u,1),o===1&&delete a[i],!0},eachObject:function(t,e){var i,n,r,a,s,u,o,l=this._grid;for(i in l){s=l[i];for(n in s)for(u=s[n],r=0,a=u.length;r<a;r++)o=t.call(e,u[r]),o&&(r--,a--)}},getNearObject:function(t){var e=this._getCoord(t.x),i=this._getCoord(t.y),n,r,a,s,u,o,l,h,k=this._objectPoint,c=this._sqCellSize,y=null;for(n=i-1;n<=i+1;n++)if(s=this._grid[n],s){for(r=e-1;r<=e+1;r++)if(u=s[r],u)for(a=0,o=u.length;a<o;a++)l=u[a],h=this._sqDist(k[L.Util.stamp(l)],t),(h<c||h<=c&&y===null)&&(c=h,y=l)}return y},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i=0,n=null,r=[],a,s,u;for(a=e.length-1;a>=0;a--){if(s=e[a],u=this.getDistant(s,t),u>0)r.push(s);else continue;u>i&&(i=u,n=s)}return{maxPoint:n,newPoints:r}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)),i):[t[0]]},getConvexHull:function(t){var e=!1,i=!1,n=!1,r=!1,a=null,s=null,u=null,o=null,l=null,h=null,k;for(k=t.length-1;k>=0;k--){var c=t[k];(e===!1||c.lat>e)&&(a=c,e=c.lat),(i===!1||c.lat<i)&&(s=c,i=c.lat),(n===!1||c.lng>n)&&(u=c,n=c.lng),(r===!1||c.lng<r)&&(o=c,r=c.lng)}i!==e?(h=s,l=a):(h=o,l=u);var y=[].concat(this.buildConvexHull([h,l],t),this.buildConvexHull([l,h],t));return y}}}(),L.MarkerCluster.include({getConvexHull:function(){var t=this.getAllChildMarkers(),e=[],i,n;for(n=t.length-1;n>=0;n--)i=t[n].getLatLng(),e.push(i);return L.QuickHull.getConvexHull(e)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var t=this.getAllChildMarkers(null,!0),e=this._group,i=e._map,n=i.latLngToLayerPoint(this._latlng),r;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?r=this._group.options.spiderfyShapePositions(t.length,n):t.length>=this._circleSpiralSwitchover?r=this._generatePointsSpiral(t.length,n):(n.y+=10,r=this._generatePointsCircle(t.length,n)),this._animationSpiderfy(t,r)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),n=i/this._2PI,r=this._2PI/t,a=[],s,u;for(n=Math.max(n,35),a.length=t,s=0;s<t;s++)u=this._circleStartAngle+s*r,a[s]=new L.Point(e.x+n*Math.cos(u),e.y+n*Math.sin(u))._round();return a},_generatePointsSpiral:function(t,e){var i=this._group.options.spiderfyDistanceMultiplier,n=i*this._spiralLengthStart,r=i*this._spiralFootSeparation,a=i*this._spiralLengthFactor*this._2PI,s=0,u=[],o;for(u.length=t,o=t;o>=0;o--)o<t&&(u[o]=new L.Point(e.x+n*Math.cos(s),e.y+n*Math.sin(s))._round()),s+=r/n+o*5e-4,n+=a/s;return u},_noanimationUnspiderfy:function(){var t=this._group,e=t._map,i=t._featureGroup,n=this.getAllChildMarkers(null,!0),r,a;for(t._ignoreMove=!0,this.setOpacity(1),a=n.length-1;a>=0;a--)r=n[a],i.removeLayer(r),r._preSpiderfyLatlng&&(r.setLatLng(r._preSpiderfyLatlng),delete r._preSpiderfyLatlng),r.setZIndexOffset&&r.setZIndexOffset(0),r._spiderLeg&&(e.removeLayer(r._spiderLeg),delete r._spiderLeg);t.fire("unspiderfied",{cluster:this,markers:n}),t._ignoreMove=!1,t._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i=this._group,n=i._map,r=i._featureGroup,a=this._group.options.spiderLegPolylineOptions,s,u,o,l;for(i._ignoreMove=!0,s=0;s<t.length;s++)l=n.layerPointToLatLng(e[s]),u=t[s],o=new L.Polyline([this._latlng,l],a),n.addLayer(o),u._spiderLeg=o,u._preSpiderfyLatlng=u._latlng,u.setLatLng(l),u.setZIndexOffset&&u.setZIndexOffset(1e6),r.addLayer(u);this.setOpacity(.3),i._ignoreMove=!1,i.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i=this,n=this._group,r=n._map,a=n._featureGroup,s=this._latlng,u=r.latLngToLayerPoint(s),o=L.Path.SVG,l=L.extend({},this._group.options.spiderLegPolylineOptions),h=l.opacity,k,c,y,I,H,P;for(h===void 0&&(h=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),o?(l.opacity=0,l.className=(l.className||"")+" leaflet-cluster-spider-leg"):l.opacity=h,n._ignoreMove=!0,k=0;k<t.length;k++)c=t[k],P=r.layerPointToLatLng(e[k]),y=new L.Polyline([s,P],l),r.addLayer(y),c._spiderLeg=y,o&&(I=y._path,H=I.getTotalLength()+.1,I.style.strokeDasharray=H,I.style.strokeDashoffset=H),c.setZIndexOffset&&c.setZIndexOffset(1e6),c.clusterHide&&c.clusterHide(),a.addLayer(c),c._setPos&&c._setPos(u);for(n._forceLayout(),n._animationStart(),k=t.length-1;k>=0;k--)P=r.layerPointToLatLng(e[k]),c=t[k],c._preSpiderfyLatlng=c._latlng,c.setLatLng(P),c.clusterShow&&c.clusterShow(),o&&(y=c._spiderLeg,I=y._path,I.style.strokeDashoffset=0,y.setStyle({opacity:h}));this.setOpacity(.3),n._ignoreMove=!1,setTimeout(function(){n._animationEnd(),n.fire("spiderfied",{cluster:i,markers:t})},200)},_animationUnspiderfy:function(t){var e=this,i=this._group,n=i._map,r=i._featureGroup,a=t?n._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):n.latLngToLayerPoint(this._latlng),s=this.getAllChildMarkers(null,!0),u=L.Path.SVG,o,l,h,k,c,y;for(i._ignoreMove=!0,i._animationStart(),this.setOpacity(1),l=s.length-1;l>=0;l--)o=s[l],o._preSpiderfyLatlng&&(o.closePopup(),o.setLatLng(o._preSpiderfyLatlng),delete o._preSpiderfyLatlng,y=!0,o._setPos&&(o._setPos(a),y=!1),o.clusterHide&&(o.clusterHide(),y=!1),y&&r.removeLayer(o),u&&(h=o._spiderLeg,k=h._path,c=k.getTotalLength()+.1,k.style.strokeDashoffset=c,h.setStyle({opacity:0}
1)));i._ignoreMove=!1,setTimeout(function(){var I=0;for(l=s.length-1;l>=0;l--)o=s[l],o._spiderLeg&&I++;for(l=s.length-1;l>=0;l--)o=s[l],o._spiderLeg&&(o.clusterShow&&o.clusterShow(),o.setZIndexOffset&&o.setZIndexOffset(0),I>1&&r.removeLayer(o),n.removeLayer(o._spiderLeg),delete o._spiderLeg);i._animationEnd(),i.fire("unspiderfied",{cluster:e,markers:s})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),v.MarkerClusterGroup=w,v.MarkerCluster=F,Object.defineProperty(v,"__esModule",{value:!0})})}(at,at.exports)),at.exports}Dt();At();if(typeof document<"u"&&!document.getElementById("workers-map-css")){const M=document.createElement("style");M.id="workers-map-css",M.textContent=`
2    .workers-map-pin{background:none!important;border:none!important}
3    /* Branded cluster pins are rendered via iconCreateFunction as raw
4       divIcons; suppress the plugin's default halo so only our mark shows. */
5    .talent-cluster-pin{background:none!important;border:none!important}
6    .marker-cluster,.marker-cluster div{background:transparent!important;border:none!important;box-shadow:none!important}
7    /* Zoom control lives top-left (Leaflet standard). Nudge down slightly
8       to clear the safe-area / status bar on native shells. */
9    .leaflet-top.leaflet-left{
10      top:calc(env(safe-area-inset-top, 0px) + 8px)!important;
11      left:8px!important;
12    }
13  `,document.head.appendChild(M)}function _t(M,g,v="worker",w={}){return Pt({type:v,viewed:Ot(wt("worker",M)),locked:w.locked,full:w.dim,focused:g,dark:pt()})}function Ht(M){const g=M.meta??{};return{locked:g.isPrivate===!0,dim:g.isFull===!0}}const St={worker:Q.worker,sub:Q.sub,job:Q.job,sub_package:Q.sub_package,homeowner:Q.homeowner,permit_owner:Q.permit_owner,permit:Q.permit,violation:Q.violation,lead_post:Q.lead_post},$t={worker:"20 76% 43%",sub:"45 100% 43%",job:"212 30% 17%",sub_package:"265 54% 51%",homeowner:"186 81% 29%",permit_owner:"150 68% 37%",permit:"220 41% 47%",violation:"4 77% 40%",lead_post:"333 45% 42%"},it="#FBF5E9",jt=250;function Vt(M){const g=M.getAllChildMarkers(),v=g.length;let w=0;const F={};g.forEach(P=>{var X;const x=(X=P.options)==null?void 0:X.__pin;if(!x)return;const A=x.entityKind??Et(x.id)??"worker",N=A==="sub";F[A]=(F[A]??0)+1;const q=N?x.id:wt("worker",x.id);Ot(q)&&w++});const t=Object.keys(F),e=t.length===1?t[0]:null,i=t.sort().map(P=>`${P}:${F[P]}`).join(","),r=`${v<10?"s":v<100?"m":"l"}|${v}|${e??"_"}|${i}|${w}`,a=ot.get(r);if(a)return a;const s=e?St[e]??it:"#1F1F1F",u=e?$t[e]??"22 82% 55%":"22 82% 55%",o=v<10?36:v<100?44:52,l=v<10?13:v<100?15:16,h=e?"":t.slice(0,3).map((P,x)=>{const N=(-90+x*(360/Math.min(t.length,3)))*Math.PI/180,q=o/2,X=q+Math.cos(N)*q-5,nt=q+Math.sin(N)*q-5;return`<span style="position:absolute;
13left:${X}px;top:${nt}px;width:10px;height:10px;border-radius:50%;background:${St[P]??it};border:1.5px solid ${it};box-shadow:0 1px 2px rgba(0,0,0,.4);z-index:2"></span>`}).join(""),k=w>0?`<span style="position:absolute;right:-6px;bottom:-4px;background:#1F1F1F;color:${it};border:1.5px solid ${it};border-radius:999px;font:700 9px/1 'DM Sans',sans-serif;padding:2px 5px;white-space:nowrap;z-index:3">${w}/${v}</span>`:"",c=e==="sub"?"#241C00":it,y=`radial-gradient(circle at 35% 28%, ${qt(s,.14)} 0%, ${s} 60%, ${Kt(s,.1)} 100%)`,H=S.divIcon({html:`<div class="knuckl-cluster-body" style="position:relative;width:${o}px;height:${o}px;--pin-hue:${u};">
14        <div style="position:relative;z-index:1;width:100%;height:100%;border-radius:50%;background:${y};border:1.6px solid ${it};box-shadow:0 2px 6px rgba(0,0,0,.24);display:flex;align-items:center;justify-content:center;color:${c};font:800 ${l}px/1 'DM Sans',sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.22)">
15          
16          <span style="position:relative;z-index:2">${v}</span>
17        </div>
18        ${h}${k}
19      </div>`,className:"talent-cluster-pin",iconSize:[o,o],iconAnchor:[o/2,o/2]});if(ot.size>256){const P=ot.keys().next().value;P!==void 0&&ot.delete(P)}return ot.set(r,H),H}const ot=new Map;function Bt(M){const g=/^#?([0-9a-f]{6})$/i.exec(M);if(!g)return null;const v=parseInt(g[1],16);return[v>>16&255,v>>8&255,v&255]}function qt(M,g){const v=Bt(M);if(!v)return M;const[w,F,t]=v.map(e=>Math.round(e+(255-e)*g));return`rgb(${w},${F},${t})`}function Kt(M,g){const v=Bt(M);if(!v)return M;const[w,F,t]=v.map(e=>Math.round(e*(1-g)));return`rgb(${w},${F},${t})`}function Wt({workers:M,origin:g,onSelect:v,onWorkerSelect:w,viewProfileLabel:F,awayLabel:t,fillParent:e,focusedWorkerId:i,onClusterOpen:n,onBoundsChange:r,onMapTap:a,projects:s,onProjectTap:u,storms:o,focusCircle:l},h){const c=It()==="dark",y=m.useRef(null),I=m.useRef(null),[H,P]=m.useState(!1),x=m.useRef(null),A=m.useRef(null),N=m.useRef(null),q=m.useRef(new Map),X=m.useRef(new Map),nt=m.useRef(new Map),mt=m.useRef(new Map),Y=m.useRef(null),gt=m.useRef(0),$=m.useRef(null),Lt=m.useRef(!1),vt=m.useRef(v),ht=m.useRef(w),yt=m.useRef(i??null),dt=m.useRef(n),rt=m.useRef(u),st=m.useRef(r),ut=m.useRef(a);m.useEffect(()=>{vt.current=v,ht.current=w,yt.current=i??null,dt.current=n,rt.current=u,st.current=r,ut.current=a},[v,w,i,n,r,a,u]),m.useImperativeHandle(h,()=>({panTo:(_,f,d)=>{const T=x.current;if(!T)return;const O=d??Math.max(T.getZoom(),13);T.setView([_,f],O,{animate:!0})},fitBounds:(_,f)=>{const d=x.current;if(!(!d||!_||_.length===0))try{const T=S.latLngBounds(_.map(O=>[O.lat,O.lng]));d.fitBounds(T,{padding:(f==null?void 0:f.padding)??[40,40],...(f==null?void 0:f.maxZoom)!=null?{maxZoom:f.maxZoom}:{}})}catch{}}}),[]),m.useEffect(()=>{let _=null;const f=Ut(()=>{gt.current+=1,!_&&(_=setTimeout(()=>{var d;_=null,(d=$.current)==null||d.call($)},50))});return()=>{_&&clearTimeout(_),f()}},[]);const Ct=m.useRef(M);m.useEffect(()=>{Ct.current=M},[M]);const kt=m.useRef(g??null);return m.useEffect(()=>{kt.current=g??null},[g]),m.useEffect(()=>{if(!y.current||x.current)return;const f=g&&g.lat>=28&&g.lat<=28.9&&g.lng>=-81.8&&g.lng<=-80.9?[g.lat,g.lng]:[28.54,-81.38],d=S.map(y.current,{center:f,zoom:10,zoomControl:!0,attributionControl:!1,preferCanvas:!0});d.zoomControl.setPosition("bottomright");const T=d.zoomControl.getContainer();T&&T.classList.add("map-zoom-bottomright");const O=S.Control.extend({options:{position:"bottomright"},onAdd(){const E=S.DomUtil.create("div","leaflet-bar map-recenter-control"),B=S.DomUtil.create("a","",E);return B.href="#",B.title="Recenter",B.setAttribute("aria-label","Recenter map"),B.innerHTML='<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="7"/><circle cx="12" cy="12" r="1.6" fill="currentColor" stroke="none"/><path d="M12 1.8v3M12 19.2v3M1.8 12h3M19.2 12h3"/></svg>',S.DomEvent.on(B,"click",lt=>{S.DomEvent.stop(lt);const ct=kt.current;if(ct){d.setView([ct.lat,ct.lng],Math.max(d.getZoom(),12),{animate:!0});return}typeof navigator<"u"&&navigator.geolocation&&navigator.geolocation.getCurrentPosition(Mt=>{try{d.setView([Mt.coords.latitude,Mt.coords.longitude],Math.max(d.getZoom(),12),{animate:!0})}catch{}},()=>{},{maximumAge:6e4,timeout:8e3})}),S.DomEvent.disableClickPropagation(E),E}});new O().addTo(d),I.current=S.tileLayer(xt(pt()),{maxZoom:19,subdomains:"abcd",...Tt()}).addTo(d);const D=Gt(I.current,P),J=Zt(d);x.current=d;let C=null;const R=()=>{st.current&&(C&&clearTimeout(C),C=setTimeout(()=>{var E;try{const B=d.getBounds();(E=st.current)==null||E.call(st,{south:B.getSouth(),west:B.getWest(),north:B.getNorth(),east:B.getEast()})}catch{}},150))};d.on("moveend",R),d.on("zoomend",R);const G=()=>{var E;(X.current.size>0||Lt.current)&&((E=$.current)==null||E.call($))};let Z=null;const p=()=>{Z||(Z=setTimeout(()=>{Z=null,G()},80))};d.on("moveend",p),d.on("zoomend",p);let b=null;const U=()=>{b||(b=setTimeout(()=>{var E;b=null,(E=Y.current)==null||E.call(Y)},80))};
19d.on("moveend",U),d.on("zoomend",U),d.on("click",E=>{var lt;const B=E==null?void 0:E.latlng;(lt=ut.current)==null||lt.call(ut,B?{lat:B.lat,lng:B.lng}:void 0)});const V=setTimeout(R,200),K=()=>{try{d.invalidateSize()}catch{}},z=setTimeout(K,0),W=setTimeout(K,150),tt=setTimeout(K,400);let et=null;return typeof ResizeObserver<"u"&&y.current&&(et=new ResizeObserver(()=>K()),et.observe(y.current)),()=>{clearTimeout(z),clearTimeout(W),clearTimeout(tt),clearTimeout(V),C&&clearTimeout(C),Z&&clearTimeout(Z),b&&clearTimeout(b),et&&et.disconnect(),D(),J(),d.remove(),x.current=null,A.current=null}},[]),m.useEffect(()=>{const _=x.current;if(!_||A.current)return;const f=S.markerClusterGroup({showCoverageOnHover:!1,spiderfyOnMaxZoom:!0,disableClusteringAtZoom:16,zoomToBoundsOnClick:!1,maxClusterRadius:d=>d<=8?80:d<=10?60:d<=12?45:d<=13?32:d<=14?22:14,iconCreateFunction:Vt});return f.on("clusterclick",d=>{S.DomEvent.stopPropagation(d),d.originalEvent&&S.DomEvent.preventDefault(d.originalEvent);const O=d.layer.getAllChildMarkers().map(j=>{var D;return(D=j.options)==null?void 0:D.__pin}).filter(Boolean);dt.current&&O.length>0&&dt.current(O)}),_.addLayer(f),A.current=f,()=>{if(A.current){try{_.removeLayer(A.current)}catch{}A.current=null,q.current.clear(),nt.current.clear()}}},[]),m.useEffect(()=>{$.current=()=>{const f=A.current;if(!f)return;const d=q.current,T=new Set,O=[],j=[],D=Ct.current,J=yt.current,C=gt.current,R=x.current;let G=null;try{R&&(G=R.getBounds().pad(.5))}catch{}let Z=null;try{R&&D.length>jt&&(Z=R.getBounds().pad(2))}catch{}Lt.current=!!Z,D.forEach(p=>{if(Z&&J!==p.id&&!Z.contains([p.lat,p.lng]))return;T.add(p.id);const b=J===p.id,U=p.entityKind??Et(p.id)??"worker",V=Ht(p),K=`${b?1:0}|${U}|${C}|${V.locked?1:0}|${V.dim?1:0}`,z=d.get(p.id);if(!z){const W=nt.current.get(p.id);let tt;if(W)nt.current.delete(p.id),W.setLatLng([p.lat,p.lng]),W.setIcon(_t(p.id,b,U,V)),W.setZIndexOffset(b?1e3:0),W.options.__pin=p,tt=W;else{tt=S.marker([p.lat,p.lng],{icon:_t(p.id,b,U,V),zIndexOffset:b?1e3:0,__pin:p});const et=tt;et.on("click",E=>{S.DomEvent.stopPropagation(E);const B=et.options.__pin;
19Ft("worker",B.id),ht.current?ht.current(B):vt.current(B.id)})}d.set(p.id,{marker:tt,sig:K,lat:p.lat,lng:p.lng}),O.push(tt);return}z.marker.options.__pin=p,(z.lat!==p.lat||z.lng!==p.lng)&&(z.marker.setLatLng([p.lat,p.lng]),z.lat=p.lat,z.lng=p.lng),z.sig!==K&&(b||!G||G.contains([p.lat,p.lng])?(z.marker.setIcon(_t(p.id,b,U,V)),z.marker.setZIndexOffset(b?1e3:0),z.sig=K,X.current.delete(p.id)):X.current.set(p.id,K))}),d.forEach((p,b)=>{if(!T.has(b)){j.push(p.marker),d.delete(b);const U=nt.current;if(U.set(b,p.marker),U.size>500){const V=U.keys().next().value;V!==void 0&&U.delete(V)}}}),j.length&&f.removeLayers(j),O.length&&f.addLayers(O)};const _=requestAnimationFrame(()=>{var f;return(f=$.current)==null?void 0:f.call($)});return()=>cancelAnimationFrame(_)},[M,i]),m.useEffect(()=>{const _=x.current;if(!_)return;const f=S.layerGroup().addTo(_);for(const d of o??[])S.circle([d.lat,d.lng],{radius:Math.max(5,d.radius_miles)*1609.34,color:"#8C5A2B",weight:1,opacity:.5,fillColor:"#B4762F",fillOpacity:.12,interactive:!1}).addTo(f);return()=>{try{_.removeLayer(f)}catch{}}},[o]),m.useEffect(()=>{const _=x.current;if(!_||!l)return;let f=null;try{f=S.circle([l.lat,l.lng],{radius:Math.max(1,l.radiusMi)*1609.34,color:"#E2662A",weight:2,opacity:.85,dashArray:"6 6",fillColor:"#E2662A",fillOpacity:.08,interactive:!1}).addTo(_)}catch{}return()=>{try{f&&_.removeLayer(f)}catch{}}},[l==null?void 0:l.lat,l==null?void 0:l.lng,l==null?void 0:l.radiusMi,l]),m.useEffect(()=>{const _=x.current;if(!_||N.current)return;const f=S.layerGroup();return f.addTo(_),N.current=f,()=>{if(N.current){try{_.removeLayer(N.current)}catch{}N.current=null,mt.current.clear()}}},[]),m.useEffect(()=>{Y.current=()=>{const f=N.current,d=x.current;if(!f)return;const T=s??[],O=mt.current,j=!!rt.current;let D=null;try{d&&(D=d.getBounds().pad(.5))}catch{}const J=new Set;T.forEach(C=>{J.add(C.id);const R=!D||D.contains([C.lat,C.lng]),G=O.get(C.id);if(!R){if(G){try{f.removeLayer(G.marker)}catch{}O.delete(C.id)}return}if(!G){const Z=S.marker([C.lat,C.lng],{icon:Pt({type:"project",dark:pt(),quiet:!0}),interactive:j,keyboard:j,zIndexOffset:2e3});j&&Z.on("click",p=>{var b;S.DomEvent.stopPropagation(p),(b=rt.current)==null||b.call(rt,C.id)}),f.addLayer(Z),O.set(C.id,{marker:Z,lat:C.lat,lng:C.lng});return}(G.lat!==C.lat||G.lng!==C.lng)&&(G.marker.setLatLng([C.lat,C.lng]),G.lat=C.lat,G.lng=C.lng)}),O.forEach((C,R)=>
19{if(!J.has(R)){try{f.removeLayer(C.marker)}catch{}O.delete(R)}})};const _=requestAnimationFrame(()=>{var f;return(f=Y.current)==null?void 0:f.call(Y)});return()=>cancelAnimationFrame(_)},[s,u]),m.useEffect(()=>{const _=x.current;if(!_||!i)return;const f=M.find(d=>d.id===i);f&&_.setView([f.lat,f.lng],Math.max(_.getZoom(),13),{animate:!0})},[i,M]),m.useEffect(()=>{var _;(_=I.current)==null||_.setUrl(xt(c))},[c]),ft.jsxs("div",{className:e?"absolute inset-0 overflow-hidden":"relative rounded-card overflow-hidden border",style:e?{minHeight:200}:{height:"calc(100vh - 18rem)",minHeight:360,borderColor:c?"#2A2A2A":"#E2DED4"},children:[ft.jsx("div",{ref:y,className:"absolute inset-0",style:{background:Rt(c)}}),H&&ft.jsx(zt,{lat:g==null?void 0:g.lat,lng:g==null?void 0:g.lng,onRetry:()=>{var _;return(_=I.current)==null?void 0:_.redraw()}})]})}const _e=m.forwardRef(Wt);export{_e as default};

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.