node-red-contrib-tak-registration 0.3.1 → 0.6.0
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/README.md +1 -1
- package/node_modules/@turf/along/package.json +41 -69
- package/node_modules/@turf/angle/package.json +44 -75
- package/node_modules/@turf/area/package.json +38 -68
- package/node_modules/@turf/bbox/package.json +37 -81
- package/node_modules/@turf/bbox-clip/package.json +44 -81
- package/node_modules/@turf/bbox-polygon/package.json +36 -66
- package/node_modules/@turf/bearing/package.json +36 -70
- package/node_modules/@turf/bezier-spline/package.json +39 -67
- package/node_modules/@turf/boolean-clockwise/package.json +42 -83
- package/node_modules/@turf/boolean-contains/package.json +46 -80
- package/node_modules/@turf/boolean-crosses/package.json +45 -79
- package/node_modules/@turf/boolean-disjoint/package.json +44 -79
- package/node_modules/@turf/boolean-equal/package.json +47 -84
- package/node_modules/@turf/boolean-intersects/package.json +42 -77
- package/node_modules/@turf/boolean-overlap/package.json +48 -82
- package/node_modules/@turf/boolean-parallel/package.json +42 -73
- package/node_modules/@turf/boolean-point-in-polygon/package.json +37 -77
- package/node_modules/@turf/boolean-point-on-line/package.json +39 -73
- package/node_modules/@turf/boolean-within/package.json +46 -79
- package/node_modules/@turf/buffer/package.json +47 -84
- package/node_modules/@turf/center/package.json +42 -73
- package/node_modules/@turf/center-mean/package.json +45 -78
- package/node_modules/@turf/center-median/package.json +45 -76
- package/node_modules/@turf/center-of-mass/package.json +40 -68
- package/node_modules/@turf/centroid/package.json +40 -74
- package/node_modules/@turf/circle/package.json +41 -71
- package/node_modules/@turf/clean-coords/package.json +40 -75
- package/node_modules/@turf/clone/package.json +36 -81
- package/node_modules/@turf/clusters/package.json +39 -70
- package/node_modules/@turf/clusters-dbscan/package.json +51 -88
- package/node_modules/@turf/clusters-kmeans/package.json +53 -90
- package/node_modules/@turf/collect/package.json +42 -73
- package/node_modules/@turf/combine/package.json +37 -65
- package/node_modules/@turf/concave/package.json +56 -111
- package/node_modules/@turf/convex/package.json +39 -68
- package/node_modules/@turf/destination/package.json +41 -75
- package/node_modules/@turf/difference/package.json +35 -63
- package/node_modules/@turf/dissolve/package.json +38 -66
- package/node_modules/@turf/distance/package.json +38 -83
- package/node_modules/@turf/distance-weight/package.json +40 -72
- package/node_modules/@turf/ellipse/package.json +43 -75
- package/node_modules/@turf/envelope/package.json +36 -65
- package/node_modules/@turf/explode/package.json +36 -67
- package/node_modules/@turf/flatten/package.json +39 -73
- package/node_modules/@turf/flip/package.json +36 -64
- package/node_modules/@turf/great-circle/package.json +41 -78
- package/node_modules/@turf/helpers/package.json +38 -184
- package/node_modules/@turf/hex-grid/package.json +50 -97
- package/node_modules/@turf/interpolate/package.json +47 -78
- package/node_modules/@turf/intersect/package.json +39 -69
- package/node_modules/@turf/invariant/package.json +36 -126
- package/node_modules/@turf/isobands/package.json +52 -83
- package/node_modules/@turf/isolines/package.json +48 -79
- package/node_modules/@turf/kinks/package.json +35 -63
- package/node_modules/@turf/length/package.json +43 -78
- package/node_modules/@turf/line-arc/package.json +36 -65
- package/node_modules/@turf/line-chunk/package.json +44 -84
- package/node_modules/@turf/line-intersect/package.json +46 -85
- package/node_modules/@turf/line-offset/package.json +41 -78
- package/node_modules/@turf/line-overlap/package.json +48 -80
- package/node_modules/@turf/line-segment/package.json +38 -70
- package/node_modules/@turf/line-slice/package.json +39 -67
- package/node_modules/@turf/line-slice-along/package.json +36 -65
- package/node_modules/@turf/line-split/package.json +46 -77
- package/node_modules/@turf/line-to-polygon/package.json +43 -74
- package/node_modules/@turf/mask/package.json +35 -63
- package/node_modules/@turf/meta/package.json +39 -128
- package/node_modules/@turf/midpoint/package.json +36 -64
- package/node_modules/@turf/moran-index/package.json +39 -70
- package/node_modules/@turf/nearest-point/package.json +39 -69
- package/node_modules/@turf/nearest-point-on-line/package.json +40 -71
- package/node_modules/@turf/nearest-point-to-line/package.json +47 -78
- package/node_modules/@turf/planepoint/package.json +34 -62
- package/node_modules/@turf/point-grid/package.json +45 -80
- package/node_modules/@turf/point-on-feature/package.json +40 -68
- package/node_modules/@turf/point-to-line-distance/package.json +46 -78
- package/node_modules/@turf/points-within-polygon/package.json +35 -64
- package/node_modules/@turf/polygon-smooth/package.json +37 -68
- package/node_modules/@turf/polygon-tangents/package.json +43 -77
- package/node_modules/@turf/polygon-to-line/package.json +39 -69
- package/node_modules/@turf/polygonize/package.json +43 -77
- package/node_modules/@turf/projection/package.json +44 -77
- package/node_modules/@turf/random/package.json +34 -62
- package/node_modules/@turf/rectangle-grid/package.json +43 -77
- package/node_modules/@turf/rewind/package.json +43 -83
- package/node_modules/@turf/rhumb-bearing/package.json +43 -85
- package/node_modules/@turf/rhumb-destination/package.json +44 -85
- package/node_modules/@turf/rhumb-distance/package.json +44 -84
- package/node_modules/@turf/sample/package.json +32 -60
- package/node_modules/@turf/sector/package.json +37 -65
- package/node_modules/@turf/shortest-path/package.json +45 -79
- package/node_modules/@turf/simplify/package.json +43 -77
- package/node_modules/@turf/square/package.json +33 -62
- package/node_modules/@turf/square-grid/package.json +40 -69
- package/node_modules/@turf/standard-deviational-ellipse/package.json +43 -74
- package/node_modules/@turf/tag/package.json +38 -66
- package/node_modules/@turf/tesselate/package.json +40 -80
- package/node_modules/@turf/tin/package.json +34 -63
- package/node_modules/@turf/transform-rotate/package.json +45 -80
- package/node_modules/@turf/transform-scale/package.json +51 -86
- package/node_modules/@turf/transform-translate/package.json +44 -78
- package/node_modules/@turf/triangle-grid/package.json +42 -71
- package/node_modules/@turf/truncate/package.json +40 -72
- package/node_modules/@turf/turf/package.json +74 -102
- package/node_modules/@turf/union/package.json +39 -67
- package/node_modules/@turf/unkink-polygon/package.json +40 -68
- package/node_modules/@turf/voronoi/package.json +43 -83
- package/node_modules/@types/geojson/package.json +42 -66
- package/node_modules/adm-zip/LICENSE +21 -21
- package/node_modules/adm-zip/adm-zip.js +25 -22
- package/node_modules/adm-zip/headers/mainHeader.js +2 -1
- package/node_modules/adm-zip/package.json +28 -57
- package/node_modules/adm-zip/util/utils.js +1 -0
- package/node_modules/asynckit/package.json +40 -68
- package/node_modules/axios/CHANGELOG.md +473 -837
- package/node_modules/axios/LICENSE +4 -16
- package/node_modules/axios/MIGRATION_GUIDE.md +3 -0
- package/node_modules/axios/README.md +518 -114
- package/node_modules/axios/SECURITY.md +4 -3
- package/node_modules/axios/dist/axios.js +2759 -2070
- package/node_modules/axios/dist/axios.js.map +1 -0
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/axios/dist/browser/axios.cjs +3210 -0
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
- package/node_modules/axios/dist/esm/axios.js +3232 -0
- package/node_modules/axios/dist/esm/axios.js.map +1 -0
- package/node_modules/axios/dist/esm/axios.min.js +2 -0
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/axios/dist/node/axios.cjs +4237 -0
- package/node_modules/axios/dist/node/axios.cjs.map +1 -0
- package/node_modules/axios/index.d.cts +532 -0
- package/node_modules/axios/index.d.ts +398 -72
- package/node_modules/axios/index.js +41 -1
- package/node_modules/axios/lib/adapters/adapters.js +59 -0
- package/node_modules/axios/lib/adapters/http.js +479 -217
- package/node_modules/axios/lib/adapters/xhr.js +95 -54
- package/node_modules/axios/lib/axios.js +49 -20
- package/node_modules/axios/lib/cancel/CancelToken.js +91 -89
- package/node_modules/axios/lib/cancel/CanceledError.js +25 -0
- package/node_modules/axios/lib/cancel/isCancel.js +2 -2
- package/node_modules/axios/lib/core/Axios.js +155 -100
- package/node_modules/axios/lib/core/AxiosError.js +100 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +288 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +62 -45
- package/node_modules/axios/lib/core/buildFullPath.js +5 -4
- package/node_modules/axios/lib/core/dispatchRequest.js +27 -33
- package/node_modules/axios/lib/core/mergeConfig.js +58 -52
- package/node_modules/axios/lib/core/settle.js +8 -6
- package/node_modules/axios/lib/core/transformData.js +15 -9
- package/node_modules/axios/lib/defaults/index.js +76 -41
- package/node_modules/axios/lib/defaults/transitional.js +1 -1
- package/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -3
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +191 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
- package/node_modules/axios/lib/helpers/bind.js +3 -7
- package/node_modules/axios/lib/helpers/buildURL.js +26 -33
- package/node_modules/axios/lib/helpers/callbackify.js +16 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +3 -2
- package/node_modules/axios/lib/helpers/cookies.js +43 -44
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +4 -2
- package/node_modules/axios/lib/helpers/formDataToJSON.js +92 -0
- package/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -2
- package/node_modules/axios/lib/helpers/isAxiosError.js +4 -3
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +44 -45
- package/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +24 -22
- package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +3 -2
- package/node_modules/axios/lib/helpers/throttle.js +33 -0
- package/node_modules/axios/lib/helpers/toFormData.js +203 -39
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
- package/node_modules/axios/lib/helpers/validator.js +27 -18
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/browser/index.js +64 -0
- package/node_modules/axios/lib/platform/index.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/node/index.js +12 -0
- package/node_modules/axios/lib/utils.js +517 -144
- package/node_modules/axios/package.json +194 -93
- package/node_modules/call-bind/package.json +78 -109
- package/node_modules/combined-stream/package.json +14 -46
- package/node_modules/commander/package.json +20 -53
- package/node_modules/concaveman/node_modules/quickselect/package.json +43 -0
- package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/README.md +22 -95
- package/node_modules/{@turf/unkink-polygon → concaveman}/node_modules/rbush/index.js +131 -181
- package/node_modules/concaveman/node_modules/rbush/package.json +56 -0
- package/node_modules/concaveman/node_modules/rbush/rbush.js +574 -0
- package/node_modules/concaveman/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/concaveman/package.json +15 -46
- package/node_modules/d3-array/package.json +19 -47
- package/node_modules/d3-geo/package.json +24 -52
- package/node_modules/d3-voronoi/package.json +19 -47
- package/node_modules/deep-equal/package.json +34 -64
- package/node_modules/define-properties/.eslintrc +10 -3
- package/node_modules/define-properties/.github/FUNDING.yml +12 -0
- package/node_modules/define-properties/.nycrc +9 -0
- package/node_modules/define-properties/CHANGELOG.md +39 -0
- package/node_modules/define-properties/README.md +11 -13
- package/node_modules/define-properties/index.js +12 -17
- package/node_modules/define-properties/package.json +85 -95
- package/node_modules/delayed-stream/package.json +14 -49
- package/node_modules/density-clustering/package.json +46 -70
- package/node_modules/earcut/README.md +12 -3
- package/node_modules/earcut/dist/earcut.dev.js +47 -50
- package/node_modules/earcut/dist/earcut.min.js +1 -1
- package/node_modules/earcut/package.json +26 -60
- package/node_modules/earcut/src/earcut.js +46 -49
- package/node_modules/follow-redirects/README.md +8 -1
- package/node_modules/follow-redirects/index.js +83 -36
- package/node_modules/follow-redirects/package.json +38 -74
- package/node_modules/form-data/package.json +37 -70
- package/node_modules/function-bind/package.json +23 -56
- package/node_modules/functions-have-names/.editorconfig +20 -0
- package/node_modules/functions-have-names/.eslintrc +19 -0
- package/node_modules/functions-have-names/.github/FUNDING.yml +12 -0
- package/node_modules/functions-have-names/.nycrc +9 -0
- package/node_modules/functions-have-names/CHANGELOG.md +89 -0
- package/node_modules/functions-have-names/LICENSE +21 -0
- package/node_modules/functions-have-names/README.md +40 -0
- package/node_modules/functions-have-names/index.js +31 -0
- package/node_modules/functions-have-names/package.json +55 -0
- package/node_modules/functions-have-names/test/index.js +65 -0
- package/node_modules/geojson-equality/package.json +23 -55
- package/node_modules/geojson-rbush/node_modules/quickselect/package.json +43 -0
- package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/README.md +22 -95
- package/node_modules/{@turf/collect → geojson-rbush}/node_modules/rbush/index.js +131 -181
- package/node_modules/geojson-rbush/node_modules/rbush/package.json +56 -0
- package/node_modules/geojson-rbush/node_modules/rbush/rbush.js +574 -0
- package/node_modules/geojson-rbush/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/geojson-rbush/package.json +32 -71
- package/node_modules/get-intrinsic/.eslintrc +3 -8
- package/node_modules/get-intrinsic/.nycrc +0 -4
- package/node_modules/get-intrinsic/CHANGELOG.md +53 -0
- package/node_modules/get-intrinsic/README.md +7 -1
- package/node_modules/get-intrinsic/index.js +29 -8
- package/node_modules/get-intrinsic/package.json +91 -104
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +26 -12
- package/node_modules/has/package.json +21 -46
- package/node_modules/has-property-descriptors/.eslintrc +13 -0
- package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
- package/node_modules/has-property-descriptors/.nycrc +9 -0
- package/node_modules/has-property-descriptors/CHANGELOG.md +16 -0
- package/node_modules/has-property-descriptors/LICENSE +21 -0
- package/node_modules/has-property-descriptors/README.md +43 -0
- package/node_modules/has-property-descriptors/index.js +33 -0
- package/node_modules/has-property-descriptors/package.json +70 -0
- package/node_modules/has-property-descriptors/test/index.js +57 -0
- package/node_modules/has-proto/.eslintrc +5 -0
- package/node_modules/has-proto/.github/FUNDING.yml +12 -0
- package/node_modules/has-proto/CHANGELOG.md +23 -0
- package/node_modules/has-proto/LICENSE +21 -0
- package/node_modules/has-proto/README.md +38 -0
- package/node_modules/has-proto/index.js +11 -0
- package/node_modules/has-proto/package.json +74 -0
- package/node_modules/has-proto/test/index.js +19 -0
- package/node_modules/has-symbols/package.json +99 -125
- package/node_modules/has-tostringtag/package.json +82 -109
- package/node_modules/is-arguments/package.json +89 -114
- package/node_modules/is-date-object/package.json +77 -108
- package/node_modules/is-regex/package.json +84 -112
- package/node_modules/mime-db/HISTORY.md +8 -0
- package/node_modules/mime-db/LICENSE +19 -18
- package/node_modules/mime-db/README.md +1 -1
- package/node_modules/mime-db/db.json +54 -6
- package/node_modules/mime-db/index.js +1 -0
- package/node_modules/mime-db/package.json +24 -66
- package/node_modules/mime-types/HISTORY.md +9 -0
- package/node_modules/mime-types/README.md +1 -1
- package/node_modules/mime-types/package.json +19 -62
- package/node_modules/object-assign/package.json +15 -49
- package/node_modules/object-is/package.json +85 -112
- package/node_modules/object-keys/package.json +86 -116
- package/node_modules/point-in-polygon/package.json +19 -48
- package/node_modules/polygon-clipping/package.json +41 -80
- package/node_modules/proxy-from-env/.eslintrc +29 -0
- package/node_modules/proxy-from-env/.travis.yml +10 -0
- package/node_modules/proxy-from-env/LICENSE +20 -0
- package/node_modules/proxy-from-env/README.md +131 -0
- package/node_modules/proxy-from-env/index.js +108 -0
- package/node_modules/proxy-from-env/package.json +34 -0
- package/node_modules/proxy-from-env/test.js +483 -0
- package/node_modules/quickselect/package.json +13 -41
- package/node_modules/rbush/README.md +95 -22
- package/node_modules/rbush/index.js +181 -131
- package/node_modules/rbush/package.json +39 -71
- package/node_modules/rbush/rbush.js +412 -360
- package/node_modules/rbush/rbush.min.js +1 -1
- package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
- package/node_modules/regexp.prototype.flags/CHANGELOG.md +19 -0
- package/node_modules/regexp.prototype.flags/implementation.js +9 -0
- package/node_modules/regexp.prototype.flags/package.json +98 -122
- package/node_modules/regexp.prototype.flags/test/shimmed.js +2 -1
- package/node_modules/regexp.prototype.flags/test/tests.js +7 -5
- package/node_modules/robust-predicates/package.json +25 -52
- package/node_modules/skmeans/package.json +18 -53
- package/node_modules/splaytree/Readme.md +58 -57
- package/node_modules/splaytree/dist/splay.esm.js +21 -8
- package/node_modules/splaytree/dist/splay.esm.js.map +1 -1
- package/node_modules/splaytree/dist/splay.js +21 -8
- package/node_modules/splaytree/dist/splay.js.map +1 -1
- package/node_modules/splaytree/package.json +36 -68
- package/node_modules/splaytree/src/index.ts +16 -4
- package/node_modules/tinyqueue/package.json +34 -59
- package/node_modules/topojson-client/package.json +28 -56
- package/node_modules/topojson-server/package.json +27 -55
- package/node_modules/turf-jsts/package.json +33 -68
- package/node_modules/uuid/CHANGELOG.md +39 -0
- package/node_modules/uuid/README.md +30 -73
- package/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +23 -23
- package/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +2 -2
- package/node_modules/uuid/dist/esm-browser/rng.js +4 -5
- package/node_modules/uuid/dist/esm-browser/sha1.js +26 -26
- package/node_modules/uuid/dist/esm-browser/stringify.js +9 -6
- package/node_modules/uuid/dist/esm-browser/v1.js +17 -17
- package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v35.js +12 -10
- package/node_modules/uuid/dist/esm-browser/v4.js +9 -4
- package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
- package/node_modules/uuid/dist/esm-browser/version.js +1 -1
- package/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +7 -3
- package/node_modules/uuid/dist/esm-node/v1.js +2 -2
- package/node_modules/uuid/dist/esm-node/v35.js +6 -4
- package/node_modules/uuid/dist/esm-node/v4.js +7 -2
- package/node_modules/uuid/dist/esm-node/version.js +1 -1
- package/node_modules/uuid/dist/index.js +18 -18
- package/node_modules/uuid/dist/native-browser.js +11 -0
- package/node_modules/uuid/dist/native.js +15 -0
- package/node_modules/uuid/dist/rng-browser.js +2 -3
- package/node_modules/uuid/dist/stringify.js +8 -3
- package/node_modules/uuid/dist/v1.js +2 -2
- package/node_modules/uuid/dist/v35.js +7 -5
- package/node_modules/uuid/dist/v4.js +8 -2
- package/node_modules/uuid/dist/version.js +1 -1
- package/node_modules/uuid/package.json +87 -120
- package/package.json +12 -8
- package/tak-ingest.html +40 -0
- package/tak-ingest.js +48 -0
- package/tak-registration.html +13 -2
- package/tak-registration.js +55 -7
- package/node_modules/@turf/collect/node_modules/quickselect/package.json +0 -69
- package/node_modules/@turf/collect/node_modules/rbush/package.json +0 -85
- package/node_modules/@turf/collect/node_modules/rbush/rbush.js +0 -626
- package/node_modules/@turf/collect/node_modules/rbush/rbush.min.js +0 -1
- package/node_modules/@turf/unkink-polygon/node_modules/quickselect/package.json +0 -69
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/package.json +0 -85
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.js +0 -626
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.min.js +0 -1
- package/node_modules/axios/UPGRADE_GUIDE.md +0 -168
- package/node_modules/axios/dist/axios.map +0 -1
- package/node_modules/axios/dist/axios.min.map +0 -1
- package/node_modules/axios/lib/cancel/Cancel.js +0 -19
- package/node_modules/axios/lib/core/createError.js +0 -18
- package/node_modules/axios/lib/core/enhanceError.js +0 -43
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/node_modules/axios/tsconfig.json +0 -14
- package/node_modules/axios/tslint.json +0 -6
- package/node_modules/combined-stream/yarn.lock +0 -17
- package/node_modules/d3-array/yarn.lock +0 -939
- package/node_modules/define-properties/.jscs.json +0 -175
- package/node_modules/define-properties/.travis.yml +0 -233
- package/node_modules/define-properties/test/index.js +0 -125
- package/node_modules/get-intrinsic/.eslintignore +0 -1
- package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/LICENSE +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/README.md +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/index.js +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/quickselect.js +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/LICENSE +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/LICENSE +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/README.md +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/index.js +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/quickselect.js +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/LICENSE +0 -0
|
@@ -1,475 +1,467 @@
|
|
|
1
|
-
(function (global,
|
|
2
|
-
|
|
3
|
-
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
|
-
(global = global || self, global.RBush = factory());
|
|
5
|
-
}(this, function () { 'use strict';
|
|
1
|
+
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.rbush = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
|
2
|
+
'use strict';
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function quickselectStep(arr, k, left, right, compare) {
|
|
12
|
-
|
|
13
|
-
while (right > left) {
|
|
14
|
-
if (right - left > 600) {
|
|
15
|
-
var n = right - left + 1;
|
|
16
|
-
var m = k - left + 1;
|
|
17
|
-
var z = Math.log(n);
|
|
18
|
-
var s = 0.5 * Math.exp(2 * z / 3);
|
|
19
|
-
var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
|
|
20
|
-
var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
|
|
21
|
-
var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
|
|
22
|
-
quickselectStep(arr, k, newLeft, newRight, compare);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var t = arr[k];
|
|
26
|
-
var i = left;
|
|
27
|
-
var j = right;
|
|
4
|
+
module.exports = rbush;
|
|
5
|
+
module.exports.default = rbush;
|
|
28
6
|
|
|
29
|
-
|
|
30
|
-
if (compare(arr[right], t) > 0) { swap(arr, left, right); }
|
|
7
|
+
var quickselect = require('quickselect');
|
|
31
8
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
i++;
|
|
35
|
-
j--;
|
|
36
|
-
while (compare(arr[i], t) < 0) { i++; }
|
|
37
|
-
while (compare(arr[j], t) > 0) { j--; }
|
|
38
|
-
}
|
|
9
|
+
function rbush(maxEntries, format) {
|
|
10
|
+
if (!(this instanceof rbush)) return new rbush(maxEntries, format);
|
|
39
11
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
swap(arr, j, right);
|
|
44
|
-
}
|
|
12
|
+
// max entries in a node is 9 by default; min node fill is 40% for best performance
|
|
13
|
+
this._maxEntries = Math.max(4, maxEntries || 9);
|
|
14
|
+
this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));
|
|
45
15
|
|
|
46
|
-
|
|
47
|
-
|
|
16
|
+
if (format) {
|
|
17
|
+
this._initFormat(format);
|
|
48
18
|
}
|
|
49
|
-
}
|
|
50
19
|
|
|
51
|
-
|
|
52
|
-
var tmp = arr[i];
|
|
53
|
-
arr[i] = arr[j];
|
|
54
|
-
arr[j] = tmp;
|
|
20
|
+
this.clear();
|
|
55
21
|
}
|
|
56
22
|
|
|
57
|
-
|
|
58
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
59
|
-
}
|
|
23
|
+
rbush.prototype = {
|
|
60
24
|
|
|
61
|
-
|
|
62
|
-
|
|
25
|
+
all: function () {
|
|
26
|
+
return this._all(this.data, []);
|
|
27
|
+
},
|
|
63
28
|
|
|
64
|
-
|
|
65
|
-
this._maxEntries = Math.max(4, maxEntries);
|
|
66
|
-
this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));
|
|
67
|
-
this.clear();
|
|
68
|
-
};
|
|
29
|
+
search: function (bbox) {
|
|
69
30
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
31
|
+
var node = this.data,
|
|
32
|
+
result = [],
|
|
33
|
+
toBBox = this.toBBox;
|
|
73
34
|
|
|
74
|
-
|
|
75
|
-
var node = this.data;
|
|
76
|
-
var result = [];
|
|
35
|
+
if (!intersects(bbox, node)) return result;
|
|
77
36
|
|
|
78
|
-
|
|
37
|
+
var nodesToSearch = [],
|
|
38
|
+
i, len, child, childBBox;
|
|
79
39
|
|
|
80
|
-
|
|
81
|
-
|
|
40
|
+
while (node) {
|
|
41
|
+
for (i = 0, len = node.children.length; i < len; i++) {
|
|
82
42
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
var child = node.children[i];
|
|
86
|
-
var childBBox = node.leaf ? toBBox(child) : child;
|
|
43
|
+
child = node.children[i];
|
|
44
|
+
childBBox = node.leaf ? toBBox(child) : child;
|
|
87
45
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
46
|
+
if (intersects(bbox, childBBox)) {
|
|
47
|
+
if (node.leaf) result.push(child);
|
|
48
|
+
else if (contains(bbox, childBBox)) this._all(child, result);
|
|
49
|
+
else nodesToSearch.push(child);
|
|
50
|
+
}
|
|
92
51
|
}
|
|
52
|
+
node = nodesToSearch.pop();
|
|
93
53
|
}
|
|
94
|
-
node = nodesToSearch.pop();
|
|
95
|
-
}
|
|
96
54
|
|
|
97
|
-
|
|
98
|
-
}
|
|
55
|
+
return result;
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
collides: function (bbox) {
|
|
99
59
|
|
|
100
|
-
|
|
101
|
-
|
|
60
|
+
var node = this.data,
|
|
61
|
+
toBBox = this.toBBox;
|
|
102
62
|
|
|
103
|
-
|
|
63
|
+
if (!intersects(bbox, node)) return false;
|
|
104
64
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
for (var i = 0; i < node.children.length; i++) {
|
|
108
|
-
var child = node.children[i];
|
|
109
|
-
var childBBox = node.leaf ? this.toBBox(child) : child;
|
|
65
|
+
var nodesToSearch = [],
|
|
66
|
+
i, len, child, childBBox;
|
|
110
67
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
68
|
+
while (node) {
|
|
69
|
+
for (i = 0, len = node.children.length; i < len; i++) {
|
|
70
|
+
|
|
71
|
+
child = node.children[i];
|
|
72
|
+
childBBox = node.leaf ? toBBox(child) : child;
|
|
73
|
+
|
|
74
|
+
if (intersects(bbox, childBBox)) {
|
|
75
|
+
if (node.leaf || contains(bbox, childBBox)) return true;
|
|
76
|
+
nodesToSearch.push(child);
|
|
77
|
+
}
|
|
114
78
|
}
|
|
79
|
+
node = nodesToSearch.pop();
|
|
115
80
|
}
|
|
116
|
-
node = nodesToSearch.pop();
|
|
117
|
-
}
|
|
118
81
|
|
|
119
|
-
|
|
120
|
-
}
|
|
82
|
+
return false;
|
|
83
|
+
},
|
|
121
84
|
|
|
122
|
-
|
|
123
|
-
|
|
85
|
+
load: function (data) {
|
|
86
|
+
if (!(data && data.length)) return this;
|
|
124
87
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
88
|
+
if (data.length < this._minEntries) {
|
|
89
|
+
for (var i = 0, len = data.length; i < len; i++) {
|
|
90
|
+
this.insert(data[i]);
|
|
91
|
+
}
|
|
92
|
+
return this;
|
|
128
93
|
}
|
|
129
|
-
return this;
|
|
130
|
-
}
|
|
131
94
|
|
|
132
|
-
|
|
133
|
-
|
|
95
|
+
// recursively build the tree with the given data from scratch using OMT algorithm
|
|
96
|
+
var node = this._build(data.slice(), 0, data.length - 1, 0);
|
|
97
|
+
|
|
98
|
+
if (!this.data.children.length) {
|
|
99
|
+
// save as is if tree is empty
|
|
100
|
+
this.data = node;
|
|
134
101
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
102
|
+
} else if (this.data.height === node.height) {
|
|
103
|
+
// split root if trees have the same height
|
|
104
|
+
this._splitRoot(this.data, node);
|
|
138
105
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
106
|
+
} else {
|
|
107
|
+
if (this.data.height < node.height) {
|
|
108
|
+
// swap trees if inserted one is bigger
|
|
109
|
+
var tmpNode = this.data;
|
|
110
|
+
this.data = node;
|
|
111
|
+
node = tmpNode;
|
|
112
|
+
}
|
|
142
113
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
// swap trees if inserted one is bigger
|
|
146
|
-
var tmpNode = this.data;
|
|
147
|
-
this.data = node;
|
|
148
|
-
node = tmpNode;
|
|
114
|
+
// insert the small tree into the large tree at appropriate level
|
|
115
|
+
this._insert(node, this.data.height - node.height - 1, true);
|
|
149
116
|
}
|
|
150
117
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return this;
|
|
156
|
-
};
|
|
118
|
+
return this;
|
|
119
|
+
},
|
|
157
120
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
121
|
+
insert: function (item) {
|
|
122
|
+
if (item) this._insert(item, this.data.height - 1);
|
|
123
|
+
return this;
|
|
124
|
+
},
|
|
162
125
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
126
|
+
clear: function () {
|
|
127
|
+
this.data = createNode([]);
|
|
128
|
+
return this;
|
|
129
|
+
},
|
|
167
130
|
|
|
168
|
-
|
|
169
|
-
|
|
131
|
+
remove: function (item, equalsFn) {
|
|
132
|
+
if (!item) return this;
|
|
170
133
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
134
|
+
var node = this.data,
|
|
135
|
+
bbox = this.toBBox(item),
|
|
136
|
+
path = [],
|
|
137
|
+
indexes = [],
|
|
138
|
+
i, parent, index, goingUp;
|
|
176
139
|
|
|
177
|
-
|
|
178
|
-
|
|
140
|
+
// depth-first iterative tree traversal
|
|
141
|
+
while (node || path.length) {
|
|
179
142
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
143
|
+
if (!node) { // go up
|
|
144
|
+
node = path.pop();
|
|
145
|
+
parent = path[path.length - 1];
|
|
146
|
+
i = indexes.pop();
|
|
147
|
+
goingUp = true;
|
|
148
|
+
}
|
|
186
149
|
|
|
187
|
-
|
|
188
|
-
|
|
150
|
+
if (node.leaf) { // check current node
|
|
151
|
+
index = findItem(item, node.children, equalsFn);
|
|
189
152
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
153
|
+
if (index !== -1) {
|
|
154
|
+
// item found, remove the item and condense tree upwards
|
|
155
|
+
node.children.splice(index, 1);
|
|
156
|
+
path.push(node);
|
|
157
|
+
this._condense(path);
|
|
158
|
+
return this;
|
|
159
|
+
}
|
|
196
160
|
}
|
|
197
|
-
}
|
|
198
161
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
162
|
+
if (!goingUp && !node.leaf && contains(node, bbox)) { // go down
|
|
163
|
+
path.push(node);
|
|
164
|
+
indexes.push(i);
|
|
165
|
+
i = 0;
|
|
166
|
+
parent = node;
|
|
167
|
+
node = node.children[0];
|
|
205
168
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
169
|
+
} else if (parent) { // go right
|
|
170
|
+
i++;
|
|
171
|
+
node = parent.children[i];
|
|
172
|
+
goingUp = false;
|
|
210
173
|
|
|
211
|
-
|
|
212
|
-
|
|
174
|
+
} else node = null; // nothing found
|
|
175
|
+
}
|
|
213
176
|
|
|
214
|
-
|
|
215
|
-
}
|
|
177
|
+
return this;
|
|
178
|
+
},
|
|
216
179
|
|
|
217
|
-
|
|
180
|
+
toBBox: function (item) { return item; },
|
|
218
181
|
|
|
219
|
-
|
|
220
|
-
|
|
182
|
+
compareMinX: compareNodeMinX,
|
|
183
|
+
compareMinY: compareNodeMinY,
|
|
221
184
|
|
|
222
|
-
|
|
185
|
+
toJSON: function () { return this.data; },
|
|
223
186
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
187
|
+
fromJSON: function (data) {
|
|
188
|
+
this.data = data;
|
|
189
|
+
return this;
|
|
190
|
+
},
|
|
228
191
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
192
|
+
_all: function (node, result) {
|
|
193
|
+
var nodesToSearch = [];
|
|
194
|
+
while (node) {
|
|
195
|
+
if (node.leaf) result.push.apply(result, node.children);
|
|
196
|
+
else nodesToSearch.push.apply(nodesToSearch, node.children);
|
|
234
197
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
198
|
+
node = nodesToSearch.pop();
|
|
199
|
+
}
|
|
200
|
+
return result;
|
|
201
|
+
},
|
|
239
202
|
|
|
240
|
-
|
|
203
|
+
_build: function (items, left, right, height) {
|
|
241
204
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
205
|
+
var N = right - left + 1,
|
|
206
|
+
M = this._maxEntries,
|
|
207
|
+
node;
|
|
245
208
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
209
|
+
if (N <= M) {
|
|
210
|
+
// reached leaf level; return leaf
|
|
211
|
+
node = createNode(items.slice(left, right + 1));
|
|
212
|
+
calcBBox(node, this.toBBox);
|
|
213
|
+
return node;
|
|
214
|
+
}
|
|
252
215
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
216
|
+
if (!height) {
|
|
217
|
+
// target height of the bulk-loaded tree
|
|
218
|
+
height = Math.ceil(Math.log(N) / Math.log(M));
|
|
256
219
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
220
|
+
// target number of root entries to maximize storage utilization
|
|
221
|
+
M = Math.ceil(N / Math.pow(M, height - 1));
|
|
222
|
+
}
|
|
260
223
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
224
|
+
node = createNode([]);
|
|
225
|
+
node.leaf = false;
|
|
226
|
+
node.height = height;
|
|
264
227
|
|
|
265
|
-
|
|
228
|
+
// split the items into M mostly square tiles
|
|
266
229
|
|
|
267
|
-
|
|
268
|
-
|
|
230
|
+
var N2 = Math.ceil(N / M),
|
|
231
|
+
N1 = N2 * Math.ceil(Math.sqrt(M)),
|
|
232
|
+
i, j, right2, right3;
|
|
269
233
|
|
|
270
|
-
|
|
234
|
+
multiSelect(items, left, right, N1, this.compareMinX);
|
|
271
235
|
|
|
272
|
-
|
|
236
|
+
for (i = left; i <= right; i += N1) {
|
|
273
237
|
|
|
274
|
-
|
|
238
|
+
right2 = Math.min(i + N1 - 1, right);
|
|
275
239
|
|
|
276
|
-
|
|
240
|
+
multiSelect(items, i, right2, N2, this.compareMinY);
|
|
277
241
|
|
|
278
|
-
|
|
242
|
+
for (j = i; j <= right2; j += N2) {
|
|
279
243
|
|
|
280
|
-
|
|
244
|
+
right3 = Math.min(j + N2 - 1, right2);
|
|
281
245
|
|
|
282
|
-
|
|
283
|
-
|
|
246
|
+
// pack each entry recursively
|
|
247
|
+
node.children.push(this._build(items, j, right3, height - 1));
|
|
248
|
+
}
|
|
284
249
|
}
|
|
285
|
-
}
|
|
286
250
|
|
|
287
|
-
|
|
251
|
+
calcBBox(node, this.toBBox);
|
|
288
252
|
|
|
289
|
-
|
|
290
|
-
}
|
|
253
|
+
return node;
|
|
254
|
+
},
|
|
291
255
|
|
|
292
|
-
|
|
293
|
-
while (true) {
|
|
294
|
-
path.push(node);
|
|
256
|
+
_chooseSubtree: function (bbox, node, level, path) {
|
|
295
257
|
|
|
296
|
-
|
|
258
|
+
var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;
|
|
297
259
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
var targetNode = (void 0);
|
|
260
|
+
while (true) {
|
|
261
|
+
path.push(node);
|
|
301
262
|
|
|
302
|
-
|
|
303
|
-
var child = node.children[i];
|
|
304
|
-
var area = bboxArea(child);
|
|
305
|
-
var enlargement = enlargedArea(bbox, child) - area;
|
|
263
|
+
if (node.leaf || path.length - 1 === level) break;
|
|
306
264
|
|
|
307
|
-
|
|
308
|
-
if (enlargement < minEnlargement) {
|
|
309
|
-
minEnlargement = enlargement;
|
|
310
|
-
minArea = area < minArea ? area : minArea;
|
|
311
|
-
targetNode = child;
|
|
265
|
+
minArea = minEnlargement = Infinity;
|
|
312
266
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
267
|
+
for (i = 0, len = node.children.length; i < len; i++) {
|
|
268
|
+
child = node.children[i];
|
|
269
|
+
area = bboxArea(child);
|
|
270
|
+
enlargement = enlargedArea(bbox, child) - area;
|
|
271
|
+
|
|
272
|
+
// choose entry with the least area enlargement
|
|
273
|
+
if (enlargement < minEnlargement) {
|
|
274
|
+
minEnlargement = enlargement;
|
|
275
|
+
minArea = area < minArea ? area : minArea;
|
|
317
276
|
targetNode = child;
|
|
277
|
+
|
|
278
|
+
} else if (enlargement === minEnlargement) {
|
|
279
|
+
// otherwise choose one with the smallest area
|
|
280
|
+
if (area < minArea) {
|
|
281
|
+
minArea = area;
|
|
282
|
+
targetNode = child;
|
|
283
|
+
}
|
|
318
284
|
}
|
|
319
285
|
}
|
|
286
|
+
|
|
287
|
+
node = targetNode || node.children[0];
|
|
320
288
|
}
|
|
321
289
|
|
|
322
|
-
|
|
323
|
-
}
|
|
290
|
+
return node;
|
|
291
|
+
},
|
|
324
292
|
|
|
325
|
-
|
|
326
|
-
};
|
|
293
|
+
_insert: function (item, level, isNode) {
|
|
327
294
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
295
|
+
var toBBox = this.toBBox,
|
|
296
|
+
bbox = isNode ? item : toBBox(item),
|
|
297
|
+
insertPath = [];
|
|
331
298
|
|
|
332
|
-
|
|
333
|
-
|
|
299
|
+
// find the best node for accommodating the item, saving all nodes along the path too
|
|
300
|
+
var node = this._chooseSubtree(bbox, this.data, level, insertPath);
|
|
334
301
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
302
|
+
// put the item into the node
|
|
303
|
+
node.children.push(item);
|
|
304
|
+
extend(node, bbox);
|
|
338
305
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
306
|
+
// split on node overflow; propagate upwards if necessary
|
|
307
|
+
while (level >= 0) {
|
|
308
|
+
if (insertPath[level].children.length > this._maxEntries) {
|
|
309
|
+
this._split(insertPath, level);
|
|
310
|
+
level--;
|
|
311
|
+
} else break;
|
|
312
|
+
}
|
|
346
313
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
314
|
+
// adjust bboxes along the insertion path
|
|
315
|
+
this._adjustParentBBoxes(bbox, insertPath, level);
|
|
316
|
+
},
|
|
350
317
|
|
|
351
|
-
// split overflowed node into two
|
|
352
|
-
|
|
353
|
-
var node = insertPath[level];
|
|
354
|
-
var M = node.children.length;
|
|
355
|
-
var m = this._minEntries;
|
|
318
|
+
// split overflowed node into two
|
|
319
|
+
_split: function (insertPath, level) {
|
|
356
320
|
|
|
357
|
-
|
|
321
|
+
var node = insertPath[level],
|
|
322
|
+
M = node.children.length,
|
|
323
|
+
m = this._minEntries;
|
|
358
324
|
|
|
359
|
-
|
|
325
|
+
this._chooseSplitAxis(node, m, M);
|
|
360
326
|
|
|
361
|
-
|
|
362
|
-
newNode.height = node.height;
|
|
363
|
-
newNode.leaf = node.leaf;
|
|
327
|
+
var splitIndex = this._chooseSplitIndex(node, m, M);
|
|
364
328
|
|
|
365
|
-
|
|
366
|
-
|
|
329
|
+
var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));
|
|
330
|
+
newNode.height = node.height;
|
|
331
|
+
newNode.leaf = node.leaf;
|
|
367
332
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
};
|
|
333
|
+
calcBBox(node, this.toBBox);
|
|
334
|
+
calcBBox(newNode, this.toBBox);
|
|
371
335
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
336
|
+
if (level) insertPath[level - 1].children.push(newNode);
|
|
337
|
+
else this._splitRoot(node, newNode);
|
|
338
|
+
},
|
|
339
|
+
|
|
340
|
+
_splitRoot: function (node, newNode) {
|
|
341
|
+
// split root node
|
|
342
|
+
this.data = createNode([node, newNode]);
|
|
343
|
+
this.data.height = node.height + 1;
|
|
344
|
+
this.data.leaf = false;
|
|
345
|
+
calcBBox(this.data, this.toBBox);
|
|
346
|
+
},
|
|
379
347
|
|
|
380
|
-
|
|
381
|
-
var index;
|
|
382
|
-
var minOverlap = Infinity;
|
|
383
|
-
var minArea = Infinity;
|
|
348
|
+
_chooseSplitIndex: function (node, m, M) {
|
|
384
349
|
|
|
385
|
-
|
|
386
|
-
var bbox1 = distBBox(node, 0, i, this.toBBox);
|
|
387
|
-
var bbox2 = distBBox(node, i, M, this.toBBox);
|
|
350
|
+
var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;
|
|
388
351
|
|
|
389
|
-
|
|
390
|
-
var area = bboxArea(bbox1) + bboxArea(bbox2);
|
|
352
|
+
minOverlap = minArea = Infinity;
|
|
391
353
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
index = i;
|
|
354
|
+
for (i = m; i <= M - m; i++) {
|
|
355
|
+
bbox1 = distBBox(node, 0, i, this.toBBox);
|
|
356
|
+
bbox2 = distBBox(node, i, M, this.toBBox);
|
|
396
357
|
|
|
397
|
-
|
|
358
|
+
overlap = intersectionArea(bbox1, bbox2);
|
|
359
|
+
area = bboxArea(bbox1) + bboxArea(bbox2);
|
|
398
360
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
minArea = area;
|
|
361
|
+
// choose distribution with minimum overlap
|
|
362
|
+
if (overlap < minOverlap) {
|
|
363
|
+
minOverlap = overlap;
|
|
403
364
|
index = i;
|
|
365
|
+
|
|
366
|
+
minArea = area < minArea ? area : minArea;
|
|
367
|
+
|
|
368
|
+
} else if (overlap === minOverlap) {
|
|
369
|
+
// otherwise choose distribution with minimum area
|
|
370
|
+
if (area < minArea) {
|
|
371
|
+
minArea = area;
|
|
372
|
+
index = i;
|
|
373
|
+
}
|
|
404
374
|
}
|
|
405
375
|
}
|
|
406
|
-
}
|
|
407
376
|
|
|
408
|
-
|
|
409
|
-
}
|
|
377
|
+
return index;
|
|
378
|
+
},
|
|
410
379
|
|
|
411
|
-
// sorts node children by the best axis for split
|
|
412
|
-
|
|
413
|
-
var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX;
|
|
414
|
-
var compareMinY = node.leaf ? this.compareMinY : compareNodeMinY;
|
|
415
|
-
var xMargin = this._allDistMargin(node, m, M, compareMinX);
|
|
416
|
-
var yMargin = this._allDistMargin(node, m, M, compareMinY);
|
|
380
|
+
// sorts node children by the best axis for split
|
|
381
|
+
_chooseSplitAxis: function (node, m, M) {
|
|
417
382
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
383
|
+
var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,
|
|
384
|
+
compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,
|
|
385
|
+
xMargin = this._allDistMargin(node, m, M, compareMinX),
|
|
386
|
+
yMargin = this._allDistMargin(node, m, M, compareMinY);
|
|
422
387
|
|
|
423
|
-
// total margin
|
|
424
|
-
|
|
425
|
-
|
|
388
|
+
// if total distributions margin value is minimal for x, sort by minX,
|
|
389
|
+
// otherwise it's already sorted by minY
|
|
390
|
+
if (xMargin < yMargin) node.children.sort(compareMinX);
|
|
391
|
+
},
|
|
426
392
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
var rightBBox = distBBox(node, M - m, M, toBBox);
|
|
430
|
-
var margin = bboxMargin(leftBBox) + bboxMargin(rightBBox);
|
|
393
|
+
// total margin of all possible split distributions where each node is at least m full
|
|
394
|
+
_allDistMargin: function (node, m, M, compare) {
|
|
431
395
|
|
|
432
|
-
|
|
433
|
-
var child = node.children[i];
|
|
434
|
-
extend(leftBBox, node.leaf ? toBBox(child) : child);
|
|
435
|
-
margin += bboxMargin(leftBBox);
|
|
436
|
-
}
|
|
396
|
+
node.children.sort(compare);
|
|
437
397
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
398
|
+
var toBBox = this.toBBox,
|
|
399
|
+
leftBBox = distBBox(node, 0, m, toBBox),
|
|
400
|
+
rightBBox = distBBox(node, M - m, M, toBBox),
|
|
401
|
+
margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),
|
|
402
|
+
i, child;
|
|
443
403
|
|
|
444
|
-
|
|
445
|
-
|
|
404
|
+
for (i = m; i < M - m; i++) {
|
|
405
|
+
child = node.children[i];
|
|
406
|
+
extend(leftBBox, node.leaf ? toBBox(child) : child);
|
|
407
|
+
margin += bboxMargin(leftBBox);
|
|
408
|
+
}
|
|
446
409
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
410
|
+
for (i = M - m - 1; i >= m; i--) {
|
|
411
|
+
child = node.children[i];
|
|
412
|
+
extend(rightBBox, node.leaf ? toBBox(child) : child);
|
|
413
|
+
margin += bboxMargin(rightBBox);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
return margin;
|
|
417
|
+
},
|
|
418
|
+
|
|
419
|
+
_adjustParentBBoxes: function (bbox, path, level) {
|
|
420
|
+
// adjust bboxes along the given tree path
|
|
421
|
+
for (var i = level; i >= 0; i--) {
|
|
422
|
+
extend(path[i], bbox);
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
|
|
426
|
+
_condense: function (path) {
|
|
427
|
+
// go through the path, removing empty nodes and updating bboxes
|
|
428
|
+
for (var i = path.length - 1, siblings; i >= 0; i--) {
|
|
429
|
+
if (path[i].children.length === 0) {
|
|
430
|
+
if (i > 0) {
|
|
431
|
+
siblings = path[i - 1].children;
|
|
432
|
+
siblings.splice(siblings.indexOf(path[i]), 1);
|
|
433
|
+
|
|
434
|
+
} else this.clear();
|
|
453
435
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
436
|
+
} else calcBBox(path[i], this.toBBox);
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
|
|
440
|
+
_initFormat: function (format) {
|
|
441
|
+
// data format (minX, minY, maxX, maxY accessors)
|
|
442
|
+
|
|
443
|
+
// uses eval-type function compilation instead of just accepting a toBBox function
|
|
444
|
+
// because the algorithms are very sensitive to sorting functions performance,
|
|
445
|
+
// so they should be dead simple and without inner calls
|
|
461
446
|
|
|
462
|
-
|
|
447
|
+
var compareArr = ['return a', ' - b', ';'];
|
|
463
448
|
|
|
464
|
-
|
|
449
|
+
this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));
|
|
450
|
+
this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));
|
|
451
|
+
|
|
452
|
+
this.toBBox = new Function('a',
|
|
453
|
+
'return {minX: a' + format[0] +
|
|
454
|
+
', minY: a' + format[1] +
|
|
455
|
+
', maxX: a' + format[2] +
|
|
456
|
+
', maxY: a' + format[3] + '};');
|
|
465
457
|
}
|
|
466
458
|
};
|
|
467
459
|
|
|
468
460
|
function findItem(item, items, equalsFn) {
|
|
469
|
-
if (!equalsFn)
|
|
461
|
+
if (!equalsFn) return items.indexOf(item);
|
|
470
462
|
|
|
471
463
|
for (var i = 0; i < items.length; i++) {
|
|
472
|
-
if (equalsFn(item, items[i]))
|
|
464
|
+
if (equalsFn(item, items[i])) return i;
|
|
473
465
|
}
|
|
474
466
|
return -1;
|
|
475
467
|
}
|
|
@@ -481,14 +473,14 @@ function calcBBox(node, toBBox) {
|
|
|
481
473
|
|
|
482
474
|
// min bounding rectangle of node children from k to p-1
|
|
483
475
|
function distBBox(node, k, p, toBBox, destNode) {
|
|
484
|
-
if (!destNode)
|
|
476
|
+
if (!destNode) destNode = createNode(null);
|
|
485
477
|
destNode.minX = Infinity;
|
|
486
478
|
destNode.minY = Infinity;
|
|
487
479
|
destNode.maxX = -Infinity;
|
|
488
480
|
destNode.maxY = -Infinity;
|
|
489
481
|
|
|
490
|
-
for (var i = k; i < p; i++) {
|
|
491
|
-
|
|
482
|
+
for (var i = k, child; i < p; i++) {
|
|
483
|
+
child = node.children[i];
|
|
492
484
|
extend(destNode, node.leaf ? toBBox(child) : child);
|
|
493
485
|
}
|
|
494
486
|
|
|
@@ -515,10 +507,10 @@ function enlargedArea(a, b) {
|
|
|
515
507
|
}
|
|
516
508
|
|
|
517
509
|
function intersectionArea(a, b) {
|
|
518
|
-
var minX = Math.max(a.minX, b.minX)
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
510
|
+
var minX = Math.max(a.minX, b.minX),
|
|
511
|
+
minY = Math.max(a.minY, b.minY),
|
|
512
|
+
maxX = Math.min(a.maxX, b.maxX),
|
|
513
|
+
maxY = Math.min(a.maxY, b.maxY);
|
|
522
514
|
|
|
523
515
|
return Math.max(0, maxX - minX) *
|
|
524
516
|
Math.max(0, maxY - minY);
|
|
@@ -554,21 +546,81 @@ function createNode(children) {
|
|
|
554
546
|
// combines selection algorithm with binary divide & conquer approach
|
|
555
547
|
|
|
556
548
|
function multiSelect(arr, left, right, n, compare) {
|
|
557
|
-
var stack = [left, right]
|
|
549
|
+
var stack = [left, right],
|
|
550
|
+
mid;
|
|
558
551
|
|
|
559
552
|
while (stack.length) {
|
|
560
553
|
right = stack.pop();
|
|
561
554
|
left = stack.pop();
|
|
562
555
|
|
|
563
|
-
if (right - left <= n)
|
|
556
|
+
if (right - left <= n) continue;
|
|
564
557
|
|
|
565
|
-
|
|
558
|
+
mid = left + Math.ceil((right - left) / n / 2) * n;
|
|
566
559
|
quickselect(arr, mid, left, right, compare);
|
|
567
560
|
|
|
568
561
|
stack.push(left, mid, mid, right);
|
|
569
562
|
}
|
|
570
563
|
}
|
|
571
564
|
|
|
572
|
-
|
|
565
|
+
},{"quickselect":2}],2:[function(require,module,exports){
|
|
566
|
+
'use strict';
|
|
567
|
+
|
|
568
|
+
module.exports = quickselect;
|
|
569
|
+
module.exports.default = quickselect;
|
|
570
|
+
|
|
571
|
+
function quickselect(arr, k, left, right, compare) {
|
|
572
|
+
quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
function quickselectStep(arr, k, left, right, compare) {
|
|
576
|
+
|
|
577
|
+
while (right > left) {
|
|
578
|
+
if (right - left > 600) {
|
|
579
|
+
var n = right - left + 1;
|
|
580
|
+
var m = k - left + 1;
|
|
581
|
+
var z = Math.log(n);
|
|
582
|
+
var s = 0.5 * Math.exp(2 * z / 3);
|
|
583
|
+
var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
|
|
584
|
+
var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
|
|
585
|
+
var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
|
|
586
|
+
quickselectStep(arr, k, newLeft, newRight, compare);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
var t = arr[k];
|
|
590
|
+
var i = left;
|
|
591
|
+
var j = right;
|
|
592
|
+
|
|
593
|
+
swap(arr, left, k);
|
|
594
|
+
if (compare(arr[right], t) > 0) swap(arr, left, right);
|
|
595
|
+
|
|
596
|
+
while (i < j) {
|
|
597
|
+
swap(arr, i, j);
|
|
598
|
+
i++;
|
|
599
|
+
j--;
|
|
600
|
+
while (compare(arr[i], t) < 0) i++;
|
|
601
|
+
while (compare(arr[j], t) > 0) j--;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
if (compare(arr[left], t) === 0) swap(arr, left, j);
|
|
605
|
+
else {
|
|
606
|
+
j++;
|
|
607
|
+
swap(arr, j, right);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
if (j <= k) left = j + 1;
|
|
611
|
+
if (k <= j) right = j - 1;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
function swap(arr, i, j) {
|
|
616
|
+
var tmp = arr[i];
|
|
617
|
+
arr[i] = arr[j];
|
|
618
|
+
arr[j] = tmp;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
function defaultCompare(a, b) {
|
|
622
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
623
|
+
}
|
|
573
624
|
|
|
574
|
-
}))
|
|
625
|
+
},{}]},{},[1])(1)
|
|
626
|
+
});
|