diff --git a/app/.env b/app/.env index db5ccb6..153338d 100644 --- a/app/.env +++ b/app/.env @@ -9,3 +9,9 @@ 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 IoT socket server +REACT_APP_IOT_SOCKET_SERVER_URL =185.100.212.76:5010 + +# 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 c8210e0..d3aa21e 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -14,6 +14,7 @@ "@react-three/drei": "^9.113.0", "@react-three/fiber": "^8.17.7", "@react-three/postprocessing": "^2.16.3", + "@recast-navigation/core": "^0.39.0", "@recast-navigation/three": "^0.39.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", @@ -3760,6 +3761,7 @@ "version": "0.39.0", "resolved": "https://registry.npmjs.org/@recast-navigation/core/-/core-0.39.0.tgz", "integrity": "sha512-l48GHrimIUR+9ugAsjIecdUh5ohHULrFYUn5EqClafV5HJB/cPFBbN4n9HV2jDamCjGRGEhtSpId7NpkhoF0qQ==", + "license": "MIT", "dependencies": { "@recast-navigation/wasm": "0.39.0" } @@ -3768,6 +3770,7 @@ "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==", + "license": "MIT", "dependencies": { "@recast-navigation/core": "0.39.0", "@recast-navigation/wasm": "0.39.0" @@ -3777,6 +3780,7 @@ "version": "0.39.0", "resolved": "https://registry.npmjs.org/@recast-navigation/three/-/three-0.39.0.tgz", "integrity": "sha512-zk2EnZSoMY1P2uYexGFnfoOG92kUD94B1R+7pz4MMOjcryqCKzGhTSalThyY8SbNi9r4MrKe7Xd50W4vS/1k8A==", + "license": "MIT", "dependencies": { "@recast-navigation/core": "0.39.0", "@recast-navigation/generators": "0.39.0" @@ -3789,7 +3793,8 @@ "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==" + "integrity": "sha512-1P/8pqXtwJSVseLBtO0AOdqQe1XnhPFTVvG9FMORFVFunYqkKXxULgni8x3fsutkQisyY+X7YQoIMLvZR4lKFA==", + "license": "MIT" }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", @@ -4128,6 +4133,25 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@testing-library/dom": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@testing-library/jest-dom": { "version": "5.17.0", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz", @@ -4263,6 +4287,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/along/-/along-7.2.0.tgz", "integrity": "sha512-Cf+d2LozABdb0TJoIcJwFKB+qisJY4nMUW9z6PAuZ9UCH7AR//hy2Z06vwYCKFZKP4a7DRPkOMBadQABCyoYuw==", + "license": "MIT", "dependencies": { "@turf/bearing": "^7.2.0", "@turf/destination": "^7.2.0", @@ -4280,6 +4305,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/angle/-/angle-7.2.0.tgz", "integrity": "sha512-b28rs1NO8Dt/MXadFhnpqH7GnEWRsl+xF5JeFtg9+eM/+l/zGrdliPYMZtAj12xn33w22J1X4TRprAI0rruvVQ==", + "license": "MIT", "dependencies": { "@turf/bearing": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4296,6 +4322,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/area/-/area-7.2.0.tgz", "integrity": "sha512-zuTTdQ4eoTI9nSSjerIy4QwgvxqwJVciQJ8tOPuMHbXJ9N/dNjI7bU8tasjhxas/Cx3NE9NxVHtNpYHL0FSzoA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4310,6 +4337,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-7.2.0.tgz", "integrity": "sha512-wzHEjCXlYZiDludDbXkpBSmv8Zu6tPGLmJ1sXQ6qDwpLE1Ew3mcWqt8AaxfTP5QwDNQa3sf2vvgTEzNbPQkCiA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4324,6 +4352,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4338,6 +4367,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -4351,6 +4381,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-7.2.0.tgz", "integrity": "sha512-Jm0Xt3GgHjRrWvBtAGvgfnADLm+4exud2pRlmCYx8zfiKuNXQFkrcTZcOiJOgTfG20Agq28iSh15uta47jSIbg==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4365,6 +4396,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/bezier-spline/-/bezier-spline-7.2.0.tgz", "integrity": "sha512-7BPkc3ufYB9KLvcaTpTsnpXzh9DZoENxCS0Ms9XUwuRXw45TpevwUpOsa3atO76iKQ5puHntqFO4zs8IUxBaaA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4379,6 +4411,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-7.2.0.tgz", "integrity": "sha512-0fJeFSARxy6ealGBM4Gmgpa1o8msQF87p2Dx5V6uSqzT8VPDegX1NSWl4b7QgXczYa9qv7IAABttdWP0K7Q7eQ==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4393,6 +4426,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4407,6 +4441,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-7.2.0.tgz", "integrity": "sha512-dgRQm4uVO5XuLee4PLVH7CFQZKdefUBMIXTPITm2oRIDmPLJKHDOFKQTNkGJ73mDKKBR2lmt6eVH3br6OYrEYg==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/boolean-point-in-polygon": "^7.2.0", @@ -4424,6 +4459,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-crosses/-/boolean-crosses-7.2.0.tgz", "integrity": "sha512-9GyM4UUWFKQOoNhHVSfJBf5XbPy8Fxfz9djjJNAnm/IOl8NmFUSwFPAjKlpiMcr6yuaAoc9R/1KokS9/eLqPvA==", + "license": "MIT", "dependencies": { "@turf/boolean-point-in-polygon": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4441,6 +4477,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/boolean-point-in-polygon": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4458,6 +4495,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-equal/-/boolean-equal-7.2.0.tgz", "integrity": "sha512-TmjKYLsxXqEmdDtFq3QgX4aSogiISp3/doeEtDOs3NNSR8susOtBEZkmvwO6DLW+g/rgoQJIBR6iVoWiRqkBxw==", + "license": "MIT", "dependencies": { "@turf/clean-coords": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4474,6 +4512,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-intersects/-/boolean-intersects-7.2.0.tgz", "integrity": "sha512-GLRyLQgK3F14drkK5Qi9Mv7Z9VT1bgQUd9a3DB3DACTZWDSwfh8YZUFn/HBwRkK8dDdgNEXaavggQHcPi1k9ow==", + "license": "MIT", "dependencies": { "@turf/boolean-disjoint": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4489,6 +4528,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4507,6 +4547,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-parallel/-/boolean-parallel-7.2.0.tgz", "integrity": "sha512-iOtuzzff8nmwv05ROkSvyeGLMrfdGkIi+3hyQ+DH4IVyV37vQbqR5oOJ0Nt3Qq1Tjrq9fvF8G3OMdAv3W2kY9w==", + "license": "MIT", "dependencies": { "@turf/clean-coords": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4523,6 +4564,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4538,6 +4580,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4552,6 +4595,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-touches/-/boolean-touches-7.2.0.tgz", "integrity": "sha512-8qb1CO+cwFATGRGFgTRjzL9aibfsbI91pdiRl7KIEkVdeN/H9k8FDrUA1neY7Yq48IaciuwqjbbojQ16FD9b0w==", + "license": "MIT", "dependencies": { "@turf/boolean-point-in-polygon": "^7.2.0", "@turf/boolean-point-on-line": "^7.2.0", @@ -4568,6 +4612,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-valid/-/boolean-valid-7.2.0.tgz", "integrity": "sha512-xb7gdHN8VV6ivPJh6rPpgxmAEGReiRxqY+QZoEZVGpW2dXcmU1BdY6FA6G/cwvggXAXxJBREoANtEDgp/0ySbA==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/boolean-crosses": "^7.2.0", @@ -4590,6 +4635,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/boolean-within/-/boolean-within-7.2.0.tgz", "integrity": "sha512-zB3AiF59zQZ27Dp1iyhp9mVAKOFHat8RDH45TZhLY8EaqdEPdmLGvwMFCKfLryQcUDQvmzP8xWbtUR82QM5C4g==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/boolean-point-in-polygon": "^7.2.0", @@ -4607,6 +4653,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/buffer/-/buffer-7.2.0.tgz", "integrity": "sha512-QH1FTr5Mk4z1kpQNztMD8XBOZfpOXPOtlsxaSAj2kDIf5+LquA6HtJjZrjUngnGtzG5+XwcfyRL4ImvLnFjm5Q==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/center": "^7.2.0", @@ -4625,6 +4672,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/center/-/center-7.2.0.tgz", "integrity": "sha512-UTNp9abQ2kuyRg5gCIGDNwwEQeF3NbpYsd1Q0KW9lwWuzbLVNn0sOwbxjpNF4J2HtMOs5YVOcqNvYyuoa2XrXw==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4639,6 +4687,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/center-mean/-/center-mean-7.2.0.tgz", "integrity": "sha512-NaW6IowAooTJ35O198Jw3U4diZ6UZCCeJY+4E+WMLpks3FCxMDSHEfO2QjyOXQMGWZnVxVelqI5x9DdniDbQ+A==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4654,6 +4703,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/center-median/-/center-median-7.2.0.tgz", "integrity": "sha512-/CgVyHNG4zAoZpvkl7qBCe4w7giWNVtLyTU5PoIfg1vWM4VpYw+N7kcBBH46bbzvVBn0vhmZr586r543EwdC/A==", + "license": "MIT", "dependencies": { "@turf/center-mean": "^7.2.0", "@turf/centroid": "^7.2.0", @@ -4671,6 +4721,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/center-of-mass/-/center-of-mass-7.2.0.tgz", "integrity": "sha512-ij3pmG61WQPHGTQvOziPOdIgwTMegkYTwIc71Gl7xn4C0vWH6KLDSshCphds9xdWSXt2GbHpUs3tr4XGntHkEQ==", + "license": "MIT", "dependencies": { "@turf/centroid": "^7.2.0", "@turf/convex": "^7.2.0", @@ -4688,6 +4739,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-7.2.0.tgz", "integrity": "sha512-yJqDSw25T7P48au5KjvYqbDVZ7qVnipziVfZ9aSo7P2/jTE7d4BP21w0/XLi3T/9bry/t9PR1GDDDQljN4KfDw==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4702,6 +4754,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-7.2.0.tgz", "integrity": "sha512-1AbqBYtXhstrHmnW6jhLwsv7TtmT0mW58Hvl1uZXEDM1NCVXIR50yDipIeQPjrCuJ/Zdg/91gU8+4GuDCAxBGA==", + "license": "MIT", "dependencies": { "@turf/destination": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4716,6 +4769,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4730,6 +4784,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-7.2.0.tgz", "integrity": "sha512-JlGUT+/5qoU5jqZmf6NMFIoLDY3O7jKd53Up+zbpJ2vzUp6QdwdNzwrsCeONhynWM13F0MVtPXH4AtdkrgFk4g==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -4743,6 +4798,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/clusters/-/clusters-7.2.0.tgz", "integrity": "sha512-sKOrIKHHtXAuTKNm2USnEct+6/MrgyzMW42deZ2YG2RRKWGaaxHMFU2Yw71Yk4DqStOqTIBQpIOdrRuSOwbuQw==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4757,6 +4813,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/distance": "^7.2.0", @@ -4774,6 +4831,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4791,6 +4849,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/collect/-/collect-7.2.0.tgz", "integrity": "sha512-zRVGDlYS8Bx/Zz4vnEUyRg4dmqHhkDbW/nIUIJh657YqaMj1SFi4Iv2i9NbcurlUBDJFkpuOhCvvEvAdskJ8UA==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/boolean-point-in-polygon": "^7.2.0", @@ -4807,6 +4866,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/combine/-/combine-7.2.0.tgz", "integrity": "sha512-VEjm3IvnbMt3IgeRIhCDhhQDbLqCU1/5uN1+j1u6fyA095pCizPThGp4f/COSzC3t1s/iiV+fHuDsB6DihHffQ==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4821,6 +4881,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/concave/-/concave-7.2.0.tgz", "integrity": "sha512-cpaDDlumK762kdadexw5ZAB6g/h2pJdihZ+e65lbQVe3WukJHAANnIEeKsdFCuIyNKrwTz2gWu5ws+OpjP48Yw==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/distance": "^7.2.0", @@ -4841,6 +4902,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/convex/-/convex-7.2.0.tgz", "integrity": "sha512-HsgHm+zHRE8yPCE/jBUtWFyaaBmpXcSlyHd5/xsMhSZRImFzRzBibaONWQo7xbKZMISC3Nc6BtUjDi/jEVbqyA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4856,6 +4918,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-7.2.0.tgz", "integrity": "sha512-8DUxtOO0Fvrh1xclIUj3d9C5WS20D21F5E+j+X9Q+ju6fcM4huOqTg5ckV1DN2Pg8caABEc5HEZJnGch/5YnYQ==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4870,6 +4933,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-7.2.0.tgz", "integrity": "sha512-NHKD1v3s8RX+9lOpvHJg6xRuJOKiY3qxHhz5/FmE0VgGqnCkE7OObqWZ5SsXG+Ckh0aafs5qKhmDdDV/gGi6JA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4885,6 +4949,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/dissolve/-/dissolve-7.2.0.tgz", "integrity": "sha512-gPG5TE3mAYuZqBut8tPYCKwi4hhx5Cq0ALoQMB9X0hrVtFIKrihrsj98XQM/5pL/UIpAxQfwisQvy6XaOFaoPA==", + "license": "MIT", "dependencies": { "@turf/flatten": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4902,6 +4967,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-7.2.0.tgz", "integrity": "sha512-HBjjXIgEcD/wJYjv7/6OZj5yoky2oUvTtVeIAqO3lL80XRvoYmVg6vkOIu6NswkerwLDDNT9kl7+BFLJoHbh6Q==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4916,6 +4982,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/distance-weight/-/distance-weight-7.2.0.tgz", "integrity": "sha512-NeoyV0fXDH+7nIoNtLjAoH9XL0AS1pmTIyDxEE6LryoDTsqjnuR0YQxIkLCCWDqECoqaOmmBqpeWONjX5BwWCg==", + "license": "MIT", "dependencies": { "@turf/centroid": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -4932,6 +4999,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/ellipse/-/ellipse-7.2.0.tgz", "integrity": "sha512-/Y75S5hE2+xjnTw4dXpQ5r/Y2HPM4xrwkPRCCQRpuuboKdEvm42azYmh7isPnMnBTVcmGb9UmGKj0HHAbiwt1g==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -4948,6 +5016,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/envelope/-/envelope-7.2.0.tgz", "integrity": "sha512-xOMtDeNKHwUuDfzQeoSNmdabsP0/IgVDeyzitDe/8j9wTeW+MrKzVbGz7627PT3h6gsO+2nUv5asfKtUbmTyHA==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/bbox-polygon": "^7.2.0", @@ -4963,6 +5032,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/explode/-/explode-7.2.0.tgz", "integrity": "sha512-jyMXg93J1OI7/65SsLE1k9dfQD3JbcPNMi4/O3QR2Qb3BAs2039oFaSjtW+YqhMqVC4V3ZeKebMcJ8h9sK1n+A==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4977,6 +5047,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/flatten/-/flatten-7.2.0.tgz", "integrity": "sha512-q38Qsqr4l7mxp780zSdn0gp/WLBX+sa+gV6qIbDQ1HKCrrPK8QQJmNx7gk1xxEXVot6tq/WyAPysCQdX+kLmMA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -4991,6 +5062,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/flip/-/flip-7.2.0.tgz", "integrity": "sha512-X0TQ0U/UYh4tyXdLO5itP1sO2HOvfrZC0fYSWmTfLDM14jEPkEK8PblofznfBygL+pIFtOS2is8FuVcp5XxYpQ==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5006,6 +5078,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/geojson-rbush/-/geojson-rbush-7.2.0.tgz", "integrity": "sha512-ST8fLv+EwxVkDgsmhHggM0sPk2SfOHTZJkdgMXVFT7gB9o4lF8qk4y4lwvCCGIfFQAp2yv/PN5EaGMEKutk6xw==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5021,6 +5094,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-7.2.0.tgz", "integrity": "sha512-n30OiADyOKHhor0aXNgYfXQYXO3UtsOKmhQsY1D89/Oh1nCIXG/1ZPlLL9ZoaRXXBTUBjh99a+K8029NQbGDhw==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5034,6 +5108,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.2.0.tgz", "integrity": "sha512-cXo7bKNZoa7aC7ydLmUR02oB3IgDe7MxiPuRz3cCtYQHn+BJ6h1tihmamYDWWUlPHgSNF0i3ATc4WmDECZafKw==", + "license": "MIT", "dependencies": { "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" @@ -5046,6 +5121,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/hex-grid/-/hex-grid-7.2.0.tgz", "integrity": "sha512-Yo2yUGxrTCQfmcVsSjDt0G3Veg8YD26WRd7etVPD9eirNNgXrIyZkbYA7zVV/qLeRWVmYIKRXg1USWl7ORQOGA==", + "license": "MIT", "dependencies": { "@turf/distance": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5062,6 +5138,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/interpolate/-/interpolate-7.2.0.tgz", "integrity": "sha512-Ifgjm1SEo6XujuSAU6lpRMvoJ1SYTreil1Rf5WsaXj16BQJCedht/4FtWCTNhSWTwEz2motQ1WNrjTCuPG94xA==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/centroid": "^7.2.0", @@ -5084,6 +5161,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/intersect/-/intersect-7.2.0.tgz", "integrity": "sha512-81GMzKS9pKqLPa61qSlFxLFeAC8XbwyCQ9Qv4z6o5skWk1qmMUbEHeMqaGUTEzk+q2XyhZ0sju1FV4iLevQ/aw==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -5099,6 +5177,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-7.2.0.tgz", "integrity": "sha512-kV4u8e7Gkpq+kPbAKNC21CmyrXzlbBgFjO1PhrHPgEdNqXqDawoZ3i6ivE3ULJj2rSesCjduUaC/wyvH/sNr2Q==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -5112,6 +5191,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/isobands/-/isobands-7.2.0.tgz", "integrity": "sha512-lYoHeRieFzpBp29Jh19QcDIb0E+dzo/K5uwZuNga4wxr6heNU0AfkD4ByAHYIXHtvmp4m/JpSKq/2N6h/zvBkg==", + "license": "MIT", "dependencies": { "@turf/area": "^7.2.0", "@turf/bbox": "^7.2.0", @@ -5132,6 +5212,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/isolines/-/isolines-7.2.0.tgz", "integrity": "sha512-4ZXKxvA/JKkxAXixXhN3UVza5FABsdYgOWXyYm3L5ryTPJVOYTVSSd9A+CAVlv9dZc3YdlsqMqLTXNOOre/kwg==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5149,6 +5230,7 @@ "version": "2.7.2", "resolved": "https://registry.npmjs.org/@turf/jsts/-/jsts-2.7.2.tgz", "integrity": "sha512-zAezGlwWHPyU0zxwcX2wQY3RkRpwuoBmhhNE9HY9kWhFDkCxZ3aWK5URKwa/SWKJbj9aztO+8vtdiBA28KVJFg==", + "license": "(EDL-1.0 OR EPL-1.0)", "dependencies": { "jsts": "2.7.1" } @@ -5157,6 +5239,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/kinks/-/kinks-7.2.0.tgz", "integrity": "sha512-BtxDxGewJR0Q5WR9HKBSxZhirFX+GEH1rD7/EvgDsHS8e1Y5/vNQQUmXdURjdPa4StzaUBsWRU5T3A356gLbPA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -5170,6 +5253,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/length/-/length-7.2.0.tgz", "integrity": "sha512-LBmYN+iCgVtWNLsckVnpQIJENqIIPO63mogazMp23lrDGfWXu07zZQ9ZinJVO5xYurXNhc/QI2xxoqt2Xw90Ig==", + "license": "MIT", "dependencies": { "@turf/distance": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5185,6 +5269,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/line-arc/-/line-arc-7.2.0.tgz", "integrity": "sha512-kfWzA5oYrTpslTg5fN50G04zSypiYQzjZv3FLjbZkk6kta5fo4JkERKjTeA8x4XNojb+pfmjMBB0yIh2w2dDRw==", + "license": "MIT", "dependencies": { "@turf/circle": "^7.2.0", "@turf/destination": "^7.2.0", @@ -5200,6 +5285,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/line-chunk/-/line-chunk-7.2.0.tgz", "integrity": "sha512-1ODyL5gETtWSL85MPI0lgp/78vl95M39gpeBxePXyDIqx8geDP9kXfAzctuKdxBoR4JmOVM3NT7Fz7h+IEkC+g==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/length": "^7.2.0", @@ -5215,6 +5301,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-7.2.0.tgz", "integrity": "sha512-GhCJVEkc8EmggNi85EuVLoXF5T5jNVxmhIetwppiVyJzMrwkYAkZSYB3IBFYGUUB9qiNFnTwungVSsBV/S8ZiA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -5229,6 +5316,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/line-offset/-/line-offset-7.2.0.tgz", "integrity": "sha512-1+OkYueDCbnEWzbfBh3taVr+3SyM2bal5jfnSEuDiLA6jnlScgr8tn3INo+zwrUkPFZPPAejL1swVyO5TjUahw==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5243,6 +5331,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/boolean-point-on-line": "^7.2.0", "@turf/geojson-rbush": "^7.2.0", @@ -5263,6 +5352,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-7.2.0.tgz", "integrity": "sha512-E162rmTF9XjVN4rINJCd15AdQGCBlNqeWN3V0YI1vOUpZFNT2ii4SqEMCcH2d+5EheHLL8BWVwZoOsvHZbvaWA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5278,6 +5368,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/line-slice/-/line-slice-7.2.0.tgz", "integrity": "sha512-bHotzZIaU1GPV3RMwttYpDrmcvb3X2i1g/WUttPZWtKrEo2VVAkoYdeZ2aFwtogERYS4quFdJ/TDzAtquBC8WQ==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5292,6 +5383,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/bearing": "^7.2.0", "@turf/destination": "^7.2.0", @@ -5307,6 +5399,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/geojson-rbush": "^7.2.0", @@ -5328,6 +5421,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/clone": "^7.2.0", @@ -5344,6 +5438,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/mask/-/mask-7.2.0.tgz", "integrity": "sha512-ulJ6dQqXC0wrjIoqFViXuMUdIPX5Q6GPViZ3kGfeVijvlLM7kTFBsZiPQwALSr5nTQg4Ppf3FD0Jmg8IErPrgA==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5359,6 +5454,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.2.0.tgz", "integrity": "sha512-igzTdHsQc8TV1RhPuOLVo74Px/hyPrVgVOTgjWQZzt3J9BVseCdpfY/0cJBdlSRI4S/yTmmHl7gAqjhpYH5Yaw==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10" @@ -5371,6 +5467,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/midpoint/-/midpoint-7.2.0.tgz", "integrity": "sha512-AMn5S9aSrbXdE+Q4Rj+T5nLdpfpn+mfzqIaEKkYI021HC0vb22HyhQHsQbSeX+AWcS4CjD1hFsYVcgKI+5qCfw==", + "license": "MIT", "dependencies": { "@turf/bearing": "^7.2.0", "@turf/destination": "^7.2.0", @@ -5387,6 +5484,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/moran-index/-/moran-index-7.2.0.tgz", "integrity": "sha512-Aexh1EmXVPJhApr9grrd120vbalIthcIsQ3OAN2Tqwf+eExHXArJEJqGBo9IZiQbIpFJeftt/OvUvlI8BeO1bA==", + "license": "MIT", "dependencies": { "@turf/distance-weight": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5402,6 +5500,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/area": "^7.2.0", "@turf/bbox": "^7.2.0", @@ -5422,6 +5521,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/distance": "^7.2.0", @@ -5438,6 +5538,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/distance": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5454,6 +5555,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5470,6 +5572,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/planepoint/-/planepoint-7.2.0.tgz", "integrity": "sha512-8Vno01tvi5gThUEKBQ46CmlEKDAwVpkl7stOPFvJYlA1oywjAL4PsmgwjXgleZuFtXQUPBNgv5a42Pf438XP4g==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5484,6 +5587,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/point-grid/-/point-grid-7.2.0.tgz", "integrity": "sha512-ai7lwBV2FREPW3XiUNohT4opC1hd6+F56qZe20xYhCTkTD9diWjXHiNudQPSmVAUjgMzQGasblQQqvOdL+bJ3Q==", + "license": "MIT", "dependencies": { "@turf/boolean-within": "^7.2.0", "@turf/distance": "^7.2.0", @@ -5500,6 +5604,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/boolean-point-in-polygon": "^7.2.0", "@turf/center": "^7.2.0", @@ -5517,6 +5622,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/bearing": "^7.2.0", "@turf/distance": "^7.2.0", @@ -5538,6 +5644,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/boolean-point-in-polygon": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5556,6 +5663,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/boolean-point-in-polygon": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5571,6 +5679,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -5585,6 +5694,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/polygon-tangents/-/polygon-tangents-7.2.0.tgz", "integrity": "sha512-AHUUPmOjiQDrtP/ODXukHBlUG0C/9I1je7zz50OTfl2ZDOdEqFJQC3RyNELwq07grTXZvg5TS5wYx/Y7nsm47g==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/boolean-within": "^7.2.0", @@ -5603,6 +5713,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5617,6 +5728,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/boolean-point-in-polygon": "^7.2.0", "@turf/envelope": "^7.2.0", @@ -5634,6 +5746,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-7.2.0.tgz", "integrity": "sha512-/qke5vJScv8Mu7a+fU3RSChBRijE6EVuFHU3RYihMuYm04Vw8dBMIs0enEpoq0ke/IjSbleIrGQNZIMRX9EwZQ==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5649,6 +5762,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/quadrat-analysis/-/quadrat-analysis-7.2.0.tgz", "integrity": "sha512-fDQh3+ldYNxUqS6QYlvJ7GZLlCeDZR6tD3ikdYtOsSemwW1n/4gm2xcgWJqy3Y0uszBwxc13IGGY7NGEjHA+0w==", + "license": "MIT", "dependencies": { "@turf/area": "^7.2.0", "@turf/bbox": "^7.2.0", @@ -5670,6 +5784,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/random/-/random-7.2.0.tgz", "integrity": "sha512-fNXs5mOeXsrirliw84S8UCNkpm4RMNbefPNsuCTfZEXhcr1MuHMzq4JWKb4FweMdN1Yx2l/xcytkO0s71cJ50w==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -5683,6 +5798,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/rectangle-grid/-/rectangle-grid-7.2.0.tgz", "integrity": "sha512-f0o5ifvy0Ml/nHDJzMNcuSk4h11aa3BfvQNnYQhLpuTQu03j/ICZNlzKTLxwjcUqvxADUifty7Z9CX5W6zky4A==", + "license": "MIT", "dependencies": { "@turf/boolean-intersects": "^7.2.0", "@turf/distance": "^7.2.0", @@ -5698,6 +5814,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-7.2.0.tgz", "integrity": "sha512-SZpRAZiZsE22+HVz6pEID+ST25vOdpAMGk5NO1JeqzhpMALIkIGnkG+xnun2CfYHz7wv8/Z0ADiAvei9rkcQYA==", + "license": "MIT", "dependencies": { "@turf/boolean-clockwise": "^7.2.0", "@turf/clone": "^7.2.0", @@ -5715,6 +5832,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-7.2.0.tgz", "integrity": "sha512-jbdexlrR8X2ZauUciHx3tRwG+BXoMXke4B8p8/IgDlAfIrVdzAxSQN89FMzIKnjJ/kdLjo9bFGvb92bu31Etug==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5729,6 +5847,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/rhumb-destination/-/rhumb-destination-7.2.0.tgz", "integrity": "sha512-U9OLgLAHlH4Wfx3fBZf3jvnkDjdTcfRan5eI7VPV1+fQWkOteATpzkiRjCvSYK575GljVwWBjkKca8LziGWitQ==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5743,6 +5862,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-7.2.0.tgz", "integrity": "sha512-NsijTPON1yOc9tirRPEQQuJ5aQi7pREsqchQquaYKbHNWsexZjcDi4wnw2kM3Si4XjmgynT+2f7aXH7FHarHzw==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/invariant": "^7.2.0", @@ -5757,6 +5877,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/sample/-/sample-7.2.0.tgz", "integrity": "sha512-f+ZbcbQJ9glQ/F26re8LadxO0ORafy298EJZe6XtbctRTJrNus6UNAsl8+GYXFqMnXM22tbTAznnJX3ZiWNorA==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -5770,6 +5891,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/sector/-/sector-7.2.0.tgz", "integrity": "sha512-zL06MjbbMG4DdpiNz+Q9Ax8jsCekt3R76uxeWShulAGkyDB5smdBOUDoRwxn05UX7l4kKv4Ucq2imQXhxKFd1w==", + "license": "MIT", "dependencies": { "@turf/circle": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5787,6 +5909,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/bbox-polygon": "^7.2.0", @@ -5808,6 +5931,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/simplify/-/simplify-7.2.0.tgz", "integrity": "sha512-9YHIfSc8BXQfi5IvEMbCeQYqNch0UawIGwbboJaoV8rodhtk6kKV2wrpXdGqk/6Thg6/RWvChJFKVVTjVrULyQ==", + "license": "MIT", "dependencies": { "@turf/clean-coords": "^7.2.0", "@turf/clone": "^7.2.0", @@ -5824,6 +5948,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/square/-/square-7.2.0.tgz", "integrity": "sha512-9pMoAGFvqzCDOlO9IRSSBCGXKbl8EwMx6xRRBMKdZgpS0mZgfm9xiptMmx/t1m4qqHIlb/N+3MUF7iMBx6upcA==", + "license": "MIT", "dependencies": { "@turf/distance": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5838,6 +5963,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/rectangle-grid": "^7.2.0", @@ -5852,6 +5978,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-7.2.0.tgz", "integrity": "sha512-+uC0pR2nRjm90JvMXe/2xOCZsYV2II1ZZ2zmWcBWv6bcFXBspcxk2QfCC3k0bj6jDapELzoQgnn3cG5lbdQV2w==", + "license": "MIT", "dependencies": { "@turf/center-mean": "^7.2.0", "@turf/ellipse": "^7.2.0", @@ -5870,6 +5997,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/tag/-/tag-7.2.0.tgz", "integrity": "sha512-TAFvsbp5TCBqXue8ui+CtcLsPZ6NPC88L8Ad6Hb/R6VAi21qe0U42WJHQYXzWmtThoTNwxi+oKSeFbRDsr0FIA==", + "license": "MIT", "dependencies": { "@turf/boolean-point-in-polygon": "^7.2.0", "@turf/clone": "^7.2.0", @@ -5886,6 +6014,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/tesselate/-/tesselate-7.2.0.tgz", "integrity": "sha512-zHGcG85aOJJu1seCm+CYTJ3UempX4Xtyt669vFG6Hbr/Hc7ii6STQ2ysFr7lJwFtU9uyYhphVrrgwIqwglvI/Q==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -5900,6 +6029,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/tin/-/tin-7.2.0.tgz", "integrity": "sha512-y24Vt3oeE6ZXvyLJamP0Ke02rPlDGE9gF7OFADnR0mT+2uectb0UTIBC3kKzON80TEAlA3GXpKFkCW5Fo/O/Kg==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", @@ -5913,6 +6043,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/transform-rotate/-/transform-rotate-7.2.0.tgz", "integrity": "sha512-EMCj0Zqy3cF9d3mGRqDlYnX2ZBXe3LgT+piDR0EuF5c5sjuKErcFcaBIsn/lg1gp4xCNZFinkZ3dsFfgGHf6fw==", + "license": "MIT", "dependencies": { "@turf/centroid": "^7.2.0", "@turf/clone": "^7.2.0", @@ -5933,6 +6064,7 @@ "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==", + "license": "MIT", "dependencies": { "@turf/bbox": "^7.2.0", "@turf/center": "^7.2.0", @@ -5955,6 +6087,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/transform-translate/-/transform-translate-7.2.0.tgz", "integrity": "sha512-zAglR8MKCqkzDTjGMIQgbg/f+Q3XcKVzr9cELw5l9CrS1a0VTSDtBZLDm0kWx0ankwtam7ZmI2jXyuQWT8Gbug==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5972,6 +6105,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/triangle-grid/-/triangle-grid-7.2.0.tgz", "integrity": "sha512-4gcAqWKh9hg6PC5nNSb9VWyLgl821cwf9yR9yEzQhEFfwYL/pZONBWCO1cwVF23vSYMSMm+/TwqxH4emxaArfw==", + "license": "MIT", "dependencies": { "@turf/distance": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -5987,6 +6121,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-7.2.0.tgz", "integrity": "sha512-jyFzxYbPugK4XjV5V/k6Xr3taBjjvo210IbPHJXw0Zh7Y6sF+hGxeRVtSuZ9VP/6oRyqAOHKUrze+OOkPqBgUg==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -6001,6 +6136,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/turf/-/turf-7.2.0.tgz", "integrity": "sha512-G1kKBu4hYgoNoRJgnpJohNuS7bLnoWHZ2G/4wUMym5xOSiYah6carzdTEsMoTsauyi7ilByWHx5UHwbjjCVcBw==", + "license": "MIT", "dependencies": { "@turf/along": "^7.2.0", "@turf/angle": "^7.2.0", @@ -6126,6 +6262,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/union/-/union-7.2.0.tgz", "integrity": "sha512-Xex/cfKSmH0RZRWSJl4RLlhSmEALVewywiEXcu0aIxNbuZGTcpNoI0h4oLFrE/fUd0iBGFg/EGLXRL3zTfpg6g==", + "license": "MIT", "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", @@ -6141,6 +6278,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/unkink-polygon/-/unkink-polygon-7.2.0.tgz", "integrity": "sha512-dFPfzlIgkEr15z6oXVxTSWshWi51HeITGVFtl1GAKGMtiXJx1uMqnfRsvljqEjaQu/4AzG1QAp3b+EkSklQSiQ==", + "license": "MIT", "dependencies": { "@turf/area": "^7.2.0", "@turf/boolean-point-in-polygon": "^7.2.0", @@ -6158,6 +6296,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@turf/voronoi/-/voronoi-7.2.0.tgz", "integrity": "sha512-3K6N0LtJsWTXxPb/5N2qD9e8f4q8+tjTbGV3lE3v8x06iCnNlnuJnqM5NZNPpvgvCatecBkhClO3/3RndE61Fw==", + "license": "MIT", "dependencies": { "@turf/clone": "^7.2.0", "@turf/helpers": "^7.2.0", @@ -6261,7 +6400,8 @@ "node_modules/@types/d3-voronoi": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/@types/d3-voronoi/-/d3-voronoi-1.1.12.tgz", - "integrity": "sha512-DauBl25PKZZ0WVJr42a6CNvI6efsdzofl9sajqZr2Gf5Gu733WkDdUGiPkUHXiUvYGzNNlFQde2wdZdfQPG+yw==" + "integrity": "sha512-DauBl25PKZZ0WVJr42a6CNvI6efsdzofl9sajqZr2Gf5Gu733WkDdUGiPkUHXiUvYGzNNlFQde2wdZdfQPG+yw==", + "license": "MIT" }, "node_modules/@types/debounce": { "version": "1.2.4", @@ -6330,9 +6470,9 @@ } }, "node_modules/@types/geojson": { - "version": "7946.0.16", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", - "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==" + "version": "7946.0.14", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", + "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", @@ -7973,6 +8113,7 @@ "version": "9.1.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", "engines": { "node": "*" } @@ -8751,6 +8892,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/concaveman/-/concaveman-1.2.1.tgz", "integrity": "sha512-PwZYKaM/ckQSa8peP5JpVr7IMJ4Nn/MHIaWUjP4be+KoZ7Botgs8seAZGpmaOM+UZXawcdYRao/px9ycrCihHw==", + "license": "ISC", "dependencies": { "point-in-polygon": "^1.1.0", "rbush": "^3.0.1", @@ -9359,12 +9501,14 @@ "node_modules/d3-array": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz", - "integrity": "sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==" + "integrity": "sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==", + "license": "BSD-3-Clause" }, "node_modules/d3-geo": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.7.1.tgz", "integrity": "sha512-O4AempWAr+P5qbk2bC2FuN/sDW4z+dN2wDf9QV3bxQt4M5HfOEeXLgJ/UKQW0+o1Dj8BE+L5kiDbdWUMjsmQpw==", + "license": "BSD-3-Clause", "dependencies": { "d3-array": "1" } @@ -9372,7 +9516,8 @@ "node_modules/d3-voronoi": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.2.tgz", - "integrity": "sha512-RhGS1u2vavcO7ay7ZNAPo4xeDh/VYeGof3x5ZLJBQgYhLegxr3s5IykvWmJ94FTU6mcbtp4sloqZ54mP6R4Utw==" + "integrity": "sha512-RhGS1u2vavcO7ay7ZNAPo4xeDh/VYeGof3x5ZLJBQgYhLegxr3s5IykvWmJ94FTU6mcbtp4sloqZ54mP6R4Utw==", + "license": "BSD-3-Clause" }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -9903,7 +10048,8 @@ "node_modules/earcut": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", - "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==", + "license": "ISC" }, "node_modules/eastasianwidth": { "version": "0.2.0", @@ -11782,6 +11928,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/geojson-equality-ts/-/geojson-equality-ts-1.0.2.tgz", "integrity": "sha512-h3Ryq+0mCSN/7yLs0eDgrZhvc9af23o/QuC4aTiuuzP/MRCtd6mf5rLsLRY44jX0RPUfM8c4GqERQmlUxPGPoQ==", + "license": "MIT", "dependencies": { "@types/geojson": "^7946.0.14" } @@ -11790,6 +11937,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/geojson-polygon-self-intersections/-/geojson-polygon-self-intersections-1.2.1.tgz", "integrity": "sha512-/QM1b5u2d172qQVO//9CGRa49jEmclKEsYOQmWP9ooEjj63tBM51m2805xsbxkzlEELQ2REgTf700gUhhlegxA==", + "license": "MIT", "dependencies": { "rbush": "^2.0.1" } @@ -11797,12 +11945,14 @@ "node_modules/geojson-polygon-self-intersections/node_modules/quickselect": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz", - "integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==" + "integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==", + "license": "ISC" }, "node_modules/geojson-polygon-self-intersections/node_modules/rbush": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz", "integrity": "sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==", + "license": "MIT", "dependencies": { "quickselect": "^1.0.1" } @@ -14653,6 +14803,7 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.7.1.tgz", "integrity": "sha512-x2wSZHEBK20CY+Wy+BPE7MrFQHW6sIsdaGUMEqmGAio+3gFzQaBYPwLRonUfQf9Ak8pBieqj9tUofX1+WtAEIg==", + "license": "(EDL-1.0 OR EPL-1.0)", "engines": { "node": ">= 12" } @@ -15086,7 +15237,8 @@ "node_modules/marchingsquares": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/marchingsquares/-/marchingsquares-1.3.3.tgz", - "integrity": "sha512-gz6nNQoVK7Lkh2pZulrT4qd4347S/toG9RXH2pyzhLgkL5mLkBoqgv4EvAGXcV0ikDW72n/OQb3Xe8bGagQZCg==" + "integrity": "sha512-gz6nNQoVK7Lkh2pZulrT4qd4347S/toG9RXH2pyzhLgkL5mLkBoqgv4EvAGXcV0ikDW72n/OQb3Xe8bGagQZCg==", + "license": "AGPL-3.0" }, "node_modules/mdn-data": { "version": "2.0.4", @@ -16102,12 +16254,14 @@ "node_modules/point-in-polygon": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/point-in-polygon/-/point-in-polygon-1.1.0.tgz", - "integrity": "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw==" + "integrity": "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw==", + "license": "MIT" }, "node_modules/point-in-polygon-hao": { "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==", + "license": "MIT", "dependencies": { "robust-predicates": "^3.0.2" } @@ -16115,12 +16269,14 @@ "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==" + "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==", + "license": "Unlicense" }, "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==", + "license": "MIT", "dependencies": { "bignumber.js": "^9.1.0", "splaytree-ts": "^1.0.2" @@ -17615,7 +17771,8 @@ "node_modules/quickselect": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", - "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" + "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==", + "license": "ISC" }, "node_modules/raf": { "version": "3.4.1", @@ -17670,6 +17827,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", + "license": "MIT", "dependencies": { "quickselect": "^2.0.0" } @@ -18502,7 +18660,8 @@ "node_modules/robust-predicates": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-2.0.4.tgz", - "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==" + "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==", + "license": "Unlicense" }, "node_modules/rollup": { "version": "2.79.2", @@ -19088,7 +19247,8 @@ "node_modules/skmeans": { "version": "0.9.7", "resolved": "https://registry.npmjs.org/skmeans/-/skmeans-0.9.7.tgz", - "integrity": "sha512-hNj1/oZ7ygsfmPZ7ZfN5MUBRoGg1gtpnImuJBgLO0ljQ67DtJuiQaiYdS4lUA6s0KCwnPhGivtC/WRwIZLkHyg==" + "integrity": "sha512-hNj1/oZ7ygsfmPZ7ZfN5MUBRoGg1gtpnImuJBgLO0ljQ67DtJuiQaiYdS4lUA6s0KCwnPhGivtC/WRwIZLkHyg==", + "license": "MIT" }, "node_modules/slash": { "version": "3.0.0", @@ -19251,7 +19411,8 @@ "node_modules/splaytree-ts": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/splaytree-ts/-/splaytree-ts-1.0.2.tgz", - "integrity": "sha512-0kGecIZNIReCSiznK3uheYB8sbstLjCZLiwcQwbmLhgHJj2gz6OnSPkVzJQCMnmEz1BQ4gPK59ylhBoEWOhGNA==" + "integrity": "sha512-0kGecIZNIReCSiznK3uheYB8sbstLjCZLiwcQwbmLhgHJj2gz6OnSPkVzJQCMnmEz1BQ4gPK59ylhBoEWOhGNA==", + "license": "BDS-3-Clause" }, "node_modules/split-string": { "version": "3.1.0", @@ -20032,6 +20193,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/sweepline-intersections/-/sweepline-intersections-1.5.0.tgz", "integrity": "sha512-AoVmx72QHpKtItPu72TzFL+kcYjd67BPLDoR0LarIk+xyaRg+pDTMFXndIEvZf9xEKnJv6JdhgRMnocoG0D3AQ==", + "license": "MIT", "dependencies": { "tinyqueue": "^2.0.0" } @@ -20356,7 +20518,8 @@ "node_modules/tinyqueue": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", - "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==" + "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==", + "license": "ISC" }, "node_modules/tldts": { "version": "6.1.63", @@ -20413,6 +20576,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz", "integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==", + "license": "ISC", "dependencies": { "commander": "2" }, @@ -20425,12 +20589,14 @@ "node_modules/topojson-client/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" }, "node_modules/topojson-server": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/topojson-server/-/topojson-server-3.0.1.tgz", "integrity": "sha512-/VS9j/ffKr2XAOjlZ9CgyyeLmgJ9dMwq6Y0YEON8O7p/tGGk+dCWnrE03zEdu7i4L7YsFZLEPZPzCvcB7lEEXw==", + "license": "ISC", "dependencies": { "commander": "2" }, @@ -20441,7 +20607,8 @@ "node_modules/topojson-server/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" }, "node_modules/tough-cookie": { "version": "5.0.0", diff --git a/app/package.json b/app/package.json index e7ca3e7..541d3a1 100644 --- a/app/package.json +++ b/app/package.json @@ -9,6 +9,7 @@ "@react-three/drei": "^9.113.0", "@react-three/fiber": "^8.17.7", "@react-three/postprocessing": "^2.16.3", + "@recast-navigation/core": "^0.39.0", "@recast-navigation/three": "^0.39.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", diff --git a/app/src/components/layout/3D-cards/CardsScene.tsx b/app/src/components/layout/3D-cards/CardsScene.tsx index 471034c..9318ce3 100644 --- a/app/src/components/layout/3D-cards/CardsScene.tsx +++ b/app/src/components/layout/3D-cards/CardsScene.tsx @@ -11,10 +11,10 @@ const CardsScene = () => { {/* 3d-cards */} - - {/* */} {/* */} + {/* */} {/* */} + {/* */} diff --git a/app/src/components/layout/3D-cards/cards/ProductionCapacity.tsx b/app/src/components/layout/3D-cards/cards/ProductionCapacity.tsx index 7402c8d..4da32bc 100644 --- a/app/src/components/layout/3D-cards/cards/ProductionCapacity.tsx +++ b/app/src/components/layout/3D-cards/cards/ProductionCapacity.tsx @@ -21,8 +21,11 @@ ChartJS.register( Tooltip, Legend ); +interface ProductionCapacityProps { + position: [number, number, number]; +} -const ProductionCapacity = () => { +const ProductionCapacity : React.FC = ({ position }) => { // Chart data for a week const chartData = { labels: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], // Days of the week @@ -76,7 +79,10 @@ const ProductionCapacity = () => { }; return ( - +
Production Capacity
diff --git a/app/src/components/layout/3D-cards/cards/ReturnOfInvestment.tsx b/app/src/components/layout/3D-cards/cards/ReturnOfInvestment.tsx index e4b60b4..8e8c444 100644 --- a/app/src/components/layout/3D-cards/cards/ReturnOfInvestment.tsx +++ b/app/src/components/layout/3D-cards/cards/ReturnOfInvestment.tsx @@ -35,8 +35,10 @@ const SmoothLineGraphComponent: React.FC = ({ }) => { return ; }; - -const ReturnOfInvestment = () => { +interface ReturnOfInvestmentProps { + position: [number, number, number]; +} +const ReturnOfInvestment: React.FC = ({ position }) => { // Improved sample data for the smooth curve graph (single day) const graphData: ChartData<"line"> = { labels: [ @@ -106,7 +108,10 @@ const ReturnOfInvestment = () => { }; return ( - +
Return of Investment
diff --git a/app/src/components/layout/3D-cards/cards/StateWorking.tsx b/app/src/components/layout/3D-cards/cards/StateWorking.tsx index 7e3de43..25ee39b 100644 --- a/app/src/components/layout/3D-cards/cards/StateWorking.tsx +++ b/app/src/components/layout/3D-cards/cards/StateWorking.tsx @@ -1,6 +1,9 @@ import { Html } from "@react-three/drei"; -import image from "../../../../assets/image/temp/image.png"; -const StateWorking = () => { +// import image from "../../../../assets/image/temp/image.png"; +interface StateWorkingProps { + position: [number, number, number]; +} +const StateWorking: React.FC = ({ position }) => { const datas = [ { key: "Oil Tank:", value: "24/341" }, { key: "Oil Refin:", value: 36.023 }, @@ -10,7 +13,10 @@ const StateWorking = () => { { key: "Time:", value: 13 - 9 - 2023 }, ]; return ( - +
@@ -20,7 +26,7 @@ const StateWorking = () => {
- + {/* */}
{/* Data */} diff --git a/app/src/components/layout/3D-cards/cards/Throughput.tsx b/app/src/components/layout/3D-cards/cards/Throughput.tsx index b12fc14..220c2a2 100644 --- a/app/src/components/layout/3D-cards/cards/Throughput.tsx +++ b/app/src/components/layout/3D-cards/cards/Throughput.tsx @@ -37,7 +37,12 @@ const LineGraphComponent: React.FC = ({ data, options }) => { return ; }; -const Throughput = () => { +interface ThroughputProps { + position: [number, number, number]; +} + +const Throughput: React.FC = ({ position }) => { + // Sample data for the line graph const graphData: ChartData<"line"> = { labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun"], @@ -86,7 +91,10 @@ const Throughput = () => { }; return ( - +
Throughput
diff --git a/app/src/components/layout/sidebarLeft/visualization/widgets/Widgets2D.tsx b/app/src/components/layout/sidebarLeft/visualization/widgets/Widgets2D.tsx index 5833986..4c90582 100644 --- a/app/src/components/layout/sidebarLeft/visualization/widgets/Widgets2D.tsx +++ b/app/src/components/layout/sidebarLeft/visualization/widgets/Widgets2D.tsx @@ -3,6 +3,7 @@ import { useWidgetStore } from "../../../../../store/useWidgetStore"; import { ChartType } from "chart.js/auto"; import ChartComponent from "./ChartComponent"; import { StockIncreseIcon } from "../../../../icons/RealTimeVisulationIcons"; +import { generateUniqueId } from "../../../../../functions/generateUniqueId"; const chartTypes: ChartType[] = [ "bar", @@ -18,7 +19,7 @@ const sampleData = { { data: [65, 59, 80, 81, 56, 55, 40], backgroundColor: "#6f42c1", - borderColor: "#ffffff", + borderColor: "#b392f0", borderWidth: 1, }, ], @@ -40,7 +41,8 @@ const ChartWidget: React.FC = ({ type, index, title }) => { onDragStart={() => { setDraggedAsset({ type, - id: `widget-${index + 1}`, + id: generateUniqueId( + ), title, panel: "top", data: sampleData, diff --git a/app/src/components/layout/sidebarLeft/visualization/widgets/Widgets3D.tsx b/app/src/components/layout/sidebarLeft/visualization/widgets/Widgets3D.tsx index 2862cef..849c051 100644 --- a/app/src/components/layout/sidebarLeft/visualization/widgets/Widgets3D.tsx +++ b/app/src/components/layout/sidebarLeft/visualization/widgets/Widgets3D.tsx @@ -2,6 +2,7 @@ import widget1 from "../../../../../assets/image/3D/ProductionCapacity.png"; import widget2 from "../../../../../assets/image/3D/ReturnOfInvestment.png"; import widget3 from "../../../../../assets/image/3D/StateWorking.png"; import widget4 from "../../../../../assets/image/3D/Throughput.png"; +import { useAsset3dWidget } from "../../../../../store/store"; const Widgets3D = () => { const widgets = [ { name: "Widget 1", img: widget1 }, @@ -9,17 +10,38 @@ const Widgets3D = () => { { name: "Widget 3", img: widget3 }, { name: "Widget 4", img: widget4 }, ]; + const { widgetSelect, setWidgetSelect } = useAsset3dWidget(); + return (
{widgets?.map((widget, index) => ( -
-
{widget.name}
+
{ + let crt = e.target + if (crt instanceof HTMLElement) { + const widget = crt.cloneNode(true) as HTMLElement; + console.log('widget: ', widget); + e.dataTransfer.setDragImage(widget,0,0) + e.dataTransfer.effectAllowed="move" + } + }} + onPointerDown={() => { + setWidgetSelect("ui-" + widget.name); + }} + onPointerUp={() => { + setWidgetSelect(""); // Clearing selection correctly + }} + > + {/*
{widget.name}
*/} {widget.name}
))} 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/layout/sidebarRight/visualization/IotInputCards/LineGrapInput.tsx b/app/src/components/layout/sidebarRight/visualization/IotInputCards/LineGrapInput.tsx index 17cbc3e..4d406d9 100644 --- a/app/src/components/layout/sidebarRight/visualization/IotInputCards/LineGrapInput.tsx +++ b/app/src/components/layout/sidebarRight/visualization/IotInputCards/LineGrapInput.tsx @@ -1,115 +1,215 @@ -import React, { useEffect, useState } from 'react' -import MultiLevelDropdown from '../../../../ui/inputs/MultiLevelDropDown' -import { AddIcon } from '../../../../icons/ExportCommonIcons' -import RegularDropDown from '../../../../ui/inputs/RegularDropDown' -import useChartStore from '../../../../../store/useChartStore' -import axios from 'axios' +// import React, { useEffect, useState } from 'react' +// import MultiLevelDropdown from '../../../../ui/inputs/MultiLevelDropDown' +// import { AddIcon } from '../../../../icons/ExportCommonIcons' +// import RegularDropDown from '../../../../ui/inputs/RegularDropDown' +// import useChartStore from '../../../../../store/useChartStore' +// import axios from 'axios' -type Props = {} +// type Props = {} -const LineGrapInput = (props: Props) => { - const [dropDowndata, setDropDownData] = useState({}) - const [selections, setSelections] = useState>({}) - const [selectedOption, setSelectedOption] = useState('1h') - const { measurements, setMeasurements, updateDuration, duration } = useChartStore(); +// const LineGrapInput = (props: Props) => { +// const [dropDowndata, setDropDownData] = useState({}) +// const [selections, setSelections] = useState>({}) +// const [selectedOption, setSelectedOption] = useState('1h') +// const { measurements, setMeasurements, updateDuration, duration } = useChartStore(); +// const iotApiUrl = process.env.REACT_APP_IOT_SOCKET_SERVER_URL; - const handleSelectDuration = (option: string) => { - updateDuration(option); // Normalize for key matching - }; +// const handleSelectDuration = (option: string) => { +// updateDuration(option); // Normalize for key matching +// }; - useEffect(() => { - const fetchZoneData = async () => { - try { - const response = await axios.get('http://192.168.0.192:5010/getinput'); - if (response.status === 200) { - console.log('dropdown data:', response.data); - setDropDownData(response.data) - } else { - console.log('Unexpected response:', response); - } - } catch (error) { - console.error('There was an error!', error); - } - }; - fetchZoneData(); - }, []); +// useEffect(() => { +// const fetchZoneData = async () => { +// try { +// const response = await axios.get(`http://${iotApiUrl}/getinput`); +// if (response.status === 200) { +// console.log('dropdown data:', response.data); +// setDropDownData(response.data) +// } else { +// console.log('Unexpected response:', response); +// } +// } catch (error) { +// console.error('There was an error!', error); +// } +// }; +// fetchZoneData(); +// }, []); - useEffect(() => { - console.log(selections); - }, [selections]) +// useEffect(() => { +// console.log(selections); +// }, [selections]) - const handleSelect = (inputKey: string, selectedData: { name: string, fields: string } | null) => { - setSelections(prev => { - if (selectedData === null) { - const newSelections = { ...prev }; - delete newSelections[inputKey]; - return newSelections; - } else { - return { - ...prev, - [inputKey]: selectedData - }; - } - }); - }; +// const handleSelect = (inputKey: string, selectedData: { name: string, fields: string } | null) => { +// setSelections(prev => { +// if (selectedData === null) { +// const newSelections = { ...prev }; +// delete newSelections[inputKey]; +// return newSelections; +// } else { +// return { +// ...prev, +// [inputKey]: selectedData +// }; +// } +// }); +// }; - interface Measurement { - name: string; - fields: string; - } +// interface Measurement { +// name: string; +// fields: string; +// } - interface InputData { - [key: string]: Measurement; - } +// interface InputData { +// [key: string]: Measurement; +// } - const extractMeasurements = (input: InputData): Measurement[] => { - return Object.values(input); - }; +// const extractMeasurements = (input: InputData): Measurement[] => { +// return Object.values(input); +// }; - useEffect(() => { - const measurementsData = extractMeasurements(selections); - setMeasurements(measurementsData); - }, [selections]); +// useEffect(() => { +// const measurementsData = extractMeasurements(selections); +// setMeasurements(measurementsData); +// }, [selections]); - return ( - <> -
- {[...Array(6)].map((_, index) => { - const inputKey = `input${index + 1}`; - return ( -
-
Input {index + 1}
-
- handleSelect(inputKey, selectedData)} - onUnselect={() => handleSelect(inputKey, null)} - selectedValue={selections[inputKey]} - /> -
- -
-
-
- ); - })} -
-
-
-
duration
-
- -
-
-
- - ) -} +// return ( +// <> +//
+// {[...Array(6)].map((_, index) => { +// const inputKey = `input${index + 1}`; +// return ( +//
+//
Input {index + 1}
+//
+// handleSelect(inputKey, selectedData)} +// onUnselect={() => handleSelect(inputKey, null)} +// selectedValue={selections[inputKey]} +// /> +//
+// +//
+//
+//
+// ); +// })} +//
+//
+//
+//
duration
+//
+// +//
+//
+//
+// +// ) +// } -export default LineGrapInput \ No newline at end of file +// export default LineGrapInput + + + +import React, { useEffect, useState } from "react"; +import MultiLevelDropdown from "../../../../ui/inputs/MultiLevelDropDown"; +import { AddIcon } from "../../../../icons/ExportCommonIcons"; +import RegularDropDown from "../../../../ui/inputs/RegularDropDown"; +import useChartStore from "../../../../../store/useChartStore"; +import axios from "axios"; + +type Props = {}; + +const LineGrapInput = (props: Props) => { + const { measurements, setMeasurements, updateDuration, duration } = useChartStore(); + + const [dropDowndata, setDropDownData] = useState({}); + const [selections, setSelections] = useState>(measurements); + const iotApiUrl = process.env.REACT_APP_IOT_SOCKET_SERVER_URL; + + useEffect(() => { + const fetchZoneData = async () => { + try { + const response = await axios.get(`http://${iotApiUrl}/getinput`); + if (response.status === 200) { + console.log("dropdown data:", response.data); + setDropDownData(response.data); + } else { + console.log("Unexpected response:", response); + } + } catch (error) { + console.error("There was an error!", error); + } + }; + fetchZoneData(); + }, []); + + // Sync Zustand state when component mounts + useEffect(() => { + setSelections(measurements); + }, [measurements]); + + const handleSelect = (inputKey: string, selectedData: { name: string; fields: string } | null) => { + setSelections((prev) => { + const newSelections = { ...prev }; + if (selectedData === null) { + delete newSelections[inputKey]; + } else { + newSelections[inputKey] = selectedData; + } + setMeasurements(newSelections); // Update Zustand store + return newSelections; + }); + }; + + const handleSelectDuration = (option: string) => { + updateDuration(option); + }; + + return ( + <> +
+ {[...Array(6)].map((_, index) => { + const inputKey = `input${index + 1}`; + return ( +
+
Input {index + 1}
+
+ handleSelect(inputKey, selectedData)} + onUnselect={() => handleSelect(inputKey, null)} + selectedValue={selections[inputKey]} // Load from Zustand + /> +
+ +
+
+
+ ); + })} +
+
+
+
Duration
+
+ +
+
+
+ + ); +}; + +export default LineGrapInput; diff --git a/app/src/components/layout/sidebarRight/visualization/IotInputCards/PieChartInput.tsx b/app/src/components/layout/sidebarRight/visualization/IotInputCards/PieChartInput.tsx index 4561f7e..3087471 100644 --- a/app/src/components/layout/sidebarRight/visualization/IotInputCards/PieChartInput.tsx +++ b/app/src/components/layout/sidebarRight/visualization/IotInputCards/PieChartInput.tsx @@ -8,11 +8,12 @@ type Props = {} const PieChartInput = (props: Props) => { const [dropDowndata, setDropDownData] = useState({}) const [selections, setSelections] = useState>({}) + const iotApiUrl = process.env.REACT_APP_IOT_SOCKET_SERVER_URL; useEffect(() => { const fetchZoneData = async () => { try { - const response = await axios.get('http://192.168.0.192:5010/getinput'); + const response = await axios.get(`http://${iotApiUrl}/getinput`); if (response.status === 200) { console.log('dropdown data:', response.data); setDropDownData(response.data) diff --git a/app/src/components/ui/componets/AddButtons.tsx b/app/src/components/ui/componets/AddButtons.tsx index 7185fc6..11a1d80 100644 --- a/app/src/components/ui/componets/AddButtons.tsx +++ b/app/src/components/ui/componets/AddButtons.tsx @@ -16,6 +16,7 @@ interface ButtonsProps { zoneName: string; activeSides: Side[]; panelOrder: Side[]; + lockedPanels: Side[]; zoneId: string; zoneViewPortTarget: number[]; @@ -33,6 +34,7 @@ interface ButtonsProps { zoneName: string; activeSides: Side[]; panelOrder: Side[]; + lockedPanels: Side[]; zoneId: string; zoneViewPortTarget: number[]; @@ -120,23 +122,39 @@ const AddButtons: React.FC = ({ console.log("updatedZone: ", updatedZone); setSelectedZone(updatedZone); } else { - // If the panel is not active, activate it - const newActiveSides = [...selectedZone.activeSides, side]; + const updatePanelData = async () => { + try { + // Get email and organization safely + const email = localStorage.getItem("email") || ""; + const organization = email?.split("@")[1]?.split(".")[0] || "defaultOrg"; // Fallback value - const updatedZone = { - ...selectedZone, - activeSides: newActiveSides, - panelOrder: newActiveSides, + // Prevent duplicate side entries + const newActiveSides = selectedZone.activeSides.includes(side) + ? [...selectedZone.activeSides] + : [...selectedZone.activeSides, side]; + + const updatedZone = { + ...selectedZone, + activeSides: newActiveSides, + panelOrder: newActiveSides, + }; + + // API call + const response = await panelData(organization, selectedZone.zoneId, newActiveSides); + console.log("response: ", response); + + // Update state + console.log("updatedZone: ", updatedZone); + setSelectedZone(updatedZone); + } catch (error) { + console.error("Error updating panel data:", error); + } }; - const email = localStorage.getItem("email"); - const organization = email!.split("@")[1].split(".")[0]; - // let response = panelData(organization, selectedZone.zoneId, newActiveSides) - // console.log('response: ', response); - // Update the selectedZone state - console.log("updatedZone: ", updatedZone); - setSelectedZone(updatedZone); + updatePanelData(); // Call the async function } + + }; return ( @@ -146,9 +164,8 @@ const AddButtons: React.FC = ({
{/* "+" Button */} +// 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 index 3408252..e434a2b 100644 --- a/app/src/services/marketplace/fetchAssets.ts +++ b/app/src/services/marketplace/fetchAssets.ts @@ -6,6 +6,8 @@ export const fetchAssets = async () => { 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); 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/services/realTimeVisulization/zoneData/addWidgets.ts b/app/src/services/realTimeVisulization/zoneData/addWidgets.ts new file mode 100644 index 0000000..683943e --- /dev/null +++ b/app/src/services/realTimeVisulization/zoneData/addWidgets.ts @@ -0,0 +1,30 @@ +let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`; + +export const addingWidgets = async ( + zoneId: string, + organization: string, + widget: {} +) => { + try { + const response = await fetch(`${url_Backend_dwinzo}/api/v2/widget/save`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ organization, zoneId, widget }), + }); + + if (!response.ok) { + throw new Error("Failed to add widget in the zone"); + } + + const result = await response.json(); + return result; + } catch (error) { + if (error instanceof Error) { + throw new Error(error.message); + } else { + throw new Error("An unknown error occurred"); + } + } +}; diff --git a/app/src/services/realTimeVisulization/zoneData/getSelect2dZoneData.ts b/app/src/services/realTimeVisulization/zoneData/getSelect2dZoneData.ts new file mode 100644 index 0000000..71d9c2f --- /dev/null +++ b/app/src/services/realTimeVisulization/zoneData/getSelect2dZoneData.ts @@ -0,0 +1,27 @@ +let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`; +console.log("url_Backend_dwinzo: ", url_Backend_dwinzo); + +export const getSelect2dZoneData = async ( + ZoneId?: string, + organization?: string +) => { + try { + const response = await fetch( + `${url_Backend_dwinzo}/api/v2/ZoneVisualization/${ZoneId}?organization=${organization}`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + } + ); + + if (!response.ok) { + throw new Error("Failed to fetch zoneDatas"); + } + + return await response.json(); + } catch (error: any) { + throw new Error(error.message); + } +}; diff --git a/app/src/services/realTimeVisulization/zoneData/getZoneData.ts b/app/src/services/realTimeVisulization/zoneData/getZoneData.ts new file mode 100644 index 0000000..d2df867 --- /dev/null +++ b/app/src/services/realTimeVisulization/zoneData/getZoneData.ts @@ -0,0 +1,23 @@ +let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`; + +export const getZone2dData = async (organization?: string) => { + try { + const response = await fetch( + `${url_Backend_dwinzo}/api/v2/pageZodeData?organization=${organization}`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + } + ); + + if (!response.ok) { + throw new Error("Failed to fetch zoneDatas"); + } + + return await response.json(); + } catch (error: any) { + throw new Error(error.message); + } +}; diff --git a/app/src/services/realTimeVisulization/zoneData/panel.ts b/app/src/services/realTimeVisulization/zoneData/panel.ts index b70889a..7f89eed 100644 --- a/app/src/services/realTimeVisulization/zoneData/panel.ts +++ b/app/src/services/realTimeVisulization/zoneData/panel.ts @@ -1,22 +1,19 @@ -let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_BACKEND_URL}`; +let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`; type Side = "top" | "bottom" | "left" | "right"; export const panelData = async ( organization: string, - zoneID: string, + zoneId: string, panelOrder: Side[] ) => { - console.log("panelOrder: ", panelOrder); - console.log("zoneID: ", zoneID); - console.log("organization: ", organization); try { - const response = await fetch(`${url_Backend_dwinzo}/api/v1/panel/save`, { + const response = await fetch(`${url_Backend_dwinzo}/api/v2/panel/save`, { method: "POST", headers: { "Content-Type": "application/json", }, - body: JSON.stringify({ organization, zoneID, panelOrder }), + body: JSON.stringify({ organization, zoneId, panelOrder }), }); if (!response.ok) { @@ -33,16 +30,3 @@ export const panelData = async ( } } }; -// {objects.map((obj, index) => ( -// -// -//
-//
{obj.header}
-//
-//
{obj.value}
-//
{obj.per}
-//
-//
-// -//
-// ))} diff --git a/app/src/store/store.ts b/app/src/store/store.ts index 8b8e544..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, @@ -31,8 +30,8 @@ export const useSocketStore = create((set: any, get: any) => ({ })); export const useLoadingProgress = create<{ loadingProgress: number; setLoadingProgress: (x: number) => void }>((set) => ({ - loadingProgress: 1, - setLoadingProgress: (x: number) => set({ loadingProgress: x }), + loadingProgress: 1, + setLoadingProgress: (x: number) => set({ loadingProgress: x }), })); export const useOrganization = create((set: any) => ({ @@ -311,30 +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 }), + simulationPaths: [], + setSimulationPaths: (paths) => set({ simulationPaths: paths }), })); export const useIsConnecting = create((set: any) => ({ @@ -365,4 +348,7 @@ export const useEditPosition = create((set) => ({ setEdit: (value) => set({ Edit: value }), // Properly updating the state })); - +export const useAsset3dWidget = create((set: any) => ({ + widgetSelect: "", + setWidgetSelect: (x: any) => set({ widgetSelect: x }), +})); diff --git a/app/src/store/useChartStore.ts b/app/src/store/useChartStore.ts index 88d0c9c..4d61952 100644 --- a/app/src/store/useChartStore.ts +++ b/app/src/store/useChartStore.ts @@ -6,15 +6,15 @@ interface Measurement { } interface MeasurementStore { - measurements: Measurement[]; + measurements: Record; // Change array to Record interval: number; duration: string; - setMeasurements: (newMeasurements: Measurement[]) => void; + setMeasurements: (newMeasurements: Record) => void; updateDuration: (newDuration: string) => void; } const useChartStore = create((set) => ({ - measurements: [], + measurements: {}, // Initialize as an empty object interval: 1000, duration: "1h", @@ -26,3 +26,4 @@ const useChartStore = create((set) => ({ })); export default useChartStore; + diff --git a/app/src/store/useZoneStore.ts b/app/src/store/useZoneStore.ts index 007a1c6..77dd0d1 100644 --- a/app/src/store/useZoneStore.ts +++ b/app/src/store/useZoneStore.ts @@ -14,6 +14,7 @@ interface SelectedZoneState { zoneName: string; activeSides: Side[]; panelOrder: Side[]; + lockedPanels: Side[]; zoneId: string; zoneViewPortTarget: number[]; diff --git a/app/src/styles/components/marketPlace/marketPlace.scss b/app/src/styles/components/marketPlace/marketPlace.scss index 8df0896..71f5897 100644 --- a/app/src/styles/components/marketPlace/marketPlace.scss +++ b/app/src/styles/components/marketPlace/marketPlace.scss @@ -126,6 +126,8 @@ display: flex; max-height: 180px; justify-content: center; + border-radius: #{$border-radius-medium}; + overflow: hidden; img{ height: inherit; width: 100%; @@ -211,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/styles/components/visualization/floating/common.scss b/app/src/styles/components/visualization/floating/common.scss index 2994187..00c88a5 100644 --- a/app/src/styles/components/visualization/floating/common.scss +++ b/app/src/styles/components/visualization/floating/common.scss @@ -109,7 +109,7 @@ .productionCapacity-wrapper { - background: var(--background-color); + background-color: var(--background-color); display: flex; flex-direction: column; gap: 6px; @@ -170,6 +170,9 @@ } } } + .bar-chart{ + padding:14px 0; + } } 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