@mapcomponents/react-maplibre 0.1.46 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/coverage/clover.xml +14 -10
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/index.html +17 -17
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +4 -4
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +103 -22
- package/coverage/lcov-report/src/components/MlMeasureTool/index.html +15 -15
- package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
- package/coverage/lcov-report/src/contexts/MapContext.tsx.html +1 -1
- package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
- package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
- package/coverage/lcov-report/src/contexts/index.html +1 -1
- package/coverage/lcov-report/src/hooks/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useMap.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useMapState.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useWms.js.html +2 -2
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +5 -2
- package/coverage/lcov.info +35 -23
- package/dist/index.esm.js +37 -2
- package/dist/index.esm.js.map +1 -1
- package/docs-build/{0.0ee4f98c.iframe.bundle.js → 0.968bdc5f.iframe.bundle.js} +2 -2
- package/docs-build/0.968bdc5f.iframe.bundle.js.map +1 -0
- package/docs-build/{1.bb3cf738.iframe.bundle.js → 1.3530bc86.iframe.bundle.js} +3 -3
- package/docs-build/1.3530bc86.iframe.bundle.js.map +1 -0
- package/docs-build/{17.97db5b3f.iframe.bundle.js → 17.c96fb6bc.iframe.bundle.js} +2 -2
- package/docs-build/17.c96fb6bc.iframe.bundle.js.map +1 -0
- package/docs-build/{18.f8d843df.iframe.bundle.js → 18.0947f810.iframe.bundle.js} +3 -3
- package/docs-build/18.0947f810.iframe.bundle.js.map +1 -0
- package/docs-build/{19.c45e6b08.iframe.bundle.js → 19.44204e5a.iframe.bundle.js} +2 -2
- package/docs-build/19.44204e5a.iframe.bundle.js.map +1 -0
- package/docs-build/{2.42c790e4.iframe.bundle.js → 2.c62e9630.iframe.bundle.js} +2 -2
- package/docs-build/2.c62e9630.iframe.bundle.js.map +1 -0
- package/docs-build/{20.120bbcfb.iframe.bundle.js → 20.50a2ad76.iframe.bundle.js} +2 -2
- package/docs-build/20.50a2ad76.iframe.bundle.js.map +1 -0
- package/docs-build/{21.37c885f1.iframe.bundle.js → 21.ce55b70e.iframe.bundle.js} +2 -2
- package/docs-build/21.ce55b70e.iframe.bundle.js.map +1 -0
- package/docs-build/{22.7fbc99f4.iframe.bundle.js → 22.639c6bb4.iframe.bundle.js} +2 -2
- package/docs-build/22.639c6bb4.iframe.bundle.js.map +1 -0
- package/docs-build/{3.1a37a83e.iframe.bundle.js → 3.afb0e0a5.iframe.bundle.js} +2 -2
- package/docs-build/3.afb0e0a5.iframe.bundle.js.map +1 -0
- package/docs-build/catalogue/mc_meta.json +1 -1
- package/docs-build/iframe.html +1 -1
- package/docs-build/main~24120820.e956ad2c.iframe.bundle.js +2 -0
- package/docs-build/main~24120820.e956ad2c.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~0ad7406a.93aea1be.iframe.bundle.js → vendors~main~0ad7406a.834c9ace.iframe.bundle.js} +3 -3
- package/docs-build/vendors~main~0ad7406a.834c9ace.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~0f485567.7297d057.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~0f485567.7297d057.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~41a6ab2c.da377733.iframe.bundle.js → vendors~main~41a6ab2c.19d97527.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~41a6ab2c.19d97527.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~57c1f6cb.86178471.iframe.bundle.js → vendors~main~57c1f6cb.8a8dd47e.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~57c1f6cb.8a8dd47e.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~73914085.e2f34f8e.iframe.bundle.js → vendors~main~73914085.2e61c0dc.iframe.bundle.js} +13 -13
- package/docs-build/vendors~main~73914085.2e61c0dc.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~9c5b28f6.eefa7445.iframe.bundle.js → vendors~main~9c5b28f6.32356887.iframe.bundle.js} +3 -3
- package/docs-build/vendors~main~9c5b28f6.32356887.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~b5906859.94dc520a.iframe.bundle.js +21 -0
- package/docs-build/vendors~main~b5906859.94dc520a.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~b8f44717.7b869975.iframe.bundle.js → vendors~main~b8f44717.8669cfb8.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~b8f44717.8669cfb8.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~b9cf3951.62d39717.iframe.bundle.js → vendors~main~b9cf3951.2a2025c3.iframe.bundle.js} +11 -11
- package/docs-build/vendors~main~b9cf3951.2a2025c3.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~d939e436.bb2b0303.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~d939e436.bb2b0303.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~f420d588.3481b43e.iframe.bundle.js +107 -0
- package/docs-build/vendors~main~f420d588.3481b43e.iframe.bundle.js.map +1 -0
- package/package.json +1 -1
- package/public/catalogue/mc_meta.json +1 -0
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +3 -3
- package/src/components/MlMeasureTool/MlMeasureTool.stories.js +68 -39
- package/src/components/MlMeasureTool/MlMeasureTool.tsx +38 -11
- package/src/components/MlWmsLoader/MlWmsLoader.tsx +1 -1
- package/src/hooks/useWms.js +1 -1
- package/src/index.ts +1 -0
- package/docs-build/0.0ee4f98c.iframe.bundle.js.map +0 -1
- package/docs-build/1.bb3cf738.iframe.bundle.js.map +0 -1
- package/docs-build/17.97db5b3f.iframe.bundle.js.map +0 -1
- package/docs-build/18.f8d843df.iframe.bundle.js.map +0 -1
- package/docs-build/19.c45e6b08.iframe.bundle.js.map +0 -1
- package/docs-build/2.42c790e4.iframe.bundle.js.map +0 -1
- package/docs-build/20.120bbcfb.iframe.bundle.js.map +0 -1
- package/docs-build/21.37c885f1.iframe.bundle.js.map +0 -1
- package/docs-build/22.7fbc99f4.iframe.bundle.js.map +0 -1
- package/docs-build/3.1a37a83e.iframe.bundle.js.map +0 -1
- package/docs-build/main~24120820.905c51c8.iframe.bundle.js +0 -2
- package/docs-build/main~24120820.905c51c8.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~0ad7406a.93aea1be.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~0f485567.6e7163ef.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~0f485567.6e7163ef.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~41a6ab2c.da377733.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~57c1f6cb.86178471.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~73914085.e2f34f8e.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~9c5b28f6.eefa7445.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b5906859.210afc21.iframe.bundle.js +0 -21
- package/docs-build/vendors~main~b5906859.210afc21.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b8f44717.7b869975.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b9cf3951.62d39717.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~d939e436.394e3bc7.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~d939e436.394e3bc7.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~f420d588.88814a6a.iframe.bundle.js +0 -107
- package/docs-build/vendors~main~f420d588.88814a6a.iframe.bundle.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendors~main~b5906859.94dc520a.iframe.bundle.js","sources":["webpack:///vendors~main~b5906859.94dc520a.iframe.bundle.js"],"mappings":"AAAA;;;;;AAs9OA;;;;;AAkxEA;;;;;;;;;AAwjBA","sourceRoot":""}
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
*
|
|
86
86
|
* You should have received a copy of the GNU Affero General Public License
|
|
87
87
|
* along with MarchingSquaresJS. If not, see <http://www.gnu.org/licenses/>.
|
|
88
|
-
*/(t,r),s=[],a=0;a<o.length;a++){for(var u=o[a],l=[],c=0;c<u.length;c++){var h=u[c];h.properties[n]?l.push(h.properties[n]):l.push(0),!0===i&&(h.properties.matrixPosition=[a,c])}s.push(l)}return s}(t,{zProperty:r,flip:!0}),a=function(t,e,n){for(var r=[],i=1;i<e.length;i++){var o=+e[i-1],s=+e[i],a=No(Io(Li(t,o,s-o))),u={};u.groupedRings=a,u[n]=o+"-"+s,r.push(u)}return r}(s,e,r);return g((a=function(t,e,n){var r=K(n),i=r[2]-r[0],o=r[3]-r[1],s=r[0],a=r[1],u=e[0].length-1,l=e.length-1,c=i/u,h=o/l,p=function(t){t[0]=t[0]*c+s,t[1]=t[1]*h+a};return t.forEach((function(t){t.groupedRings.forEach((function(t){t.forEach((function(t){t.forEach(p)}))}))})),t}(a,s,t)).map((function(t,e){if(o[e]&&!M(o[e]))throw new Error("Each mappedProperty is required to be an Object");var n=ht({},i,o[e]);return n[r]=t[r],v(t.groupedRings,n)})))},e.isolines=function(t,e,n){if(!M(n=n||{}))throw new Error("options is invalid");var r=n.zProperty||"elevation",i=n.commonProperties||{},o=n.breaksProperties||[];if(rt(t,"Point","Input must contain Points"),!e)throw new Error("breaks is required");if(!Array.isArray(e))throw new Error("breaks must be an Array");if(!M(i))throw new Error("commonProperties must be an Object");if(!Array.isArray(o))throw new Error("breaksProperties must be an Array");var s=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=e.zProperty||"elevation",r=e.flip,i=e.flags;rt(t,"Point","input must contain Points");for(var o=function(t,e){var n={};return k(t,(function(t){var e=$(t)[1];n[e]||(n[e]=[]),n[e].push(t)})),Object.keys(n).map((function(t){return n[t].sort((function(t,e){return $(t)[0]-$(e)[0]}))})).sort((function(t,n){return e?$(t[0])[1]-$(n[0])[1]:$(n[0])[1]-$(t[0])[1]}))}(t,r),s=[],a=0;a<o.length;a++){for(var u=o[a],l=[],c=0;c<u.length;c++){var h=u[c];h.properties[n]?l.push(h.properties[n]):l.push(0),!0===i&&(h.properties.matrixPosition=[a,c])}s.push(l)}return s}(t,{zProperty:r,flip:!0});return g(function(t,e,n){var r=K(n),i=r[2]-r[0],o=r[3]-r[1],s=r[0],a=r[1],u=e[0].length-1,l=e.length-1,c=i/u,h=o/l,p=function(t){t[0]=t[0]*c+s,t[1]=t[1]*h+a};return t.forEach((function(t){T(t,p)})),t}(function(t,e,n,r,i){for(var o=[],s=1;s<e.length;s++){var a=+e[s],u=ht({},r,i[s]);u[n]=a;var l=d(gt(t,a),u);o.push(l)}return o}(s,e,r,i,o),s,t))},e.kinks=function(t){var e,n,r={type:"FeatureCollection",features:[]};if("LineString"===(n="Feature"===t.type?t.geometry:t).type)e=[n.coordinates];else if("MultiLineString"===n.type)e=n.coordinates;else if("MultiPolygon"===n.type)e=[].concat.apply([],n.coordinates);else{if("Polygon"!==n.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=n.coordinates}return e.forEach((function(t){e.forEach((function(e){for(var n=0;n<t.length-1;n++)for(var i=n;i<e.length-1;i++){if(t===e){if(1===Math.abs(n-i))continue;if(0===n&&i===t.length-2&&t[n][0]===t[t.length-1][0]&&t[n][1]===t[t.length-1][1])continue}var o=_r(t[n][0],t[n][1],t[n+1][0],t[n+1][1],e[i][0],e[i][1],e[i+1][0],e[i+1][1]);o&&r.features.push(u([o[0],o[1]]))}}))})),r},e.length=Nr,e.lengthToDegrees=b,e.lengthToRadians=E,e.lineArc=ti,e.lineChunk=function(t,e,n){if(!M(n=n||{}))throw new Error("options is invalid");var r=n.units,i=n.reverse;if(!t)throw new Error("geojson is required");if(e<=0)throw new Error("segmentLength must be greater than 0");var o=[];return j(t,(function(t){i&&(t.geometry.coordinates=t.geometry.coordinates.reverse()),function(t,e,n,r){var i=Nr(t,{units:n});if(i<=e)return r(t);var o=i/e;Number.isInteger(o)||(o=Math.floor(o)+1);for(var s=0;s<o;s++)r(Sr(t,e*s,e*(s+1),{units:n}))}(t,e,r,(function(t){o.push(t)}))})),g(o)},e.lineDistance=Nr,e.lineEach=Y,e.lineIntersect=hr,e.lineOffset=function(t,e,n){if(!M(n=n||{}))throw new Error("options is invalid");var r=n.units;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");var i=ot(t),o=t.properties;switch(i){case"LineString":return To(t,e,r);case"MultiLineString":var s=[];return j(t,(function(t){s.push(To(t,e,r).geometry.coordinates)})),d(s,o);default:throw new Error("geometry "+i+" is not supported")}},e.lineOverlap=di,e.lineReduce=H,e.lineSegment=Bn,e.lineSlice=function(t,e,n){var r=$(n);if("LineString"!==ot(n))throw new Error("line must be a LineString");for(var i,o=fr(n,t),s=fr(n,e),a=[(i=o.properties.index<=s.properties.index?[o,s]:[s,o])[0].geometry.coordinates],u=i[0].properties.index+1;u<i[1].properties.index+1;u++)a.push(r[u]);return a.push(i[1].geometry.coordinates),p(a,n.properties)},e.lineSliceAlong=Sr,e.lineSplit=function(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var n=ot(t),r=ot(e);if("LineString"!==n)throw new Error("line must be LineString");if("FeatureCollection"===r)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===r)throw new Error("splitter cannot be a GeometryCollection");var i=Ar(e,{precision:7});switch(r){case"Point":return Kr(t,i);case"MultiPoint":return Zr(t,i);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Zr(t,hr(t,i))}},e.lineString=p,e.lineStringToPolygon=oi,e.lineStrings=f,e.lineToPolygon=oi,e.mask=function(t,e){var n,r=function(t){return c(t&&t.geometry.coordinates||[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]])}(e);return("FeatureCollection"===t.type?Pd(2===(n=t).features.length?mu.union(n.features[0].geometry.coordinates,n.features[1].geometry.coordinates):mu.union.apply(mu,n.features.map((function(t){return t.geometry.coordinates})))):Pd(mu.union(t.geometry.coordinates))).geometry.coordinates.forEach((function(t){r.geometry.coordinates.push(t[0])})),r},e.meta=Z,e.midpoint=function(t,e){return an(t,ve(t,e)/2,ln(t,e))},e.moranIndex=function(t,e){var n=e.inputField,r=e.threshold||1e5,i=e.p||2,o=e.binary||!1,s=fa(t,{alpha:e.alpha||-1,binary:o,p:i,standardization:e.standardization||!0,threshold:r}),a=[];k(t,(function(t){var e=t.properties||{};a.push(e[n])}));for(var u=ga(a),l=function(t){for(var e=ga(t),n=0,r=0,i=t;r<i.length;r++){var o=i[r];n+=Math.pow(o-e,2)}return n/t.length}(a),c=0,h=0,p=0,f=0,g=s.length,d=0;d<g;d++){for(var y=0,v=0;v<g;v++)c+=s[d][v]*(a[d]-u)*(a[v]-u),h+=s[d][v],p+=Math.pow(s[d][v]+s[v][d],2),y+=s[d][v]+s[v][d];f+=Math.pow(y,2)}var _=c/h/l,m=-1/(g-1),x=(g*g*(p*=.5)-g*f+h*h*3)/((g-1)*(g+1)*(h*h))-m*m,E=Math.sqrt(x);return{expectedMoranIndex:m,moranIndex:_,stdNorm:E,zNorm:(_-m)/E}},e.multiLineString=d,e.multiPoint=y,e.multiPolygon=v,e.nearest=qn,e.nearestPoint=qn,e.nearestPointOnLine=fr,e.nearestPointToLine=function(t,e,n){void 0===n&&(n={});var r=n.units,i=n.properties||{},o=function(t){var e=[];switch(t.geometry?t.geometry.type:t.type){case"GeometryCollection":return B(t,(function(t){"Point"===t.type&&e.push({type:"Feature",properties:{},geometry:t})})),{type:"FeatureCollection",features:e};case"FeatureCollection":return t.features=t.features.filter((function(t){return"Point"===t.geometry.type})),t;default:throw new Error("points must be a Point Collection")}}(t);if(!o.features.length)throw new Error("points must contain features");if(!e)throw new Error("line is required");if("LineString"!==ot(e))throw new Error("line must be a LineString");var s=1/0,a=null;return k(o,(function(t){var n=dr(t,e,{units:r});n<s&&(s=n,a=t)})),a&&(a.properties=ht({dist:s},a.properties,i)),a},e.planepoint=function(t,e){var n=Q(t),r=it(e).coordinates[0];if(r.length<4)throw new Error("OuterRing of a Polygon must have 4 or more Positions.");var i=e.properties||{},o=i.a,s=i.b,a=i.c,u=n[0],l=n[1],c=r[0][0],h=r[0][1],p=void 0!==o?o:r[0][2],f=r[1][0],g=r[1][1],d=void 0!==s?s:r[1][2],y=r[2][0],v=r[2][1],_=void 0!==a?a:r[2][2];return(_*(u-c)*(l-g)+p*(u-f)*(l-v)+d*(u-y)*(l-h)-d*(u-c)*(l-v)-_*(u-f)*(l-h)-p*(u-y)*(l-g))/((u-c)*(l-g)+(u-f)*(l-v)+(u-y)*(l-h)-(u-c)*(l-v)-(u-f)*(l-h)-(u-y)*(l-g))},e.point=u,e.pointGrid=Tr,e.pointOnFeature=mr,e.pointOnLine=fr,e.pointOnSurface=mr,e.pointToLineDistance=dr,e.points=l,e.pointsWithinPolygon=ye,e.polygon=c,e.polygonSmooth=function(t,e){var n=[],r=e.iterations||1;if(!t)throw new Error("inputPolys is required");return B(t,(function(t,e,i){var o,s,a;switch(t.type){case"Polygon":o=[[]];for(var u=0;u<r;u++)a=[[]],s=t,u>0&&(s=c(o).geometry),ca(s,a),o=a.slice(0);n.push(c(o,i));break;case"MultiPolygon":o=[[[]]];for(var l=0;l<r;l++)a=[[[]]],s=t,l>0&&(s=v(o).geometry),ha(s,a),o=a.slice(0);n.push(v(o,i));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}})),g(n)},e.polygonTangents=function(t,e){var n,r,i,o,s=$(t),a=$(e),l=K(e),c=0,h=null;switch(s[0]>l[0]&&s[0]<l[2]&&s[1]>l[1]&&s[1]<l[3]&&(c=(h=qn(t,pn(e))).properties.featureIndex),ot(e)){case"Polygon":n=a[0][c],r=a[0][0],null!==h&&h.geometry.coordinates[1]<s[1]&&(r=a[0][c]),o=wi(a[0][0],a[0][a[0].length-1],s);var p=Ei(a[0],s,o,i,n,r);n=p[0],r=p[1];break;case"MultiPolygon":for(var f=0,d=0,y=0,v=0;v<a[0].length;v++){f=v;for(var _=!1,m=0;m<a[0][v].length;m++){if(d=m,y===c){_=!0;break}y++}if(_)break}n=a[0][f][d],r=a[0][f][d],o=wi(a[0][0][0],a[0][0][a[0][0].length-1],s),a.forEach((function(t){var e=Ei(t[0],s,o,i,n,r);n=e[0],r=e[1]}))}return g([u(n),u(r)])},e.polygonToLine=ni,e.polygonToLineString=ni,e.polygonize=function(t){var e=qo.fromGeoJson(t);e.deleteDangles(),e.deleteCutEdges();var n=[],r=[];return e.getEdgeRings().filter((function(t){return t.isValid()})).forEach((function(t){t.isHole()?n.push(t):r.push(t)})),n.forEach((function(t){Go.findEdgeRingContaining(t,r)&&r.push(t)})),g(r.map((function(t){return t.toPolygon()})))},e.polygons=h,e.projection=xa,e.propEach=D,e.propReduce=F,e.propertiesContainsFilter=Ta,e.radians2degrees=I,e.radiansToDegrees=I,e.radiansToDistance=x,e.radiansToLength=x,e.random=Ca,e.randomLineString=Ia,e.randomPoint=ba,e.randomPolygon=wa,e.randomPosition=Ea,e.rewind=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=e.reverse||!1,r=e.mutate||!1;if(!t)throw new Error("<geojson> is required");if("boolean"!=typeof n)throw new Error("<reverse> must be a boolean");if("boolean"!=typeof r)throw new Error("<mutate> must be a boolean");!1===r&&(t=be(t));var i=[];switch(t.type){case"GeometryCollection":return B(t,(function(t){Ni(t,n)})),t;case"FeatureCollection":return k(t,(function(t){k(Ni(t,n),(function(t){i.push(t)}))})),g(i)}return Ni(t,n)},e.rhumbBearing=_i,e.rhumbDestination=xi,e.rhumbDistance=gr,e.round=m,e.sample=function(t,e){if(!t)throw new Error("featurecollection is required");if(null==e)throw new Error("num is required");if("number"!=typeof e)throw new Error("num must be a number");return g(function(t,e){for(var n,r,i=t.slice(0),o=t.length,s=o-e;o-- >s;)n=i[r=Math.floor((o+1)*Math.random())],i[r]=i[o],i[o]=n;return i.slice(s)}(t.features,e))},e.sector=function(t,e,n,r,i){if(!M(i=i||{}))throw new Error("options is invalid");var o=i.properties;if(!t)throw new Error("center is required");if(null==n)throw new Error("bearing1 is required");if(null==r)throw new Error("bearing2 is required");if(!e)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");if(vi(n)===vi(r))return un(t,e,i);var s=$(t),a=ti(t,e,n,r,i),u=[[s]];return T(a,(function(t){u[0].push(t)})),u[0].push(s),c(u,o)},e.segmentEach=V,e.segmentReduce=X,e.shortestPath=function(t,e,n){if(!M(n=n||{}))throw new Error("options is invalid");var r=n.resolution,i=n.minDistance,o=n.obstacles||g([]);if(!t)throw new Error("start is required");if(!e)throw new Error("end is required");if(r&&!P(r)||r<=0)throw new Error("options.resolution must be a number, greater than 0");if(i)throw new Error("options.minDistance is not yet implemented");var a=Q(t),l=Q(e);switch(t=u(a),e=u(l),ot(o)){case"FeatureCollection":if(0===o.features.length)return p([a,l]);break;case"Polygon":o=g([s(it(o))]);break;default:throw new Error("invalid obstacles")}var c=o;c.features.push(t),c.features.push(e);var h=K(Mo(rn(K(c)),1.15));r||(r=ve([h[0],h[1]],[h[2],h[1]],n)/100),c.features.pop(),c.features.pop();for(var f=h[0],d=h[1],y=h[2],v=h[3],_=r/ve([f,d],[y,d],n)*(y-f),m=r/ve([f,d],[f,v],n)*(v-d),x=y-f,E=v-d,b=Math.floor(x/_),w=Math.floor(E/m),I=(x-b*_)/2,N=[],S=[],C=[],L=[],O=1/0,R=1/0,T=v-(E-w*m)/2,A=0;T>=d;){for(var D=[],F=[],k=f+I,G=0;k<=y;){var q=u([k,T]),B=Es(q,o);D.push(B?0:1),F.push(k+"|"+T);var z=ve(q,t);!B&&z<O&&(O=z,C={x:G,y:A});var j=ve(q,e);!B&&j<R&&(R=j,L={x:G,y:A}),k+=_,G++}S.push(D),N.push(F),T-=m,A++}var U=new _s(S,{diagonal:!0}),V=U.grid[C.y][C.x],X=U.grid[L.y][L.x],Y=vs.search(U,V,X),H=[a];return Y.forEach((function(t){var e=N[t.x][t.y].split("|");H.push([+e[0],+e[1]])})),H.push(l),Xe(p(H))},e.simplify=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,r=e.highQuality||!1,i=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==i&&(t=be(t)),B(t,(function(t){!function(t,e,n){var r=t.type;if("Point"===r||"MultiPoint"===r)return t;Xe(t,!0);var i=t.coordinates;switch(r){case"LineString":t.coordinates=Qe(i,e,n);break;case"MultiLineString":t.coordinates=i.map((function(t){return Qe(t,e,n)}));break;case"Polygon":t.coordinates=$e(i,e,n);break;case"MultiPolygon":t.coordinates=i.map((function(t){return $e(t,e,n)}))}}(t,n,r)})),t},e.square=sn,e.squareGrid=Md,e.standardDeviationalEllipse=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=e.steps||64,r=e.weight,i=e.properties||{};if(!P(n))throw new Error("steps must be a number");if(!M(i))throw new Error("properties must be a number");var o=q(t).length,s=ua(t,{weight:r}),a=0,u=0,l=0;k(t,(function(t){var e=t.properties[r]||1,n=la($(t),$(s));a+=Math.pow(n.x,2)*e,u+=Math.pow(n.y,2)*e,l+=n.x*n.y*e}));var c=a-u,h=Math.sqrt(Math.pow(c,2)+4*Math.pow(l,2)),p=2*l,f=Math.atan((c+h)/p),d=180*f/Math.PI,y=0,v=0,_=0;k(t,(function(t){var e=t.properties[r]||1,n=la($(t),$(s));y+=Math.pow(n.x*Math.cos(f)-n.y*Math.sin(f),2)*e,v+=Math.pow(n.x*Math.sin(f)+n.y*Math.cos(f),2)*e,_+=e}));var m=Math.sqrt(2*y/_),x=Math.sqrt(2*v/_),E=sa(s,m,x,{units:"degrees",angle:d,steps:n,properties:i}),b=ye(t,g([E])),w={meanCenterCoordinates:$(s),semiMajorAxis:m,semiMinorAxis:x,numberOfFeatures:o,angle:d,percentageWithinEllipse:100*q(b).length/o};return E.properties.standardDeviationalEllipse=w,E},e.tag=function(t,e,n,r){return t=be(t),e=be(e),k(t,(function(t){t.properties||(t.properties={}),k(e,(function(e){void 0===t.properties[r]&&ge(t,e)&&(t.properties[r]=e.properties[n])}))})),t},e.tesselate=function(t){if(!t.geometry||"Polygon"!==t.geometry.type&&"MultiPolygon"!==t.geometry.type)throw new Error("input must be a Polygon or MultiPolygon");var e={type:"FeatureCollection",features:[]};return"Polygon"===t.geometry.type?e.features=Gn(t.geometry.coordinates):t.geometry.coordinates.forEach((function(t){e.features=e.features.concat(Gn(t))})),e},e.tin=_e,e.toMercator=da,e.toWgs84=ya,e.transformRotate=Po,e.transformScale=Mo,e.transformTranslate=function(t,e,n,r){if(!M(r=r||{}))throw new Error("options is invalid");var i=r.units,o=r.zTranslation,s=r.mutate;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");if(o&&"number"!=typeof o&&isNaN(o))throw new Error("zTranslation is not a number");if(o=void 0!==o?o:0,0===e&&0===o)return t;if(null==n||isNaN(n))throw new Error("direction is required");return e<0&&(e=-e,n+=180),!1!==s&&void 0!==s||(t=be(t)),T(t,(function(t){var r=$(xi(t,e,n,{units:i}));t[0]=r[0],t[1]=r[1],o&&3===t.length&&(t[2]+=o)})),t},e.triangleGrid=Ld,e.truncate=Ar,e.union=function(t,e,n){void 0===n&&(n={});var r=it(t),i=it(e),o=mu.union(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?c(o[0],n.properties):v(o,n.properties)},e.unitsFactors=i,e.unkinkPolygon=function(t){var e=[];return j(t,(function(t){"Polygon"===t.geometry.type&&k(kr(t),(function(n){e.push(c(n.geometry.coordinates,t.properties))}))})),g(e)},e.validateBBox=L,e.validateId=O,e.voronoi=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=e.bbox||[-180,-85,180,85];if(!t)throw new Error("points is required");if(!Array.isArray(n))throw new Error("bbox is invalid");return rt(t,"Point","points"),g(function(){var t=ws,e=Is,n=null;function r(r){return new ia(r.map((function(n,i){var o=[Math.round(t(n,i,r)/ea)*ea,Math.round(e(n,i,r)/ea)*ea];return o.index=i,o.data=n,o})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:bs(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:bs(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}().x((function(t){return t.geometry.coordinates[0]})).y((function(t){return t.geometry.coordinates[1]})).extent([[n[0],n[1]],[n[2],n[3]]]).polygons(t.features).map(oa))},e.within=ye,Object.defineProperty(e,"__esModule",{value:!0})}(e)}).call(this,n(162))}}]);
|
|
89
|
-
//# sourceMappingURL=vendors~main~b8f44717.
|
|
88
|
+
*/(t,r),s=[],a=0;a<o.length;a++){for(var u=o[a],l=[],c=0;c<u.length;c++){var h=u[c];h.properties[n]?l.push(h.properties[n]):l.push(0),!0===i&&(h.properties.matrixPosition=[a,c])}s.push(l)}return s}(t,{zProperty:r,flip:!0}),a=function(t,e,n){for(var r=[],i=1;i<e.length;i++){var o=+e[i-1],s=+e[i],a=No(Io(Li(t,o,s-o))),u={};u.groupedRings=a,u[n]=o+"-"+s,r.push(u)}return r}(s,e,r);return g((a=function(t,e,n){var r=K(n),i=r[2]-r[0],o=r[3]-r[1],s=r[0],a=r[1],u=e[0].length-1,l=e.length-1,c=i/u,h=o/l,p=function(t){t[0]=t[0]*c+s,t[1]=t[1]*h+a};return t.forEach((function(t){t.groupedRings.forEach((function(t){t.forEach((function(t){t.forEach(p)}))}))})),t}(a,s,t)).map((function(t,e){if(o[e]&&!M(o[e]))throw new Error("Each mappedProperty is required to be an Object");var n=ht({},i,o[e]);return n[r]=t[r],v(t.groupedRings,n)})))},e.isolines=function(t,e,n){if(!M(n=n||{}))throw new Error("options is invalid");var r=n.zProperty||"elevation",i=n.commonProperties||{},o=n.breaksProperties||[];if(rt(t,"Point","Input must contain Points"),!e)throw new Error("breaks is required");if(!Array.isArray(e))throw new Error("breaks must be an Array");if(!M(i))throw new Error("commonProperties must be an Object");if(!Array.isArray(o))throw new Error("breaksProperties must be an Array");var s=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=e.zProperty||"elevation",r=e.flip,i=e.flags;rt(t,"Point","input must contain Points");for(var o=function(t,e){var n={};return k(t,(function(t){var e=$(t)[1];n[e]||(n[e]=[]),n[e].push(t)})),Object.keys(n).map((function(t){return n[t].sort((function(t,e){return $(t)[0]-$(e)[0]}))})).sort((function(t,n){return e?$(t[0])[1]-$(n[0])[1]:$(n[0])[1]-$(t[0])[1]}))}(t,r),s=[],a=0;a<o.length;a++){for(var u=o[a],l=[],c=0;c<u.length;c++){var h=u[c];h.properties[n]?l.push(h.properties[n]):l.push(0),!0===i&&(h.properties.matrixPosition=[a,c])}s.push(l)}return s}(t,{zProperty:r,flip:!0});return g(function(t,e,n){var r=K(n),i=r[2]-r[0],o=r[3]-r[1],s=r[0],a=r[1],u=e[0].length-1,l=e.length-1,c=i/u,h=o/l,p=function(t){t[0]=t[0]*c+s,t[1]=t[1]*h+a};return t.forEach((function(t){T(t,p)})),t}(function(t,e,n,r,i){for(var o=[],s=1;s<e.length;s++){var a=+e[s],u=ht({},r,i[s]);u[n]=a;var l=d(gt(t,a),u);o.push(l)}return o}(s,e,r,i,o),s,t))},e.kinks=function(t){var e,n,r={type:"FeatureCollection",features:[]};if("LineString"===(n="Feature"===t.type?t.geometry:t).type)e=[n.coordinates];else if("MultiLineString"===n.type)e=n.coordinates;else if("MultiPolygon"===n.type)e=[].concat.apply([],n.coordinates);else{if("Polygon"!==n.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=n.coordinates}return e.forEach((function(t){e.forEach((function(e){for(var n=0;n<t.length-1;n++)for(var i=n;i<e.length-1;i++){if(t===e){if(1===Math.abs(n-i))continue;if(0===n&&i===t.length-2&&t[n][0]===t[t.length-1][0]&&t[n][1]===t[t.length-1][1])continue}var o=_r(t[n][0],t[n][1],t[n+1][0],t[n+1][1],e[i][0],e[i][1],e[i+1][0],e[i+1][1]);o&&r.features.push(u([o[0],o[1]]))}}))})),r},e.length=Nr,e.lengthToDegrees=b,e.lengthToRadians=E,e.lineArc=ti,e.lineChunk=function(t,e,n){if(!M(n=n||{}))throw new Error("options is invalid");var r=n.units,i=n.reverse;if(!t)throw new Error("geojson is required");if(e<=0)throw new Error("segmentLength must be greater than 0");var o=[];return j(t,(function(t){i&&(t.geometry.coordinates=t.geometry.coordinates.reverse()),function(t,e,n,r){var i=Nr(t,{units:n});if(i<=e)return r(t);var o=i/e;Number.isInteger(o)||(o=Math.floor(o)+1);for(var s=0;s<o;s++)r(Sr(t,e*s,e*(s+1),{units:n}))}(t,e,r,(function(t){o.push(t)}))})),g(o)},e.lineDistance=Nr,e.lineEach=Y,e.lineIntersect=hr,e.lineOffset=function(t,e,n){if(!M(n=n||{}))throw new Error("options is invalid");var r=n.units;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");var i=ot(t),o=t.properties;switch(i){case"LineString":return To(t,e,r);case"MultiLineString":var s=[];return j(t,(function(t){s.push(To(t,e,r).geometry.coordinates)})),d(s,o);default:throw new Error("geometry "+i+" is not supported")}},e.lineOverlap=di,e.lineReduce=H,e.lineSegment=Bn,e.lineSlice=function(t,e,n){var r=$(n);if("LineString"!==ot(n))throw new Error("line must be a LineString");for(var i,o=fr(n,t),s=fr(n,e),a=[(i=o.properties.index<=s.properties.index?[o,s]:[s,o])[0].geometry.coordinates],u=i[0].properties.index+1;u<i[1].properties.index+1;u++)a.push(r[u]);return a.push(i[1].geometry.coordinates),p(a,n.properties)},e.lineSliceAlong=Sr,e.lineSplit=function(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var n=ot(t),r=ot(e);if("LineString"!==n)throw new Error("line must be LineString");if("FeatureCollection"===r)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===r)throw new Error("splitter cannot be a GeometryCollection");var i=Ar(e,{precision:7});switch(r){case"Point":return Kr(t,i);case"MultiPoint":return Zr(t,i);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Zr(t,hr(t,i))}},e.lineString=p,e.lineStringToPolygon=oi,e.lineStrings=f,e.lineToPolygon=oi,e.mask=function(t,e){var n,r=function(t){return c(t&&t.geometry.coordinates||[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]])}(e);return("FeatureCollection"===t.type?Pd(2===(n=t).features.length?mu.union(n.features[0].geometry.coordinates,n.features[1].geometry.coordinates):mu.union.apply(mu,n.features.map((function(t){return t.geometry.coordinates})))):Pd(mu.union(t.geometry.coordinates))).geometry.coordinates.forEach((function(t){r.geometry.coordinates.push(t[0])})),r},e.meta=Z,e.midpoint=function(t,e){return an(t,ve(t,e)/2,ln(t,e))},e.moranIndex=function(t,e){var n=e.inputField,r=e.threshold||1e5,i=e.p||2,o=e.binary||!1,s=fa(t,{alpha:e.alpha||-1,binary:o,p:i,standardization:e.standardization||!0,threshold:r}),a=[];k(t,(function(t){var e=t.properties||{};a.push(e[n])}));for(var u=ga(a),l=function(t){for(var e=ga(t),n=0,r=0,i=t;r<i.length;r++){var o=i[r];n+=Math.pow(o-e,2)}return n/t.length}(a),c=0,h=0,p=0,f=0,g=s.length,d=0;d<g;d++){for(var y=0,v=0;v<g;v++)c+=s[d][v]*(a[d]-u)*(a[v]-u),h+=s[d][v],p+=Math.pow(s[d][v]+s[v][d],2),y+=s[d][v]+s[v][d];f+=Math.pow(y,2)}var _=c/h/l,m=-1/(g-1),x=(g*g*(p*=.5)-g*f+h*h*3)/((g-1)*(g+1)*(h*h))-m*m,E=Math.sqrt(x);return{expectedMoranIndex:m,moranIndex:_,stdNorm:E,zNorm:(_-m)/E}},e.multiLineString=d,e.multiPoint=y,e.multiPolygon=v,e.nearest=qn,e.nearestPoint=qn,e.nearestPointOnLine=fr,e.nearestPointToLine=function(t,e,n){void 0===n&&(n={});var r=n.units,i=n.properties||{},o=function(t){var e=[];switch(t.geometry?t.geometry.type:t.type){case"GeometryCollection":return B(t,(function(t){"Point"===t.type&&e.push({type:"Feature",properties:{},geometry:t})})),{type:"FeatureCollection",features:e};case"FeatureCollection":return t.features=t.features.filter((function(t){return"Point"===t.geometry.type})),t;default:throw new Error("points must be a Point Collection")}}(t);if(!o.features.length)throw new Error("points must contain features");if(!e)throw new Error("line is required");if("LineString"!==ot(e))throw new Error("line must be a LineString");var s=1/0,a=null;return k(o,(function(t){var n=dr(t,e,{units:r});n<s&&(s=n,a=t)})),a&&(a.properties=ht({dist:s},a.properties,i)),a},e.planepoint=function(t,e){var n=Q(t),r=it(e).coordinates[0];if(r.length<4)throw new Error("OuterRing of a Polygon must have 4 or more Positions.");var i=e.properties||{},o=i.a,s=i.b,a=i.c,u=n[0],l=n[1],c=r[0][0],h=r[0][1],p=void 0!==o?o:r[0][2],f=r[1][0],g=r[1][1],d=void 0!==s?s:r[1][2],y=r[2][0],v=r[2][1],_=void 0!==a?a:r[2][2];return(_*(u-c)*(l-g)+p*(u-f)*(l-v)+d*(u-y)*(l-h)-d*(u-c)*(l-v)-_*(u-f)*(l-h)-p*(u-y)*(l-g))/((u-c)*(l-g)+(u-f)*(l-v)+(u-y)*(l-h)-(u-c)*(l-v)-(u-f)*(l-h)-(u-y)*(l-g))},e.point=u,e.pointGrid=Tr,e.pointOnFeature=mr,e.pointOnLine=fr,e.pointOnSurface=mr,e.pointToLineDistance=dr,e.points=l,e.pointsWithinPolygon=ye,e.polygon=c,e.polygonSmooth=function(t,e){var n=[],r=e.iterations||1;if(!t)throw new Error("inputPolys is required");return B(t,(function(t,e,i){var o,s,a;switch(t.type){case"Polygon":o=[[]];for(var u=0;u<r;u++)a=[[]],s=t,u>0&&(s=c(o).geometry),ca(s,a),o=a.slice(0);n.push(c(o,i));break;case"MultiPolygon":o=[[[]]];for(var l=0;l<r;l++)a=[[[]]],s=t,l>0&&(s=v(o).geometry),ha(s,a),o=a.slice(0);n.push(v(o,i));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}})),g(n)},e.polygonTangents=function(t,e){var n,r,i,o,s=$(t),a=$(e),l=K(e),c=0,h=null;switch(s[0]>l[0]&&s[0]<l[2]&&s[1]>l[1]&&s[1]<l[3]&&(c=(h=qn(t,pn(e))).properties.featureIndex),ot(e)){case"Polygon":n=a[0][c],r=a[0][0],null!==h&&h.geometry.coordinates[1]<s[1]&&(r=a[0][c]),o=wi(a[0][0],a[0][a[0].length-1],s);var p=Ei(a[0],s,o,i,n,r);n=p[0],r=p[1];break;case"MultiPolygon":for(var f=0,d=0,y=0,v=0;v<a[0].length;v++){f=v;for(var _=!1,m=0;m<a[0][v].length;m++){if(d=m,y===c){_=!0;break}y++}if(_)break}n=a[0][f][d],r=a[0][f][d],o=wi(a[0][0][0],a[0][0][a[0][0].length-1],s),a.forEach((function(t){var e=Ei(t[0],s,o,i,n,r);n=e[0],r=e[1]}))}return g([u(n),u(r)])},e.polygonToLine=ni,e.polygonToLineString=ni,e.polygonize=function(t){var e=qo.fromGeoJson(t);e.deleteDangles(),e.deleteCutEdges();var n=[],r=[];return e.getEdgeRings().filter((function(t){return t.isValid()})).forEach((function(t){t.isHole()?n.push(t):r.push(t)})),n.forEach((function(t){Go.findEdgeRingContaining(t,r)&&r.push(t)})),g(r.map((function(t){return t.toPolygon()})))},e.polygons=h,e.projection=xa,e.propEach=D,e.propReduce=F,e.propertiesContainsFilter=Ta,e.radians2degrees=I,e.radiansToDegrees=I,e.radiansToDistance=x,e.radiansToLength=x,e.random=Ca,e.randomLineString=Ia,e.randomPoint=ba,e.randomPolygon=wa,e.randomPosition=Ea,e.rewind=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=e.reverse||!1,r=e.mutate||!1;if(!t)throw new Error("<geojson> is required");if("boolean"!=typeof n)throw new Error("<reverse> must be a boolean");if("boolean"!=typeof r)throw new Error("<mutate> must be a boolean");!1===r&&(t=be(t));var i=[];switch(t.type){case"GeometryCollection":return B(t,(function(t){Ni(t,n)})),t;case"FeatureCollection":return k(t,(function(t){k(Ni(t,n),(function(t){i.push(t)}))})),g(i)}return Ni(t,n)},e.rhumbBearing=_i,e.rhumbDestination=xi,e.rhumbDistance=gr,e.round=m,e.sample=function(t,e){if(!t)throw new Error("featurecollection is required");if(null==e)throw new Error("num is required");if("number"!=typeof e)throw new Error("num must be a number");return g(function(t,e){for(var n,r,i=t.slice(0),o=t.length,s=o-e;o-- >s;)n=i[r=Math.floor((o+1)*Math.random())],i[r]=i[o],i[o]=n;return i.slice(s)}(t.features,e))},e.sector=function(t,e,n,r,i){if(!M(i=i||{}))throw new Error("options is invalid");var o=i.properties;if(!t)throw new Error("center is required");if(null==n)throw new Error("bearing1 is required");if(null==r)throw new Error("bearing2 is required");if(!e)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");if(vi(n)===vi(r))return un(t,e,i);var s=$(t),a=ti(t,e,n,r,i),u=[[s]];return T(a,(function(t){u[0].push(t)})),u[0].push(s),c(u,o)},e.segmentEach=V,e.segmentReduce=X,e.shortestPath=function(t,e,n){if(!M(n=n||{}))throw new Error("options is invalid");var r=n.resolution,i=n.minDistance,o=n.obstacles||g([]);if(!t)throw new Error("start is required");if(!e)throw new Error("end is required");if(r&&!P(r)||r<=0)throw new Error("options.resolution must be a number, greater than 0");if(i)throw new Error("options.minDistance is not yet implemented");var a=Q(t),l=Q(e);switch(t=u(a),e=u(l),ot(o)){case"FeatureCollection":if(0===o.features.length)return p([a,l]);break;case"Polygon":o=g([s(it(o))]);break;default:throw new Error("invalid obstacles")}var c=o;c.features.push(t),c.features.push(e);var h=K(Mo(rn(K(c)),1.15));r||(r=ve([h[0],h[1]],[h[2],h[1]],n)/100),c.features.pop(),c.features.pop();for(var f=h[0],d=h[1],y=h[2],v=h[3],_=r/ve([f,d],[y,d],n)*(y-f),m=r/ve([f,d],[f,v],n)*(v-d),x=y-f,E=v-d,b=Math.floor(x/_),w=Math.floor(E/m),I=(x-b*_)/2,N=[],S=[],C=[],L=[],O=1/0,R=1/0,T=v-(E-w*m)/2,A=0;T>=d;){for(var D=[],F=[],k=f+I,G=0;k<=y;){var q=u([k,T]),B=Es(q,o);D.push(B?0:1),F.push(k+"|"+T);var z=ve(q,t);!B&&z<O&&(O=z,C={x:G,y:A});var j=ve(q,e);!B&&j<R&&(R=j,L={x:G,y:A}),k+=_,G++}S.push(D),N.push(F),T-=m,A++}var U=new _s(S,{diagonal:!0}),V=U.grid[C.y][C.x],X=U.grid[L.y][L.x],Y=vs.search(U,V,X),H=[a];return Y.forEach((function(t){var e=N[t.x][t.y].split("|");H.push([+e[0],+e[1]])})),H.push(l),Xe(p(H))},e.simplify=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,r=e.highQuality||!1,i=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==i&&(t=be(t)),B(t,(function(t){!function(t,e,n){var r=t.type;if("Point"===r||"MultiPoint"===r)return t;Xe(t,!0);var i=t.coordinates;switch(r){case"LineString":t.coordinates=Qe(i,e,n);break;case"MultiLineString":t.coordinates=i.map((function(t){return Qe(t,e,n)}));break;case"Polygon":t.coordinates=$e(i,e,n);break;case"MultiPolygon":t.coordinates=i.map((function(t){return $e(t,e,n)}))}}(t,n,r)})),t},e.square=sn,e.squareGrid=Md,e.standardDeviationalEllipse=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=e.steps||64,r=e.weight,i=e.properties||{};if(!P(n))throw new Error("steps must be a number");if(!M(i))throw new Error("properties must be a number");var o=q(t).length,s=ua(t,{weight:r}),a=0,u=0,l=0;k(t,(function(t){var e=t.properties[r]||1,n=la($(t),$(s));a+=Math.pow(n.x,2)*e,u+=Math.pow(n.y,2)*e,l+=n.x*n.y*e}));var c=a-u,h=Math.sqrt(Math.pow(c,2)+4*Math.pow(l,2)),p=2*l,f=Math.atan((c+h)/p),d=180*f/Math.PI,y=0,v=0,_=0;k(t,(function(t){var e=t.properties[r]||1,n=la($(t),$(s));y+=Math.pow(n.x*Math.cos(f)-n.y*Math.sin(f),2)*e,v+=Math.pow(n.x*Math.sin(f)+n.y*Math.cos(f),2)*e,_+=e}));var m=Math.sqrt(2*y/_),x=Math.sqrt(2*v/_),E=sa(s,m,x,{units:"degrees",angle:d,steps:n,properties:i}),b=ye(t,g([E])),w={meanCenterCoordinates:$(s),semiMajorAxis:m,semiMinorAxis:x,numberOfFeatures:o,angle:d,percentageWithinEllipse:100*q(b).length/o};return E.properties.standardDeviationalEllipse=w,E},e.tag=function(t,e,n,r){return t=be(t),e=be(e),k(t,(function(t){t.properties||(t.properties={}),k(e,(function(e){void 0===t.properties[r]&&ge(t,e)&&(t.properties[r]=e.properties[n])}))})),t},e.tesselate=function(t){if(!t.geometry||"Polygon"!==t.geometry.type&&"MultiPolygon"!==t.geometry.type)throw new Error("input must be a Polygon or MultiPolygon");var e={type:"FeatureCollection",features:[]};return"Polygon"===t.geometry.type?e.features=Gn(t.geometry.coordinates):t.geometry.coordinates.forEach((function(t){e.features=e.features.concat(Gn(t))})),e},e.tin=_e,e.toMercator=da,e.toWgs84=ya,e.transformRotate=Po,e.transformScale=Mo,e.transformTranslate=function(t,e,n,r){if(!M(r=r||{}))throw new Error("options is invalid");var i=r.units,o=r.zTranslation,s=r.mutate;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");if(o&&"number"!=typeof o&&isNaN(o))throw new Error("zTranslation is not a number");if(o=void 0!==o?o:0,0===e&&0===o)return t;if(null==n||isNaN(n))throw new Error("direction is required");return e<0&&(e=-e,n+=180),!1!==s&&void 0!==s||(t=be(t)),T(t,(function(t){var r=$(xi(t,e,n,{units:i}));t[0]=r[0],t[1]=r[1],o&&3===t.length&&(t[2]+=o)})),t},e.triangleGrid=Ld,e.truncate=Ar,e.union=function(t,e,n){void 0===n&&(n={});var r=it(t),i=it(e),o=mu.union(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?c(o[0],n.properties):v(o,n.properties)},e.unitsFactors=i,e.unkinkPolygon=function(t){var e=[];return j(t,(function(t){"Polygon"===t.geometry.type&&k(kr(t),(function(n){e.push(c(n.geometry.coordinates,t.properties))}))})),g(e)},e.validateBBox=L,e.validateId=O,e.voronoi=function(t,e){if(!M(e=e||{}))throw new Error("options is invalid");var n=e.bbox||[-180,-85,180,85];if(!t)throw new Error("points is required");if(!Array.isArray(n))throw new Error("bbox is invalid");return rt(t,"Point","points"),g(function(){var t=ws,e=Is,n=null;function r(r){return new ia(r.map((function(n,i){var o=[Math.round(t(n,i,r)/ea)*ea,Math.round(e(n,i,r)/ea)*ea];return o.index=i,o.data=n,o})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:bs(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:bs(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}().x((function(t){return t.geometry.coordinates[0]})).y((function(t){return t.geometry.coordinates[1]})).extent([[n[0],n[1]],[n[2],n[3]]]).polygons(t.features).map(oa))},e.within=ye,Object.defineProperty(e,"__esModule",{value:!0})}(e)}).call(this,n(166))}}]);
|
|
89
|
+
//# sourceMappingURL=vendors~main~b8f44717.8669cfb8.iframe.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendors~main~b8f44717.8669cfb8.iframe.bundle.js","sources":["webpack:///vendors~main~b8f44717.8669cfb8.iframe.bundle.js"],"mappings":"AAAA;;;;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;;;;;;;;AA6CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7CA","sourceRoot":""}
|