diff --git a/app/.env b/app/.env index db5ccb6..81bd26d 100644 --- a/app/.env +++ b/app/.env @@ -9,3 +9,6 @@ REACT_APP_SERVER_REST_API_BASE_URL=185.100.212.76:5000 # Base URL for the server marketplace API. REACT_APP_SERVER_MARKETPLACE_URL=185.100.212.76:50011 + +# Base URL for the server mqtt. +REACT_APP_SERVER_MQTT_URL=185.100.212.76:23457 diff --git a/app/package-lock.json b/app/package-lock.json index 0abd22a..c8210e0 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -14,10 +14,12 @@ "@react-three/drei": "^9.113.0", "@react-three/fiber": "^8.17.7", "@react-three/postprocessing": "^2.16.3", + "@recast-navigation/three": "^0.39.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "@turf/turf": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/turf": "^7.2.0", "@types/jest": "^27.5.2", "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", @@ -3754,6 +3756,41 @@ "three": ">=0.144.0" } }, + "node_modules/@recast-navigation/core": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@recast-navigation/core/-/core-0.39.0.tgz", + "integrity": "sha512-l48GHrimIUR+9ugAsjIecdUh5ohHULrFYUn5EqClafV5HJB/cPFBbN4n9HV2jDamCjGRGEhtSpId7NpkhoF0qQ==", + "dependencies": { + "@recast-navigation/wasm": "0.39.0" + } + }, + "node_modules/@recast-navigation/generators": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@recast-navigation/generators/-/generators-0.39.0.tgz", + "integrity": "sha512-ymiacmEWK4SGY/FUlr6/n9/FgvA9NikPR57JyCGbteScEG10UYByrPGXJQU/UXuzUhUbmtKlPJAk2KP+MLgxJA==", + "dependencies": { + "@recast-navigation/core": "0.39.0", + "@recast-navigation/wasm": "0.39.0" + } + }, + "node_modules/@recast-navigation/three": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@recast-navigation/three/-/three-0.39.0.tgz", + "integrity": "sha512-zk2EnZSoMY1P2uYexGFnfoOG92kUD94B1R+7pz4MMOjcryqCKzGhTSalThyY8SbNi9r4MrKe7Xd50W4vS/1k8A==", + "dependencies": { + "@recast-navigation/core": "0.39.0", + "@recast-navigation/generators": "0.39.0" + }, + "peerDependencies": { + "@types/three": "0.x.x", + "three": "0.x.x" + } + }, + "node_modules/@recast-navigation/wasm": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@recast-navigation/wasm/-/wasm-0.39.0.tgz", + "integrity": "sha512-1P/8pqXtwJSVseLBtO0AOdqQe1XnhPFTVvG9FMORFVFunYqkKXxULgni8x3fsutkQisyY+X7YQoIMLvZR4lKFA==" + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -4223,360 +4260,360 @@ "dev": true }, "node_modules/@turf/along": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/along/-/along-7.1.0.tgz", - "integrity": "sha512-WLgBZJ/B6CcASF6WL7M+COtHlVP0hBrMbrtKyF7KBlicwRuijJZXDtEQA5oLgr+k1b2HqGN+UqH2A0/E719enQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/along/-/along-7.2.0.tgz", + "integrity": "sha512-Cf+d2LozABdb0TJoIcJwFKB+qisJY4nMUW9z6PAuZ9UCH7AR//hy2Z06vwYCKFZKP4a7DRPkOMBadQABCyoYuw==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/angle": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/angle/-/angle-7.1.0.tgz", - "integrity": "sha512-YMHEV/YrARsWgWoQuXEWrQMsvB8z67nTMw2eiLZ883V7jwkhWQGvCW6W+/mGgsWQdHppjCZNcKryryhD2GRWVA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/angle/-/angle-7.2.0.tgz", + "integrity": "sha512-b28rs1NO8Dt/MXadFhnpqH7GnEWRsl+xF5JeFtg9+eM/+l/zGrdliPYMZtAj12xn33w22J1X4TRprAI0rruvVQ==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/area": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/area/-/area-7.1.0.tgz", - "integrity": "sha512-w91FEe02/mQfMPRX2pXua48scFuKJ2dSVMF2XmJ6+BJfFiCPxp95I3+Org8+ZsYv93CDNKbf0oLNEPnuQdgs2g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/area/-/area-7.2.0.tgz", + "integrity": "sha512-zuTTdQ4eoTI9nSSjerIy4QwgvxqwJVciQJ8tOPuMHbXJ9N/dNjI7bU8tasjhxas/Cx3NE9NxVHtNpYHL0FSzoA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bbox": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-7.1.0.tgz", - "integrity": "sha512-PdWPz9tW86PD78vSZj2fiRaB8JhUHy6piSa/QXb83lucxPK+HTAdzlDQMTKj5okRCU8Ox/25IR2ep9T8NdopRA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-7.2.0.tgz", + "integrity": "sha512-wzHEjCXlYZiDludDbXkpBSmv8Zu6tPGLmJ1sXQ6qDwpLE1Ew3mcWqt8AaxfTP5QwDNQa3sf2vvgTEzNbPQkCiA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bbox-clip": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bbox-clip/-/bbox-clip-7.1.0.tgz", - "integrity": "sha512-PhZubKCzF/afwStUzODqOJluiCbCw244lCtVhXA9F+Pgkhvk8KvbFdgpPquOZ45OwuktrchSB28BrBkSBiadHw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bbox-clip/-/bbox-clip-7.2.0.tgz", + "integrity": "sha512-q6RXTpqeUQAYLAieUL1n3J6ukRGsNVDOqcYtfzaJbPW+0VsAf+1cI16sN700t0sekbeU1DH/RRVAHhpf8+36wA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bbox-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bbox-polygon/-/bbox-polygon-7.1.0.tgz", - "integrity": "sha512-fvZB09ErCZOVlWVDop836hmpKaGUmfXnR9naMhS73A/8nn4M3hELbQtMv2R8gXj7UakXCuxS/i9erdpDFZ2O+g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bbox-polygon/-/bbox-polygon-7.2.0.tgz", + "integrity": "sha512-Aj4G1GAAy26fmOqMjUk0Z+Lcax5VQ9g1xYDbHLQWXvfTsaueBT+RzdH6XPnZ/seEEnZkio2IxE8V5af/osupgA==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bearing": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-7.1.0.tgz", - "integrity": "sha512-X5lackrZ6FW+YhgjWxwVFRgWD1j4xm4t5VvE6EE6v/1PVaHQ5OCjf6u1oaLx5LSG+gaHUhjTlAHrn9MYPFaeTA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-7.2.0.tgz", + "integrity": "sha512-Jm0Xt3GgHjRrWvBtAGvgfnADLm+4exud2pRlmCYx8zfiKuNXQFkrcTZcOiJOgTfG20Agq28iSh15uta47jSIbg==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bezier-spline": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bezier-spline/-/bezier-spline-7.1.0.tgz", - "integrity": "sha512-bhBY70bcVYJEosuW7B/TFtnE5rmPTTpxmJvljhGC0eyM84oNVv7apDBuseb5KdlTOOBIvdD9nIE4qV8lmplp6w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bezier-spline/-/bezier-spline-7.2.0.tgz", + "integrity": "sha512-7BPkc3ufYB9KLvcaTpTsnpXzh9DZoENxCS0Ms9XUwuRXw45TpevwUpOsa3atO76iKQ5puHntqFO4zs8IUxBaaA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-clockwise": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-7.1.0.tgz", - "integrity": "sha512-H5DYno+gHwZx+VaiC8DUBZXZQlxYecdSvqCfCACWi1uMsKvlht/O+xy65hz2P57lk2smlcV+1ETFVxJlEZduYg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-7.2.0.tgz", + "integrity": "sha512-0fJeFSARxy6ealGBM4Gmgpa1o8msQF87p2Dx5V6uSqzT8VPDegX1NSWl4b7QgXczYa9qv7IAABttdWP0K7Q7eQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-concave": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-concave/-/boolean-concave-7.1.0.tgz", - "integrity": "sha512-IFCN25DI+hvngxIsv4+MPuRJQRl/Lz/xnZgpH82leCn4Jqn5wW7KqKFMz7G4GoKK+93cK5/6ioAxY7hVWBXxJw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-concave/-/boolean-concave-7.2.0.tgz", + "integrity": "sha512-v3dTN04dfO6VqctQj1a+pjDHb6+/Ev90oAR2QjJuAntY4ubhhr7vKeJdk/w+tWNSMKULnYwfe65Du3EOu3/TeA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-contains": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-7.1.0.tgz", - "integrity": "sha512-ldy4j1/RVChYTYjEb4wWaE/JyF1jA87WpsB4eVLic6OcAYJGs7POF1kfKbcdkJJiRBmhI3CXNA+u+m9y4Z/j3g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-7.2.0.tgz", + "integrity": "sha512-dgRQm4uVO5XuLee4PLVH7CFQZKdefUBMIXTPITm2oRIDmPLJKHDOFKQTNkGJ73mDKKBR2lmt6eVH3br6OYrEYg==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-crosses": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-crosses/-/boolean-crosses-7.1.0.tgz", - "integrity": "sha512-LK8UM3AENycuGinLCDaL0QSznGMnD0XsjFDGnY4KehshiL5Zd8ZsPyKmHOPygUJT9DWeH69iLx459lOc+5Vj2w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-crosses/-/boolean-crosses-7.2.0.tgz", + "integrity": "sha512-9GyM4UUWFKQOoNhHVSfJBf5XbPy8Fxfz9djjJNAnm/IOl8NmFUSwFPAjKlpiMcr6yuaAoc9R/1KokS9/eLqPvA==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/polygon-to-line": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/polygon-to-line": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-disjoint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-disjoint/-/boolean-disjoint-7.1.0.tgz", - "integrity": "sha512-JapOG03kOCoGeYMWgTQjEifhr1nUoK4Os2cX0iC5X9kvZF4qCHeruX8/rffBQDx7PDKQKusSTXq8B1ISFi0hOw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-disjoint/-/boolean-disjoint-7.2.0.tgz", + "integrity": "sha512-xdz+pYKkLMuqkNeJ6EF/3OdAiJdiHhcHCV0ykX33NIuALKIEpKik0+NdxxNsZsivOW6keKwr61SI+gcVtHYcnQ==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/polygon-to-line": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/polygon-to-line": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-equal": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-equal/-/boolean-equal-7.1.0.tgz", - "integrity": "sha512-deghtFMApc7fNsdXtZdgYR4gsU+TVfowcv666nrvZbPPsXL6NTYGBhDFmYXsJ8gPTCGT9uT0WXppdgT8diWOxA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-equal/-/boolean-equal-7.2.0.tgz", + "integrity": "sha512-TmjKYLsxXqEmdDtFq3QgX4aSogiISp3/doeEtDOs3NNSR8susOtBEZkmvwO6DLW+g/rgoQJIBR6iVoWiRqkBxw==", "dependencies": { - "@turf/clean-coords": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/clean-coords": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", "geojson-equality-ts": "^1.0.2", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-intersects": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-intersects/-/boolean-intersects-7.1.0.tgz", - "integrity": "sha512-gpksWbb0RT+Z3nfqRfoACY3KEFyv2BPaxJ3L76PH67DhHZviq3Nfg85KYbpuhS64FSm+9tXe4IaKn6EjbHo20g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-intersects/-/boolean-intersects-7.2.0.tgz", + "integrity": "sha512-GLRyLQgK3F14drkK5Qi9Mv7Z9VT1bgQUd9a3DB3DACTZWDSwfh8YZUFn/HBwRkK8dDdgNEXaavggQHcPi1k9ow==", "dependencies": { - "@turf/boolean-disjoint": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-disjoint": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-overlap": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-7.1.0.tgz", - "integrity": "sha512-mJRN0X8JiPm8eDZk5sLvIrsP03A2GId6ijx4VgSE1AvHwV6qB561KlUbWxga2AScocIfv/y/qd2OCs+/TQSZcg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-7.2.0.tgz", + "integrity": "sha512-ieM5qIE4anO+gUHIOvEN7CjyowF+kQ6v20/oNYJCp63TVS6eGMkwgd+I4uMzBXfVW66nVHIXjODdUelU+Xyctw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/line-overlap": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/line-overlap": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "geojson-equality-ts": "^1.0.2", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-parallel": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-parallel/-/boolean-parallel-7.1.0.tgz", - "integrity": "sha512-tA84Oux0X91CxUc6c/lZph5W9wUZGNT4fxFOg5Gp1IMTSwtxSYL1LMvKsr/VmMnwdOUkNcqAgU06+t4wBLtDfg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-parallel/-/boolean-parallel-7.2.0.tgz", + "integrity": "sha512-iOtuzzff8nmwv05ROkSvyeGLMrfdGkIi+3hyQ+DH4IVyV37vQbqR5oOJ0Nt3Qq1Tjrq9fvF8G3OMdAv3W2kY9w==", "dependencies": { - "@turf/clean-coords": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/line-segment": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", + "@turf/clean-coords": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/line-segment": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-point-in-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-7.1.0.tgz", - "integrity": "sha512-mprVsyIQ+ijWTZwbnO4Jhxu94ZW2M2CheqLiRTsGJy0Ooay9v6Av5/Nl3/Gst7ZVXxPqMeMaFYkSzcTc87AKew==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-7.2.0.tgz", + "integrity": "sha512-lvEOjxeXIp+wPXgl9kJA97dqzMfNexjqHou+XHVcfxQgolctoJiRYmcVCWGpiZ9CBf/CJha1KmD1qQoRIsjLaA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", "point-in-polygon-hao": "^1.1.0", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-point-on-line": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-point-on-line/-/boolean-point-on-line-7.1.0.tgz", - "integrity": "sha512-Kd83EjeTyY4kVMAhcW3Lb8aChwh24BUIhmpE9Or8M+ETNsFGzn9M7qtIySJHLRzKAL3letvWSKXKQPuK1AhAzg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-point-on-line/-/boolean-point-on-line-7.2.0.tgz", + "integrity": "sha512-H/bXX8+2VYeSyH8JWrOsu8OGmeA9KVZfM7M6U5/fSqGsRHXo9MyYJ94k39A9kcKSwI0aWiMXVD2UFmiWy8423Q==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-touches": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-touches/-/boolean-touches-7.1.0.tgz", - "integrity": "sha512-qN4LCs3RfVtNAAdn5GpsUFBqoZyAaK9UzSnGSh67GP9sy5M8MEHwM/HAJ5zGWJqQADrczI3U6BRWGLcGfGSz3Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-touches/-/boolean-touches-7.2.0.tgz", + "integrity": "sha512-8qb1CO+cwFATGRGFgTRjzL9aibfsbI91pdiRl7KIEkVdeN/H9k8FDrUA1neY7Yq48IaciuwqjbbojQ16FD9b0w==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-valid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-valid/-/boolean-valid-7.1.0.tgz", - "integrity": "sha512-zq1QCfQEyn+piHlvxxDifjmsJn2xl53i4mnKFYdMQI/i09XiX+Fi/MVM3i2hf3D5AsEPsud8Tk7C7rWNCm4nVw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-valid/-/boolean-valid-7.2.0.tgz", + "integrity": "sha512-xb7gdHN8VV6ivPJh6rPpgxmAEGReiRxqY+QZoEZVGpW2dXcmU1BdY6FA6G/cwvggXAXxJBREoANtEDgp/0ySbA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-crosses": "^7.1.0", - "@turf/boolean-disjoint": "^7.1.0", - "@turf/boolean-overlap": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-crosses": "^7.2.0", + "@turf/boolean-disjoint": "^7.2.0", + "@turf/boolean-overlap": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-intersect": "^7.2.0", "@types/geojson": "^7946.0.10", "geojson-polygon-self-intersections": "^1.2.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-within": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-within/-/boolean-within-7.1.0.tgz", - "integrity": "sha512-pgXgKCzYHssADQ1nClB1Q9aWI/dE1elm2jy3B5X59XdoFXKrKDZA+gCHYOYgp2NGO/txzVfl3UKvnxIj54Fa4w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-within/-/boolean-within-7.2.0.tgz", + "integrity": "sha512-zB3AiF59zQZ27Dp1iyhp9mVAKOFHat8RDH45TZhLY8EaqdEPdmLGvwMFCKfLryQcUDQvmzP8xWbtUR82QM5C4g==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/buffer": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/buffer/-/buffer-7.1.0.tgz", - "integrity": "sha512-QM3JiCMYA19k5ouO8wJtvICX3Y8XntxVpDfHSKhFFidZcCkMTR2PWWOpwS6EoL3t75rSKw/FOLIPLZGtIu963w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/buffer/-/buffer-7.2.0.tgz", + "integrity": "sha512-QH1FTr5Mk4z1kpQNztMD8XBOZfpOXPOtlsxaSAj2kDIf5+LquA6HtJjZrjUngnGtzG5+XwcfyRL4ImvLnFjm5Q==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/center": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/center": "^7.2.0", + "@turf/helpers": "^7.2.0", "@turf/jsts": "^2.7.1", - "@turf/meta": "^7.1.0", - "@turf/projection": "^7.1.0", + "@turf/meta": "^7.2.0", + "@turf/projection": "^7.2.0", "@types/geojson": "^7946.0.10", "d3-geo": "1.7.1" }, @@ -4585,394 +4622,394 @@ } }, "node_modules/@turf/center": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/center/-/center-7.1.0.tgz", - "integrity": "sha512-p9AvBMwNZmRg65kU27cGKHAUQnEcdz8Y7f/i5DvaMfm4e8zmawr+hzPKXaUpUfiTyLs8Xt2W9vlOmNGyH+6X3w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/center/-/center-7.2.0.tgz", + "integrity": "sha512-UTNp9abQ2kuyRg5gCIGDNwwEQeF3NbpYsd1Q0KW9lwWuzbLVNn0sOwbxjpNF4J2HtMOs5YVOcqNvYyuoa2XrXw==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/center-mean": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/center-mean/-/center-mean-7.1.0.tgz", - "integrity": "sha512-NQZB1LUVsyAD+p0+D4huzX2XVnfVx1yEEI9EX602THmi+g+nkge4SK9OMV11ov/Tv8JJ6aVNVPo/cy1vm/LCIQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/center-mean/-/center-mean-7.2.0.tgz", + "integrity": "sha512-NaW6IowAooTJ35O198Jw3U4diZ6UZCCeJY+4E+WMLpks3FCxMDSHEfO2QjyOXQMGWZnVxVelqI5x9DdniDbQ+A==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/center-median": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/center-median/-/center-median-7.1.0.tgz", - "integrity": "sha512-jx4/Ql5+v41Cd0J/gseNCUbLTzWUT2LUaiXn8eFWDrvmEgqHIx7KJcGcJd5HzV+9zJwng4AXxyh5NMvUR0NjwA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/center-median/-/center-median-7.2.0.tgz", + "integrity": "sha512-/CgVyHNG4zAoZpvkl7qBCe4w7giWNVtLyTU5PoIfg1vWM4VpYw+N7kcBBH46bbzvVBn0vhmZr586r543EwdC/A==", "dependencies": { - "@turf/center-mean": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/center-mean": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/center-of-mass": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/center-of-mass/-/center-of-mass-7.1.0.tgz", - "integrity": "sha512-j38oBlj7LBoCjZbrIo8EoHVGhk7UQmMLQ1fe8ZPAF9pd05XEL1qxyHKZKdQ/deGISiaEhXCyfLNrKAHAuy25RA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/center-of-mass/-/center-of-mass-7.2.0.tgz", + "integrity": "sha512-ij3pmG61WQPHGTQvOziPOdIgwTMegkYTwIc71Gl7xn4C0vWH6KLDSshCphds9xdWSXt2GbHpUs3tr4XGntHkEQ==", "dependencies": { - "@turf/centroid": "^7.1.0", - "@turf/convex": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/centroid": "^7.2.0", + "@turf/convex": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/centroid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-7.1.0.tgz", - "integrity": "sha512-1Y1b2l+ZB1CZ+ITjUCsGqC4/tSjwm/R4OUfDztVqyyCq/VvezkLmTNqvXTGXgfP0GXkpv68iCfxF5M7QdM5pJQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-7.2.0.tgz", + "integrity": "sha512-yJqDSw25T7P48au5KjvYqbDVZ7qVnipziVfZ9aSo7P2/jTE7d4BP21w0/XLi3T/9bry/t9PR1GDDDQljN4KfDw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/circle": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-7.1.0.tgz", - "integrity": "sha512-6qhF1drjwH0Dg3ZB9om1JkWTJfAqBcbtIrAj5UPlrAeHP87hGoCO2ZEsFEAL9Q18vntpivT89Uho/nqQUjJhYw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-7.2.0.tgz", + "integrity": "sha512-1AbqBYtXhstrHmnW6jhLwsv7TtmT0mW58Hvl1uZXEDM1NCVXIR50yDipIeQPjrCuJ/Zdg/91gU8+4GuDCAxBGA==", "dependencies": { - "@turf/destination": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/destination": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clean-coords": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clean-coords/-/clean-coords-7.1.0.tgz", - "integrity": "sha512-q1U8UbRVL5cRdwOlNjD8mad8pWjFGe0s4ihg1pSiVNq7i47WASJ3k20yZiUFvuAkyNjV0rZ/A7Jd7WzjcierFg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clean-coords/-/clean-coords-7.2.0.tgz", + "integrity": "sha512-+5+J1+D7wW7O/RDXn46IfCHuX1gIV1pIAQNSA7lcDbr3HQITZj334C4mOGZLEcGbsiXtlHWZiBtm785Vg8i+QQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clone": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-7.1.0.tgz", - "integrity": "sha512-5R9qeWvL7FDdBIbEemd0eCzOStr09oburDvJ1hRiPCFX6rPgzcZBQ0gDmZzoF4AFcNLb5IwknbLZjVLaUGWtFA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-7.2.0.tgz", + "integrity": "sha512-JlGUT+/5qoU5jqZmf6NMFIoLDY3O7jKd53Up+zbpJ2vzUp6QdwdNzwrsCeONhynWM13F0MVtPXH4AtdkrgFk4g==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clusters": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clusters/-/clusters-7.1.0.tgz", - "integrity": "sha512-7CY3Ai+5V6q2O9/IgqLpJQrmrTy7aUJjTW1iRan8Tz3WixvxyJHeS3iyRy8Oc0046chQIaHLtyTgKVt2QdsPSA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clusters/-/clusters-7.2.0.tgz", + "integrity": "sha512-sKOrIKHHtXAuTKNm2USnEct+6/MrgyzMW42deZ2YG2RRKWGaaxHMFU2Yw71Yk4DqStOqTIBQpIOdrRuSOwbuQw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clusters-dbscan": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clusters-dbscan/-/clusters-dbscan-7.1.0.tgz", - "integrity": "sha512-BmrBTOEaKN5FIED6b3yb3V3ejfK0A2Q3pT9/ji3mcRLJiBaRGeiN5V6gtGXe7PeMYdoqhHykU5Ye2uUtREWRdQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clusters-dbscan/-/clusters-dbscan-7.2.0.tgz", + "integrity": "sha512-VWVUuDreev56g3/BMlnq/81yzczqaz+NVTypN5CigGgP67e+u/CnijphiuhKjtjDd/MzGjXgEWBJc26Y6LYKAw==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "rbush": "^3.0.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clusters-kmeans": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clusters-kmeans/-/clusters-kmeans-7.1.0.tgz", - "integrity": "sha512-M8cCqR6iE1jDSUF/UU9QdPUFrobZS2fo59TfF1IRHZ2G1EjbcK4GzZcUfmQS6DZraGudYutpMYIuNdm1dPMqdQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clusters-kmeans/-/clusters-kmeans-7.2.0.tgz", + "integrity": "sha512-BxQdK8jc8Mwm9yoClCYkktm4W004uiQGqb/i/6Y7a8xqgJITWDgTu/cy//wOxAWPk4xfe6MThjnqkszWW8JdyQ==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "skmeans": "0.9.7", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/collect": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/collect/-/collect-7.1.0.tgz", - "integrity": "sha512-6indMWLiKeBh4AsioNeFeFnO0k9U5CBsWAFEje6tOEFI4c+P7LF9mNA9z91H8KkrhegR9XNO5Vm2rmdY63aYXw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/collect/-/collect-7.2.0.tgz", + "integrity": "sha512-zRVGDlYS8Bx/Zz4vnEUyRg4dmqHhkDbW/nIUIJh657YqaMj1SFi4Iv2i9NbcurlUBDJFkpuOhCvvEvAdskJ8UA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", "rbush": "^3.0.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/combine": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/combine/-/combine-7.1.0.tgz", - "integrity": "sha512-Xl7bGKKjgzIq2T/IemS6qnIykyuxU6cMxKtz+qLeWJGoNww/BllwxXePSV+dWRPXZTFFj96KIhBXAW0aUjAQKQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/combine/-/combine-7.2.0.tgz", + "integrity": "sha512-VEjm3IvnbMt3IgeRIhCDhhQDbLqCU1/5uN1+j1u6fyA095pCizPThGp4f/COSzC3t1s/iiV+fHuDsB6DihHffQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/concave": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/concave/-/concave-7.1.0.tgz", - "integrity": "sha512-aSid53gYRee4Tjc4pfeI3KI+RoBUnL/hRMilxIPduagTgZZS+cvvk01OQWBKm5UTVfHRGuy0XIqnK8y9RFinDQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/concave/-/concave-7.2.0.tgz", + "integrity": "sha512-cpaDDlumK762kdadexw5ZAB6g/h2pJdihZ+e65lbQVe3WukJHAANnIEeKsdFCuIyNKrwTz2gWu5ws+OpjP48Yw==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/tin": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/tin": "^7.2.0", "@types/geojson": "^7946.0.10", "topojson-client": "3.x", "topojson-server": "3.x", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/convex": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/convex/-/convex-7.1.0.tgz", - "integrity": "sha512-w9fUMZYE36bLrEWEj7L7aVMCB7NBtr2o8G+avRvUIwF4DPqbtcjlcZE9EEBfq44uYdn+/Pke6Iq42T/zyD/cpg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/convex/-/convex-7.2.0.tgz", + "integrity": "sha512-HsgHm+zHRE8yPCE/jBUtWFyaaBmpXcSlyHd5/xsMhSZRImFzRzBibaONWQo7xbKZMISC3Nc6BtUjDi/jEVbqyA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "concaveman": "^1.2.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/destination": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-7.1.0.tgz", - "integrity": "sha512-97XuvB0iaAiMg86hrnZ529WwP44TQAA9mmI5PMlchACiA4LFrEtWjjDzvO6234coieoqhrw6dZYcJvd5O2PwrQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-7.2.0.tgz", + "integrity": "sha512-8DUxtOO0Fvrh1xclIUj3d9C5WS20D21F5E+j+X9Q+ju6fcM4huOqTg5ckV1DN2Pg8caABEc5HEZJnGch/5YnYQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/difference": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-7.1.0.tgz", - "integrity": "sha512-+JVzdskICQ8ULKQ9CpWUM5kBvoXxN4CO78Ez/Ki3/7NXl7+HM/nb12B0OyM8hkJchpb8TsOi0YwyJiKMqEpTBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-7.2.0.tgz", + "integrity": "sha512-NHKD1v3s8RX+9lOpvHJg6xRuJOKiY3qxHhz5/FmE0VgGqnCkE7OObqWZ5SsXG+Ckh0aafs5qKhmDdDV/gGi6JA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/dissolve": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/dissolve/-/dissolve-7.1.0.tgz", - "integrity": "sha512-fyOnCSYVUZ8SF9kt9ROnQYlkJTE0hpWSoWwbMZQCAR7oVZVPiuPq7eIbzTP+k5jzEAnofsqoGs5qVDTjHcWMiw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/dissolve/-/dissolve-7.2.0.tgz", + "integrity": "sha512-gPG5TE3mAYuZqBut8tPYCKwi4hhx5Cq0ALoQMB9X0hrVtFIKrihrsj98XQM/5pL/UIpAxQfwisQvy6XaOFaoPA==", "dependencies": { - "@turf/flatten": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/flatten": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/distance": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-7.1.0.tgz", - "integrity": "sha512-hhNHhxCHB3ddzAGCNY4BtE29OZh+DAJPvUapQz+wOjISnlwvMcwLKvslgHWSYF536QDVe/93FEU2q67+CsZTPA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-7.2.0.tgz", + "integrity": "sha512-HBjjXIgEcD/wJYjv7/6OZj5yoky2oUvTtVeIAqO3lL80XRvoYmVg6vkOIu6NswkerwLDDNT9kl7+BFLJoHbh6Q==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/distance-weight": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/distance-weight/-/distance-weight-7.1.0.tgz", - "integrity": "sha512-8m6s4y8Yyt6r3itf44yAJjXC+62UkrkhOpskIfaE0lHcBcvZz9wjboHoBf3bS4l/42E4StcanbFZdjOpODAdZw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/distance-weight/-/distance-weight-7.2.0.tgz", + "integrity": "sha512-NeoyV0fXDH+7nIoNtLjAoH9XL0AS1pmTIyDxEE6LryoDTsqjnuR0YQxIkLCCWDqECoqaOmmBqpeWONjX5BwWCg==", "dependencies": { - "@turf/centroid": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/centroid": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/ellipse": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/ellipse/-/ellipse-7.1.0.tgz", - "integrity": "sha512-AfOahUmStDExWGPg8ZWxxkgom+fdJs7Mn9DzZH+fV/uZ+je1bLQpbPCUu9/ev6u/HhbYGl4VAL/CeQzjOyy6LQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/ellipse/-/ellipse-7.2.0.tgz", + "integrity": "sha512-/Y75S5hE2+xjnTw4dXpQ5r/Y2HPM4xrwkPRCCQRpuuboKdEvm42azYmh7isPnMnBTVcmGb9UmGKj0HHAbiwt1g==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", - "@turf/transform-rotate": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", + "@turf/transform-rotate": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/envelope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/envelope/-/envelope-7.1.0.tgz", - "integrity": "sha512-WeLQse9wuxsxhzSqrJA6Ha7rLWnLKgdKY9cfxmJKHSpgqcJyNk60m7+T3UpI/nkGwpfbpeyB3EGC1EWPbxiDUg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/envelope/-/envelope-7.2.0.tgz", + "integrity": "sha512-xOMtDeNKHwUuDfzQeoSNmdabsP0/IgVDeyzitDe/8j9wTeW+MrKzVbGz7627PT3h6gsO+2nUv5asfKtUbmTyHA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/explode": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/explode/-/explode-7.1.0.tgz", - "integrity": "sha512-To+GUbU6HtcHZ8S0w/dw1EbdQIOCXALTr6Ug5/IFg8hIBMJelDpVr3Smwy8uqhDRFinY2eprBwQnDPcd10eCqA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/explode/-/explode-7.2.0.tgz", + "integrity": "sha512-jyMXg93J1OI7/65SsLE1k9dfQD3JbcPNMi4/O3QR2Qb3BAs2039oFaSjtW+YqhMqVC4V3ZeKebMcJ8h9sK1n+A==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/flatten": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/flatten/-/flatten-7.1.0.tgz", - "integrity": "sha512-Kb23pqEarcLsdBqnQcK0qTrSMiWNTVb9tOFrNlZc66DIhDLAdpOKG4eqk00CMoUzWTixlnawDgJRqcStRrR4WA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/flatten/-/flatten-7.2.0.tgz", + "integrity": "sha512-q38Qsqr4l7mxp780zSdn0gp/WLBX+sa+gV6qIbDQ1HKCrrPK8QQJmNx7gk1xxEXVot6tq/WyAPysCQdX+kLmMA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/flip": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/flip/-/flip-7.1.0.tgz", - "integrity": "sha512-vac73W8WblzzNFanzWYLBzWDIcqc5xczOrtEO07RDEiKEI3Heo0471Jed3v9W506uuOX6/HAiCjXbRjTLjiLfw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/flip/-/flip-7.2.0.tgz", + "integrity": "sha512-X0TQ0U/UYh4tyXdLO5itP1sO2HOvfrZC0fYSWmTfLDM14jEPkEK8PblofznfBygL+pIFtOS2is8FuVcp5XxYpQ==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/geojson-rbush": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/geojson-rbush/-/geojson-rbush-7.1.0.tgz", - "integrity": "sha512-j1C7Ohlxa1z644bNOpgibcFGaDLgLXGLOzwF1tfQaP5y7E4PJQUXL0DWIgNb3Ke7gZC05LPHM25a5TRReUfFBQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/geojson-rbush/-/geojson-rbush-7.2.0.tgz", + "integrity": "sha512-ST8fLv+EwxVkDgsmhHggM0sPk2SfOHTZJkdgMXVFT7gB9o4lF8qk4y4lwvCCGIfFQAp2yv/PN5EaGMEKutk6xw==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "rbush": "^3.0.1" }, @@ -4981,12 +5018,12 @@ } }, "node_modules/@turf/great-circle": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-7.1.0.tgz", - "integrity": "sha512-92q5fqUp5oW+FYekUIrUVR5PZBWbOV6NHKHPIiNahiPvtkpZItbbjoO+tGn5+2i8mxZP9FGOthayJe4V0a1xkg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-7.2.0.tgz", + "integrity": "sha512-n30OiADyOKHhor0aXNgYfXQYXO3UtsOKmhQsY1D89/Oh1nCIXG/1ZPlLL9ZoaRXXBTUBjh99a+K8029NQbGDhw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -4994,49 +5031,49 @@ } }, "node_modules/@turf/helpers": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.1.0.tgz", - "integrity": "sha512-dTeILEUVeNbaEeoZUOhxH5auv7WWlOShbx7QSd4s0T4Z0/iz90z9yaVCtZOLbU89umKotwKaJQltBNO9CzVgaQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.2.0.tgz", + "integrity": "sha512-cXo7bKNZoa7aC7ydLmUR02oB3IgDe7MxiPuRz3cCtYQHn+BJ6h1tihmamYDWWUlPHgSNF0i3ATc4WmDECZafKw==", "dependencies": { "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/hex-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/hex-grid/-/hex-grid-7.1.0.tgz", - "integrity": "sha512-I+Apx0smOPkMzaS5HHL44YOxSkSUvrz+wtSIETsDFWWLT2xKNkaaEcYU5MkgSoEfQsj082M7EkOIIpocXlA3kg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/hex-grid/-/hex-grid-7.2.0.tgz", + "integrity": "sha512-Yo2yUGxrTCQfmcVsSjDt0G3Veg8YD26WRd7etVPD9eirNNgXrIyZkbYA7zVV/qLeRWVmYIKRXg1USWl7ORQOGA==", "dependencies": { - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/intersect": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/intersect": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/interpolate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/interpolate/-/interpolate-7.1.0.tgz", - "integrity": "sha512-VWec1OW9gHZLPS3yYkUXAHKMGQuYO4aqh8WCltT7Ym4efrKqkSOE5T+mBqO68QgcL8nY4kiNa8lxwXd0SfXDSA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/interpolate/-/interpolate-7.2.0.tgz", + "integrity": "sha512-Ifgjm1SEo6XujuSAU6lpRMvoJ1SYTreil1Rf5WsaXj16BQJCedht/4FtWCTNhSWTwEz2motQ1WNrjTCuPG94xA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/hex-grid": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/point-grid": "^7.1.0", - "@turf/square-grid": "^7.1.0", - "@turf/triangle-grid": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/hex-grid": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/point-grid": "^7.2.0", + "@turf/square-grid": "^7.2.0", + "@turf/triangle-grid": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5044,130 +5081,130 @@ } }, "node_modules/@turf/intersect": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/intersect/-/intersect-7.1.0.tgz", - "integrity": "sha512-T0VhI6yhptX9EoMsuuBETyqV+edyq31SUC8bfuM6kdJ5WwJ0EvUfQoC+3bhMtCOn60lHawrUuGBgW+vCO8KGMg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/intersect/-/intersect-7.2.0.tgz", + "integrity": "sha512-81GMzKS9pKqLPa61qSlFxLFeAC8XbwyCQ9Qv4z6o5skWk1qmMUbEHeMqaGUTEzk+q2XyhZ0sju1FV4iLevQ/aw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/invariant": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-7.1.0.tgz", - "integrity": "sha512-OCLNqkItBYIP1nE9lJGuIUatWGtQ4rhBKAyTfFu0z8npVzGEYzvguEeof8/6LkKmTTEHW53tCjoEhSSzdRh08Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-7.2.0.tgz", + "integrity": "sha512-kV4u8e7Gkpq+kPbAKNC21CmyrXzlbBgFjO1PhrHPgEdNqXqDawoZ3i6ivE3ULJj2rSesCjduUaC/wyvH/sNr2Q==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/isobands": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/isobands/-/isobands-7.1.0.tgz", - "integrity": "sha512-iMLTOP/K5C05AttF4N1WeV+KrY4O5VWW/abO0N86XCWh1OeqmIUgqIBKEmhDzttAqC0UK2YrUfj0lI1Ez1fYZQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/isobands/-/isobands-7.2.0.tgz", + "integrity": "sha512-lYoHeRieFzpBp29Jh19QcDIb0E+dzo/K5uwZuNga4wxr6heNU0AfkD4ByAHYIXHtvmp4m/JpSKq/2N6h/zvBkg==", "dependencies": { - "@turf/area": "^7.1.0", - "@turf/bbox": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/explode": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/area": "^7.2.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/explode": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "marchingsquares": "^1.3.3", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/isolines": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/isolines/-/isolines-7.1.0.tgz", - "integrity": "sha512-V6QTHXBT5ZsL3s9ZVBJgHYtz3gCFKqNnQLysNE02LE0fVVqaSao3sFrcpghmdDxf0hBCDK8lZVvyRGO6o32LHQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/isolines/-/isolines-7.2.0.tgz", + "integrity": "sha512-4ZXKxvA/JKkxAXixXhN3UVza5FABsdYgOWXyYm3L5ryTPJVOYTVSSd9A+CAVlv9dZc3YdlsqMqLTXNOOre/kwg==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "marchingsquares": "^1.3.3", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/jsts": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@turf/jsts/-/jsts-2.7.1.tgz", - "integrity": "sha512-+nwOKme/aUprsxnLSfr2LylV6eL6T1Tuln+4Hl92uwZ8FrmjDRCH5Bi1LJNVfWCiYgk8+5K+t2zDphWNTsIFDA==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@turf/jsts/-/jsts-2.7.2.tgz", + "integrity": "sha512-zAezGlwWHPyU0zxwcX2wQY3RkRpwuoBmhhNE9HY9kWhFDkCxZ3aWK5URKwa/SWKJbj9aztO+8vtdiBA28KVJFg==", "dependencies": { "jsts": "2.7.1" } }, "node_modules/@turf/kinks": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/kinks/-/kinks-7.1.0.tgz", - "integrity": "sha512-KKLYUsyJPU17fODwA81mhHzFYGQYocdbk9NxDPCcdRHvxzM8t95lptkGx/2k/9rXBs1DK7NmyzI4m7zDO0DK7g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/kinks/-/kinks-7.2.0.tgz", + "integrity": "sha512-BtxDxGewJR0Q5WR9HKBSxZhirFX+GEH1rD7/EvgDsHS8e1Y5/vNQQUmXdURjdPa4StzaUBsWRU5T3A356gLbPA==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/length": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/length/-/length-7.1.0.tgz", - "integrity": "sha512-wUJj9WLKEudG1ngNao2ZwD+Dt6UkvWIbubuJ6lR6FndFDL3iezFhNGy0IXS+0xH9kXi2apiTnM9Vk5+i8BTEvQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/length/-/length-7.2.0.tgz", + "integrity": "sha512-LBmYN+iCgVtWNLsckVnpQIJENqIIPO63mogazMp23lrDGfWXu07zZQ9ZinJVO5xYurXNhc/QI2xxoqt2Xw90Ig==", "dependencies": { - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-arc": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-arc/-/line-arc-7.1.0.tgz", - "integrity": "sha512-9/bM34PozTyJ5FXXPAzl/j0RpcTImgMFJZ0WhH0pZZEZRum6P0rJnENt2E2qI441zeozQ9H6X5DCiJogDmRUEw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-arc/-/line-arc-7.2.0.tgz", + "integrity": "sha512-kfWzA5oYrTpslTg5fN50G04zSypiYQzjZv3FLjbZkk6kta5fo4JkERKjTeA8x4XNojb+pfmjMBB0yIh2w2dDRw==", "dependencies": { - "@turf/circle": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/circle": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-chunk": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-chunk/-/line-chunk-7.1.0.tgz", - "integrity": "sha512-1lIUfqAQvCWAuUNC2ip8UYmM5kDltXOidLPW45Ee1OAIKYGBeFNtjwnxc0mQ40tnfTXclTYLDdOOP9LShspT9w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-chunk/-/line-chunk-7.2.0.tgz", + "integrity": "sha512-1ODyL5gETtWSL85MPI0lgp/78vl95M39gpeBxePXyDIqx8geDP9kXfAzctuKdxBoR4JmOVM3NT7Fz7h+IEkC+g==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/length": "^7.1.0", - "@turf/line-slice-along": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/length": "^7.2.0", + "@turf/line-slice-along": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5175,27 +5212,27 @@ } }, "node_modules/@turf/line-intersect": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-7.1.0.tgz", - "integrity": "sha512-JI3dvOsAoCqd4vUJ134FIzgcC42QpC/tBs+b4OJoxWmwDek3REv4qGaZY6wCg9X4hFSlCKFcnhMIQQZ/n720Qg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-7.2.0.tgz", + "integrity": "sha512-GhCJVEkc8EmggNi85EuVLoXF5T5jNVxmhIetwppiVyJzMrwkYAkZSYB3IBFYGUUB9qiNFnTwungVSsBV/S8ZiA==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", "sweepline-intersections": "^1.5.0", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-offset": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-offset/-/line-offset-7.1.0.tgz", - "integrity": "sha512-pz6irzhiQlJurU7DoXada6k3ei7PzY+VpsE/Wotm0D2KEAnoxqum2WK0rqqrhKPHKn+xpUGsHN9W/6K+qtmaHg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-offset/-/line-offset-7.2.0.tgz", + "integrity": "sha512-1+OkYueDCbnEWzbfBh3taVr+3SyM2bal5jfnSEuDiLA6jnlScgr8tn3INo+zwrUkPFZPPAejL1swVyO5TjUahw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5203,48 +5240,48 @@ } }, "node_modules/@turf/line-overlap": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-7.1.0.tgz", - "integrity": "sha512-BdHuEoFAtqvVw3LkjCdivG035nfuwZuxji2ijst+mkmDnlv7uwSBudJqcDGjU6up2r8P1mXChS4im4xjUz+lwg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-7.2.0.tgz", + "integrity": "sha512-NNn7/jg53+N10q2Kyt66bEDqN3101iW/1zA5FW7J6UbKApDFkByh+18YZq1of71kS6oUYplP86WkDp16LFpqqw==", "dependencies": { - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/geojson-rbush": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-segment": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/nearest-point-on-line": "^7.1.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/geojson-rbush": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-segment": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", "@types/geojson": "^7946.0.10", "fast-deep-equal": "^3.1.3", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-segment": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-7.1.0.tgz", - "integrity": "sha512-9rgIIH6ZzC3IiWxDQtKsq+j6eu8fRinMkJeusfI9HqOTm4vO02Ll4F/FigjOMOO/6X3TJ+Pqe3gS99TUaBINkw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-7.2.0.tgz", + "integrity": "sha512-E162rmTF9XjVN4rINJCd15AdQGCBlNqeWN3V0YI1vOUpZFNT2ii4SqEMCcH2d+5EheHLL8BWVwZoOsvHZbvaWA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-slice": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-slice/-/line-slice-7.1.0.tgz", - "integrity": "sha512-44xcjgMQxTa7tTAZlSD3t1cFjHi5SCfAqjg1ONv45EYKsQSonPaxD7LGzCbU5pR2RJjx3R7QRJx2G88hnGcXjQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-slice/-/line-slice-7.2.0.tgz", + "integrity": "sha512-bHotzZIaU1GPV3RMwttYpDrmcvb3X2i1g/WUttPZWtKrEo2VVAkoYdeZ2aFwtogERYS4quFdJ/TDzAtquBC8WQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/nearest-point-on-line": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5252,14 +5289,14 @@ } }, "node_modules/@turf/line-slice-along": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-slice-along/-/line-slice-along-7.1.0.tgz", - "integrity": "sha512-UwfnFORZnu4xdnuRXiQM3ODa8f9Q0FBjQF/XHNsPEI/xxmnwgQj3MZiULbAeHUbtU/7psTC7gEjfE3Lf0tcKQw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-slice-along/-/line-slice-along-7.2.0.tgz", + "integrity": "sha512-4/gPgP0j5Rp+1prbhXqn7kIH/uZTmSgiubUnn67F8nb9zE+MhbRglhSlRYEZxAVkB7VrGwjyolCwvrROhjHp2A==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5267,20 +5304,20 @@ } }, "node_modules/@turf/line-split": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-split/-/line-split-7.1.0.tgz", - "integrity": "sha512-QqUAmtlrnEu75cpLOmpEuiYU63BeVwpSKOBllBbu5gkP+7H/WBM/9fh7J0VgHNFHzqZCKiu8v4158k+CZr0QAg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-split/-/line-split-7.2.0.tgz", + "integrity": "sha512-yJTZR+c8CwoKqdW/aIs+iLbuFwAa3Yan+EOADFQuXXIUGps3bJUXx/38rmowNoZbHyP1np1+OtrotyHu5uBsfQ==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/geojson-rbush": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/line-segment": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/nearest-point-on-line": "^7.1.0", - "@turf/square": "^7.1.0", - "@turf/truncate": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/geojson-rbush": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/line-segment": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", + "@turf/square": "^7.2.0", + "@turf/truncate": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5288,42 +5325,42 @@ } }, "node_modules/@turf/line-to-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-to-polygon/-/line-to-polygon-7.1.0.tgz", - "integrity": "sha512-n/IWBRbo+l4XDTz4sfQsQm5bU9xex8KrthK397jQasd7a9PiOKGon9Z1t/lddTJhND6ajVyJ3hl+eZMtpQaghQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-to-polygon/-/line-to-polygon-7.2.0.tgz", + "integrity": "sha512-iKpJqc7EYc5NvlD4KaqrKKO6mXR7YWO/YwtW60E2FnsF/blnsy9OfAOcilYHgH3S/V/TT0VedC7DW7Kgjy2EIA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/mask": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/mask/-/mask-7.1.0.tgz", - "integrity": "sha512-d+u3IIiRhe17TDfP/+UMn9qRlJYPJpK7sj6WorsssluGi0yIG/Z24uWpcLskWKSI8NNgkIbDrp+GIYkJi2t7SA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/mask/-/mask-7.2.0.tgz", + "integrity": "sha512-ulJ6dQqXC0wrjIoqFViXuMUdIPX5Q6GPViZ3kGfeVijvlLM7kTFBsZiPQwALSr5nTQg4Ppf3FD0Jmg8IErPrgA==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/meta": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.1.0.tgz", - "integrity": "sha512-ZgGpWWiKz797Fe8lfRj7HKCkGR+nSJ/5aKXMyofCvLSc2PuYJs/qyyifDPWjASQQCzseJ7AlF2Pc/XQ/3XkkuA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.2.0.tgz", + "integrity": "sha512-igzTdHsQc8TV1RhPuOLVo74Px/hyPrVgVOTgjWQZzt3J9BVseCdpfY/0cJBdlSRI4S/yTmmHl7gAqjhpYH5Yaw==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5331,787 +5368,804 @@ } }, "node_modules/@turf/midpoint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/midpoint/-/midpoint-7.1.0.tgz", - "integrity": "sha512-uiUU9TwRZOCeiTUn8+7oE6MJUvclfq+n6KQ5VCMTZXiRUJjPu7nDLpBle1t2WSv7/w7O0kSQ4FfKXh0gHnkJOw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/midpoint/-/midpoint-7.2.0.tgz", + "integrity": "sha512-AMn5S9aSrbXdE+Q4Rj+T5nLdpfpn+mfzqIaEKkYI021HC0vb22HyhQHsQbSeX+AWcS4CjD1hFsYVcgKI+5qCfw==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/moran-index": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/moran-index/-/moran-index-7.1.0.tgz", - "integrity": "sha512-xsvAr3IRF/C6PlRMoN/ANrRx6c3QFUJgBCIVfI7re+Lkdprrzgw1HZA48ZjP4F91xbhgA1scnRgQdHFi2vO2SA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/moran-index/-/moran-index-7.2.0.tgz", + "integrity": "sha512-Aexh1EmXVPJhApr9grrd120vbalIthcIsQ3OAN2Tqwf+eExHXArJEJqGBo9IZiQbIpFJeftt/OvUvlI8BeO1bA==", "dependencies": { - "@turf/distance-weight": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/distance-weight": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/nearest-neighbor-analysis": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-neighbor-analysis/-/nearest-neighbor-analysis-7.1.0.tgz", - "integrity": "sha512-FAhT8/op3DuvqH0XFhv055JhYq/FC4aaIxEZ4hj8c7W6sYhUHAQgdRZ0tJ1RLe5/h+eXhCTbQ+DFfnfv3klu8g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/nearest-neighbor-analysis/-/nearest-neighbor-analysis-7.2.0.tgz", + "integrity": "sha512-LmP/crXb7gilgsL0wL9hsygqc537W/a1W5r9XBKJT4SKdqjoXX5APJatJfd3nwXbRIqwDH0cDA9/YyFjBPlKnA==", "dependencies": { - "@turf/area": "^7.1.0", - "@turf/bbox": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/nearest-point": "^7.1.0", + "@turf/area": "^7.2.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/nearest-point": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/nearest-point": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point/-/nearest-point-7.1.0.tgz", - "integrity": "sha512-VyInmhqfVWp+jE7sCK95o46qc4tDjAgzbRfRjr+rTgfFS1Sndyy1PdwyNn6TjBFDxiM6e+mjMEeGPjb1smJlEg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/nearest-point/-/nearest-point-7.2.0.tgz", + "integrity": "sha512-0wmsqXZ8CGw4QKeZmS+NdjYTqCMC+HXZvM3XAQIU6k6laNLqjad2oS4nDrtcRs/nWDvcj1CR+Io7OiQ6sbpn5Q==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/nearest-point-on-line": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-7.1.0.tgz", - "integrity": "sha512-aTjAOm7ab0tl5JoxGYRx/J/IbRL1DY1ZCIYQDMEQjK5gOllhclgeBC0wDXDkEZFGaVftjw0W2RtE2I0jX7RG4A==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-7.2.0.tgz", + "integrity": "sha512-UOhAeoDPVewBQV+PWg1YTMQcYpJsIqfW5+EuZ5vJl60XwUa0+kqB/eVfSLNXmHENjKKIlEt9Oy9HIDF4VeWmXA==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/nearest-point-to-line": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point-to-line/-/nearest-point-to-line-7.1.0.tgz", - "integrity": "sha512-rY2F/iY4S6U8H0hIoOI25xMWYEiKywxeTvTvn5GP8KCu+2oemfZROWa7n2+hQDRwO2/uaegrGEpxO7zlFarvzg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/nearest-point-to-line/-/nearest-point-to-line-7.2.0.tgz", + "integrity": "sha512-EorU7Qj30A7nAjh++KF/eTPDlzwuuV4neBz7tmSTB21HKuXZAR0upJsx6M2X1CSyGEgNsbFB0ivNKIvymRTKBw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/point-to-line-distance": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/point-to-line-distance": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/planepoint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/planepoint/-/planepoint-7.1.0.tgz", - "integrity": "sha512-hFORBkCd7Q0kNUzLqksT4XglLgTQF9tCjG+dbnZ1VehpZu+w+vlHdoW/mY7XCX3Kj1ObiyzVmXffmVYgwXwF6Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/planepoint/-/planepoint-7.2.0.tgz", + "integrity": "sha512-8Vno01tvi5gThUEKBQ46CmlEKDAwVpkl7stOPFvJYlA1oywjAL4PsmgwjXgleZuFtXQUPBNgv5a42Pf438XP4g==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/point-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/point-grid/-/point-grid-7.1.0.tgz", - "integrity": "sha512-ihuuUcWuCu4Z1+34UYCM5NGsU2DJaB4uE8cS3jDQoUqlc+8ii2ng8kcGEtTwVn0HdPsoKA7bgvSZcisJO0v6Ww==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/point-grid/-/point-grid-7.2.0.tgz", + "integrity": "sha512-ai7lwBV2FREPW3XiUNohT4opC1hd6+F56qZe20xYhCTkTD9diWjXHiNudQPSmVAUjgMzQGasblQQqvOdL+bJ3Q==", "dependencies": { - "@turf/boolean-within": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/boolean-within": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/point-on-feature": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/point-on-feature/-/point-on-feature-7.1.0.tgz", - "integrity": "sha512-lOO5J9I0diuGbN+r6jViEKRH3qfymsBvv25b7U0MuP8g/YC19ncUXZ86dmKfJx1++Rb485DS9h0nFvPmJpaOdg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/point-on-feature/-/point-on-feature-7.2.0.tgz", + "integrity": "sha512-ksoYoLO9WtJ/qI8VI9ltF+2ZjLWrAjZNsCsu8F7nyGeCh4I8opjf4qVLytFG44XA2qI5yc6iXDpyv0sshvP82Q==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/center": "^7.1.0", - "@turf/explode": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/nearest-point": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/center": "^7.2.0", + "@turf/explode": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/nearest-point": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/point-to-line-distance": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/point-to-line-distance/-/point-to-line-distance-7.1.0.tgz", - "integrity": "sha512-Ps9eTOCaiNgxDaSNQux0wAcSLcrI0y0zYFaD9HnVm+yCMRliQXneFti2XXotS+gR7TpgnLRAAzyx4VzJMSN2tw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/point-to-line-distance/-/point-to-line-distance-7.2.0.tgz", + "integrity": "sha512-fB9Rdnb5w5+t76Gho2dYDkGe20eRrFk8CXi4v1+l1PC8YyLXO+x+l3TrtT8HzL/dVaZeepO6WUIsIw3ditTOPg==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/projection": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", - "@turf/rhumb-distance": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", + "@turf/projection": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", + "@turf/rhumb-distance": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" + }, + "funding": { + "url": "https://opencollective.com/turf" + } + }, + "node_modules/@turf/point-to-polygon-distance": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/point-to-polygon-distance/-/point-to-polygon-distance-7.2.0.tgz", + "integrity": "sha512-w+WYuINgTiFjoZemQwOaQSje/8Kq+uqJOynvx7+gleQPHyWQ3VtTodtV4LwzVzXz8Sf7Mngx1Jcp2SNai5CJYA==", + "dependencies": { + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/point-to-line-distance": "^7.2.0", + "@turf/polygon-to-line": "^7.2.0", + "@types/geojson": "^7946.0.10", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/points-within-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/points-within-polygon/-/points-within-polygon-7.1.0.tgz", - "integrity": "sha512-SzqeD9Gcp11rEya+rCVMy6IPuYMrphNEkCiQ39W6ec9hsaqKlruqmtudKhhckMGVLVUUBCQAu5f55yjcDfVW2w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/points-within-polygon/-/points-within-polygon-7.2.0.tgz", + "integrity": "sha512-jRKp8/mWNMzA+hKlQhxci97H5nOio9tp14R2SzpvkOt+cswxl+NqTEi1hDd2XetA7tjU0TSoNjEgVY8FfA0S6w==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/polygon-smooth": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-smooth/-/polygon-smooth-7.1.0.tgz", - "integrity": "sha512-mTlmg4XUP5rKgCP/73N91owkAXIc3t1ZKLuwsJGQM1/Op48T3rJmDwVR/WZIMnVlxl5tFbssWCCB3blj4ivx9g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/polygon-smooth/-/polygon-smooth-7.2.0.tgz", + "integrity": "sha512-KCp9wF2IEynvGXVhySR8oQ2razKP0zwg99K+fuClP21pSKCFjAPaihPEYq6e8uI/1J7ibjL5++6EMl+LrUTrLg==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/polygon-tangents": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-tangents/-/polygon-tangents-7.1.0.tgz", - "integrity": "sha512-ffBgHXtkrpgkNs8E6s9sVLSKG4lPGH3WBk294FNKBt9NS+rbhNCv8yTuOMeP0bOm/WizaCq/SUtVryJpUSoI/g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/polygon-tangents/-/polygon-tangents-7.2.0.tgz", + "integrity": "sha512-AHUUPmOjiQDrtP/ODXukHBlUG0C/9I1je7zz50OTfl2ZDOdEqFJQC3RyNELwq07grTXZvg5TS5wYx/Y7nsm47g==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-within": "^7.1.0", - "@turf/explode": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/nearest-point": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-within": "^7.2.0", + "@turf/explode": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/nearest-point": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/polygon-to-line": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-to-line/-/polygon-to-line-7.1.0.tgz", - "integrity": "sha512-FBlfyBWNQZCTVGqlJH7LR2VXmvj8AydxrA8zegqek/5oPGtQDeUgIppKmvmuNClqbglhv59QtCUVaDK4bOuCTA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/polygon-to-line/-/polygon-to-line-7.2.0.tgz", + "integrity": "sha512-9jeTN3LiJ933I5sd4K0kwkcivOYXXm1emk0dHorwXeSFSHF+nlYesEW3Hd889wb9lZd7/SVLMUeX/h39mX+vCA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/polygonize": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/polygonize/-/polygonize-7.1.0.tgz", - "integrity": "sha512-FBjxnOzO29MbE7MWnMPHHYtOo93cQopT5pXhkuPyoKgcTUCntR1+iVFpl5YFbMkYup0j5Oexjo/pbY38lVSZGw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/polygonize/-/polygonize-7.2.0.tgz", + "integrity": "sha512-U9v+lBhUPDv+nsg/VcScdiqCB59afO6CHDGrwIl2+5i6Ve+/KQKjpTV/R+NqoC1iMXAEq3brY6HY8Ukp/pUWng==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/envelope": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/envelope": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/projection": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-7.1.0.tgz", - "integrity": "sha512-3wHluMoOvXnTe7dfi0kcluTyLNG5MwGsSsK5OA98vkkLH6a1xvItn8e9GcesuT07oB2km/bgefxYEIvjQG5JCA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-7.2.0.tgz", + "integrity": "sha512-/qke5vJScv8Mu7a+fU3RSChBRijE6EVuFHU3RYihMuYm04Vw8dBMIs0enEpoq0ke/IjSbleIrGQNZIMRX9EwZQ==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/quadrat-analysis": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/quadrat-analysis/-/quadrat-analysis-7.1.0.tgz", - "integrity": "sha512-4O5h9PyWgpqYXja9O+kzr+qk5MUz0IkJqPtt5oWWX5s4jRcLNqiEUf+zi/GDBQkVV8jH3S5klT5CLrF1fxK3hQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/quadrat-analysis/-/quadrat-analysis-7.2.0.tgz", + "integrity": "sha512-fDQh3+ldYNxUqS6QYlvJ7GZLlCeDZR6tD3ikdYtOsSemwW1n/4gm2xcgWJqy3Y0uszBwxc13IGGY7NGEjHA+0w==", "dependencies": { - "@turf/area": "^7.1.0", - "@turf/bbox": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/point-grid": "^7.1.0", - "@turf/random": "^7.1.0", - "@turf/square-grid": "^7.1.0", + "@turf/area": "^7.2.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/point-grid": "^7.2.0", + "@turf/random": "^7.2.0", + "@turf/square-grid": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/random": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/random/-/random-7.1.0.tgz", - "integrity": "sha512-22mXv8ejDMUWkz8DSMMqdZb0s7a0ISJzXt6T9cHovfT//vsotzkVH+5PDxJQjvmigKMnpaUgobHmQss23tAwEQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/random/-/random-7.2.0.tgz", + "integrity": "sha512-fNXs5mOeXsrirliw84S8UCNkpm4RMNbefPNsuCTfZEXhcr1MuHMzq4JWKb4FweMdN1Yx2l/xcytkO0s71cJ50w==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rectangle-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rectangle-grid/-/rectangle-grid-7.1.0.tgz", - "integrity": "sha512-4d2AuDj4LfMMJxNHbds5yX1oFR3mIVAB5D7mx6pFB0e+YkQW0mE2dUWhDTFGJZM+n45yqbNQ5hg19bmiXv94ug==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rectangle-grid/-/rectangle-grid-7.2.0.tgz", + "integrity": "sha512-f0o5ifvy0Ml/nHDJzMNcuSk4h11aa3BfvQNnYQhLpuTQu03j/ICZNlzKTLxwjcUqvxADUifty7Z9CX5W6zky4A==", "dependencies": { - "@turf/boolean-intersects": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/boolean-intersects": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rewind": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-7.1.0.tgz", - "integrity": "sha512-zX0KDZpeiH89m1vYLTEJdDL6mFyoAsCxcG0P94mXO7/JXWf0AaxzA9MkNnA/d2QYX0G4ioCMjZ5cD6nXb8SXzw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-7.2.0.tgz", + "integrity": "sha512-SZpRAZiZsE22+HVz6pEID+ST25vOdpAMGk5NO1JeqzhpMALIkIGnkG+xnun2CfYHz7wv8/Z0ADiAvei9rkcQYA==", "dependencies": { - "@turf/boolean-clockwise": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-clockwise": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rhumb-bearing": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-7.1.0.tgz", - "integrity": "sha512-ESZt70eOljHVnQMFKIdiu8LIHuQlpZgzh2nqSfV40BrYjsjI/sBKeK+sp2cBWk88nsSDlriPuMTNh4f50Jqpkw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-7.2.0.tgz", + "integrity": "sha512-jbdexlrR8X2ZauUciHx3tRwG+BXoMXke4B8p8/IgDlAfIrVdzAxSQN89FMzIKnjJ/kdLjo9bFGvb92bu31Etug==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rhumb-destination": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-destination/-/rhumb-destination-7.1.0.tgz", - "integrity": "sha512-WA2TeO3qrv5ZrzNihtTLLYu8X4kd12WEC6JKElm99XhgLao1/4ao2SJUi43l88HqwbrnNiq4TueGQ6tYpXGU7A==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rhumb-destination/-/rhumb-destination-7.2.0.tgz", + "integrity": "sha512-U9OLgLAHlH4Wfx3fBZf3jvnkDjdTcfRan5eI7VPV1+fQWkOteATpzkiRjCvSYK575GljVwWBjkKca8LziGWitQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rhumb-distance": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-7.1.0.tgz", - "integrity": "sha512-fR1V+yC4E1tnbdThomosiLcv0PQOwbfLSPM8rSWuxbMcJtffsncWxyJ0+N1F5juuHbcdaYhlduX8ri5I0ZCejw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-7.2.0.tgz", + "integrity": "sha512-NsijTPON1yOc9tirRPEQQuJ5aQi7pREsqchQquaYKbHNWsexZjcDi4wnw2kM3Si4XjmgynT+2f7aXH7FHarHzw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/sample": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/sample/-/sample-7.1.0.tgz", - "integrity": "sha512-9Iq/Ankr4+sgBoh4FpuVVvoW+AA10eej3FS89Zu79SFdCqUIdT7T42Nn3MlSVj4jMyA1oXyT2HIAlNWkwgLw6Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/sample/-/sample-7.2.0.tgz", + "integrity": "sha512-f+ZbcbQJ9glQ/F26re8LadxO0ORafy298EJZe6XtbctRTJrNus6UNAsl8+GYXFqMnXM22tbTAznnJX3ZiWNorA==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/sector": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/sector/-/sector-7.1.0.tgz", - "integrity": "sha512-2FI2rg//eXpa/l+WJtFfvHaf1NJ7ie2MoJ+RH5dKANtrfoof1Ed+y9dXSyuhem2tp/Srq2GhrjaSofFN5/g5vA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/sector/-/sector-7.2.0.tgz", + "integrity": "sha512-zL06MjbbMG4DdpiNz+Q9Ax8jsCekt3R76uxeWShulAGkyDB5smdBOUDoRwxn05UX7l4kKv4Ucq2imQXhxKFd1w==", "dependencies": { - "@turf/circle": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-arc": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/circle": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-arc": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/shortest-path": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/shortest-path/-/shortest-path-7.1.0.tgz", - "integrity": "sha512-1UmFhS5zHNacLv5rszoFOXq02BGov1oJvjlDatXsSWAd+Z7tqxpDc8D+41edrXy0ZB0Yxsy6WPNagM6hG9PRaA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/shortest-path/-/shortest-path-7.2.0.tgz", + "integrity": "sha512-6fpx8feZ2jMSaeRaFdqFShGWkNb+veUOeyLFSHA/aRD9n/e9F2pWZoRbQWKbKTpcKFJ2FnDEqCZnh/GrcAsqWA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/clean-coords": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/transform-scale": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/clean-coords": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/transform-scale": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/simplify": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/simplify/-/simplify-7.1.0.tgz", - "integrity": "sha512-JypymaoiSiFzGHwEoUkK0OPW1KQSnH3hEsEW3UIRS+apzltJ4HdFovYjsfqQgGZJZ+NJ9+dv7h8pgGLYuqcBUQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/simplify/-/simplify-7.2.0.tgz", + "integrity": "sha512-9YHIfSc8BXQfi5IvEMbCeQYqNch0UawIGwbboJaoV8rodhtk6kKV2wrpXdGqk/6Thg6/RWvChJFKVVTjVrULyQ==", "dependencies": { - "@turf/clean-coords": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clean-coords": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/square": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/square/-/square-7.1.0.tgz", - "integrity": "sha512-ANuA+WXZheGTLW6Veq0i+/B2S4KMhEHAixDv9gQEb9e6FTyqTJVwrqP4CHI3OzA3DZ/ytFf+NTKVofetO/BBQg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/square/-/square-7.2.0.tgz", + "integrity": "sha512-9pMoAGFvqzCDOlO9IRSSBCGXKbl8EwMx6xRRBMKdZgpS0mZgfm9xiptMmx/t1m4qqHIlb/N+3MUF7iMBx6upcA==", "dependencies": { - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/square-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/square-grid/-/square-grid-7.1.0.tgz", - "integrity": "sha512-JyhsALULVRlkh8htdTi9aXaXFSUv6wRNbeFbqyGJKKlA5eF+AYmyWdI/BlFGQN27xtbtMPeAuLmj+8jaB2omGw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/square-grid/-/square-grid-7.2.0.tgz", + "integrity": "sha512-EmzGXa90hz+tiCOs9wX+Lak6pH0Vghb7QuX6KZej+pmWi3Yz7vdvQLmy/wuN048+wSkD5c8WUo/kTeNDe7GnmA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/rectangle-grid": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/rectangle-grid": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/standard-deviational-ellipse": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-7.1.0.tgz", - "integrity": "sha512-JqvQFH/witHh+3XgPC1Qk4+3G8w8WQta2NTJjnGinOgFulH+7RD4DcxCT+XXtCHoeq8IvL9VPJRX3ciaW5nSCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-7.2.0.tgz", + "integrity": "sha512-+uC0pR2nRjm90JvMXe/2xOCZsYV2II1ZZ2zmWcBWv6bcFXBspcxk2QfCC3k0bj6jDapELzoQgnn3cG5lbdQV2w==", "dependencies": { - "@turf/center-mean": "^7.1.0", - "@turf/ellipse": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/points-within-polygon": "^7.1.0", + "@turf/center-mean": "^7.2.0", + "@turf/ellipse": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/points-within-polygon": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/tag": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/tag/-/tag-7.1.0.tgz", - "integrity": "sha512-cD8TC++DnNmdI1B/apTf3nj2zRNY6SoLRliB8K76OB+70Kev8tOf4ZVgAqOd0u+Hpdg/T6l7dO7fyJ6UouE7jA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/tag/-/tag-7.2.0.tgz", + "integrity": "sha512-TAFvsbp5TCBqXue8ui+CtcLsPZ6NPC88L8Ad6Hb/R6VAi21qe0U42WJHQYXzWmtThoTNwxi+oKSeFbRDsr0FIA==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/tesselate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/tesselate/-/tesselate-7.1.0.tgz", - "integrity": "sha512-E/Z94Mx6kUjvQVbEcSuM9MbEo2dkOczRe4ZzjhFlLgJh1dCkfRgwYLH49mb2CcfG/me1arxoCgmtG+qgm7LrCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/tesselate/-/tesselate-7.2.0.tgz", + "integrity": "sha512-zHGcG85aOJJu1seCm+CYTJ3UempX4Xtyt669vFG6Hbr/Hc7ii6STQ2ysFr7lJwFtU9uyYhphVrrgwIqwglvI/Q==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", "earcut": "^2.2.4", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/tin": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/tin/-/tin-7.1.0.tgz", - "integrity": "sha512-h8Bdm0IYN6OpKHM8lBRWGxkJnZcxL0KYecf8U6pa6DCEYsEXuEExMTvYSD2OmqIsL5ml8P6RjwgyI+dZeE0O9A==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/tin/-/tin-7.2.0.tgz", + "integrity": "sha512-y24Vt3oeE6ZXvyLJamP0Ke02rPlDGE9gF7OFADnR0mT+2uectb0UTIBC3kKzON80TEAlA3GXpKFkCW5Fo/O/Kg==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/transform-rotate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/transform-rotate/-/transform-rotate-7.1.0.tgz", - "integrity": "sha512-Vp7VBZ6DqaPV8mkwSycksBFRLqSj3y16zg+uEPSCsXUjbFtw9DOLcyH2F5vMpnC2bOpS9NOB4hebhJRwBwAPWQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/transform-rotate/-/transform-rotate-7.2.0.tgz", + "integrity": "sha512-EMCj0Zqy3cF9d3mGRqDlYnX2ZBXe3LgT+piDR0EuF5c5sjuKErcFcaBIsn/lg1gp4xCNZFinkZ3dsFfgGHf6fw==", "dependencies": { - "@turf/centroid": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", - "@turf/rhumb-distance": "^7.1.0", + "@turf/centroid": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", + "@turf/rhumb-distance": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/transform-scale": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/transform-scale/-/transform-scale-7.1.0.tgz", - "integrity": "sha512-m5fLnh3JqrWSv0sAC8Aieet/fr5IZND8BFaE9LakMidtNaJqOIPOyVmUoklcrGn6eK6MX+66rRPn+5a1pahlLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/transform-scale/-/transform-scale-7.2.0.tgz", + "integrity": "sha512-HYB+pw938eeI8s1/zSWFy6hq+t38fuUaBb0jJsZB1K9zQ1WjEYpPvKF/0//80zNPlyxLv3cOkeBucso3hzI07A==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/center": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", - "@turf/rhumb-distance": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/center": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", + "@turf/rhumb-distance": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/transform-translate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/transform-translate/-/transform-translate-7.1.0.tgz", - "integrity": "sha512-XA6Oh7VqUDrieY9m9/OF4XpBTd8qlfVGi3ObywojCqtHaHKLK3aXwTBZ276i0QKmZqOQA+2jFa9NhgF/TgBDrw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/transform-translate/-/transform-translate-7.2.0.tgz", + "integrity": "sha512-zAglR8MKCqkzDTjGMIQgbg/f+Q3XcKVzr9cELw5l9CrS1a0VTSDtBZLDm0kWx0ankwtam7ZmI2jXyuQWT8Gbug==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/triangle-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/triangle-grid/-/triangle-grid-7.1.0.tgz", - "integrity": "sha512-hrPyRAuX5PKu7txmc/11VPKrlJDR+JGzd+eijupKTspNLR4n2sqZUx8UXqSxZ/1nq06ScTyjIfGQJVzlRS8BTg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/triangle-grid/-/triangle-grid-7.2.0.tgz", + "integrity": "sha512-4gcAqWKh9hg6PC5nNSb9VWyLgl821cwf9yR9yEzQhEFfwYL/pZONBWCO1cwVF23vSYMSMm+/TwqxH4emxaArfw==", "dependencies": { - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/intersect": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/intersect": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/truncate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-7.1.0.tgz", - "integrity": "sha512-rrF3AML9PGZw2i5wmt53ESI+Ln9cZyCXgJ7QrEvkT8NbE4OFgmw6p8/1xT8+VEWFSpD4gHz+hmM+5FaFxXvtNg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-7.2.0.tgz", + "integrity": "sha512-jyFzxYbPugK4XjV5V/k6Xr3taBjjvo210IbPHJXw0Zh7Y6sF+hGxeRVtSuZ9VP/6oRyqAOHKUrze+OOkPqBgUg==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/turf": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/turf/-/turf-7.1.0.tgz", - "integrity": "sha512-7NA6tAjbu9oIvIfpRO5AdPrZbFTlUFU02HVA7sLJM9jFeNIZovW09QuDo23uoS2z5l94SXV1GgKKxN5wo7prCw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/turf/-/turf-7.2.0.tgz", + "integrity": "sha512-G1kKBu4hYgoNoRJgnpJohNuS7bLnoWHZ2G/4wUMym5xOSiYah6carzdTEsMoTsauyi7ilByWHx5UHwbjjCVcBw==", "dependencies": { - "@turf/along": "^7.1.0", - "@turf/angle": "^7.1.0", - "@turf/area": "^7.1.0", - "@turf/bbox": "^7.1.0", - "@turf/bbox-clip": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/bearing": "^7.1.0", - "@turf/bezier-spline": "^7.1.0", - "@turf/boolean-clockwise": "^7.1.0", - "@turf/boolean-concave": "^7.1.0", - "@turf/boolean-contains": "^7.1.0", - "@turf/boolean-crosses": "^7.1.0", - "@turf/boolean-disjoint": "^7.1.0", - "@turf/boolean-equal": "^7.1.0", - "@turf/boolean-intersects": "^7.1.0", - "@turf/boolean-overlap": "^7.1.0", - "@turf/boolean-parallel": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/boolean-touches": "^7.1.0", - "@turf/boolean-valid": "^7.1.0", - "@turf/boolean-within": "^7.1.0", - "@turf/buffer": "^7.1.0", - "@turf/center": "^7.1.0", - "@turf/center-mean": "^7.1.0", - "@turf/center-median": "^7.1.0", - "@turf/center-of-mass": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/circle": "^7.1.0", - "@turf/clean-coords": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/clusters": "^7.1.0", - "@turf/clusters-dbscan": "^7.1.0", - "@turf/clusters-kmeans": "^7.1.0", - "@turf/collect": "^7.1.0", - "@turf/combine": "^7.1.0", - "@turf/concave": "^7.1.0", - "@turf/convex": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/difference": "^7.1.0", - "@turf/dissolve": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/distance-weight": "^7.1.0", - "@turf/ellipse": "^7.1.0", - "@turf/envelope": "^7.1.0", - "@turf/explode": "^7.1.0", - "@turf/flatten": "^7.1.0", - "@turf/flip": "^7.1.0", - "@turf/geojson-rbush": "^7.1.0", - "@turf/great-circle": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/hex-grid": "^7.1.0", - "@turf/interpolate": "^7.1.0", - "@turf/intersect": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/isobands": "^7.1.0", - "@turf/isolines": "^7.1.0", - "@turf/kinks": "^7.1.0", - "@turf/length": "^7.1.0", - "@turf/line-arc": "^7.1.0", - "@turf/line-chunk": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/line-offset": "^7.1.0", - "@turf/line-overlap": "^7.1.0", - "@turf/line-segment": "^7.1.0", - "@turf/line-slice": "^7.1.0", - "@turf/line-slice-along": "^7.1.0", - "@turf/line-split": "^7.1.0", - "@turf/line-to-polygon": "^7.1.0", - "@turf/mask": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/midpoint": "^7.1.0", - "@turf/moran-index": "^7.1.0", - "@turf/nearest-neighbor-analysis": "^7.1.0", - "@turf/nearest-point": "^7.1.0", - "@turf/nearest-point-on-line": "^7.1.0", - "@turf/nearest-point-to-line": "^7.1.0", - "@turf/planepoint": "^7.1.0", - "@turf/point-grid": "^7.1.0", - "@turf/point-on-feature": "^7.1.0", - "@turf/point-to-line-distance": "^7.1.0", - "@turf/points-within-polygon": "^7.1.0", - "@turf/polygon-smooth": "^7.1.0", - "@turf/polygon-tangents": "^7.1.0", - "@turf/polygon-to-line": "^7.1.0", - "@turf/polygonize": "^7.1.0", - "@turf/projection": "^7.1.0", - "@turf/quadrat-analysis": "^7.1.0", - "@turf/random": "^7.1.0", - "@turf/rectangle-grid": "^7.1.0", - "@turf/rewind": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", - "@turf/rhumb-distance": "^7.1.0", - "@turf/sample": "^7.1.0", - "@turf/sector": "^7.1.0", - "@turf/shortest-path": "^7.1.0", - "@turf/simplify": "^7.1.0", - "@turf/square": "^7.1.0", - "@turf/square-grid": "^7.1.0", - "@turf/standard-deviational-ellipse": "^7.1.0", - "@turf/tag": "^7.1.0", - "@turf/tesselate": "^7.1.0", - "@turf/tin": "^7.1.0", - "@turf/transform-rotate": "^7.1.0", - "@turf/transform-scale": "^7.1.0", - "@turf/transform-translate": "^7.1.0", - "@turf/triangle-grid": "^7.1.0", - "@turf/truncate": "^7.1.0", - "@turf/union": "^7.1.0", - "@turf/unkink-polygon": "^7.1.0", - "@turf/voronoi": "^7.1.0", + "@turf/along": "^7.2.0", + "@turf/angle": "^7.2.0", + "@turf/area": "^7.2.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-clip": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/bearing": "^7.2.0", + "@turf/bezier-spline": "^7.2.0", + "@turf/boolean-clockwise": "^7.2.0", + "@turf/boolean-concave": "^7.2.0", + "@turf/boolean-contains": "^7.2.0", + "@turf/boolean-crosses": "^7.2.0", + "@turf/boolean-disjoint": "^7.2.0", + "@turf/boolean-equal": "^7.2.0", + "@turf/boolean-intersects": "^7.2.0", + "@turf/boolean-overlap": "^7.2.0", + "@turf/boolean-parallel": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/boolean-touches": "^7.2.0", + "@turf/boolean-valid": "^7.2.0", + "@turf/boolean-within": "^7.2.0", + "@turf/buffer": "^7.2.0", + "@turf/center": "^7.2.0", + "@turf/center-mean": "^7.2.0", + "@turf/center-median": "^7.2.0", + "@turf/center-of-mass": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/circle": "^7.2.0", + "@turf/clean-coords": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/clusters": "^7.2.0", + "@turf/clusters-dbscan": "^7.2.0", + "@turf/clusters-kmeans": "^7.2.0", + "@turf/collect": "^7.2.0", + "@turf/combine": "^7.2.0", + "@turf/concave": "^7.2.0", + "@turf/convex": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/difference": "^7.2.0", + "@turf/dissolve": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/distance-weight": "^7.2.0", + "@turf/ellipse": "^7.2.0", + "@turf/envelope": "^7.2.0", + "@turf/explode": "^7.2.0", + "@turf/flatten": "^7.2.0", + "@turf/flip": "^7.2.0", + "@turf/geojson-rbush": "^7.2.0", + "@turf/great-circle": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/hex-grid": "^7.2.0", + "@turf/interpolate": "^7.2.0", + "@turf/intersect": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/isobands": "^7.2.0", + "@turf/isolines": "^7.2.0", + "@turf/kinks": "^7.2.0", + "@turf/length": "^7.2.0", + "@turf/line-arc": "^7.2.0", + "@turf/line-chunk": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/line-offset": "^7.2.0", + "@turf/line-overlap": "^7.2.0", + "@turf/line-segment": "^7.2.0", + "@turf/line-slice": "^7.2.0", + "@turf/line-slice-along": "^7.2.0", + "@turf/line-split": "^7.2.0", + "@turf/line-to-polygon": "^7.2.0", + "@turf/mask": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/midpoint": "^7.2.0", + "@turf/moran-index": "^7.2.0", + "@turf/nearest-neighbor-analysis": "^7.2.0", + "@turf/nearest-point": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", + "@turf/nearest-point-to-line": "^7.2.0", + "@turf/planepoint": "^7.2.0", + "@turf/point-grid": "^7.2.0", + "@turf/point-on-feature": "^7.2.0", + "@turf/point-to-line-distance": "^7.2.0", + "@turf/point-to-polygon-distance": "^7.2.0", + "@turf/points-within-polygon": "^7.2.0", + "@turf/polygon-smooth": "^7.2.0", + "@turf/polygon-tangents": "^7.2.0", + "@turf/polygon-to-line": "^7.2.0", + "@turf/polygonize": "^7.2.0", + "@turf/projection": "^7.2.0", + "@turf/quadrat-analysis": "^7.2.0", + "@turf/random": "^7.2.0", + "@turf/rectangle-grid": "^7.2.0", + "@turf/rewind": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", + "@turf/rhumb-distance": "^7.2.0", + "@turf/sample": "^7.2.0", + "@turf/sector": "^7.2.0", + "@turf/shortest-path": "^7.2.0", + "@turf/simplify": "^7.2.0", + "@turf/square": "^7.2.0", + "@turf/square-grid": "^7.2.0", + "@turf/standard-deviational-ellipse": "^7.2.0", + "@turf/tag": "^7.2.0", + "@turf/tesselate": "^7.2.0", + "@turf/tin": "^7.2.0", + "@turf/transform-rotate": "^7.2.0", + "@turf/transform-scale": "^7.2.0", + "@turf/transform-translate": "^7.2.0", + "@turf/triangle-grid": "^7.2.0", + "@turf/truncate": "^7.2.0", + "@turf/union": "^7.2.0", + "@turf/unkink-polygon": "^7.2.0", + "@turf/voronoi": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/union": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/union/-/union-7.1.0.tgz", - "integrity": "sha512-7VI8jONdBg9qmbfNlLQycPr93l5aU9HGMgWI9M6pb4ERuU2+p8KgffCgs2NyMtP2HxPrKSybzj31g7bnbEKofQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/union/-/union-7.2.0.tgz", + "integrity": "sha512-Xex/cfKSmH0RZRWSJl4RLlhSmEALVewywiEXcu0aIxNbuZGTcpNoI0h4oLFrE/fUd0iBGFg/EGLXRL3zTfpg6g==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/unkink-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/unkink-polygon/-/unkink-polygon-7.1.0.tgz", - "integrity": "sha512-pqkirni2aLpRA1ELFIuJz+mkjYyJQX8Ar6BflSu1b0ajY/CTrcDxbIv1x8UfvbybLzdJc4Gxzg5mo4cEtSwtaQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/unkink-polygon/-/unkink-polygon-7.2.0.tgz", + "integrity": "sha512-dFPfzlIgkEr15z6oXVxTSWshWi51HeITGVFtl1GAKGMtiXJx1uMqnfRsvljqEjaQu/4AzG1QAp3b+EkSklQSiQ==", "dependencies": { - "@turf/area": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/area": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "rbush": "^3.0.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/voronoi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/voronoi/-/voronoi-7.1.0.tgz", - "integrity": "sha512-xUvzPDG6GaqEekgxd+pjeMKJXOYJ3eFIqUHbTe/ISKzzv3f2cFGiR2VH7ZGXri8d4ozzCQbUQ27ilHPPLf5+xw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/voronoi/-/voronoi-7.2.0.tgz", + "integrity": "sha512-3K6N0LtJsWTXxPb/5N2qD9e8f4q8+tjTbGV3lE3v8x06iCnNlnuJnqM5NZNPpvgvCatecBkhClO3/3RndE61Fw==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/d3-voronoi": "^1.1.12", "@types/geojson": "^7946.0.10", "d3-voronoi": "1.1.2", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" @@ -6276,9 +6330,9 @@ } }, "node_modules/@types/geojson": { - "version": "7946.0.14", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", - "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", @@ -7915,6 +7969,14 @@ "node": "*" } }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -16043,24 +16105,27 @@ "integrity": "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw==" }, "node_modules/point-in-polygon-hao": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.1.0.tgz", - "integrity": "sha512-3hTIM2j/v9Lio+wOyur3kckD4NxruZhpowUbEgmyikW+a2Kppjtu1eN+AhnMQtoHW46zld88JiYWv6fxpsDrTQ==" - }, - "node_modules/polygon-clipping": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/polygon-clipping/-/polygon-clipping-0.15.7.tgz", - "integrity": "sha512-nhfdr83ECBg6xtqOAJab1tbksbBAOMUltN60bU+llHVOL0e5Onm1WpAXXWXVB39L8AJFssoIhEVuy/S90MmotA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.2.4.tgz", + "integrity": "sha512-x2pcvXeqhRHlNRdhLs/tgFapAbSSe86wa/eqmj1G6pWftbEs5aVRJhRGM6FYSUERKu0PjekJzMq0gsI2XyiclQ==", "dependencies": { - "robust-predicates": "^3.0.2", - "splaytree": "^3.1.0" + "robust-predicates": "^3.0.2" } }, - "node_modules/polygon-clipping/node_modules/robust-predicates": { + "node_modules/point-in-polygon-hao/node_modules/robust-predicates": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" }, + "node_modules/polyclip-ts": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/polyclip-ts/-/polyclip-ts-0.16.8.tgz", + "integrity": "sha512-JPtKbDRuPEuAjuTdhR62Gph7Is2BS1Szx69CFOO3g71lpJDFo78k4tFyi+qFOMVPePEzdSKkpGU3NBXPHHjvKQ==", + "dependencies": { + "bignumber.js": "^9.1.0", + "splaytree-ts": "^1.0.2" + } + }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", @@ -19183,10 +19248,10 @@ "wbuf": "^1.7.3" } }, - "node_modules/splaytree": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.2.tgz", - "integrity": "sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==" + "node_modules/splaytree-ts": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/splaytree-ts/-/splaytree-ts-1.0.2.tgz", + "integrity": "sha512-0kGecIZNIReCSiznK3uheYB8sbstLjCZLiwcQwbmLhgHJj2gz6OnSPkVzJQCMnmEz1BQ4gPK59ylhBoEWOhGNA==" }, "node_modules/split-string": { "version": "3.1.0", diff --git a/app/package.json b/app/package.json index ba0ec79..e7ca3e7 100644 --- a/app/package.json +++ b/app/package.json @@ -9,10 +9,12 @@ "@react-three/drei": "^9.113.0", "@react-three/fiber": "^8.17.7", "@react-three/postprocessing": "^2.16.3", + "@recast-navigation/three": "^0.39.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "@turf/turf": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/turf": "^7.2.0", "@types/jest": "^27.5.2", "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", diff --git a/app/src/components/layout/sidebarRight/SideBarRight.tsx b/app/src/components/layout/sidebarRight/SideBarRight.tsx index 0efe99b..3ba5595 100644 --- a/app/src/components/layout/sidebarRight/SideBarRight.tsx +++ b/app/src/components/layout/sidebarRight/SideBarRight.tsx @@ -10,7 +10,7 @@ import { SimulationIcon, } from "../../icons/SimulationIcons"; import useToggleStore from "../../../store/useUIToggleStore"; -import MachineMechanics from "./mechanics/MachineMechanics"; +import ConveyorMechanics from "./mechanics/ConveyorMechanics"; import Visualization from "./visualization/Visualization"; import Analysis from "./analysis/Analysis"; import Simulations from "./simulation/Simulations"; @@ -18,6 +18,7 @@ import { useSelectedActionSphere } from "../../../store/store"; import GlobalProperties from "./properties/GlobalProperties"; import AsstePropertiies from "./properties/AssetProperties"; import ZoneProperties from "./properties/ZoneProperties"; +import VehicleMechanics from "./mechanics/VehicleMechanics"; const SideBarRight: React.FC = () => { const { activeModule } = useModuleStore(); @@ -98,17 +99,24 @@ const SideBarRight: React.FC = () => { {toggleUI && activeModule === "simulation" && ( <> - {subModule === "mechanics" && selectedActionSphere && ( + {subModule === "mechanics" && selectedActionSphere && selectedActionSphere.path.type === "Conveyor" && (
- + +
+
+ )} + {subModule === "mechanics" && selectedActionSphere && selectedActionSphere.path.type === "Vehicle" && ( +
+
+ {/* */}
)} {subModule === "mechanics" && !selectedActionSphere && (
- {/* */} +
)} diff --git a/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx b/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx new file mode 100644 index 0000000..a1f8bf3 --- /dev/null +++ b/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx @@ -0,0 +1,586 @@ +import React, { useRef, useState, useMemo, useEffect } from "react"; +import { + AddIcon, + InfoIcon, + RemoveIcon, + ResizeHeightIcon, +} from "../../../icons/ExportCommonIcons"; +import RenameInput from "../../../ui/inputs/RenameInput"; +import InputWithDropDown from "../../../ui/inputs/InputWithDropDown"; +import LabledDropdown from "../../../ui/inputs/LabledDropdown"; +import RegularDropDown from "../../../ui/inputs/RegularDropDown"; +import { handleResize } from "../../../../functions/handleResizePannel"; +import EyeDropInput from "../../../ui/inputs/EyeDropInput"; +import { useSelectedActionSphere, useSelectedPath, useSimulationPaths } from "../../../../store/store"; +import * as THREE from 'three'; +import * as Types from '../../../../types/world/worldTypes'; +import InputToggle from "../../../ui/inputs/InputToggle"; + +const ConveyorMechanics: React.FC = () => { + const { selectedActionSphere } = useSelectedActionSphere(); + const { selectedPath, setSelectedPath } = useSelectedPath(); + const { simulationPaths, setSimulationPaths } = useSimulationPaths(); + + const actionsContainerRef = useRef(null); + const triggersContainerRef = useRef(null); + + const selectedPoint = useMemo(() => { + if (!selectedActionSphere) return null; + return simulationPaths + .filter((path): path is Types.ConveyorEventsSchema => path.type === "Conveyor") + .flatMap((path) => path.points) + .find((point) => point.uuid === selectedActionSphere.point.uuid); + }, [selectedActionSphere, simulationPaths]); + + const handleAddAction = () => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => { + if (path.type === "Conveyor") { + return { + ...path, + points: path.points.map((point) => { + if (point.uuid === selectedActionSphere.point.uuid) { + const actionIndex = point.actions.length; + const newAction = { + uuid: THREE.MathUtils.generateUUID(), + name: `Action ${actionIndex + 1}`, + type: 'Inherit', + material: 'Inherit', + delay: 'Inherit', + spawnInterval: 'Inherit', + isUsed: false + }; + + return { ...point, actions: [...point.actions, newAction] }; + } + return point; + }), + }; + } + return path; + }); + + setSimulationPaths(updatedPaths); + }; + + const handleDeleteAction = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleActionSelect = (uuid: string, actionType: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid + ? { + ...action, + type: actionType, + material: actionType === 'Spawn' || actionType === 'Swap' ? 'Inherit' : action.material, + delay: actionType === 'Delay' ? 'Inherit' : action.delay, + spawnInterval: actionType === 'Spawn' ? 'Inherit' : action.spawnInterval + } + : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Update the selected item to reflect changes + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + const updatedAction = updatedPaths + .filter((path): path is Types.ConveyorEventsSchema => path.type === "Conveyor") + .flatMap(path => path.points) + .find(p => p.uuid === selectedActionSphere.point.uuid) + ?.actions.find(a => a.uuid === uuid); + + if (updatedAction) { + setSelectedItem({ + type: "action", + item: updatedAction + }); + } + } + }; + + // Modified handleMaterialSelect to ensure it only applies to relevant action types + const handleMaterialSelect = (uuid: string, material: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid && + (action.type === 'Spawn' || action.type === 'Swap') + ? { ...action, material } + : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Update selected item if it's the current action + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + material + } + }); + } + }; + + const handleDelayChange = (uuid: string, delay: number | string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid ? { ...action, delay } : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid ? { ...action, spawnInterval } : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleSpeedChange = (speed: number) => { + if (!selectedPath) return; + + const updatedPaths = simulationPaths.map((path) => + path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path + ); + + setSimulationPaths(updatedPaths); + setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); + }; + + const handleAddTrigger = () => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => { + if (point.uuid === selectedActionSphere.point.uuid) { + const triggerIndex = point.triggers.length; + const newTrigger = { + uuid: THREE.MathUtils.generateUUID(), + name: `Trigger ${triggerIndex + 1}`, + type: '', + isUsed: false + }; + + return { ...point, triggers: [...point.triggers, newTrigger] }; + } + return point; + }), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleDeleteTrigger = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleTriggerSelect = (uuid: string, triggerType: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + triggers: point.triggers.map((trigger) => + trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + // Update the toggle handlers to immediately update the selected item + const handleActionToggle = (uuid: string) => { + if (!selectedActionSphere) return; + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => ({ + ...action, + isUsed: action.uuid === uuid ? !action.isUsed : false, + })), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Immediately update the selected item if it's the one being toggled + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + isUsed: !selectedItem.item.isUsed + } + }); + } + }; + + // Do the same for trigger toggle + const handleTriggerToggle = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + triggers: point.triggers.map((trigger) => ({ + ...trigger, + isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, + })), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Immediately update the selected item if it's the one being toggled + if (selectedItem?.type === "trigger" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + isUsed: !selectedItem.item.isUsed + } + }); + } + }; + + const [selectedItem, setSelectedItem] = useState<{ type: "action" | "trigger"; item: any; } | null>(null); + + useEffect(() => { + setSelectedItem(null); // Reset selectedItem when selectedActionSphere changes + }, [selectedActionSphere]); + + return ( +
+
+ {selectedActionSphere?.path?.modelName || "point name not found"} +
+ +
+ {!selectedPath && + <> +
+
+
Actions
+
+ Add +
+
+
+
+ {selectedPoint?.actions.map((action) => ( +
+
setSelectedItem({ type: "action", item: action })} + > + +
+
handleDeleteAction(action.uuid)} + > + +
+
+ ))} +
+
handleResize(e, actionsContainerRef)} + > + +
+
+
+
+
+
Triggers
+
+ Add +
+
+
+
+ {selectedPoint?.triggers.map((trigger) => ( +
+
setSelectedItem({ type: "trigger", item: trigger })} + > + +
+
handleDeleteTrigger(trigger.uuid)} + > + +
+
+ ))} +
+
handleResize(e, triggersContainerRef)} + > + +
+
+
+ + } + +
+ {selectedItem && ( + <> +
{selectedItem.item.name}
+ + {selectedItem.type === "action" && ( + <> + handleActionToggle(selectedItem.item.uuid)} + /> + handleActionSelect(selectedItem.item.uuid, option)} + /> + + {/* Only show material dropdown for Spawn/Swap actions */} + {(selectedItem.item.type === 'Spawn' || selectedItem.item.type === 'Swap') && ( + handleMaterialSelect(selectedItem.item.uuid, option)} + /> + )} + + {/* Only show delay input for Delay actions */} + {selectedItem.item.type === 'Delay' && ( + { + const numValue = parseInt(value); + handleDelayChange( + selectedItem.item.uuid, + !value ? 'Inherit' : numValue + ); + }} + /> + )} + + {/* Only show spawn interval for Spawn actions */} + {selectedItem.item.type === 'Spawn' && ( + { + handleSpawnIntervalChange(selectedItem.item.uuid, (value === "") ? "Inherit" : parseInt(value)); + }} + /> + + )} + + )} + + {selectedItem.type === "trigger" && ( + <> + handleTriggerToggle(selectedItem.item.uuid)} + /> + + handleTriggerSelect(selectedItem.item.uuid, option)} + /> + + )} + + )} + + {selectedPath && !selectedItem && ( +
+ handleSpeedChange(parseFloat(value))} + /> +
+ )} +
+
+ + By selecting points, you can create events and triggers. +
+
+
+ ); +}; + +export default ConveyorMechanics; \ No newline at end of file diff --git a/app/src/components/layout/sidebarRight/mechanics/MachineMechanics.tsx b/app/src/components/layout/sidebarRight/mechanics/MachineMechanics.tsx deleted file mode 100644 index e1ecfb3..0000000 --- a/app/src/components/layout/sidebarRight/mechanics/MachineMechanics.tsx +++ /dev/null @@ -1,533 +0,0 @@ -import React, { useRef, useState, useMemo, useEffect } from "react"; -import { - AddIcon, - InfoIcon, - RemoveIcon, - ResizeHeightIcon, -} from "../../../icons/ExportCommonIcons"; -import RenameInput from "../../../ui/inputs/RenameInput"; -import InputWithDropDown from "../../../ui/inputs/InputWithDropDown"; -import LabledDropdown from "../../../ui/inputs/LabledDropdown"; -import RegularDropDown from "../../../ui/inputs/RegularDropDown"; -import { handleResize } from "../../../../functions/handleResizePannel"; -import EyeDropInput from "../../../ui/inputs/EyeDropInput"; -import { useSelectedActionSphere, useSelectedPath, useSimulationPaths } from "../../../../store/store"; -import * as THREE from 'three'; -import InputToggle from "../../../ui/inputs/InputToggle"; - -const MachineMechanics: React.FC = () => { - const { selectedActionSphere } = useSelectedActionSphere(); - const { selectedPath, setSelectedPath } = useSelectedPath(); - const { simulationPaths, setSimulationPaths } = useSimulationPaths(); - - const actionsContainerRef = useRef(null); - const triggersContainerRef = useRef(null); - - const selectedPoint = useMemo(() => { - if (!selectedActionSphere) return null; - return simulationPaths.flatMap((path) => path.points).find((point) => point.uuid === selectedActionSphere.point.uuid); - }, [selectedActionSphere, simulationPaths]); - - const handleAddAction = () => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => { - if (point.uuid === selectedActionSphere.point.uuid) { - const actionIndex = point.actions.length; - const newAction = { - uuid: THREE.MathUtils.generateUUID(), - name: `Action ${actionIndex + 1}`, - type: 'Inherit', - material: 'Inherit', - delay: 'Inherit', - spawnInterval: 'Inherit', - isUsed: false - }; - - return { ...point, actions: [...point.actions, newAction] }; - } - return point; - }), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleDeleteAction = (uuid: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleActionSelect = (uuid: string, actionType: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid - ? { - ...action, - type: actionType, - // Reset dependent fields when type changes - material: actionType === 'Spawn' || actionType === 'Swap' ? 'Inherit' : action.material, - delay: actionType === 'Delay' ? 'Inherit' : action.delay, - spawnInterval: actionType === 'Spawn' ? 'Inherit' : action.spawnInterval - } - : action - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - - // Update the selected item to reflect changes - if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { - const updatedAction = updatedPaths - .flatMap(path => path.points) - .find(p => p.uuid === selectedActionSphere.point.uuid) - ?.actions.find(a => a.uuid === uuid); - - if (updatedAction) { - setSelectedItem({ - type: "action", - item: updatedAction - }); - } - } - }; - - // Modified handleMaterialSelect to ensure it only applies to relevant action types - const handleMaterialSelect = (uuid: string, material: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid && - (action.type === 'Spawn' || action.type === 'Swap') - ? { ...action, material } - : action - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - - // Update selected item if it's the current action - if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { - setSelectedItem({ - ...selectedItem, - item: { - ...selectedItem.item, - material - } - }); - } - }; - - const handleDelayChange = (uuid: string, delay: number | string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, delay } : action - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, spawnInterval } : action - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleSpeedChange = (speed: number) => { - if (!selectedPath) return; - - const updatedPaths = simulationPaths.map((path) => - path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path - ); - - setSimulationPaths(updatedPaths); - setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); - }; - - const handleAddTrigger = () => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => { - if (point.uuid === selectedActionSphere.point.uuid) { - const triggerIndex = point.triggers.length; - const newTrigger = { - uuid: THREE.MathUtils.generateUUID(), - name: `Trigger ${triggerIndex + 1}`, - type: '', - isUsed: false - }; - - return { ...point, triggers: [...point.triggers, newTrigger] }; - } - return point; - }), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleDeleteTrigger = (uuid: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleTriggerSelect = (uuid: string, triggerType: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - triggers: point.triggers.map((trigger) => - trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - // Update the toggle handlers to immediately update the selected item - const handleActionToggle = (uuid: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => ({ - ...action, - isUsed: action.uuid === uuid ? !action.isUsed : false, - })), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - - // Immediately update the selected item if it's the one being toggled - if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { - setSelectedItem({ - ...selectedItem, - item: { - ...selectedItem.item, - isUsed: !selectedItem.item.isUsed - } - }); - } - }; - - // Do the same for trigger toggle - const handleTriggerToggle = (uuid: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - triggers: point.triggers.map((trigger) => ({ - ...trigger, - isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, - })), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - - // Immediately update the selected item if it's the one being toggled - if (selectedItem?.type === "trigger" && selectedItem.item.uuid === uuid) { - setSelectedItem({ - ...selectedItem, - item: { - ...selectedItem.item, - isUsed: !selectedItem.item.isUsed - } - }); - } - }; - - const [selectedItem, setSelectedItem] = useState<{ type: "action" | "trigger"; item: any; } | null>(null); - - useEffect(() => { - setSelectedItem(null); // Reset selectedItem when selectedActionSphere changes - }, [selectedActionSphere]); - - return ( -
-
- {selectedActionSphere?.path?.modelName || "point name not found"} -
- -
-
-
-
Actions
-
- Add -
-
-
-
- {selectedPoint?.actions.map((action) => ( -
-
setSelectedItem({ type: "action", item: action })} - > - -
-
handleDeleteAction(action.uuid)} - > - -
-
- ))} -
-
handleResize(e, actionsContainerRef)} - > - -
-
-
-
-
-
Triggers
-
- Add -
-
-
-
- {selectedPoint?.triggers.map((trigger) => ( -
-
setSelectedItem({ type: "trigger", item: trigger })} - > - -
-
handleDeleteTrigger(trigger.uuid)} - > - -
-
- ))} -
-
handleResize(e, triggersContainerRef)} - > - -
-
-
-
- {selectedItem && ( - <> -
{selectedItem.item.name}
- - {selectedItem.type === "action" && ( - <> - handleActionToggle(selectedItem.item.uuid)} - /> - handleActionSelect(selectedItem.item.uuid, option)} - /> - - {/* Only show material dropdown for Spawn/Swap actions */} - {(selectedItem.item.type === 'Spawn' || selectedItem.item.type === 'Swap') && ( - handleMaterialSelect(selectedItem.item.uuid, option)} - /> - )} - - {/* Only show delay input for Delay actions */} - {selectedItem.item.type === 'Delay' && ( - { - const numValue = parseInt(value); - handleDelayChange( - selectedItem.item.uuid, - !value ? 'Inherit' : numValue - ); - }} - /> - )} - - {/* Only show spawn interval for Spawn actions */} - {selectedItem.item.type === 'Spawn' && ( - { - handleSpawnIntervalChange(selectedItem.item.uuid, (value === "") ? "Inherit" : parseInt(value)); - }} - /> - - )} - - )} - - {selectedItem.type === "trigger" && ( - <> - handleTriggerToggle(selectedItem.item.uuid)} - /> - - handleTriggerSelect(selectedItem.item.uuid, option)} - /> - - )} - - )} - - {selectedPath && !selectedItem && ( -
- handleSpeedChange(parseFloat(value))} - /> -
- )} -
-
- - By selecting points, you can create events and triggers. -
-
-
- ); -}; - -export default MachineMechanics; \ No newline at end of file diff --git a/app/src/components/layout/sidebarRight/mechanics/VehicleMechanics.tsx b/app/src/components/layout/sidebarRight/mechanics/VehicleMechanics.tsx new file mode 100644 index 0000000..7d3ffb0 --- /dev/null +++ b/app/src/components/layout/sidebarRight/mechanics/VehicleMechanics.tsx @@ -0,0 +1,561 @@ +import React, { useRef, useState, useMemo, useEffect } from "react"; +import { + AddIcon, + InfoIcon, + RemoveIcon, + ResizeHeightIcon, +} from "../../../icons/ExportCommonIcons"; +import RenameInput from "../../../ui/inputs/RenameInput"; +import InputWithDropDown from "../../../ui/inputs/InputWithDropDown"; +import LabledDropdown from "../../../ui/inputs/LabledDropdown"; +import RegularDropDown from "../../../ui/inputs/RegularDropDown"; +import { handleResize } from "../../../../functions/handleResizePannel"; +import EyeDropInput from "../../../ui/inputs/EyeDropInput"; +import { useSelectedActionSphere, useSelectedPath, useSimulationPaths } from "../../../../store/store"; +import * as THREE from 'three'; +import * as Types from '../../../../types/world/worldTypes'; +import InputToggle from "../../../ui/inputs/InputToggle"; + +const VehicleMechanics: React.FC = () => { + const { selectedActionSphere } = useSelectedActionSphere(); + const { selectedPath, setSelectedPath } = useSelectedPath(); + const { simulationPaths, setSimulationPaths } = useSimulationPaths(); + + const actionsContainerRef = useRef(null); + const triggersContainerRef = useRef(null); + + const selectedPoint = useMemo(() => { + if (!selectedActionSphere) return null; + return simulationPaths + .filter((path): path is Types.ConveyorEventsSchema => path.type === "Conveyor") + .flatMap((path) => path.points) + .find((point) => point.uuid === selectedActionSphere.point.uuid); + }, [selectedActionSphere, simulationPaths]); + + const handleAddAction = () => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => { + if (path.type === "Conveyor") { + return { + ...path, + points: path.points.map((point) => { + if (point.uuid === selectedActionSphere.point.uuid) { + const actionIndex = point.actions.length; + const newAction = { + uuid: THREE.MathUtils.generateUUID(), + name: `Action ${actionIndex + 1}`, + type: 'Inherit', + material: 'Inherit', + delay: 'Inherit', + spawnInterval: 'Inherit', + isUsed: false + }; + + return { ...point, actions: [...point.actions, newAction] }; + } + return point; + }), + }; + } + return path; + }); + + setSimulationPaths(updatedPaths); + }; + + const handleDeleteAction = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleActionSelect = (uuid: string, actionType: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid + ? { + ...action, + type: actionType, + material: actionType === 'Spawn' || actionType === 'Swap' ? 'Inherit' : action.material, + delay: actionType === 'Delay' ? 'Inherit' : action.delay, + spawnInterval: actionType === 'Spawn' ? 'Inherit' : action.spawnInterval + } + : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Update the selected item to reflect changes + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + const updatedAction = updatedPaths + .filter((path): path is Types.ConveyorEventsSchema => path.type === "Conveyor") + .flatMap(path => path.points) + .find(p => p.uuid === selectedActionSphere.point.uuid) + ?.actions.find(a => a.uuid === uuid); + + if (updatedAction) { + setSelectedItem({ + type: "action", + item: updatedAction + }); + } + } + }; + + // Modified handleMaterialSelect to ensure it only applies to relevant action types + const handleMaterialSelect = (uuid: string, material: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid && + (action.type === 'Spawn' || action.type === 'Swap') + ? { ...action, material } + : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Update selected item if it's the current action + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + material + } + }); + } + }; + + const handleDelayChange = (uuid: string, delay: number | string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid ? { ...action, delay } : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid ? { ...action, spawnInterval } : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleSpeedChange = (speed: number) => { + if (!selectedPath) return; + + const updatedPaths = simulationPaths.map((path) => + path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path + ); + + setSimulationPaths(updatedPaths); + setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); + }; + + const handleAddTrigger = () => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => { + if (point.uuid === selectedActionSphere.point.uuid) { + const triggerIndex = point.triggers.length; + const newTrigger = { + uuid: THREE.MathUtils.generateUUID(), + name: `Trigger ${triggerIndex + 1}`, + type: '', + isUsed: false + }; + + return { ...point, triggers: [...point.triggers, newTrigger] }; + } + return point; + }), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleDeleteTrigger = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleTriggerSelect = (uuid: string, triggerType: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + triggers: point.triggers.map((trigger) => + trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + // Update the toggle handlers to immediately update the selected item + const handleActionToggle = (uuid: string) => { + if (!selectedActionSphere) return; + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => ({ + ...action, + isUsed: action.uuid === uuid ? !action.isUsed : false, + })), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Immediately update the selected item if it's the one being toggled + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + isUsed: !selectedItem.item.isUsed + } + }); + } + }; + + // Do the same for trigger toggle + const handleTriggerToggle = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + triggers: point.triggers.map((trigger) => ({ + ...trigger, + isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, + })), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Immediately update the selected item if it's the one being toggled + if (selectedItem?.type === "trigger" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + isUsed: !selectedItem.item.isUsed + } + }); + } + }; + + const [selectedItem, setSelectedItem] = useState<{ type: "action" | "trigger"; item: any; } | null>(null); + + useEffect(() => { + setSelectedItem(null); // Reset selectedItem when selectedActionSphere changes + }, [selectedActionSphere]); + + return ( +
+
+ {selectedActionSphere?.path?.modelName || "point name not found"} +
+ +
+
+
+
Actions
+
+ Add +
+
+
+
+ <> + {console.log(selectedPoint)} + +
+
handleResize(e, actionsContainerRef)} + > + +
+
+
+
+
+
Triggers
+
+ Add +
+
+
+
+ {selectedPoint?.triggers.map((trigger) => ( +
+
setSelectedItem({ type: "trigger", item: trigger })} + > + +
+
handleDeleteTrigger(trigger.uuid)} + > + +
+
+ ))} +
+
handleResize(e, triggersContainerRef)} + > + +
+
+
+
+ {selectedItem && ( + <> +
{selectedItem.item.name}
+ + {selectedItem.type === "action" && ( + <> + handleActionToggle(selectedItem.item.uuid)} + /> + handleActionSelect(selectedItem.item.uuid, option)} + /> + + {/* Only show material dropdown for Spawn/Swap actions */} + {(selectedItem.item.type === 'Spawn' || selectedItem.item.type === 'Swap') && ( + handleMaterialSelect(selectedItem.item.uuid, option)} + /> + )} + + {/* Only show delay input for Delay actions */} + {selectedItem.item.type === 'Delay' && ( + { + const numValue = parseInt(value); + handleDelayChange( + selectedItem.item.uuid, + !value ? 'Inherit' : numValue + ); + }} + /> + )} + + {/* Only show spawn interval for Spawn actions */} + {selectedItem.item.type === 'Spawn' && ( + { + handleSpawnIntervalChange(selectedItem.item.uuid, (value === "") ? "Inherit" : parseInt(value)); + }} + /> + + )} + + )} + + {selectedItem.type === "trigger" && ( + <> + handleTriggerToggle(selectedItem.item.uuid)} + /> + + handleTriggerSelect(selectedItem.item.uuid, option)} + /> + + )} + + )} + + {selectedPath && !selectedItem && ( +
+ handleSpeedChange(parseFloat(value))} + /> +
+ )} +
+
+ + By selecting points, you can create events and triggers. +
+
+
+ ); +}; + +export default VehicleMechanics; \ No newline at end of file diff --git a/app/src/components/ui/realTimeVis/charts/LineGraphComponent.tsx b/app/src/components/ui/realTimeVis/charts/LineGraphComponent.tsx index 07a387f..cc40187 100644 --- a/app/src/components/ui/realTimeVis/charts/LineGraphComponent.tsx +++ b/app/src/components/ui/realTimeVis/charts/LineGraphComponent.tsx @@ -201,18 +201,16 @@ const LineGraphComponent = ({ const { measurements, setMeasurements, updateDuration, duration } = useChartStore(); useEffect(() => { - if ( measurements.length > 0 ) { - const socket = io("http://192.168.0.192:5010"); + const socket = io("http://192.168.0.192:5010"); + + if ( measurements.length > 0 ) { var inputes = { measurements: measurements, duration: duration, interval: 1000, } - console.log('graphHHHHHHHHHHHHHHHHHHHHHHHHHHHHH',inputes); - - // Start stream const startStream = () => { socket.emit("lineInput", inputes); @@ -226,23 +224,24 @@ const LineGraphComponent = ({ // Extract timestamps and values const labels = responceData.time; - const datasets = data.measurements.map((measurement: any) => ({ - label: `${measurement.name}.${measurement.fields}`, - data: responceData[`${measurement.name}.${measurement.fields}`]?.values || [], - backgroundColor: themeColor[0] || "#5c87df", - borderColor: themeColor[1] || "#ffffff", - borderWidth: 2, - // fill: false, - })); + const datasets = measurements.map((measurement: any) => { + const key = `${measurement.name}.${measurement.fields}`; + return { + label: key, + data: responceData[key]?.values ?? [], // Ensure it exists + backgroundColor: themeColor[0] || "#5c87df", + borderColor: themeColor[1] || "#ffffff", + }; + }); setChartData({ labels, datasets }); }); + } return () => { socket.off("lineOutput"); socket.emit("stop_stream"); // Stop streaming when component unmounts }; - } }, [measurements, duration]); // useEffect(() => { diff --git a/app/src/modules/builder/agv/agv.tsx b/app/src/modules/builder/agv/agv.tsx new file mode 100644 index 0000000..749e39f --- /dev/null +++ b/app/src/modules/builder/agv/agv.tsx @@ -0,0 +1,51 @@ +import PolygonGenerator from "./polygonGenerator"; +import { useThree } from "@react-three/fiber"; +import { useEffect, useRef, useState } from "react"; +import * as THREE from "three"; +import * as Types from "../../../types/world/worldTypes"; +import PathNavigator from "./pathNavigator"; +import NavMeshDetails from "./navMeshDetails"; + +const Agv = ({ + lines, + plane, +}: { + lines: Types.RefLines; + plane: Types.RefMesh; +}) => { + let pathPoints = [ + [ + { x: 8.477161935339709, y: 0, z: 17.41343083550102 }, + { x: 9.175416491482693, y: 0, z: -12.361001232663693 }, + ], + , + // [ + // { x: 13.508213355232144, y: 0, z: -15.456970649652018 }, + // { x: -30.464866520869617, y: 0, z: 9.779806557688929 }, + // ], + [ + { x: 16.792040856420844, y: 0, z: 15.86281907549489 }, + { x: -42.77173264503395, y: 0, z: -15.821322764400804 }, + ], + ]; + let groupRef = useRef() as Types.RefGroup; + const [navMesh, setNavMesh] = useState(); + + return ( + <> + + + {pathPoints.map((pair, i) => ( + + ))} + + + ); +}; + +export default Agv; diff --git a/app/src/modules/builder/agv/navMeshDetails.tsx b/app/src/modules/builder/agv/navMeshDetails.tsx new file mode 100644 index 0000000..571be5a --- /dev/null +++ b/app/src/modules/builder/agv/navMeshDetails.tsx @@ -0,0 +1,59 @@ +import React, { useEffect, useState } from "react"; +import { init as initRecastNavigation } from "@recast-navigation/core"; +import { generateSoloNavMesh } from "@recast-navigation/generators"; +import { DebugDrawer, getPositionsAndIndices } from "@recast-navigation/three"; +import { useThree } from "@react-three/fiber"; +import * as THREE from "three"; +import * as Types from "../../../types/world/worldTypes"; + +interface NavMeshDetailsProps { + setNavMesh: (navMesh: any) => void; + groupRef: React.MutableRefObject; + lines: Types.RefLines; + plane: Types.RefMesh; +} + +export default function NavMeshDetails({ + lines, + setNavMesh, + groupRef, + plane, +}: NavMeshDetailsProps) { + const { scene } = useThree(); + + useEffect(() => { + const initializeNavigation = async () => { + try { + await initRecastNavigation(); + + if (!groupRef.current || groupRef.current.children.length === 0) { + return; + } + + const meshes = groupRef?.current?.children as THREE.Mesh[]; + + const [positions, indices] = getPositionsAndIndices(meshes); + + const cs = 0.25; + const ch = 0.5; + const walkableRadius = 0.5; + + const { success, navMesh } = generateSoloNavMesh(positions, indices, { cs, ch, walkableRadius: Math.round(walkableRadius / ch), }); + + if (!success || !navMesh) { + return; + } + + setNavMesh(navMesh); + + const debugDrawer = new DebugDrawer(); + debugDrawer.drawNavMesh(navMesh); + // scene.add(debugDrawer); + } catch (error) { } + }; + + initializeNavigation(); + }, [scene, groupRef, lines.current]); + + return null; +} diff --git a/app/src/modules/builder/agv/pathNavigator.tsx b/app/src/modules/builder/agv/pathNavigator.tsx new file mode 100644 index 0000000..25d3af0 --- /dev/null +++ b/app/src/modules/builder/agv/pathNavigator.tsx @@ -0,0 +1,98 @@ +import React, { useEffect, useState, useRef } from "react"; +import * as THREE from "three"; +import { useFrame } from "@react-three/fiber"; +import { NavMeshQuery } from "@recast-navigation/core"; +import { Line } from "@react-three/drei"; + +// Define interface for props +interface PathNavigatorProps { + navMesh: any; + selectedPoints: any; +} + +export default function PathNavigator({ + navMesh, + selectedPoints, +}: PathNavigatorProps) { + const [path, setPath] = useState<[number, number, number][]>([]); + const progressRef = useRef(0); + const meshRef = useRef(null); + + useEffect(() => { + if (selectedPoints.length === 2 && navMesh) { + const [start, end] = selectedPoints; + if (!start || !end) return; + + const navMeshQuery = new NavMeshQuery(navMesh); + + const { path: computedPath } = navMeshQuery.computePath(start, end); + + if (computedPath.length > 0) { + setPath(computedPath.map(({ x, y, z }) => [x, y + 0.1, z])); + progressRef.current = 0; + } + } + }, [selectedPoints, navMesh]); + + useFrame((_, delta) => { + if (path.length > 1 && meshRef.current) { + const speed = 3; + progressRef.current += delta * speed; + + let totalDistance = 0; + const distances: number[] = []; + for (let i = 0; i < path.length - 1; i++) { + const start = new THREE.Vector3(...path[i]); + const end = new THREE.Vector3(...path[i + 1]); + const segmentDistance = start.distanceTo(end); + distances.push(segmentDistance); + totalDistance += segmentDistance; + } + + let coveredDistance = progressRef.current; + let accumulatedDistance = 0; + let index = 0; + + while ( + index < distances.length && + coveredDistance > accumulatedDistance + distances[index] + ) { + accumulatedDistance += distances[index]; + index++; + } + + if (index < distances.length) { + const start = new THREE.Vector3(...path[index]); + const end = new THREE.Vector3(...path[index + 1]); + const segmentDistance = distances[index]; + + const t = (coveredDistance - accumulatedDistance) / segmentDistance; + const position = start.clone().lerp(end, t); // Use clone() to avoid mutating the original vector + meshRef.current.position.copy(position); + + const direction = new THREE.Vector3() + .subVectors(end, start) + .normalize(); + const targetQuaternion = new THREE.Quaternion().setFromUnitVectors( + new THREE.Vector3(0, 0, 1), + direction + ); + meshRef.current.quaternion.slerp(targetQuaternion, 0.1); + } else { + progressRef.current = totalDistance; + } + } + }); + + return ( + <> + {/* {path.length > 0 && } */} + {path.length > 0 && ( + 0 ? path[0] : [0, 0.1, 0]}> + + + + )} + + ); +} diff --git a/app/src/modules/builder/agv/polygonGenerator.tsx b/app/src/modules/builder/agv/polygonGenerator.tsx new file mode 100644 index 0000000..8682371 --- /dev/null +++ b/app/src/modules/builder/agv/polygonGenerator.tsx @@ -0,0 +1,126 @@ +import * as THREE from "three"; +import { useEffect, useState } from "react"; +import * as turf from "@turf/turf"; +import * as Types from "../../../types/world/worldTypes"; +import arrayLinesToObject from "../geomentries/lines/lineConvertions/arrayLinesToObject"; +interface PolygonGeneratorProps { + groupRef: React.MutableRefObject; + lines: Types.RefLines; + plane: Types.RefMesh; +} + +export default function PolygonGenerator({ + groupRef, + lines, + plane, +}: PolygonGeneratorProps) { + // const [rooms, setRooms] = useState([]); + + useEffect(() => { + if (groupRef.current && plane.current) { + groupRef.current.add(plane.current.clone()); + } + }, [groupRef, plane]); + + useEffect(() => { + let allLines = arrayLinesToObject(lines.current); + const wallLines = allLines?.filter((line) => line?.type === "WallLine"); + const aisleLines = allLines?.filter((line) => line?.type === "AisleLine"); + + const wallPoints = wallLines + .map((pair) => pair?.line.map((vals) => vals.position)) + .filter((wall): wall is THREE.Vector3[] => !!wall); + + const result = aisleLines.map((pair) => + pair?.line.map((point) => ({ + position: [point.position.x, point.position.z], + uuid: point.uuid, + })) + ); + if (!result || result.some((line) => !line)) { + return; + } + + const lineFeatures = result?.map((line: any) => + turf.lineString(line.map((p: any) => p?.position)) + ); + + const polygons = turf.polygonize(turf.featureCollection(lineFeatures)); + renderWallGeometry(wallPoints); + + if (polygons.features.length > 1) { + polygons.features.forEach((feature) => { + if (feature.geometry.type === "Polygon") { + + const shape = new THREE.Shape(); + const coords = feature.geometry.coordinates[0]; + + shape.moveTo(coords[0][0], coords[0][1]); + + for (let i = 1; i < coords.length; i++) { + shape.lineTo(coords[i][0], coords[i][1]); + } + shape.lineTo(coords[0][0], coords[0][1]); + + const extrudeSettings = { + depth: 5, + bevelEnabled: false, + }; + + const geometry = new THREE.ExtrudeGeometry(shape, extrudeSettings); + + const material = new THREE.MeshBasicMaterial({ color: "blue", transparent: true, opacity: 0.5 }); + const mesh = new THREE.Mesh(geometry, material); + mesh.rotateX(Math.PI / 2); + mesh.name = "agv-collider"; + mesh.position.y = 5; + + mesh.receiveShadow = true; + groupRef.current?.add(mesh); + } + }); + + } + }, [lines.current]); + + const renderWallGeometry = (walls: THREE.Vector3[][]) => { + walls.forEach((wall) => { + if (wall.length < 2) return; + + for (let i = 0; i < wall.length - 1; i++) { + const start = new THREE.Vector3(wall[i].x, wall[i].y, wall[i].z); + const end = new THREE.Vector3( + wall[i + 1].x, + wall[i + 1].y, + wall[i + 1].z + ); + + const wallHeight = 10; + const direction = new THREE.Vector3().subVectors(end, start); + const length = direction.length(); + direction.normalize(); + + const wallGeometry = new THREE.BoxGeometry(length, wallHeight); + const wallMaterial = new THREE.MeshBasicMaterial({ + color: "#aaa", + transparent: true, + opacity: 0.5, + }); + + const wallMesh = new THREE.Mesh(wallGeometry, wallMaterial); + const midPoint = new THREE.Vector3() + .addVectors(start, end) + .multiplyScalar(0.5); + wallMesh.position.set(midPoint.x, wallHeight / 2, midPoint.z); + + const quaternion = new THREE.Quaternion(); + quaternion.setFromUnitVectors(new THREE.Vector3(1, 0, 0), direction); + wallMesh.quaternion.copy(quaternion); + + groupRef.current?.add(wallMesh); + } + }); + }; + + return null; +} diff --git a/app/src/modules/collaboration/collabCams.tsx b/app/src/modules/collaboration/collabCams.tsx index da20b34..9d5475e 100644 --- a/app/src/modules/collaboration/collabCams.tsx +++ b/app/src/modules/collaboration/collabCams.tsx @@ -78,7 +78,7 @@ const CamModelsGroup = () => { socket.off('userDisConnectRespones'); socket.off('cameraUpdateResponse'); }; - }, [socket]); + }, [socket, activeUsers]); useFrame(() => { if (!groupRef.current) return; diff --git a/app/src/modules/market/AssetPreview.tsx b/app/src/modules/market/AssetPreview.tsx index be474a2..9a65990 100644 --- a/app/src/modules/market/AssetPreview.tsx +++ b/app/src/modules/market/AssetPreview.tsx @@ -1,6 +1,10 @@ -import React from "react"; +import React, { Suspense, useEffect } from "react"; import assetImage from "../../assets/image/image.png"; import { FiileedStarsIconSmall } from "../../components/icons/marketPlaceIcons"; +import { Canvas, useThree } from "@react-three/fiber"; +import { ContactShadows, OrbitControls, Text } from "@react-three/drei"; +import GltfLoader from "./GltfLoader"; +import * as THREE from "three"; // Define the shape of the selected card interface SelectedCard { @@ -17,6 +21,14 @@ interface AssetPreviewProps { setSelectedCard: React.Dispatch>; // Type for setter function } +function Ui() { + return ( + + Loading your model... + + ); +} + const AssetPreview: React.FC = ({ selectedCard, setSelectedCard, @@ -27,8 +39,6 @@ const AssetPreview: React.FC = ({ Math.min(5, isNaN(selectedCard.rating) ? 0 : selectedCard.rating) ); - console.log("selectedCard: ", selectedCard); - // Ensure that the rating is a valid positive integer for array length const starsArray = Array.from({ length: rating }, (_, index) => index); @@ -36,8 +46,38 @@ const AssetPreview: React.FC = ({
- + {/* */} {/* Add canvas here */} +
+ { + scene.background = new THREE.Color(0xffffff); + }} + > + }> + {selectedCard.assetName && ( + + )} + + + + +
diff --git a/app/src/modules/market/Card.tsx b/app/src/modules/market/Card.tsx index 646fe39..e723f4f 100644 --- a/app/src/modules/market/Card.tsx +++ b/app/src/modules/market/Card.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import { CommentsIcon, DownloadIcon, @@ -8,6 +8,7 @@ import { } from "../../components/icons/marketPlaceIcons"; import assetImage from "../../assets/image/image.png"; +import { getAssetDownload } from "../../services/marketplace/getAssetDownload"; interface CardProps { assetName: string; @@ -15,6 +16,7 @@ interface CardProps { price: number; rating: number; views: number; + image: string; onSelectCard: (cardData: { assetName: string; uploadedOn: string; @@ -30,6 +32,7 @@ const Card: React.FC = ({ price, rating, views, + image, onSelectCard, }) => { const handleCardSelect = () => { @@ -38,16 +41,23 @@ const Card: React.FC = ({ return (
-
+ {/* -
+ */}
- {assetName} + {assetName}
-
{assetName}
-
{uploadedOn}
+
{assetName.split("_").join(" ")}
+
+ Uploaded on -{" "} + {new Date(uploadedOn).toLocaleDateString("en-GB", { + day: "2-digit", + month: "short", + year: "2-digit", + })} +
diff --git a/app/src/modules/market/CardsContainer.tsx b/app/src/modules/market/CardsContainer.tsx index 96a47e4..423fd16 100644 --- a/app/src/modules/market/CardsContainer.tsx +++ b/app/src/modules/market/CardsContainer.tsx @@ -1,108 +1,26 @@ -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import Card from "./Card"; import AssetPreview from "./AssetPreview"; import RenderOverlay from "../../components/templates/Overlay"; +import { fetchAssets } from "../../services/marketplace/fetchAssets"; +interface ModelData { + CreatedBy: string; + animated: string | null; + category: string; + description: string; + filename: string; + isArchieve: boolean; + modelfileID: string; + tags: string; + thumbnail: string; + uploadDate: number; + _id: string; +} +interface ModelsProps { + models: ModelData[]; +} -const CardsContainer: React.FC = () => { - const array = [ - { - id: 1, - name: "Asset 1", - uploadedOn: "12 Jan 23", - price: 36500, - rating: 4.5, - views: 500, - }, - { - id: 2, - name: "Asset 2", - uploadedOn: "14 Jan 23", - price: 45000, - rating: 4.0, - views: 500, - }, - { - id: 3, - name: "Asset 3", - uploadedOn: "15 Jan 23", - price: 52000, - rating: 4.8, - views: 500, - }, - { - id: 4, - name: "Asset 4", - uploadedOn: "18 Jan 23", - price: 37000, - rating: 3.9, - views: 500, - }, - { - id: 5, - name: "Asset 5", - uploadedOn: "20 Jan 23", - price: 60000, - rating: 5.0, - views: 500, - }, - { - id: 6, - name: "Asset 6", - uploadedOn: "22 Jan 23", - price: 46000, - rating: 4.2, - views: 500, - }, - { - id: 7, - name: "Asset 7", - uploadedOn: "25 Jan 23", - price: 38000, - rating: 4.3, - views: 500, - }, - { - id: 8, - name: "Asset 8", - uploadedOn: "27 Jan 23", - price: 41000, - rating: 4.1, - views: 500, - }, - { - id: 9, - name: "Asset 9", - uploadedOn: "30 Jan 23", - price: 55000, - rating: 4.6, - views: 500, - }, - { - id: 10, - name: "Asset 10", - uploadedOn: "2 Feb 23", - price: 49000, - rating: 4.4, - views: 500, - }, - { - id: 11, - name: "Asset 11", - uploadedOn: "5 Feb 23", - price: 62000, - rating: 5.0, - views: 500, - }, - { - id: 12, - name: "Asset 12", - uploadedOn: "7 Feb 23", - price: 53000, - rating: 4.7, - views: 500, - }, - ]; - +const CardsContainer: React.FC = ({ models }) => { const [selectedCard, setSelectedCard] = useState<{ assetName: string; uploadedOn: string; @@ -125,24 +43,26 @@ const CardsContainer: React.FC = () => {
Products You May Like
- {array.map((asset) => ( - - ))} - {/* */} - {selectedCard && ( - 0 && + models.map((assetDetail) => ( + - )} + ))} + {/* */} + {selectedCard && ( + + )} {/* */}
diff --git a/app/src/modules/market/FilterSearch.tsx b/app/src/modules/market/FilterSearch.tsx index 11a2cbf..08103ba 100644 --- a/app/src/modules/market/FilterSearch.tsx +++ b/app/src/modules/market/FilterSearch.tsx @@ -1,19 +1,69 @@ -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; // import RegularDropDown from "./ui/inputs/RegularDropDown"; import Search from "../../components/ui/inputs/Search"; import { StarsIcon } from "../../components/icons/marketPlaceIcons"; import RegularDropDown from "../../components/ui/inputs/RegularDropDown"; - -const FilterSearch: React.FC = () => { +import { getSortedAssets } from "../../services/marketplace/getSortedAssets"; +interface ModelData { + CreatedBy: string; + animated: string | null; + category: string; + description: string; + filename: string; + isArchieve: boolean; + modelfileID: string; + tags: string; + thumbnail: string; + uploadDate: number; + _id: string; +} +interface ModelsProps { + models: ModelData[]; + setModels: React.Dispatch>; + filteredModels: ModelData[]; +} +const FilterSearch: React.FC = ({ + models, + setModels, + filteredModels, +}) => { const [activeOption, setActiveOption] = useState("Sort by"); // State for active option + console.log("filteredModels: ", filteredModels); const handleSelect = (option: string) => { setActiveOption(option); + console.log("option: ", option); + // Alphabet ascending + // Alphabet descending + // All }; + useEffect(() => { + if (activeOption == "Alphabet ascending") { + let ascending = models + ?.slice() + .sort((a, b) => a.filename.localeCompare(b.filename)) + .map((val) => val); + setModels(ascending); + } else if (activeOption == "Alphabet descending") { + let descending = models + ?.slice() + .sort((a, b) => b.filename.localeCompare(a.filename)) + .map((val) => val); + setModels(descending); + } + }, [activeOption]); + const handleSearch = (val: string) => { + const filteredModel = filteredModels?.filter((model) => + model.filename.toLowerCase().includes(val.toLowerCase()) + ); + + setModels(filteredModel); + }; + return (
- {}} /> + void; + selectedAnimation?: string; + setSelectedAnimation?: (animation: string) => void; +} + +// const getGLTFUrl = (url: string) => url; // Placeholder for your actual function + +const GltfLoader: React.FC = ({ + glbdata, + fromServer, + setAnimations, + selectedAnimation, +}) => { + const modelUrl: any = fromServer ? fetchGltfUrl(fromServer) : glbdata; + const { scene, animations } = useGLTF(modelUrl ?? "") as { + scene: Object3D; + animations: THREE.AnimationClip[]; + }; + + const mixer = useRef( + scene ? new AnimationMixer(scene) : null + ); + const actions = useRef>({}); + + useEffect(() => { + if (animations.length > 0 && mixer.current && setAnimations) { + const animationNames = animations.map((animation) => animation.name); + setAnimations(animationNames); + + animations.forEach((animation) => { + const action = mixer.current!.clipAction(animation); + actions.current[animation.name] = action; + }); + } else { + setAnimations && setAnimations([]); + } + }, [animations, setAnimations]); + + useEffect(() => { + if (actions.current && selectedAnimation) { + const action = actions.current[selectedAnimation]; + if (action) { + action.reset().fadeIn(0.5).play(); + return () => { + action.fadeOut(0.5); + }; + } + } + }, [selectedAnimation]); + + useFrame((_, delta) => { + if (mixer.current) { + mixer.current.update(delta); + } + }); + + return ( + + + + ); +}; + +export default GltfLoader; diff --git a/app/src/modules/market/MarketPlace.tsx b/app/src/modules/market/MarketPlace.tsx index 71dc0a5..d830576 100644 --- a/app/src/modules/market/MarketPlace.tsx +++ b/app/src/modules/market/MarketPlace.tsx @@ -1,14 +1,46 @@ -import React from "react"; +import React, { useEffect, useState } from "react"; import FilterSearch from "./FilterSearch"; import CardsContainer from "./CardsContainer"; - +import { fetchAssets } from "../../services/marketplace/fetchAssets"; +import { getAssetImages } from "../../services/factoryBuilder/assest/assets/getAssetImages"; +interface ModelData { + CreatedBy: string; + animated: string | null; + category: string; + description: string; + filename: string; + isArchieve: boolean; + modelfileID: string; + tags: string; + thumbnail: string; + uploadDate: number; + _id: string; +} const MarketPlace = () => { + const [models, setModels] = useState([]); + const [filteredModels, setFilteredModels] = useState([]); + + useEffect(() => { + const filteredAssets = async () => { + try { + const filt = await getAssetImages("67d934ad0f42a1fdadb19aa6"); + setModels(filt.items); + setFilteredModels(filt.items); + } catch {} + }; + filteredAssets(); + }, []); + return (
- - + +
diff --git a/app/src/modules/scene/scene.tsx b/app/src/modules/scene/scene.tsx index f1a9d1c..ac74240 100644 --- a/app/src/modules/scene/scene.tsx +++ b/app/src/modules/scene/scene.tsx @@ -52,7 +52,6 @@ export default function Scene() { - {/* */} diff --git a/app/src/modules/scene/world/world.tsx b/app/src/modules/scene/world/world.tsx index f8a43ec..16b4b53 100644 --- a/app/src/modules/scene/world/world.tsx +++ b/app/src/modules/scene/world/world.tsx @@ -28,7 +28,7 @@ import { useShadows, useUpdateScene, useWalls, - useToolMode + useToolMode, } from "../../../store/store"; ////////// 3D Function Imports ////////// @@ -50,16 +50,17 @@ import { findEnvironment } from "../../../services/factoryBuilder/environment/fi import Layer2DVisibility from "../../builder/geomentries/layers/layer2DVisibility"; import DrieHtmlTemp from "../mqttTemp/drieHtmlTemp"; import ZoneGroup from "../../builder/groups/zoneGroup"; +import Agv from "../../builder/agv/agv"; export default function World() { - const state = useThree(); // Importing the state from the useThree hook, which contains the scene, camera, and other Three.js elements. - const csg = useRef(); // Reference for CSG object, used for 3D modeling. - const CSGGroup = useRef() as Types.RefMesh; // Reference to a group of CSG objects. - const scene = useRef() as Types.RefScene; // Reference to the scene. - const camera = useRef() as Types.RefCamera; // Reference to the camera object. - const controls = useRef(); // Reference to the controls object. - const raycaster = useRef() as Types.RefRaycaster; // Reference for raycaster used for detecting objects being pointed at in the scene. - const dragPointControls = useRef() as Types.RefDragControl; // Reference for drag point controls, an array for drag control. + const state = useThree(); // Importing the state from the useThree hook, which contains the scene, camera, and other Three.js elements. + const csg = useRef(); // Reference for CSG object, used for 3D modeling. + const CSGGroup = useRef() as Types.RefMesh; // Reference to a group of CSG objects. + const scene = useRef() as Types.RefScene; // Reference to the scene. + const camera = useRef() as Types.RefCamera; // Reference to the camera object. + const controls = useRef(); // Reference to the controls object. + const raycaster = useRef() as Types.RefRaycaster; // Reference for raycaster used for detecting objects being pointed at in the scene. + const dragPointControls = useRef() as Types.RefDragControl; // Reference for drag point controls, an array for drag control. // Assigning the scene and camera from the Three.js state to the references. @@ -68,47 +69,48 @@ export default function World() { controls.current = state.controls; raycaster.current = state.raycaster; - const plane = useRef(null); // Reference for a plane object for raycaster reference. - const grid = useRef() as any; // Reference for a grid object for raycaster reference. - const snappedPoint = useRef() as Types.RefVector3; // Reference for storing a snapped point at the (end = isSnapped) and (start = ispreSnapped) of the line. - const isSnapped = useRef(false) as Types.RefBoolean; // Boolean reference to indicate if an object is snapped at the (end). - const anglesnappedPoint = useRef() as Types.RefVector3; // Reference for storing an angle-snapped point when the line is in 90 degree etc... - const isAngleSnapped = useRef(false) as Types.RefBoolean; // Boolean to indicate if angle snapping is active. - const isSnappedUUID = useRef() as Types.RefString; // UUID reference to identify the snapped point. - const ispreSnapped = useRef(false) as Types.RefBoolean; // Boolean reference to indicate if an object is snapped at the (start). - const tempLoader = useRef() as Types.RefMesh; // Reference for a temporary loader for the floor items. - const isTempLoader = useRef() as Types.RefBoolean; // Reference to check if a temporary loader is active. - const Tube = useRef() as Types.RefTubeGeometry; // Reference for tubes used for reference line creation and updation. - const line = useRef([]) as Types.RefLine; // Reference for line which stores the current line that is being drawn. - const lines = useRef([]) as Types.RefLines; // Reference for lines which stores all the lines that are ever drawn. - const onlyFloorline = useRef([]); // Reference for floor lines which does not have walls or roof and have only floor used to store the current line that is being drawn. - const onlyFloorlines = useRef([]); // Reference for all the floor lines that are ever drawn. - const ReferenceLineMesh = useRef() as Types.RefMesh; // Reference for storing the mesh of the reference line for moving it during draw. - const LineCreated = useRef(false) as Types.RefBoolean; // Boolean to track whether the reference line is created or not. - const referencePole = useRef() as Types.RefMesh; // Reference for a pole that is used as the reference for the user to show where it is placed. - const itemsGroup = useRef() as Types.RefGroup; // Reference to the THREE.Group that has the floor items (Gltf). - const floorGroup = useRef() as Types.RefGroup; // Reference to the THREE.Group that has the roofs and the floors. - const AttachedObject = useRef() as Types.RefMesh; // Reference for an object that is attached using dbl click for transform controls rotation. - const floorPlanGroup = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the lines group and the points group. - const floorPlanGroupLine = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the lines that are drawn. - const floorPlanGroupPoint = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the points that are created. + const plane = useRef(null); // Reference for a plane object for raycaster reference. + const grid = useRef() as any; // Reference for a grid object for raycaster reference. + const snappedPoint = useRef() as Types.RefVector3; // Reference for storing a snapped point at the (end = isSnapped) and (start = ispreSnapped) of the line. + const isSnapped = useRef(false) as Types.RefBoolean; // Boolean reference to indicate if an object is snapped at the (end). + const anglesnappedPoint = useRef() as Types.RefVector3; // Reference for storing an angle-snapped point when the line is in 90 degree etc... + const isAngleSnapped = useRef(false) as Types.RefBoolean; // Boolean to indicate if angle snapping is active. + const isSnappedUUID = useRef() as Types.RefString; // UUID reference to identify the snapped point. + const ispreSnapped = useRef(false) as Types.RefBoolean; // Boolean reference to indicate if an object is snapped at the (start). + const tempLoader = useRef() as Types.RefMesh; // Reference for a temporary loader for the floor items. + const isTempLoader = useRef() as Types.RefBoolean; // Reference to check if a temporary loader is active. + const Tube = useRef() as Types.RefTubeGeometry; // Reference for tubes used for reference line creation and updation. + const line = useRef([]) as Types.RefLine; // Reference for line which stores the current line that is being drawn. + const lines = useRef([]) as Types.RefLines; // Reference for lines which stores all the lines that are ever drawn. + const onlyFloorline = useRef([]); // Reference for floor lines which does not have walls or roof and have only floor used to store the current line that is being drawn. + const onlyFloorlines = useRef([]); // Reference for all the floor lines that are ever drawn. + const ReferenceLineMesh = useRef() as Types.RefMesh; // Reference for storing the mesh of the reference line for moving it during draw. + const LineCreated = useRef(false) as Types.RefBoolean; // Boolean to track whether the reference line is created or not. + const referencePole = useRef() as Types.RefMesh; // Reference for a pole that is used as the reference for the user to show where it is placed. + const itemsGroup = useRef() as Types.RefGroup; // Reference to the THREE.Group that has the floor items (Gltf). + const floorGroup = useRef() as Types.RefGroup; // Reference to the THREE.Group that has the roofs and the floors. + const AttachedObject = useRef() as Types.RefMesh; // Reference for an object that is attached using dbl click for transform controls rotation. + const floorPlanGroup = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the lines group and the points group. + const floorPlanGroupLine = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the lines that are drawn. + const floorPlanGroupPoint = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the points that are created. const floorGroupAisle = useRef() as Types.RefGroup; const zoneGroup = useRef() as Types.RefGroup; - const currentLayerPoint = useRef([]) as Types.RefMeshArray; // Reference for points that re in the current layer used to update the points in drag controls. - const hoveredDeletablePoint = useRef() as Types.RefMesh; // Reference for the currently hovered point that can be deleted. - const hoveredDeletableLine = useRef() as Types.RefMesh; // Reference for the currently hovered line that can be deleted. - const hoveredDeletableFloorItem = useRef() as Types.RefMesh; // Reference for the currently hovered floor item that can be deleted. - const hoveredDeletableWallItem = useRef() as Types.RefMesh; // Reference for the currently hovered wall item that can be deleted. - const hoveredDeletablePillar = useRef() as Types.RefMesh; // Reference for the currently hovered pillar that can be deleted. - const currentWallItem = useRef() as Types.RefMesh; // Reference for the currently selected wall item that can be scaled, dragged etc... + const currentLayerPoint = useRef([]) as Types.RefMeshArray; // Reference for points that re in the current layer used to update the points in drag controls. + const hoveredDeletablePoint = useRef() as Types.RefMesh; // Reference for the currently hovered point that can be deleted. + const hoveredDeletableLine = useRef() as Types.RefMesh; // Reference for the currently hovered line that can be deleted. + const hoveredDeletableFloorItem = useRef() as Types.RefMesh; // Reference for the currently hovered floor item that can be deleted. + const hoveredDeletableWallItem = useRef() as Types.RefMesh; // Reference for the currently hovered wall item that can be deleted. + const hoveredDeletablePillar = useRef() as Types.RefMesh; // Reference for the currently hovered pillar that can be deleted. + const currentWallItem = useRef() as Types.RefMesh; // Reference for the currently selected wall item that can be scaled, dragged etc... - const cursorPosition = new THREE.Vector3(); // 3D vector for storing the cursor position. + const cursorPosition = new THREE.Vector3(); // 3D vector for storing the cursor position. - const [selectedItemsIndex, setSelectedItemsIndex] = useState(null); // State for tracking the index of the selected item. - const { activeLayer, setActiveLayer } = useActiveLayer(); // State that changes based on which layer the user chooses in Layers.jsx. - const { toggleView, setToggleView } = useToggleView(); // State for toggling between 2D and 3D. + const [selectedItemsIndex, setSelectedItemsIndex] = + useState(null); // State for tracking the index of the selected item. + const { activeLayer, setActiveLayer } = useActiveLayer(); // State that changes based on which layer the user chooses in Layers.jsx. + const { toggleView, setToggleView } = useToggleView(); // State for toggling between 2D and 3D. const { toolMode, setToolMode } = useToolMode(); - const { movePoint, setMovePoint } = useMovePoint(); // State that stores a boolean which represents whether the move mode is active or not. + const { movePoint, setMovePoint } = useMovePoint(); // State that stores a boolean which represents whether the move mode is active or not. const { deletePointOrLine, setDeletePointOrLine } = useDeletePointOrLine(); const { socket } = useSocketStore(); const { roofVisibility, setRoofVisibility } = useRoofVisibility(); @@ -118,7 +120,6 @@ export default function World() { const { walls, setWalls } = useWalls(); const [RefTextupdate, setRefTextUpdate] = useState(-1000); - // const loader = new GLTFLoader(); // const dracoLoader = new DRACOLoader(); @@ -162,7 +163,14 @@ export default function World() { dragPointControls.current.enabled = false; } if (toggleView) { - Layer2DVisibility(activeLayer, floorPlanGroup, floorPlanGroupLine, floorPlanGroupPoint, currentLayerPoint, dragPointControls); + Layer2DVisibility( + activeLayer, + floorPlanGroup, + floorPlanGroupLine, + floorPlanGroupPoint, + currentLayerPoint, + dragPointControls + ); } else { setToolMode(null); setDeletePointOrLine(false); @@ -179,11 +187,14 @@ export default function World() { }, []); useEffect(() => { - const email = localStorage.getItem('email') - const organization = (email!.split("@")[1]).split(".")[0]; + const email = localStorage.getItem("email"); + const organization = email!.split("@")[1].split(".")[0]; async function fetchVisibility() { - const visibility = await findEnvironment(organization, localStorage.getItem('userId')!); + const visibility = await findEnvironment( + organization, + localStorage.getItem("userId")! + ); if (visibility) { setRoofVisibility(visibility.roofVisibility); setWallVisibility(visibility.wallVisibility); @@ -191,13 +202,33 @@ export default function World() { } } fetchVisibility(); - }, []) + }, []); ////////// UseFrame is Here ////////// useFrame(() => { if (toolMode) { - Draw(state, plane, cursorPosition, floorPlanGroupPoint, floorPlanGroupLine, snappedPoint, isSnapped, isSnappedUUID, line, lines, ispreSnapped, floorPlanGroup, ReferenceLineMesh, LineCreated, setRefTextUpdate, Tube, anglesnappedPoint, isAngleSnapped, toolMode) + Draw( + state, + plane, + cursorPosition, + floorPlanGroupPoint, + floorPlanGroupLine, + snappedPoint, + isSnapped, + isSnappedUUID, + line, + lines, + ispreSnapped, + floorPlanGroup, + ReferenceLineMesh, + LineCreated, + setRefTextUpdate, + Tube, + anglesnappedPoint, + isAngleSnapped, + toolMode + ); } }); @@ -304,7 +335,6 @@ export default function World() { anglesnappedPoint={anglesnappedPoint} /> */} - - + + ); -} \ No newline at end of file +} diff --git a/app/src/modules/simulation/behaviour/behaviour.tsx b/app/src/modules/simulation/behaviour/behaviour.tsx index d7a08af..2854172 100644 --- a/app/src/modules/simulation/behaviour/behaviour.tsx +++ b/app/src/modules/simulation/behaviour/behaviour.tsx @@ -1,43 +1,29 @@ -import { useFloorItems } from '../../../store/store'; +import { useFloorItems, useSimulationPaths } from '../../../store/store'; import * as THREE from 'three'; import * as Types from '../../../types/world/worldTypes'; import { useEffect } from 'react'; -interface Path { - modeluuid: string; - modelName: string; - points: { - uuid: string; - position: [number, number, number]; - rotation: [number, number, number]; - actions: { uuid: string; name: string; type: string; material: string; delay: number | string; spawnInterval: number | string; isUsed: boolean }[] | []; - triggers: { uuid: string; name: string; type: string; isUsed: boolean }[] | []; - connections: { source: { pathUUID: string; pointUUID: string }; targets: { pathUUID: string; pointUUID: string }[] }; - }[]; - pathPosition: [number, number, number]; - pathRotation: [number, number, number]; - speed: number; -} - -function Behaviour({ setSimulationPaths }: { setSimulationPaths: any }) { +function Behaviour() { + const { setSimulationPaths } = useSimulationPaths(); const { floorItems } = useFloorItems(); useEffect(() => { - const newPaths: Path[] = []; + const newPaths: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[] = []; floorItems.forEach((item: Types.FloorItemType) => { - if (item.modelfileID === "6633215057b31fe671145959") { - const point1Position = new THREE.Vector3(0, 1.25, 3.3); - const middlePointPosition = new THREE.Vector3(0, 1.25, 0); - const point2Position = new THREE.Vector3(0, 1.25, -3.3); + if (item.modelfileID === "672a090f80d91ac979f4d0bd") { + const point1Position = new THREE.Vector3(0, 0.85, 2.2); + const middlePointPosition = new THREE.Vector3(0, 0.85, 0); + const point2Position = new THREE.Vector3(0, 0.85, -2.2); const point1UUID = THREE.MathUtils.generateUUID(); const middlePointUUID = THREE.MathUtils.generateUUID(); const point2UUID = THREE.MathUtils.generateUUID(); - const newPath: Path = { + const newPath: Types.ConveyorEventsSchema = { modeluuid: item.modeluuid, modelName: item.modelname, + type: 'Conveyor', points: [ { uuid: point1UUID, @@ -64,12 +50,32 @@ function Behaviour({ setSimulationPaths }: { setSimulationPaths: any }) { connections: { source: { pathUUID: item.modeluuid, pointUUID: point2UUID }, targets: [] }, }, ], - pathPosition: [...item.position], - pathRotation: [item.rotation.x, item.rotation.y, item.rotation.z], + assetPosition: [...item.position], + assetRotation: [item.rotation.x, item.rotation.y, item.rotation.z], speed: 1, }; newPaths.push(newPath); + } else if (item.modelfileID === "67e3da19c2e8f37134526e6a") { + const pointUUID = THREE.MathUtils.generateUUID(); + const pointPosition = new THREE.Vector3(0, 1.3, 0); + + const newVehiclePath: Types.VehicleEventsSchema = { + modeluuid: item.modeluuid, + modelName: item.modelname, + type: 'Vehicle', + point: { + uuid: pointUUID, + position: [pointPosition.x, pointPosition.y, pointPosition.z], + actions: [{ uuid: THREE.MathUtils.generateUUID(), name: 'Action 1', type: 'Start', start: THREE.MathUtils.generateUUID(), hitCount: 1, end: THREE.MathUtils.generateUUID(), buffer: 0, isUsed: false }], + triggers: [], + connections: { source: { pathUUID: item.modeluuid, pointUUID: pointUUID }, targets: [] }, + }, + assetPosition: [...item.position], + speed: 2, + }; + + newPaths.push(newVehiclePath); } }); diff --git a/app/src/modules/simulation/path/pathConnector.tsx b/app/src/modules/simulation/path/pathConnector.tsx index 93172b7..8df718c 100644 --- a/app/src/modules/simulation/path/pathConnector.tsx +++ b/app/src/modules/simulation/path/pathConnector.tsx @@ -1,6 +1,7 @@ import { useFrame, useThree } from '@react-three/fiber'; import React, { useEffect, useState } from 'react'; import * as THREE from 'three'; +import * as Types from '../../../types/world/worldTypes'; import { QuadraticBezierLine } from '@react-three/drei'; import { useIsConnecting, useSimulationPaths } from '../../../store/store'; import useModuleStore from '../../../store/useModuleStore'; @@ -27,61 +28,113 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec toPointUUID: string ) => { const updatedPaths = simulationPaths.map(path => { - if (path.modeluuid === fromPathUUID) { - return { - ...path, - points: path.points.map(point => { - if (point.uuid === fromPointUUID) { - const newTarget = { - pathUUID: toPathUUID, - pointUUID: toPointUUID - }; - const existingTargets = point.connections.targets || []; - - if (!existingTargets.some(target => - target.pathUUID === newTarget.pathUUID && - target.pointUUID === newTarget.pointUUID - )) { - return { - ...point, - connections: { - ...point.connections, - targets: [...existingTargets, newTarget] - } + if (path.type === 'Conveyor') { + if (path.modeluuid === fromPathUUID) { + return { + ...path, + points: path.points.map(point => { + if (point.uuid === fromPointUUID) { + const newTarget = { + pathUUID: toPathUUID, + pointUUID: toPointUUID }; + const existingTargets = point.connections.targets || []; + + if (!existingTargets.some(target => + target.pathUUID === newTarget.pathUUID && + target.pointUUID === newTarget.pointUUID + )) { + return { + ...point, + connections: { + ...point.connections, + targets: [...existingTargets, newTarget] + } + }; + } } - } - return point; - }) - }; + return point; + }) + }; + } + else if (path.modeluuid === toPathUUID) { + return { + ...path, + points: path.points.map(point => { + if (point.uuid === toPointUUID) { + const reverseTarget = { + pathUUID: fromPathUUID, + pointUUID: fromPointUUID + }; + const existingTargets = point.connections.targets || []; + + if (!existingTargets.some(target => + target.pathUUID === reverseTarget.pathUUID && + target.pointUUID === reverseTarget.pointUUID + )) { + return { + ...point, + connections: { + ...point.connections, + targets: [...existingTargets, reverseTarget] + } + }; + } + } + return point; + }) + }; + } } - else if (path.modeluuid === toPathUUID) { - return { - ...path, - points: path.points.map(point => { - if (point.uuid === toPointUUID) { - const reverseTarget = { - pathUUID: fromPathUUID, - pointUUID: fromPointUUID - }; - const existingTargets = point.connections.targets || []; + else if (path.type === 'Vehicle') { + // Handle outgoing connections from Vehicle + if (path.modeluuid === fromPathUUID && path.point.uuid === fromPointUUID) { + const newTarget = { + pathUUID: toPathUUID, + pointUUID: toPointUUID + }; + const existingTargets = path.point.connections.targets || []; - if (!existingTargets.some(target => - target.pathUUID === reverseTarget.pathUUID && - target.pointUUID === reverseTarget.pointUUID - )) { - return { - ...point, - connections: { - ...point.connections, - targets: [...existingTargets, reverseTarget] - } - }; + if (!existingTargets.some(target => + target.pathUUID === newTarget.pathUUID && + target.pointUUID === newTarget.pointUUID + )) { + return { + ...path, + point: { + ...path.point, + connections: { + ...path.point.connections, + targets: [...existingTargets, newTarget] + } } - } - return point; - }) - }; + }; + } + } + // Handle incoming connections to Vehicle + else if (path.modeluuid === toPathUUID && path.point.uuid === toPointUUID) { + const reverseTarget = { + pathUUID: fromPathUUID, + pointUUID: fromPointUUID + }; + const existingTargets = path.point.connections.targets || []; + + if (!existingTargets.some(target => + target.pathUUID === reverseTarget.pathUUID && + target.pointUUID === reverseTarget.pointUUID + )) { + return { + ...path, + point: { + ...path.point, + connections: { + ...path.point.connections, + targets: [...existingTargets, reverseTarget] + } + } + }; + } + } } return path; }); @@ -126,25 +179,43 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec if (intersects.length > 0) { const intersected = intersects[0].object; - if (intersected.name.includes("action-sphere")) { + if (intersected.name.includes("events-sphere")) { const pathUUID = intersected.userData.path.modeluuid; const sphereUUID = intersected.uuid; const worldPosition = new THREE.Vector3(); intersected.getWorldPosition(worldPosition); - const isStartOrEnd = intersected.userData.path.points.length > 0 && ( - sphereUUID === intersected.userData.path.points[0].uuid || - sphereUUID === intersected.userData.path.points[intersected.userData.path.points.length - 1].uuid - ); + let isStartOrEnd = false; + + if (intersected.userData.path.points) { + isStartOrEnd = intersected.userData.path.points.length > 0 && ( + sphereUUID === intersected.userData.path.points[0].uuid || + sphereUUID === intersected.userData.path.points[intersected.userData.path.points.length - 1].uuid + ); + } else if (intersected.userData.path.point) { + isStartOrEnd = sphereUUID === intersected.userData.path.point.uuid; + } if (pathUUID) { - // Check if sphere is already connected - const isAlreadyConnected = simulationPaths.some(path => - path.points.some(point => - point.uuid === sphereUUID && - point.connections.targets.length > 0 - ) - ); + const firstPath = simulationPaths.find(p => p.modeluuid === firstSelected?.pathUUID); + const secondPath = simulationPaths.find(p => p.modeluuid === pathUUID); + + if (firstPath && secondPath && firstPath.type === 'Vehicle' && secondPath.type === 'Vehicle') { + console.log("Cannot connect two vehicle paths together"); + return; + } + const isAlreadyConnected = simulationPaths.some(path => { + if (path.type === 'Conveyor') { + return path.points.some(point => + point.uuid === sphereUUID && + point.connections.targets.length > 0 + ); + } else if (path.type === 'Vehicle') { + return path.point.uuid === sphereUUID && + path.point.connections.targets.length > 0; + } + return false; + }); if (isAlreadyConnected) { console.log("Sphere is already connected. Ignoring."); @@ -211,6 +282,7 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec raycaster.setFromCamera(pointer, camera); const intersects = raycaster.intersectObjects(scene.children, true).filter((intersect) => !intersect.object.name.includes("Roof") && + !intersect.object.name.includes("agv-collider") && !intersect.object.name.includes("MeasurementReference") && !intersect.object.userData.isPathObject && !(intersect.object.type === "GridHelper") @@ -229,7 +301,7 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec } const sphereIntersects = raycaster.intersectObjects(pathsGroupRef.current.children, true).filter((obj) => - obj.object.name.includes("action-sphere") + obj.object.name.includes("events-sphere") ); if (sphereIntersects.length > 0) { @@ -237,27 +309,45 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec const sphereUUID = sphere.uuid; const spherePosition = new THREE.Vector3(); sphere.getWorldPosition(spherePosition); - const pathUUID = sphere.userData.path.modeluuid; + const pathData = sphere.userData.path; + const pathUUID = pathData.modeluuid; - const isStartOrEnd = sphere.userData.path.points.length > 0 && ( - sphereUUID === sphere.userData.path.points[0].uuid || - sphereUUID === sphere.userData.path.points[sphere.userData.path.points.length - 1].uuid - ); + const firstPath = simulationPaths.find(p => p.modeluuid === firstSelected.pathUUID); + const secondPath = simulationPaths.find(p => p.modeluuid === pathUUID); + const isVehicleToVehicle = firstPath?.type === 'Vehicle' && secondPath?.type === 'Vehicle'; - const isAlreadyConnected = simulationPaths.some(path => - path.points.some(point => - point.uuid === sphereUUID && - point.connections.targets.length > 0 - ) - ); + const isConnectable = (pathData.type === 'Vehicle' || + (pathData.points.length > 0 && ( + sphereUUID === pathData.points[0].uuid || + sphereUUID === pathData.points[pathData.points.length - 1].uuid + ))) && !isVehicleToVehicle; + + const isAlreadyConnected = simulationPaths.some(path => { + if (path.type === 'Conveyor') { + return path.points.some(point => + point.uuid === sphereUUID && + point.connections.targets.length > 0 + ); + } else if (path.type === 'Vehicle') { + return path.point.uuid === sphereUUID && + path.point.connections.targets.length > 0; + } + return false; + }); if ( !isAlreadyConnected && + !isVehicleToVehicle && firstSelected.sphereUUID !== sphereUUID && firstSelected.pathUUID !== pathUUID && - (firstSelected.isCorner || isStartOrEnd) + (firstSelected.isCorner || isConnectable) ) { - snappedSphere = { sphereUUID, position: spherePosition, pathUUID, isCorner: isStartOrEnd }; + snappedSphere = { + sphereUUID, + position: spherePosition, + pathUUID, + isCorner: isConnectable + }; } else { isInvalidConnection = true; } @@ -281,8 +371,13 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec end: point, mid: midPoint, }); + console.log({ + start: firstSelected.position, + end: point, + mid: midPoint, + }); - setIsConnecting(true); + // setIsConnecting(true); if (sphereIntersects.length > 0) { setHelperLineColor(isInvalidConnection ? 'red' : '#6cf542'); @@ -299,13 +394,53 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec } }); - // Render connections from simulationPaths return ( <> - {simulationPaths.flatMap(path => - path.points.flatMap(point => - point.connections.targets.map((target, index) => { - const fromSphere = pathsGroupRef.current?.getObjectByProperty('uuid', point.uuid); + {simulationPaths.flatMap(path => { + if (path.type === 'Conveyor') { + return path.points.flatMap(point => + point.connections.targets.map((target, index) => { + const targetPath = simulationPaths.find(p => p.modeluuid === target.pathUUID); + if (targetPath?.type === 'Vehicle') return null; + + const fromSphere = pathsGroupRef.current?.getObjectByProperty('uuid', point.uuid); + const toSphere = pathsGroupRef.current?.getObjectByProperty('uuid', target.pointUUID); + + if (fromSphere && toSphere) { + const fromWorldPosition = new THREE.Vector3(); + const toWorldPosition = new THREE.Vector3(); + fromSphere.getWorldPosition(fromWorldPosition); + toSphere.getWorldPosition(toWorldPosition); + + const distance = fromWorldPosition.distanceTo(toWorldPosition); + const heightFactor = Math.max(0.5, distance * 0.2); + + const midPoint = new THREE.Vector3( + (fromWorldPosition.x + toWorldPosition.x) / 2, + Math.max(fromWorldPosition.y, toWorldPosition.y) + heightFactor, + (fromWorldPosition.z + toWorldPosition.z) / 2 + ); + + return ( + + ); + } + return null; + }) + ); + } else if (path.type === 'Vehicle') { + return path.point.connections.targets.map((target, index) => { + const fromSphere = pathsGroupRef.current?.getObjectByProperty('uuid', path.point.uuid); const toSphere = pathsGroupRef.current?.getObjectByProperty('uuid', target.pointUUID); if (fromSphere && toSphere) { @@ -325,22 +460,23 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec return ( ); } return null; - }) - ) - )} + }); + } + return []; + })} {currentLine && ( { if (!selectedActionSphere) return; - const updatedPaths: Path[] = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - position: [ - selectedActionSphere.point.position.x, - selectedActionSphere.point.position.y, - selectedActionSphere.point.position.z, - ], - rotation: [ - selectedActionSphere.point.rotation.x, - selectedActionSphere.point.rotation.y, - selectedActionSphere.point.rotation.z, - ] - } - : point - ), - })); + const updatedPaths = simulationPaths.map((path) => { + if (path.type === "Conveyor") { + return { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + position: [ + selectedActionSphere.point.position.x, + selectedActionSphere.point.position.y, + selectedActionSphere.point.position.z, + ], + rotation: [ + selectedActionSphere.point.rotation.x, + selectedActionSphere.point.rotation.y, + selectedActionSphere.point.rotation.z, + ] + } + : point + ), + }; + } + return path; + }) as ConveyorEventsSchema[]; setSimulationPaths(updatedPaths); }; return ( - + {simulationPaths.map((path) => { - const points = path.points.map(point => new THREE.Vector3(...point.position)); + if (path.type === 'Conveyor') { + const points = path.points.map(point => new THREE.Vector3(...point.position)); - return ( - (groupRefs.current[path.modeluuid] = el!)} - position={path.pathPosition} - rotation={path.pathRotation} - onClick={(e) => { - if (isConnecting) return; - e.stopPropagation(); - setSelectedPath({ path, group: groupRefs.current[path.modeluuid] }); - setSelectedActionSphere(null); - setTransformMode(null); - setSubModule('mechanics'); - }} - onPointerMissed={() => { - setSelectedPath(null); - setSubModule('properties'); - }} - > - {path.points.map((point, index) => ( + return ( + (groupRefs.current[path.modeluuid] = el!)} + position={path.assetPosition} + rotation={path.assetRotation} + onClick={(e) => { + if (isConnecting) return; + e.stopPropagation(); + setSelectedPath({ path, group: groupRefs.current[path.modeluuid] }); + setSelectedActionSphere(null); + setTransformMode(null); + setSubModule('mechanics'); + }} + onPointerMissed={() => { + setSelectedPath(null); + setSubModule('properties'); + }} + > + {path.points.map((point, index) => ( + (sphereRefs.current[point.uuid] = el!)} + onClick={(e) => { + if (isConnecting) return; + e.stopPropagation(); + setSelectedActionSphere({ + path, + point: sphereRefs.current[point.uuid] + }); + setSubModule('mechanics'); + setSelectedPath(null); + }} + userData={{ point, path }} + onPointerMissed={() => { + setSubModule('properties'); + setSelectedActionSphere(null); + }} + > + + + ))} + + {points.slice(0, -1).map((point, index) => { + const nextPoint = points[index + 1]; + const segmentCurve = new THREE.CatmullRomCurve3([point, nextPoint]); + const tubeGeometry = new THREE.TubeGeometry(segmentCurve, 20, 0.1, 16, false); + + return ( + + + + ); + })} + + ); + } else if (path.type === 'Vehicle') { + return ( + (groupRefs.current[path.modeluuid] = el!)} + position={path.assetPosition} + onClick={(e) => { + if (isConnecting) return; + e.stopPropagation(); + setSelectedPath({ path, group: groupRefs.current[path.modeluuid] }); + setSelectedActionSphere(null); + setTransformMode(null); + setSubModule('mechanics'); + }} + onPointerMissed={() => { + setSelectedPath(null); + setSubModule('properties'); + }} + > (sphereRefs.current[point.uuid] = el!)} + name='events-sphere' + ref={el => (sphereRefs.current[path.point.uuid] = el!)} onClick={(e) => { if (isConnecting) return; e.stopPropagation(); setSelectedActionSphere({ path, - point: sphereRefs.current[point.uuid] + point: sphereRefs.current[path.point.uuid] }); setSubModule('mechanics'); setSelectedPath(null); }} - userData={{ point, path }} + userData={{ point: path.point, path }} onPointerMissed={() => { setSubModule('properties'); - setSelectedActionSphere(null) + setSelectedActionSphere(null); }} > - + - ))} - - {points.slice(0, -1).map((point, index) => { - const nextPoint = points[index + 1]; - const segmentCurve = new THREE.CatmullRomCurve3([point, nextPoint]); - const tubeGeometry = new THREE.TubeGeometry(segmentCurve, 20, 0.1, 16, false); - - return ( - - - - ); - })} - - ); + + ); + } + return null; })} {selectedActionSphere && transformMode && ( @@ -163,7 +220,7 @@ function PathCreation({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObject ref={transformRef} object={selectedActionSphere.point} mode={transformMode} - onObjectChange={updateSimulationPaths} + onMouseUp={updateSimulationPaths} /> )} diff --git a/app/src/modules/simulation/simulation.tsx b/app/src/modules/simulation/simulation.tsx index 659188d..73ef27f 100644 --- a/app/src/modules/simulation/simulation.tsx +++ b/app/src/modules/simulation/simulation.tsx @@ -31,7 +31,7 @@ function Simulation() { return ( <> - + {activeModule === 'simulation' && ( <> diff --git a/app/src/modules/simulation/simulationUI.tsx b/app/src/modules/simulation/simulationUI.tsx index 3a84134..0ce9fc2 100644 --- a/app/src/modules/simulation/simulationUI.tsx +++ b/app/src/modules/simulation/simulationUI.tsx @@ -1,409 +1,409 @@ -import { useMemo, useState } from 'react'; -import { useSelectedActionSphere, useToggleView, useSimulationPaths, useSelectedPath, useStartSimulation, useDrawMaterialPath } from '../../store/store'; -import * as THREE from 'three'; -import useModuleStore from '../../store/useModuleStore'; +// import { useMemo, useState } from 'react'; +// import { useSelectedActionSphere, useToggleView, useSimulationPaths, useSelectedPath, useStartSimulation, useDrawMaterialPath } from '../../store/store'; +// import * as THREE from 'three'; +// import useModuleStore from '../../store/useModuleStore'; -function SimulationUI() { - const { ToggleView } = useToggleView(); - const { activeModule } = useModuleStore(); - const { startSimulation, setStartSimulation } = useStartSimulation(); - const { selectedActionSphere } = useSelectedActionSphere(); - const { selectedPath, setSelectedPath } = useSelectedPath(); - const { simulationPaths, setSimulationPaths } = useSimulationPaths(); - const { drawMaterialPath, setDrawMaterialPath } = useDrawMaterialPath(); - const [activeButton, setActiveButton] = useState(null); +// function SimulationUI() { +// const { ToggleView } = useToggleView(); +// const { activeModule } = useModuleStore(); +// const { startSimulation, setStartSimulation } = useStartSimulation(); +// const { selectedActionSphere } = useSelectedActionSphere(); +// const { selectedPath, setSelectedPath } = useSelectedPath(); +// const { simulationPaths, setSimulationPaths } = useSimulationPaths(); +// const { drawMaterialPath, setDrawMaterialPath } = useDrawMaterialPath(); +// const [activeButton, setActiveButton] = useState(null); - const handleAddAction = () => { - if (!selectedActionSphere) return; +// const handleAddAction = () => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => { - if (point.uuid === selectedActionSphere.point.uuid) { - const actionIndex = point.actions.length; - const newAction = { - uuid: THREE.MathUtils.generateUUID(), - name: `Action ${actionIndex + 1}`, // Assign action name based on index - type: 'Inherit', - material: 'Inherit', - delay: 'Inherit', - spawnInterval: 'Inherit', - isUsed: false - }; +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => { +// if (point.uuid === selectedActionSphere.point.uuid) { +// const actionIndex = point.actions.length; +// const newAction = { +// uuid: THREE.MathUtils.generateUUID(), +// name: `Action ${actionIndex + 1}`, // Assign action name based on index +// type: 'Inherit', +// material: 'Inherit', +// delay: 'Inherit', +// spawnInterval: 'Inherit', +// isUsed: false +// }; - return { ...point, actions: [...point.actions, newAction] }; - } - return point; - }), - })); +// return { ...point, actions: [...point.actions, newAction] }; +// } +// return point; +// }), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleDeleteAction = (uuid: string) => { - if (!selectedActionSphere) return; +// const handleDeleteAction = (uuid: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleActionSelect = (uuid: string, actionType: string) => { - if (!selectedActionSphere) return; +// const handleActionSelect = (uuid: string, actionType: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, type: actionType } : action - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => +// action.uuid === uuid ? { ...action, type: actionType } : action +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleMaterialSelect = (uuid: string, material: string) => { - if (!selectedActionSphere) return; +// const handleMaterialSelect = (uuid: string, material: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, material } : action - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => +// action.uuid === uuid ? { ...action, material } : action +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleDelayChange = (uuid: string, delay: number | string) => { - if (!selectedActionSphere) return; +// const handleDelayChange = (uuid: string, delay: number | string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, delay } : action - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => +// action.uuid === uuid ? { ...action, delay } : action +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { - if (!selectedActionSphere) return; +// const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, spawnInterval } : action - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => +// action.uuid === uuid ? { ...action, spawnInterval } : action +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleSpeedChange = (speed: number) => { - if (!selectedPath) return; +// const handleSpeedChange = (speed: number) => { +// if (!selectedPath) return; - const updatedPaths = simulationPaths.map((path) => - path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path - ); +// const updatedPaths = simulationPaths.map((path) => +// path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path +// ); - setSimulationPaths(updatedPaths); - setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); - }; +// setSimulationPaths(updatedPaths); +// setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); +// }; - const handleAddTrigger = () => { - if (!selectedActionSphere) return; +// const handleAddTrigger = () => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => { - if (point.uuid === selectedActionSphere.point.uuid) { - const triggerIndex = point.triggers.length; - const newTrigger = { - uuid: THREE.MathUtils.generateUUID(), - name: `Trigger ${triggerIndex + 1}`, // Assign name based on index - type: '', - isUsed: false - }; +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => { +// if (point.uuid === selectedActionSphere.point.uuid) { +// const triggerIndex = point.triggers.length; +// const newTrigger = { +// uuid: THREE.MathUtils.generateUUID(), +// name: `Trigger ${triggerIndex + 1}`, // Assign name based on index +// type: '', +// isUsed: false +// }; - return { ...point, triggers: [...point.triggers, newTrigger] }; - } - return point; - }), - })); +// return { ...point, triggers: [...point.triggers, newTrigger] }; +// } +// return point; +// }), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleDeleteTrigger = (uuid: string) => { - if (!selectedActionSphere) return; +// const handleDeleteTrigger = (uuid: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleTriggerSelect = (uuid: string, triggerType: string) => { - if (!selectedActionSphere) return; +// const handleTriggerSelect = (uuid: string, triggerType: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - triggers: point.triggers.map((trigger) => - trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// triggers: point.triggers.map((trigger) => +// trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleResetPath = () => { - if (!selectedPath) return; +// const handleResetPath = () => { +// if (!selectedPath) return; - }; +// }; - const handleActionToggle = (uuid: string) => { - if (!selectedActionSphere) return; +// const handleActionToggle = (uuid: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => ({ - ...action, - isUsed: action.uuid === uuid ? !action.isUsed : false, - })), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => ({ +// ...action, +// isUsed: action.uuid === uuid ? !action.isUsed : false, +// })), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleTriggerToggle = (uuid: string) => { - if (!selectedActionSphere) return; +// const handleTriggerToggle = (uuid: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - triggers: point.triggers.map((trigger) => ({ - ...trigger, - isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, - })), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// triggers: point.triggers.map((trigger) => ({ +// ...trigger, +// isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, +// })), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const selectedPoint = useMemo(() => { - if (!selectedActionSphere) return null; - return simulationPaths.flatMap((path) => path.points).find((point) => point.uuid === selectedActionSphere.point.uuid); - }, [selectedActionSphere, simulationPaths]); +// const selectedPoint = useMemo(() => { +// if (!selectedActionSphere) return null; +// return simulationPaths.flatMap((path) => path.points).find((point) => point.uuid === selectedActionSphere.point.uuid); +// }, [selectedActionSphere, simulationPaths]); - const createPath = () => { - setActiveButton(activeButton !== 'addMaterialPath' ? 'addMaterialPath' : null); - setDrawMaterialPath(!drawMaterialPath); - } +// const createPath = () => { +// setActiveButton(activeButton !== 'addMaterialPath' ? 'addMaterialPath' : null); +// setDrawMaterialPath(!drawMaterialPath); +// } - return ( - <> - {activeModule === "simulation" && ( -
- {!ToggleView && ( - <> - +// return ( +// <> +// {activeModule === "simulation" && ( +//
+// {!ToggleView && ( +// <> +// -
- {!ToggleView && } -
+//
+// {!ToggleView && } +//
- {selectedPath && ( -
- - handleSpeedChange(parseFloat(e.target.value))} - /> -
- )} +// {selectedPath && ( +//
+// +// handleSpeedChange(parseFloat(e.target.value))} +// /> +//
+// )} - {selectedActionSphere && ( -
- - +// {selectedActionSphere && ( +//
+// +// - {selectedPoint?.actions.map((action) => ( -
- - - +// {selectedPoint?.actions.map((action) => ( +//
+// +// +// - {(action.type === 'Spawn' || action.type === 'Swap') && ( -
- -
- )} +// {(action.type === 'Spawn' || action.type === 'Swap') && ( +//
+// +//
+// )} - {action.type === 'Delay' && ( -
- - handleDelayChange(action.uuid, parseInt(e.target.value) || 'Inherit')} - /> +// {action.type === 'Delay' && ( +//
+// +// handleDelayChange(action.uuid, parseInt(e.target.value) || 'Inherit')} +// /> -
- )} +//
+// )} - {action.type === 'Spawn' && ( -
- - handleSpawnIntervalChange(action.uuid, parseInt(e.target.value) || 'Inherit')} - /> +// {action.type === 'Spawn' && ( +//
+// +// handleSpawnIntervalChange(action.uuid, parseInt(e.target.value) || 'Inherit')} +// /> -
- )} -
-
- ))} +//
+// )} +//
+//
+// ))} -
+//
- {selectedPoint?.triggers.map((trigger) => ( -
- - - -
-
- ))} +// {selectedPoint?.triggers.map((trigger) => ( +//
+// +// +// +//
+//
+// ))} -
- )} +//
+// )} - {selectedPath && ( -
- -
- )} - - )} -
- )} - - ); -} +// {selectedPath && ( +//
+// +//
+// )} +// +// )} +//
+// )} +// +// ); +// } -export default SimulationUI; \ No newline at end of file +// export default SimulationUI; \ No newline at end of file diff --git a/app/src/pages/Project.tsx b/app/src/pages/Project.tsx index 1046ea2..a7800e1 100644 --- a/app/src/pages/Project.tsx +++ b/app/src/pages/Project.tsx @@ -64,7 +64,6 @@ const Project: React.FC = () => { {activeModule === "market" && } {activeModule !== "market" && } - {/* */} {isPlaying && activeModule === "simulation" && }
); diff --git a/app/src/services/factoryBuilder/mqtt/mqttEvents.ts b/app/src/services/factoryBuilder/mqtt/mqttEvents.ts index cd79484..41175ca 100644 --- a/app/src/services/factoryBuilder/mqtt/mqttEvents.ts +++ b/app/src/services/factoryBuilder/mqtt/mqttEvents.ts @@ -6,10 +6,7 @@ const MqttEvents = () => { const { setTouch, setTemperature, setHumidity } = useDrieUIValue(); useEffect(() => { - const client = mqtt.connect("ws://192.168.0.192:1884", { - username: "gabby", - password: "gabby" - }); + const client = mqtt.connect(`ws://${process.env.REACT_APP_SERVER_MQTT_URL}`); client.subscribe("touch"); client.subscribe("temperature"); diff --git a/app/src/services/marketplace/fetchAssetDetails.ts b/app/src/services/marketplace/fetchAssetDetails.ts new file mode 100644 index 0000000..b14fd3f --- /dev/null +++ b/app/src/services/marketplace/fetchAssetDetails.ts @@ -0,0 +1,22 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const getAssetDetails = async (filename: string) => { + try { + const response = await fetch(`${BackEnd_url}/api/v1/assetDetails`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ filename }), + }); + + if (!response.ok) { + throw new Error("Failed to fetch asset details"); + } + + const result = await response.json(); + return result; + } catch (error: any) { + // console.error("Error fetching category:", error.message); + throw new Error(error.message); + } +}; diff --git a/app/src/services/marketplace/fetchAssets.ts b/app/src/services/marketplace/fetchAssets.ts new file mode 100644 index 0000000..e434a2b --- /dev/null +++ b/app/src/services/marketplace/fetchAssets.ts @@ -0,0 +1,16 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const fetchAssets = async () => { + try { + const response = await fetch(`${BackEnd_url}/api/v1/getAllAssets`); + if (!response.ok) { + throw new Error("Network response was not ok"); + } + const result = await response.json(); + const last10Assets = result.slice(-10); + console.log('last10Assets: ', last10Assets); + return result; + } catch (error) { + console.log("error: ", error); + // throw new Error(error.message); + } +}; diff --git a/app/src/services/marketplace/fetchGltfUrl.ts b/app/src/services/marketplace/fetchGltfUrl.ts new file mode 100644 index 0000000..3916c9e --- /dev/null +++ b/app/src/services/marketplace/fetchGltfUrl.ts @@ -0,0 +1,7 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const fetchGltfUrl = (filename: string) => { + if (filename) { + return `${BackEnd_url}/api/v1/getAssetFile/${filename}`; + } + return null; // or handle the case when filename is not provided +}; diff --git a/app/src/services/marketplace/getAssetDownload.ts b/app/src/services/marketplace/getAssetDownload.ts new file mode 100644 index 0000000..dea6d14 --- /dev/null +++ b/app/src/services/marketplace/getAssetDownload.ts @@ -0,0 +1,4 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const getAssetDownload = (filename: any) => { + return `${BackEnd_url}/api/v1/getAssetFile/${filename}.gltf`; +}; diff --git a/app/src/services/marketplace/getSortedAssets.ts b/app/src/services/marketplace/getSortedAssets.ts new file mode 100644 index 0000000..3bbbfbe --- /dev/null +++ b/app/src/services/marketplace/getSortedAssets.ts @@ -0,0 +1,25 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const getSortedAssets = async (category: any, orders: any) => { + try { + const response = await fetch( + `${BackEnd_url}/api/v1/categoryWise/${category}?sortBy=${orders}`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + } + ); + + if (!response.ok) { + throw new Error(`Error: ${response.statusText}`); + } + + const result = await response.json(); + + return result; // Return the result to be used later + } catch (error: any) { + console.error("Error fetching category:", error.message); + throw new Error(error.message); + } +}; diff --git a/app/src/store/store.ts b/app/src/store/store.ts index 9960f90..8bbcba1 100644 --- a/app/src/store/store.ts +++ b/app/src/store/store.ts @@ -2,7 +2,6 @@ import * as THREE from "three"; import * as Types from "../types/world/worldTypes"; import { create } from "zustand"; import { io } from "socket.io-client"; -import { ComponentType, SVGProps } from "react"; export const useSocketStore = create((set: any, get: any) => ({ socket: null, @@ -30,10 +29,7 @@ export const useSocketStore = create((set: any, get: any) => ({ }, })); -export const useLoadingProgress = create<{ - loadingProgress: number; - setLoadingProgress: (x: number) => void; -}>((set) => ({ +export const useLoadingProgress = create<{ loadingProgress: number; setLoadingProgress: (x: number) => void }>((set) => ({ loadingProgress: 1, setLoadingProgress: (x: number) => set({ loadingProgress: x }), })); @@ -314,45 +310,14 @@ export const useSelectedPath = create((set: any) => ({ setSelectedPath: (x: any) => set({ selectedPath: x }), })); -interface Path { - modeluuid: string; - modelName: string; - points: { - uuid: string; - position: [number, number, number]; - rotation: [number, number, number]; - actions: - | { - uuid: string; - name: string; - type: string; - material: string; - delay: number | string; - spawnInterval: number | string; - isUsed: boolean; - }[] - | []; - triggers: - | { uuid: string; name: string; type: string; isUsed: boolean }[] - | []; - connections: { - source: { pathUUID: string; pointUUID: string }; - targets: { pathUUID: string; pointUUID: string }[]; - }; - }[]; - pathPosition: [number, number, number]; - pathRotation: [number, number, number]; - speed: number; -} - interface SimulationPathsStore { - simulationPaths: Path[]; - setSimulationPaths: (paths: Path[]) => void; + simulationPaths: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[]; + setSimulationPaths: (paths: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[]) => void; } export const useSimulationPaths = create((set) => ({ simulationPaths: [], - setSimulationPaths: (paths: Path[]) => set({ simulationPaths: paths }), + setSimulationPaths: (paths) => set({ simulationPaths: paths }), })); export const useIsConnecting = create((set: any) => ({ diff --git a/app/src/styles/components/marketPlace/marketPlace.scss b/app/src/styles/components/marketPlace/marketPlace.scss index cac366e..71f5897 100644 --- a/app/src/styles/components/marketPlace/marketPlace.scss +++ b/app/src/styles/components/marketPlace/marketPlace.scss @@ -8,6 +8,7 @@ background-color: var(--background-color-secondary); position: absolute; left: 0; + top: 0; padding: 100px 50px; padding-bottom: 32px; backdrop-filter: blur(6px); @@ -89,6 +90,7 @@ color: var(--text-color); font-weight: $medium-weight; font-size: $xlarge; + margin-bottom: 12px; } .cards-wrapper-container { @@ -122,7 +124,15 @@ .image-container { width: 100%; display: flex; + max-height: 180px; justify-content: center; + border-radius: #{$border-radius-medium}; + overflow: hidden; + img{ + height: inherit; + width: 100%; + object-fit: cover; + } } .assets-container { @@ -133,6 +143,9 @@ display: flex; flex-direction: column; gap: 3px; + .assets-name{ + text-transform: capitalize; + } .asstes-container { font-weight: #{$bold-weight}; @@ -200,7 +213,7 @@ background-color: var(--background-color); display: flex; gap: 12px; - z-index: 100; + overflow: hidden; border-radius: 20px; } diff --git a/app/src/types/world/worldTypes.d.ts b/app/src/types/world/worldTypes.d.ts index c1e7128..2fcbd4f 100644 --- a/app/src/types/world/worldTypes.d.ts +++ b/app/src/types/world/worldTypes.d.ts @@ -284,4 +284,36 @@ interface ConnectionStore { setConnections: (connections: PathConnection[]) => void; addConnection: (newConnection: PathConnection) => void; removeConnection: (fromUUID: string, toUUID: string) => void; +} + +interface ConveyorEventsSchema { + modeluuid: string; + modelName: string; + type: 'Conveyor'; + points: { + uuid: string; + position: [number, number, number]; + rotation: [number, number, number]; + actions: { uuid: string; name: string; type: string; material: string; delay: number | string; spawnInterval: number | string; isUsed: boolean }[] | []; + triggers: { uuid: string; name: string; type: string; isUsed: boolean }[] | []; + connections: { source: { pathUUID: string; pointUUID: string }; targets: { pathUUID: string; pointUUID: string }[] }; + }[]; + assetPosition: [number, number, number]; + assetRotation: [number, number, number]; + speed: number; +} + +interface VehicleEventsSchema { + modeluuid: string; + modelName: string; + type: 'Vehicle'; + point: { + uuid: string; + position: [number, number, number]; + actions: { uuid: string; name: string; type: string; start: string, hitCount: number, end: string, buffer: number; isUsed: boolean }[] | []; + triggers: { uuid: string; name: string; type: string; isUsed: boolean }[] | []; + connections: { source: { pathUUID: string; pointUUID: string }; targets: { pathUUID: string; pointUUID: string }[] }; + }; + assetPosition: [number, number, number]; + speed: number; } \ No newline at end of file