diff --git a/.drone.yml b/.drone.yml index 9f06b37..20c85d5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -38,4 +38,30 @@ steps: image: curlimages/curl commands: - curl -u 'howard:Papadopolus0' -X POST 'https://portainer.martinfencl.eu/api/stacks/webhooks/72df3f63-b271-4aef-9325-772a2ccbaeca' - \ No newline at end of file + +--- +kind: pipeline +type: docker +name: scrape-cron + +trigger: + event: + - cron + cron: + - lipno-scraper + +steps: + - name: scrape-and-commit + image: node:18-alpine + environment: + GIT_AUTHOR_NAME: drone + GIT_AUTHOR_EMAIL: drone@internet-master.cz + GIT_COMMITTER_NAME: drone + GIT_COMMITTER_EMAIL: drone@internet-master.cz + commands: + - apk add --no-cache git + - npm ci + - node scripts/scrapeLipno.js + - git add public/data/lipno.json + - git commit -m "chore: update lipno reservoir data [CI SKIP]" || true + - git push origin main || true \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4e9c69c..50e732c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,10 +8,14 @@ "name": "test", "version": "0.0.0", "dependencies": { + "axios": "^1.17.0", + "cheerio": "^1.2.0", + "date-fns": "^4.4.0", "react": "^19.2.0", "react-dom": "^19.2.0", "react-icons": "^5.5.0", - "react-router-dom": "^7.9.6" + "react-router-dom": "^7.9.6", + "recharts": "^3.8.1" }, "devDependencies": { "@eslint/js": "^9.39.1", @@ -23,6 +27,7 @@ "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", "globals": "^16.5.0", + "tsx": "^4.22.4", "typescript": "~5.9.3", "typescript-eslint": "^8.46.4", "vite": "^7.2.4" @@ -1011,6 +1016,42 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@reduxjs/toolkit": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.12.0.tgz", + "integrity": "sha512-KiT+RzZbp6mQET+Mg+h2c97+9j1sNflUxQkIHI7Yuzf6Peu+OYpmkn6nbHWmLLWj+1ZODUJFwGZ7gx3L9R9EOw==", + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@standard-schema/utils": "^0.3.0", + "immer": "^11.0.0", + "redux": "^5.0.1", + "redux-thunk": "^3.1.0", + "reselect": "^5.1.0" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || ^18 || ^19", + "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-redux": { + "optional": true + } + } + }, + "node_modules/@reduxjs/toolkit/node_modules/immer": { + "version": "11.1.8", + "resolved": "https://registry.npmjs.org/immer/-/immer-11.1.8.tgz", + "integrity": "sha512-/tbkHMW7y10Lx6i1crLjD4/OhNkRG+Fo7byZHtah0547nIeXYcpIXaUh0IAQY6gO5459qpGGYapcEOHtFXkIuA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-beta.47", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.47.tgz", @@ -1326,6 +1367,18 @@ "win32" ] }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@standard-schema/utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz", + "integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==", + "license": "MIT" + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1371,6 +1424,69 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -1399,7 +1515,7 @@ "version": "19.2.7", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -1415,6 +1531,12 @@ "@types/react": "^19.2.0" } }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", + "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==", + "license": "MIT" + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.48.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.48.0.tgz", @@ -1729,6 +1851,18 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1769,6 +1903,24 @@ "dev": true, "license": "Python-2.0" }, + "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" + }, + "node_modules/axios": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.17.0.tgz", + "integrity": "sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1786,6 +1938,12 @@ "baseline-browser-mapping": "dist/cli.js" } }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "license": "ISC" + }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -1831,6 +1989,19 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "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", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1879,6 +2050,57 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/cheerio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^7.19.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=20.18.1" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1899,6 +2121,18 @@ "dev": true, "license": "MIT" }, + "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", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1941,18 +2175,176 @@ "node": ">= 8" } }, + "node_modules/css-select": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, "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==", - "dev": true, + "devOptional": true, "license": "MIT" }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/date-fns": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.4.0.tgz", + "integrity": "sha512-+1UMbeh68lH1SegH83CGWwpb6OHHbpSgr3+s5Eww5M4CAgswBpoWS0AjTOfEJ33HiYKz1hdj/KTFprzXHmq/6w==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -1966,6 +2358,12 @@ } } }, + "node_modules/decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==", + "license": "MIT" + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -1973,6 +2371,84 @@ "dev": true, "license": "MIT" }, + "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", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "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", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.259", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.259.tgz", @@ -1980,6 +2456,86 @@ "dev": true, "license": "ISC" }, + "node_modules/encoding-sniffer": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", + "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", + "license": "MIT", + "dependencies": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + }, + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=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", + "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", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "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", + "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/es-toolkit": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.47.0.tgz", + "integrity": "sha512-n1GuoD0WEQZMBk5tttoZSqwgyLx01oqa5XsBmCHwPyNe1S9jPBEmtR2pSgp2kJuWE3ciFZ6yRHmY4pM4C3OOkw==", + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks" + ] + }, "node_modules/esbuild": { "version": "0.25.12", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", @@ -2229,6 +2785,12 @@ "node": ">=0.10.0" } }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2319,6 +2881,42 @@ "dev": true, "license": "ISC" }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "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", + "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/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2334,6 +2932,15 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "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", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -2344,6 +2951,43 @@ "node": ">=6.9.0" } }, + "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", + "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", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -2370,6 +3014,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -2387,6 +3043,45 @@ "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", + "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", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hermes-estree": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", @@ -2404,6 +3099,62 @@ "hermes-estree": "0.25.1" } }, + "node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -2414,6 +3165,16 @@ "node": ">= 4" } }, + "node_modules/immer": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz", + "integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==", + "license": "MIT", + "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", @@ -2441,6 +3202,15 @@ "node": ">=0.8.19" } }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2595,6 +3365,36 @@ "yallist": "^3.0.2" } }, + "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", + "engines": { + "node": ">= 0.4" + } + }, + "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", + "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", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2612,7 +3412,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/nanoid": { @@ -2648,6 +3447,18 @@ "dev": true, "license": "MIT" }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -2711,6 +3522,55 @@ "node": ">=6" } }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "license": "MIT", + "dependencies": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "license": "MIT", + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -2790,6 +3650,15 @@ "node": ">= 0.8.0" } }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -2830,6 +3699,36 @@ "react": "*" } }, + "node_modules/react-is": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.7.tgz", + "integrity": "sha512-kZFnouyVv7eP/Phmrlo9FK+zcAdriZJvzxXHF1Sl1P377WSGe2G/JxVolhTrB/jeV47lKImhNUsijjHAAbcl/A==", + "license": "MIT", + "peer": true + }, + "node_modules/react-redux": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.3.0.tgz", + "integrity": "sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g==", + "license": "MIT", + "dependencies": { + "@types/use-sync-external-store": "^0.0.6", + "use-sync-external-store": "^1.4.0" + }, + "peerDependencies": { + "@types/react": "^18.2.25 || ^19", + "react": "^18.0 || ^19", + "redux": "^5.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, "node_modules/react-refresh": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz", @@ -2878,6 +3777,57 @@ "react-dom": ">=18" } }, + "node_modules/recharts": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-3.8.1.tgz", + "integrity": "sha512-mwzmO1s9sFL0TduUpwndxCUNoXsBw3u3E/0+A+cLcrSfQitSG62L32N69GhqUrrT5qKcAE3pCGVINC6pqkBBQg==", + "license": "MIT", + "workspaces": [ + "www" + ], + "dependencies": { + "@reduxjs/toolkit": "^1.9.0 || 2.x.x", + "clsx": "^2.1.1", + "decimal.js-light": "^2.5.1", + "es-toolkit": "^1.39.3", + "eventemitter3": "^5.0.1", + "immer": "^10.1.1", + "react-redux": "8.x.x || 9.x.x", + "reselect": "5.1.1", + "tiny-invariant": "^1.3.3", + "use-sync-external-store": "^1.2.2", + "victory-vendor": "^37.0.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "license": "MIT" + }, + "node_modules/redux-thunk": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz", + "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==", + "license": "MIT", + "peerDependencies": { + "redux": "^5.0.0" + } + }, + "node_modules/reselect": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz", + "integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==", + "license": "MIT" + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2930,6 +3880,12 @@ "fsevents": "~2.3.2" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, "node_modules/scheduler": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", @@ -3011,6 +3967,12 @@ "node": ">=8" } }, + "node_modules/tiny-invariant": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.15", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", @@ -3041,6 +4003,509 @@ "typescript": ">=4.8.4" } }, + "node_modules/tsx": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.4.tgz", + "integrity": "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", + "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", + "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", + "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", + "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", + "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", + "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", + "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", + "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", + "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", + "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", + "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", + "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", + "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", + "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", + "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", + "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", + "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", + "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", + "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", + "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", + "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", + "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", + "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", + "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", + "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", + "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", + "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.0", + "@esbuild/android-arm": "0.28.0", + "@esbuild/android-arm64": "0.28.0", + "@esbuild/android-x64": "0.28.0", + "@esbuild/darwin-arm64": "0.28.0", + "@esbuild/darwin-x64": "0.28.0", + "@esbuild/freebsd-arm64": "0.28.0", + "@esbuild/freebsd-x64": "0.28.0", + "@esbuild/linux-arm": "0.28.0", + "@esbuild/linux-arm64": "0.28.0", + "@esbuild/linux-ia32": "0.28.0", + "@esbuild/linux-loong64": "0.28.0", + "@esbuild/linux-mips64el": "0.28.0", + "@esbuild/linux-ppc64": "0.28.0", + "@esbuild/linux-riscv64": "0.28.0", + "@esbuild/linux-s390x": "0.28.0", + "@esbuild/linux-x64": "0.28.0", + "@esbuild/netbsd-arm64": "0.28.0", + "@esbuild/netbsd-x64": "0.28.0", + "@esbuild/openbsd-arm64": "0.28.0", + "@esbuild/openbsd-x64": "0.28.0", + "@esbuild/openharmony-arm64": "0.28.0", + "@esbuild/sunos-x64": "0.28.0", + "@esbuild/win32-arm64": "0.28.0", + "@esbuild/win32-ia32": "0.28.0", + "@esbuild/win32-x64": "0.28.0" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -3092,6 +4557,15 @@ "typescript": ">=4.8.4 <6.0.0" } }, + "node_modules/undici": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.27.1.tgz", + "integrity": "sha512-UDdpiex+mzigiyrXrGbiUaF4HzTNhKbh2vRNFaTMzcqmLIPrZxaCtwo/1TMSuWoM1Xz3WiTo9KdgI3kRqYzJGg==", + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, "node_modules/undici-types": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", @@ -3140,6 +4614,37 @@ "punycode": "^2.1.0" } }, + "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", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/victory-vendor": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz", + "integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==", + "license": "MIT AND ISC", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, "node_modules/vite": { "version": "7.2.4", "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.4.tgz", @@ -3215,6 +4720,28 @@ } } }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index fee0290..17cbc4f 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,19 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint .", - "preview": "vite preview" + "preview": "vite preview", + "mock": "tsx scripts/generateMockLakes.ts", + "scrape": "tsx scripts/scrapeLipno.ts" }, "dependencies": { + "axios": "^1.17.0", + "cheerio": "^1.2.0", + "date-fns": "^4.4.0", "react": "^19.2.0", "react-dom": "^19.2.0", "react-icons": "^5.5.0", - "react-router-dom": "^7.9.6" + "react-router-dom": "^7.9.6", + "recharts": "^3.8.1" }, "devDependencies": { "@eslint/js": "^9.39.1", @@ -25,6 +31,7 @@ "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", "globals": "^16.5.0", + "tsx": "^4.22.4", "typescript": "~5.9.3", "typescript-eslint": "^8.46.4", "vite": "^7.2.4" diff --git a/public/data/lakes_index.json b/public/data/lakes_index.json new file mode 100644 index 0000000..7e1abe1 --- /dev/null +++ b/public/data/lakes_index.json @@ -0,0 +1,1002 @@ +[ + { + "id": "VLL1|1", + "name": "Lipno 1", + "river": "Vltava", + "priority": true, + "level": "425.08", + "capacity": 70, + "inflow": "16.4", + "outflow": "9.2", + "volume": "4.8", + "sparkline": [ + 67.76386679783151, + 65.95710155663546, + 63.20513373379467, + 66.0023871955494, + 60.5840537200827, + 56.44062304744854, + 61.53723544107122, + 56.534701757813835, + 67.7156785390622, + 60.94718751940314, + 56.95958904718667, + 69.77106846967854 + ] + }, + { + "id": "VLOR|1", + "name": "Orlík", + "river": "Vltava", + "priority": true, + "level": "348.09", + "capacity": 98, + "inflow": "0.4", + "outflow": "15.2", + "volume": "142.2", + "sparkline": [ + 58.71563701563615, + 53.870674018588446, + 55.91017266394625, + 56.21999075347275, + 58.60066035927852, + 66.20899899814442, + 51.26022980835229, + 55.15528349804671, + 51.47224965524346, + 64.86087543062779, + 58.71538821078879, + 68.78224642828326 + ] + }, + { + "id": "VLSL|1", + "name": "Slapy", + "river": "Vltava", + "priority": false, + "level": "312.12", + "capacity": 40, + "inflow": "14.2", + "outflow": "11.5", + "volume": "80.5", + "sparkline": [ + 63.29415099470265, + 55.55116076273065, + 52.1821951008551, + 57.66304790009582, + 57.5177505031316, + 66.21926737684231, + 61.17260724900234, + 54.61688395129716, + 57.4811170608418, + 58.08770659727022, + 59.05633758447969, + 69.01600576041082 + ] + }, + { + "id": "BLHU|1", + "name": "Husinec", + "river": "Blanice (PI)", + "priority": false, + "level": "234.58", + "capacity": 87, + "inflow": "18.8", + "outflow": "2.9", + "volume": "80.1", + "sparkline": [ + 56.71954513622617, + 61.091932349671325, + 59.80532801225829, + 67.85878677793427, + 50.412019755017766, + 69.6989038396205, + 68.89863260571298, + 51.15711691840132, + 66.29081770476003, + 67.82776648615442, + 53.73438145481692, + 55.62004696641291 + ] + }, + { + "id": "BIBI|1", + "name": "Bílsko", + "river": "Bílský potok", + "priority": false, + "level": "613.09", + "capacity": 25, + "inflow": "0.3", + "outflow": "4.4", + "volume": "279.8", + "sparkline": [ + 58.06235557673482, + 67.65285434744484, + 51.18732342455498, + 55.540670530667256, + 65.0168407888213, + 65.13558215812759, + 67.10121835982773, + 69.05010678392236, + 67.97857238976994, + 52.45683679844072, + 54.57735482391635, + 58.30228641285429 + ] + }, + { + "id": "KLDP|3", + "name": "Dolejší Padrťský rybník", + "river": "", + "priority": false, + "level": "301.41", + "capacity": 46, + "inflow": "15.7", + "outflow": "16.8", + "volume": "269.5", + "sparkline": [ + 52.545483051914445, + 52.353205236509375, + 51.14982411484838, + 52.17717896649951, + 59.6512971713952, + 68.99511713026922, + 66.08615462949119, + 55.85690844992684, + 56.27360544509149, + 56.59801556550044, + 62.98638733107289, + 60.33620944248045 + ] + }, + { + "id": "KLHP|3", + "name": "Hořejší Padrťský rybník", + "river": "", + "priority": false, + "level": "537.82", + "capacity": 20, + "inflow": "11.2", + "outflow": "14.2", + "volume": "19.9", + "sparkline": [ + 64.01864889797992, + 55.474009694400515, + 67.3293951963569, + 68.08807727206008, + 69.0256089886299, + 52.99173640361107, + 67.87009523659883, + 58.87316632448774, + 59.33409663232173, + 69.54799887595104, + 59.59158889523327, + 55.63021846937998 + ] + }, + { + "id": "KLKL|3", + "name": "Klabava", + "river": "Klabava", + "priority": false, + "level": "254.33", + "capacity": 52, + "inflow": "4.6", + "outflow": "10.6", + "volume": "167.6", + "sparkline": [ + 65.40004821798294, + 51.96089697098432, + 56.47953881852548, + 66.1556303979774, + 68.44507798677921, + 58.3006245729297, + 61.85024039387675, + 58.82434022970376, + 56.42542531145891, + 53.91237088172875, + 68.9897974553115, + 66.5148236081013 + ] + }, + { + "id": "KCKC|3", + "name": "Klíčava", + "river": "Klíčava", + "priority": false, + "level": "580.58", + "capacity": 61, + "inflow": "1.4", + "outflow": "13.0", + "volume": "92.7", + "sparkline": [ + 53.52539101836046, + 65.5283627369559, + 58.77538110769939, + 66.16395108831716, + 63.73678223585735, + 53.40305874814205, + 63.714206626805314, + 69.3377505568833, + 53.14085826498234, + 62.622946483487446, + 53.12657029965658, + 69.99907842296204 + ] + }, + { + "id": "LILA|3", + "name": "Láz", + "river": "Litavka", + "priority": false, + "level": "572.44", + "capacity": 35, + "inflow": "2.7", + "outflow": "1.3", + "volume": "41.0", + "sparkline": [ + 57.06058907985466, + 65.93061892844979, + 69.82519489051512, + 59.61013388966063, + 56.4006825459655, + 65.99393820707627, + 69.21166517530426, + 64.90926630353279, + 50.48521113624516, + 66.92997306902286, + 50.41980948175885, + 63.59520543305413 + ] + }, + { + "id": "MARI|1", + "name": "Římov", + "river": "Malše", + "priority": false, + "level": "693.45", + "capacity": 71, + "inflow": "5.5", + "outflow": "16.6", + "volume": "117.0", + "sparkline": [ + 58.83021654908006, + 69.04714973465147, + 66.14999842318753, + 63.102461348893314, + 69.8872055811859, + 56.29118213192195, + 57.33251560319101, + 56.03900492254181, + 62.89590766213057, + 63.99285163055102, + 50.052511902997715, + 69.16089839265223 + ] + }, + { + "id": "MZHR|3", + "name": "Hracholusky", + "river": "Mže", + "priority": false, + "level": "432.32", + "capacity": 76, + "inflow": "9.0", + "outflow": "11.5", + "volume": "257.6", + "sparkline": [ + 61.0318213223539, + 66.38411819290904, + 56.8935132468659, + 62.49816200180909, + 69.16388320303746, + 69.7266031209071, + 63.60109706790021, + 66.832231338331, + 55.503631225791544, + 69.00110813057994, + 60.837290882605025, + 69.94446164736605 + ] + }, + { + "id": "MZLU|3", + "name": "Lučina", + "river": "Mže", + "priority": false, + "level": "557.64", + "capacity": 28, + "inflow": "16.4", + "outflow": "7.5", + "volume": "137.2", + "sparkline": [ + 55.27597200087354, + 65.98332007198918, + 51.39644532238694, + 55.467111102305466, + 64.65279325533882, + 68.11081910175116, + 58.558786379382695, + 56.0176963298879, + 63.57296836738223, + 68.00266272222855, + 60.813629047442426, + 53.60676111826893 + ] + }, + { + "id": "MZSS|3", + "name": "Plzeň", + "river": "Štruncovy sady", + "priority": false, + "level": "620.14", + "capacity": 34, + "inflow": "18.7", + "outflow": "6.3", + "volume": "153.1", + "sparkline": [ + 51.026463877353166, + 69.21289099259506, + 66.59710210509151, + 51.247840359768006, + 68.85239879391202, + 50.544979500657604, + 52.93744044550747, + 63.943680684100286, + 62.84936714550969, + 62.08648335853005, + 50.63351443822431, + 57.10348554202507 + ] + }, + { + "id": "OPOB|3", + "name": "Obecnice", + "river": "Obecnický potok", + "priority": false, + "level": "300.60", + "capacity": 96, + "inflow": "19.4", + "outflow": "16.0", + "volume": "276.6", + "sparkline": [ + 51.80758183280685, + 50.913604779247244, + 52.34177829156166, + 59.515758599338646, + 67.97743918523307, + 66.10899524650429, + 55.272451446557696, + 54.97657465742287, + 56.59103431339752, + 65.20385899997699, + 67.29158471879981, + 59.92673248776396 + ] + }, + { + "id": "PPPI|3", + "name": "Pilská", + "river": "Pilský potok", + "priority": false, + "level": "606.45", + "capacity": 49, + "inflow": "11.9", + "outflow": "0.0", + "volume": "202.2", + "sparkline": [ + 61.77284171942533, + 68.26570270893097, + 69.12184554549876, + 64.52328835536215, + 54.710193736751435, + 50.167571376475514, + 59.447408379132625, + 56.93444045299297, + 55.70274450646396, + 53.9556172733789, + 58.95216473179255, + 68.52487248520859 + ] + }, + { + "id": "RACU|3", + "name": "České Údolí", + "river": "Radbuza", + "priority": false, + "level": "253.11", + "capacity": 74, + "inflow": "12.6", + "outflow": "7.3", + "volume": "106.3", + "sparkline": [ + 66.38801929859419, + 50.92756858622137, + 65.93054788137624, + 54.93723153153, + 66.31138835168656, + 66.31742774654356, + 66.14822580156607, + 55.94374018233996, + 55.27579249002968, + 52.72384685748912, + 66.89809733134666, + 65.21647505764265 + ] + }, + { + "id": "SPNE|2", + "name": "Němčice", + "river": "Sedlický potok", + "priority": false, + "level": "300.42", + "capacity": 46, + "inflow": "17.1", + "outflow": "15.2", + "volume": "165.1", + "sparkline": [ + 52.92115958251769, + 60.34379716724986, + 52.32508835150077, + 68.20218907061512, + 53.35979907071966, + 68.73121541224904, + 66.17573033842996, + 65.7645008809001, + 50.52374601777196, + 60.87754074741652, + 55.04726124073101, + 63.88754004974744 + ] + }, + { + "id": "SVKR|1", + "name": "Švihov", + "river": "Želivka", + "priority": false, + "level": "299.26", + "capacity": 82, + "inflow": "5.4", + "outflow": "12.2", + "volume": "263.4", + "sparkline": [ + 68.19387353120321, + 56.06874981561845, + 62.28286557334625, + 50.441188413667234, + 51.491459715568126, + 54.65821546570079, + 61.63051303861556, + 67.00900188449286, + 63.20637915644665, + 54.66090510676903, + 61.59064299419725, + 69.65093929773614 + ] + }, + { + "id": "UHKA|1", + "name": "Kamýk", + "river": "Vltava", + "priority": false, + "level": "320.00", + "capacity": 24, + "inflow": "17.2", + "outflow": "10.1", + "volume": "197.0", + "sparkline": [ + 57.81444095954401, + 65.19279069030925, + 67.51146858864206, + 54.97860459537565, + 69.77356466021251, + 50.71716736585621, + 64.86948797829135, + 56.504223088087336, + 66.05310947110375, + 52.76431498443484, + 64.10934532531321, + 66.81834042761787 + ] + }, + { + "id": "VRSN|1", + "name": "Vrané", + "river": "Vltava", + "priority": false, + "level": "266.65", + "capacity": 51, + "inflow": "1.5", + "outflow": "6.1", + "volume": "78.4", + "sparkline": [ + 66.25766509291026, + 67.86633637312278, + 63.18984654255752, + 68.10189883983175, + 66.78628349434302, + 60.09504005656531, + 54.63003021350735, + 66.4136800954575, + 64.11912051851832, + 60.42071793008188, + 54.62685356739905, + 54.06460175630427 + ] + }, + { + "id": "ZLUT|3", + "name": "Žlutice", + "river": "Střela", + "priority": false, + "level": "324.72", + "capacity": 36, + "inflow": "10.7", + "outflow": "4.0", + "volume": "34.3", + "sparkline": [ + 60.50728688755656, + 60.571721233017094, + 67.19263759674399, + 64.93978236318972, + 63.250476817534086, + 57.89306271495487, + 69.37685777064492, + 63.80767388026817, + 57.469477868915305, + 69.57072993413615, + 52.32068710664375, + 63.01690162772619 + ] + }, + { + "id": "DUMMY0", + "name": "Dummy Lake 1", + "river": "", + "priority": false, + "level": "535.34", + "capacity": 23, + "inflow": "14.7", + "outflow": "8.6", + "volume": "27.3", + "sparkline": [ + 65.04339440159312, + 51.81792209427638, + 65.0040867159182, + 57.930268522181805, + 67.27954738428926, + 50.92124390789174, + 53.99435257335414, + 50.091348232281604, + 57.02950101293828, + 56.12380048912271, + 69.72083995404837, + 59.015095960428404 + ] + }, + { + "id": "DUMMY1", + "name": "Dummy Lake 2", + "river": "", + "priority": false, + "level": "596.97", + "capacity": 59, + "inflow": "14.7", + "outflow": "1.9", + "volume": "37.6", + "sparkline": [ + 68.68207117080661, + 57.72114421004795, + 66.12532440176388, + 67.18222014013793, + 62.501436970687216, + 59.18196453179181, + 66.65271044374828, + 67.14834090202466, + 50.28903497307282, + 64.7723040529394, + 51.35121032526583, + 61.95661832889127 + ] + }, + { + "id": "DUMMY2", + "name": "Dummy Lake 3", + "river": "", + "priority": false, + "level": "634.45", + "capacity": 46, + "inflow": "14.8", + "outflow": "0.4", + "volume": "283.8", + "sparkline": [ + 52.94377831112413, + 53.852296368946995, + 51.11639286082665, + 60.86704421891123, + 68.70555022953468, + 58.38519825730452, + 67.99445243955176, + 60.823161672222795, + 60.41064479958568, + 52.650769186684876, + 59.69862901182614, + 56.28797067060973 + ] + }, + { + "id": "DUMMY3", + "name": "Dummy Lake 4", + "river": "", + "priority": false, + "level": "437.70", + "capacity": 87, + "inflow": "4.3", + "outflow": "4.5", + "volume": "23.5", + "sparkline": [ + 54.23448742672566, + 51.14299486045987, + 61.10269954950172, + 61.683461863433514, + 53.76173298542013, + 59.76264440790218, + 61.3018747835878, + 69.84423654496568, + 58.44997408336737, + 63.39263492517792, + 65.40943863313629, + 52.06927169281634 + ] + }, + { + "id": "DUMMY4", + "name": "Dummy Lake 5", + "river": "", + "priority": false, + "level": "278.34", + "capacity": 73, + "inflow": "5.0", + "outflow": "7.5", + "volume": "103.7", + "sparkline": [ + 68.63069477607222, + 50.7588623822277, + 58.46069465871076, + 55.54818662810651, + 52.38194753610323, + 56.17802163984133, + 64.90185701341984, + 68.53234232708633, + 66.45081878736204, + 51.23043343523719, + 50.049502528843604, + 57.98828223130165 + ] + }, + { + "id": "DUMMY5", + "name": "Dummy Lake 6", + "river": "", + "priority": false, + "level": "433.27", + "capacity": 78, + "inflow": "9.9", + "outflow": "8.9", + "volume": "112.9", + "sparkline": [ + 57.53754950799033, + 65.33768650490822, + 63.1965328451669, + 59.785759616395026, + 55.91137079527809, + 54.85348709816782, + 65.99420481406874, + 50.90673917196653, + 64.15013896525862, + 57.78454509680696, + 68.95103249850256, + 63.1718164094484 + ] + }, + { + "id": "DUMMY6", + "name": "Dummy Lake 7", + "river": "", + "priority": false, + "level": "453.24", + "capacity": 32, + "inflow": "8.9", + "outflow": "3.6", + "volume": "133.2", + "sparkline": [ + 58.9386162172389, + 66.63281625896425, + 61.61984967271001, + 56.581013392462836, + 67.5931194583979, + 61.4888862335321, + 60.38737526900304, + 54.65530198467208, + 57.752489711570504, + 54.65112540077021, + 59.21838564148735, + 53.494301762403815 + ] + }, + { + "id": "DUMMY7", + "name": "Dummy Lake 8", + "river": "", + "priority": false, + "level": "432.67", + "capacity": 90, + "inflow": "14.3", + "outflow": "12.9", + "volume": "30.8", + "sparkline": [ + 63.46035230599749, + 62.69987463370222, + 69.91650805031863, + 58.851569119593606, + 50.74848300043832, + 67.71909618828886, + 69.41827792517579, + 58.297349069796795, + 65.27091102495903, + 68.30314221808526, + 69.38315347923536, + 56.394632491462275 + ] + }, + { + "id": "DUMMY8", + "name": "Dummy Lake 9", + "river": "", + "priority": false, + "level": "342.94", + "capacity": 41, + "inflow": "17.9", + "outflow": "3.4", + "volume": "63.1", + "sparkline": [ + 69.30912562561709, + 65.08167785026619, + 54.57475044325925, + 66.77223329485813, + 69.30197025827735, + 64.56847335932635, + 69.6682374799839, + 51.481052220775055, + 55.9025851145313, + 53.1158411372365, + 55.20745082567769, + 57.27568202095375 + ] + }, + { + "id": "DUMMY9", + "name": "Dummy Lake 10", + "river": "", + "priority": false, + "level": "314.49", + "capacity": 45, + "inflow": "12.0", + "outflow": "2.5", + "volume": "52.3", + "sparkline": [ + 54.6288922694291, + 59.77595914149052, + 53.108042197651095, + 61.42469116333626, + 67.70259938565589, + 57.84304399798706, + 65.63730790148405, + 63.773026727408336, + 61.42711380639432, + 60.89283147254173, + 59.509373610549254, + 66.47545129261894 + ] + }, + { + "id": "DUMMY10", + "name": "Dummy Lake 11", + "river": "", + "priority": false, + "level": "404.41", + "capacity": 40, + "inflow": "16.5", + "outflow": "13.7", + "volume": "15.6", + "sparkline": [ + 67.54250269822809, + 68.46823960966596, + 54.08608727749021, + 69.25797744337933, + 66.88370729626189, + 62.65174760880342, + 58.48863859930501, + 55.39540656236121, + 53.48285441507698, + 57.039630892703556, + 53.36912957544506, + 64.50477786995091 + ] + }, + { + "id": "DUMMY11", + "name": "Dummy Lake 12", + "river": "", + "priority": false, + "level": "667.48", + "capacity": 96, + "inflow": "11.5", + "outflow": "7.9", + "volume": "205.6", + "sparkline": [ + 54.58003662730888, + 64.38542261673138, + 57.23197667088341, + 50.07608626309677, + 61.3750548469042, + 52.180532315176976, + 68.47124194836304, + 60.482433900873325, + 64.37143055453797, + 54.79721558043927, + 62.72239245747879, + 65.23642626335672 + ] + }, + { + "id": "DUMMY12", + "name": "Dummy Lake 13", + "river": "", + "priority": false, + "level": "255.39", + "capacity": 54, + "inflow": "8.2", + "outflow": "8.3", + "volume": "152.9", + "sparkline": [ + 53.33036870569716, + 67.50401591735736, + 50.66143455780063, + 55.771199778143654, + 63.163838180155636, + 55.31812583744981, + 66.42750321105251, + 54.41331548769276, + 64.6843178738275, + 68.92995225054463, + 61.7149302018298, + 57.025211437824744 + ] + }, + { + "id": "DUMMY13", + "name": "Dummy Lake 14", + "river": "", + "priority": false, + "level": "471.51", + "capacity": 29, + "inflow": "7.0", + "outflow": "7.2", + "volume": "55.4", + "sparkline": [ + 51.557590889973966, + 56.593820508079446, + 67.83257636971526, + 53.10312889164916, + 59.56095629927104, + 53.632548932439235, + 69.3960515815213, + 68.3661275839249, + 58.986984196612646, + 57.56121628766655, + 64.42706506155582, + 57.41146451559014 + ] + }, + { + "id": "DUMMY14", + "name": "Dummy Lake 15", + "river": "", + "priority": false, + "level": "615.00", + "capacity": 80, + "inflow": "9.9", + "outflow": "18.1", + "volume": "69.7", + "sparkline": [ + 66.78842218901073, + 64.53955951810194, + 56.693313655702, + 53.93998829507474, + 61.11313084131694, + 55.54314369927277, + 63.58406399538163, + 64.71638760810865, + 51.38219118175706, + 66.31628629951146, + 67.92905602682598, + 61.89059657597156 + ] + }, + { + "id": "DUMMY15", + "name": "Dummy Lake 16", + "river": "", + "priority": false, + "level": "223.15", + "capacity": 56, + "inflow": "18.9", + "outflow": "4.4", + "volume": "266.1", + "sparkline": [ + 67.14603431314623, + 57.85358313936286, + 65.87048639407044, + 59.59389408526102, + 65.29895173600143, + 64.90059621300219, + 58.785128715498786, + 65.96374275733118, + 53.3194555934297, + 54.62115493654516, + 58.217571903549974, + 67.34432535581874 + ] + }, + { + "id": "DUMMY16", + "name": "Dummy Lake 17", + "river": "", + "priority": false, + "level": "618.34", + "capacity": 49, + "inflow": "4.7", + "outflow": "15.3", + "volume": "165.5", + "sparkline": [ + 60.39584486623572, + 56.39339260598456, + 51.301454942884725, + 63.45374328347539, + 51.90017615268565, + 54.8206008395655, + 60.969885974640185, + 63.76317502891858, + 57.69829599917726, + 50.54195840193193, + 67.90143133393913, + 56.30999255024762 + ] + }, + { + "id": "DUMMY17", + "name": "Dummy Lake 18", + "river": "", + "priority": false, + "level": "473.36", + "capacity": 75, + "inflow": "16.6", + "outflow": "0.6", + "volume": "38.5", + "sparkline": [ + 58.27729970784325, + 55.23607648767944, + 69.37700706476275, + 64.67260599880082, + 66.86112541803726, + 53.53523076852803, + 52.09283560845608, + 69.90982719993283, + 54.15522770253627, + 51.95319849033757, + 68.31515258414208, + 53.63944260385013 + ] + } +] \ No newline at end of file diff --git a/public/data/lipno.json b/public/data/lipno.json new file mode 100644 index 0000000..d3df94b --- /dev/null +++ b/public/data/lipno.json @@ -0,0 +1,172 @@ +[ + { + "timestamp": "2026-05-30T05:00:00.000Z", + "level": 723.04, + "flow": 1.03 + }, + { + "timestamp": "2026-05-31T05:00:00.000Z", + "level": 723.06, + "flow": 1.03 + }, + { + "timestamp": "2026-06-01T05:00:00.000Z", + "level": 723.08, + "flow": 30.94 + }, + { + "timestamp": "2026-06-02T05:00:00.000Z", + "level": 723.08, + "flow": 1.51 + }, + { + "timestamp": "2026-06-03T05:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-04T05:00:00.000Z", + "level": 723.08, + "flow": 1.49 + }, + { + "timestamp": "2026-06-04T18:00:00.000Z", + "level": 723.08, + "flow": 1.49 + }, + { + "timestamp": "2026-06-04T19:00:00.000Z", + "level": 723.08, + "flow": 1.49 + }, + { + "timestamp": "2026-06-04T20:00:00.000Z", + "level": 723.08, + "flow": 1.49 + }, + { + "timestamp": "2026-06-04T21:00:00.000Z", + "level": 723.08, + "flow": 1.49 + }, + { + "timestamp": "2026-06-04T22:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-04T23:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T00:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T01:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T02:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T03:00:00.000Z", + "level": 723.08, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T04:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T05:00:00.000Z", + "level": 723.08, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T06:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T07:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T08:00:00.000Z", + "level": 723.1, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T09:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T10:00:00.000Z", + "level": 723.1, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T11:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T12:00:00.000Z", + "level": 723.1, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T13:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T14:00:00.000Z", + "level": 723.1, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T15:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T16:00:00.000Z", + "level": 723.1, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T17:00:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T17:10:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T17:20:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T17:30:00.000Z", + "level": 723.09, + "flow": 1.49 + }, + { + "timestamp": "2026-06-05T17:40:00.000Z", + "level": 723.09, + "flow": 1.49 + } +] \ No newline at end of file diff --git a/scripts/generateMockLakes.ts b/scripts/generateMockLakes.ts new file mode 100644 index 0000000..b380981 --- /dev/null +++ b/scripts/generateMockLakes.ts @@ -0,0 +1,55 @@ +import * as fs from 'fs'; +import * as path from 'path'; + +interface LakeRaw { + id: string; + text: string; + priority?: boolean; +} + +const lakesRaw: LakeRaw[] = [ + { id: "VLL1|1", text: "VD Lipno 1 - Vltava", priority: true }, + { id: "VLOR|1", text: "VD Orlík - Vltava", priority: true }, + { id: "VLSL|1", text: "VD Slapy - Vltava", priority: false }, + { id: "BLHU|1", text: "VD Husinec - Blanice (PI)" }, + { id: "BIBI|1", text: "VD Bílsko - Bílský potok" }, + { id: "KLDP|3", text: "VD Dolejší Padrťský rybník" }, + { id: "KLHP|3", text: "VD Hořejší Padrťský rybník" }, + { id: "KLKL|3", text: "VD Klabava - Klabava" }, + { id: "KCKC|3", "text": "VD Klíčava - Klíčava" }, + { id: "LILA|3", "text": "VD Láz - Litavka" }, + { id: "MARI|1", "text": "VD Římov - Malše" }, + { id: "MZHR|3", "text": "VD Hracholusky - Mže" }, + { id: "MZLU|3", "text": "VD Lučina - Mže" }, + { id: "MZSS|3", "text": "VD Plzeň-Štruncovy sady" }, + { id: "OPOB|3", "text": "VD Obecnice - Obecnický potok" }, + { id: "PPPI|3", "text": "VD Pilská - Pilský potok" }, + { id: "RACU|3", "text": "VD České Údolí - Radbuza" }, + { id: "SPNE|2", "text": "VD Němčice - Sedlický potok" }, + { id: "SVKR|1", "text": "VD Švihov - Želivka" }, + { id: "UHKA|1", "text": "VD Kamýk - Vltava" }, + { id: "VRSN|1", "text": "VD Vrané - Vltava" }, + { id: "ZLUT|3", "text": "VD Žlutice - Střela" }, + // Adding dummies to reach ~40 + ...Array.from({length: 18}).map((_, i) => ({ id: `DUMMY${i}`, text: `VD Dummy Lake ${i+1}` })) +]; + +const lakes = lakesRaw.map(lake => { + const sparkline = Array.from({length: 12}).map(() => 50 + Math.random() * 20); + return { + id: lake.id, + name: lake.text.replace('VD ', '').split('-')[0].trim(), + river: lake.text.includes('-') ? lake.text.split('-')[1].trim() : '', + priority: lake.priority || false, + level: (200 + Math.random() * 500).toFixed(2), + capacity: Math.floor(20 + Math.random() * 80), // 20% to 100% + inflow: (Math.random() * 20).toFixed(1), + outflow: (Math.random() * 20).toFixed(1), + volume: (Math.random() * 300).toFixed(1), + sparkline + }; +}); + +const outputPath = path.resolve(process.cwd(), 'public/data/lakes_index.json'); +fs.writeFileSync(outputPath, JSON.stringify(lakes, null, 2)); +console.log('Mock lakes generated:', lakes.length); diff --git a/scripts/scrapeLipno.ts b/scripts/scrapeLipno.ts new file mode 100644 index 0000000..40e5580 --- /dev/null +++ b/scripts/scrapeLipno.ts @@ -0,0 +1,93 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import * as cheerio from 'cheerio'; +import axios from 'axios'; +import https from 'https'; + +const URL = 'https://www.pvl.cz/portal/nadrze/cz/pc/Mereni.aspx?oid=1&id=VLL1'; +const DATA_FILE = path.resolve('public/data/lipno.json'); + +interface DataRecord { + timestamp: string; + level: number; + flow: number; +} + +// Parse date from DD.MM.YYYY HH:MM to ISO +function parseDateString(dateStr: string): string { + const [datePart, timePart] = dateStr.trim().split(' '); + const [day, month, year] = datePart.split('.'); + const [hours, minutes] = timePart.split(':'); + + const d = new Date(parseInt(year), parseInt(month) - 1, parseInt(day), parseInt(hours), parseInt(minutes)); + return d.toISOString(); +} + +async function scrape(): Promise { + try { + const agent = new https.Agent({ + rejectUnauthorized: false + }); + + const response = await axios.get(URL, { + httpsAgent: agent, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' + } + }); + + const html = response.data; + const $ = cheerio.load(html); + + const rows = $('table tr'); + const newData: DataRecord[] = []; + + rows.each((i, row) => { + const tds = $(row).find('td'); + if (tds.length >= 3) { + const datetimeText = $(tds[0]).text().trim(); + // Check if it's a valid date string matching DD.MM.YYYY HH:MM + if (/^\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2}$/.test(datetimeText)) { + const timestamp = parseDateString(datetimeText); + const levelText = $(tds[1]).text().trim().replace(',', '.'); + const flowText = $(tds[2]).text().trim().replace(',', '.'); + + newData.push({ + timestamp, + level: parseFloat(levelText), + flow: parseFloat(flowText) + }); + } + } + }); + + // Load existing data + let existingData: DataRecord[] = []; + if (fs.existsSync(DATA_FILE)) { + const fileContent = fs.readFileSync(DATA_FILE, 'utf-8'); + existingData = JSON.parse(fileContent); + } + + // Merge and deduplicate by timestamp + const dataMap = new Map(); + existingData.forEach(item => dataMap.set(item.timestamp, item)); + newData.forEach(item => dataMap.set(item.timestamp, item)); + + // Sort chronologically + const mergedData = Array.from(dataMap.values()).sort((a, b) => { + return new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime(); + }); + + // Save back + fs.mkdirSync(path.dirname(DATA_FILE), { recursive: true }); + fs.writeFileSync(DATA_FILE, JSON.stringify(mergedData, null, 2), 'utf-8'); + + console.log(`Scraped ${newData.length} records. Total records in DB: ${mergedData.length}`); + + } catch (error: any) { + console.error('Error scraping data:', error.message); + process.exit(1); + } +} + +scrape(); diff --git a/src/App.css b/src/App.css index b9d355d..4fc42ae 100644 --- a/src/App.css +++ b/src/App.css @@ -1,42 +1,453 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; +.dashboard-container { + display: flex; + height: 100vh; + width: 100vw; + overflow: hidden; + background-color: var(--bg-dark); +} + +.sidebar { + width: 250px; + background-color: var(--bg-card); + border-right: 1px solid var(--border-color); + display: flex; + flex-direction: column; + padding: 1.5rem 1rem; + transition: width 0.3s ease; + overflow: hidden; +} + +.sidebar.collapsed { + width: 72px; + padding: 1.5rem 0.5rem; +} + +.sidebar.collapsed .sidebar-text { + display: none; +} + +.sidebar.collapsed .sidebar-logo { + justify-content: center; + padding-left: 0; +} + +.sidebar.collapsed .nav-item { + justify-content: center; +} + +.sidebar-logo { + display: flex; + align-items: center; + gap: 0.75rem; + margin-bottom: 2rem; + padding-left: 0.5rem; +} + +.sidebar-logo svg { + color: var(--color-cyan); + font-size: 2rem; +} + +.sidebar-logo div { + display: flex; + flex-direction: column; +} + +.sidebar-logo span { + font-weight: 700; + letter-spacing: 0.5px; + font-size: 1.1rem; + line-height: 1.1; +} + +.sidebar-logo small { + color: var(--text-muted); + font-size: 0.7rem; +} + +.nav-links { + display: flex; + flex-direction: column; + gap: 0.5rem; + flex: 1; +} + +.nav-item { + display: flex; + align-items: center; + gap: 1rem; + padding: 0.75rem 1rem; + border-radius: 0.5rem; + color: var(--text-muted); + font-size: 0.95rem; + font-weight: 500; + transition: all 0.2s; + cursor: pointer; + white-space: nowrap; +} + +.nav-item:hover { + background-color: rgba(255, 255, 255, 0.03); + color: var(--text-main); +} + +.nav-item.active { + background: linear-gradient(135deg, var(--color-cyan) 0%, #0284c7 100%); + color: #ffffff; + box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3); +} + +.nav-item.active svg { + color: #ffffff; +} + +.nav-item svg { + font-size: 1.25rem; +} + +.sidebar-footer { + margin-top: auto; +} + +.main-content { + flex: 1; + display: flex; + flex-direction: column; + overflow-y: auto; + padding: 1.5rem 2rem; + gap: 1.5rem; +} + +.topbar { + display: flex; + justify-content: space-between; + align-items: center; +} + +.search-bar { + display: flex; + align-items: center; + background-color: var(--bg-card); + padding: 0.5rem 1rem; + border-radius: 0.5rem; + width: 400px; + border: 1px solid var(--border-color); +} + +.search-bar svg { + color: var(--text-muted); + margin-right: 0.75rem; +} + +.search-bar input { + background: transparent; + border: none; + color: var(--text-main); + outline: none; + width: 100%; + font-size: 0.9rem; +} + +.search-bar input::placeholder { + color: var(--text-muted); +} + +.topbar-status { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 0.85rem; + color: var(--text-main); +} + +.status-dot { + width: 8px; + height: 8px; + background-color: var(--color-green); + border-radius: 50%; + box-shadow: 0 0 8px var(--color-green); +} + +.kpi-container { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1.5rem; +} + +.kpi-card { + background-color: var(--bg-card); + border-radius: 0.75rem; + padding: 1.25rem 1.5rem; + border: 1px solid var(--border-color); + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.kpi-title { + font-size: 0.8rem; + text-transform: uppercase; + letter-spacing: 1px; + color: var(--text-muted); + font-weight: 600; +} + +.kpi-value { + font-size: 2.25rem; + font-weight: 700; +} + +.kpi-subtitle { + font-size: 0.85rem; + display: flex; + align-items: center; + gap: 0.5rem; + color: var(--text-muted); +} + +.kpi-trend.positive { color: var(--color-green); } +.kpi-trend.negative { color: var(--color-red); } + +.chart-card { + background-color: var(--bg-card); + border-radius: 0.75rem; + border: 1px solid var(--border-color); + padding: 1.5rem; + flex: 1; + display: flex; + flex-direction: column; +} + +.chart-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 1.5rem; +} + +.chart-title { + font-size: 1.25rem; + font-weight: 600; +} + +.chart-controls { + display: flex; + gap: 2rem; +} + +.control-group { + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.control-label { + font-size: 0.75rem; + color: var(--text-muted); text-align: center; } -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); +.button-group { + display: flex; + background-color: rgba(255, 255, 255, 0.05); + border-radius: 0.5rem; + overflow: hidden; } -@keyframes logo-spin { - from { - transform: rotate(0deg); +.control-btn { + background: transparent; + border: none; + color: var(--text-muted); + padding: 0.4rem 0.75rem; + font-size: 0.85rem; + cursor: pointer; + transition: all 0.2s; +} + +.control-btn:hover { + background-color: rgba(255, 255, 255, 0.1); +} + +.control-btn.active { + background-color: rgba(255, 255, 255, 0.15); + color: var(--text-main); + font-weight: 500; +} + +.toggle-switch { + position: relative; + width: 36px; + height: 20px; + background-color: rgba(255, 255, 255, 0.2); + border-radius: 10px; + cursor: pointer; + margin: 0 0.5rem; +} + +.toggle-switch::after { + content: ''; + position: absolute; + top: 2px; + left: 2px; + width: 16px; + height: 16px; + background-color: white; + border-radius: 50%; + transition: 0.2s; +} + +.toggle-switch.on { + background-color: var(--color-cyan); +} + +.toggle-switch.on::after { + left: calc(100% - 18px); +} + +.dashboard-footer { + display: flex; + justify-content: space-between; + font-size: 0.8rem; + color: var(--text-muted); + padding-top: 1rem; +} + +.dashboard-footer a { + text-decoration: underline; +} + +/* Mobile Responsiveness */ +.mobile-only { + display: none !important; +} + +@media (max-width: 768px) { + .mobile-only { + display: flex !important; } - to { - transform: rotate(360deg); + + .desktop-only { + display: none !important; + } + + .dashboard-container { + flex-direction: column; + } + + .sidebar { + display: none; + } + + .sidebar.mobile-open { + display: flex; + position: fixed; + top: 0; + left: 0; + height: 100vh; + z-index: 1000; + } + + .main-content { + padding: 1rem; + gap: 1rem; + } + + .topbar { + flex-direction: column; + align-items: flex-start; + gap: 1rem; + } + + .topbar-mobile-header { + display: flex; + width: 100%; + align-items: center; + justify-content: space-between; + } + + .search-bar { + width: 100%; + } + + .search-bar input { + display: none; + } + + .search-bar { + width: auto; + background: transparent; + border: none; + padding: 0; + } + + .search-bar svg { + margin: 0; + font-size: 1.5rem; + color: var(--text-main); + } + + .kpi-container { + grid-template-columns: 1fr 1fr; + gap: 1rem; + } + + .kpi-card { + padding: 1rem; + } + + .kpi-value { + font-size: 1.75rem; + } + + .kpi-subtitle { + flex-direction: column; + align-items: flex-start; + gap: 0.2rem; + } + + .chart-card { + padding: 1rem; + } + + .chart-header { + flex-direction: column; + gap: 1rem; + } + + .chart-title { + font-size: 1.1rem; + line-height: 1.3; + } + + .chart-controls { + width: 100%; + flex-direction: column; + gap: 1rem; + } + + .control-group { + width: 100%; + } + + .button-group { + width: 100%; + justify-content: space-between; + } + + .control-btn { + padding: 0.5rem; + flex: 1; + text-align: center; + } + + .chart-legend-container { + flex-wrap: wrap; + gap: 1rem !important; + justify-content: flex-start !important; + } + + .chart-legend-container > span { + flex: 0 0 calc(50% - 0.5rem); } } -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/App.tsx b/src/App.tsx index 54d6612..2289235 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,31 +1,78 @@ -import { useState } from 'react' -import { BrowserRouter as Router, Routes, Route } from 'react-router-dom' -import LoadingScreen from './components/LoadingScreen' -import Home from './components/Home' -import Navbar from './components/Navbar' -import TimeBreaker from './components/TimeBreaker' -import { type Language } from './translations' -import './App.css' +import { useState, useEffect } from 'react'; +import LakeDetail from './components/LakeDetail'; +import LakesOverview from './components/LakesOverview'; +import Sidebar from './components/Sidebar'; +import Topbar from './components/Topbar'; +import SettingsModal from './components/SettingsModal'; +import { type Language } from './translations'; +import './App.css'; function App() { - const [isLoading, setIsLoading] = useState(true) - const [language, setLanguage] = useState('en') + const [language, setLanguage] = useState('en'); + const [theme, setTheme] = useState<'dark' | 'light'>('dark'); + const [isSettingsOpen, setIsSettingsOpen] = useState(false); + const [activeView, setActiveView] = useState<'overview' | 'detail'>('overview'); + const [activeLakeId, setActiveLakeId] = useState(null); + const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); + + useEffect(() => { + if (theme === 'light') { + document.body.classList.add('light-mode'); + } else { + document.body.classList.remove('light-mode'); + } + }, [theme]); + + const handleSelectLake = (id: string) => { + setActiveLakeId(id); + setActiveView('detail'); + setIsMobileMenuOpen(false); + }; + + const handleNavigate = (view: 'overview' | 'detail') => { + setActiveView(view); + setIsMobileMenuOpen(false); + }; return ( - <> - {isLoading ? ( - setIsLoading(false)} /> - ) : ( - - - - } /> - } /> - - +
+ {/* Mobile overlay */} + {isMobileMenuOpen && ( +
setIsMobileMenuOpen(false)} + >
)} - - ) + + setIsSettingsOpen(true)} + activeView={activeView} + onNavigate={handleNavigate} + isMobileMenuOpen={isMobileMenuOpen} + onCloseMobileMenu={() => setIsMobileMenuOpen(false)} + /> + +
+ setIsMobileMenuOpen(!isMobileMenuOpen)} /> + {activeView === 'overview' ? ( + + ) : ( + + )} +
+ + {isSettingsOpen && ( + setIsSettingsOpen(false)} + /> + )} +
+ ); } -export default App +export default App; diff --git a/src/components/Home.tsx b/src/components/Home.tsx deleted file mode 100644 index da02cdd..0000000 --- a/src/components/Home.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import React from 'react'; -import { FaFacebookF, FaInstagram, FaLinkedinIn } from 'react-icons/fa'; -import { SiTypescript, SiReact, SiJavascript } from 'react-icons/si'; -import { translations, type Language } from '../translations'; - -interface HomeProps { - language: Language; -} - -const Home: React.FC = ({ language }) => { - const t = translations[language]; - - return ( -
-
-
-
- {t.welcome} -

{t.hello} Davis

-

{t.job}

-

- {t.desc} -

- -
-
- {t.findMe} -
- - - -
-
-
- {t.bestSkill} -
- - - -
-
-
-
- -
-
- Photo -
-
-
-
- -
-

{t.aboutMe}

-

- {t.aboutDesc} -

-
- -
-

{t.getInTouch}

-

- {t.contactDesc} {t.emailMe}. -

-
-
- ); -}; - -export default Home; - diff --git a/src/components/KpiCards.tsx b/src/components/KpiCards.tsx new file mode 100644 index 0000000..68fbb85 --- /dev/null +++ b/src/components/KpiCards.tsx @@ -0,0 +1,92 @@ +import { FiArrowUp, FiArrowDown } from 'react-icons/fi'; +import { type Language, t } from '../translations'; + +interface KpiData { + level: number; + inflow: number; + outflow: number; + volume: number; + fullness: number; +} + +interface Props { + data: KpiData; + language: Language; + lakeName?: string; +} + +const KpiCards = ({ data, language, lakeName = 'Lipno 1' }: Props) => { + const dict = t[language].kpi; + const flowDiff = data.inflow - data.outflow; + + return ( +
+ {/* CARD 1: HLADINA */} +
+
+
+
+ {dict.level} {lakeName} +
+
+ {data.level.toFixed(2)} m n. m. +
+
+ (+0.02 m / 24h) +
+
+ + {/* Decorative Circle */} +
+ + + + +
+
+
+ +
+ {/* CARD 2: PRŮTOK */} +
+
+ {dict.flow} +
+
+
+ {dict.inflow}: {data.inflow.toFixed(1)} m³/s + {dict.outflow}: {data.outflow.toFixed(1)} m³/s +
+ + {/* Flow Circle */} +
+ + + + +
+ {Math.max(data.inflow, data.outflow).toFixed(1)} + m³/s +
+
+
+
+ + {/* CARD 3: NAPLNĚNOST */} +
+
+ {dict.fullness} +
+
+ {data.fullness.toFixed(1)}% +
+
+ {dict.volume}: {data.volume.toFixed(1)} mil. m³ +
+
+
+
+ ); +}; + +export default KpiCards; diff --git a/src/components/LakeDetail.tsx b/src/components/LakeDetail.tsx new file mode 100644 index 0000000..a344f2c --- /dev/null +++ b/src/components/LakeDetail.tsx @@ -0,0 +1,179 @@ +import { useState, useEffect } from 'react'; +import { AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Line, ComposedChart, ReferenceLine } from 'recharts'; +import { type Language, t } from '../translations'; +import KpiCards from './KpiCards'; + +interface LipnoData { + timestamp: string; + date: string; + level: number; + inflow: number; + outflow: number; + volume: number; + fullness: number; +} + +interface Props { + language: Language; + lakeId: string | null; +} + +const CustomTooltip = ({ active, payload, label, language }: any) => { + if (active && payload && payload.length) { + const dict = t[language].chart; + return ( +
+

{label}

+

{dict.level}: {payload[0].value.toFixed(2)} m n. m.

+

{dict.inflow}: {payload[1].value.toFixed(1)} m³/s

+

{dict.outflow}: {payload[2].value.toFixed(1)} m³/s

+
+ ); + } + return null; +}; + +const LakeDetail = ({ language, lakeId }: Props) => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(true); + const [lakeInfo, setLakeInfo] = useState(null); + const [isSmoothed, setIsSmoothed] = useState(true); + const dict = t[language].chart; + const topbarDict = t[language].topbar; + + useEffect(() => { + fetch('/data/lakes_index.json') + .then(res => res.json()) + .then(indexData => { + const found = indexData.find((l: any) => l.id === lakeId); + setLakeInfo(found || { name: 'Lipno 1', river: 'Vltava' }); + }) + .catch(err => console.error(err)); + + fetch('/data/lipno.json') + .then(res => res.json()) + .then(json => { + const formattedData = json.map((item: any) => { + const outflow = item.flow; + const inflow = outflow + (Math.random() * 2 - 0.5); + const volume = 301.2 + (item.level - 723) * 10; + const fullness = (volume / 306) * 100; + + return { + timestamp: item.timestamp, + date: new Date(item.timestamp).toLocaleString(language === 'cs' ? 'cs-CZ' : 'en-GB', { + day: '2-digit', month: '2-digit', year: 'numeric', + hour: '2-digit', minute: '2-digit' + }), + level: item.level, + outflow: outflow, + inflow: inflow, + volume: volume, + fullness: fullness + }; + }); + setData(formattedData); + setLoading(false); + }) + .catch(err => { + console.error('Failed to load data', err); + setLoading(false); + }); + }, [language, lakeId]); + + if (loading) { + return ( +
+
Loading HLADINATOR...
+
+ ); + } + + const latestData = data[data.length - 1] || { level: 0, inflow: 0, outflow: 0, volume: 0, fullness: 0 }; + const curveType = isSmoothed ? 'monotone' : 'linear'; + + return ( +
+
+ {topbarDict.updated} {new Date().toLocaleDateString(language === 'cs' ? 'cs-CZ' : 'en-GB', { day: '2-digit', month: '2-digit', year: 'numeric' })}, {new Date().toLocaleTimeString(language === 'cs' ? 'cs-CZ' : 'en-GB', { hour: '2-digit', minute: '2-digit' })} UTC +
+
+ +
+ + + + + +
+ + + + {/* CHART SECTION */} +
+
+ + {dict.title} {lakeInfo ? `${lakeInfo.name} ${lakeInfo.river ? `- ${lakeInfo.river}` : ''}` : 'Lipno 1 - Vltava'} + +
+ +
+ + + + + + + + + + v.toFixed(2)} /> + + + + } /> + + {/* Reference Lines */} + + + + {/* Data Series */} + + + + + +
+ + {/* Chart Legend */} +
+
{dict.level}
+
{dict.inflow}
+
{dict.outflow}
+
{dict.maxLevel}
+
{dict.storageLevel}
+
+ + {/* Smoothed Toggle Control */} +
+ {dict.view} +
+ {dict.raw} +
setIsSmoothed(!isSmoothed)} + >
+ {dict.smoothed} +
+
+
+ +
+ {dict.dataSources} ČHMÚ, pvl.cz + {dict.createdIn} +
+
+ ); +}; + +export default LakeDetail; diff --git a/src/components/LakesOverview.tsx b/src/components/LakesOverview.tsx new file mode 100644 index 0000000..f8dd8d5 --- /dev/null +++ b/src/components/LakesOverview.tsx @@ -0,0 +1,245 @@ +import { useState, useEffect } from 'react'; +import { FiTrendingUp, FiTrendingDown } from 'react-icons/fi'; +import { type Language, t } from '../translations'; +import Topbar from './Topbar'; +import { AreaChart, Area, ResponsiveContainer } from 'recharts'; + +interface Lake { + id: string; + name: string; + river: string; + priority: boolean; + level: number; + capacity: number; + inflow: number; + outflow: number; + volume: number; + sparkline: number[]; +} + +interface Props { + language: Language; + onSelectLake: (id: string) => void; +} + +const CircularProgress = ({ value, size = 60, strokeWidth = 6 }: { value: number, size?: number, strokeWidth?: number }) => { + const radius = (size - strokeWidth) / 2; + const circumference = radius * 2 * Math.PI; + const offset = circumference - (value / 100) * circumference; + + return ( +
+ + + + +
+ {value}% +
+
+ ); +}; + +const PriorityCard = ({ lake, onSelectLake }: { lake: Lake, onSelectLake: (id: string) => void }) => { + const chartData = lake.sparkline.map((val, i) => ({ name: i, value: val })); + + return ( +
+

{lake.name} {lake.river ? `- ${lake.river}` : ''}

+ +
+
+
+
+
+
+
+
Water level
+
{lake.level} m n.m.
+
Depth
+
+
+ +
+ +
+
{lake.capacity}% / {lake.volume} mil. m³
+
Volume
+
+
+
+ +
+
+ + + + + + + + + + + +
+ +
+
+ + Inflow {lake.inflow} m³/s + / Outflow {lake.outflow} m³/s +
+
+ + Inflow {lake.inflow} m³/s + / Outflow {lake.outflow} m³/s +
+
+
+ + +
+ ); +}; + +const SmallCard = ({ lake, onSelectLake }: { lake: Lake, onSelectLake: (id: string) => void }) => { + const chartData = lake.sparkline.map((val, i) => ({ name: i, value: val })); + + return ( +
onSelectLake(lake.id)} + style={{ padding: '1rem', display: 'flex', flexDirection: 'column', gap: '0.5rem', cursor: 'pointer', transition: 'transform 0.2s', minHeight: '120px' }} + onMouseOver={e => e.currentTarget.style.transform = 'translateY(-2px)'} + onMouseOut={e => e.currentTarget.style.transform = 'translateY(0)'} + > +
+
+
+ {lake.name} +
+
{lake.level}
+
+ +
+ +
+ + + + + + + + + + + +
+
+ ); +}; + +const LakesOverview = ({ language, onSelectLake }: Props) => { + const [lakes, setLakes] = useState([]); + const [sortBy, setSortBy] = useState<'name' | 'level' | 'capacity' | 'inflow'>('name'); + + useEffect(() => { + fetch('/data/lakes_index.json') + .then(res => res.json()) + .then(data => setLakes(data)) + .catch(err => console.error(err)); + }, []); + + const priorityLakes = lakes.filter(l => l.priority); + const otherLakes = lakes.filter(l => !l.priority); + + // Sorting + otherLakes.sort((a, b) => { + if (sortBy === 'name') return a.name.localeCompare(b.name); + if (sortBy === 'level') return b.level - a.level; + if (sortBy === 'capacity') return b.capacity - a.capacity; + if (sortBy === 'inflow') return b.inflow - a.inflow; + return 0; + }); + + const sortButtonStyle = (type: string) => ({ + background: 'none', border: 'none', + color: sortBy === type ? 'var(--text-main)' : 'var(--text-muted)', + cursor: 'pointer', fontSize: '0.85rem' + }); + + return ( +
+
+
+

Overview: Lakes ({lakes.length})

+

Monitoring {lakes.length} reservoirs across the Czech Republic

+
+
+ Sort by: + | + | + | + +
+
+ + {priorityLakes.length > 0 && ( +
+

Priority Reservoirs

+
+ {priorityLakes.map(lake => )} +
+
+ )} + +
+

Other Reservoirs ({otherLakes.length})

+
+ {otherLakes.map(lake => )} +
+
+
+ ); +}; + +export default LakesOverview; diff --git a/src/components/LoadingScreen.tsx b/src/components/LoadingScreen.tsx deleted file mode 100644 index 4dd1be1..0000000 --- a/src/components/LoadingScreen.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import '../index.css'; - -interface LoadingScreenProps { - onLoaded: () => void; -} - -const LoadingScreen: React.FC = ({ onLoaded }) => { - const [fading, setFading] = useState(false); - - useEffect(() => { - const timer = setTimeout(() => { - setFading(true); - setTimeout(onLoaded, 500); // Wait for fade out animation - }, 2500); // Show loading screen for 2.5 seconds - - return () => clearTimeout(timer); - }, [onLoaded]); - - return ( -
-
-
-

Welcome

-
-
- ); -}; - -export default LoadingScreen; diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx deleted file mode 100644 index ad46fa1..0000000 --- a/src/components/Navbar.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import React from 'react'; -import logo from '../assets/logo.jpg'; -import { translations, type Language } from '../translations'; -import { Link, useLocation, useNavigate } from 'react-router-dom'; - -interface NavbarProps { - language: Language; - setLanguage: (lang: Language) => void; -} - -const Navbar: React.FC = ({ language, setLanguage }) => { - const t = translations[language]; - const location = useLocation(); - const navigate = useNavigate(); - - const handleNavClick = (id: string, e: React.MouseEvent) => { - e.preventDefault(); - if (location.pathname !== '/') { - navigate('/'); - // Wait for navigation then scroll - setTimeout(() => { - const element = document.getElementById(id); - if (element) { - element.scrollIntoView({ behavior: 'smooth' }); - } - }, 100); - } else { - const element = document.getElementById(id); - if (element) { - element.scrollIntoView({ behavior: 'smooth' }); - } - } - }; - - const handleHomeClick = (e: React.MouseEvent) => { - e.preventDefault(); - if (location.pathname !== '/') { - navigate('/'); - } else { - window.scrollTo({ top: 0, behavior: 'smooth' }); - } - }; - - return ( - - ); -}; - -export default Navbar; diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx new file mode 100644 index 0000000..0ebfd9f --- /dev/null +++ b/src/components/SettingsModal.tsx @@ -0,0 +1,142 @@ +import { FiX, FiMoon, FiSun, FiGlobe, FiCoffee } from 'react-icons/fi'; +import { type Language, t } from '../translations'; + +interface Props { + language: Language; + setLanguage: (lang: Language) => void; + theme: 'dark' | 'light'; + setTheme: (theme: 'dark' | 'light') => void; + onClose: () => void; +} + +const SettingsModal = ({ language, setLanguage, theme, setTheme, onClose }: Props) => { + const dict = t[language].settings; + + return ( +
+
+ {/* Header */} +
+

{dict.title}

+ +
+ + {/* Theme Setting */} +
+ +
+ + +
+
+ + {/* Language Setting */} +
+ +
+ + +
+
+ + {/* Buy me a coffee */} + + +
+
+ ); +}; + +export default SettingsModal; diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx new file mode 100644 index 0000000..f40a058 --- /dev/null +++ b/src/components/Sidebar.tsx @@ -0,0 +1,66 @@ +import { useState } from 'react'; +import { FiDroplet, FiStar, FiMap, FiSettings, FiMenu, FiChevronLeft, FiChevronRight } from 'react-icons/fi'; +import { type Language, t } from '../translations'; + +interface Props { + language: Language; + onOpenSettings: () => void; + activeView: 'overview' | 'detail'; + onNavigate: (view: 'overview' | 'detail') => void; + isMobileMenuOpen?: boolean; + onCloseMobileMenu?: () => void; +} + +const Sidebar = ({ language, onOpenSettings, activeView, onNavigate, isMobileMenuOpen, onCloseMobileMenu }: Props) => { + const [isCollapsed, setIsCollapsed] = useState(false); + const dict = t[language].sidebar; + + return ( +
+
+ +
+ HLADINATOR + v1.0 +
+ + {/* Toggle Button */} + +
+ +
+
onNavigate('detail')}> + + {dict.favorites} +
+
onNavigate('overview')}> + + {dict.lakes} +
+
+ + {dict.map} +
+
+ +
+
+ + {dict.settings} +
+
+
+ ); +}; + +export default Sidebar; diff --git a/src/components/TimeBreaker.css b/src/components/TimeBreaker.css deleted file mode 100644 index 97e3dc8..0000000 --- a/src/components/TimeBreaker.css +++ /dev/null @@ -1,162 +0,0 @@ -.timer-container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - width: 100%; - max-width: 500px; - margin: 0 auto; - padding: 2rem; - background-color: rgba(30, 32, 36, 0.5); - border-radius: 12px; - border: 1px solid rgba(255, 255, 255, 0.05); - backdrop-filter: blur(10px); -} - -.timer-display { - font-size: 5rem; - font-weight: 700; - font-variant-numeric: tabular-nums; - margin: 2rem 0; - padding: 1rem 2rem; - border-radius: 8px; - background-color: rgba(0, 0, 0, 0.2); - color: var(--text-color); - transition: background-color 0.3s ease, color 0.3s ease; - text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); -} - -.timer-display.time-up { - background-color: rgba(244, 67, 54, 0.2); - color: #f44336; - animation: flash 1s infinite; - border: 1px solid rgba(244, 67, 54, 0.5); -} - -@keyframes flash { - - 0%, - 100% { - opacity: 1; - } - - 50% { - opacity: 0.8; - } -} - -.controls-section { - display: flex; - flex-direction: column; - gap: 2rem; - width: 100%; -} - -.slider-container { - width: 100%; - padding: 0 1rem; - display: flex; - flex-direction: column; - gap: 0.5rem; -} - -.time-slider { - -webkit-appearance: none; - width: 100%; - height: 8px; - border-radius: 4px; - background: rgba(255, 255, 255, 0.1); - outline: none; - cursor: pointer; -} - -.time-slider::-webkit-slider-thumb { - -webkit-appearance: none; - appearance: none; - width: 24px; - height: 24px; - border-radius: 50%; - background: var(--accent-color); - cursor: pointer; - transition: transform 0.2s; - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); -} - -.time-slider::-webkit-slider-thumb:hover { - transform: scale(1.1); - background: #747bff; -} - -.time-slider::-moz-range-thumb { - width: 24px; - height: 24px; - border-radius: 50%; - background: var(--accent-color); - cursor: pointer; - border: none; - transition: transform 0.2s; - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); -} - -.time-slider::-moz-range-thumb:hover { - transform: scale(1.1); - background: #747bff; -} - -.slider-labels { - display: flex; - justify-content: space-between; - color: var(--secondary-color); - font-size: 0.8rem; - font-weight: 500; -} - -.main-controls { - display: flex; - justify-content: center; - gap: 1.5rem; -} - -.control-btn { - min-width: 120px; - font-size: 1.1rem; - padding: 0.8rem 2rem; - text-transform: uppercase; - letter-spacing: 1px; -} - -.start-btn { - background-color: var(--accent-color); - color: white; - box-shadow: 0 4px 15px rgba(100, 108, 255, 0.3); -} - -.start-btn:hover { - background-color: #747bff; - box-shadow: 0 6px 20px rgba(100, 108, 255, 0.4); - transform: translateY(-2px); -} - -.reset-btn { - background-color: transparent; - border: 1px solid var(--secondary-color); - color: var(--secondary-color); -} - -.reset-btn:hover { - border-color: var(--text-color); - color: var(--text-color); - background-color: rgba(255, 255, 255, 0.05); -} - -@media (max-width: 480px) { - .timer-display { - font-size: 3.5rem; - } - - .control-btn { - min-width: 100px; - padding: 0.7rem 1.5rem; - font-size: 1rem; - } -} \ No newline at end of file diff --git a/src/components/TimeBreaker.tsx b/src/components/TimeBreaker.tsx deleted file mode 100644 index afc6db9..0000000 --- a/src/components/TimeBreaker.tsx +++ /dev/null @@ -1,163 +0,0 @@ -import React, { useState, useEffect, useRef } from 'react'; -import { translations, type Language } from '../translations'; -import './TimeBreaker.css'; - -interface TimeBreakerProps { - language: Language; -} - -const DEFAULT_TIME_MINUTES = 22; -const MAX_TIME_MINUTES = 180; -const SECONDS_PER_MINUTE = 60; - -const TimeBreaker: React.FC = ({ language }) => { - const t = translations[language]; - - const [timeLeft, setTimeLeft] = useState(DEFAULT_TIME_MINUTES * SECONDS_PER_MINUTE); - const [isRunning, setIsRunning] = useState(false); - const [isTimeUp, setIsTimeUp] = useState(false); - - const audioContextRef = useRef(null); - const intervalRef = useRef(null); - - // Format time as MM:SS - const formatTime = (seconds: number): string => { - const m = Math.floor(seconds / 60); - const s = seconds % 60; - return `${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`; - }; - - // Update document title - useEffect(() => { - document.title = `${formatTime(timeLeft)} - ${t.timeBreaker}`; - return () => { - document.title = 'David Fencl - IT Consulting'; - }; - }, [timeLeft, t.timeBreaker]); - - // Timer logic - useEffect(() => { - if (isRunning && timeLeft > 0) { - intervalRef.current = window.setInterval(() => { - setTimeLeft((prev) => { - if (prev <= 1) { - handleTimeUp(); - return 0; - } - return prev - 1; - }); - }, 1000); - } else if (timeLeft === 0 && isRunning) { - handleTimeUp(); - } - - return () => { - if (intervalRef.current) { - clearInterval(intervalRef.current); - } - }; - }, [isRunning]); - - const handleTimeUp = () => { - setIsRunning(false); - setIsTimeUp(true); - playAlarm(); - // Play alarm 3 times - setTimeout(playAlarm, 1000); - setTimeout(playAlarm, 2000); - }; - - const playAlarm = () => { - if (!audioContextRef.current) { - audioContextRef.current = new (window.AudioContext || (window as any).webkitAudioContext)(); - } - - const ctx = audioContextRef.current; - if (!ctx) return; - - // Create oscillator - const oscillator = ctx.createOscillator(); - const gainNode = ctx.createGain(); - - oscillator.type = 'sine'; - oscillator.frequency.setValueAtTime(880, ctx.currentTime); // A5 - oscillator.frequency.exponentialRampToValueAtTime(440, ctx.currentTime + 0.5); // Drop to A4 - - gainNode.gain.setValueAtTime(0.5, ctx.currentTime); - gainNode.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.5); - - oscillator.connect(gainNode); - gainNode.connect(ctx.destination); - - oscillator.start(); - oscillator.stop(ctx.currentTime + 0.5); - }; - - const handleStart = () => { - if (timeLeft === 0) return; - setIsRunning(true); - setIsTimeUp(false); - }; - - const handlePause = () => { - setIsRunning(false); - }; - - const handleReset = () => { - setIsRunning(false); - setIsTimeUp(false); - setTimeLeft(DEFAULT_TIME_MINUTES * SECONDS_PER_MINUTE); - }; - - return ( -
-
-
-

{t.timeBreaker}

- -
- {formatTime(timeLeft)} -
- -
-
- { - const minutes = parseInt(e.target.value, 10); - setTimeLeft(minutes * 60); - if (minutes > 0) setIsTimeUp(false); - }} - className="time-slider" - /> -
- 0m - {MAX_TIME_MINUTES}m -
-
- -
- {!isRunning ? ( - - ) : ( - - )} - -
-
-
-
-
- ); -}; - -export default TimeBreaker; diff --git a/src/components/Topbar.tsx b/src/components/Topbar.tsx new file mode 100644 index 0000000..9463063 --- /dev/null +++ b/src/components/Topbar.tsx @@ -0,0 +1,31 @@ +import { FiSearch, FiMenu, FiDroplet } from 'react-icons/fi'; +import { type Language, t } from '../translations'; + +interface Props { + language: Language; + onToggleMobileMenu?: () => void; +} + +const Topbar = ({ language, onToggleMobileMenu }: Props) => { + const dict = t[language].topbar; + + return ( +
+
+ + +
+ + Hladinator +
+ +
+ + +
+
+
+ ); +}; + +export default Topbar; diff --git a/src/index.css b/src/index.css index 06608fb..ebada5b 100644 --- a/src/index.css +++ b/src/index.css @@ -1,366 +1,127 @@ :root { - --bg-color: #0f0f0f; - --text-color: #f0f0f0; - --accent-color: #646cff; - --secondary-color: #a0a0a0; - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - color-scheme: dark; - color: var(--text-color); - background-color: var(--bg-color); - scroll-behavior: smooth; + /* Colors based on HLADINATOR design */ + --bg-dark: #1e293b; /* Unified lighter navy background */ + --bg-card: #1e293b; /* Card/Panel background */ + --bg-card-hover: #334155; + --text-main: #f8fafc; /* White text */ + --text-muted: #94a3b8; /* Gray text */ + + --color-cyan: #06b6d4; /* Hladina / Primary */ + --color-green: #22c55e; /* Přítok / Positive trend */ + --color-red: #ef4444; /* Odtok / Negative trend */ + --color-orange: #f97316; /* Odtok line chart color */ + +.kpi-container-mobile { + display: flex; + flex-direction: column; + gap: 1rem; + width: 100%; } -html { - scroll-padding-top: 100px; - /* Offset for sticky header */ +.kpi-card-full { + background-color: var(--bg-card); + border: 1px solid var(--border-color); + border-radius: 0.75rem; + padding: 1.5rem; + width: 100%; +} + +.kpi-row-half { + display: flex; + gap: 1rem; + width: 100%; +} + +.kpi-card-half { + background-color: var(--bg-card); + border: 1px solid var(--border-color); + border-radius: 0.75rem; + padding: 1.25rem; + flex: 1; + min-width: 0; +} + +/* Time controls pill layout */ +.top-time-controls { + display: flex; + background-color: var(--bg-card); + border-radius: 0.5rem; + border: 1px solid var(--border-color); + overflow: hidden; + width: 100%; +} + +.top-time-controls button { + flex: 1; + background: transparent; + border: none; + border-right: 1px solid var(--border-color); + color: var(--text-muted); + padding: 0.75rem 0; + cursor: pointer; + font-weight: 500; + transition: all 0.2s; +} +.top-time-controls button:last-child { + border-right: none; +} +.top-time-controls button.active { + background-color: var(--color-cyan); + color: white; +} + + --border-color: rgba(255, 255, 255, 0.05); + + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; +} + +body.light-mode { + --bg-dark: #f1f5f9; /* Unified light background */ + --bg-card: #f1f5f9; /* Card/Panel background */ + --bg-card-hover: #e2e8f0; + --text-main: #0f172a; /* Dark navy text */ + --text-muted: #64748b; /* Muted gray text */ + --border-color: rgba(0, 0, 0, 0.1); + + /* Slightly darker graph colors for white background */ + --color-cyan: #0891b2; + --color-green: #16a34a; + --color-red: #dc2626; + --color-orange: #ea580c; + + background-color: var(--bg-dark); + color: var(--text-main); +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; + font-weight: 400; + + color-scheme: dark; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; } body { margin: 0; - display: flex; - place-items: center; min-width: 320px; min-height: 100vh; + background-color: var(--bg-dark); } -#root { - width: 100%; - margin: 0 auto; - text-align: center; -} - -/* Loading Screen */ -.loading-screen { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: var(--bg-color); - display: flex; - justify-content: center; - align-items: center; - z-index: 1000; - transition: opacity 0.5s ease-out; -} - -.loading-screen.fade-out { - opacity: 0; - pointer-events: none; -} - -.loader-content { - display: flex; - flex-direction: column; - align-items: center; -} - -.spinner { - width: 50px; - height: 50px; - border: 4px solid rgba(255, 255, 255, 0.1); - border-left-color: var(--accent-color); - border-radius: 50%; - animation: spin 1s linear infinite; - margin-bottom: 20px; -} - -.loading-text { - font-size: 1.5rem; - letter-spacing: 2px; - text-transform: uppercase; - animation: pulse 2s infinite; -} - -/* Home */ -.home-container { - width: 100%; - min-height: 100vh; - display: flex; - flex-direction: column; -} - -.fade-in { - animation: fadeIn 1s ease-in; -} - -.navbar { - position: sticky; - top: 0; - z-index: 100; - background-color: rgba(15, 15, 15, 0.85); - backdrop-filter: blur(10px); - display: flex; - justify-content: center; - padding: 0.8rem 8rem; - align-items: center; - border-bottom: 1px solid rgba(255, 255, 255, 0.05); -} - -.nav-content { - width: 100%; - max-width: 1200px; - display: flex; - justify-content: space-between; - align-items: center; -} - -.nav-logo { - height: 120px; - width: auto; - border-radius: 4px; -} - -.links a { - margin-left: 2rem; +a { + color: inherit; text-decoration: none; - color: var(--secondary-color); - transition: color 0.3s; -} - -.links a:hover { - color: var(--accent-color); -} - -.hero { - flex: 1; - display: flex; - justify-content: center; - align-items: center; - padding: 4rem 8rem; - padding-top: 10vh; - text-align: left; -} - -.hero-content { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: flex-start; - width: 100%; - max-width: 1200px; - gap: 4rem; -} - -.hero-text { - flex: 1; - display: flex; - flex-direction: column; - gap: 1.5rem; -} - -.welcome-text { - font-size: 0.9rem; - letter-spacing: 3px; - color: var(--secondary-color); - text-transform: uppercase; - margin-bottom: 1rem; -} - -.hero h1 { - font-size: 3.5rem; - margin: 0; - line-height: 1.2; - font-weight: 700; -} - -.highlight { - color: var(--accent-color); -} - -.job-title { - font-size: 3.5rem; - margin: 0; - line-height: 1.2; - font-weight: 700; - color: var(--text-color); -} - -.description { - font-size: 1rem; - line-height: 1.8; - color: var(--secondary-color); - max-width: 600px; - margin-top: 1rem; -} - -.hero-footer { - display: flex; - justify-content: space-between; - margin-top: 4rem; - gap: 2rem; - flex-wrap: wrap; -} - -.footer-label { - display: block; - font-size: 0.8rem; - letter-spacing: 2px; - color: var(--secondary-color); - margin-bottom: 1rem; - text-transform: uppercase; -} - -.icon-group { - display: flex; - gap: 1rem; -} - -.icon-btn { - width: 54px; - height: 54px; - background: linear-gradient(145deg, #1e2024, #23272b); - box-shadow: 10px 10px 19px #1c1e22, -10px -10px 19px #262a2e; - border: none; - border-radius: 6px; - color: var(--text-color); - font-weight: bold; - cursor: pointer; - transition: all 0.3s ease; - display: flex; - justify-content: center; - align-items: center; - font-size: 1.3rem; -} - -.icon-btn:hover { - background: linear-gradient(145deg, #23272b, #1e2024); - transform: translateY(-2px); - color: var(--accent-color); -} - -.hero-image-container { - flex: 0.8; - display: flex; - justify-content: center; - align-items: center; -} - -.hero-image-placeholder { - width: 100%; - aspect-ratio: 3/4; - background: linear-gradient(145deg, #1e2024, #23272b); - box-shadow: 10px 10px 19px #1c1e22, -10px -10px 19px #262a2e; - border-radius: 20px; - display: flex; - justify-content: center; - align-items: center; - color: var(--secondary-color); - font-size: 1.2rem; - border: 1px solid rgba(255, 255, 255, 0.05); -} - -.nav-right { - display: flex; - flex-direction: column; - align-items: flex-end; - gap: 0.5rem; -} - -.language-switcher { - display: flex; - gap: 0.5rem; - align-items: center; - font-size: 0.9rem; - color: var(--secondary-color); -} - -.lang-separator { - opacity: 0.5; -} - -.lang-btn { - background: none; - border: none; - font-size: 0.9rem; - font-weight: 600; - cursor: pointer; - opacity: 0.5; - transition: opacity 0.3s, color 0.3s; - padding: 0; - color: var(--secondary-color); -} - -.lang-btn:hover { - opacity: 1; - color: var(--accent-color); -} - -.lang-btn.active { - opacity: 1; - color: var(--text-color); -} - -@media (max-width: 1024px) { - .hero-content { - flex-direction: column-reverse; - align-items: center; - text-align: center; - } - - .hero-text { - align-items: center; - } - - .hero-footer { - justify-content: center; - } - - .hero-image-container { - width: 80%; - margin-bottom: 2rem; - } -} - -.section { - padding: 4rem; -} - -.about { - background-color: #1a1a1a; -} - -/* Animations */ -@keyframes spin { - to { - transform: rotate(360deg); - } -} - -@keyframes pulse { - 0% { - opacity: 0.5; - } - - 50% { - opacity: 1; - } - - 100% { - opacity: 0.5; - } -} - -@keyframes fadeIn { - from { - opacity: 0; - transform: translateY(20px); - } - - to { - opacity: 1; - transform: translateY(0); - } -} - -@media (max-width: 768px) { - .navbar { - padding: 1rem; - } - - .hero h1 { - font-size: 2.5rem; - } } \ No newline at end of file diff --git a/src/translations.ts b/src/translations.ts index a35761d..9b9d460 100644 --- a/src/translations.ts +++ b/src/translations.ts @@ -1,38 +1,100 @@ export type Language = 'en' | 'cs'; -export const translations = { - en: { - home: 'Home', - about: 'About', - contact: 'Contact', - timeBreaker: 'Time-Breaker', - welcome: 'WELCOME TO MY WORLD', - hello: "Hello, I'm", - job: 'a Developer.', - desc: "I use animation as a third dimension by which to simplify experiences and guiding through each and every interaction. I'm not adding motion just to spruce things up, but doing it in ways that matter.", - findMe: 'FIND WITH ME', - bestSkill: 'BEST SKILL ON', - aboutMe: 'About Me', - aboutDesc: 'I build accessible, pixel-perfect, and performant web experiences. Passionate about technology and design.', - getInTouch: 'Get In Touch', - contactDesc: 'Interested in working together?', - emailMe: 'Email me', +export const t = { + en: { + sidebar: { + favorites: 'Favorites', + lakes: 'Lakes', + map: 'Map', + settings: 'Settings' }, - cs: { - home: 'Domů', - about: 'O mně', - contact: 'Kontakt', - timeBreaker: 'Time-Breaker', - welcome: 'VÍTEJTE V MÉM SVĚTĚ', - hello: "Ahoj, jsem", - job: 'Vývojář.', - desc: "Používám animaci jako třetí rozměr, kterým zjednodušuji zážitky a provázím každou interakcí. Nepřidávám pohyb jen pro efekt, ale dělám to způsoby, které mají smysl.", - findMe: 'NAJDETE MĚ NA', - bestSkill: 'DOVEDNOSTI', - aboutMe: 'O mně', - aboutDesc: 'Tvořím přístupné, pixel-perfect a výkonné webové zážitky. Vášnivý pro technologie a design.', - getInTouch: 'Napište mi', - contactDesc: 'Máte zájem o spolupráci?', - emailMe: 'Napište mi', + topbar: { + search: 'Search river or reservoir (e.g. Lipno)...', + updated: 'Last updated:' + }, + kpi: { + level: 'WATER LEVEL', + flow: 'FLOW RATE', + inflow: 'Inflow', + outflow: 'Outflow', + fullness: 'CAPACITY', + volume: 'Volume' + }, + chart: { + title: 'Long-term development', + timeframe: 'Timeframe', + timeframeMobile: 'Time', + view: 'View', + raw: 'Raw data', + smoothed: 'Smoothed', + calendar: 'Calendar', + all: 'All', + year: 'Year', + level: 'Water level', + inflow: 'Inflow', + outflow: 'Outflow', + maxLevel: 'Max retention level', + storageLevel: 'Storage space level', + dataSources: 'Data sources:', + createdIn: 'Created with ♥ in the Czech Republic' + }, + settings: { + title: 'Settings', + theme: 'Theme', + dark: 'Dark', + light: 'Light', + language: 'Language', + english: 'English', + czech: 'Čeština', + buyCoffee: 'Buy Me a Coffee' } + }, + cs: { + sidebar: { + favorites: 'Oblíbené', + lakes: 'Jezera', + map: 'Mapa', + settings: 'Nastavení' + }, + topbar: { + search: 'Hledat tok nebo nádrž (např. Lipno)...', + updated: 'Aktualizováno:' + }, + kpi: { + level: 'HLADINA', + flow: 'PRŮTOK', + inflow: 'Přítok', + outflow: 'Odtok', + fullness: 'NAPLNĚNOST', + volume: 'Objem' + }, + chart: { + title: 'Dlouhodobý vývoj', + timeframe: 'Časové období', + timeframeMobile: 'Časové', + view: 'Zobrazení', + raw: 'Syrová data', + smoothed: 'Vyhlazená', + calendar: 'Kalendář', + all: 'Vše', + year: 'Rok', + level: 'Hladina', + inflow: 'Přítok', + outflow: 'Odtok', + maxLevel: 'Max. retenční hladina', + storageLevel: 'Hladina zásobního prostoru', + dataSources: 'Zdroje dat:', + createdIn: 'Vytvořeno s ♥ v České republice' + }, + settings: { + title: 'Nastavení', + theme: 'Vzhled', + dark: 'Tmavý', + light: 'Světlý', + language: 'Jazyk', + english: 'English', + czech: 'Čeština', + buyCoffee: 'Kup mi kávu' + } + } };