diff --git a/greptimedb/README.md b/greptimedb/README.md new file mode 100644 index 00000000..0f2f60e8 --- /dev/null +++ b/greptimedb/README.md @@ -0,0 +1,41 @@ +# Plugin Module: greptimedb + +### How to install + +This plugin requires react and react-dom 18 + +Install peer dependencies: + +```bash +npm install react@18 react-dom@18 +``` + +Install the plugin: + +```bash +npm install @perses-dev/greptimedb-plugin +``` + +## Development + +### Setup + +Install dependencies: + +```bash +npm install +``` + +### Get Started + +Start the dev server: + +```bash +npm run dev +``` + +Build the plugin for distribution: + +```bash +npm run build +``` diff --git a/greptimedb/cue.mod/module.cue b/greptimedb/cue.mod/module.cue new file mode 100644 index 00000000..7970fdb2 --- /dev/null +++ b/greptimedb/cue.mod/module.cue @@ -0,0 +1,13 @@ +module: "github.com/perses/plugins/greptimedb@v0" +language: { + version: "v0.15.1" +} +source: { + kind: "git" +} +deps: { + "github.com/perses/shared/cue@v0": { + v: "v0.53.1" + default: true + } +} diff --git a/greptimedb/go.mod b/greptimedb/go.mod new file mode 100644 index 00000000..ff516007 --- /dev/null +++ b/greptimedb/go.mod @@ -0,0 +1,32 @@ +module github.com/perses/plugins/greptimedb + +go 1.25.5 + +require github.com/perses/perses v0.53.0 + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/go-jose/go-jose/v4 v4.1.3 // indirect + github.com/golang-jwt/jwt/v5 v5.3.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/muhlemmer/gu v0.3.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/perses/common v0.30.2 // indirect + github.com/prometheus/client_golang v1.23.2 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.67.5 // indirect + github.com/prometheus/procfs v0.17.0 // indirect + github.com/zitadel/oidc/v3 v3.45.4 // indirect + github.com/zitadel/schema v1.3.2 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/oauth2 v0.35.0 // indirect + golang.org/x/sys v0.41.0 // indirect + golang.org/x/text v0.34.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/greptimedb/go.sum b/greptimedb/go.sum new file mode 100644 index 00000000..eacb3f7c --- /dev/null +++ b/greptimedb/go.sum @@ -0,0 +1,70 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= +github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/muhlemmer/gu v0.3.1 h1:7EAqmFrW7n3hETvuAdmFmn4hS8W+z3LgKtrnow+YzNM= +github.com/muhlemmer/gu v0.3.1/go.mod h1:YHtHR+gxM+bKEIIs7Hmi9sPT3ZDUvTN/i88wQpZkrdM= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nexucis/lamenv v0.5.2 h1:tK/u3XGhCq9qIoVNcXsK9LZb8fKopm0A5weqSRvHd7M= +github.com/nexucis/lamenv v0.5.2/go.mod h1:HusJm6ltmmT7FMG8A750mOLuME6SHCsr2iFYxp5fFi0= +github.com/perses/common v0.30.2 h1:RAiVxUpX76lTCb4X7pfcXSvYdXQmZwKi4oDKAEO//u0= +github.com/perses/common v0.30.2/go.mod h1:DFtur1QPah2/ChXbKKhw7djYdwNgz27s5fPKpiK0Xao= +github.com/perses/perses v0.53.0 h1:gh0m/OE3yTG4jCkseORuT3B1qAL3VlsnBckJSbpFjPs= +github.com/perses/perses v0.53.0/go.mod h1:HsCfkI+EZta2UEDCFa//HUyLRY0Z0fElJkpAWdARbGs= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0= +github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/zitadel/oidc/v3 v3.45.4 h1:GKyWaPRVQ8sCu9XgJ3NgNGtG52FzwVJpzXjIUG2+YrI= +github.com/zitadel/oidc/v3 v3.45.4/go.mod h1:XALmFXS9/kSom9B6uWin1yJ2WTI/E4Ti5aXJdewAVEs= +github.com/zitadel/schema v1.3.2 h1:gfJvt7dOMfTmxzhscZ9KkapKo3Nei3B6cAxjav+lyjI= +github.com/zitadel/schema v1.3.2/go.mod h1:IZmdfF9Wu62Zu6tJJTH3UsArevs3Y4smfJIj3L8fzxw= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ= +golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/greptimedb/jest.config.ts b/greptimedb/jest.config.ts new file mode 100644 index 00000000..5190fb4d --- /dev/null +++ b/greptimedb/jest.config.ts @@ -0,0 +1,23 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type { Config } from '@jest/types'; +import shared from '../jest.shared'; + +const jestConfig: Config.InitialOptions = { + ...shared, + + setupFilesAfterEnv: [...(shared.setupFilesAfterEnv ?? []), '/src/setup-tests.ts'], +}; + +export default jestConfig; diff --git a/greptimedb/package-lock.json b/greptimedb/package-lock.json new file mode 100644 index 00000000..cb9a44ed --- /dev/null +++ b/greptimedb/package-lock.json @@ -0,0 +1,4387 @@ +{ + "name": "@perses-dev/greptimedb-plugin", + "version": "0.1.0-beta.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@perses-dev/greptimedb-plugin", + "version": "0.1.0-beta.0", + "peerDependencies": { + "@emotion/react": "^11.7.1", + "@emotion/styled": "^11.6.0", + "@hookform/resolvers": "^3.2.0", + "@perses-dev/components": "^0.53.1", + "@perses-dev/core": "^0.53.0", + "@perses-dev/dashboards": "^0.53.1", + "@perses-dev/explore": "^0.53.1", + "@perses-dev/plugin-system": "^0.53.1", + "@tanstack/react-query": "^4.39.1", + "date-fns": "^4.1.0", + "date-fns-tz": "^3.2.0", + "echarts": "5.5.0", + "immer": "^10.1.1", + "lodash": "^4.17.21", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0", + "react-hook-form": "^7.52.2", + "use-resize-observer": "^9.0.0" + } + }, + "node_modules/@atlaskit/pragmatic-drag-and-drop": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/@atlaskit/pragmatic-drag-and-drop/-/pragmatic-drag-and-drop-1.7.9.tgz", + "integrity": "sha512-m/bcw5flyjfcF/rdX4JeomtIBrWuDNOwcQieiywHv7zkfIRmUC34Q9ZLeNGVoz73UiGsRqxysMuw4tC7lSJ89g==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.0.0", + "bind-event-listener": "^3.0.0", + "raf-schd": "^4.0.3" + } + }, + "node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@atlaskit/pragmatic-drag-and-drop-hitbox/-/pragmatic-drag-and-drop-hitbox-1.1.0.tgz", + "integrity": "sha512-JWt6eVp6Br2FPHRM8s0dUIHQk/jFInGP1f3ti5CdtM1Ji5/pt8Akm44wDC063Gv2i5RGseixtbW0z/t6RYtbdg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@atlaskit/pragmatic-drag-and-drop": "^1.6.0", + "@babel/runtime": "^7.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz", + "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@codemirror/autocomplete": { + "version": "6.20.1", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.1.tgz", + "integrity": "sha512-1cvg3Vz1dSSToCNlJfRA2WSI4ht3K+WplO0UMOgmUYPivCyy2oueZY6Lx7M9wThm7SDUBViRmuT+OG/i8+ON9A==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.3.tgz", + "integrity": "sha512-JFRiqhKu+bvSkDLI+rUhJwSxQxYb759W5GBezE8Uc8mHLqC9aV/9aTC7yJSqCtB3F00pylrLCwnyS91Ap5ej4Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.6.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/lang-json": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz", + "integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/json": "^1.0.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.2.tgz", + "integrity": "sha512-jEPmz2nGGDxhRTg3lTpzmIyGKxz3Gp3SJES4b0nAuE5SWQoKdT5GoQ69cwMmFd+wvFUhYirtDTr0/DRHpQAyWg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.5.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.5.tgz", + "integrity": "sha512-GElsbU9G7QT9xXhpUg1zWGmftA/7jamh+7+ydKRuT0ORpWS3wOSP0yT1FOlIZa7mIJjpVPipErsyvVqB9cfTFA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.35.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/search": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.6.0.tgz", + "integrity": "sha512-koFuNXcDvyyotWcgOnZGmY7LZqEOXZaaxD/j6n18TCLx2/9HieZJ5H6hs1g8FiRxBD0DNfs0nXn17g872RmYdw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.37.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.6.0.tgz", + "integrity": "sha512-4nbvra5R5EtiCzr9BTHiTLc+MLXK2QGiAVYMyi8PkQd3SR+6ixar/Q/01Fa21TBIDOZXgeWV4WppsQolSreAPQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/theme-one-dark": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.3.tgz", + "integrity": "sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/highlight": "^1.0.0" + } + }, + "node_modules/@codemirror/view": { + "version": "6.40.0", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.40.0.tgz", + "integrity": "sha512-WA0zdU7xfF10+5I3HhUUq3kqOx3KjqmtQ9lqZjfK7jtYk4G72YW9rezcSywpaUMCWOMlq+6E0pO1IWg1TNIhtg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/state": "^6.6.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, + "node_modules/@date-fns/tz": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@date-fns/tz/-/tz-1.4.1.tgz", + "integrity": "sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA==", + "license": "MIT", + "peer": true + }, + "node_modules/@emnapi/core": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.0.tgz", + "integrity": "sha512-0DQ98G9ZQZOxfUcQn1waV2yS8aWdZ6kJMbYCJB3oUBecjWYO1fqJ+a1DRfPF3O5JEkwqwP1A9QEN/9mYm2Yd0w==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.0.tgz", + "integrity": "sha512-QN75eB0IH2ywSpRpNddCRfQIhmJYBCJ1x5Lb3IscKAL8bMnVAKnRg8dCoXbHzVLLH7P38N2Z3mtulB7W0J0FKw==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz", + "integrity": "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emotion/babel-plugin": { + "version": "11.13.5", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz", + "integrity": "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/serialize": "^1.3.3", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", + "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", + "license": "MIT", + "peer": true + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.4.0.tgz", + "integrity": "sha512-QgD4fyscGcbbKwJmqNvUMSE02OsHUa+lAWKdEUIJKgqe5IwRSKd7+KhibEWdaKwgjLj0DRSHA9biAIqGBk05lw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@emotion/memoize": "^0.9.0" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@emotion/react": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", + "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/cache": "^11.14.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", + "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", + "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==", + "license": "MIT", + "peer": true + }, + "node_modules/@emotion/styled": { + "version": "11.14.1", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz", + "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/is-prop-valid": "^1.3.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", + "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==", + "license": "MIT", + "peer": true + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz", + "integrity": "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", + "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==", + "license": "MIT", + "peer": true + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", + "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", + "license": "MIT", + "peer": true + }, + "node_modules/@fontsource/lato": { + "version": "4.5.10", + "resolved": "https://registry.npmjs.org/@fontsource/lato/-/lato-4.5.10.tgz", + "integrity": "sha512-2hYR6r661Cq9B8zugtu6yxuOKqrVhAgfOSaPSq8XoxbC4ebsl0KOTy/vPoP+9U7JuQVLfrmikirW4a9Z0nDUug==", + "license": "MIT", + "peer": true + }, + "node_modules/@hookform/resolvers": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.10.0.tgz", + "integrity": "sha512-79Dv+3mDF7i+2ajj7SkypSKHhl1cbln1OGavqrsF7p6mbUv11xpqpacPsGDCTRvCSjEEIez2ef1NveSVL3b0Ag==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "react-hook-form": "^7.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "license": "MIT", + "peer": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@juggle/resize-observer": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", + "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@lezer/common": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.1.tgz", + "integrity": "sha512-6YRVG9vBkaY7p1IVxL4s44n5nUnaNnGM2/AckNgYOnxTG2kWh1vR8BMxPseWPjRNpb5VtXnMpeYAEAADoRV1Iw==", + "license": "MIT", + "peer": true + }, + "node_modules/@lezer/highlight": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", + "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@lezer/common": "^1.3.0" + } + }, + "node_modules/@lezer/json": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz", + "integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.8.tgz", + "integrity": "sha512-bPWa0Pgx69ylNlMlPvBPryqeLYQjyJjqPx+Aupm5zydLIF3NE+6MMLT8Yi23Bd9cif9VS00aUebn+6fDIGBcDA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", + "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", + "license": "MIT", + "peer": true + }, + "node_modules/@module-federation/bridge-react-webpack-plugin": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/bridge-react-webpack-plugin/-/bridge-react-webpack-plugin-0.21.6.tgz", + "integrity": "sha512-lJMmdhD4VKVkeg8RHb+Jwe6Ou9zKVgjtb1inEURDG/sSS2ksdZA8pVKLYbRPRbdmjr193Y8gJfqFbI2dqoyc/g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/sdk": "0.21.6", + "@types/semver": "7.5.8", + "semver": "7.6.3" + } + }, + "node_modules/@module-federation/cli": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/cli/-/cli-0.21.6.tgz", + "integrity": "sha512-qNojnlc8pTyKtK7ww3i/ujLrgWwgXqnD5DcDPsjADVIpu7STaoaVQ0G5GJ7WWS/ajXw6EyIAAGW/AMFh4XUxsQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/dts-plugin": "0.21.6", + "@module-federation/sdk": "0.21.6", + "chalk": "3.0.0", + "commander": "11.1.0", + "jiti": "2.4.2" + }, + "bin": { + "mf": "bin/mf.js" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@module-federation/data-prefetch": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/data-prefetch/-/data-prefetch-0.21.6.tgz", + "integrity": "sha512-8HD7ZhtWZ9vl6i3wA7M8cEeCRdtvxt09SbMTfqIPm+5eb/V4ijb8zGTYSRhNDb5RCB+BAixaPiZOWKXJ63/rVw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/runtime": "0.21.6", + "@module-federation/sdk": "0.21.6", + "fs-extra": "9.1.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@module-federation/dts-plugin": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/dts-plugin/-/dts-plugin-0.21.6.tgz", + "integrity": "sha512-YIsDk8/7QZIWn0I1TAYULniMsbyi2LgKTi9OInzVmZkwMC6644x/ratTWBOUDbdY1Co+feNkoYeot1qIWv2L7w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/error-codes": "0.21.6", + "@module-federation/managers": "0.21.6", + "@module-federation/sdk": "0.21.6", + "@module-federation/third-party-dts-extractor": "0.21.6", + "adm-zip": "^0.5.10", + "ansi-colors": "^4.1.3", + "axios": "^1.12.0", + "chalk": "3.0.0", + "fs-extra": "9.1.0", + "isomorphic-ws": "5.0.0", + "koa": "3.0.3", + "lodash.clonedeepwith": "4.5.0", + "log4js": "6.9.1", + "node-schedule": "2.1.1", + "rambda": "^9.1.0", + "ws": "8.18.0" + }, + "peerDependencies": { + "typescript": "^4.9.0 || ^5.0.0", + "vue-tsc": ">=1.0.24" + }, + "peerDependenciesMeta": { + "vue-tsc": { + "optional": true + } + } + }, + "node_modules/@module-federation/enhanced": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/enhanced/-/enhanced-0.21.6.tgz", + "integrity": "sha512-8PFQxtmXc6ukBC4CqGIoc96M2Ly9WVwCPu4Ffvt+K/SB6rGbeFeZoYAwREV1zGNMJ5v5ly6+AHIEOBxNuSnzSg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/bridge-react-webpack-plugin": "0.21.6", + "@module-federation/cli": "0.21.6", + "@module-federation/data-prefetch": "0.21.6", + "@module-federation/dts-plugin": "0.21.6", + "@module-federation/error-codes": "0.21.6", + "@module-federation/inject-external-runtime-core-plugin": "0.21.6", + "@module-federation/managers": "0.21.6", + "@module-federation/manifest": "0.21.6", + "@module-federation/rspack": "0.21.6", + "@module-federation/runtime-tools": "0.21.6", + "@module-federation/sdk": "0.21.6", + "btoa": "^1.2.1", + "schema-utils": "^4.3.0", + "upath": "2.0.1" + }, + "bin": { + "mf": "bin/mf.js" + }, + "peerDependencies": { + "typescript": "^4.9.0 || ^5.0.0", + "vue-tsc": ">=1.0.24", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vue-tsc": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/@module-federation/error-codes": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/error-codes/-/error-codes-0.21.6.tgz", + "integrity": "sha512-MLJUCQ05KnoVl8xd6xs9a5g2/8U+eWmVxg7xiBMeR0+7OjdWUbHwcwgVFatRIwSZvFgKHfWEiI7wsU1q1XbTRQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@module-federation/inject-external-runtime-core-plugin": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/inject-external-runtime-core-plugin/-/inject-external-runtime-core-plugin-0.21.6.tgz", + "integrity": "sha512-DJQne7NQ988AVi3QB8byn12FkNb+C2lBeU1NRf8/WbL0gmHsr6kW8hiEJCm8LYaURwtsQqtsEV7i+8+51qjSmQ==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "@module-federation/runtime-tools": "0.21.6" + } + }, + "node_modules/@module-federation/managers": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/managers/-/managers-0.21.6.tgz", + "integrity": "sha512-BeV6m2/7kF5MDVz9JJI5T8h8lMosnXkH2bOxxFewcra7ZjvDOgQu7WIio0mgk5l1zjNPvnEVKhnhrenEdcCiWg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/sdk": "0.21.6", + "find-pkg": "2.0.0", + "fs-extra": "9.1.0" + } + }, + "node_modules/@module-federation/manifest": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/manifest/-/manifest-0.21.6.tgz", + "integrity": "sha512-yg93+I1qjRs5B5hOSvjbjmIoI2z3th8/yst9sfwvx4UDOG1acsE3HHMyPN0GdoIGwplC/KAnU5NmUz4tREUTGQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/dts-plugin": "0.21.6", + "@module-federation/managers": "0.21.6", + "@module-federation/sdk": "0.21.6", + "chalk": "3.0.0", + "find-pkg": "2.0.0" + } + }, + "node_modules/@module-federation/rspack": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/rspack/-/rspack-0.21.6.tgz", + "integrity": "sha512-SB+z1P+Bqe3R6geZje9dp0xpspX6uash+zO77nodmUy8PTTBlkL7800Cq2FMLKUdoTZHJTBVXf0K6CqQWSlItg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/bridge-react-webpack-plugin": "0.21.6", + "@module-federation/dts-plugin": "0.21.6", + "@module-federation/inject-external-runtime-core-plugin": "0.21.6", + "@module-federation/managers": "0.21.6", + "@module-federation/manifest": "0.21.6", + "@module-federation/runtime-tools": "0.21.6", + "@module-federation/sdk": "0.21.6", + "btoa": "1.2.1" + }, + "peerDependencies": { + "@rspack/core": ">=0.7", + "typescript": "^4.9.0 || ^5.0.0", + "vue-tsc": ">=1.0.24" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vue-tsc": { + "optional": true + } + } + }, + "node_modules/@module-federation/runtime": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/runtime/-/runtime-0.21.6.tgz", + "integrity": "sha512-+caXwaQqwTNh+CQqyb4mZmXq7iEemRDrTZQGD+zyeH454JAYnJ3s/3oDFizdH6245pk+NiqDyOOkHzzFQorKhQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/error-codes": "0.21.6", + "@module-federation/runtime-core": "0.21.6", + "@module-federation/sdk": "0.21.6" + } + }, + "node_modules/@module-federation/runtime-core": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/runtime-core/-/runtime-core-0.21.6.tgz", + "integrity": "sha512-5Hd1Y5qp5lU/aTiK66lidMlM/4ji2gr3EXAtJdreJzkY+bKcI5+21GRcliZ4RAkICmvdxQU5PHPL71XmNc7Lsw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/error-codes": "0.21.6", + "@module-federation/sdk": "0.21.6" + } + }, + "node_modules/@module-federation/runtime-tools": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/runtime-tools/-/runtime-tools-0.21.6.tgz", + "integrity": "sha512-fnP+ZOZTFeBGiTAnxve+axGmiYn2D60h86nUISXjXClK3LUY1krUfPgf6MaD4YDJ4i51OGXZWPekeMe16pkd8Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/runtime": "0.21.6", + "@module-federation/webpack-bundler-runtime": "0.21.6" + } + }, + "node_modules/@module-federation/sdk": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/sdk/-/sdk-0.21.6.tgz", + "integrity": "sha512-x6hARETb8iqHVhEsQBysuWpznNZViUh84qV2yE7AD+g7uIzHKiYdoWqj10posbo5XKf/147qgWDzKZoKoEP2dw==", + "license": "MIT", + "peer": true + }, + "node_modules/@module-federation/third-party-dts-extractor": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/third-party-dts-extractor/-/third-party-dts-extractor-0.21.6.tgz", + "integrity": "sha512-Il6x4hLsvCgZNk1DFwuMBNeoxD1BsZ5AW2BI/nUgu0k5FiAvfcz1OFawRFEHtaM/kVrCsymMOW7pCao90DaX3A==", + "license": "MIT", + "peer": true, + "dependencies": { + "find-pkg": "2.0.0", + "fs-extra": "9.1.0", + "resolve": "1.22.8" + } + }, + "node_modules/@module-federation/webpack-bundler-runtime": { + "version": "0.21.6", + "resolved": "https://registry.npmjs.org/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.21.6.tgz", + "integrity": "sha512-7zIp3LrcWbhGuFDTUMLJ2FJvcwjlddqhWGxi/MW3ur1a+HaO8v5tF2nl+vElKmbG1DFLU/52l3PElVcWf/YcsQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/runtime": "0.21.6", + "@module-federation/sdk": "0.21.6" + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.5.0.tgz", + "integrity": "sha512-LGb8t8i6M2ZtS3Drn3GbTI1DVhDY6FJ9crEey2lZ0aN2EMZo8IZBZj9wRf4vqbZHaWjsYgtbOnJw5V8UWbmK2Q==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/material": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.5.0.tgz", + "integrity": "sha512-yjvtXoFcrPLGtgKRxFaH6OQPtcLPhkloC0BML6rBG5UeldR0nPULR/2E2BfXdo5JNV7j7lOzrrLX2Qf/iSidow==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/core-downloads-tracker": "^6.5.0", + "@mui/system": "^6.5.0", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.12", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^19.0.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@mui/material-pigment-css": "^6.5.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@mui/material-pigment-css": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/private-theming": { + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.4.9.tgz", + "integrity": "sha512-LktcVmI5X17/Q5SkwjCcdOLBzt1hXuc14jYa7NPShog0GBDCDvKtcnP0V7a2s6EiVRlv7BzbWEJzH6+l/zaCxw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/utils": "^6.4.9", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.5.0.tgz", + "integrity": "sha512-8woC2zAqF4qUDSPIBZ8v3sakj+WgweolpyM/FXf8jAx6FMls+IE4Y8VDZc+zS805J7PRz31vz73n2SovKGaYgw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.26.0", + "@emotion/cache": "^11.13.5", + "@emotion/serialize": "^1.3.3", + "@emotion/sheet": "^1.4.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.5.0.tgz", + "integrity": "sha512-XcbBYxDS+h/lgsoGe78ExXFZXtuIlSBpn/KsZq8PtZcIkUNJInkuDqcLd2rVBQrDC1u+rvVovdaWPf2FHKJf3w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/private-theming": "^6.4.9", + "@mui/styled-engine": "^6.5.0", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.24", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.24.tgz", + "integrity": "sha512-3c8tRt/CbWZ+pEg7QpSwbdxOk36EfmhbKf6AGZsD1EcLDLTSZoxxJ86FVtcjxvjuhdyBiWKSTGZFaXCnidO2kw==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.4.9.tgz", + "integrity": "sha512-Y12Q9hbK9g+ZY0T3Rxrx9m2m10gaphDuUMgWxyV5kNJevVxXYCLclYUCC9vXaIk1/NdNDTcW2Yfr2OGvNFNmHg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/types": "~7.2.24", + "@types/prop-types": "^15.7.14", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-is": "^19.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/x-date-pickers": { + "version": "7.29.4", + "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-7.29.4.tgz", + "integrity": "sha512-wJ3tsqk/y6dp+mXGtT9czciAMEO5Zr3IIAHg9x6IL0Eqanqy0N3chbmQQZv3iq0m2qUpQDLvZ4utZBUTJdjNzw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.25.7", + "@mui/utils": "^5.16.6 || ^6.0.0 || ^7.0.0", + "@mui/x-internals": "7.29.0", + "@types/react-transition-group": "^4.4.11", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0", + "@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0", + "date-fns": "^2.25.0 || ^3.2.0 || ^4.0.0", + "date-fns-jalali": "^2.13.0-0 || ^3.2.0-0 || ^4.0.0-0", + "dayjs": "^1.10.7", + "luxon": "^3.0.2", + "moment": "^2.29.4", + "moment-hijri": "^2.1.2 || ^3.0.0", + "moment-jalaali": "^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "date-fns": { + "optional": true + }, + "date-fns-jalali": { + "optional": true + }, + "dayjs": { + "optional": true + }, + "luxon": { + "optional": true + }, + "moment": { + "optional": true + }, + "moment-hijri": { + "optional": true + }, + "moment-jalaali": { + "optional": true + } + } + }, + "node_modules/@mui/x-internals": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@mui/x-internals/-/x-internals-7.29.0.tgz", + "integrity": "sha512-+Gk6VTZIFD70XreWvdXBwKd8GZ2FlSCuecQFzm6znwqXg1ZsndavrhG9tkxpxo2fM1Zf7Tk8+HcOO0hCbhTQFA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.25.7", + "@mui/utils": "^5.16.6 || ^6.0.0 || ^7.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.7.tgz", + "integrity": "sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@emnapi/core": "^1.5.0", + "@emnapi/runtime": "^1.5.0", + "@tybys/wasm-util": "^0.10.1" + } + }, + "node_modules/@nexucis/fuzzy": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@nexucis/fuzzy/-/fuzzy-0.5.1.tgz", + "integrity": "sha512-+swL9itqBe1rx5Pr8ihaIS7STOeFI90HpOFF8y/3wo3ryTxKs0Hf4xc+wiA4yi9nrY4wo3VC8HJOxNiekSBE4w==", + "license": "MIT", + "peer": true + }, + "node_modules/@perses-dev/components": { + "version": "0.53.1", + "resolved": "https://registry.npmjs.org/@perses-dev/components/-/components-0.53.1.tgz", + "integrity": "sha512-29zgT5oc6mf8E2FSWr/38nphtbdGc27oNM9IPmuE0pYmhKohnZxBehGGFHWTr3px8mv3VRrmh922+F1hWEa4yg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@atlaskit/pragmatic-drag-and-drop": "^1.4.0", + "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3", + "@codemirror/lang-json": "^6.0.1", + "@date-fns/tz": "^1.4.1", + "@fontsource/lato": "^4.5.10", + "@mui/x-date-pickers": "^7.23.1", + "@perses-dev/core": "0.53.0", + "@tanstack/react-table": "^8.20.5", + "@uiw/react-codemirror": "^4.19.1", + "date-fns": "^4.1.0", + "echarts": "5.5.0", + "immer": "^10.1.1", + "lodash": "^4.17.21", + "mathjs": "^10.6.4", + "mdi-material-ui": "^7.9.2", + "notistack": "^3.0.2", + "react-colorful": "^5.6.1", + "react-error-boundary": "^3.1.4", + "react-hook-form": "^7.51.3", + "react-virtuoso": "^4.12.2" + }, + "peerDependencies": { + "@mui/material": "^6.1.10", + "lodash": "^4.17.21", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" + } + }, + "node_modules/@perses-dev/components/node_modules/@perses-dev/core": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@perses-dev/core/-/core-0.53.0.tgz", + "integrity": "sha512-mOs+lNXo4Cy8RvFD1dhPQuXp7+57njEVbF5e3iNrqbgxmmEcP2SdAaNASWB7ki4IgFiJuZwqLH56SlqARWN7hw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "date-fns": "^4.1.0", + "lodash": "^4.17.21", + "mathjs": "^10.6.4", + "numbro": "^2.3.6", + "zod": "^3.21.4" + } + }, + "node_modules/@perses-dev/core": { + "version": "0.53.1", + "resolved": "https://registry.npmjs.org/@perses-dev/core/-/core-0.53.1.tgz", + "integrity": "sha512-pYH1XyJ4myu42wJjTwLJ7jz5u82ye1prqIeCkuh3lGUjxLx9kjeZlM4KjjWamudfc2xereh+1V/dNPKt0B8x9w==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "date-fns": "^4.1.0", + "lodash": "^4.17.21", + "mathjs": "^10.6.4", + "numbro": "^2.3.6", + "zod": "^3.21.4" + } + }, + "node_modules/@perses-dev/dashboards": { + "version": "0.53.1", + "resolved": "https://registry.npmjs.org/@perses-dev/dashboards/-/dashboards-0.53.1.tgz", + "integrity": "sha512-JxbqWuSubJb8qm98Vb+dQHFPbZwg9Gh0mCBCJrcIzlz4u2tevPE+Jtmzig6+fPKscjQJ0tqL7GGc38bJlzrA7A==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@perses-dev/components": "0.53.1", + "@perses-dev/core": "0.53.0", + "@perses-dev/plugin-system": "0.53.1", + "@types/react-grid-layout": "^1.3.2", + "date-fns": "^4.1.0", + "immer": "^10.1.1", + "mdi-material-ui": "^7.9.2", + "react-grid-layout": "^1.3.4", + "react-hook-form": "^7.46.1", + "react-intersection-observer": "^9.4.0", + "use-immer": "^0.11.0", + "use-query-params": "^2.2.1", + "use-resize-observer": "^9.0.0", + "yaml": "^2.7.0", + "zustand": "^4.3.3" + }, + "peerDependencies": { + "@mui/material": "^6.1.10", + "@tanstack/react-query": "^4.39.1", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" + } + }, + "node_modules/@perses-dev/dashboards/node_modules/@perses-dev/core": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@perses-dev/core/-/core-0.53.0.tgz", + "integrity": "sha512-mOs+lNXo4Cy8RvFD1dhPQuXp7+57njEVbF5e3iNrqbgxmmEcP2SdAaNASWB7ki4IgFiJuZwqLH56SlqARWN7hw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "date-fns": "^4.1.0", + "lodash": "^4.17.21", + "mathjs": "^10.6.4", + "numbro": "^2.3.6", + "zod": "^3.21.4" + } + }, + "node_modules/@perses-dev/explore": { + "version": "0.53.1", + "resolved": "https://registry.npmjs.org/@perses-dev/explore/-/explore-0.53.1.tgz", + "integrity": "sha512-xdWdbhNvWalmiDkjWEfRlJ/DgVYyTZoRWcuMhqtAYzKJ5/6CDK6d/l/HIx7jk+IkfvXUia0BJQ3kGRTWTgwSsg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@nexucis/fuzzy": "^0.5.1", + "@perses-dev/components": "0.53.1", + "@perses-dev/core": "0.53.0", + "@perses-dev/dashboards": "0.53.1", + "@perses-dev/plugin-system": "0.53.1", + "@types/react-grid-layout": "^1.3.2", + "date-fns": "^4.1.0", + "immer": "^10.1.1", + "mdi-material-ui": "^7.9.2", + "qs": "^6.14.0", + "react-grid-layout": "^1.3.4", + "react-hook-form": "^7.46.1", + "react-intersection-observer": "^9.4.0", + "react-virtuoso": "^4.12.2", + "use-immer": "^0.11.0", + "use-query-params": "^2.2.1", + "use-resize-observer": "^9.0.0", + "zod": "^3.21.4", + "zustand": "^4.3.3" + }, + "peerDependencies": { + "@mui/material": "^6.1.10", + "@tanstack/react-query": "^4.39.1", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" + } + }, + "node_modules/@perses-dev/explore/node_modules/@perses-dev/core": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@perses-dev/core/-/core-0.53.0.tgz", + "integrity": "sha512-mOs+lNXo4Cy8RvFD1dhPQuXp7+57njEVbF5e3iNrqbgxmmEcP2SdAaNASWB7ki4IgFiJuZwqLH56SlqARWN7hw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "date-fns": "^4.1.0", + "lodash": "^4.17.21", + "mathjs": "^10.6.4", + "numbro": "^2.3.6", + "zod": "^3.21.4" + } + }, + "node_modules/@perses-dev/plugin-system": { + "version": "0.53.1", + "resolved": "https://registry.npmjs.org/@perses-dev/plugin-system/-/plugin-system-0.53.1.tgz", + "integrity": "sha512-woR+k+aJsWHSAfQFEov+unBt9Loqr8J5pNDAQ66EJD3H1UXVd30OqGNaMoJ9fNzZGLVzHn6rxfj1XNnX7DgUkw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@module-federation/enhanced": "^0.21.4", + "@perses-dev/components": "0.53.1", + "@perses-dev/core": "0.53.0", + "date-fns": "^4.1.0", + "date-fns-tz": "^3.2.0", + "immer": "^10.1.1", + "react-hook-form": "^7.46.1", + "use-immer": "^0.11.0", + "use-query-params": "^2.2.1", + "zod": "^3.22.2" + }, + "peerDependencies": { + "@hookform/resolvers": "^3.2.0", + "@mui/material": "^6.1.10", + "@tanstack/react-query": "^4.39.1", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" + } + }, + "node_modules/@perses-dev/plugin-system/node_modules/@perses-dev/core": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@perses-dev/core/-/core-0.53.0.tgz", + "integrity": "sha512-mOs+lNXo4Cy8RvFD1dhPQuXp7+57njEVbF5e3iNrqbgxmmEcP2SdAaNASWB7ki4IgFiJuZwqLH56SlqARWN7hw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "date-fns": "^4.1.0", + "lodash": "^4.17.21", + "mathjs": "^10.6.4", + "numbro": "^2.3.6", + "zod": "^3.21.4" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@rspack/binding": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-1.7.8.tgz", + "integrity": "sha512-P4fbrQx5hRhAiC8TBTEMCTnNawrIzJLjWwAgrTwRxjgenpjNvimEkQBtSGrXOY+c+MV5Q74P+9wPvVWLKzRkQQ==", + "license": "MIT", + "peer": true, + "optionalDependencies": { + "@rspack/binding-darwin-arm64": "1.7.8", + "@rspack/binding-darwin-x64": "1.7.8", + "@rspack/binding-linux-arm64-gnu": "1.7.8", + "@rspack/binding-linux-arm64-musl": "1.7.8", + "@rspack/binding-linux-x64-gnu": "1.7.8", + "@rspack/binding-linux-x64-musl": "1.7.8", + "@rspack/binding-wasm32-wasi": "1.7.8", + "@rspack/binding-win32-arm64-msvc": "1.7.8", + "@rspack/binding-win32-ia32-msvc": "1.7.8", + "@rspack/binding-win32-x64-msvc": "1.7.8" + } + }, + "node_modules/@rspack/binding-darwin-arm64": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.7.8.tgz", + "integrity": "sha512-KS6SRc+4VYRdX1cKr1j1HEuMNyEzt7onBS0rkenaiCRRYF0z4WNZNyZqRiuxgM3qZ3TISF7gdmgJQyd4ZB43ig==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true + }, + "node_modules/@rspack/binding-darwin-x64": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.7.8.tgz", + "integrity": "sha512-uyXSDKLg2CtqIJrsJDlCqQH80YIPsCUiTToJ59cXAG3v4eke0Qbiv6d/+pV0h/mc0u4inAaSkr5dD18zkMIghw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true + }, + "node_modules/@rspack/binding-linux-arm64-gnu": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.7.8.tgz", + "integrity": "sha512-dD6gSHA18Uj0eqc1FCwwQ5IO5mIckrpYN4H4kPk9Pjau+1mxWvC4y5Lryz1Z8P/Rh1lnQ/wwGE0XL9nd80+LqQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rspack/binding-linux-arm64-musl": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.7.8.tgz", + "integrity": "sha512-m+uBi9mEVGkZ02PPOAYN2BSmmvc00XGa6v9CjV8qLpolpUXQIMzDNG+i1fD5SHp8LO+XWsZJOHypMsT0MzGTGw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rspack/binding-linux-x64-gnu": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.7.8.tgz", + "integrity": "sha512-IAPp2L3yS33MAEkcGn/I1gO+a+WExJHXz2ZlRlL2oFCUGpYi2ZQHyAcJ3o2tJqkXmdqsTiN+OjEVMd/RcLa24g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rspack/binding-linux-x64-musl": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.7.8.tgz", + "integrity": "sha512-do/QNzb4GWdXCsipblDcroqRDR3BFcbyzpZpAw/3j9ajvEqsOKpdHZpILT2NZX/VahhjqfqB3k0kJVt3uK7UYQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rspack/binding-wasm32-wasi": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-1.7.8.tgz", + "integrity": "sha512-mHtgYTpdhx01i0XNKFYBZyCjtv9YUe/sDfpD1QK4FytPFB+1VpYnmZiaJIMM77VpNsjxGAqWhmUYxi2P6jWifw==", + "cpu": [ + "wasm32" + ], + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@napi-rs/wasm-runtime": "1.0.7" + } + }, + "node_modules/@rspack/binding-win32-arm64-msvc": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.7.8.tgz", + "integrity": "sha512-Mkxg86F7kIT4pM9XvE/1LAGjK5NOQi/GJxKyyiKbUAeKM8XBUizVeNuvKR0avf2V5IDAIRXiH1SX8SpujMJteA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true + }, + "node_modules/@rspack/binding-win32-ia32-msvc": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.7.8.tgz", + "integrity": "sha512-VmTOZ/X7M85lKFNwb2qJpCRzr4SgO42vucq/X7Uz1oSoTPAf8UUMNdi7BPnu+D4lgy6l8PwV804ZyHO3gGsvPA==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true + }, + "node_modules/@rspack/binding-win32-x64-msvc": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.7.8.tgz", + "integrity": "sha512-BK0I4HAwp/yQLnmdJpUtGHcht3x11e9fZwyaiMzznznFc+Oypbf+FS5h+aBgpb53QnNkPpdG7MfAPoKItOcU8A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true + }, + "node_modules/@rspack/core": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.7.8.tgz", + "integrity": "sha512-kT6yYo8xjKoDfM7iB8N9AmN9DJIlrs7UmQDbpTu1N4zaZocN1/t2fIAWOKjr5+3eJlZQR2twKZhDVHNLbLPjOw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/runtime-tools": "0.22.0", + "@rspack/binding": "1.7.8", + "@rspack/lite-tapable": "1.1.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.1" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@rspack/core/node_modules/@module-federation/error-codes": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@module-federation/error-codes/-/error-codes-0.22.0.tgz", + "integrity": "sha512-xF9SjnEy7vTdx+xekjPCV5cIHOGCkdn3pIxo9vU7gEZMIw0SvAEdsy6Uh17xaCpm8V0FWvR0SZoK9Ik6jGOaug==", + "license": "MIT", + "peer": true + }, + "node_modules/@rspack/core/node_modules/@module-federation/runtime": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@module-federation/runtime/-/runtime-0.22.0.tgz", + "integrity": "sha512-38g5iPju2tPC3KHMPxRKmy4k4onNp6ypFPS1eKGsNLUkXgHsPMBFqAjDw96iEcjri91BrahG4XcdyKi97xZzlA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/error-codes": "0.22.0", + "@module-federation/runtime-core": "0.22.0", + "@module-federation/sdk": "0.22.0" + } + }, + "node_modules/@rspack/core/node_modules/@module-federation/runtime-core": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@module-federation/runtime-core/-/runtime-core-0.22.0.tgz", + "integrity": "sha512-GR1TcD6/s7zqItfhC87zAp30PqzvceoeDGYTgF3Vx2TXvsfDrhP6Qw9T4vudDQL3uJRne6t7CzdT29YyVxlgIA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/error-codes": "0.22.0", + "@module-federation/sdk": "0.22.0" + } + }, + "node_modules/@rspack/core/node_modules/@module-federation/runtime-tools": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@module-federation/runtime-tools/-/runtime-tools-0.22.0.tgz", + "integrity": "sha512-4ScUJ/aUfEernb+4PbLdhM/c60VHl698Gn1gY21m9vyC1Ucn69fPCA1y2EwcCB7IItseRMoNhdcWQnzt/OPCNA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/runtime": "0.22.0", + "@module-federation/webpack-bundler-runtime": "0.22.0" + } + }, + "node_modules/@rspack/core/node_modules/@module-federation/sdk": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@module-federation/sdk/-/sdk-0.22.0.tgz", + "integrity": "sha512-x4aFNBKn2KVQRuNVC5A7SnrSCSqyfIWmm1DvubjbO9iKFe7ith5niw8dqSFBekYBg2Fwy+eMg4sEFNVvCAdo6g==", + "license": "MIT", + "peer": true + }, + "node_modules/@rspack/core/node_modules/@module-federation/webpack-bundler-runtime": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.22.0.tgz", + "integrity": "sha512-aM8gCqXu+/4wBmJtVeMeeMN5guw3chf+2i6HajKtQv7SJfxV/f4IyNQJUeUQu9HfiAZHjqtMV5Lvq/Lvh8LdyA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@module-federation/runtime": "0.22.0", + "@module-federation/sdk": "0.22.0" + } + }, + "node_modules/@rspack/lite-tapable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rspack/lite-tapable/-/lite-tapable-1.1.0.tgz", + "integrity": "sha512-E2B0JhYFmVAwdDiG14+DW0Di4Ze4Jg10Pc4/lILUrd5DRCaklduz2OvJ5HYQ6G+hd+WTzqQb3QnDNfK4yvAFYw==", + "license": "MIT", + "peer": true + }, + "node_modules/@tanstack/query-core": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.43.0.tgz", + "integrity": "sha512-m1QeUUIpNXDYxmfuuWNFZLky0EwVmbE0hj8ulZ2nIGA1183raJgDCn0IKlxug80NotRqzodxAaoYTKHbE1/P/Q==", + "license": "MIT", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.43.0.tgz", + "integrity": "sha512-Lj8luFKHQL27oZbw5T8xdTbsfAPp2+bCtSCa2bAVvIwnvNfRP0hpB1GxfKFgCktat8lPcYBHAu8eMTXzz2sQtQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@tanstack/query-core": "4.43.0", + "use-sync-external-store": "^1.6.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-native": "*" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/@tanstack/react-table": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/@tanstack/react-table/-/react-table-8.21.3.tgz", + "integrity": "sha512-5nNMTSETP4ykGegmVkhjcS8tTLW6Vl4axfEGQN3v0zdHYbK4UfoqfPChclTrJ4EoK9QynqAu9oUf8VEmrpZ5Ww==", + "license": "MIT", + "peer": true, + "dependencies": { + "@tanstack/table-core": "8.21.3" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, + "node_modules/@tanstack/table-core": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.21.3.tgz", + "integrity": "sha512-ldZXEhOBb8Is7xLs01fR3YEc3DERiz5silj8tnGkFZytt1abEvl/GhUmCE0PMLaMPTa3Jk4HbKmRlHmu+gCftg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/react": { + "version": "19.2.14", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", + "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-grid-layout": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/@types/react-grid-layout/-/react-grid-layout-1.3.6.tgz", + "integrity": "sha512-Cw7+sb3yyjtmxwwJiXtEXcu5h4cgs+sCGkHwHXsFmPyV30bf14LeD/fa2LwQovuD2HWxCcjIdNhDlcYGj95qGA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@uiw/codemirror-extensions-basic-setup": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.25.8.tgz", + "integrity": "sha512-9Rr+liiBmK4xzZHszL+twNRJApthqmITBwDP3emNTtTrkBFN4gHlqfp+nodKmoVt1+bUH1qQCtyqt+7dbDTHiw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + }, + "peerDependencies": { + "@codemirror/autocomplete": ">=6.0.0", + "@codemirror/commands": ">=6.0.0", + "@codemirror/language": ">=6.0.0", + "@codemirror/lint": ">=6.0.0", + "@codemirror/search": ">=6.0.0", + "@codemirror/state": ">=6.0.0", + "@codemirror/view": ">=6.0.0" + } + }, + "node_modules/@uiw/react-codemirror": { + "version": "4.25.8", + "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.25.8.tgz", + "integrity": "sha512-A0aLOuJZm2yJ+U9GlMFwxwFciztjd5LhcAG4SMqFxdD58wH+sCQXuY4UU5J2hqgS390qAlShtUgREvJPUonbuQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.18.6", + "@codemirror/commands": "^6.1.0", + "@codemirror/state": "^6.1.1", + "@codemirror/theme-one-dark": "^6.0.0", + "@uiw/codemirror-extensions-basic-setup": "4.25.8", + "codemirror": "^6.0.0" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + }, + "peerDependencies": { + "@babel/runtime": ">=7.11.0", + "@codemirror/state": ">=6.0.0", + "@codemirror/theme-one-dark": ">=6.0.0", + "@codemirror/view": ">=6.0.0", + "codemirror": ">=6.0.0", + "react": ">=17.0.0", + "react-dom": ">=17.0.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "peer": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/adm-zip": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz", + "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.0" + } + }, + "node_modules/ajv": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT", + "peer": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/axios": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", + "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/bind-event-listener": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bind-event-listener/-/bind-event-listener-3.0.0.tgz", + "integrity": "sha512-PJvH288AWQhKs2v9zyfYdPzlPqf5bXbGMmhmUIY9x4dAUGIWgomO771oBQNwJnMQSnUIXhKu6sgzpBRXTlvb8Q==", + "license": "MIT", + "peer": true + }, + "node_modules/btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "license": "(MIT OR Apache-2.0)", + "peer": true, + "bin": { + "btoa": "bin/btoa.js" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/codemirror": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", + "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", + "peer": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "peer": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/complex.js": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.4.3.tgz", + "integrity": "sha512-UrQVSUur14tNX6tiP4y8T4w4FeJAX3bi2cIv0pu/DTLFNxoq7z2Yh83Vfzztj6Px3X/lubqQ9IrPp7Bpn6p4MQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "license": "MIT", + "peer": true + }, + "node_modules/cookies": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.9.1.tgz", + "integrity": "sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==", + "license": "MIT", + "peer": true, + "dependencies": { + "depd": "~2.0.0", + "keygrip": "~1.1.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cosmiconfig/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/crelt": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", + "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", + "license": "MIT", + "peer": true + }, + "node_modules/cron-parser": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz", + "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "luxon": "^3.2.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT", + "peer": true + }, + "node_modules/date-fns": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", + "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", + "license": "MIT", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, + "node_modules/date-fns-tz": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-3.2.0.tgz", + "integrity": "sha512-sg8HqoTEulcbbbVXeg84u5UnlsQa8GS5QXMqjjYIhS4abEVVKIUwe0/l/UhrZdKaL/W5eWZNlbTeEIiOXTcsBQ==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "date-fns": "^3.0.0 || ^4.0.0" + } + }, + "node_modules/date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "license": "MIT", + "peer": true + }, + "node_modules/deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==", + "license": "MIT", + "peer": true + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "license": "MIT", + "peer": true + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/echarts": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.5.0.tgz", + "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.5.0" + } + }, + "node_modules/echarts/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "license": "0BSD", + "peer": true + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT", + "peer": true + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT", + "peer": true + }, + "node_modules/escape-latex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/escape-latex/-/escape-latex-1.2.0.tgz", + "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw==", + "license": "MIT", + "peer": true + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "license": "MIT", + "peer": true, + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.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", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT", + "peer": true + }, + "node_modules/fast-equals": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-4.0.3.tgz", + "integrity": "sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg==", + "license": "MIT", + "peer": true + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/find-file-up": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-2.0.1.tgz", + "integrity": "sha512-qVdaUhYO39zmh28/JLQM5CoYN9byEOKEH4qfa8K1eNV17W0UUMJ9WgbR/hHFH+t5rcl+6RTb5UC7ck/I+uRkpQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-pkg/-/find-pkg-2.0.0.tgz", + "integrity": "sha512-WgZ+nKbELDa6N3i/9nrHeNznm+lY3z4YfhDDWgW+5P0pdmMj26bxaxU11ookgY3NyP9GC7HvZ9etp0jRFqGEeQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "find-file-up": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "license": "MIT", + "peer": true + }, + "node_modules/flatted": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.1.tgz", + "integrity": "sha512-IxfVbRFVlV8V/yRaGzk0UVIcsKKHMSfYw66T/u4nTwlWteQePsxe//LjudR1AMX4tZW3WFCh3Zqa/sjlqpbURQ==", + "license": "ISC", + "peer": true + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "peer": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "peer": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "license": "MIT", + "peer": true, + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "license": "MIT", + "peer": true, + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/goober": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.18.tgz", + "integrity": "sha512-2vFqsaDVIT9Gz7N6kAL++pLpp41l3PfDuusHcjnGLfR6+huZkl6ziX+zgVC3ZxpqWhzH6pyDdGrCeDhMIvwaxw==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "csstype": "^3.0.10" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC", + "peer": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "peer": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT", + "peer": true + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "license": "MIT", + "peer": true, + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", + "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==", + "license": "MIT", + "peer": true, + "dependencies": { + "deep-equal": "~1.0.1", + "http-errors": "~1.8.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-assert/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-assert/node_modules/http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "license": "MIT", + "peer": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-assert/node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/immer": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz", + "integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC", + "peer": true + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC", + "peer": true + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "license": "MIT", + "peer": true + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "license": "MIT", + "peer": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC", + "peer": true + }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", + "license": "MIT", + "peer": true + }, + "node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "license": "MIT", + "peer": true, + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "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==", + "license": "MIT", + "peer": true + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "license": "MIT", + "peer": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "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", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "license": "MIT", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT", + "peer": true + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "license": "MIT", + "peer": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keygrip": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", + "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "tsscmp": "1.0.6" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/koa": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/koa/-/koa-3.0.3.tgz", + "integrity": "sha512-MeuwbCoN1daWS32/Ni5qkzmrOtQO2qrnfdxDHjrm6s4b59yG4nexAJ0pTEFyzjLp0pBVO80CZp0vW8Ze30Ebow==", + "license": "MIT", + "peer": true, + "dependencies": { + "accepts": "^1.3.8", + "content-disposition": "~0.5.4", + "content-type": "^1.0.5", + "cookies": "~0.9.1", + "delegates": "^1.0.0", + "destroy": "^1.2.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "fresh": "~0.5.2", + "http-assert": "^1.5.0", + "http-errors": "^2.0.0", + "koa-compose": "^4.1.0", + "mime-types": "^3.0.1", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/koa-compose": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz", + "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==", + "license": "MIT", + "peer": true + }, + "node_modules/koa/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/koa/node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "license": "MIT", + "peer": true + }, + "node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "license": "MIT", + "peer": true + }, + "node_modules/lodash.clonedeepwith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz", + "integrity": "sha512-QRBRSxhbtsX1nc0baxSkkK5WlVTTm/s48DSukcGcWZwIyI8Zz+lB+kFiELJXtzfH4Aj6kMWQ1VWW4U5uUDgZMA==", + "license": "MIT", + "peer": true + }, + "node_modules/log4js": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", + "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "flatted": "^3.2.7", + "rfdc": "^1.3.0", + "streamroller": "^3.1.5" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/long-timeout": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", + "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==", + "license": "MIT", + "peer": true + }, + "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==", + "license": "MIT", + "peer": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/luxon": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz", + "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mathjs": { + "version": "10.6.4", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-10.6.4.tgz", + "integrity": "sha512-omQyvRE1jIy+3k2qsqkWASOcd45aZguXZDckr3HtnTYyXk5+2xpVfC3kATgbO2Srjxlqww3TVdhD0oUdZ/hiFA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.18.6", + "complex.js": "^2.1.1", + "decimal.js": "^10.3.1", + "escape-latex": "^1.2.0", + "fraction.js": "^4.2.0", + "javascript-natural-sort": "^0.7.1", + "seedrandom": "^3.0.5", + "tiny-emitter": "^2.1.0", + "typed-function": "^2.1.0" + }, + "bin": { + "mathjs": "bin/cli.js" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/mdi-material-ui": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/mdi-material-ui/-/mdi-material-ui-7.9.4.tgz", + "integrity": "sha512-bk+3A6ogY3r/TveGgD/PRhFkqctG3XmPPm5rTuj81aoYuv1xw4T3Ml+A/PsrCWhbgicZbGbC6r0jYg5vcFTTXQ==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "@mui/material": "^5.0.0 || ^6.0.0 || ^7.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "peer": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT", + "peer": true + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-schedule": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz", + "integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "cron-parser": "^4.2.0", + "long-timeout": "0.1.1", + "sorted-array-functions": "^1.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/notistack": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/notistack/-/notistack-3.0.2.tgz", + "integrity": "sha512-0R+/arLYbK5Hh7mEfR2adt0tyXJcCC9KkA2hc56FeWik2QN6Bm/S4uW+BjzDARsJth5u06nTjelSw/VSnB1YEA==", + "license": "MIT", + "peer": true, + "dependencies": { + "clsx": "^1.1.0", + "goober": "^2.0.33" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/notistack" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/notistack/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/numbro": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/numbro/-/numbro-2.5.0.tgz", + "integrity": "sha512-xDcctDimhzko/e+y+Q2/8i3qNC9Svw1QgOkSkQoO0kIPI473tR9QRbo2KP88Ty9p8WbPy+3OpTaAIzehtuHq+A==", + "license": "MIT", + "peer": true, + "dependencies": { + "bignumber.js": "^8 || ^9" + }, + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "peer": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "license": "MIT", + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT", + "peer": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC", + "peer": true + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT", + "peer": true + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT", + "peer": true + }, + "node_modules/qs": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/raf-schd": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz", + "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==", + "license": "MIT", + "peer": true + }, + "node_modules/rambda": { + "version": "9.4.2", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-9.4.2.tgz", + "integrity": "sha512-++euMfxnl7OgaEKwXh9QqThOjMeta2HH001N1v4mYQzBjJBnmXBh2BCK6dZAbICFVXOFUVD3xFG0R3ZPU0mxXw==", + "license": "MIT", + "peer": true + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-colorful": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/react-colorful/-/react-colorful-5.6.1.tgz", + "integrity": "sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-draggable": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.5.0.tgz", + "integrity": "sha512-VC+HBLEZ0XJxnOxVAZsdRi8rD04Iz3SiiKOoYzamjylUcju/hP9np/aZdLHf/7WOD268WMoNJMvYfB5yAK45cw==", + "license": "MIT", + "peer": true, + "dependencies": { + "clsx": "^2.1.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": ">= 16.3.0", + "react-dom": ">= 16.3.0" + } + }, + "node_modules/react-error-boundary": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", + "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + }, + "peerDependencies": { + "react": ">=16.13.1" + } + }, + "node_modules/react-grid-layout": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/react-grid-layout/-/react-grid-layout-1.5.3.tgz", + "integrity": "sha512-KaG6IbjD6fYhagUtIvOzhftXG+ViKZjCjADe86X1KHl7C/dsBN2z0mi14nbvZKTkp0RKiil9RPcJBgq3LnoA8g==", + "license": "MIT", + "peer": true, + "dependencies": { + "clsx": "^2.1.1", + "fast-equals": "^4.0.3", + "prop-types": "^15.8.1", + "react-draggable": "^4.4.6", + "react-resizable": "^3.0.5", + "resize-observer-polyfill": "^1.5.1" + }, + "peerDependencies": { + "react": ">= 16.3.0", + "react-dom": ">= 16.3.0" + } + }, + "node_modules/react-hook-form": { + "version": "7.71.2", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.71.2.tgz", + "integrity": "sha512-1CHvcDYzuRUNOflt4MOq3ZM46AronNJtQ1S7tnX6YN4y72qhgiUItpacZUAQ0TyWYci3yz1X+rXaSxiuEm86PA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-hook-form" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18 || ^19" + } + }, + "node_modules/react-intersection-observer": { + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/react-intersection-observer/-/react-intersection-observer-9.16.0.tgz", + "integrity": "sha512-w9nJSEp+DrW9KmQmeWHQyfaP6b03v+TdXynaoA964Wxt7mdR3An11z4NNCQgL4gKSK7y1ver2Fq+JKH6CWEzUA==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-is": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz", + "integrity": "sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==", + "license": "MIT", + "peer": true + }, + "node_modules/react-resizable": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/react-resizable/-/react-resizable-3.1.3.tgz", + "integrity": "sha512-liJBNayhX7qA4tBJiBD321FDhJxgGTJ07uzH5zSORXoE8h7PyEZ8mLqmosST7ppf6C4zUsbd2gzDMmBCfFp9Lw==", + "license": "MIT", + "peer": true, + "dependencies": { + "prop-types": "15.x", + "react-draggable": "^4.5.0" + }, + "peerDependencies": { + "react": ">= 16.3", + "react-dom": ">= 16.3" + } + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/react-virtuoso": { + "version": "4.18.3", + "resolved": "https://registry.npmjs.org/react-virtuoso/-/react-virtuoso-4.18.3.tgz", + "integrity": "sha512-fLz/peHAx4Eu0DLHurFEEI7Y6n5CqEoxBh04rgJM9yMuOJah2a9zWg/MUOmZLcp7zuWYorXq5+5bf3IRgkNvWg==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "react": ">=16 || >=17 || >= 18 || >= 19", + "react-dom": ">=16 || >=17 || >= 18 || >=19" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", + "license": "MIT", + "peer": true + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "license": "MIT", + "peer": true, + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "license": "MIT", + "peer": true + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/seedrandom": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", + "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==", + "license": "MIT", + "peer": true + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-query-params": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/serialize-query-params/-/serialize-query-params-2.0.4.tgz", + "integrity": "sha512-y9WzzDj3BsGgKLCh0ugiinufS//YqOfao/yVJjkXA4VLuyNCfHOLU/cbulGPxs3aeCqhvROw7qPL04JSZnCo0w==", + "license": "ISC", + "peer": true + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC", + "peer": true + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sorted-array-functions": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz", + "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==", + "license": "MIT", + "peer": true + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamroller": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", + "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", + "license": "MIT", + "peer": true, + "dependencies": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/streamroller/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/streamroller/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "license": "MIT", + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/streamroller/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/style-mod": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz", + "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==", + "license": "MIT", + "peer": true + }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", + "license": "MIT", + "peer": true + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "license": "MIT", + "peer": true + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD", + "optional": true, + "peer": true + }, + "node_modules/tsscmp": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", + "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.6.x" + } + }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "peer": true, + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/type-is/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/type-is/node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/typed-function": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-2.1.0.tgz", + "integrity": "sha512-bctQIOqx2iVbWGDGPWwIm18QScpu2XRmkC19D8rQGFsjKSgteq/o1hTZvIG/wuDq8fanpBDrLkLq+aEN/6y5XQ==", + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/upath": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", + "integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/use-immer": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/use-immer/-/use-immer-0.11.0.tgz", + "integrity": "sha512-RNAqi3GqsWJ4bcCd4LMBgdzvPmTABam24DUaFiKfX9s3MSorNRz9RDZYJkllJoMHUxVLMDetwAuCDeyWNrp1yA==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "immer": ">=8.0.0", + "react": "^16.8.0 || ^17.0.1 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/use-query-params": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/use-query-params/-/use-query-params-2.2.2.tgz", + "integrity": "sha512-OwGab8u8/x2xZp9uSyBsx0kXlkR9IR436zbygsYVGikPYY3OJosvve6IJVGwIJPcfyb/YHwvPrUNu65/JR++Kw==", + "license": "ISC", + "peer": true, + "dependencies": { + "serialize-query-params": "^2.0.3" + }, + "peerDependencies": { + "@reach/router": "^1.2.1", + "react": ">=16.8.0", + "react-dom": ">=16.8.0", + "react-router-dom": ">=5" + }, + "peerDependenciesMeta": { + "@reach/router": { + "optional": true + }, + "react-router-dom": { + "optional": true + } + } + }, + "node_modules/use-resize-observer": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/use-resize-observer/-/use-resize-observer-9.1.0.tgz", + "integrity": "sha512-R25VqO9Wb3asSD4eqtcxk8sJalvIOYBqS8MNZlpDSQ4l4xMQxC/J7Id9HoTqPq8FwULIn0PVW+OAqF2dyYbjow==", + "license": "MIT", + "peer": true, + "dependencies": { + "@juggle/resize-observer": "^3.3.1" + }, + "peerDependencies": { + "react": "16.8.0 - 18", + "react-dom": "16.8.0 - 18" + } + }, + "node_modules/use-sync-external-store": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT", + "peer": true + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yaml": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", + "license": "ISC", + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zrender": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.5.0.tgz", + "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "tslib": "2.3.0" + } + }, + "node_modules/zrender/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "license": "0BSD", + "peer": true + }, + "node_modules/zustand": { + "version": "4.5.7", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz", + "integrity": "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==", + "license": "MIT", + "peer": true, + "dependencies": { + "use-sync-external-store": "^1.2.2" + }, + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "immer": ">=9.0.6", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + } + } + } + } +} diff --git a/greptimedb/package.json b/greptimedb/package.json new file mode 100644 index 00000000..6188cb72 --- /dev/null +++ b/greptimedb/package.json @@ -0,0 +1,86 @@ +{ + "name": "@perses-dev/greptimedb-plugin", + "version": "0.1.0-beta.0", + "scripts": { + "dev": "rsbuild dev", + "build": "npm run build-mf && concurrently \"npm:build:*\"", + "build-mf": "rsbuild build", + "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", + "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", + "build:types": "tsc --project tsconfig.build.json", + "lint": "eslint src --ext .ts,.tsx", + "test": "cross-env LC_ALL=C TZ=UTC jest", + "type-check": "tsc --noEmit" + }, + "main": "lib/cjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", + "peerDependencies": { + "@emotion/react": "^11.7.1", + "@emotion/styled": "^11.6.0", + "@hookform/resolvers": "^3.2.0", + "@perses-dev/components": "^0.53.1", + "@perses-dev/core": "^0.53.0", + "@perses-dev/dashboards": "^0.53.1", + "@perses-dev/explore": "^0.53.1", + "@perses-dev/plugin-system": "^0.53.1", + "@tanstack/react-query": "^4.39.1", + "date-fns": "^4.1.0", + "date-fns-tz": "^3.2.0", + "echarts": "5.5.0", + "immer": "^10.1.1", + "lodash": "^4.17.21", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0", + "react-hook-form": "^7.52.2", + "use-resize-observer": "^9.0.0" + }, + "files": [ + "lib/**/*", + "__mf/**/*", + "mf-manifest.json", + "mf-stats.json" + ], + "perses": { + "moduleName": "GreptimeDB", + "schemasPath": "schemas", + "plugins": [ + { + "kind": "Datasource", + "spec": { + "display": { + "name": "GreptimeDB Datasource" + }, + "name": "GreptimeDBDatasource" + } + }, + { + "kind": "TimeSeriesQuery", + "spec": { + "display": { + "name": "GreptimeDB Time Series Query" + }, + "name": "GreptimeDBTimeSeriesQuery" + } + }, + { + "kind": "LogQuery", + "spec": { + "display": { + "name": "GreptimeDB Log Query" + }, + "name": "GreptimeDBLogQuery" + } + }, + { + "kind": "TraceQuery", + "spec": { + "display": { + "name": "GreptimeDB Trace Query" + }, + "name": "GreptimeDBTraceQuery" + } + } + ] + } +} diff --git a/greptimedb/rsbuild.config.ts b/greptimedb/rsbuild.config.ts new file mode 100644 index 00000000..5618a0cc --- /dev/null +++ b/greptimedb/rsbuild.config.ts @@ -0,0 +1,49 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { pluginReact } from '@rsbuild/plugin-react'; +import { createConfigForPlugin } from '../rsbuild.shared'; + +export default createConfigForPlugin({ + name: 'GreptimeDB', + rsbuildConfig: { + server: { port: 3119 }, + plugins: [pluginReact()], + }, + moduleFederation: { + exposes: { + './GreptimeDBDatasource': './src/datasources/greptimedb-datasource', + './GreptimeDBTimeSeriesQuery': './src/queries/greptimedb-time-series-query', + './GreptimeDBLogQuery': './src/queries/greptimedb-log-query', + './GreptimeDBTraceQuery': './src/queries/greptimedb-trace-query', + }, + shared: { + react: { requiredVersion: '18.2.0', singleton: true }, + 'react-dom': { requiredVersion: '18.2.0', singleton: true }, + echarts: { singleton: true }, + 'date-fns': { singleton: true }, + 'date-fns-tz': { singleton: true }, + lodash: { singleton: true }, + '@perses-dev/components': { singleton: true }, + '@perses-dev/plugin-system': { singleton: true }, + '@perses-dev/explore': { singleton: true }, + '@perses-dev/dashboards': { singleton: true }, + '@emotion/react': { requiredVersion: '^11.11.3', singleton: true }, + '@emotion/styled': { singleton: true }, + '@hookform/resolvers': { singleton: true }, + '@tanstack/react-query': { singleton: true }, + 'react-hook-form': { singleton: true }, + 'react-router-dom': { singleton: true }, + }, + }, +}); diff --git a/greptimedb/schemas/datasources/greptimedb-datasource/greptimedb-datasource.cue b/greptimedb/schemas/datasources/greptimedb-datasource/greptimedb-datasource.cue new file mode 100644 index 00000000..3c089270 --- /dev/null +++ b/greptimedb/schemas/datasources/greptimedb-datasource/greptimedb-datasource.cue @@ -0,0 +1,28 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "github.com/perses/shared/cue/common" + commonProxy "github.com/perses/shared/cue/common/proxy" +) + +#kind: "GreptimeDBDatasource" + +kind: #kind +spec: { + commonProxy.#baseHTTPDatasourceSpec +} + +#selector: common.#datasourceSelector & {_kind: #kind} diff --git a/greptimedb/schemas/datasources/greptimedb-datasource/greptimedb-datasource.json b/greptimedb/schemas/datasources/greptimedb-datasource/greptimedb-datasource.json new file mode 100644 index 00000000..43bc7ef8 --- /dev/null +++ b/greptimedb/schemas/datasources/greptimedb-datasource/greptimedb-datasource.json @@ -0,0 +1,6 @@ +{ + "kind": "GreptimeDBDatasource", + "spec": { + "directUrl": "http://localhost:4000" + } +} diff --git a/greptimedb/schemas/queries/greptimedb-log-query/query.cue b/greptimedb/schemas/queries/greptimedb-log-query/query.cue new file mode 100644 index 00000000..68f4b554 --- /dev/null +++ b/greptimedb/schemas/queries/greptimedb-log-query/query.cue @@ -0,0 +1,25 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "strings" + ds "github.com/perses/plugins/greptimedb/schemas/datasources/greptimedb-datasource:model" +) + +kind: "GreptimeDBLogQuery" +spec: close({ + ds.#selector + query: strings.MinRunes(1) +}) diff --git a/greptimedb/schemas/queries/greptimedb-time-series-query/query.cue b/greptimedb/schemas/queries/greptimedb-time-series-query/query.cue new file mode 100644 index 00000000..a304261e --- /dev/null +++ b/greptimedb/schemas/queries/greptimedb-time-series-query/query.cue @@ -0,0 +1,27 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "strings" + ds "github.com/perses/plugins/greptimedb/schemas/datasources/greptimedb-datasource:model" +) + +kind: "GreptimeDBTimeSeriesQuery" +spec: close({ + ds.#selector + query: strings.MinRunes(1) + // Backward compatibility: some existing dashboards include this legacy field. + timeColumn?: string +}) diff --git a/greptimedb/schemas/queries/greptimedb-trace-query/query.cue b/greptimedb/schemas/queries/greptimedb-trace-query/query.cue new file mode 100644 index 00000000..cc4175bf --- /dev/null +++ b/greptimedb/schemas/queries/greptimedb-trace-query/query.cue @@ -0,0 +1,25 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "strings" + ds "github.com/perses/plugins/greptimedb/schemas/datasources/greptimedb-datasource:model" +) + +kind: "GreptimeDBTraceQuery" +spec: close({ + ds.#selector + query: strings.MinRunes(1) +}) diff --git a/greptimedb/schemas/queries/greptimedb-trace-query/tests/valid/greptimedb-trace-query.json b/greptimedb/schemas/queries/greptimedb-trace-query/tests/valid/greptimedb-trace-query.json new file mode 100644 index 00000000..a9e1aac8 --- /dev/null +++ b/greptimedb/schemas/queries/greptimedb-trace-query/tests/valid/greptimedb-trace-query.json @@ -0,0 +1,10 @@ +{ + "kind": "GreptimeDBTraceQuery", + "spec": { + "datasource": { + "kind": "GreptimeDBDatasource", + "name": "demo" + }, + "query": "SELECT * FROM public.opentelemetry_traces LIMIT 100" + } +} diff --git a/greptimedb/sdk/go/datasource/datasource.go b/greptimedb/sdk/go/datasource/datasource.go new file mode 100644 index 00000000..45f5ce17 --- /dev/null +++ b/greptimedb/sdk/go/datasource/datasource.go @@ -0,0 +1,109 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package datasource + +import ( + "encoding/json" + "fmt" + + "github.com/perses/perses/go-sdk/datasource" + "github.com/perses/perses/pkg/model/api/v1/datasource/http" +) + +const ( + PluginKind = "GreptimeDBDatasource" +) + +type PluginSpec struct { + DirectURL string `json:"directUrl,omitempty" yaml:"directUrl,omitempty"` + Proxy *http.Proxy `json:"proxy,omitempty" yaml:"proxy,omitempty"` +} + +func (s *PluginSpec) UnmarshalJSON(data []byte) error { + type plain PluginSpec + var tmp PluginSpec + if err := json.Unmarshal(data, (*plain)(&tmp)); err != nil { + return err + } + if err := (&tmp).validate(); err != nil { + return err + } + *s = tmp + return nil +} + +func (s *PluginSpec) UnmarshalYAML(unmarshal func(interface{}) error) error { + var tmp PluginSpec + type plain PluginSpec + if err := unmarshal((*plain)(&tmp)); err != nil { + return err + } + if err := (&tmp).validate(); err != nil { + return err + } + *s = tmp + return nil +} + +func (s *PluginSpec) validate() error { + if len(s.DirectURL) == 0 && s.Proxy == nil { + return fmt.Errorf("directUrl or proxy cannot be empty") + } + if len(s.DirectURL) > 0 && s.Proxy != nil { + return fmt.Errorf("at most directUrl or proxy must be configured") + } + return nil +} + +type Option func(plugin *Builder) error + +func create(options ...Option) (Builder, error) { + builder := &Builder{ + PluginSpec: PluginSpec{}, + } + + var defaults []Option + + for _, opt := range append(defaults, options...) { + if err := opt(builder); err != nil { + return *builder, err + } + } + + return *builder, nil +} + +type Builder struct { + PluginSpec `json:",inline" yaml:",inline"` +} + +func GreptimeDB(options ...Option) datasource.Option { + return func(builder *datasource.Builder) error { + plugin, err := create(options...) + if err != nil { + return err + } + + builder.Spec.Plugin.Kind = PluginKind + builder.Spec.Plugin.Spec = plugin.PluginSpec + return nil + } +} + +func Selector(datasourceName string) *datasource.Selector { + return &datasource.Selector{ + Kind: PluginKind, + Name: datasourceName, + } +} diff --git a/greptimedb/sdk/go/datasource/options.go b/greptimedb/sdk/go/datasource/options.go new file mode 100644 index 00000000..07f0d230 --- /dev/null +++ b/greptimedb/sdk/go/datasource/options.go @@ -0,0 +1,36 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package datasource + +import ( + "github.com/perses/perses/go-sdk/http" +) + +func DirectURL(url string) Option { + return func(builder *Builder) error { + builder.DirectURL = url + return nil + } +} + +func HTTPProxy(url string, options ...http.Option) Option { + return func(builder *Builder) error { + p, err := http.New(url, options...) + if err != nil { + return err + } + builder.Proxy = &p.Proxy + return nil + } +} diff --git a/greptimedb/sdk/go/query/log/log.go b/greptimedb/sdk/go/query/log/log.go new file mode 100644 index 00000000..c940d0ee --- /dev/null +++ b/greptimedb/sdk/go/query/log/log.go @@ -0,0 +1,64 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package log + +import ( + "github.com/perses/perses/go-sdk/datasource" + "github.com/perses/perses/go-sdk/query" + "github.com/perses/perses/pkg/model/api/v1/common" + "github.com/perses/perses/pkg/model/api/v1/plugin" +) + +const PluginKind = "GreptimeDBLogQuery" + +type PluginSpec struct { + Datasource *datasource.Selector `json:"datasource,omitempty" yaml:"datasource,omitempty"` + Query string `json:"query" yaml:"query"` +} + +type Option func(plugin *Builder) error + +func create(query string, options ...Option) (Builder, error) { + builder := &Builder{ + PluginSpec: PluginSpec{}, + } + + defaults := []Option{ + Query(query), + } + + for _, opt := range append(defaults, options...) { + if err := opt(builder); err != nil { + return *builder, err + } + } + + return *builder, nil +} + +type Builder struct { + PluginSpec `json:",inline" yaml:",inline"` +} + +func GreptimeDBLogQuery(expr string, options ...Option) query.Option { + plg, err := create(expr, options...) + return query.Option{ + Kind: plugin.KindLogQuery, + Plugin: common.Plugin{ + Kind: PluginKind, + Spec: plg, + }, + Error: err, + } +} diff --git a/greptimedb/sdk/go/query/log/options.go b/greptimedb/sdk/go/query/log/options.go new file mode 100644 index 00000000..63fce7f1 --- /dev/null +++ b/greptimedb/sdk/go/query/log/options.go @@ -0,0 +1,32 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package log + +import ( + greptimedbDatasource "github.com/perses/plugins/greptimedb/sdk/go/datasource" +) + +func Query(expr string) Option { + return func(builder *Builder) error { + builder.Query = expr + return nil + } +} + +func Datasource(datasourceName string) Option { + return func(builder *Builder) error { + builder.Datasource = greptimedbDatasource.Selector(datasourceName) + return nil + } +} diff --git a/greptimedb/sdk/go/query/time-series/options.go b/greptimedb/sdk/go/query/time-series/options.go new file mode 100644 index 00000000..947aec18 --- /dev/null +++ b/greptimedb/sdk/go/query/time-series/options.go @@ -0,0 +1,32 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package timeseries + +import ( + greptimedbDatasource "github.com/perses/plugins/greptimedb/sdk/go/datasource" +) + +func Query(expr string) Option { + return func(builder *Builder) error { + builder.Query = expr + return nil + } +} + +func Datasource(datasourceName string) Option { + return func(builder *Builder) error { + builder.Datasource = greptimedbDatasource.Selector(datasourceName) + return nil + } +} diff --git a/greptimedb/sdk/go/query/time-series/time-series.go b/greptimedb/sdk/go/query/time-series/time-series.go new file mode 100644 index 00000000..daa09265 --- /dev/null +++ b/greptimedb/sdk/go/query/time-series/time-series.go @@ -0,0 +1,64 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package timeseries + +import ( + "github.com/perses/perses/go-sdk/datasource" + "github.com/perses/perses/go-sdk/query" + "github.com/perses/perses/pkg/model/api/v1/common" + "github.com/perses/perses/pkg/model/api/v1/plugin" +) + +const PluginKind = "GreptimeDBTimeSeriesQuery" + +type PluginSpec struct { + Datasource *datasource.Selector `json:"datasource,omitempty" yaml:"datasource,omitempty"` + Query string `json:"query" yaml:"query"` +} + +type Option func(plugin *Builder) error + +func create(query string, options ...Option) (Builder, error) { + builder := &Builder{ + PluginSpec: PluginSpec{}, + } + + defaults := []Option{ + Query(query), + } + + for _, opt := range append(defaults, options...) { + if err := opt(builder); err != nil { + return *builder, err + } + } + + return *builder, nil +} + +type Builder struct { + PluginSpec `json:",inline" yaml:",inline"` +} + +func GreptimeDBTimeSeriesQuery(expr string, options ...Option) query.Option { + plg, err := create(expr, options...) + return query.Option{ + Kind: plugin.KindTimeSeriesQuery, + Plugin: common.Plugin{ + Kind: PluginKind, + Spec: plg, + }, + Error: err, + } +} diff --git a/greptimedb/src/bootstrap.tsx b/greptimedb/src/bootstrap.tsx new file mode 100644 index 00000000..06f1ffc5 --- /dev/null +++ b/greptimedb/src/bootstrap.tsx @@ -0,0 +1,18 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import React from 'react'; +import ReactDOM from 'react-dom/client'; + +const root = ReactDOM.createRoot(document.getElementById('root')!); +root.render(); diff --git a/greptimedb/src/components/GreptimeDBQLEditor.tsx b/greptimedb/src/components/GreptimeDBQLEditor.tsx new file mode 100644 index 00000000..64342ebe --- /dev/null +++ b/greptimedb/src/components/GreptimeDBQLEditor.tsx @@ -0,0 +1,60 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror'; +import { EditorView } from '@codemirror/view'; +import { InputLabel, Stack, useTheme } from '@mui/material'; +import { ReactElement } from 'react'; + +export function GreptimeDBQLEditor(props: ReactCodeMirrorProps): ReactElement { + const theme = useTheme(); + const isDarkMode = theme.palette.mode === 'dark'; + + return ( + + + GreptimeDB SQL Query + + + + ); +} diff --git a/greptimedb/src/components/constants.ts b/greptimedb/src/components/constants.ts new file mode 100644 index 00000000..e230cf66 --- /dev/null +++ b/greptimedb/src/components/constants.ts @@ -0,0 +1,33 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export const queryExample = `-- Time Series Query +SELECT + date_bin(INTERVAL '1 minute', ts) as ts, + avg(cpu_usage) as avg_cpu, + max(memory_usage) as max_memory +FROM system_metrics +WHERE ts BETWEEN to_timestamp_millis($__from) AND to_timestamp_millis($__to) +GROUP BY ts +ORDER BY ts + +-- Logs Query +SELECT + ts, + service, + level, + message +FROM application_logs +WHERE ts BETWEEN to_timestamp_millis($__from) AND to_timestamp_millis($__to) +ORDER BY ts DESC +LIMIT 1000`; diff --git a/greptimedb/src/components/index.ts b/greptimedb/src/components/index.ts new file mode 100644 index 00000000..bb116c32 --- /dev/null +++ b/greptimedb/src/components/index.ts @@ -0,0 +1,15 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export * from './GreptimeDBQLEditor'; +export * from './constants'; diff --git a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.test.ts b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.test.ts new file mode 100644 index 00000000..6ecfe5c3 --- /dev/null +++ b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.test.ts @@ -0,0 +1,87 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { greptimedbQuery } from '../../model/greptimedb-client'; +import { GreptimeDBDatasource } from './GreptimeDBDatasource'; + +jest.mock('../../model/greptimedb-client', () => ({ + greptimedbQuery: jest.fn(), +})); + +const mockedQuery = greptimedbQuery as jest.MockedFunction; + +describe('GreptimeDBDatasource.createClient', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockedQuery.mockResolvedValue({ status: 'success', data: [] }); + }); + + it('uses directUrl with spec.headers', async () => { + const client = GreptimeDBDatasource.createClient( + { + directUrl: 'http://localhost:4000', + headers: { + Authorization: 'Bearer direct-token', + 'x-greptime-db-name': 'metrics', + }, + }, + {} + ); + + await client.query({ + query: 'select 1', + }); + + expect(mockedQuery).toHaveBeenCalledWith( + { query: 'select 1' }, + { + datasourceUrl: 'http://localhost:4000', + headers: { + Authorization: 'Bearer direct-token', + 'x-greptime-db-name': 'metrics', + }, + } + ); + }); + + it('lets runtime query headers override spec headers', async () => { + const client = GreptimeDBDatasource.createClient( + { + directUrl: 'http://localhost:4000', + headers: { + Authorization: 'Bearer from-spec', + }, + }, + {} + ); + + await client.query( + { + query: 'select 1', + }, + { + Authorization: 'Bearer runtime', + } + ); + + expect(mockedQuery).toHaveBeenCalledWith( + { query: 'select 1' }, + { + datasourceUrl: 'http://localhost:4000', + headers: { + Authorization: 'Bearer runtime', + }, + } + ); + }); +}); diff --git a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx new file mode 100644 index 00000000..64a01170 --- /dev/null +++ b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx @@ -0,0 +1,55 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { DatasourcePlugin } from '@perses-dev/plugin-system'; +import { greptimedbQuery } from '../../model/greptimedb-client'; +import { GreptimeDBDatasourceClient, GreptimeDBDatasourceSpec } from './greptimedb-datasource-types'; +import { GreptimeDBDatasourceEditor } from './GreptimeDBDatasourceEditor'; + +const createClient: DatasourcePlugin['createClient'] = ( + spec, + options +) => { + const { directUrl, headers, proxy } = spec; + const { proxyUrl } = options; + + const datasourceUrl = directUrl ?? proxyUrl; + if (datasourceUrl === undefined) { + throw new Error( + 'No URL specified for GreptimeDBDatasource client. You can use directUrl in the spec to configure it.' + ); + } + + // Support directUrl auth headers while keeping backward compatibility with proxy headers. + const specHeaders = { + ...(proxy?.spec.headers ?? {}), + ...(headers ?? {}), + }; + + return { + options: { + datasourceUrl, + }, + query: (params, headers) => + greptimedbQuery(params, { + datasourceUrl, + headers: headers ?? specHeaders, + }), + }; +}; + +export const GreptimeDBDatasource: DatasourcePlugin = { + createClient, + OptionsEditorComponent: GreptimeDBDatasourceEditor, + createInitialOptions: () => ({ directUrl: '' }), +}; diff --git a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.tsx b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.tsx new file mode 100644 index 00000000..4d3e78d7 --- /dev/null +++ b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasourceEditor.tsx @@ -0,0 +1,55 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; +import { ReactElement } from 'react'; +import { GreptimeDBDatasourceSpec } from './greptimedb-datasource-types'; + +export interface GreptimeDBDatasourceEditorProps { + value: GreptimeDBDatasourceSpec; + onChange: (next: GreptimeDBDatasourceSpec) => void; + isReadonly?: boolean; +} + +export function GreptimeDBDatasourceEditor(props: GreptimeDBDatasourceEditorProps): ReactElement { + const { value, onChange, isReadonly } = props; + + const initialSpecDirect: GreptimeDBDatasourceSpec = { + directUrl: '', + }; + + const initialSpecProxy: GreptimeDBDatasourceSpec = { + proxy: { + kind: 'HTTPProxy', + spec: { + allowedEndpoints: [ + { + endpointPattern: '/v1/sql', + method: 'POST', + }, + ], + url: '', + }, + }, + }; + + return ( + + ); +} diff --git a/greptimedb/src/datasources/greptimedb-datasource/greptimedb-datasource-types.ts b/greptimedb/src/datasources/greptimedb-datasource/greptimedb-datasource-types.ts new file mode 100644 index 00000000..b62b1333 --- /dev/null +++ b/greptimedb/src/datasources/greptimedb-datasource/greptimedb-datasource-types.ts @@ -0,0 +1,43 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { HTTPProxy, RequestHeaders } from '@perses-dev/core'; +import { DatasourceClient } from '@perses-dev/plugin-system'; + +export interface GreptimeDBDatasourceSpec { + directUrl?: string; + headers?: RequestHeaders; + proxy?: HTTPProxy; +} + +export interface GreptimeDBQueryRequestParameters { + query: string; + start?: string; + end?: string; +} + +interface GreptimeDBDatasourceClientOptions { + datasourceUrl: string; + headers?: RequestHeaders; +} + +export interface GreptimeDBDatasourceResponse { + status: 'success' | 'error'; + data: unknown; + error?: string; +} + +export interface GreptimeDBDatasourceClient extends DatasourceClient { + options: GreptimeDBDatasourceClientOptions; + query(params: GreptimeDBQueryRequestParameters, headers?: RequestHeaders): Promise; +} diff --git a/greptimedb/src/datasources/greptimedb-datasource/index.ts b/greptimedb/src/datasources/greptimedb-datasource/index.ts new file mode 100644 index 00000000..bc801c93 --- /dev/null +++ b/greptimedb/src/datasources/greptimedb-datasource/index.ts @@ -0,0 +1,16 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export * from './GreptimeDBDatasource'; +export * from './GreptimeDBDatasourceEditor'; +export * from './greptimedb-datasource-types'; diff --git a/greptimedb/src/datasources/index.ts b/greptimedb/src/datasources/index.ts new file mode 100644 index 00000000..deb1c910 --- /dev/null +++ b/greptimedb/src/datasources/index.ts @@ -0,0 +1,14 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export * from './greptimedb-datasource'; diff --git a/greptimedb/src/env.d.ts b/greptimedb/src/env.d.ts new file mode 100644 index 00000000..01f4e730 --- /dev/null +++ b/greptimedb/src/env.d.ts @@ -0,0 +1,14 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// diff --git a/greptimedb/src/explore/GreptimeDBTraceExplorer.tsx b/greptimedb/src/explore/GreptimeDBTraceExplorer.tsx new file mode 100644 index 00000000..5347028f --- /dev/null +++ b/greptimedb/src/explore/GreptimeDBTraceExplorer.tsx @@ -0,0 +1,163 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Box, Stack } from '@mui/material'; +import { ErrorAlert, ErrorBoundary, LoadingOverlay, NoDataOverlay } from '@perses-dev/components'; +import { QueryDefinition } from '@perses-dev/core'; +import { Panel } from '@perses-dev/dashboards'; +import { useExplorerManagerContext } from '@perses-dev/explore'; +import { DataQueriesProvider, MultiQueryEditor, useDataQueries } from '@perses-dev/plugin-system'; +import { ReactElement, useEffect, useState } from 'react'; +import { GreptimeDBTraceQuerySpec } from '../queries/greptimedb-trace-query/greptimedb-trace-query-types'; +import { linkToSpan, linkToTrace, resolveTraceLinkTemplate } from './links'; + +interface TraceExplorerQueryParams { + queries?: QueryDefinition[]; + spanId?: string; +} + +interface SearchResultsPanelProps { + queries: QueryDefinition[]; +} + +function SearchResultsPanel({ queries }: SearchResultsPanelProps): ReactElement { + const { isFetching, isLoading, queryResults } = useDataQueries('TraceQuery'); + + if (queryResults.length === 0) { + return <>; + } + if (isLoading || isFetching) { + return ; + } + + const queryError = queryResults.find((d) => d.error); + if (queryError) { + throw queryError.error; + } + + const tracesFound = queryResults.some((traceData) => (traceData.data?.searchResult ?? []).length > 0); + if (!tracesFound) { + return ; + } + + const firstQuery = (queries[0]?.spec.plugin.spec as GreptimeDBTraceQuerySpec | undefined)?.query ?? ''; + const resolvedTraceLink = resolveTraceLinkTemplate(linkToTrace, firstQuery); + + return ( + + ); +} + +interface TracingGanttChartPanelProps { + queries: QueryDefinition[]; + selectedSpanId?: string; +} + +function TracingGanttChartPanel(props: TracingGanttChartPanelProps): ReactElement { + const { queries, selectedSpanId } = props; + const firstQuery = (queries[0]?.spec.plugin.spec as GreptimeDBTraceQuerySpec | undefined)?.query; + const resolvedTraceLink = resolveTraceLinkTemplate(linkToTrace, firstQuery ?? ''); + const resolvedSpanLink = resolveTraceLinkTemplate(linkToSpan, firstQuery ?? ''); + + return ( + + ); +} + +function isLikelyTraceDetailSQL(query: string): boolean { + return /where[\s\S]*trace_id/i.test(query); +} + +export function GreptimeDBTraceExplorer(): ReactElement { + const { data, setData } = useExplorerManagerContext(); + const { queries = [], spanId: selectedSpanId } = data; + + const [queryDefinitions, setQueryDefinitions] = useState(queries); + useEffect(() => { + setQueryDefinitions(queries); + }, [queries]); + + const definitions = queries.length + ? queries.map((query: QueryDefinition) => { + return { + kind: query.spec.plugin.kind, + spec: query.spec.plugin.spec, + }; + }) + : []; + + const firstQuery = (queries[0]?.spec.plugin.spec as GreptimeDBTraceQuerySpec | undefined)?.query ?? ''; + const isSingleTrace = isLikelyTraceDetailSQL(firstQuery); + + return ( + + setQueryDefinitions(state)} + queries={queryDefinitions} + onQueryRun={() => setData({ ...data, queries: queryDefinitions })} + /> + + + + + {isSingleTrace ? ( + + ) : ( + + )} + + + + + ); +} diff --git a/greptimedb/src/explore/index.ts b/greptimedb/src/explore/index.ts new file mode 100644 index 00000000..0660b06d --- /dev/null +++ b/greptimedb/src/explore/index.ts @@ -0,0 +1,15 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export * from './GreptimeDBTraceExplorer'; +export * from './links'; diff --git a/greptimedb/src/explore/links.ts b/greptimedb/src/explore/links.ts new file mode 100644 index 00000000..293ca946 --- /dev/null +++ b/greptimedb/src/explore/links.ts @@ -0,0 +1,94 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const traceQuerySQL = "SELECT * FROM TRACETABLE WHERE trace_id = 'TRACEID' ORDER BY timestamp ASC"; + +const linkToTraceParams = new URLSearchParams({ + explorer: 'GreptimeDB-GreptimeDBTraceExplorer', + data: JSON.stringify({ + queries: [ + { + kind: 'TraceQuery', + spec: { + plugin: { + kind: 'GreptimeDBTraceQuery', + spec: { + query: traceQuerySQL, + datasource: { + kind: 'GreptimeDBDatasource', + name: 'DATASOURCENAME', + }, + }, + }, + }, + }, + ], + }), +}); + +const linkToSpanParams = new URLSearchParams({ + explorer: 'GreptimeDB-GreptimeDBTraceExplorer', + data: JSON.stringify({ + queries: [ + { + kind: 'TraceQuery', + spec: { + plugin: { + kind: 'GreptimeDBTraceQuery', + spec: { + query: traceQuerySQL, + datasource: { + kind: 'GreptimeDBDatasource', + name: 'DATASOURCENAME', + }, + }, + }, + }, + }, + ], + spanId: 'SPANID', + }), +}); + +// add ${...} syntax after URL encoding so placeholder markers remain valid template variables. +export const linkToTrace = `/explore?${linkToTraceParams}` + .replace('DATASOURCENAME', '${datasourceName}') + .replace('TRACETABLE', '${trace_table}') + .replace('TRACEID', '${traceId}'); + +export const linkToSpan = `/explore?${linkToSpanParams}` + .replace('DATASOURCENAME', '${datasourceName}') + .replace('TRACETABLE', '${trace_table}') + .replace('TRACEID', '${traceId}') + .replace('SPANID', '${spanId}'); + +export function extractTraceTableFromSQL(query: string): string | undefined { + // Handles common forms: + // FROM schema.table + // FROM "schema"."table" + // FROM `schema`.`table` + const match = query.match( + /\bfrom\s+((?:[`"'][^`"']+[`"']|\[[^\]]+\]|[a-zA-Z_][\w$]*)(?:\s*\.\s*(?:[`"'][^`"']+[`"']|\[[^\]]+\]|[a-zA-Z_][\w$]*))?)/i + ); + return match?.[1]?.replace(/\s+/g, ''); +} + +export function resolveTraceLinkTemplate(template: string, query: string): string { + const table = extractTraceTableFromSQL(query); + if (!table) return template; + return template.replaceAll('${trace_table}', table); +} + +export function buildGreptimeTraceLinkFromQuery(query: string): string { + return resolveTraceLinkTemplate(linkToTrace, query); +} diff --git a/greptimedb/src/getPluginModule.ts b/greptimedb/src/getPluginModule.ts new file mode 100644 index 00000000..cab8b384 --- /dev/null +++ b/greptimedb/src/getPluginModule.ts @@ -0,0 +1,30 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; +import packageJson from '../package.json'; + +/** + * Returns the plugin module information from package.json + */ +export function getPluginModule(): PluginModuleResource { + const { name, version, perses } = packageJson; + return { + kind: 'PluginModule', + metadata: { + name, + version, + }, + spec: perses as PluginModuleSpec, + }; +} diff --git a/greptimedb/src/index-federation.ts b/greptimedb/src/index-federation.ts new file mode 100644 index 00000000..df7f0bd8 --- /dev/null +++ b/greptimedb/src/index-federation.ts @@ -0,0 +1,14 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import('./bootstrap'); diff --git a/greptimedb/src/index.ts b/greptimedb/src/index.ts new file mode 100644 index 00000000..215d904d --- /dev/null +++ b/greptimedb/src/index.ts @@ -0,0 +1,16 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export { getPluginModule } from './getPluginModule'; +export * from './queries'; +export * from './datasources'; diff --git a/greptimedb/src/model/greptimedb-client.ts b/greptimedb/src/model/greptimedb-client.ts new file mode 100644 index 00000000..91e960ff --- /dev/null +++ b/greptimedb/src/model/greptimedb-client.ts @@ -0,0 +1,86 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { RequestHeaders } from '@perses-dev/core'; +import { GreptimeDBDatasourceResponse, GreptimeDBQueryRequestParameters } from '../datasources/greptimedb-datasource'; + +export interface GreptimeDBQueryOptions { + datasourceUrl: string; + headers?: RequestHeaders; +} + +export interface GreptimeDBQueryResponse { + status: 'success' | 'error'; + data: unknown; + error?: string; +} + +export interface GreptimeDBClient { + query: (params: { start: string; end: string; query: string }) => Promise; +} + +export async function greptimedbQuery( + params: GreptimeDBQueryRequestParameters, + queryOptions: GreptimeDBQueryOptions +): Promise { + const { datasourceUrl, headers } = queryOptions; + const url = buildSqlUrl(datasourceUrl); + + if (!params.query) { + throw new Error('No query provided in params'); + } + + const init: RequestInit = { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...(headers ?? {}), + }, + body: new URLSearchParams({ + sql: params.query, + }).toString(), + }; + + try { + const response = await fetch(url.toString(), init); + if (!response.ok) { + const errorText = await response.text(); + console.error('GreptimeDB error response:', errorText); + return { + status: 'error', + data: [], + error: errorText, + }; + } + + const body = await response.json(); + const records = body?.output?.[0]?.records; + + return { + status: body?.status ?? 'success', + data: records ?? body?.output ?? body, + }; + } catch (e) { + throw new Error(`GreptimeDB query failed: ${e}`); + } +} + +function buildSqlUrl(datasourceUrl: string): URL { + const base = datasourceUrl.endsWith('/') ? `${datasourceUrl}v1/sql` : `${datasourceUrl}/v1/sql`; + + if (base.startsWith('http://') || base.startsWith('https://')) { + return new URL(base); + } + + return new URL(base, window.location.origin); +} diff --git a/greptimedb/src/model/greptimedb-data-types.ts b/greptimedb/src/model/greptimedb-data-types.ts new file mode 100644 index 00000000..c97cb6df --- /dev/null +++ b/greptimedb/src/model/greptimedb-data-types.ts @@ -0,0 +1,24 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export interface GreptimeDBColumnSchema { + name: string; + data_type?: string; +} + +export interface GreptimeDBRecords { + schema?: { + column_schemas?: GreptimeDBColumnSchema[]; + }; + rows?: unknown[][]; +} diff --git a/greptimedb/src/queries/constants.ts b/greptimedb/src/queries/constants.ts new file mode 100644 index 00000000..58ac8200 --- /dev/null +++ b/greptimedb/src/queries/constants.ts @@ -0,0 +1,17 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export const DATASOURCE_KIND = 'GreptimeDBDatasource'; +export const DEFAULT_DATASOURCE = { + kind: DATASOURCE_KIND, +}; diff --git a/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQuery.tsx b/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQuery.tsx new file mode 100644 index 00000000..ec324716 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQuery.tsx @@ -0,0 +1,33 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { parseVariables } from '@perses-dev/plugin-system'; +import { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types'; +import { getGreptimeDBLogData } from './get-greptimedb-log-data'; +import { GreptimeDBLogQueryEditor } from './GreptimeDBLogQueryEditor'; +import { LogQueryPlugin } from './log-query-plugin-interface'; + +export const GreptimeDBLogQuery: LogQueryPlugin = { + getLogData: getGreptimeDBLogData, + OptionsEditorComponent: GreptimeDBLogQueryEditor, + createInitialOptions: () => ({ + query: '', + }), + dependsOn: (spec) => { + const queryVariables = parseVariables(spec.query); + const allVariables = [...new Set([...queryVariables])]; + return { + variables: allVariables, + }; + }, +}; diff --git a/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx b/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx new file mode 100644 index 00000000..dbefc5c4 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx @@ -0,0 +1,112 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { + DatasourceSelect, + DatasourceSelectProps, + isVariableDatasource, + OptionsEditorProps, +} from '@perses-dev/plugin-system'; +import { ReactElement, useCallback } from 'react'; +import { produce } from 'immer'; +import { Stack } from '@mui/material'; +import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; +import { GreptimeDBQLEditor } from '../../components'; +import { queryExample } from '../../components/constants'; +import { useQueryState } from '../query-editor-model'; +import { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types'; + +type GreptimeDBLogQueryEditorProps = OptionsEditorProps; + +export function GreptimeDBLogQueryEditor(props: GreptimeDBLogQueryEditorProps): ReactElement { + const { onChange, value } = props; + const { datasource } = value; + + const selectedDatasource = datasource ?? DEFAULT_DATASOURCE; + const { query, handleQueryChange, handleQueryBlur } = useQueryState(props); + + const handleDatasourceChange: DatasourceSelectProps['onChange'] = (newDatasourceSelection) => { + if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) { + onChange( + produce(value, (draft) => { + draft.datasource = newDatasourceSelection; + }) + ); + return; + } + throw new Error('Got unexpected non GreptimeDB datasource selection'); + }; + + const handleQueryExecute = (queryValue: string): void => { + onChange( + produce(value, (draft) => { + draft.query = queryValue; + }) + ); + }; + + const handleGreptimeDBQueryChange = useCallback( + (e: string) => { + handleQueryChange(e); + }, + [handleQueryChange] + ); + + const examplesStyle = { + fontSize: '11px', + color: '#777', + backgroundColor: '#f5f5f5', + padding: '8px', + borderRadius: '4px', + fontFamily: 'Monaco, Menlo, "Ubuntu Mono", monospace', + whiteSpace: 'pre-wrap' as const, + lineHeight: '1.3', + }; + + return ( + + + { + if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) { + event.preventDefault(); + handleQueryExecute(query); + } + }} + placeholder="Enter GreptimeDB SQL query" + /> +
+ + Query Examples + +
{queryExample}
+
+
+ ); +} diff --git a/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts b/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts new file mode 100644 index 00000000..37f4526f --- /dev/null +++ b/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts @@ -0,0 +1,115 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { LogData, LogEntry } from '@perses-dev/core'; +import { GreptimeDBClient, GreptimeDBQueryResponse } from '../../model/greptimedb-client'; +import { DEFAULT_DATASOURCE } from '../constants'; +import { + findTimeColumnIndex, + GreptimeDBRecords, + normalizeRecords, + replaceQueryVariables, + toTimestampMs, +} from '../greptimedb-query-data-model'; +import { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types'; +import { LogQueryPlugin } from './log-query-plugin-interface'; + +function buildLogs(records: GreptimeDBRecords | undefined): LogData { + const columnSchemas = records?.schema?.column_schemas ?? []; + const rows = records?.rows ?? []; + + if (!columnSchemas.length || !rows.length) { + return { + entries: [], + totalCount: 0, + }; + } + + const timeIndex = findTimeColumnIndex(columnSchemas); + + if (timeIndex === -1) { + return { + entries: [], + totalCount: 0, + }; + } + + const entries = rows + .map((row) => { + const tsMs = toTimestampMs(row?.[timeIndex], columnSchemas[timeIndex]?.data_type); + if (tsMs === null) { + return null; + } + + const labels: Record = {}; + const lineParts: string[] = []; + + columnSchemas.forEach((col, index) => { + if (index === timeIndex) { + return; + } + const value = row?.[index]; + const stringValue = value === null || value === undefined ? '' : String(value); + labels[col.name] = stringValue; + lineParts.push(`${col.name}=${stringValue === '' ? '--' : stringValue}`); + }); + + return { + timestamp: Math.floor(tsMs / 1000), + labels, + line: lineParts.join(' '), + } as LogEntry; + }) + .filter((entry): entry is LogEntry => entry !== null); + + return { + entries, + totalCount: entries.length, + }; +} + +export const getGreptimeDBLogData: LogQueryPlugin['getLogData'] = async (spec, context) => { + if (!spec.query) { + return { + logs: { entries: [], totalCount: 0 }, + timeRange: { start: context.timeRange.start, end: context.timeRange.end }, + }; + } + + const { start, end } = context.timeRange; + const query = replaceQueryVariables(spec.query, context.variableState, context.timeRange); + + const client = (await context.datasourceStore.getDatasourceClient( + spec.datasource ?? DEFAULT_DATASOURCE + )) as GreptimeDBClient; + + const response: GreptimeDBQueryResponse = await client.query({ + start: start.getTime().toString(), + end: end.getTime().toString(), + query, + }); + + if (response.status === 'error') { + throw new Error(response.error ?? 'GreptimeDB query failed'); + } + + const records = normalizeRecords(response.data); + + return { + timeRange: { start, end }, + logs: buildLogs(records), + metadata: { + executedQueryString: query, + }, + }; +}; diff --git a/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts b/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts new file mode 100644 index 00000000..a4742b28 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts @@ -0,0 +1,97 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// TODO: This should be fixed globally in the test setup +import { DatasourceSpec } from '@perses-dev/core'; + +jest.mock('echarts/core'); + +import { GreptimeDBDatasource, GreptimeDBDatasourceSpec } from '../../datasources'; +import { GreptimeDBQueryResponse } from '../../model/greptimedb-client'; +import { GreptimeDBLogQuery } from './GreptimeDBLogQuery'; +import { GreptimeDBQueryContext } from './log-query-plugin-interface'; + +const datasource: GreptimeDBDatasourceSpec = { + directUrl: '/test', +}; + +const greptimedbStubClient = GreptimeDBDatasource.createClient(datasource, {}); + +greptimedbStubClient.query = jest.fn(async () => { + const stubResponse: GreptimeDBQueryResponse = { + status: 'success', + data: { + schema: { + column_schemas: [{ name: 'ts' }, { name: 'message' }], + }, + rows: [[1700000000000, 'hello']], + }, + }; + return stubResponse as GreptimeDBQueryResponse; +}); + +const getDatasourceClient: jest.Mock = jest.fn(() => { + return greptimedbStubClient; +}); + +const createStubContext = (): GreptimeDBQueryContext => { + const stubLogContext: Partial = { + datasourceStore: { + getDatasource: jest.fn(async (): Promise => { + return Promise.resolve({ + default: false, + plugin: { + kind: 'GreptimeDBDatasource', + spec: datasource, + }, + } as DatasourceSpec); + }), + getDatasourceClient: getDatasourceClient, + listDatasourceSelectItems: jest.fn(), + getLocalDatasources: jest.fn(), + setLocalDatasources: jest.fn(), + getSavedDatasources: jest.fn(), + setSavedDatasources: jest.fn(), + }, + timeRange: { + end: new Date('01-01-2025'), + start: new Date('01-02-2025'), + }, + variableState: {}, + }; + return stubLogContext as GreptimeDBQueryContext; +}; + +describe('GreptimeDBLogQuery', () => { + it('should properly resolve variable dependencies', () => { + if (!GreptimeDBLogQuery.dependsOn) throw new Error('dependsOn is not defined'); + const { variables } = GreptimeDBLogQuery.dependsOn( + { + query: 'SELECT * FROM logs WHERE foo="$foo" AND bar="$bar"', + }, + createStubContext() + ); + expect(variables).toEqual(['foo', 'bar']); + }); + + it('should create initial options with query', () => { + const initialOptions = GreptimeDBLogQuery.createInitialOptions(); + expect(initialOptions).toEqual({ query: '' }); + }); + + it('should run query and return GreptimeDB records', async () => { + const client = getDatasourceClient(); + const resp = await client.query({ query: 'SELECT * FROM logs' }); + expect(resp.data).toHaveProperty('rows'); + }); +}); diff --git a/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.ts b/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.ts new file mode 100644 index 00000000..b36ff1b1 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.ts @@ -0,0 +1,19 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { DatasourceSelector } from '@perses-dev/core'; + +export interface GreptimeDBLogQuerySpec { + query: string; + datasource?: DatasourceSelector; +} diff --git a/greptimedb/src/queries/greptimedb-log-query/index.ts b/greptimedb/src/queries/greptimedb-log-query/index.ts new file mode 100644 index 00000000..693aeabc --- /dev/null +++ b/greptimedb/src/queries/greptimedb-log-query/index.ts @@ -0,0 +1,17 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export * from './GreptimeDBLogQuery'; +export * from './GreptimeDBLogQueryEditor'; +export * from './get-greptimedb-log-data'; +export * from './greptimedb-log-query-types'; diff --git a/greptimedb/src/queries/greptimedb-log-query/log-query-plugin-interface.ts b/greptimedb/src/queries/greptimedb-log-query/log-query-plugin-interface.ts new file mode 100644 index 00000000..08c5a9a7 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-log-query/log-query-plugin-interface.ts @@ -0,0 +1,38 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { AbsoluteTimeRange, LogData, UnknownSpec } from '@perses-dev/core'; +import { DatasourceStore, Plugin, VariableStateMap } from '@perses-dev/plugin-system'; + +export interface LogQueryResult { + logs: LogData; + timeRange: AbsoluteTimeRange; + metadata?: { + executedQueryString: string; + }; +} + +export interface GreptimeDBQueryContext { + timeRange: AbsoluteTimeRange; + variableState: VariableStateMap; + datasourceStore: DatasourceStore; +} + +type LogQueryPluginDependencies = { + variables?: string[]; +}; + +export interface LogQueryPlugin extends Plugin { + getLogData: (spec: Spec, ctx: GreptimeDBQueryContext) => Promise; + dependsOn?: (spec: Spec, ctx: GreptimeDBQueryContext) => LogQueryPluginDependencies; +} diff --git a/greptimedb/src/queries/greptimedb-query-data-model.ts b/greptimedb/src/queries/greptimedb-query-data-model.ts new file mode 100644 index 00000000..eb18297c --- /dev/null +++ b/greptimedb/src/queries/greptimedb-query-data-model.ts @@ -0,0 +1,153 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { AbsoluteTimeRange } from '@perses-dev/core'; +import { replaceVariables, VariableStateMap } from '@perses-dev/plugin-system'; + +/** + * Supplement a variableState map with Perses builtin time-range variables + * (__from, __to, __range, __range_s, __range_ms). + * + * Background: the LogQuery runtime passes context.variableState via + * useVariableValues() which does NOT include builtin variables, unlike + * TimeSeriesQuery which uses useAllVariableValues(). This helper bridges + * that gap so both query types can rely on replaceVariables() uniformly. + */ +export function replaceQueryVariables( + query: string, + variableState: VariableStateMap, + timeRange: AbsoluteTimeRange +): string { + const { start, end } = timeRange; + const rangeMs = end.valueOf() - start.valueOf(); + const builtinState: VariableStateMap = { + __from: { value: start.valueOf().toString(), loading: false }, + __to: { value: end.valueOf().toString(), loading: false }, + __range_ms: { value: rangeMs.toString(), loading: false }, + __range_s: { value: Math.floor(rangeMs / 1000).toString(), loading: false }, + __range: { value: formatDuration(rangeMs), loading: false }, + }; + // User-defined variables take precedence over builtins (matching framework behaviour). + return replaceVariables(query, { ...builtinState, ...variableState }); +} + +/** Format a millisecond duration as a human-readable Prometheus-style string, e.g. "1h5m30s". */ +function formatDuration(ms: number): string { + const totalSeconds = Math.floor(ms / 1000); + const hours = Math.floor(totalSeconds / 3600); + const minutes = Math.floor((totalSeconds % 3600) / 60); + const seconds = totalSeconds % 60; + let result = ''; + if (hours > 0) result += `${hours}h`; + if (minutes > 0) result += `${minutes}m`; + if (seconds > 0 || result === '') result += `${seconds}s`; + return result; +} + +export interface GreptimeDBColumnSchema { + name: string; + data_type?: string; + semantic_type?: string; +} + +export interface GreptimeDBRecords { + schema?: { + column_schemas?: GreptimeDBColumnSchema[]; + }; + rows?: unknown[][]; +} + +function normalizeTimestampType(dataType: string | undefined): string | null { + if (!dataType) { + return null; + } + return dataType.toLowerCase(); +} + +export function toTimestampMs(value: unknown, dataType: string | undefined): number | null { + if (value === null || value === undefined) { + return null; + } + + const normalizedType = normalizeTimestampType(dataType); + + if (typeof value === 'number') { + if (normalizedType) { + if (normalizedType.includes('nanosecond')) { + return Math.floor(value / 1_000_000); + } + if (normalizedType.includes('microsecond')) { + return Math.floor(value / 1_000); + } + if (normalizedType.includes('millisecond')) { + return value; + } + if (normalizedType.includes('second')) { + return value * 1000; + } + } + if (value > 1_000_000_000_000_000) { + return Math.floor(value / 1_000_000); + } + if (value > 1_000_000_000_000) { + return value; + } + if (value > 1_000_000_000) { + return value * 1000; + } + return value; + } + + if (typeof value === 'string') { + const asNumber = Number(value); + if (!Number.isNaN(asNumber)) { + return toTimestampMs(asNumber, dataType); + } + } + + const asDate = new Date(value as string); + const ts = asDate.getTime(); + return Number.isNaN(ts) ? null : ts; +} + +export function normalizeRecords(payload: unknown): GreptimeDBRecords | undefined { + if (!payload || typeof payload !== 'object') return undefined; + + // GreptimeDB HTTP API commonly returns: { output: [{ records: {...} }], execution_time_ms } + const maybeWrapped = payload as { output?: Array<{ records?: GreptimeDBRecords }> }; + const wrappedRecords = maybeWrapped.output?.[0]?.records; + if (wrappedRecords) return wrappedRecords; + + // Some clients already return the records object directly. + return payload as GreptimeDBRecords; +} + +export function findTimeColumnIndex(columnSchemas: GreptimeDBColumnSchema[]): number { + let timeIndex = -1; + const timestampColumns = columnSchemas.filter((col) => { + const normalizedType = normalizeTimestampType(col.data_type); + return normalizedType !== null && normalizedType.startsWith('timestamp'); + }); + if (timestampColumns.length > 0) { + const semanticTimestamp = timestampColumns.find((col) => col.semantic_type?.toLowerCase() === 'timestamp'); + const selectedColumn = semanticTimestamp ?? timestampColumns[0]!; + timeIndex = columnSchemas.findIndex((col) => col.name === selectedColumn.name); + } + + if (timeIndex === -1) { + const fallbackColumns = ['greptime_timestamp', 'timestamp', 'ts', 'time']; + timeIndex = columnSchemas.findIndex((col) => fallbackColumns.includes(col.name.toLowerCase())); + } + + return timeIndex; +} diff --git a/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQuery.tsx b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQuery.tsx new file mode 100644 index 00000000..89bc7728 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQuery.tsx @@ -0,0 +1,32 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { parseVariables, TimeSeriesQueryPlugin } from '@perses-dev/plugin-system'; +import { GreptimeDBTimeSeriesQuerySpec } from './greptimedb-query-types'; +import { getTimeSeriesData } from './get-greptimedb-data'; +import { GreptimeDBTimeSeriesQueryEditor } from './GreptimeDBQueryEditor'; + +export const GreptimeDBTimeSeriesQuery: TimeSeriesQueryPlugin = { + getTimeSeriesData, + OptionsEditorComponent: GreptimeDBTimeSeriesQueryEditor, + createInitialOptions: () => ({ + query: '', + }), + dependsOn: (spec) => { + const queryVariables = parseVariables(spec.query); + const allVariables = [...new Set([...queryVariables])]; + return { + variables: allVariables, + }; + }, +}; diff --git a/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx new file mode 100644 index 00000000..83397338 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx @@ -0,0 +1,112 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { + DatasourceSelect, + DatasourceSelectProps, + isVariableDatasource, + OptionsEditorProps, +} from '@perses-dev/plugin-system'; +import { ReactElement, useCallback } from 'react'; +import { produce } from 'immer'; +import { Stack } from '@mui/material'; +import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; +import { GreptimeDBQLEditor } from '../../components'; +import { queryExample } from '../../components/constants'; +import { useQueryState } from '../query-editor-model'; +import { GreptimeDBTimeSeriesQuerySpec } from './greptimedb-query-types'; + +type GreptimeDBTimeSeriesQueryEditorProps = OptionsEditorProps; + +export function GreptimeDBTimeSeriesQueryEditor(props: GreptimeDBTimeSeriesQueryEditorProps): ReactElement { + const { onChange, value } = props; + const { datasource } = value; + + const selectedDatasource = datasource ?? DEFAULT_DATASOURCE; + const { query, handleQueryChange, handleQueryBlur } = useQueryState(props); + + const handleDatasourceChange: DatasourceSelectProps['onChange'] = (newDatasourceSelection) => { + if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) { + onChange( + produce(value, (draft) => { + draft.datasource = newDatasourceSelection; + }) + ); + return; + } + throw new Error('Got unexpected non GreptimeDB datasource selection'); + }; + + const handleQueryExecute = (queryValue: string): void => { + onChange( + produce(value, (draft) => { + draft.query = queryValue; + }) + ); + }; + + const handleGreptimeDBQueryChange = useCallback( + (e: string) => { + handleQueryChange(e); + }, + [handleQueryChange] + ); + + const examplesStyle = { + fontSize: '11px', + color: '#777', + backgroundColor: '#f5f5f5', + padding: '8px', + borderRadius: '4px', + fontFamily: 'Monaco, Menlo, "Ubuntu Mono", monospace', + whiteSpace: 'pre-wrap' as const, + lineHeight: '1.3', + }; + + return ( + + + { + if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) { + event.preventDefault(); + handleQueryExecute(query); + } + }} + placeholder="Enter GreptimeDB SQL query" + /> +
+ + Query Examples + +
{queryExample}
+
+
+ ); +} diff --git a/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts b/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts new file mode 100644 index 00000000..50b3a453 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts @@ -0,0 +1,214 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { TimeSeriesQueryPlugin } from '@perses-dev/plugin-system'; +import { GreptimeDBClient, GreptimeDBQueryResponse } from '../../model/greptimedb-client'; +import { DEFAULT_DATASOURCE } from '../constants'; +import { + findTimeColumnIndex, + GreptimeDBRecords, + normalizeRecords, + replaceQueryVariables, + toTimestampMs, +} from '../greptimedb-query-data-model'; +import { GreptimeDBTimeSeriesQuerySpec } from './greptimedb-query-types'; + +function isLikelyNumericType(dataType: string | undefined): boolean { + if (!dataType) return false; + const t = dataType.toLowerCase(); + return ( + t.includes('int') || t.includes('float') || t.includes('double') || t.includes('decimal') || t.includes('number') + ); +} + +function buildSeriesName(valueColumnName: string, labels: Record): string { + const entries = Object.entries(labels); + if (entries.length === 0) { + return valueColumnName; + } + + return entries.map(([k, v]) => `${k}=${v}`).join(','); +} + +function buildTimeSeries( + records: GreptimeDBRecords | undefined, + fallbackTimestampMs: number +): Array<{ name: string; labels: Record; values: Array<[number, number]> }> { + const columnSchemas = records?.schema?.column_schemas ?? []; + const rows = records?.rows ?? []; + + if (!columnSchemas.length || !rows.length) { + return []; + } + + const timeIndex = findTimeColumnIndex(columnSchemas); + + if (timeIndex === -1) { + // Stat-style queries (e.g. `select count(*)`) may return a single numeric column with no timestamp. + // In this case, emit a synthetic single-point series to keep numeric panels working. + const scalarValueIndex = columnSchemas.findIndex((c) => isLikelyNumericType(c.data_type)); + if (scalarValueIndex === -1) { + return []; + } + + const scalarColumnName = columnSchemas[scalarValueIndex]?.name ?? 'value'; + const scalarValues: Array<[number, number]> = []; + + rows.forEach((row, rowIndex) => { + const raw = row?.[scalarValueIndex]; + const value = typeof raw === 'number' ? raw : Number(raw); + if (!Number.isFinite(value)) { + return; + } + // Spread multiple rows by 1ms so ordering is stable. + scalarValues.push([fallbackTimestampMs + rowIndex, value]); + }); + + if (scalarValues.length === 0) { + return []; + } + + return [ + { + name: scalarColumnName, + labels: {}, + values: scalarValues, + }, + ]; + } + + // Choose a "value" column. Prefer greptime conventions, then fall back to the first numeric column. + let valueIndex = columnSchemas.findIndex((c, idx) => idx !== timeIndex && c.name.toLowerCase() === 'greptime_value'); + if (valueIndex === -1) { + valueIndex = columnSchemas.findIndex((c, idx) => idx !== timeIndex && c.name.toLowerCase() === 'value'); + } + if (valueIndex === -1) { + valueIndex = columnSchemas.findIndex((c, idx) => idx !== timeIndex && isLikelyNumericType(c.data_type)); + } + if (valueIndex === -1) { + // Last resort: treat the first non-time column as value. + valueIndex = columnSchemas.findIndex((_, idx) => idx !== timeIndex); + } + + const valueColumnName = columnSchemas[valueIndex]?.name ?? 'value'; + + // Chart-safe default: group rows into standard timeseries (multiple points per series). + const seriesMap = new Map< + string, + { name: string; labels: Record; values: Array<[number, number]> } + >(); + + for (const row of rows) { + const tsMs = toTimestampMs(row?.[timeIndex], columnSchemas[timeIndex]?.data_type); + if (tsMs === null) { + continue; + } + + const raw = row?.[valueIndex]; + const value = typeof raw === 'number' ? raw : Number(raw); + if (!Number.isFinite(value)) { + continue; + } + + const labels: Record = {}; + columnSchemas.forEach((col, idx) => { + if (idx === timeIndex || idx === valueIndex) return; + const v = row?.[idx]; + labels[col.name] = v === null || v === undefined ? '' : String(v); + }); + + // Stable series key by label set. + const labelsKey = columnSchemas + .filter((_, idx) => idx !== timeIndex && idx !== valueIndex) + .map((c) => `${c.name}=${labels[c.name] ?? ''}`) + .join('|'); + const key = `${valueColumnName}|${labelsKey}`; + + const existing = seriesMap.get(key); + if (existing) { + existing.values.push([tsMs, value]); + } else { + seriesMap.set(key, { name: buildSeriesName(valueColumnName, labels), labels, values: [[tsMs, value]] }); + } + } + + return Array.from(seriesMap.values()).filter((s) => s.values.length > 0); +} + +function inferStepMsFromSeries( + series: Array<{ name: string; labels: Record; values: Array<[number, number]> }>, + fallbackStepMs: number +): number { + let minDeltaMs = Number.POSITIVE_INFINITY; + + for (const s of series) { + const sortedTimestamps = [...s.values.map(([ts]) => ts)].sort((a, b) => a - b); + for (let i = 1; i < sortedTimestamps.length; i++) { + const delta = sortedTimestamps[i]! - sortedTimestamps[i - 1]!; + if (delta > 0 && delta < minDeltaMs) { + minDeltaMs = delta; + } + } + } + + return Number.isFinite(minDeltaMs) ? minDeltaMs : fallbackStepMs; +} + +export const getTimeSeriesData: TimeSeriesQueryPlugin['getTimeSeriesData'] = async ( + spec, + context +) => { + if (!spec.query) { + return { + series: [], + }; + } + + const { start, end } = context.timeRange; + const query = replaceQueryVariables(spec.query, context.variableState, context.timeRange); + + const client = (await context.datasourceStore.getDatasourceClient( + spec.datasource ?? DEFAULT_DATASOURCE + )) as GreptimeDBClient; + + const response: GreptimeDBQueryResponse = await client.query({ + start: start.getTime().toString(), + end: end.getTime().toString(), + query, + }); + + if (response.status === 'error') { + throw new Error(response.error ?? 'GreptimeDB query failed'); + } + + const records = normalizeRecords(response.data); + const tableColumns = records?.schema?.column_schemas ?? []; + const tableRows = records?.rows ?? []; + + const series = buildTimeSeries(records, end.getTime()); + const stepMs = inferStepMsFromSeries(series, context.suggestedStepMs || 30 * 1000); + + return { + series, + timeRange: { start, end }, + stepMs, + metadata: { + executedQueryString: query, + records, + table: { + columns: tableColumns, + rows: tableRows, + }, + }, + }; +}; diff --git a/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.test.ts b/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.test.ts new file mode 100644 index 00000000..43add4ec --- /dev/null +++ b/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.test.ts @@ -0,0 +1,173 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// TODO: This should be fixed globally in the test setup +import { DatasourceSpec } from '@perses-dev/core'; + +jest.mock('echarts/core'); + +import { TimeSeriesQueryContext } from '@perses-dev/plugin-system'; +import { GreptimeDBDatasource, GreptimeDBDatasourceSpec } from '../../datasources'; +import { GreptimeDBQueryResponse } from '../../model/greptimedb-client'; +import { GreptimeDBTimeSeriesQuery } from './GreptimeDBQuery'; + +const datasource: GreptimeDBDatasourceSpec = { + directUrl: '/test', +}; + +const greptimedbStubClient = GreptimeDBDatasource.createClient(datasource, {}); + +greptimedbStubClient.query = jest.fn(async () => { + const stubResponse: GreptimeDBQueryResponse = { + status: 'success', + data: { + schema: { + column_schemas: [{ name: 'ts' }, { name: 'value' }], + }, + rows: [[1700000000000, 42]], + }, + }; + return stubResponse as GreptimeDBQueryResponse; +}); + +const getDatasourceClient: jest.Mock = jest.fn(() => { + return greptimedbStubClient; +}); + +const getDatasource: jest.Mock = jest.fn((): DatasourceSpec => { + return { + default: false, + plugin: { + kind: 'GreptimeDBDatasource', + spec: datasource, + }, + }; +}); + +const createStubContext = (): TimeSeriesQueryContext => { + const stubTimeSeriesContext: Partial = { + datasourceStore: { + getDatasource: getDatasource, + getDatasourceClient: getDatasourceClient, + listDatasourceSelectItems: jest.fn(), + getLocalDatasources: jest.fn(), + setLocalDatasources: jest.fn(), + getSavedDatasources: jest.fn(), + setSavedDatasources: jest.fn(), + }, + timeRange: { + end: new Date('01-01-2025'), + start: new Date('01-02-2025'), + }, + variableState: {}, + }; + return stubTimeSeriesContext as TimeSeriesQueryContext; +}; + +describe('GreptimeDBTimeSeriesQuery', () => { + it('should properly resolve variable dependencies', () => { + if (!GreptimeDBTimeSeriesQuery.dependsOn) throw new Error('dependsOn is not defined'); + const { variables } = GreptimeDBTimeSeriesQuery.dependsOn( + { + query: 'SELECT * FROM metrics WHERE foo="$foo" AND bar="$bar"', + }, + createStubContext() + ); + expect(variables).toEqual(['foo', 'bar']); + }); + + it('should create initial options with query', () => { + const initialOptions = GreptimeDBTimeSeriesQuery.createInitialOptions(); + expect(initialOptions).toEqual({ query: '' }); + }); + + it('should run query and return GreptimeDB records', async () => { + const client = getDatasourceClient(); + const resp = await client.query({ query: 'SELECT * FROM metrics' }); + expect(resp.data).toHaveProperty('rows'); + }); + + it('should support stat query without time column', async () => { + greptimedbStubClient.query = jest.fn(async () => { + const stubResponse: GreptimeDBQueryResponse = { + status: 'success', + data: { + output: [ + { + records: { + schema: { + column_schemas: [{ name: 'count(*)', data_type: 'Int64' }], + }, + rows: [[44931]], + total_rows: 1, + }, + }, + ], + execution_time_ms: 85, + }, + }; + return stubResponse as GreptimeDBQueryResponse; + }); + + const result = await GreptimeDBTimeSeriesQuery.getTimeSeriesData( + { query: 'SELECT count(*) FROM logs' }, + createStubContext() + ); + expect(result.series).toHaveLength(1); + expect(result.series[0]?.name).toBe('count(*)'); + expect(result.series[0]?.values).toHaveLength(1); + expect(result.series[0]?.values?.[0]?.[1]).toBe(44931); + }); + + it('should split rows into multiple series by labels', async () => { + greptimedbStubClient.query = jest.fn(async () => { + const stubResponse: GreptimeDBQueryResponse = { + status: 'success', + data: { + output: [ + { + records: { + schema: { + column_schemas: [ + { name: 'time', data_type: 'TimestampMillisecond' }, + { name: 'host', data_type: 'String' }, + { name: 'value', data_type: 'Float64' }, + ], + }, + rows: [ + [1775722140000, 'host-c', 0.73], + [1775722200000, 'host-c', 0.62], + [1775722140000, 'host_b', 0.63], + [1775722200000, 'host_b', 0.64], + ], + total_rows: 4, + }, + }, + ], + execution_time_ms: 8, + }, + }; + return stubResponse as GreptimeDBQueryResponse; + }); + + const result = await GreptimeDBTimeSeriesQuery.getTimeSeriesData( + { + query: "SELECT date_bin(INTERVAL '1 minute', ts) AS time, host, avg(cpu_usage) AS value FROM cpu_metrics_30", + }, + createStubContext() + ); + + expect(result.series).toHaveLength(2); + expect(result.series.map((s) => s.name).sort()).toEqual(['host=host-c', 'host=host_b']); + }); +}); diff --git a/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.ts b/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.ts new file mode 100644 index 00000000..4fee940d --- /dev/null +++ b/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.ts @@ -0,0 +1,27 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { DatasourceSelector } from '@perses-dev/core'; + +export interface GreptimeDBTimeSeriesQuerySpec { + query: string; + datasource?: DatasourceSelector; + // Legacy field kept for dashboard compatibility. Not used by query execution. + timeColumn?: string; +} + +export type DatasourceQueryResponse = { + status: string; + data: unknown; + warnings?: string[]; +}; diff --git a/greptimedb/src/queries/greptimedb-time-series-query/index.ts b/greptimedb/src/queries/greptimedb-time-series-query/index.ts new file mode 100644 index 00000000..d91d8562 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-time-series-query/index.ts @@ -0,0 +1,17 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export * from './get-greptimedb-data'; +export * from './GreptimeDBQuery'; +export * from './GreptimeDBQueryEditor'; +export * from './greptimedb-query-types'; diff --git a/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQuery.tsx b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQuery.tsx new file mode 100644 index 00000000..5ec9d902 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQuery.tsx @@ -0,0 +1,31 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { parseVariables, TraceQueryPlugin } from '@perses-dev/plugin-system'; +import { GreptimeDBTraceQuerySpec } from './greptimedb-trace-query-types'; +import { getGreptimeDBTraceData } from './get-greptimedb-trace-data'; +import { GreptimeDBTraceQueryEditor } from './GreptimeDBTraceQueryEditor'; + +export const GreptimeDBTraceQuery: TraceQueryPlugin = { + getTraceData: getGreptimeDBTraceData, + OptionsEditorComponent: GreptimeDBTraceQueryEditor, + createInitialOptions: () => ({ + query: '', + }), + dependsOn: (spec) => { + const queryVariables = parseVariables(spec.query); + return { + variables: [...new Set(queryVariables)], + }; + }, +}; diff --git a/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx new file mode 100644 index 00000000..360de919 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx @@ -0,0 +1,86 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Stack } from '@mui/material'; +import { produce } from 'immer'; +import { + DatasourceSelect, + DatasourceSelectProps, + isVariableDatasource, + OptionsEditorProps, +} from '@perses-dev/plugin-system'; +import { ReactElement, useCallback } from 'react'; +import { GreptimeDBQLEditor } from '../../components'; +import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; +import { useQueryState } from '../query-editor-model'; +import { GreptimeDBTraceQuerySpec } from './greptimedb-trace-query-types'; + +type GreptimeDBTraceQueryEditorProps = OptionsEditorProps; + +export function GreptimeDBTraceQueryEditor(props: GreptimeDBTraceQueryEditorProps): ReactElement { + const { onChange, value } = props; + const { datasource } = value; + const selectedDatasource = datasource ?? DEFAULT_DATASOURCE; + const { query, handleQueryChange, handleQueryBlur } = useQueryState(props); + + const handleDatasourceChange: DatasourceSelectProps['onChange'] = (newDatasourceSelection) => { + if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) { + onChange( + produce(value, (draft) => { + draft.datasource = newDatasourceSelection; + }) + ); + return; + } + throw new Error('Got unexpected non GreptimeDB datasource selection'); + }; + + const handleQueryExecute = (queryValue: string): void => { + onChange( + produce(value, (draft) => { + draft.query = queryValue; + }) + ); + }; + + const handleGreptimeDBQueryChange = useCallback( + (next: string) => { + handleQueryChange(next); + }, + [handleQueryChange] + ); + + return ( + + + { + if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) { + event.preventDefault(); + handleQueryExecute(query); + } + }} + placeholder="Enter SQL for trace search or trace details" + /> + + ); +} diff --git a/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts b/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts new file mode 100644 index 00000000..ea55f90f --- /dev/null +++ b/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts @@ -0,0 +1,456 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { otlpcommonv1, otlptracev1, TraceSearchResult } from '@perses-dev/core'; +import { replaceVariables, TraceQueryPlugin } from '@perses-dev/plugin-system'; +import { GreptimeDBClient, GreptimeDBQueryResponse } from '../../model/greptimedb-client'; +import { DEFAULT_DATASOURCE } from '../constants'; +import { + GreptimeDBColumnSchema, + GreptimeDBRecords, + normalizeRecords, + toTimestampMs, +} from '../greptimedb-query-data-model'; +import { GreptimeDBTraceQuerySpec } from './greptimedb-trace-query-types'; + +type Row = unknown[]; +type ColumnIndexMap = Record; + +interface MutableTraceResult { + traceId: string; + startTimeUnixMs: number; + endTimeUnixMs: number; + rootServiceName: string; + rootTraceName: string; + serviceStats: Record; +} + +export const getGreptimeDBTraceData: TraceQueryPlugin['getTraceData'] = async ( + spec, + context +) => { + const rawQuery = replaceVariables(spec.query ?? '', context.variableState).trim(); + if (rawQuery.length === 0) { + return { searchResult: [] }; + } + + const datasourceSelector = normalizeDatasourceSelector(spec.datasource); + const client = (await context.datasourceStore.getDatasourceClient( + datasourceSelector ?? DEFAULT_DATASOURCE + )) as GreptimeDBClient; + const start = context.absoluteTimeRange?.start.getTime().toString() ?? '0'; + const end = context.absoluteTimeRange?.end.getTime().toString() ?? '0'; + + const response: GreptimeDBQueryResponse = await client.query({ query: rawQuery, start, end }); + if (response.status === 'error') { + throw new Error(response.error ?? 'GreptimeDB trace query failed'); + } + + const records = normalizeRecords(response.data); + const isDetailQuery = isLikelyTraceDetailSQL(rawQuery); + + if (isDetailQuery && isTraceDetailsResult(records)) { + return { + trace: convertRowsToTrace(records), + metadata: { + executedQueryString: rawQuery, + }, + }; + } + + return { + searchResult: buildSearchResult(records), + metadata: { + executedQueryString: rawQuery, + }, + }; +}; + +function normalizeDatasourceSelector( + datasource: GreptimeDBTraceQuerySpec['datasource'] +): GreptimeDBTraceQuerySpec['datasource'] | undefined { + if (!datasource) { + return undefined; + } + + // Deep links may carry an empty datasource name. Treat it as "default datasource for this kind". + if (typeof datasource.name === 'string' && datasource.name.trim() === '') { + const { kind } = datasource; + return kind ? { kind } : undefined; + } + + return datasource; +} + +function buildColumnIndexMap(columns: GreptimeDBColumnSchema[] | undefined): ColumnIndexMap { + const map: ColumnIndexMap = {}; + (columns ?? []).forEach((c, index) => { + map[c.name.toLowerCase()] = index; + }); + return map; +} + +function isTraceDetailsResult(records: GreptimeDBRecords | undefined): boolean { + const columns = records?.schema?.column_schemas ?? []; + if (columns.length === 0) return false; + const map = buildColumnIndexMap(columns); + // Trace detail queries should return span-level columns for gantt visualization. + return map.trace_id !== undefined && map.span_id !== undefined; +} + +function isLikelyTraceDetailSQL(query: string): boolean { + return /where[\s\S]*trace_id\s*=/i.test(query); +} + +function getCell(row: Row, map: ColumnIndexMap, names: string[]): unknown { + for (const name of names) { + const idx = map[name.toLowerCase()]; + if (idx !== undefined) { + return row[idx]; + } + } + return undefined; +} + +function getString(value: unknown): string | undefined { + if (value === null || value === undefined) return undefined; + return String(value); +} + +function getNumber(value: unknown): number | undefined { + if (value === null || value === undefined) return undefined; + if (typeof value === 'number') return Number.isFinite(value) ? value : undefined; + const parsed = Number(value); + return Number.isFinite(parsed) ? parsed : undefined; +} + +function isErrorStatus(value: unknown): boolean { + const normalized = String(value ?? '') + .trim() + .toUpperCase(); + return normalized === 'STATUS_CODE_ERROR' || normalized === 'ERROR' || normalized === '2'; +} + +function getDurationMs(row: Row, columns: GreptimeDBColumnSchema[] | undefined, map: ColumnIndexMap): number { + const durationMs = getNumber(getCell(row, map, ['duration_ms'])); + if (durationMs !== undefined) return durationMs; + + const durationNano = getNumber(getCell(row, map, ['duration_nano', 'duration_ns'])); + if (durationNano !== undefined) return durationNano / 1_000_000; + + const startIndex = map.timestamp ?? map.start_time ?? map.start_time_unix_nano; + const endIndex = map.timestamp_end ?? map.end_time ?? map.end_time_unix_nano; + if (startIndex !== undefined && endIndex !== undefined) { + const startMs = toTimestampMs(row[startIndex], columns?.[startIndex]?.data_type); + const endMs = toTimestampMs(row[endIndex], columns?.[endIndex]?.data_type); + if (startMs !== null && endMs !== null) return Math.max(0, endMs - startMs); + } + return 0; +} + +function getStartMs(row: Row, columns: GreptimeDBColumnSchema[] | undefined, map: ColumnIndexMap): number | undefined { + const candidates = [ + 'timestamp', + 'start_time', + 'start_time_unix_nano', + 'start_time_unix_ns', + 'start_time_unix_ms', + 'start_time_unix', + ]; + for (const c of candidates) { + const idx = map[c]; + if (idx === undefined) continue; + const ts = toTimestampMs(row[idx], columns?.[idx]?.data_type); + if (ts !== null) return ts; + } + return undefined; +} + +function getEndMs(row: Row, columns: GreptimeDBColumnSchema[] | undefined, map: ColumnIndexMap): number | undefined { + const candidates = ['timestamp_end', 'end_time', 'end_time_unix_nano', 'end_time_unix_ns', 'end_time_unix_ms']; + for (const c of candidates) { + const idx = map[c]; + if (idx === undefined) continue; + const ts = toTimestampMs(row[idx], columns?.[idx]?.data_type); + if (ts !== null) return ts; + } + return undefined; +} + +function buildSearchResult(records: GreptimeDBRecords | undefined): TraceSearchResult[] { + const columns = records?.schema?.column_schemas ?? []; + const rows = records?.rows ?? []; + if (!columns.length || !rows.length) return []; + + const map = buildColumnIndexMap(columns); + const traceMap = new Map(); + + rows.forEach((row) => { + const traceId = getString(getCell(row, map, ['trace_id', 'traceid', 'traceId'])); + if (!traceId) return; + + const startMs = getStartMs(row, columns, map); + const durationMs = getDurationMs(row, columns, map); + const endMs = getEndMs(row, columns, map) ?? (startMs !== undefined ? startMs + durationMs : undefined); + + const serviceName = getString(getCell(row, map, ['service_name', 'root_service_name'])) ?? 'unknown'; + const spanName = + getString(getCell(row, map, ['span_name', 'root_trace_name', 'operation_name', 'name'])) ?? '(unknown span)'; + const parentSpanId = getString(getCell(row, map, ['parent_span_id', 'parentspanid', 'parentSpanId'])); + + const existing = traceMap.get(traceId); + if (!existing) { + traceMap.set(traceId, { + traceId, + startTimeUnixMs: startMs ?? 0, + endTimeUnixMs: endMs ?? startMs ?? 0, + rootServiceName: serviceName, + rootTraceName: spanName, + serviceStats: { + [serviceName]: { + spanCount: 1, + errorCount: isErrorStatus(getCell(row, map, ['span_status_code', 'status_code'])) ? 1 : 0, + }, + }, + }); + return; + } + + if (startMs !== undefined) { + existing.startTimeUnixMs = existing.startTimeUnixMs === 0 ? startMs : Math.min(existing.startTimeUnixMs, startMs); + } + if (endMs !== undefined) { + existing.endTimeUnixMs = Math.max(existing.endTimeUnixMs, endMs); + } + + if (!parentSpanId) { + existing.rootTraceName = spanName; + existing.rootServiceName = serviceName; + } + + if (!existing.serviceStats[serviceName]) { + existing.serviceStats[serviceName] = { spanCount: 0, errorCount: 0 }; + } + existing.serviceStats[serviceName]!.spanCount += 1; + if (isErrorStatus(getCell(row, map, ['span_status_code', 'status_code']))) { + existing.serviceStats[serviceName]!.errorCount += 1; + } + }); + + return Array.from(traceMap.values()) + .map((entry) => ({ + traceId: entry.traceId, + startTimeUnixMs: entry.startTimeUnixMs, + durationMs: Math.max(0, entry.endTimeUnixMs - entry.startTimeUnixMs), + rootServiceName: entry.rootServiceName, + rootTraceName: entry.rootTraceName, + serviceStats: entry.serviceStats, + })) + .sort((a, b) => b.startTimeUnixMs - a.startTimeUnixMs); +} + +function toNanoString(value: unknown, dataType?: string): string | undefined { + if (value === undefined || value === null) return undefined; + const raw = getNumber(value); + if (raw !== undefined) { + const normalized = (dataType ?? '').toLowerCase(); + if (normalized.includes('nanosecond')) return String(Math.trunc(raw)); + if (normalized.includes('microsecond')) return String(Math.trunc(raw * 1000)); + if (normalized.includes('millisecond')) return String(Math.trunc(raw * 1_000_000)); + if (normalized.includes('second')) return String(Math.trunc(raw * 1_000_000_000)); + + if (raw > 1_000_000_000_000_000) return String(Math.trunc(raw)); + if (raw > 1_000_000_000_000) return String(Math.trunc(raw * 1_000_000)); + if (raw > 1_000_000_000) return String(Math.trunc(raw * 1_000_000_000)); + return String(Math.trunc(raw * 1_000_000)); + } + + const dateMs = new Date(String(value)).getTime(); + if (!Number.isNaN(dateMs)) return String(Math.trunc(dateMs * 1_000_000)); + return undefined; +} + +function parseJsonArray(value: unknown): unknown[] { + if (Array.isArray(value)) return value; + if (typeof value === 'string') { + try { + const parsed = JSON.parse(value); + return Array.isArray(parsed) ? parsed : []; + } catch { + return []; + } + } + return []; +} + +function toAnyValue(value: unknown): otlpcommonv1.AnyValue { + return { + stringValue: typeof value === 'string' ? value : JSON.stringify(value), + }; +} + +function toKeyValue(key: string, value: unknown): otlpcommonv1.KeyValue { + return { + key, + value: toAnyValue(value), + }; +} + +function parseStatusCode(value: unknown): otlptracev1.Status['code'] { + const normalized = String(value ?? '') + .trim() + .toUpperCase(); + if (!normalized) return undefined; + if (normalized === 'STATUS_CODE_OK' || normalized === 'OK' || normalized === '1') { + return otlptracev1.StatusCodeOk; + } + if (normalized === 'STATUS_CODE_ERROR' || normalized === 'ERROR' || normalized === '2') { + return otlptracev1.StatusCodeError; + } + return otlptracev1.StatusCodeUnset; +} + +function convertRowsToTrace(records: GreptimeDBRecords | undefined): otlptracev1.TracesData { + const columns = records?.schema?.column_schemas ?? []; + const rows = records?.rows ?? []; + if (!columns.length || !rows.length) return { resourceSpans: [] }; + + const map = buildColumnIndexMap(columns); + const spanColumns = columns.filter((col) => col.name.startsWith('span_attributes.')); + const resourceColumns = columns.filter((col) => col.name.startsWith('resource_attributes.')); + + const byService = new Map< + string, + { resourceAttrs: otlpcommonv1.KeyValue[]; scopeSpans: Map } + >(); + + rows.forEach((row) => { + const traceId = getString(getCell(row, map, ['trace_id', 'traceid', 'traceId'])); + const spanId = getString(getCell(row, map, ['span_id', 'spanid', 'spanId'])); + if (!traceId || !spanId) return; + + const parentSpanId = getString(getCell(row, map, ['parent_span_id', 'parentspanid', 'parentSpanId'])); + const name = getString(getCell(row, map, ['span_name', 'name', 'operation_name'])) ?? '(unknown span)'; + const kind = (getString(getCell(row, map, ['span_kind', 'kind'])) ?? + 'SPAN_KIND_UNSPECIFIED') as otlptracev1.Span['kind']; + const serviceName = getString(getCell(row, map, ['service_name'])) ?? 'unknown'; + const scopeName = getString(getCell(row, map, ['scope_name'])) ?? ''; + const scopeVersion = getString(getCell(row, map, ['scope_version'])) ?? ''; + + const startIndex = map.timestamp ?? map.start_time ?? map.start_time_unix_nano; + const endIndex = map.timestamp_end ?? map.end_time ?? map.end_time_unix_nano; + const durationIndex = map.duration_nano ?? map.duration_ns; + + const startTimeUnixNano = + (startIndex !== undefined ? toNanoString(row[startIndex], columns[startIndex]?.data_type) : undefined) ?? '0'; + const endTimeUnixNano = + (endIndex !== undefined ? toNanoString(row[endIndex], columns[endIndex]?.data_type) : undefined) ?? + (durationIndex !== undefined + ? String(parseInt(startTimeUnixNano, 10) + parseInt(toNanoString(row[durationIndex]) ?? '0', 10)) + : startTimeUnixNano); + + const spanAttributes = spanColumns + .map((c) => { + const idx = map[c.name.toLowerCase()]; + if (idx === undefined) return undefined; + const value = row[idx]; + if (value === undefined || value === null || value === '') return undefined; + return toKeyValue(c.name.replace(/^span_attributes\./, ''), value); + }) + .filter((v): v is otlpcommonv1.KeyValue => v !== undefined); + + const spanEvents = parseJsonArray(getCell(row, map, ['span_events'])).map((event) => { + const e = event as Record; + const eventTime = toNanoString(e.timeUnixNano ?? e.time_unix_nano ?? e.timestamp ?? e.time) ?? startTimeUnixNano; + const eventName = getString(e.name) ?? 'event'; + const attrs = e.attributes as Record | undefined; + const attributes = attrs + ? Object.entries(attrs).map(([k, v]) => toKeyValue(k, v)) + : ([] as otlpcommonv1.KeyValue[]); + return { + timeUnixNano: eventTime, + name: eventName, + attributes, + }; + }); + + const spanLinks = parseJsonArray(getCell(row, map, ['span_links'])).map((link) => { + const l = link as Record; + const attrs = l.attributes as Record | undefined; + const attributes = attrs + ? Object.entries(attrs).map(([k, v]) => toKeyValue(k, v)) + : ([] as otlpcommonv1.KeyValue[]); + return { + traceId: getString(l.traceId ?? l.trace_id) ?? '', + spanId: getString(l.spanId ?? l.span_id) ?? '', + attributes, + }; + }); + + const statusMessage = getString(getCell(row, map, ['span_status_message'])) ?? ''; + const statusCode = parseStatusCode(getCell(row, map, ['span_status_code', 'status_code'])); + + const span: otlptracev1.Span = { + traceId, + spanId, + parentSpanId, + name, + kind, + startTimeUnixNano, + endTimeUnixNano, + attributes: spanAttributes, + events: spanEvents, + links: spanLinks, + status: { + message: statusMessage, + code: statusCode, + }, + }; + + if (!byService.has(serviceName)) { + const resourceAttrs: otlpcommonv1.KeyValue[] = [toKeyValue('service.name', serviceName)]; + resourceColumns.forEach((c) => { + const idx = map[c.name.toLowerCase()]; + if (idx === undefined) return; + const value = row[idx]; + if (value === undefined || value === null || value === '') return; + resourceAttrs.push(toKeyValue(c.name.replace(/^resource_attributes\./, ''), value)); + }); + byService.set(serviceName, { resourceAttrs, scopeSpans: new Map() }); + } + + const serviceGroup = byService.get(serviceName)!; + const scopeKey = `${scopeName}|${scopeVersion}`; + if (!serviceGroup.scopeSpans.has(scopeKey)) { + serviceGroup.scopeSpans.set(scopeKey, { + scope: { + name: scopeName, + version: scopeVersion, + }, + spans: [], + }); + } + serviceGroup.scopeSpans.get(scopeKey)!.spans.push(span); + }); + + const resourceSpans: NonNullable = Array.from(byService.entries()).map( + ([_, value]) => ({ + resource: { attributes: value.resourceAttrs }, + scopeSpans: Array.from(value.scopeSpans.values()), + }) + ); + + return { + resourceSpans, + }; +} diff --git a/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query-types.ts b/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query-types.ts new file mode 100644 index 00000000..48ba2352 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query-types.ts @@ -0,0 +1,19 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { DatasourceSelector } from '@perses-dev/core'; + +export interface GreptimeDBTraceQuerySpec { + query: string; + datasource?: DatasourceSelector; +} diff --git a/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts b/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts new file mode 100644 index 00000000..30716db3 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts @@ -0,0 +1,241 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { DatasourceSpec } from '@perses-dev/core'; +import { TraceQueryContext } from '@perses-dev/plugin-system'; +import { GreptimeDBDatasource, GreptimeDBDatasourceSpec } from '../../datasources'; +import { GreptimeDBQueryResponse } from '../../model/greptimedb-client'; +import { GreptimeDBTraceQuery } from './GreptimeDBTraceQuery'; + +const datasource: GreptimeDBDatasourceSpec = { + directUrl: '/test', +}; + +const greptimedbStubClient = GreptimeDBDatasource.createClient(datasource, {}); +const mockedQuery = jest.fn(); +greptimedbStubClient.query = mockedQuery; + +const getDatasourceClient: jest.Mock = jest.fn(() => { + return greptimedbStubClient; +}); + +const createStubContext = (variableState: TraceQueryContext['variableState'] = {}): TraceQueryContext => { + const stubTraceContext: Partial = { + datasourceStore: { + getDatasource: jest.fn(async (): Promise => { + return Promise.resolve({ + default: false, + plugin: { + kind: 'GreptimeDBDatasource', + spec: datasource, + }, + } as DatasourceSpec); + }), + getDatasourceClient: getDatasourceClient, + listDatasourceSelectItems: jest.fn(), + getLocalDatasources: jest.fn(), + setLocalDatasources: jest.fn(), + getSavedDatasources: jest.fn(), + setSavedDatasources: jest.fn(), + }, + variableState, + }; + return stubTraceContext as TraceQueryContext; +}; + +describe('GreptimeDBTraceQuery', () => { + beforeEach(() => { + mockedQuery.mockReset(); + getDatasourceClient.mockClear(); + }); + + it('should create initial options', () => { + expect(GreptimeDBTraceQuery.createInitialOptions()).toEqual({ + query: '', + }); + }); + + it('should convert SQL rows into trace search results', async () => { + const stubResponse: GreptimeDBQueryResponse = { + status: 'success', + data: { + schema: { + column_schemas: [ + { name: 'trace_id' }, + { name: 'timestamp', data_type: 'timestamp_millisecond' }, + { name: 'duration_ms' }, + { name: 'root_service_name' }, + { name: 'root_trace_name' }, + { name: 'status_code' }, + ], + }, + rows: [['abc123abc123abc123abc123abc123ab', 1700000000000, 100, 'frontend', 'GET /', 'STATUS_CODE_ERROR']], + }, + }; + mockedQuery.mockResolvedValue(stubResponse); + + const result = await GreptimeDBTraceQuery.getTraceData( + { + query: 'SELECT * FROM public.opentelemetry_traces', + }, + createStubContext() + ); + + expect(result.searchResult).toHaveLength(1); + expect(result.searchResult?.[0]?.traceId).toBe('abc123abc123abc123abc123abc123ab'); + expect(result.searchResult?.[0]?.rootServiceName).toBe('frontend'); + expect(result.searchResult?.[0]?.durationMs).toBe(100); + expect(result.searchResult?.[0]?.serviceStats?.frontend?.spanCount).toBe(1); + expect(result.searchResult?.[0]?.serviceStats?.frontend?.errorCount).toBe(1); + expect(result.trace).toBeUndefined(); + }); + + it('should convert trace detail SQL rows into OTLP trace', async () => { + const traceId = 'fb60d19aa36fdcb7d14a71ca0b9b42ae'; + const detailsQuery = `SELECT * FROM public.opentelemetry_traces WHERE trace_id = '${traceId}' ORDER BY timestamp ASC`; + const stubResponse: GreptimeDBQueryResponse = { + status: 'success', + data: { + schema: { + column_schemas: [ + { name: 'trace_id' }, + { name: 'span_id' }, + { name: 'parent_span_id' }, + { name: 'timestamp', data_type: 'timestamp_millisecond' }, + { name: 'timestamp_end', data_type: 'timestamp_millisecond' }, + { name: 'service_name' }, + { name: 'scope_name' }, + { name: 'scope_version' }, + { name: 'span_name' }, + { name: 'span_kind' }, + { name: 'span_status_code' }, + { name: 'span_status_message' }, + { name: 'span_events' }, + { name: 'span_links' }, + { name: 'span_attributes.http.method' }, + ], + }, + rows: [ + [ + traceId, + 'sid-root', + null, + 1700000000000, + 1700000000100, + 'frontend', + 'otel.scope', + '1.0.0', + 'GET /', + 'SPAN_KIND_SERVER', + 'STATUS_CODE_OK', + '', + '[]', + '[]', + 'GET', + ], + [ + traceId, + 'sid-child', + 'sid-root', + 1700000000020, + 1700000000090, + 'frontend', + 'otel.scope', + '1.0.0', + 'SELECT users', + 'SPAN_KIND_CLIENT', + 'STATUS_CODE_ERROR', + 'db error', + '[{"name":"exception","time_unix_nano":"1700000000030000000"}]', + '[]', + 'POST', + ], + ], + }, + }; + mockedQuery.mockResolvedValue(stubResponse); + + const result = await GreptimeDBTraceQuery.getTraceData( + { + query: detailsQuery, + }, + createStubContext() + ); + + expect(mockedQuery).toHaveBeenCalledWith({ + query: detailsQuery, + start: '0', + end: '0', + }); + expect(result.trace?.resourceSpans?.[0]?.scopeSpans?.[0]?.spans).toHaveLength(2); + expect(result.trace?.resourceSpans?.[0]?.scopeSpans?.[0]?.spans?.[1]?.status?.code).toBe('STATUS_CODE_ERROR'); + expect(result.searchResult).toBeUndefined(); + }); + + it('should normalize empty datasource name from deep-link payload', async () => { + mockedQuery.mockResolvedValue({ + status: 'success', + data: { + schema: { + column_schemas: [{ name: 'trace_id' }], + }, + rows: [], + }, + } as GreptimeDBQueryResponse); + + await GreptimeDBTraceQuery.getTraceData( + { + query: 'SELECT * FROM public.trace_spans', + datasource: { + kind: 'GreptimeDBDatasource', + name: '', + }, + }, + createStubContext() + ); + + expect(getDatasourceClient).toHaveBeenCalledWith({ + kind: 'GreptimeDBDatasource', + }); + }); + + it('should replace query variables from variableState', async () => { + mockedQuery.mockResolvedValue({ + status: 'success', + data: { + schema: { + column_schemas: [{ name: 'trace_id' }], + }, + rows: [], + }, + } as GreptimeDBQueryResponse); + + await GreptimeDBTraceQuery.getTraceData( + { + query: "SELECT * FROM public.web_trace_demo WHERE trace_id = '${trace_id}'", + }, + createStubContext({ + trace_id: { + value: 'a1b2c3d4e5f60123456789abcdef0001', + loading: false, + }, + }) + ); + + expect(mockedQuery).toHaveBeenCalledWith( + expect.objectContaining({ + query: "SELECT * FROM public.web_trace_demo WHERE trace_id = 'a1b2c3d4e5f60123456789abcdef0001'", + }) + ); + }); +}); diff --git a/greptimedb/src/queries/greptimedb-trace-query/index.ts b/greptimedb/src/queries/greptimedb-trace-query/index.ts new file mode 100644 index 00000000..9b9e8725 --- /dev/null +++ b/greptimedb/src/queries/greptimedb-trace-query/index.ts @@ -0,0 +1,17 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export * from './GreptimeDBTraceQuery'; +export * from './GreptimeDBTraceQueryEditor'; +export * from './get-greptimedb-trace-data'; +export * from './greptimedb-trace-query-types'; diff --git a/greptimedb/src/queries/index.ts b/greptimedb/src/queries/index.ts new file mode 100644 index 00000000..3db0ce75 --- /dev/null +++ b/greptimedb/src/queries/index.ts @@ -0,0 +1,16 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export * from './greptimedb-time-series-query'; +export * from './greptimedb-log-query'; +export * from './greptimedb-trace-query'; diff --git a/greptimedb/src/queries/query-editor-model.ts b/greptimedb/src/queries/query-editor-model.ts new file mode 100644 index 00000000..9d55ac4c --- /dev/null +++ b/greptimedb/src/queries/query-editor-model.ts @@ -0,0 +1,59 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { produce } from 'immer'; +import { useState } from 'react'; + +type QuerySpec = { + query: string; +}; + +/** + * A hook for managing the `query` state in GreptimeDB query specs. Returns the `query` value, along with + * `onChange` and `onBlur` event handlers to the input. Keeps a local copy of the user's input and only syncs those + * changes with the overall spec value once the input is blurred to prevent re-running queries in the panel's preview + * every time the user types. + */ +export function useQueryState(props: { + value: T; + onChange: (next: T) => void; +}): { + query: string; + handleQueryChange: (e: string) => void; + handleQueryBlur: () => void; +} { + const { onChange, value } = props; + + const [query, setQuery] = useState(value.query || ''); + const [lastSyncedQuery, setLastSyncedQuery] = useState(value.query); + + if (value.query !== lastSyncedQuery) { + setQuery(value.query || ''); + setLastSyncedQuery(value.query); + } + + const handleQueryChange = (e: string): void => { + setQuery(e); + }; + + const handleQueryBlur = (): void => { + setLastSyncedQuery(query); + onChange( + produce(value, (draft) => { + draft.query = query; + }) + ); + }; + + return { query, handleQueryChange, handleQueryBlur }; +} diff --git a/greptimedb/src/setup-tests.ts b/greptimedb/src/setup-tests.ts new file mode 100644 index 00000000..d43de32e --- /dev/null +++ b/greptimedb/src/setup-tests.ts @@ -0,0 +1,17 @@ +// Copyright The Perses Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import '@testing-library/jest-dom'; + +// Always mock e-charts during tests since we don't have a proper canvas in jsdom +jest.mock('echarts/core'); diff --git a/greptimedb/tsconfig.build.json b/greptimedb/tsconfig.build.json new file mode 100644 index 00000000..fc0aafe2 --- /dev/null +++ b/greptimedb/tsconfig.build.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["**/*.stories.*", "**/*.test.*", "**/*.map"], + "compilerOptions": { + "emitDeclarationOnly": true, + "declaration": true, + "preserveWatchOutput": true + } +} diff --git a/greptimedb/tsconfig.json b/greptimedb/tsconfig.json new file mode 100644 index 00000000..98221344 --- /dev/null +++ b/greptimedb/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "./dist/lib", + "rootDir": "./src" + }, + "include": ["src"] +} diff --git a/package-lock.json b/package-lock.json index e4855657..eda3d27a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "datasourcevariable", "flamechart", "gaugechart", + "greptimedb", "heatmapchart", "histogramchart", "logstable", @@ -197,6 +198,30 @@ "use-resize-observer": "^9.0.0" } }, + "greptimedb": { + "name": "@perses-dev/greptimedb-plugin", + "version": "0.1.0-beta.0", + "peerDependencies": { + "@emotion/react": "^11.7.1", + "@emotion/styled": "^11.6.0", + "@hookform/resolvers": "^3.2.0", + "@perses-dev/components": "^0.53.1", + "@perses-dev/core": "^0.53.0", + "@perses-dev/dashboards": "^0.53.1", + "@perses-dev/explore": "^0.53.1", + "@perses-dev/plugin-system": "^0.53.1", + "@tanstack/react-query": "^4.39.1", + "date-fns": "^4.1.0", + "date-fns-tz": "^3.2.0", + "echarts": "5.5.0", + "immer": "^10.1.1", + "lodash": "^4.17.21", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0", + "react-hook-form": "^7.52.2", + "use-resize-observer": "^9.0.0" + } + }, "heatmapchart": { "name": "@perses-dev/heatmap-chart-plugin", "version": "0.4.1", @@ -3845,6 +3870,10 @@ "resolved": "gaugechart", "link": true }, + "node_modules/@perses-dev/greptimedb-plugin": { + "resolved": "greptimedb", + "link": true + }, "node_modules/@perses-dev/heatmap-chart-plugin": { "resolved": "heatmapchart", "link": true diff --git a/package.json b/package.json index 383e2c2e..15c2ceb0 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "datasourcevariable", "flamechart", "gaugechart", + "greptimedb", "heatmapchart", "histogramchart", "logstable",