diff --git a/index.html b/index.html index f0d213f..b52b6df 100644 --- a/index.html +++ b/index.html @@ -35,6 +35,32 @@ #table-wrapper { padding: 20px; + max-height: 500px; + overflow: auto; + } + + #dimensionalityReduction { + margin-right: 20px; + } + + #plot-container { + max-height: 700px; + height: 0; + } + + #deckgl { + position: relative !important; + } + + #tooltip { + position: absolute; + opacity: 1000; + font-size: 20px; + border-radius: var(--bs-border-radius); + background-color: #f5f8ffcf; + outline: 2px solid #dfebff; + padding: 8px; + max-width: 500px; } @keyframes spin { @@ -177,7 +203,7 @@
Weighted Queries
-
+ @@ -189,8 +215,69 @@
Weighted Queries
+
+
+
+
+
+

Dimensionality Reduction

+

Using a fast wasm implementation of Barnes-Hut tSNE (wasm-bhtSNE).

+ +
+ +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+ +
+
+
+
+ + +
+ + +
+
+ +
+
+
+
- + \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3de4e3d..bbbab3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,22 @@ { - "name": "qdrant_universal_frontend", + "name": "qdrant-frontend", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "qdrant_universal_frontend", + "name": "qdrant-frontend", "version": "1.0.0", "license": "MIT", "dependencies": { "@xenova/transformers": "^2.15.0", "ag-grid-community": "^31.1.0", "bootstrap": "^5.3.3", + "deck.gl": "^8.9.35", + "distinct-colors": "^3.0.0", + "marked": "^12.0.1", + "pako": "^2.1.0", + "wasm-bhtsne": "^0.3.3", "xlsx": "^0.18.5" }, "devDependencies": { @@ -23,6 +28,234 @@ "webpack-dev-server": "^5.0.2" } }, + "node_modules/@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@deck.gl/aggregation-layers": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/aggregation-layers/-/aggregation-layers-8.9.35.tgz", + "integrity": "sha512-OjJhHt/ZXLIP3cs8yD2xwa9KACBOjfvJpdMkly704y6SuM0k+qSj81VwkpdOA54DCvAhQQTAYCJ4rvnwmtcPQQ==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "^8.5.21", + "@luma.gl/shadertools": "^8.5.21", + "@math.gl/web-mercator": "^3.6.2", + "d3-hexbin": "^0.2.1" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@deck.gl/layers": "^8.0.0", + "@luma.gl/core": "^8.0.0" + } + }, + "node_modules/@deck.gl/carto": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/carto/-/carto-8.9.35.tgz", + "integrity": "sha512-Ln9yFQqagQ5Zpfl5SUJl/09lw0S9zkpSVeay976aSPnQt9U7L4ES5lxOZZBQvxHmKATmar5B5V36vXaW2bAezQ==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/gis": "^3.4.13", + "@loaders.gl/loader-utils": "^3.4.13", + "@loaders.gl/mvt": "^3.4.13", + "@loaders.gl/tiles": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@math.gl/web-mercator": "^3.6.2", + "cartocolor": "^4.0.2", + "d3-array": "^3.2.0", + "d3-color": "^3.1.0", + "d3-format": "^3.1.0", + "d3-scale": "^4.0.0", + "h3-js": "^3.7.0", + "moment-timezone": "^0.5.33", + "pbf": "^3.2.1", + "quadbin": "^0.1.9" + }, + "peerDependencies": { + "@deck.gl/aggregation-layers": "^8.0.0", + "@deck.gl/core": "^8.0.0", + "@deck.gl/extensions": "^8.0.0", + "@deck.gl/geo-layers": "^8.0.0", + "@deck.gl/layers": "^8.0.0", + "@loaders.gl/core": "^3.4.13" + } + }, + "node_modules/@deck.gl/core": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/core/-/core-8.9.35.tgz", + "integrity": "sha512-xOASWScUCB5fpfuSjPaJrwas8pCJpbKXNIfwQElhvnfP3Yk8GGkAcRbPgiPNCfpkbEno7eDpAWJt6+6UJsSp9g==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/core": "^3.4.13", + "@loaders.gl/images": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@luma.gl/core": "^8.5.21", + "@luma.gl/webgl": "^8.5.21", + "@math.gl/core": "^3.6.2", + "@math.gl/sun": "^3.6.2", + "@math.gl/web-mercator": "^3.6.2", + "@probe.gl/env": "^3.5.0", + "@probe.gl/log": "^3.5.0", + "@probe.gl/stats": "^3.5.0", + "gl-matrix": "^3.0.0", + "math.gl": "^3.6.2", + "mjolnir.js": "^2.7.0" + } + }, + "node_modules/@deck.gl/extensions": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/extensions/-/extensions-8.9.35.tgz", + "integrity": "sha512-qMZzeQpvtcw4zbh4HJJIF8Q73/u0Unwwe8aSC2r+apjuyUVPQInwlCil++LznBY3JA37M7SvW2TSK6IgCuaSyA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/shadertools": "^8.5.21" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@luma.gl/constants": "^8.0.0", + "@luma.gl/core": "^8.0.0", + "@math.gl/core": "^3.6.2", + "@math.gl/web-mercator": "^3.6.2", + "gl-matrix": "^3.0.0" + } + }, + "node_modules/@deck.gl/geo-layers": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/geo-layers/-/geo-layers-8.9.35.tgz", + "integrity": "sha512-7sczznSjC7GjpDxuXPvPN7/WbVgSYHnFNNyWr8hMGm/WlUMK4z9QpZo6UFvrHL5rQ5Uudd4vD56xB1fs3b2lMA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/3d-tiles": "^3.4.13", + "@loaders.gl/gis": "^3.4.13", + "@loaders.gl/loader-utils": "^3.4.13", + "@loaders.gl/mvt": "^3.4.13", + "@loaders.gl/schema": "^3.4.13", + "@loaders.gl/terrain": "^3.4.13", + "@loaders.gl/tiles": "^3.4.13", + "@loaders.gl/wms": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@luma.gl/experimental": "^8.5.21", + "@math.gl/core": "^3.6.2", + "@math.gl/culling": "^3.6.2", + "@math.gl/web-mercator": "^3.6.2", + "@types/geojson": "^7946.0.8", + "h3-js": "^3.7.0", + "long": "^3.2.0" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@deck.gl/extensions": "^8.0.0", + "@deck.gl/layers": "^8.0.0", + "@deck.gl/mesh-layers": "^8.0.0", + "@loaders.gl/core": "^3.4.13", + "@luma.gl/core": "^8.0.0" + } + }, + "node_modules/@deck.gl/geo-layers/node_modules/long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/@deck.gl/google-maps": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/google-maps/-/google-maps-8.9.35.tgz", + "integrity": "sha512-btNCp3ZZngWq2Fsuapx6PL5BaGcLPXzaVDN65He/AkdkmU2cCnFK5oR1s33JgACnUejx28ttfoFuJgLKpmJ4Eg==", + "dependencies": { + "@babel/runtime": "^7.0.0" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@luma.gl/constants": "^8.5.0", + "@luma.gl/core": "^8.5.0", + "@math.gl/core": "^3.6.0" + } + }, + "node_modules/@deck.gl/json": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/json/-/json-8.9.35.tgz", + "integrity": "sha512-0mp4ckb1n0kRGPPFqtx6Q13uGNRBYGrpYN/NuibQZSW1EMNqmxTqSJekoqzXrlI1W6u35Tu9E5+DHpw9WJiJkg==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "d3-dsv": "^1.0.8", + "expression-eval": "^2.0.0" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0" + } + }, + "node_modules/@deck.gl/layers": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/layers/-/layers-8.9.35.tgz", + "integrity": "sha512-4amaGO+tGvaCNi2KZ90twmajGh5xUAaQzBIyh42dnM10GRj/62sOIYD9uT032oV/KpjKY+TfOstx5ooXBGKDjg==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/images": "^3.4.13", + "@loaders.gl/schema": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@mapbox/tiny-sdf": "^2.0.5", + "@math.gl/core": "^3.6.2", + "@math.gl/polygon": "^3.6.2", + "@math.gl/web-mercator": "^3.6.2", + "earcut": "^2.2.4" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@loaders.gl/core": "^3.4.13", + "@luma.gl/core": "^8.0.0" + } + }, + "node_modules/@deck.gl/mapbox": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/mapbox/-/mapbox-8.9.35.tgz", + "integrity": "sha512-3GKbYkB6OF+65Al/F2g0DlGhiQAPnA7/l/9Tl9cFSaaLBUfw2zT/U0kgZe3/4ZyfwQMzmoW6D3Ybb/FB4FKlmg==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@types/mapbox-gl": "^2.6.3" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0" + } + }, + "node_modules/@deck.gl/mesh-layers": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/mesh-layers/-/mesh-layers-8.9.35.tgz", + "integrity": "sha512-0l7+zi/6bkYVz7zZ0J4+WLoxOh+hFMPUQKCujTOcqYWbvJ2fEQze0Z1ZHCAG0RQOFJITEMamDigo9dN2BMxPBA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/gltf": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@luma.gl/experimental": "^8.5.21", + "@luma.gl/shadertools": "^8.5.21" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@luma.gl/core": "^8.0.0" + } + }, + "node_modules/@deck.gl/react": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/react/-/react-8.9.35.tgz", + "integrity": "sha512-eDwYCeBBzHXIpgZbAxcAEnpjnAoMiWcec8rMgYot7VOB+RnBTPYUaO3GPPImlk1uiezNGQel0YK4OLI1f6cDHg==", + "dependencies": { + "@babel/runtime": "^7.0.0" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@types/react": ">= 16.3", + "react": ">=16.3", + "react-dom": ">=16.3" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -121,6 +354,376 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@loaders.gl/3d-tiles": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/3d-tiles/-/3d-tiles-3.4.15.tgz", + "integrity": "sha512-JR67bEfLrD7Lzb6pWyEIRg2L6W3n6y43DKcWofRLpwPqLA7qHuY7SlO7E72Lz7Tniye8VhawqY1wO8gCx8T72Q==", + "dependencies": { + "@loaders.gl/draco": "3.4.15", + "@loaders.gl/gltf": "3.4.15", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/math": "3.4.15", + "@loaders.gl/tiles": "3.4.15", + "@math.gl/core": "^3.5.1", + "@math.gl/geospatial": "^3.5.1", + "long": "^5.2.1" + }, + "peerDependencies": { + "@loaders.gl/core": "^3.4.0" + } + }, + "node_modules/@loaders.gl/3d-tiles/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/@loaders.gl/core": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/core/-/core-3.4.15.tgz", + "integrity": "sha512-rPOOTuusWlRRNMWg7hymZBoFmPCXWThsA5ZYRfqqXnsgVeQIi8hzcAhJ7zDUIFAd/OSR8ravtqb0SH+3k6MOFQ==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/worker-utils": "3.4.15", + "@probe.gl/log": "^3.5.0" + } + }, + "node_modules/@loaders.gl/draco": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/draco/-/draco-3.4.15.tgz", + "integrity": "sha512-SStmyP0ZnS4JbWZb2NhrfiHW65uy3pVTTzQDTgXfkR5cD9oDAEu4nCaHbQ8x38/m39FHliCPgS9b1xWvLKQo8w==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/schema": "3.4.15", + "@loaders.gl/worker-utils": "3.4.15", + "draco3d": "1.5.5" + } + }, + "node_modules/@loaders.gl/gis": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/gis/-/gis-3.4.15.tgz", + "integrity": "sha512-h+LJI35P6ze8DFPSUylTKuml0l4HIfHMczML6u+ZXG6E2w5tbdM3Eh5AzHjXGQPuwUnaYPn3Mq/2t2N1rz98pg==", + "dependencies": { + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/schema": "3.4.15", + "@mapbox/vector-tile": "^1.3.1", + "@math.gl/polygon": "^3.5.1", + "pbf": "^3.2.1" + } + }, + "node_modules/@loaders.gl/gltf": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/gltf/-/gltf-3.4.15.tgz", + "integrity": "sha512-Y6kMNPLiHQPr6aWQw/4BMTxgPHWx3fcib4LPpZCbhyfM8PRn6pOqATVngUXdoOf5XY0QtdKVld6N1kxlr4pJtw==", + "dependencies": { + "@loaders.gl/draco": "3.4.15", + "@loaders.gl/images": "3.4.15", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/textures": "3.4.15", + "@math.gl/core": "^3.5.1" + } + }, + "node_modules/@loaders.gl/images": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/images/-/images-3.4.15.tgz", + "integrity": "sha512-QpjYhEetHabY/z9mWZYJXZZp4XJAxa38f9Ii/DjPlnJErepzY5GLBUTDHMu4oZ6n99gGImtuGFicDnFV6mb60g==", + "dependencies": { + "@loaders.gl/loader-utils": "3.4.15" + } + }, + "node_modules/@loaders.gl/loader-utils": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/loader-utils/-/loader-utils-3.4.15.tgz", + "integrity": "sha512-uUx6tCaky6QgCRkqCNuuXiUfpTzKV+ZlJOf6C9bKp62lpvFOv9AwqoXmL23j8nfsENdlzsX3vPhc3en6QQyksA==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/worker-utils": "3.4.15", + "@probe.gl/stats": "^3.5.0" + } + }, + "node_modules/@loaders.gl/math": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/math/-/math-3.4.15.tgz", + "integrity": "sha512-zTN8BUU/1fcppyVc8WzvdZcCyNGVYmNinxcn/A+a7mi1ug4OBGwEsZOj09Wjg0/s52c/cAL3h9ylPIZdjntscQ==", + "dependencies": { + "@loaders.gl/images": "3.4.15", + "@loaders.gl/loader-utils": "3.4.15", + "@math.gl/core": "^3.5.1" + } + }, + "node_modules/@loaders.gl/mvt": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/mvt/-/mvt-3.4.15.tgz", + "integrity": "sha512-Q8e1ZyfNkJtPF/C4WSZ2qhWDEbzOvquP7OyG1NzQ2cp8R6eUfbexu48IgcnL/oAu8VPql3zIxQ+bQUyDReyN5g==", + "dependencies": { + "@loaders.gl/gis": "3.4.15", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/schema": "3.4.15", + "@math.gl/polygon": "^3.5.1", + "pbf": "^3.2.1" + } + }, + "node_modules/@loaders.gl/schema": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/schema/-/schema-3.4.15.tgz", + "integrity": "sha512-8oRtstz0IsqES7eZd2jQbmCnmExCMtL8T6jWd1+BfmnuyZnQ0B6TNccy++NHtffHdYuzEoQgSELwcdmhSApYew==", + "dependencies": { + "@types/geojson": "^7946.0.7" + } + }, + "node_modules/@loaders.gl/terrain": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/terrain/-/terrain-3.4.15.tgz", + "integrity": "sha512-ouv41J84uOnLEtXLM+iPEPFfeq7aRgIOls6esdvhBx2/dXJRNkt8Mx0wShXAi8VNHz77D+gZFrKARa7wqjmftg==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/images": "3.4.15", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/schema": "3.4.15", + "@mapbox/martini": "^0.2.0" + } + }, + "node_modules/@loaders.gl/textures": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/textures/-/textures-3.4.15.tgz", + "integrity": "sha512-QHnmxBYtLvTdG1uMz2KWcxVY8KPb1+XyPJUoZV9GMcQkulz+CwFB8BaX8nROfMDz9KKYoPfksCzjig0LZ0WBJQ==", + "dependencies": { + "@loaders.gl/images": "3.4.15", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/schema": "3.4.15", + "@loaders.gl/worker-utils": "3.4.15", + "ktx-parse": "^0.0.4", + "texture-compressor": "^1.0.2" + } + }, + "node_modules/@loaders.gl/tiles": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/tiles/-/tiles-3.4.15.tgz", + "integrity": "sha512-o85aRSXq+YeVSK2ndW9aBwTMi5FhEsQ7k18J4DG+T5Oc+zz3tKui5X1SuBDiKbQN+kYtFpj0oYO1QG3ndNI6jg==", + "dependencies": { + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/math": "3.4.15", + "@math.gl/core": "^3.5.1", + "@math.gl/culling": "^3.5.1", + "@math.gl/geospatial": "^3.5.1", + "@math.gl/web-mercator": "^3.5.1", + "@probe.gl/stats": "^3.5.0" + }, + "peerDependencies": { + "@loaders.gl/core": "^3.4.0" + } + }, + "node_modules/@loaders.gl/wms": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/wms/-/wms-3.4.15.tgz", + "integrity": "sha512-zY++Oxx+cNGF9ptuSTFxCmEnpRbR5VZYjvyLraylaRbuynZv+JiWrehymFzEfq3hJcQ/cGvIjaG6rSVtPuqCIA==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/images": "3.4.15", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/schema": "3.4.15", + "@loaders.gl/xml": "3.4.15", + "@turf/rewind": "^5.1.5", + "deep-strict-equal": "^0.2.0", + "lerc": "^4.0.1" + } + }, + "node_modules/@loaders.gl/worker-utils": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/worker-utils/-/worker-utils-3.4.15.tgz", + "integrity": "sha512-zUUepOYRYmcYIcr/c4Mchox9h5fBFNkD81rsGnLlZyq19QvyHzN+93SVxrLc078gw93t2RKrVcOOZY13zT3t1w==", + "dependencies": { + "@babel/runtime": "^7.3.1" + } + }, + "node_modules/@loaders.gl/xml": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@loaders.gl/xml/-/xml-3.4.15.tgz", + "integrity": "sha512-iMWHaDzYSe8JoS8W5k9IbxQ6S3VHPr7M+UBejIVeYGCp1jzWF0ri498olwJWWDRvg4kqAWolrkj8Pcgkg8Jf8A==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/loader-utils": "3.4.15", + "@loaders.gl/schema": "3.4.15", + "fast-xml-parser": "^4.2.5" + } + }, + "node_modules/@luma.gl/constants": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/constants/-/constants-8.5.21.tgz", + "integrity": "sha512-aJxayGxTT+IRd1vfpcgD/cKSCiVJjBNiuiChS96VulrmCvkzUOLvYXr42y5qKB4RyR7vOIda5uQprNzoHrhQAA==" + }, + "node_modules/@luma.gl/core": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/core/-/core-8.5.21.tgz", + "integrity": "sha512-11jQJQEMoR/IN2oIsd4zFxiQJk6FE+xgVIMUcsCTBuzafTtQZ8Po9df8mt+MVewpDyBlTVs6g8nxHRH4np1ukA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "8.5.21", + "@luma.gl/engine": "8.5.21", + "@luma.gl/gltools": "8.5.21", + "@luma.gl/shadertools": "8.5.21", + "@luma.gl/webgl": "8.5.21" + } + }, + "node_modules/@luma.gl/engine": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/engine/-/engine-8.5.21.tgz", + "integrity": "sha512-IG3WQSKXFNUEs8QG7ZjHtGiOtsakUu+BAxtJ6997A6/F06yynZ44tPe5NU70jG9Yfu3kV0LykPZg7hO3vXZDiA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "8.5.21", + "@luma.gl/gltools": "8.5.21", + "@luma.gl/shadertools": "8.5.21", + "@luma.gl/webgl": "8.5.21", + "@math.gl/core": "^3.5.0", + "@probe.gl/env": "^3.5.0", + "@probe.gl/stats": "^3.5.0", + "@types/offscreencanvas": "^2019.7.0" + } + }, + "node_modules/@luma.gl/experimental": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/experimental/-/experimental-8.5.21.tgz", + "integrity": "sha512-uFKPChGofyihOKxtqJy78QCQCDFnuMTK4QHrUX/qiTnvFSO8BgtTUevKvWGN9lBvq+uDD0lSieeF9yBzhQfAzw==", + "dependencies": { + "@luma.gl/constants": "8.5.21", + "@math.gl/core": "^3.5.0", + "earcut": "^2.0.6" + }, + "peerDependencies": { + "@loaders.gl/gltf": "^3.0.0", + "@loaders.gl/images": "^3.0.0", + "@luma.gl/engine": "^8.4.0", + "@luma.gl/gltools": "^8.4.0", + "@luma.gl/shadertools": "^8.4.0", + "@luma.gl/webgl": "^8.4.0" + } + }, + "node_modules/@luma.gl/gltools": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/gltools/-/gltools-8.5.21.tgz", + "integrity": "sha512-6qZ0LaT2Mxa4AJT5F44TFoaziokYiHUwO45vnM/NYUOIu9xevcmS6VtToawytMEACGL6PDeDyVqP3Y80SDzq5g==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "8.5.21", + "@probe.gl/env": "^3.5.0", + "@probe.gl/log": "^3.5.0", + "@types/offscreencanvas": "^2019.7.0" + } + }, + "node_modules/@luma.gl/shadertools": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/shadertools/-/shadertools-8.5.21.tgz", + "integrity": "sha512-WQah7yFDJ8cNCLPYpIm3r0wSlXLvjoA279fcknmATvvkW3/i8PcCJ/nYEBJO3hHEwwMQxD16+YZu/uwGiifLMg==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@math.gl/core": "^3.5.0" + } + }, + "node_modules/@luma.gl/webgl": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/webgl/-/webgl-8.5.21.tgz", + "integrity": "sha512-ZVLO4W5UuaOlzZIwmFWhnmZ1gYoU97a+heMqxLrSSmCUAsSu3ZETUex9gOmzdM1WWxcdWaa3M68rvKCNEgwz0Q==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "8.5.21", + "@luma.gl/gltools": "8.5.21", + "@probe.gl/env": "^3.5.0", + "@probe.gl/stats": "^3.5.0" + } + }, + "node_modules/@mapbox/martini": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@mapbox/martini/-/martini-0.2.0.tgz", + "integrity": "sha512-7hFhtkb0KTLEls+TRw/rWayq5EeHtTaErgm/NskVoXmtgAQu/9D299aeyj6mzAR/6XUnYRp2lU+4IcrYRFjVsQ==" + }, + "node_modules/@mapbox/point-geometry": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", + "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" + }, + "node_modules/@mapbox/tile-cover": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@mapbox/tile-cover/-/tile-cover-3.0.1.tgz", + "integrity": "sha512-R8aoFY/87HWBOL9E2eBqzOY2lpfWYXCcTNgBpIxAv67rqQeD4IfnHD0iPXg/Z1cqXrklegEYZCp/7ZR/RsWqBQ==", + "dependencies": { + "tilebelt": "^1.0.1" + } + }, + "node_modules/@mapbox/tiny-sdf": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.6.tgz", + "integrity": "sha512-qMqa27TLw+ZQz5Jk+RcwZGH7BQf5G/TrutJhspsca/3SHwmgKQ1iq+d3Jxz5oysPVYTGP6aXxCo5Lk9Er6YBAA==" + }, + "node_modules/@mapbox/vector-tile": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", + "integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==", + "dependencies": { + "@mapbox/point-geometry": "~0.1.0" + } + }, + "node_modules/@math.gl/core": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/core/-/core-3.6.3.tgz", + "integrity": "sha512-jBABmDkj5uuuE0dTDmwwss7Cup5ZwQ6Qb7h1pgvtkEutTrhkcv8SuItQNXmF45494yIHeoGue08NlyeY6wxq2A==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "@math.gl/types": "3.6.3", + "gl-matrix": "^3.4.0" + } + }, + "node_modules/@math.gl/culling": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/culling/-/culling-3.6.3.tgz", + "integrity": "sha512-3UERXHbaPlM6pnTk2MI7LeQ5CoelDZzDzghTTcv+HdQCZsT/EOEuEdYimETHtSxiyiOmsX2Un65UBLYT/rbKZg==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "@math.gl/core": "3.6.3", + "gl-matrix": "^3.4.0" + } + }, + "node_modules/@math.gl/geospatial": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/geospatial/-/geospatial-3.6.3.tgz", + "integrity": "sha512-6xf657lJnaecSarSzn02t0cnsCSkWb+39m4+im96v20dZTrLCWZ2glDQVzfuL91meDnDXjH4oyvynp12Mj5MFg==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "@math.gl/core": "3.6.3", + "gl-matrix": "^3.4.0" + } + }, + "node_modules/@math.gl/polygon": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/polygon/-/polygon-3.6.3.tgz", + "integrity": "sha512-FivQ1ZnYcAss1wVifOkHP/ZnlfQy1IL/769uzNtiHxwUbW0kZG3yyOZ9I7fwyzR5Hvqt3ErJKHjSYZr0uVlz5g==", + "dependencies": { + "@math.gl/core": "3.6.3" + } + }, + "node_modules/@math.gl/sun": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/sun/-/sun-3.6.3.tgz", + "integrity": "sha512-mrx6CGYYeTNSQttvcw0KVUy+35YDmnjMqpO/o0t06Vcghrt0HNruB/ScRgUSbJrgkbOg1Vcqm23HBd++clzQzw==", + "dependencies": { + "@babel/runtime": "^7.12.0" + } + }, + "node_modules/@math.gl/types": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/types/-/types-3.6.3.tgz", + "integrity": "sha512-3uWLVXHY3jQxsXCr/UCNPSc2BG0hNUljhmOBt9l+lNFDp7zHgm0cK2Tw4kj2XfkJy4TgwZTBGwRDQgWEbLbdTA==" + }, + "node_modules/@math.gl/web-mercator": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/web-mercator/-/web-mercator-3.6.3.tgz", + "integrity": "sha512-UVrkSOs02YLehKaehrxhAejYMurehIHPfFQvPFZmdJHglHOU4V2cCUApTVEwOksvCp161ypEqVp+9H6mGhTTcw==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "gl-matrix": "^3.4.0" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -141,6 +744,31 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@probe.gl/env": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@probe.gl/env/-/env-3.6.0.tgz", + "integrity": "sha512-4tTZYUg/8BICC3Yyb9rOeoKeijKbZHRXBEKObrfPmX4sQmYB15ZOUpoVBhAyJkOYVAM8EkPci6Uw5dLCwx2BEQ==", + "dependencies": { + "@babel/runtime": "^7.0.0" + } + }, + "node_modules/@probe.gl/log": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@probe.gl/log/-/log-3.6.0.tgz", + "integrity": "sha512-hjpyenpEvOdowgZ1qMeCJxfRD4JkKdlXz0RC14m42Un62NtOT+GpWyKA4LssT0+xyLULCByRAtG2fzZorpIAcA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@probe.gl/env": "3.6.0" + } + }, + "node_modules/@probe.gl/stats": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@probe.gl/stats/-/stats-3.6.0.tgz", + "integrity": "sha512-JdALQXB44OP4kUBN/UrQgzbJe4qokbVF4Y8lkIA8iVCFnjVowWIgkD/z/0QO65yELT54tTrtepw1jScjKB+rhQ==", + "dependencies": { + "@babel/runtime": "^7.0.0" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -195,6 +823,56 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "node_modules/@turf/boolean-clockwise": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-5.1.5.tgz", + "integrity": "sha512-FqbmEEOJ4rU4/2t7FKx0HUWmjFEVqR+NJrFP7ymGSjja2SQ7Q91nnBihGuT+yuHHl6ElMjQ3ttsB/eTmyCycxA==", + "dependencies": { + "@turf/helpers": "^5.1.5", + "@turf/invariant": "^5.1.5" + } + }, + "node_modules/@turf/clone": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-5.1.5.tgz", + "integrity": "sha512-//pITsQ8xUdcQ9pVb4JqXiSqG4dos5Q9N4sYFoWghX21tfOV2dhc5TGqYOhnHrQS7RiKQL1vQ48kIK34gQ5oRg==", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/helpers": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-5.1.5.tgz", + "integrity": "sha512-/lF+JR+qNDHZ8bF9d+Cp58nxtZWJ3sqFe6n3u3Vpj+/0cqkjk4nXKYBSY0azm+GIYB5mWKxUXvuP/m0ZnKj1bw==" + }, + "node_modules/@turf/invariant": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-5.2.0.tgz", + "integrity": "sha512-28RCBGvCYsajVkw2EydpzLdcYyhSA77LovuOvgCJplJWaNVyJYH6BOR3HR9w50MEkPqb/Vc/jdo6I6ermlRtQA==", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/meta": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz", + "integrity": "sha512-ZjQ3Ii62X9FjnK4hhdsbT+64AYRpaI8XMBMcyftEOGSmPMUVnkbvuv3C9geuElAXfQU7Zk1oWGOcrGOD9zr78Q==", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/rewind": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-5.1.5.tgz", + "integrity": "sha512-Gdem7JXNu+G4hMllQHXRFRihJl3+pNl7qY+l4qhQFxq+hiU1cQoVFnyoleIqWKIrdK/i2YubaSwc3SCM7N5mMw==", + "dependencies": { + "@turf/boolean-clockwise": "^5.1.5", + "@turf/clone": "^5.1.5", + "@turf/helpers": "^5.1.5", + "@turf/invariant": "^5.1.5", + "@turf/meta": "^5.1.5" + } + }, "node_modules/@types/body-parser": { "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", @@ -214,6 +892,11 @@ "@types/node": "*" } }, + "node_modules/@types/chroma-js": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/chroma-js/-/chroma-js-2.4.4.tgz", + "integrity": "sha512-/DTccpHTaKomqussrn+ciEvfW4k6NAHzNzs/sts1TCqg333qNxOhy8TNIoQCmbGG3Tl8KdEhkGAssb1n3mTXiQ==" + }, "node_modules/@types/connect": { "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", @@ -283,6 +966,16 @@ "@types/send": "*" } }, + "node_modules/@types/geojson": { + "version": "7946.0.14", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", + "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + }, + "node_modules/@types/hammerjs": { + "version": "2.0.45", + "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.45.tgz", + "integrity": "sha512-qkcUlZmX6c4J8q45taBKTL3p+LbITgyx7qhlPYOdOHZB7B31K0mXbP5YA7i7SgDeEGuI9MnumiKPEMrxg8j3KQ==" + }, "node_modules/@types/html-minifier-terser": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", @@ -315,6 +1008,14 @@ "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, + "node_modules/@types/mapbox-gl": { + "version": "2.7.21", + "resolved": "https://registry.npmjs.org/@types/mapbox-gl/-/mapbox-gl-2.7.21.tgz", + "integrity": "sha512-Dx9MuF2kKgT/N22LsMUB4b3acFZh9clVqz9zv1fomoiPoBrJolwYxpWA/9LPO/2N0xWbKi4V+pkjTaFkkx/4wA==", + "dependencies": { + "@types/geojson": "*" + } + }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", @@ -338,6 +1039,17 @@ "@types/node": "*" } }, + "node_modules/@types/offscreencanvas": { + "version": "2019.7.3", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz", + "integrity": "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==" + }, + "node_modules/@types/prop-types": { + "version": "15.7.11", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", + "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==", + "peer": true + }, "node_modules/@types/qs": { "version": "6.9.11", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", @@ -350,12 +1062,29 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, + "node_modules/@types/react": { + "version": "18.2.64", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.64.tgz", + "integrity": "sha512-MlmPvHgjj2p3vZaxbQgFUQFvD8QiZwACfGqEdDSWou5yISWxDQ4/74nCAwsUiX7UFLKZz3BbVSPj+YxeoGGCfg==", + "peer": true, + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, "node_modules/@types/retry": { "version": "0.12.2", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", "dev": true }, + "node_modules/@types/scheduler": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", + "peer": true + }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", @@ -779,6 +1508,14 @@ "node": ">= 8" } }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -993,6 +1730,14 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buf-compare": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", + "integrity": "sha512-Bvx4xH00qweepGc43xFvMs5BKASXTbHaHm6+kDYIK9p/4iFwjATQkmPKHQSgJZzKbAymhztRbXUf1Nqhzl73/Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -1095,6 +1840,14 @@ } ] }, + "node_modules/cartocolor": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cartocolor/-/cartocolor-4.0.2.tgz", + "integrity": "sha512-+Gh9mb6lFxsDOLQlBLPxAHCnWXlg2W8q3AcVwqRcy95TdBbcOU89Wrb6h2Hd/6Ww1Kc1pzXmUdpnWD+xeCG0dg==", + "dependencies": { + "colorbrewer": "1.0.0" + } + }, "node_modules/cfb": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", @@ -1136,6 +1889,11 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, + "node_modules/chroma-js": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.4.2.tgz", + "integrity": "sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A==" + }, "node_modules/chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", @@ -1216,6 +1974,11 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/colorbrewer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/colorbrewer/-/colorbrewer-1.0.0.tgz", + "integrity": "sha512-NZuIOVdErK/C6jDH3jWT/roxWJbJAinMiqEpbuWniKvQAoWdg6lGra3pPrSHvaIf8PlX8wLs/RAC6nULFJbgmg==" + }, "node_modules/colorette": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", @@ -1225,8 +1988,7 @@ "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==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "node_modules/compressible": { "version": "2.0.18", @@ -1309,6 +2071,18 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "node_modules/core-assert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", + "integrity": "sha512-IG97qShIP+nrJCXMCgkNZgH7jZQ4n8RpPyPeXX++T6avR/KhLhgLiHKoEn5Rc1KjfycSfA9DMa6m+4C4eguHhw==", + "dependencies": { + "buf-compare": "^1.0.0", + "is-error": "^2.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -1415,6 +2189,113 @@ "node": ">=4" } }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "peer": true + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dsv": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.2.0.tgz", + "integrity": "sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g==", + "dependencies": { + "commander": "2", + "iconv-lite": "0.4", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json", + "csv2tsv": "bin/dsv2dsv", + "dsv2dsv": "bin/dsv2dsv", + "dsv2json": "bin/dsv2json", + "json2csv": "bin/json2dsv", + "json2dsv": "bin/json2dsv", + "json2tsv": "bin/json2dsv", + "tsv2csv": "bin/dsv2dsv", + "tsv2json": "bin/dsv2json" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-hexbin": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/d3-hexbin/-/d3-hexbin-0.2.2.tgz", + "integrity": "sha512-KS3fUT2ReD4RlGCjvCEm1RgMtp2NFZumdMu4DBzQK8AZv3fXRM6Xm8I4fSU07UXvH4xxg03NwWKWdvxfS/yc4w==" + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1424,6 +2305,25 @@ "ms": "2.0.0" } }, + "node_modules/deck.gl": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/deck.gl/-/deck.gl-8.9.35.tgz", + "integrity": "sha512-qP5A/Q2I7hRKrVagbSifiAg4tTe0IdMhc3pgDt0XMm1xV5P+aKa6GQMljXFSRRQyQ5UEN2uCHEiL18g/ZiqChQ==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@deck.gl/aggregation-layers": "8.9.35", + "@deck.gl/carto": "8.9.35", + "@deck.gl/core": "8.9.35", + "@deck.gl/extensions": "8.9.35", + "@deck.gl/geo-layers": "8.9.35", + "@deck.gl/google-maps": "8.9.35", + "@deck.gl/json": "8.9.35", + "@deck.gl/layers": "8.9.35", + "@deck.gl/mapbox": "8.9.35", + "@deck.gl/mesh-layers": "8.9.35", + "@deck.gl/react": "8.9.35" + } + }, "node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", @@ -1446,6 +2346,17 @@ "node": ">=4.0.0" } }, + "node_modules/deep-strict-equal": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz", + "integrity": "sha512-3daSWyvZ/zwJvuMGlzG1O+Ow0YSadGfb3jsh9xoCutv2tWyB9dA4YvR9L9/fSdDZa2dByYQe+TqapSGUrjnkoA==", + "dependencies": { + "core-assert": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/default-browser": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", @@ -1548,6 +2459,16 @@ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "dev": true }, + "node_modules/distinct-colors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/distinct-colors/-/distinct-colors-3.0.0.tgz", + "integrity": "sha512-ID2CzFkvsdhkm4IVpUYxCcUpB6GspIvVW8dLSWFjIwJzV5kNOoayegfgDyyzcWkOWWMAFc1cyEhdtFH868AfYQ==", + "dependencies": { + "@types/chroma-js": "^2.0.0", + "chroma-js": "^2.1.0", + "mout": "^1.2.2" + } + }, "node_modules/dns-packet": { "version": "5.6.1", "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", @@ -1634,6 +2555,16 @@ "tslib": "^2.0.3" } }, + "node_modules/draco3d": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.5.tgz", + "integrity": "sha512-JVuNV0EJzD3LBYhGyIXJLeBID/EVtmFO1ZNhAYflTgiMiAJlbhXQmRRda/azjc8MRVMHh0gqGhiqHUo5dIXM8Q==" + }, + "node_modules/earcut": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1891,6 +2822,15 @@ "node": ">= 0.10.0" } }, + "node_modules/expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "deprecated": "The expression-eval npm package is no longer maintained. The package was originally published as part of a now-completed personal project, and I do not have incentives to continue maintenance.", + "dependencies": { + "jsep": "^0.3.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1908,6 +2848,27 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, + "node_modules/fast-xml-parser": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.5.tgz", + "integrity": "sha512-sWvP1Pl8H03B8oFJpFR3HE31HUfwtX7Rlf9BNsvdpujD4n7WMhfmu8h9wOV2u+c1k0ZilTADhPqypzx2J690ZQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -2124,6 +3085,11 @@ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" }, + "node_modules/gl-matrix": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", + "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" + }, "node_modules/glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -2187,6 +3153,24 @@ "resolved": "https://registry.npmjs.org/guid-typescript/-/guid-typescript-1.0.9.tgz", "integrity": "sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ==" }, + "node_modules/h3-js": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/h3-js/-/h3-js-3.7.2.tgz", + "integrity": "sha512-LPjlHSwB9zQZrMqKloCZmmmt3yZzIK7nqPcXqwU93zT3TtYG6jP4tZBzAPouxut7lLjdFbMQ75wRBiKfpsnY7w==", + "engines": { + "node": ">=4", + "npm": ">=3", + "yarn": ">=1.3.0" + } + }, + "node_modules/hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -2477,7 +3461,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -2516,6 +3499,17 @@ } ] }, + "node_modules/image-size": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.7.5.tgz", + "integrity": "sha512-Hiyv+mXHfFEP7LzUL/llg9RwFxxY+o9N3JVLIeG5E7iFIFAalxvRU9UZthBdYDEVnzHMgjnKJPPpay5BWf1g9g==", + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -2545,6 +3539,14 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "engines": { + "node": ">=12" + } + }, "node_modules/interpret": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", @@ -2607,6 +3609,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-error": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", + "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==" + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2780,6 +3787,20 @@ "node": ">= 10.13.0" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, + "node_modules/jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==", + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -2801,6 +3822,11 @@ "node": ">=0.10.0" } }, + "node_modules/ktx-parse": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/ktx-parse/-/ktx-parse-0.0.4.tgz", + "integrity": "sha512-LY3nrmfXl+wZZdPxgJ3ZmLvG+wkOZZP3/dr4RbQj1Pk3Qwz44esOOSFFVQJcNWpXAtiNIC66WgXufX/SYgYz6A==" + }, "node_modules/launch-editor": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz", @@ -2811,6 +3837,11 @@ "shell-quote": "^1.8.1" } }, + "node_modules/lerc": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lerc/-/lerc-4.0.4.tgz", + "integrity": "sha512-nHZH+ffiGPkgKUQtiZrljGUGV2GddvPcVTV5E345ZFncbKz+/rBIjDPrSxkiqW0EAtg1Jw7qAgRdaCwV+95Fow==" + }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -2843,6 +3874,18 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -2863,6 +3906,25 @@ "node": ">=10" } }, + "node_modules/marked": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-12.0.1.tgz", + "integrity": "sha512-Y1/V2yafOcOdWQCX0XpAKXzDakPOpn6U0YLxTJs3cww6VxOzZV1BTOOYWLvH3gX38cq+iLwljHHTnMtlDfg01Q==", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/math.gl": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/math.gl/-/math.gl-3.6.3.tgz", + "integrity": "sha512-Yq9CyECvSDox9+5ETi2+x1bGTY5WvGUGL3rJfC4KPoCZAM51MGfrCm6rIn4yOJUVfMPs2a5RwMD+yGS/n1g3gg==", + "dependencies": { + "@math.gl/core": "3.6.3" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -3086,11 +4148,48 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mjolnir.js": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/mjolnir.js/-/mjolnir.js-2.7.1.tgz", + "integrity": "sha512-72BeUWgTv2cj5aZQKpwL8caNUFhXZ9bDm1hxpNj70XJQ62IBnTZmtv/WPxJvtaVNhzNo+D2U8O6ryNI0zImYcw==", + "dependencies": { + "@types/hammerjs": "^2.0.41", + "hammerjs": "^2.0.8" + }, + "engines": { + "node": ">= 4", + "npm": ">= 3" + } + }, "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, + "node_modules/moment-timezone": { + "version": "0.5.45", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.45.tgz", + "integrity": "sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==", + "dependencies": { + "moment": "^2.29.4" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mout": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/mout/-/mout-1.2.4.tgz", + "integrity": "sha512-mZb9uOruMWgn/fw28DG4/yE3Kehfk1zKCLhuDU2O3vlKdnBBr4XaOCqVTflJ5aODavGUPqFHZgrFX3NJVuxGhQ==" + }, "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -3392,6 +4491,11 @@ "node": ">=6" } }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -3476,6 +4580,18 @@ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", "dev": true }, + "node_modules/pbf": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", + "dependencies": { + "ieee754": "^1.1.12", + "resolve-protobuf-schema": "^2.1.0" + }, + "bin": { + "pbf": "bin/pbf" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -3709,6 +4825,11 @@ "pbts": "bin/pbts" } }, + "node_modules/protocol-buffers-schema": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -3764,6 +4885,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/quadbin": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/quadbin/-/quadbin-0.1.9.tgz", + "integrity": "sha512-5V6m6+cL/6+uBl3hYL+CWF06rRvlHkIepYKGQjTLYaHhu9InPppql0+0ROiCaOQdz8gPNlgge3glk5Qg1mWOYw==", + "dependencies": { + "@mapbox/tile-cover": "3.0.1" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/queue-tick": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", @@ -3825,6 +4957,31 @@ "rc": "cli.js" } }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -3862,6 +5019,11 @@ "node": ">= 10.13.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -3958,6 +5120,14 @@ "node": ">=8" } }, + "node_modules/resolve-protobuf-schema": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", + "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", + "dependencies": { + "protocol-buffers-schema": "^3.3.1" + } + }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -3997,6 +5167,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -4019,8 +5194,16 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } }, "node_modules/schema-utils": { "version": "3.3.0", @@ -4467,6 +5650,11 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, "node_modules/ssf": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", @@ -4620,6 +5808,11 @@ "node": ">=0.10.0" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -4731,12 +5924,30 @@ } } }, + "node_modules/texture-compressor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/texture-compressor/-/texture-compressor-1.0.2.tgz", + "integrity": "sha512-dStVgoaQ11mA5htJ+RzZ51ZxIZqNOgWKAIvtjLrW1AliQQLCmrDqNzQZ8Jh91YealQ95DXt4MEduLzJmbs6lig==", + "dependencies": { + "argparse": "^1.0.10", + "image-size": "^0.7.4" + }, + "bin": { + "texture-compressor": "bin/texture-compressor.js" + } + }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, + "node_modules/tilebelt": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tilebelt/-/tilebelt-1.0.1.tgz", + "integrity": "sha512-cxHzpa5JgsugY9NUVRH43gPaGJw/29LecAn4X7UGOP64+kB8pU4VQ3bIhSyfb5Mk4jDxwl3yk330L/EIhbJ5aw==", + "deprecated": "This module is now under the @mapbox namespace: install @mapbox/tilebelt instead" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4879,6 +6090,11 @@ "node": ">= 0.8" } }, + "node_modules/wasm-bhtsne": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/wasm-bhtsne/-/wasm-bhtsne-0.3.3.tgz", + "integrity": "sha512-lFWGVJgEFf7PwskPPLEVrltWL0UqX+kDFFNxOfXPH6WyCXowAqtXov9fKGKnpjCDCVx6BQuHasj5vqEj5WJocA==" + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", diff --git a/package.json b/package.json index 62c8514..b129566 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,11 @@ "@xenova/transformers": "^2.15.0", "ag-grid-community": "^31.1.0", "bootstrap": "^5.3.3", + "deck.gl": "^8.9.35", + "distinct-colors": "^3.0.0", + "marked": "^12.0.1", + "pako": "^2.1.0", + "wasm-bhtsne": "^0.3.3", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/index.js b/src/js/index.js similarity index 74% rename from index.js rename to src/js/index.js index 0e1b062..b53ee4b 100644 --- a/index.js +++ b/src/js/index.js @@ -3,6 +3,15 @@ import { createGrid } from 'ag-grid-community'; import * as XLSX from 'xlsx'; import 'ag-grid-community/styles/ag-grid.css'; import 'ag-grid-community/styles/ag-theme-quartz.css'; +import { Deck } from '@deck.gl/core'; +import { ScatterplotLayer, LineLayer } from '@deck.gl/layers'; +import distinctColors from 'distinct-colors'; + +const worker = new Worker(new URL('./worker.js', import.meta.url), { + type: 'module' +}); + +window.semanticWorker = worker; const loadingElement = document.getElementById("loading"); const submitButton = document.getElementById("submit_button"); @@ -16,6 +25,7 @@ let loadedModelName = null; let quantizedFlag = true; let thisCollection; let lastCollection = ""; +let queryEmbedding; const special_vector = [] // A special vector can be hardcoded here, so that instead of calculating it with the model, this vector is used. Will be displayed bold. @@ -160,14 +170,11 @@ function addRow(queryData, rowNumber) { if (inputTextX.value === "special_vector") { // If the condition is met, apply italic text and grey background inputTextX.style.fontStyle = 'italic'; - //event.target.style.backgroundColor = 'grey'; } else { // If the condition is not met, remove italic text and grey background inputTextX.style.fontStyle = 'normal'; - //event.target.style.backgroundColor = ''; } - clone.querySelector('.queryWeight').value = queryData.queryWeight || ''; clone.querySelector('.activeToggle').checked = queryData.activeState; @@ -239,11 +246,9 @@ async function searchPoints(collectionName, vectorData, filter, limit, offset, w thisCollection = document.getElementById("QdrantURL").value const response = await fetch(`${thisCollection}/points/search`, requestOptions); const data = await response.json(); - return data; } - function getQueryTextsAndWeigths() { const queryContainers = document.querySelectorAll('.queryContainer'); @@ -258,8 +263,6 @@ function getQueryTextsAndWeigths() { const jsonObject = JSON.stringify(activeQueries); - console.log(jsonObject); // Logs the JSON string of active queries - return jsonObject } @@ -271,6 +274,7 @@ async function processInputText(inputText) { else { const output = await embedder(inputText, { pooling: 'mean', normalize: true }); const vectorArray = Array.from(output["data"]); + queryEmbedding = vectorArray; return vectorArray; } } @@ -295,7 +299,6 @@ async function processQueries() { const magnitude = Math.sqrt(weightedAverageVector.reduce((sum, val) => sum + val * val, 0)); const normalizedWeightedAverageVector = weightedAverageVector.map(val => val / magnitude); - console.log(normalizedWeightedAverageVector); // Logs the normalized weighted average vector return normalizedWeightedAverageVector } @@ -303,7 +306,6 @@ async function processQueries() { let gridApi; let gridOptions; - async function sendRequest() { try { gridApi.showLoadingOverlay(); @@ -315,23 +317,21 @@ async function sendRequest() { submitButton.setAttribute("disabled", ""); let inputText = document.getElementsByClassName("inputText")[0].value.trim(); - //const trimmedInputTexts = Array.from(document.getElementsByClassName("inputText")).map(input => input.value.trim()); if (inputText !== "") { //let output = await embedder(inputText, { pooling: 'mean', normalize: true }); const collectionName = "test_collection"; - const vectorData = await processQueries();//Array.from(output["data"]); + const vectorData = await processQueries(); const filter = {}; const limit = parseInt(document.getElementById("QdrantLimit").value); const offset = 0; const withPayload = true; - const withVector = false; + const withVector = true; const scoreThreshold = null; try { searchResults = await searchPoints(collectionName, vectorData, filter, limit, offset, withPayload, withVector, scoreThreshold); - //console.log(searchResults); // Extract payload keys const payloadKeys = Object.keys(searchResults.result[0].payload); @@ -371,7 +371,6 @@ async function sendRequest() { })), ]; - // Check if the grid has already been initialized if (gridApi && thisCollection === lastCollection) { // If the grid is already initialized, update the row data @@ -379,8 +378,6 @@ async function sendRequest() { } else { try { - //gridOptions.api.destroy() - //document.getElementById("myGrid").innerHTML = ""; if (thisCollection !== lastCollection) { // update column headers if needed gridApi.updateGridOptions({ columnDefs: columnDefs }) @@ -438,11 +435,8 @@ async function sendRequest() { filterTextBox._listenerInitialized = true; } - - lastCollection = thisCollection - } catch (error) { console.error(error); } @@ -534,7 +528,6 @@ async function exportData(data, format) { URL.revokeObjectURL(csvUrl); document.body.removeChild(link); - } else if (format === 'json') { // Convert JSON to string const jsonString = JSON.stringify(jsonData, null, 2); @@ -562,17 +555,27 @@ async function exportData(data, format) { } } +async function tsne() { + semanticWorker.postMessage({ + type: "tsne", + data: { + "queryEmbedding": queryEmbedding, + "searchResults": searchResults, + "iterations": document.getElementById("dimReductionIterations").value, + "dimensionalityReductionSimilarityThreshold": document.getElementById("dimensionalityReductionSimilarityThreshold").value, + "colorBy": document.getElementById("colorBy").value + } + + }); +} + document.getElementById('copyURLButton').addEventListener('click', function () { var urlToCopy = window.location.href; - navigator.clipboard.writeText(urlToCopy) .then(function () { - console.log('URL copied to clipboard successfully: ' + urlToCopy); - // You can also show a success message here if needed }) .catch(function (err) { console.error('Failed to copy URL to clipboard: ', err); - // You can also show an error message here if needed }); }); @@ -644,6 +647,180 @@ if (URLModeHidden) { updateURL(event); } }); + }); +} + +document.getElementById('dimensionalityReduction').addEventListener('click', function (event) { + tsne(); +}); + +const plotContainer = document.getElementById("plot-container"); +let deckgl; +export async function loadScatterplot(data, similarityOpacity) { + + removeScatterplot(); + // Find the minimum and maximum similarity values, x values, and y values in the data array + const minSimilarity = Math.min(...data.map(item => item.similarity)); + const maxSimilarity = Math.max(...data.map(item => item.similarity)); + + const minX = Math.min(...data.map(item => item.x)); + const maxX = Math.max(...data.map(item => item.x)); + + const minY = Math.min(...data.map(item => item.y)); + const maxY = Math.max(...data.map(item => item.y)); + + // If needed, color by a unique colorClass value + // Count distinct colorClasses and generate unique colors + const colorClassSet = new Set(data.map(item => item.colorClass)); + const distinctColorClasses = Array.from(colorClassSet); + const distinctColorClassesLength = distinctColorClasses.length + + if (distinctColorClassesLength == 1) { + data.forEach(item => { + item.distinctColor = [13,10,253,1] + }); + } + + else { + const palette = distinctColors({ "count": distinctColorClassesLength }) + + // Add distinctColor node to each object in data + data.forEach(item => { + const colorClassIndex = distinctColorClasses.indexOf(item.colorClass); + item.distinctColor = palette[colorClassIndex]._rgb + }); + } + + data = data.map(item => { + // Normalize similarity values to the range [0, 1] + let alpha; + // Normalize x and y coordinates to the range [0, 1] + const normalizedX = (item.x - minX) / (maxX - minX); + const normalizedY = (item.y - minY) / (maxY - minY); + if (similarityOpacity) { + const normalizedSimilarity = (item.similarity - minSimilarity) / (maxSimilarity - minSimilarity); + + alpha = Math.floor(Math.min(1, Math.max(0, normalizedSimilarity)) * 255); + } + else { + alpha = 255 + } + // Map the alpha value to the entire opacity spectrum + const color = [...item.distinctColor.slice(0, -1), alpha]; + //console.log("COLOR:", color) + return { + coordinates: [normalizedX, normalizedY], + color: color, + similarity: item.similarity, + label: item.label, + }; }); + + // Calculate the bounding box of the data + const bounds = data.reduce( + (acc, point) => ({ + minX: Math.min(acc.minX, point.coordinates[0]), + minY: Math.min(acc.minY, point.coordinates[1]), + maxX: Math.max(acc.maxX, point.coordinates[0]), + maxY: Math.max(acc.maxY, point.coordinates[1]), + }), + { minX: Infinity, minY: Infinity, maxX: -Infinity, maxY: -Infinity } + ); + + deckgl = new Deck({ + canvas: 'deckgl', + container: 'plot-container', + initialViewState: { + latitude: (bounds.minY + bounds.maxY) / 2, + longitude: (bounds.minX + bounds.maxX) / 2, + zoom: 9 + }, + controller: true, + pickingRadius: 25, + layers: [ + // Add a new LineLayer for the coordinate system + /*new LineLayer({ + id: 'coordinate-system', + data: generateGridData(20), + getSourcePosition: d => d.sourcePosition, + getTargetPosition: d => d.targetPosition, + getColor: d => d.color, + getWidth: 1, + pickable: false + }), + */ + // ScatterplotLayer with all points added right away + new ScatterplotLayer({ + id: 'scatterplot', + data: data, + getPosition: d => d.coordinates, + getRadius: parseInt(document.getElementById("scatterplotRadius").value), // Adjust the radius to fit the new range + getFillColor: d => d.color, + pickable: true, // Enable picking for on-hover interaction + onHover: info => { + const tooltip = document.getElementById('tooltip'); + + if (info.object) { + const canvas = document.getElementById('deckgl'); + const rect = canvas.getBoundingClientRect(); + + // Calculate the correct position by subtracting the canvas offset and adding the scroll position + const left = window.scrollX + info.x + rect.left + 30; + const top = window.scrollY + info.y + rect.top + -50; + + tooltip.innerHTML = `${info.object.label}
Similarity: ${info.object.similarity.toFixed(2)}`; + tooltip.style.left = `${left}px`; + tooltip.style.top = `${top}px`; + tooltip.style.display = 'block'; + } else { + tooltip.style.display = 'none'; + } + }, + onClick: info => { + const tooltip = document.getElementById('tooltip'); + + if (info.object) { + const canvas = document.getElementById('deckgl'); + const rect = canvas.getBoundingClientRect(); + + // Calculate the correct position by subtracting the canvas offset and adding the scroll position + const left = window.scrollX + info.x + rect.left + 30; + const top = window.scrollY + info.y + rect.top + -50; + + tooltip.innerHTML = `${info.object.label}
Similarity: ${info.object.similarity.toFixed(2)}`; + tooltip.style.left = `${left}px`; + tooltip.style.top = `${top}px`; + tooltip.style.display = 'block'; + } else { + tooltip.style.display = 'none'; + } + } + + }) + ] + }); + + plotContainer.style.height = "700px"; } + +export function removeScatterplot() { + if (deckgl) { + deckgl.finalize(); + deckgl = null; + } +} + +worker.onmessage = function (event) { + const message = event.data; + let resolve; + + switch (message.type) { + case 'tsne': + loadScatterplot(message.plotDataArray, document.getElementById("toggleOpacity").checked); + + break + default: + console.error('Unknown message type: ' + message.type); + } +}; \ No newline at end of file diff --git a/src/js/worker.js b/src/js/worker.js new file mode 100644 index 0000000..56de56e --- /dev/null +++ b/src/js/worker.js @@ -0,0 +1,113 @@ +import init, { tSNE } from "wasm-bhtsne"; + +init(); +let queryEmbedding + +function convertFloat32ArraysToArrays(arrayOfFloat32Arrays) { + return arrayOfFloat32Arrays.reduce((accumulator, currentFloat32Array) => { + // Convert Float32Array to a regular JavaScript array using Array.from + const jsArray = Array.from(currentFloat32Array); + + // Add the converted array to the accumulator + accumulator.push(jsArray); + + return accumulator; + }, []); +} + +function calculateCosineSimilarity(embedding) { + let dotProduct = 0; + let queryMagnitude = 0; + let embeddingMagnitude = 0; + const queryEmbeddingLength = queryEmbedding.length; + + for (let i = 0; i < queryEmbeddingLength; i++) { + dotProduct += queryEmbedding[i] * embedding[i]; + queryMagnitude += queryEmbedding[i] ** 2; + embeddingMagnitude += embedding[i] ** 2; + } + + return dotProduct / (Math.sqrt(queryMagnitude) * Math.sqrt(embeddingMagnitude)); +} + +self.onmessage = async (event) => { + const message = event.data; + switch (message.type) { + case 'tsne': + const start = performance.now(); + queryEmbedding = message.data.queryEmbedding; + + //data transformation + let targetJson = {}; + let colorClassJson = []; + message.data.searchResults.result.forEach(item => { + console.log(item) + + // Construct the key for the target object by concatenating all values from item.payload + const key = Object.values(item.payload).join('
'); + + targetJson[key] = item.vector; + colorClassJson.push(item.payload[message.data.colorBy]); + + }); + + const valuesFloat32Array = Array.from(Object.values(targetJson)); + let valuesArray = convertFloat32ArraysToArrays(valuesFloat32Array); + const valuesArrayLength = valuesArray.length; + + // Check if the length is below 61 + // ugly workaround needed as the wasm module has no param for perplexity yet + + let compressed_vectors; + if (valuesArrayLength < 61) { + const vectorLength = valuesArray[0].length; // Assuming all vectors have the same length + const vectorsToAdd = 61 - valuesArrayLength; + + console.log("added: ", vectorsToAdd) + // Add random vectors to the array + for (let i = 0; i < vectorsToAdd; i++) { + const randomVector = Array.from({ length: vectorLength }, () => Math.random()); + valuesArray.push(randomVector); + } + + const tsne_encoder = new tSNE(valuesArray); + compressed_vectors = tsne_encoder.barnes_hut(message.data.iterations).slice(0, valuesArrayLength);//,theta=0.1); + } + else { + const tsne_encoder = new tSNE(valuesArray); + compressed_vectors = tsne_encoder.barnes_hut(message.data.iterations); + } + + const end = performance.now(); + console.log('BHtSNE Execution time:', Math.round(end - start), 'ms'); + + const originalKeys = Object.keys(targetJson); + const originalEmbeddings = Object.values(targetJson) + + let plotDataArray = []; + + for (let i = 0; i < originalKeys.length; i++) { + let thisVec = compressed_vectors[i]; + let similarity = calculateCosineSimilarity(originalEmbeddings[i]); + + console.log(originalKeys) + if (similarity >= message.data.dimensionalityReductionSimilarityThreshold) { + plotDataArray.push({ + "x": thisVec[0], + "y": thisVec[1], + "label": originalKeys[i], + "similarity": similarity, + "colorClass": colorClassJson[i] + }); + } + } + + self.postMessage({ + type: 'tsne', + plotDataArray + }); + break + + default: + } +}; diff --git a/webpack.config.js b/webpack.config.js index 03b0f5c..433ac66 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); // FOUC-correction module.exports = { - entry: './index.js', + entry: './src/js/index.js', mode: 'development', output: { filename: 'bundle.js',