From c263497ec8b05bc0f9254ed2f7ecb4dba6f67d4e Mon Sep 17 00:00:00 2001 From: Kostya Date: Thu, 15 Oct 2026 19:35:48 +0300 Subject: ui-web: add browser client for the Ex4 bonus A React + TypeScript single-page client served by Vite, working against the same servlets as the desktop client: login, the events screen with filters, details, order books and trading, and the account screen with deposit, holdings, ledger rows and the user directory. No file upload, as the exercise specifies. It looks like the desktop client on purpose: the three skins of theme.css as CSS variables, the four animations redone with SVG and keyframes, and the desktop's Nerd Fonts, which npm run dev copies from ui-fx instead of keeping a second copy in the repo. The shared chat sits in a drawer above the status bar, as on the desktop, on its own poll because chat lines don't move the market version. Vite forwards /guess-market to Tomcat on 8080, so the page and the API share an origin and the session cookie needs no CORS. The client polls /api/sync once a second and reloads only when the version moved. run-web.bat installs the packages and starts it on localhost:5173. package.sh stages the sources under build/dist/ex4, without node_modules. --- ui-web/index.html | 12 + ui-web/package-lock.json | 1746 ++++++++++++++++++++++++++++++++++++++++++++++ ui-web/package.json | 22 + ui-web/run-web.bat | 10 + ui-web/src/App.tsx | 502 +++++++++++++ ui-web/src/Chart.tsx | 94 +++ ui-web/src/Events.tsx | 370 ++++++++++ ui-web/src/Users.tsx | 298 ++++++++ ui-web/src/api.ts | 176 +++++ ui-web/src/graphics.tsx | 51 ++ ui-web/src/main.tsx | 10 + ui-web/src/styles.css | 1068 ++++++++++++++++++++++++++++ ui-web/tsconfig.json | 15 + ui-web/vite.config.ts | 14 + 14 files changed, 4388 insertions(+) create mode 100644 ui-web/index.html create mode 100644 ui-web/package-lock.json create mode 100644 ui-web/package.json create mode 100644 ui-web/run-web.bat create mode 100644 ui-web/src/App.tsx create mode 100644 ui-web/src/Chart.tsx create mode 100644 ui-web/src/Events.tsx create mode 100644 ui-web/src/Users.tsx create mode 100644 ui-web/src/api.ts create mode 100644 ui-web/src/graphics.tsx create mode 100644 ui-web/src/main.tsx create mode 100644 ui-web/src/styles.css create mode 100644 ui-web/tsconfig.json create mode 100644 ui-web/vite.config.ts (limited to 'ui-web') diff --git a/ui-web/index.html b/ui-web/index.html new file mode 100644 index 0000000..279b73a --- /dev/null +++ b/ui-web/index.html @@ -0,0 +1,12 @@ + + + + + + Guess Market + + +
+ + + diff --git a/ui-web/package-lock.json b/ui-web/package-lock.json new file mode 100644 index 0000000..96f2ce1 --- /dev/null +++ b/ui-web/package-lock.json @@ -0,0 +1,1746 @@ +{ + "name": "guess-market-web", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "guess-market-web", + "version": "1.0.0", + "dependencies": { + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "devDependencies": { + "@types/react": "18.3.12", + "@types/react-dom": "18.3.1", + "@vitejs/plugin-react": "4.3.4", + "typescript": "5.6.3", + "vite": "5.4.11" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", + "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@babel/types": "^7.29.8", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.10.tgz", + "integrity": "sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz", + "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.10.tgz", + "integrity": "sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.8", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.9", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.8", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.64.6.tgz", + "integrity": "sha512-FkO19Fowv/OQeJZPVfdetJaI3/VpbZmBsnmAlR/rQ+b3QwfiGQiOpVegpSRH331kelvHTVw9hXYG3DwjAaRzyQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.64.6.tgz", + "integrity": "sha512-si5/Etm6MphPc2xYHnk455Shls/hoMjTy3mhXge4OPmvCw7TwC4KP4fKokAlKLV4XaQvLvgSHfafPcblLMYYdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.64.6.tgz", + "integrity": "sha512-PQCl3q7b0BgvVt72i2xrWM6I5KliwwVe4GpWW5QDGyUQawDS9aPZss/aGyFqBmxdRxlE8wDc9CaxiQ5DHRSp/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.64.6.tgz", + "integrity": "sha512-l9DFl1Itb1YYdSrP1K3U8ih44AOHa/p+Q4WMMDfGvH5qVWp+ajfgS1DlYo4yCRh8wJ2ZJv0Fqccf+ULAmMFjmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.64.6.tgz", + "integrity": "sha512-bR4GR3205N9+od0+l5Dd9/iZTDpJkIe6d6Ydp2qbcQZJLmKBdYQQRp8gbWpbMt92twKJY66o1vK4NkoKQODIrA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.64.6.tgz", + "integrity": "sha512-XTVNaDzcFl2TeBglvxdGgsCv9JGtAGRAoJENmGBR/XvDH2mA2K0IXc2aMfP0dR8mexSXSKifJ85FixoXX1wfTw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.64.6.tgz", + "integrity": "sha512-qWc6qbc+25ugG9vqPR9P422KJBbVfZ05mjcMggoq8tsfWP+eRfC+/tiDdIlRF5VL2pDVZWN9zAhWsmu7R1+7Dw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.64.6.tgz", + "integrity": "sha512-V4Nwkp8844X/Xnww3PI1LYS0YPei8XQEVG70R+5MPZGO7AhYoun4hCN7Svs4U3wbQLZbwiz+9xRFhUZZdRl8Ww==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.64.6.tgz", + "integrity": "sha512-xb72A1aPaaIsp+a88VtRae/ovIEXislbUMyp7b9AQQU7ZkP2m/+ik6DW9TQcJyw5R8/RIailF9zExYwkjR++UA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.64.6.tgz", + "integrity": "sha512-pbcs1BVBwC43hZkjhjlF8Rx8m5G0KnhLZs9Azy/gqccP6UsNSzJr0hKGIAVPqzAH1O/NdPxxC9GVGb4msQg/aw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.64.6.tgz", + "integrity": "sha512-EKOC8os6Vsg487ZLKUqzLF99Jsmnq6tu7O7mAELakNpcA+8KadktFf/JYdRuHe/DzCUXmN38pUKu4XBcKlqGbQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.64.6.tgz", + "integrity": "sha512-v/SQ68GnSlr/HyjB79sNXesGDwkOPu9JjbHfmWaymCiM+nZsQ9TstG1KfA4MuEvTr2d3PoY8PhFxj9bt0e32JA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.64.6.tgz", + "integrity": "sha512-G3pmliMQ7r15zFFNwBlaT/xTdSLi4lfgI7CUrQueyKYheNVhrd8JrWCE6Ll8xf4AA1RZFqq+mNJYntiElsVOyA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.64.6.tgz", + "integrity": "sha512-XQTB/IPoB/wG6x/wu9uomAt8YH61IAr5iZTubMiad/lu88sotq2ocz9hJd556+Jz2kIkF7ZQZIsUuWE3OWqtcA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.64.6.tgz", + "integrity": "sha512-O5mpokth6+ydMuwiGtY8fIjvOBfH7u6SzmDNmZ3k6GK5C6iEAC2q2ZN/T5L9jYILx0IcCT0KnfMDihQ5yQFSBw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.64.6.tgz", + "integrity": "sha512-aIFxbAD9v3TvIaEDsKmukjcDg1JS4/tFXw8SHyQQgzOwzWCQ4cyDK7Ju1pQKqUXDFkEu/BZCFDCDATsKhQcB/Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.64.6.tgz", + "integrity": "sha512-fuNo1UwBc6BxnHDOxxguQL/InhheMN3RJcJMb0b4xP8r5Q3CNCrJbVg0eCIFuJ4e/zAfjR2gYbOfbzO/G7CIyw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.64.6.tgz", + "integrity": "sha512-05v6wFKDKJPZs9xlytVrrRu6IbRuoSvlH9xNwEOafXsKyjBFZPvAcZz2VIAB/M+lblYeKa9iOYC4RDVdfcAAaw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.64.6.tgz", + "integrity": "sha512-wJXKcdMjvkc/FaavZXNP1yW4i0pfOmhZAIWRSLG2yJ0PB0TWi7dkLErhX0u0vptDcXKKO/m1Y/YTeuyvb2MXwg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.64.6.tgz", + "integrity": "sha512-cwg7/h0ThvJwy8CBkmACdiHAxRWpbsCmIsjOt+Zzx0hTnIcSUmKYEV03bGg+hD827OnwUsbKh1ZZDW754xWyBA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.64.6.tgz", + "integrity": "sha512-T0RkYIJbdYXJEQFw+tMBO09KDFdgmNxkHsof3wWAABrvnx15Yh8RytmrgYy9+q9cBeBNZF66MMQZC+5nzEz6vg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.64.6.tgz", + "integrity": "sha512-KlfpmF1AAIdAWxt8QQNClbpLFlAUfYOzqIuJ7IXEStMHpFRuH78RG6FjqPb3Rqhh0K89F5npvG+/i3Fjl6IveQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.64.6.tgz", + "integrity": "sha512-MrTLjd7Jlt9/ZavJZYG61KQv9Iy9bzbY+yXy73Xvwoa2uP66wvDShkyBr5Chz/yrE6lbD/zHMuTmKQVNQqBApg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.64.6.tgz", + "integrity": "sha512-8fWDH1CkPI8GdBKAxzHDza7UmgficsKo2+MVbvUgOGhB0629w5sHMg3Qu5y7TZsrYKHHWpz8fla4KvoT7WsO3Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.64.6.tgz", + "integrity": "sha512-9/c9PWdr5GCIHkkxiHM1HjNBQMVdftP4O8QTcoUAaRza2FSqJ4axbf8QAnBuE6BIGQDl71SaRPeDdDYid5ecTw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.12", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", + "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.4.tgz", + "integrity": "sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.26.0", + "@babel/plugin-transform-react-jsx-self": "^7.25.9", + "@babel/plugin-transform-react-jsx-source": "^7.25.9", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.28", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.28.tgz", + "integrity": "sha512-br0LOmjJqr6Rt4AEkadbcNf67Zpo7EPwKsWbjnRrJIa1QYFHQBqM4C7F2WTbV8ahTEcg1Eo+Y0aWjjORInYFyA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.29.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.3.tgz", + "integrity": "sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.11.26", + "caniuse-lite": "^1.0.30001813", + "electron-to-chromium": "^1.5.439", + "node-releases": "^2.0.57", + "update-browserslist-db": "^1.3.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001816", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001816.tgz", + "integrity": "sha512-+8Yx7BXCoqk6IF8yTicjfUR6D/ldJzdlsodlEOiOSPmhK844WIgk67/zIQaGAOxNkZyyvBlrRFnLvqKIoqbAFw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "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, + "license": "MIT" + }, + "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" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.454", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.454.tgz", + "integrity": "sha512-NqD5GhkXnxJpDQVCmmpc546qjH6kei2VI9m45CTF+sQU7bcS7YeVt7ba0cnjueMH1AXGRu/driZUP9iYVSv7vg==", + "dev": true, + "license": "ISC" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.58", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.58.tgz", + "integrity": "sha512-BdiKAgbfRlvfMq/XzO/AF9NPmaA8a+YpLAyAFTVFBj3gARrAIfWvNq7Q7NE4se3KgFu0KkrvQMxTS0XVnsGzHg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.5.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.30.tgz", + "integrity": "sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", + "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.64.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.64.6.tgz", + "integrity": "sha512-fX1Vy+UNKdXn+xKDnu/HBXbHVr1AY8cSdQj9BU4kLv5aFCMqGpvrVbyUMmjN3DdzWhSAuTbcX8PCNEVaumthYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.64.6", + "@rollup/rollup-android-arm64": "4.64.6", + "@rollup/rollup-darwin-arm64": "4.64.6", + "@rollup/rollup-darwin-x64": "4.64.6", + "@rollup/rollup-freebsd-arm64": "4.64.6", + "@rollup/rollup-freebsd-x64": "4.64.6", + "@rollup/rollup-linux-arm-gnueabihf": "4.64.6", + "@rollup/rollup-linux-arm-musleabihf": "4.64.6", + "@rollup/rollup-linux-arm64-gnu": "4.64.6", + "@rollup/rollup-linux-arm64-musl": "4.64.6", + "@rollup/rollup-linux-loong64-gnu": "4.64.6", + "@rollup/rollup-linux-loong64-musl": "4.64.6", + "@rollup/rollup-linux-ppc64-gnu": "4.64.6", + "@rollup/rollup-linux-ppc64-musl": "4.64.6", + "@rollup/rollup-linux-riscv64-gnu": "4.64.6", + "@rollup/rollup-linux-riscv64-musl": "4.64.6", + "@rollup/rollup-linux-s390x-gnu": "4.64.6", + "@rollup/rollup-linux-x64-gnu": "4.64.6", + "@rollup/rollup-linux-x64-musl": "4.64.6", + "@rollup/rollup-openbsd-x64": "4.64.6", + "@rollup/rollup-openharmony-arm64": "4.64.6", + "@rollup/rollup-win32-arm64-msvc": "4.64.6", + "@rollup/rollup-win32-ia32-msvc": "4.64.6", + "@rollup/rollup-win32-x64-gnu": "4.64.6", + "@rollup/rollup-win32-x64-msvc": "4.64.6", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/ui-web/package.json b/ui-web/package.json new file mode 100644 index 0000000..618734d --- /dev/null +++ b/ui-web/package.json @@ -0,0 +1,22 @@ +{ + "name": "guess-market-web", + "private": true, + "version": "1.0.0", + "type": "module", + "scripts": { + "predev": "node -e \"const f='../ui-fx/src/main/resources/market/guess/ui/desktop/fonts', fs=require('fs'); fs.existsSync(f) && fs.cpSync(f, 'public/fonts', {recursive: true})\"", + "dev": "vite", + "check": "tsc --noEmit" + }, + "dependencies": { + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "devDependencies": { + "@types/react": "18.3.12", + "@types/react-dom": "18.3.1", + "@vitejs/plugin-react": "4.3.4", + "typescript": "5.6.3", + "vite": "5.4.11" + } +} diff --git a/ui-web/run-web.bat b/ui-web/run-web.bat new file mode 100644 index 0000000..c5f0658 --- /dev/null +++ b/ui-web/run-web.bat @@ -0,0 +1,10 @@ +@echo off +cd /d "%~dp0" +call npm install +if errorlevel 1 ( + echo npm install failed. Is Node.js installed and is there an internet connection? + pause + exit /b 1 +) +call npm run dev +pause diff --git a/ui-web/src/App.tsx b/ui-web/src/App.tsx new file mode 100644 index 0000000..204beae --- /dev/null +++ b/ui-web/src/App.tsx @@ -0,0 +1,502 @@ +import { FormEvent, ReactNode, useCallback, useEffect, useRef, useState } from 'react'; +import { + api, + ApiError, + ChatMessage, + CHEVRON, + EventDetail, + eventPath, + GLYPH, + Ledger, + MarketData, + money, + num, + optionTitle, + same, + Sync, +} from './api'; +import { Events } from './Events'; +import { MarketChart, Pinwheel } from './graphics'; +import { Users } from './Users'; + +export type Act = (work: () => Promise, done: string) => Promise; + +const SKINS = [ + ['rose-pine-dawn', 'Rosé Pine Dawn'], + ['catppuccin', 'Catppuccin'], + ['gruvbox', 'Gruvbox'], +]; + +function useSetting(key: string, initial: string): [string, (value: string) => void] { + const [value, setValue] = useState(() => { + try { + return localStorage.getItem(key) ?? initial; + } catch { + return initial; + } + }); + const set = (next: string) => { + setValue(next); + try { + localStorage.setItem(key, next); + } catch { + } + }; + return [value, set]; +} + +export function App() { + const [user, setUser] = useState(undefined); + const [notice, setNotice] = useState(null); + const [skin, setSkin] = useSetting('gm-skin', SKINS[0][0]); + const [animations, setAnimations] = useSetting('gm-animations', 'on'); + + useEffect(() => { + document.documentElement.dataset.skin = skin; + document.documentElement.classList.toggle('anim', animations === 'on'); + }, [skin, animations]); + + useEffect(() => { + api('/user/account') + .then((account) => setUser(account.owner)) + .catch(() => setUser(null)); + }, []); + + const leave = useCallback((why?: string) => { + setNotice(why ?? null); + setUser(null); + }, []); + + const controls = ( + <> + + + + ); + + if (user === undefined) return null; + if (user === null) return ; + return ; +} + +function Login({ notice, onLoggedIn }: { notice: string | null; onLoggedIn: (user: string) => void }) { + const [name, setName] = useState(''); + const [error, setError] = useState(notice); + const [busy, setBusy] = useState(false); + + async function submit(e: FormEvent) { + e.preventDefault(); + setBusy(true); + setError(null); + try { + const res = await api<{ username: string }>('/login', { username: name }); + onLoggedIn(res.username); + } catch (err) { + setError((err as Error).message); + setBusy(false); + } + } + + return ( +
+
+

Guess Market

+

Sign in to a market server

+ + setName(e.target.value)} /> + {error &&

{error}

} + +
+
+ ); +} + +function Market(props: { user: string; onLoggedOut: (why?: string) => void; controls: ReactNode }) { + const { user, onLoggedOut } = props; + const [data, setData] = useState(null); + const [tab, setTab] = useState<'events' | 'users'>('events'); + const [selectedKey, setSelectedKey] = useState(null); + const [dialog, setDialog] = useState<'deposit' | 'resolve' | null>(null); + const [offline, setOffline] = useState(false); + const [toast, setToast] = useState(null); + const refresh = useRef<() => Promise>(async () => {}); + + useEffect(() => { + let stopped = false; + let version = -1; + let timer: number | undefined; + + async function pull() { + const sync = await api(`/sync?since=${version}`); + if (!sync.changed) return; + const details = await Promise.all(sync.events.map((e) => api(eventPath(e.name)))); + if (stopped || sync.version < version) return; + version = sync.version; + setData({ + events: sync.events, + details: Object.fromEntries(details.map((d) => [d.summary.key, d])), + users: sync.users, + account: sync.account, + }); + } + + async function tick() { + try { + await pull(); + setOffline(false); + } catch (err) { + if (err instanceof ApiError && err.status === 401) { + stopped = true; + onLoggedOut('Your session ended. Please log in again.'); + } else { + setOffline(true); + } + } + } + + async function loop() { + await tick(); + if (!stopped) timer = window.setTimeout(loop, 1000); + } + + refresh.current = tick; + loop(); + return () => { + stopped = true; + window.clearTimeout(timer); + }; + }, [onLoggedOut]); + + useEffect(() => { + if (!toast) return; + const timer = window.setTimeout(() => setToast(null), 2500); + return () => window.clearTimeout(timer); + }, [toast]); + + const act: Act = useCallback(async (work, done) => { + try { + await work(); + setToast(done); + } catch (err) { + setToast((err as Error).message); + } + await refresh.current(); + }, []); + + async function logout() { + try { + await api('/logout', {}); + } catch { + } + onLoggedOut(); + } + + const selected = data?.events.find((e) => e.key === selectedKey) ?? data?.events[0]; + const detail = selected && data?.details[selected.key]; + + return ( +
+
Guess Market
+ +
+ +
+ {CHEVRON} + {window.location.host}/guess-market +
+ {props.controls} +
+ + {offline &&
Cannot reach the server. Retrying every second…
} + + {data === null || data.events.length === 0 ? ( +
+ +

{data === null ? 'Loading the market…' : 'No events yet'}

+ {data !== null && ( +

+ Events are uploaded from the desktop client. They appear here by themselves. +

+ )} +
+ ) : ( + <> +
+ + + + + acting as {user} + ACCOUNT BALANCE + + {money(data.account.balance)} + + +
+ + {/* key: a new element per tab, so the fade-in runs on every switch */} +
+ {tab === 'events' ? ( + setTab('users')} + onResolve={() => setDialog('resolve')} + /> + ) : ( + setDialog('deposit')} + /> + )} +
+ + )} + +
+ + {data === null + ? ` IDLE ${CHEVRON}` + : ` ${GLYPH.file} ${user} ${CHEVRON} ${GLYPH.bolt} ${data.events.length} events ${CHEVRON} ${GLYPH.users} ${data.users.length} users`} + + +
+ + {dialog === 'deposit' && ( + setDialog(null)} + onConfirm={(amount) => { + setDialog(null); + act(() => api('/user/deposit', { amount }), `Deposited ${money(amount)}`); + }} + /> + )} + {dialog === 'resolve' && detail && ( + setDialog(null)} + onConfirm={(i) => { + setDialog(null); + act( + () => api(eventPath(detail.summary.name) + '/resolve', { option: detail.state.markets[i].key }), + `Event resolved as ${detail.summary.optionNames[i]}`, + ); + }} + /> + )} + + {toast && ( +
+ {toast} +
+ )} +
+ ); +} + +function Chat({ user, onError }: { user: string; onError: (message: string) => void }) { + const [messages, setMessages] = useState([]); + const [open, setOpen] = useState(false); + const [unread, setUnread] = useState(0); + const [text, setText] = useState(''); + const openRef = useRef(open); + openRef.current = open; + const list = useRef(null); + + useEffect(() => { + let stopped = false; + let last = 0; + let timer: number | undefined; + async function loop() { + try { + const said = await api(`/chat?since=${last}`); + if (!stopped && said.length > 0) { + last = said[said.length - 1].id; + setMessages((m) => [...m, ...said]); + if (!openRef.current) setUnread((n) => n + said.length); + } + } catch { + } + if (!stopped) timer = window.setTimeout(loop, 1000); + } + loop(); + return () => { + stopped = true; + window.clearTimeout(timer); + }; + }, []); + + useEffect(() => { + if (list.current) list.current.scrollTop = list.current.scrollHeight; + }, [messages, open]); + + async function send(e: FormEvent) { + e.preventDefault(); + const line = text.trim(); + if (line === '') return; + setText(''); + try { + await api('/chat', { text: line.slice(0, 500) }); + } catch (err) { + onError((err as Error).message); + } + } + + return ( + <> + + {open && ( +
+

Chat

+
+ {messages.map((m) => ( +
+
+ {m.sender} {m.at} +
+
{m.text}
+
+ ))} +
+
+ setText(e.target.value)} + /> + +
+
+ )} + + ); +} + +function DepositDialog(props: { onCancel: () => void; onConfirm: (amount: string) => void }) { + const [amount, setAmount] = useState(''); + const valid = num(amount) > 0; + return ( +
+
{ + e.preventDefault(); + if (valid) props.onConfirm(amount.trim()); + }} + > +
Deposit funds
+
+ + setAmount(e.target.value)} + /> +
+
+ + +
+
+
+ ); +} + +function ResolveDialog(props: { detail: EventDetail; onCancel: () => void; onConfirm: (option: number) => void }) { + const [option, setOption] = useState(null); + const e = props.detail.summary; + return ( +
+
+
Close & resolve event
+
+

+ Pick the option the event ended with. The contract account is emptied to holders of the winning option; a + close-time fee is moved to the market maker. This cannot be undone. +

+
+ {[0, 1].map((i) => ( + + ))} +
+
+
+ + +
+
+
+ ); +} diff --git a/ui-web/src/Chart.tsx b/ui-web/src/Chart.tsx new file mode 100644 index 0000000..4caf3a5 --- /dev/null +++ b/ui-web/src/Chart.tsx @@ -0,0 +1,94 @@ +import { EventDetail, Ledger, num } from './api'; + +export type Point = [number, number]; + +const seconds = (at: string) => { + const t = Date.parse(at.replace(' ', 'T')); + return Number.isNaN(t) ? 0 : t / 1000; +}; +const now = () => Date.now() / 1000; +const clock = (t: number) => new Date(t * 1000).toTimeString().slice(0, 8); + +export function priceSeries(detail: EventDetail): Point[] { + const first = detail.summary.optionNames[0]; + const current = num(detail.state.markets[0]?.price) || 0.5; + const trades = [...detail.history].reverse(); + if (trades.length === 0) { + return [ + [now() - 60, current], + [now(), current], + ]; + } + const start = seconds(trades[0].at) || now(); + const points: Point[] = [[start - 60, 0.5]]; + for (const t of trades) { + const quantity = num(t.quantity); + const unit = quantity > 0 ? num(t.pricePaid) / quantity : current; + const price = t.optionName === first ? unit : 1 - unit; + points.push([seconds(t.at) || start, Math.max(0, Math.min(1, price))]); + } + return points; +} + +export function balanceSeries(ledger: Ledger): Point[] { + const rows = ledger.entries; + const balance = num(ledger.balance); + if (rows.length === 0) { + return [ + [now() - 60, balance], + [now(), balance], + ]; + } + const start = seconds(rows[0].at) || now(); + const points: Point[] = [[start - 60, Math.max(0, num(rows[0].balanceAfter) - num(rows[0].amount))]]; + for (const row of rows) { + points.push([seconds(row.at) || start, num(row.balanceAfter)]); + } + return points; +} + +const TICKS = [0, 1, 2, 3, 4]; + +export function LineChart(props: { + series: { points: Point[]; tone: 'accent' | 'yes' | 'no' }[]; + range?: [number, number]; + height?: number; +}) { + const all = props.series.flatMap((s) => s.points); + const t0 = Math.min(...all.map((p) => p[0])); + const t1 = Math.max(...all.map((p) => p[0]), t0 + 60); + let [lo, hi] = props.range ?? [Math.min(...all.map((p) => p[1]), 0), Math.max(...all.map((p) => p[1]))]; + if (hi <= lo) hi = lo + 1; + if (!props.range) hi = lo + Math.ceil(((hi - lo) * 1.1) / 4) * 4; // headroom, in four whole steps + + const x = (t: number) => ((t - t0) / (t1 - t0)) * 100; + const y = (v: number) => 100 - ((v - lo) / (hi - lo)) * 100; + const label = (v: number) => (hi - lo <= 1 ? v.toFixed(2).replace(/\.?0+$/, '') || '0' : Math.round(v).toLocaleString()); + + return ( +
+
+ {TICKS.map((i) => ( + {label(hi - ((hi - lo) * i) / 4)} + ))} +
+ + {TICKS.map((i) => ( + + ))} + {props.series.map((s, i) => ( + `${j ? 'L' : 'M'}${x(p[0]).toFixed(2)} ${y(p[1]).toFixed(2)}`).join(' ')} + /> + ))} + +
+ {TICKS.map((i) => ( + {clock(t0 + ((t1 - t0) * i) / 4)} + ))} +
+
+ ); +} diff --git a/ui-web/src/Events.tsx b/ui-web/src/Events.tsx new file mode 100644 index 0000000..e33b4e2 --- /dev/null +++ b/ui-web/src/Events.tsx @@ -0,0 +1,370 @@ +import { useState } from 'react'; +import { + api, + EventDetail, + eventPath, + EventSummary, + feeLabel, + FeeTiming, + MarketData, + Mechanism, + mechanismLabel, + money, + num, + OrderBook, + same, + SEP, + Status, +} from './api'; +import type { Act } from './App'; +import { LineChart, priceSeries } from './Chart'; +import { Equalizer } from './graphics'; + +const STATUS_PILL: Record = { + DRAFT: ['', 'IDLE'], + ACTIVE: ['active', 'ACTIVE'], + SETTLED: ['closed', 'CLOSED'], +}; + +function Filter(props: { + label: string; + value: T | null; + options: [T, string][]; + onChange: (value: T | null) => void; +}) { + return ( +
+ {props.label} + + {props.options.map(([value, text]) => ( + + ))} +
+ ); +} + +export function Events(props: { + data: MarketData; + user: string; + selected: EventSummary | undefined; + onSelect: (key: string) => void; + act: Act; + onTrade: () => void; + onResolve: () => void; +}) { + const { data, selected } = props; + const [method, setMethod] = useState(null); + const [status, setStatus] = useState(null); + const [fee, setFee] = useState(null); + + const shown = data.events.filter( + (e) => + (method === null || e.mechanism === method) && + (status === null || e.status === status) && + (fee === null || e.commissionTiming === fee), + ); + const detail = selected && data.details[selected.key]; + + return ( + <> +
+ + + +
+ {shown.map((e) => ( + + ))} +
+ + {shown.length} of {data.events.length} events shown + +
+ + {detail ? ( + + ) : ( +
+ )} + + ); +} + +function EventView(props: { detail: EventDetail; user: string; act: Act; onTrade: () => void; onResolve: () => void }) { + const { detail, user, act } = props; + const e = detail.summary; + const markets = detail.state.markets; + const isMm = same(e.marketMaker, user); + const live = e.status === 'ACTIVE' ? 'LIVE' : e.status === 'SETTLED' ? 'ENDED' : 'IDLE'; + const yes = priceSeries(detail); + + return ( +
+
+
+
+

+ {e.displayId}. {e.name} +

+

+ {e.description} +

+
+ {/* Open = go trade on an active event, or the Market Maker starting their own */} + {e.status === 'ACTIVE' && ( + + )} + {e.status === 'DRAFT' && isMm && ( + + )} + {e.status === 'ACTIVE' && isMm && ( + + )} +
+
+ + + {live} + + + Method {mechanismLabel(e.mechanism)} + + + Status {e.status} + + + Market Maker {e.marketMaker} + + + Fee {feeLabel(e)} + + + Contract {money(e.accountBalance)} + +
+
+ +
+ {e.status === 'SETTLED' && ( +
+ RESOLVED + + Winning option: {detail.settledMarket} {SEP} contract emptied to its holders + +
+ )} + + {e.mechanism === 'LMSR' ? ( + <> +
+ {markets.map((m, i) => ( +
+
+ + {i === 0 ? 'YES' : 'NO'} {m.name} + + + {money(m.price)} + +
+
+ +
+ + {m.volume} shares {SEP} p = {num(m.price).toFixed(2)} + +
+ ))} +
+
+
+ Share price over time + + YES / NO {SEP} LMSR + +
+ [t, 1 - v]), tone: 'no' }, + ]} + /> +
+ + ) : ( + <> +
+ {detail.orderBooks.map((book, i) => ( + + ))} +
+
+
+ Last trade price over time + + last trade YES + +
+ +
+ + )} + +
+
+ Trade history newest first +
+
+
+ # + User + Option + Shares + Paid +
+ {detail.history.map((t, i) => ( +
+ #{detail.history.length - i} + {t.userName} + + {t.optionName} + + {t.quantity} shares + {money(t.pricePaid)} +
+ ))} + {detail.history.length === 0 &&
No trades yet
} +
+
+ +
+
Participants
+
+
+ User + YES + NO + Value + Fees paid +
+ {detail.participants.map((p) => ( +
+ + {p.user} + {p.tag && ` (${p.tag})`} + + {p.yes} + {p.no} + {p.value} + {p.fees} +
+ ))} + {detail.participants.length === 0 &&
Nobody yet
} +
+
+
+
+ ); +} + +function Book({ book, last, side }: { book: OrderBook; last: string | undefined; side: string }) { + const mid = book.bestBid && book.bestAsk ? money((num(book.bestBid) + num(book.bestAsk)) / 2) : '—'; + return ( +
+
+ {side} Order Book + {book.optionName} + {book.orders.length} orders +
+
+ {[ + ['Last', money(last)], + ['Best bid', book.bestBid ?? '—'], + ['Best ask', book.bestAsk ?? '—'], + ['Mid', mid], + ['Spread', book.spread ?? '—'], + ].map(([label, value]) => ( + + {label} + {value} + + ))} +
+
+ Price + Side + Qty + User +
+ {book.orders.map((o, i) => ( +
+ {o.price} + {o.side} + {o.quantity} + {o.user} +
+ ))} + {book.orders.length === 0 &&
No resting orders
} +
+ ); +} diff --git a/ui-web/src/Users.tsx b/ui-web/src/Users.tsx new file mode 100644 index 0000000..b2593d9 --- /dev/null +++ b/ui-web/src/Users.tsx @@ -0,0 +1,298 @@ +import { useState } from 'react'; +import { api, EventSummary, feeLabel, MarketData, mechanismLabel, money, num, same, SEP } from './api'; +import type { Act } from './App'; +import { balanceSeries, LineChart } from './Chart'; +import { Sparkline } from './graphics'; + +export function Users(props: { + data: MarketData; + user: string; + selected: EventSummary | undefined; + onSelect: (key: string) => void; + act: Act; + onDeposit: () => void; +}) { + const { data, user, selected } = props; + const account = data.account; + const balance = num(account.balance); + + const myEvents = data.events.flatMap((e) => { + const me = data.details[e.key]?.participants.find((p) => same(p.user, user)); + const owner = same(e.marketMaker, user); + return owner || (me && (me.yes > 0 || me.no > 0)) ? [{ e, me, owner }] : []; + }); + const isMm = myEvents.some((row) => row.owner); + + return ( + <> +
+
+ User + Balance +
+ {/* A directory of everyone on the server; you can only ever act as yourself */} +
+ {data.users.map((u) => { + const me = same(u.username, user); + return ( +
+ + + {u.username} + + + {u.marketMaker ? 'Market Maker' : 'Trader'} + {me ? ' (you)' : u.online ? '' : ' · offline'} + + + {money(u.balance)} +
+ ); + })} +
+ +
+ +
+
+
+
+

{user}

+ + {account.blocked ? 'BLOCKED' : isMm ? 'MARKET MAKER' : 'TRADER'} + +
+

Active in {myEvents.length} events

+
+ +
+
Balance
+
{money(account.balance)}
+
+
+ +
+ {account.blocked && ( +
+ BLOCKED + + This account reached a negative balance. All trading actions are disabled until you deposit enough + funds to bring it back above zero. + +
+ )} + +
+
+ Account balance over time + + every trade, fee and payout + +
+ +
+ +
+
Events participation / owner
+
+
+ Event + Role + Type + YES + NO + P/L +
+ {myEvents.map(({ e, me, owner }) => { + const pnl = e.status === 'SETTLED' ? (me?.pnl ?? '$0.00') : '—'; + return ( +
props.onSelect(e.key)} + > + {e.name} + {owner ? 'Market Maker' : 'Trader'} + {mechanismLabel(e.mechanism)} + {me?.yes ?? 0} + {me?.no ?? 0} + {pnl} +
+ ); + })} + {myEvents.length === 0 &&
You are not part of any event yet
} +
+
+ + {/* key: a different event starts with a fresh form */} + {selected ? ( + + ) : ( +
+ Select an event to trade. +
+ )} + +
+
+ Account activity + + newest first + +
+
+
+ Time + Type + Details + Amount + Balance +
+ {/* seq is not unique across entries, so the position is the key */} + {[...account.entries].reverse().map((row, i) => ( +
+ {row.at} + {row.type} + {row.note} + {row.amount} + {row.balanceAfter} +
+ ))} + {account.entries.length === 0 && ( +
Nothing yet. Deposit funds to start trading.
+ )} +
+
+
+
+ + ); +} + +function TradePanel(props: { data: MarketData; user: string; act: Act; event: EventSummary }) { + const { data, user, event: e } = props; + const detail = data.details[e.key]; + const markets = detail?.state.markets ?? []; + const me = detail?.participants.find((p) => same(p.user, user)); + const held = [me?.yes ?? 0, me?.no ?? 0]; + const isBook = e.mechanism === 'ORDER_BOOK'; + + const [option, setOption] = useState(0); + const [side, setSide] = useState<'BUY' | 'SELL'>('BUY'); + const [quantity, setQuantity] = useState('50'); + const [price, setPrice] = useState('0.62'); + + const qty = Number(quantity); + const qtyOk = Number.isInteger(qty) && qty > 0; + const unit = isBook ? Number(price) : num(markets[option]?.price); + const priceOk = unit > 0; + const cost = qty * unit; + + let hint: string; + let allowed = false; + if (!qtyOk) hint = 'Shares must be a positive whole number.'; + else if (!priceOk) hint = 'Price per share must be positive.'; + else if (data.account.blocked) hint = 'Trading is disabled because this account is blocked.'; + else if (e.status !== 'ACTIVE') hint = 'Trading is only available for ACTIVE events.'; + else if (side === 'SELL' && !same(e.marketMaker, user) && qty > held[option]) + hint = `Cannot sell ${qty} shares; you only hold ${held[option]}.`; + else if (side === 'BUY' && num(data.account.balance) < cost) + hint = `Insufficient balance. Required: ${money(cost)}, available: ${money(data.account.balance)}`; + else { + allowed = true; + hint = + side === 'SELL' + ? 'Sell order will match existing bids or rest as an ask.' + : isBook + ? 'Buy order will match existing asks or rest as a bid.' + : 'Orders execute immediately against the market maker.'; + } + + const submit = () => + props.act( + () => + api('/orders', { + event: e.name, + option: markets[option].key, + side, + price: isBook ? price.trim() : markets[option].price, + quantity: String(qty), + }), + `Order placed ${SEP} ${side === 'BUY' ? 'Bought' : 'Sold'} ${qty} ${e.optionNames[option]}`, + ); + + return ( +
+
+ + {e.displayId}. {e.name} + + + {mechanismLabel(e.mechanism)} {SEP} Status: {e.status} {SEP} Fee: {feeLabel(e)} + +
+
+ {markets.map((m, i) => ( + + ))} +
+
+ + + {isBook && ( + + )} + + +
+ {hint} +
+ ); +} diff --git a/ui-web/src/api.ts b/ui-web/src/api.ts new file mode 100644 index 0000000..2ce1a8d --- /dev/null +++ b/ui-web/src/api.ts @@ -0,0 +1,176 @@ + +export type Mechanism = 'LMSR' | 'ORDER_BOOK'; +export type Status = 'DRAFT' | 'ACTIVE' | 'SETTLED'; +export type FeeTiming = 'ON_PURCHASE' | 'ON_CLOSE'; + +export interface EventSummary { + key: string; + displayId: number; + name: string; + description: string; + commissionPercent: number; + commissionTiming: FeeTiming; + mechanism: Mechanism; + status: Status; + optionNames: string[]; + accountBalance: string; + marketMaker: string; +} + +export interface Market { + key: string; + name: string; + price: string; + volume: string; +} + +export interface BookOrder { + side: string; + user: string; + quantity: number; + price: string; + isBid: boolean; +} + +export interface OrderBook { + optionKey: string; + optionName: string; + bestBid: string | null; + bestAsk: string | null; + spread: string | null; + orders: BookOrder[]; +} + +export interface TradeRow { + at: string; + userName: string; + optionName: string; + quantity: string; + pricePaid: string; +} + +export interface Participant { + user: string; + tag: string; + yes: number; + no: number; + value: string; + fees: string; + pnl: string; +} + +export interface EventDetail { + summary: EventSummary; + state: { markets: Market[]; accountBalance: string; commissionCollected: string }; + history: TradeRow[]; + settledMarket: string; + orderBooks: OrderBook[]; + participants: Participant[]; +} + +export interface LedgerEntry { + seq: number; + at: string; + type: string; + amount: string; + balanceAfter: string; + note: string; +} + +export interface Ledger { + owner: string; + balance: string; + blocked: boolean; + entries: LedgerEntry[]; +} + +export interface UserSummary { + username: string; + balance: string; + marketMaker: boolean; + online: boolean; +} + +export interface Sync { + changed: boolean; + version: number; + events: EventSummary[]; + users: UserSummary[]; + account: Ledger; +} + +export interface ChatMessage { + id: number; + at: string; + sender: string; + text: string; +} + +export interface MarketData { + events: EventSummary[]; + details: Record; + users: UserSummary[]; + account: Ledger; +} + +export class ApiError extends Error { + constructor( + public status: number, + message: string, + ) { + super(message); + } +} + +const BASE = '/guess-market/api'; +const UNREACHABLE = 'Cannot reach the server. Is Tomcat running on port 8080?'; + +export async function api(path: string, form?: Record): Promise { + let res: Response; + try { + res = await fetch( + BASE + path, + form ? { method: 'POST', body: new URLSearchParams(form) } : undefined, + ); + } catch { + throw new ApiError(0, UNREACHABLE); + } + const text = await res.text(); + let body: any = null; + try { + body = text ? JSON.parse(text) : null; + } catch { + } + if (!res.ok) { + throw new ApiError(res.status, body?.message ?? (res.status >= 500 ? UNREACHABLE : `The server answered ${res.status}.`)); + } + return body as T; +} + +export const eventPath = (name: string) => '/events/' + encodeURIComponent(name); + +export function num(value: string | number | null | undefined): number { + const n = typeof value === 'number' ? value : Number(String(value ?? '').replace(/[$,]/g, '')); + return Number.isNaN(n) ? 0 : n; +} + +export const same = (a: string, b: string) => a.toLowerCase() === b.toLowerCase(); + +export function money(value: string | number | null | undefined): string { + if (value === null || value === undefined || value === '') return '—'; + const n = typeof value === 'number' ? value : Number(String(value).replace(/[$,]/g, '')); + if (Number.isNaN(n)) return String(value); + return (n < 0 ? '-$' : '$') + Math.abs(n).toFixed(2); +} + +export const mechanismLabel = (m: Mechanism) => (m === 'LMSR' ? 'LMSR' : 'Order Book'); + +export const CHEVRON = '\ue0b1'; +export const SEP = '\ueb04'; + +export const optionTitle = (e: EventSummary, i: number) => `${i === 0 ? 'YES' : 'NO'} ${SEP} ${e.optionNames[i]}`; + +export const feeLabel = (e: EventSummary) => + `${e.commissionPercent}% ${e.commissionTiming === 'ON_PURCHASE' ? 'on purchase' : 'on close'}`; + +export const GLYPH = { file: '\uf15b', bolt: '\uf0e7', users: '\uf0c0', chat: '\u{f0b79}' }; diff --git a/ui-web/src/graphics.tsx b/ui-web/src/graphics.tsx new file mode 100644 index 0000000..2d452df --- /dev/null +++ b/ui-web/src/graphics.tsx @@ -0,0 +1,51 @@ + +export function Equalizer() { + return ( + + ); +} + +export function Sparkline({ negative }: { negative: boolean }) { + return ( + + ); +} + +export function MarketChart() { + return ( + + ); +} + +export function Pinwheel() { + return ( + + ); +} diff --git a/ui-web/src/main.tsx b/ui-web/src/main.tsx new file mode 100644 index 0000000..ed3b67f --- /dev/null +++ b/ui-web/src/main.tsx @@ -0,0 +1,10 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import { App } from './App'; +import './styles.css'; + +createRoot(document.getElementById('root')!).render( + + + , +); diff --git a/ui-web/src/styles.css b/ui-web/src/styles.css new file mode 100644 index 0000000..028e2d2 --- /dev/null +++ b/ui-web/src/styles.css @@ -0,0 +1,1068 @@ + +@font-face { + font-family: 'CaskaydiaCove NF'; + src: url('/fonts/CaskaydiaCoveNerdFont-Regular.ttf'); +} +@font-face { + font-family: 'CaskaydiaCove NF'; + font-weight: bold; + src: url('/fonts/CaskaydiaCoveNerdFont-Bold.ttf'); +} +@font-face { + font-family: 'JetBrainsMono NF'; + src: url('/fonts/JetBrainsMonoNerdFont-Regular.ttf'); +} +@font-face { + font-family: 'JetBrainsMono NF'; + font-weight: bold; + src: url('/fonts/JetBrainsMonoNerdFont-Bold.ttf'); +} +@font-face { + font-family: 'FiraCode Nerd Font'; + src: url('/fonts/FiraCodeNerdFont-Regular.ttf'); +} +@font-face { + font-family: 'FiraCode Nerd Font'; + font-weight: bold; + src: url('/fonts/FiraCodeNerdFont-Bold.ttf'); +} + +:root, +:root[data-skin='rose-pine-dawn'] { + --font: 'CaskaydiaCove NF', Consolas, monospace; + --size: 13px; + --bg: #faf4ed; + --panel: #fffaf3; + --panel2: #f2e9e1; + --panel3: #dfdad9; + --line: #cecacd; + --ink: #575279; + --ink2: #797593; + --accent: #907aa9; + --accent-fg: #fffaf3; + --btn: #f2e9e1; + --btn-line: #cecacd; + --yes: #286983; + --no: #b4637a; + --yes-soft: #e3edf0; + --no-soft: #f5e6ea; +} + +:root[data-skin='catppuccin'] { + --font: 'JetBrainsMono NF', Consolas, monospace; + --bg: #181825; + --panel: #1e1e2e; + --panel2: #313244; + --panel3: #45475a; + --line: #585b70; + --ink: #cdd6f4; + --ink2: #a6adc8; + --accent: #cba6f7; + --accent-fg: #1e1e2e; + --btn: #313244; + --btn-line: #585b70; + --yes: #a6e3a1; + --no: #f38ba8; + --yes-soft: #23312a; + --no-soft: #34232c; +} + +:root[data-skin='gruvbox'] { + --font: 'FiraCode Nerd Font', Consolas, monospace; + --size: 13.5px; + --bg: #1d2021; + --panel: #282828; + --panel2: #3c3836; + --panel3: #504945; + --line: #665c54; + --ink: #ebdbb2; + --ink2: #a89984; + --accent: #fe8019; + --accent-fg: #1d2021; + --btn: #3c3836; + --btn-line: #665c54; + --yes: #b8bb26; + --no: #fb4934; + --yes-soft: #2b3021; + --no-soft: #3b2320; +} + + box-sizing: border-box; +} +html, +body, + height: 100%; +} +body { + margin: 0; + background: var(--bg); + color: var(--ink); + font: var(--size) / 1.35 var(--font); +} +h1, +h2, +h3, +p { + margin: 0; + font-weight: inherit; +} + +.ink2 { + color: var(--ink2); +} +.accent { + color: var(--accent); +} +.yes { + color: var(--yes); +} +.no { + color: var(--no); +} +.bold { + font-weight: 700; +} +.xs { + font-size: 10.5px; +} +.sm { + font-size: 11.5px; +} +.base { + font-size: 12.5px; +} +.lg { + font-size: 14px; +} +.xl { + font-size: 17px; +} +.grow { + flex: 1; + min-width: 0; +} +.ellipsis { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.row { + display: flex; + align-items: center; + gap: 8px; +} +.num { + text-align: right; + white-space: nowrap; +} + +button, +input, +select { + font: inherit; + color: inherit; +} +button { + cursor: pointer; +} +button:disabled { + opacity: 0.45; + cursor: default; +} +:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 1px; +} +.btn { + border: 1px solid var(--btn-line); + border-radius: 5px; + background: var(--btn); + font-size: 13px; + font-weight: 700; + padding: 8px 15px; + white-space: nowrap; +} +.btn:hover:not(:disabled) { + opacity: 0.92; +} +.btn.primary { + background: var(--accent); + border-color: var(--accent); + color: var(--accent-fg); +} +.btn.destructive { + background: var(--no); + border-color: var(--no); + color: var(--accent-fg); +} +.btn.icon { + padding: 4px 8px; + min-width: 34px; + height: 30px; + display: grid; + place-items: center; +} +.btn.icon.on { + background: var(--panel3); + border-color: var(--accent); +} +.toggle { + border: 1px solid var(--btn-line); + border-radius: 4px; + background: var(--btn); + color: var(--ink2); + font-size: 12px; + padding: 5px 11px; +} +.toggle.on { + background: var(--accent); + border-color: var(--accent); + color: var(--accent-fg); +} +.seg { + border: 1px solid var(--btn-line); + background: var(--btn); + font-size: 12px; + font-weight: 700; + padding: 8px 15px; +} +.seg:first-child { + border-radius: 5px 0 0 5px; +} +.seg:last-child { + border-radius: 0 5px 5px 0; + border-left: 0; +} +.seg.on { + background: var(--accent); + color: var(--accent-fg); +} +.field { + background: var(--panel2); + border: 1px solid var(--btn-line); + border-radius: 5px; + padding: 8px 10px; + font-size: 13px; + color: var(--ink); + width: 96px; +} +.field.bad { + border-color: var(--no); + border-width: 1.5px; +} +.select { + background: var(--btn); + border: 1px solid var(--btn-line); + border-radius: 5px; + padding: 6px 8px; + font-size: 12.5px; +} + +.pill { + display: inline-flex; + align-items: center; + gap: 7px; + border-radius: 3px; + padding: 3px 6px; + font-size: 10px; + font-weight: 700; + background: var(--panel3); + color: var(--ink2); + white-space: nowrap; +} +.pill.active { + background: var(--yes-soft); + color: var(--yes); +} +.pill.closed { + background: var(--no-soft); + color: var(--no); +} +.pill.mm { + background: var(--accent); + color: var(--accent-fg); +} +.pill.blocked { + background: var(--no); + color: var(--accent-fg); +} +.pill.resolved { + background: var(--yes); + color: var(--accent-fg); +} + +.card { + background: var(--panel); + border: 1px solid var(--line); + border-radius: 7px; +} +.card2 { + background: var(--panel2); + border: 1px solid var(--line); + border-radius: 6px; +} +.table { + background: var(--panel); + border: 1px solid var(--line); + border-radius: 6px; + overflow: hidden; +} +.thead, +.trow { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 11px; +} +.thead { + background: var(--panel3); + color: var(--ink2); + font-size: 10.5px; + font-weight: 700; +} +.trow { + border-top: 1px solid var(--line); + font-size: 11.5px; +} +.trow.click { + cursor: pointer; +} +.trow.click:hover { + background: var(--panel2); +} +.trow.on { + background: var(--panel3); +} +.trow.bid { + background: var(--yes-soft); +} +.trow.ask { + background: var(--no-soft); +} +.w54 { + width: 54px; +} +.w66 { + width: 66px; +} +.w78 { + width: 78px; +} +.w92 { + width: 92px; +} +.w150 { + width: 150px; +} + +.app { + display: flex; + flex-direction: column; + height: 100%; + min-width: 1040px; +} +.windowbar { + display: flex; + align-items: center; + gap: 10px; + height: 32px; + padding: 0 14px; + background: var(--panel2); + border-bottom: 1px solid var(--line); + font-size: 12.5px; + font-weight: 700; + color: var(--ink2); +} +.toolbar { + display: flex; + align-items: center; + gap: 12px; + padding: 12px 16px; + background: var(--panel); + border-bottom: 1px solid var(--line); +} +.path { + display: flex; + align-items: center; + gap: 10px; + padding: 8px 12px; + font-size: 12.5px; +} +.tabs { + display: flex; + align-items: flex-end; + gap: 2px; + padding: 6px 16px 0; + background: var(--panel); + border-bottom: 1px solid var(--line); +} +.tab { + border: 1px solid var(--line); + border-bottom: 0; + border-radius: 6px 6px 0 0; + background: var(--panel2); + color: var(--ink2); + font-size: 13px; + font-weight: 700; + padding: 9px 20px; + margin-bottom: -1px; +} +.tab.on { + background: var(--bg); + color: var(--ink); +} +.tabinfo { + display: flex; + align-items: center; + gap: 8px; + padding: 0 4px 8px; + font-size: 12.5px; + color: var(--ink2); +} +.content { + flex: 1; + min-height: 0; + display: flex; + gap: 12px; + padding: 12px 16px; +} +.statusbar { + display: flex; + align-items: center; + height: 30px; + padding: 0 14px; + background: var(--panel2); + border-top: 1px solid var(--line); + font-size: 11.5px; + color: var(--ink2); + white-space: pre; +} +.chatbtn { + border: 0; + background: none; + padding: 0 2px; + color: var(--ink2); + font-size: 14.5px; + cursor: pointer; +} +.chatbtn.on { + color: var(--accent); +} +.chat { + position: fixed; + right: 14px; + bottom: 31px; + width: 320px; + height: 380px; + display: flex; + flex-direction: column; + gap: 8px; + padding: 12px; + white-space: normal; + color: var(--ink); + box-shadow: 0 4px 18px rgb(0 0 0 / 0.3); + z-index: 2; +} +.chatlist { + flex: 1; + min-height: 0; + overflow-y: auto; + display: flex; + flex-direction: column; + gap: 9px; + overflow-wrap: anywhere; +} +.banner { + padding: 8px 16px; + font-weight: 700; + background: var(--no-soft); + color: var(--no); + border-bottom: 1px solid var(--no); +} +.toast { + position: fixed; + left: 50%; + bottom: 44px; + transform: translateX(-50%); + max-width: 90vw; + background: var(--ink); + color: var(--bg); + border-radius: 6px; + padding: 10px 16px; + font-size: 12.5px; + font-weight: 700; + z-index: 3; +} +.empty { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 14px; + text-align: center; +} + +.side { + display: flex; + flex-direction: column; + gap: 6px; + padding: 12px; +} +.side.events { + width: 498px; +} +.side.users { + width: 274px; +} +.main { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; +} +.head { + display: flex; + align-items: flex-start; + gap: 14px; + padding: 14px 16px; + border-bottom: 1px solid var(--line); +} +.body { + flex: 1; + min-height: 0; + overflow-y: auto; + display: flex; + flex-direction: column; + gap: 14px; + padding: 14px 16px; +} +.body > * { + flex-shrink: 0; +} +.section { + display: flex; + flex-direction: column; + gap: 7px; +} +.section-title { + display: flex; + align-items: baseline; + gap: 8px; + font-size: 12.5px; + font-weight: 700; +} +.filter { + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 4px; +} +.filter > span { + width: 74px; + font-size: 12.5px; + color: var(--ink2); +} +.list { + flex: 1; + min-height: 0; + overflow-y: auto; + display: flex; + flex-direction: column; + gap: 2px; +} +.listrow { + display: flex; + align-items: center; + gap: 8px; + width: 100%; + text-align: left; + background: transparent; + border: 0; + border-left: 3px solid transparent; + border-radius: 5px; + padding: 9px 11px; +} +.listrow:hover { + background: var(--panel2); +} +.listrow.on { + background: var(--panel3); + border-left-color: var(--accent); +} +.listrow.plain { + cursor: default; +} +.meta { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 4px 16px; + font-size: 12.5px; +} +.meta b { + font-weight: 700; +} +.pair { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 10px; +} +.optcard { + border: 1px solid var(--line); + border-radius: 6px; + padding: 12px 14px; + display: flex; + flex-direction: column; + gap: 8px; +} +.optcard.yes { + background: var(--yes-soft); +} +.optcard.no { + background: var(--no-soft); +} +.optcard.pick { + background: var(--panel); + cursor: pointer; + text-align: left; + color: var(--ink); + padding: 10px 12px; + gap: 6px; +} +.optcard.pick.yes.on { + background: var(--yes-soft); + border: 1.5px solid var(--yes); +} +.optcard.pick.no.on { + background: var(--no-soft); + border: 1.5px solid var(--no); +} +.bar { + height: 6px; + border-radius: 3px; + background: var(--panel3); + overflow: hidden; +} +.bar i { + display: block; + height: 100%; + border-radius: 3px; + background: currentColor; + transition: width 0.3s; +} +.stats { + display: flex; + gap: 16px; + padding: 8px 11px; + font-size: 11.5px; +} +.stats span { + display: flex; + flex-direction: column; + gap: 2px; +} +.tradeform { + display: flex; + flex-wrap: wrap; + align-items: flex-end; + gap: 10px; +} +.tradeform label { + display: flex; + flex-direction: column; + gap: 5px; + font-size: 12.5px; + color: var(--ink2); +} +.balance { + font-size: 22px; + font-weight: 700; + color: var(--accent); +} +.balance.neg, +.neg { + color: var(--no); +} +.balcell { + font-weight: 700; + color: var(--accent); +} +.pnl { + font-size: 12px; + font-weight: 700; + color: var(--yes); +} +.notice { + display: flex; + align-items: center; + gap: 11px; + padding: 11px 13px; + border-radius: 6px; + border: 1px solid var(--line); + background: var(--yes-soft); + font-size: 12.5px; +} +.notice.blocked { + background: var(--no-soft); + border-color: var(--no); +} + +.chart { + display: grid; + grid-template-columns: auto 1fr; + gap: 4px 6px; + padding: 10px; + font-size: 10px; + color: var(--ink2); +} +.chart .yaxis { + display: flex; + flex-direction: column; + justify-content: space-between; + text-align: right; + border-right: 1px solid var(--line); + padding-right: 6px; + line-height: 1; +} +.chart .xaxis { + grid-column: 2; + display: flex; + justify-content: space-between; + border-top: 1px solid var(--line); + padding-top: 4px; +} +.chart svg { + width: 100%; + display: block; +} +.chart .grid { + stroke: var(--line); + stroke-width: 1; + opacity: 0.6; +} +.chart path { + fill: none; + stroke-width: 2.5; + stroke-linejoin: round; + vector-effect: non-scaling-stroke; +} +.chart line { + vector-effect: non-scaling-stroke; +} +.stroke-accent { + stroke: var(--accent); +} +.stroke-yes { + stroke: var(--yes); +} +.stroke-no { + stroke: var(--no); +} + +.scrim { + position: fixed; + inset: 0; + display: grid; + place-items: center; + background: rgba(10, 10, 10, 0.42); + z-index: 2; +} +.dialog { + width: 430px; + max-width: calc(100vw - 32px); +} +.dialog > header { + padding: 16px 20px; + border-bottom: 1px solid var(--line); + font-size: 14px; + font-weight: 700; +} +.dialog > div { + display: flex; + flex-direction: column; + gap: 10px; + padding: 18px 20px; +} +.dialog > footer { + display: flex; + justify-content: flex-end; + gap: 9px; + padding: 14px 20px; + border-top: 1px solid var(--line); +} +.resolveopt { + flex: 1; + border: 1px solid var(--line); + border-radius: 6px; + background: var(--panel2); + font-size: 14px; + font-weight: 700; + padding: 14px 6px; +} +.resolveopt.yes.on { + background: var(--yes-soft); + border: 1.5px solid var(--yes); +} +.resolveopt.no.on { + background: var(--no-soft); + border: 1.5px solid var(--no); +} + +.login { + height: 100%; + display: grid; + place-items: center; + padding: 24px; +} +.login form { + width: 380px; + max-width: 100%; + display: flex; + flex-direction: column; + gap: 8px; + padding: 20px 22px; +} +.login .field { + width: 100%; +} + +.eq rect { + fill: var(--ink2); + transform-box: fill-box; + transform-origin: bottom; +} +.pill.active .eq rect { + fill: var(--yes); +} +.pill.closed .eq rect { + fill: var(--no); +} +.eq .b0 { + transform: scaleY(0.35); +} +.eq .b1 { + transform: scaleY(0.8); +} +.eq .b2 { + transform: scaleY(0.55); +} +.anim .eq .b0 { + animation: eq0 3.6s linear infinite; +} +.anim .eq .b1 { + animation: eq1 3.6s linear infinite; +} +.anim .eq .b2 { + animation: eq2 3.6s linear infinite; +} +@keyframes eq0 { + 0%, + 100% { + transform: scaleY(0.35); + } + 30% { + transform: scaleY(1); + } + 60% { + transform: scaleY(0.6); + } +} +@keyframes eq1 { + 0%, + 100% { + transform: scaleY(0.8); + } + 25% { + transform: scaleY(0.3); + } + 70% { + transform: scaleY(1); + } +} +@keyframes eq2 { + 0%, + 100% { + transform: scaleY(0.55); + } + 45% { + transform: scaleY(1); + } + 80% { + transform: scaleY(0.4); + } +} + +.draw { + fill: none; + stroke-linecap: round; + stroke-linejoin: round; + stroke-dasharray: 100; + stroke-dashoffset: 0; +} +.rider { + offset-rotate: 0deg; + offset-distance: 100%; +} +.spark .draw { + stroke: var(--accent); + stroke-width: 2; +} +.spark .rider { + fill: var(--accent); + offset-path: path('M2 20 L14 16 L26 22 L38 11 L50 14 L62 5'); +} +.spark.neg .draw { + stroke: var(--no); +} +.spark.neg .rider { + fill: var(--no); +} +.anim .spark .draw { + animation: draw70 3.6s infinite; +} +.anim .spark .rider { + animation: + ride70 3.6s infinite, + appear 3.6s linear infinite; +} +@keyframes draw70 { + 0% { + stroke-dashoffset: 100; + animation-timing-function: ease-in-out; + } + 70%, + 100% { + stroke-dashoffset: 0; + } +} +@keyframes ride70 { + 0% { + offset-distance: 0%; + animation-timing-function: ease-in-out; + } + 70%, + 100% { + offset-distance: 100%; + } +} +@keyframes appear { + 0% { + opacity: 0; + } + 8%, + 100% { + opacity: 1; + } +} + +.mchart .rule { + stroke: var(--line); +} +.mchart text { + fill: var(--ink2); + font-size: 9px; + opacity: 0.7; +} +.mchart .draw { + stroke-width: 2.5; +} +.mchart .y { + stroke: var(--yes); +} +.mchart .n { + stroke: var(--no); +} +.mchart .rider.y { + fill: var(--yes); + stroke: none; + offset-path: path('M22 66 C96 64 150 22 224 22'); +} +.mchart .rider.n { + fill: var(--no); + stroke: none; + offset-path: path('M22 66 C96 68 150 110 224 110'); +} +.anim .mchart .draw { + animation: draw55 3.6s infinite; +} +.anim .mchart .rider { + animation: + ride55 3.6s infinite, + appear 3.6s linear infinite; +} +.anim .mchart text { + animation: breathe 3.6s linear infinite; +} +.anim .mchart text.lo { + animation-delay: -3.2s; +} +@keyframes draw55 { + 0% { + stroke-dashoffset: 100; + animation-timing-function: ease-in-out; + } + 55%, + 100% { + stroke-dashoffset: 0; + } +} +@keyframes ride55 { + 0% { + offset-distance: 0%; + animation-timing-function: ease-in-out; + } + 55%, + 100% { + offset-distance: 100%; + } +} +@keyframes breathe { + 0%, + 100% { + opacity: 0.25; + } + 50% { + opacity: 0.7; + } +} + +.pinwheel path { + fill: var(--ink2); +} +.pinwheel circle { + fill: var(--panel); + stroke: var(--ink2); +} +.btn.icon.on .pinwheel path { + fill: var(--accent); +} +.btn.icon.on .pinwheel circle { + stroke: var(--accent); +} +.pinwheel g { + transform-origin: 10px 10px; +} +.anim .pinwheel g { + animation: spin 2.4s linear infinite; +} +@keyframes spin { + to { + transform: rotate(360deg); + } +} + +.anim .fade { + animation: fade 0.5s; +} +@keyframes fade { + from { + opacity: 0; + } +} + +@media (prefers-reduced-motion: reduce) { + .anim * { + animation: none !important; + } +} diff --git a/ui-web/tsconfig.json b/ui-web/tsconfig.json new file mode 100644 index 0000000..082767a --- /dev/null +++ b/ui-web/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "moduleResolution": "bundler", + "jsx": "react-jsx", + "strict": true, + "noEmit": true, + "skipLibCheck": true, + "isolatedModules": true, + "types": ["vite/client"] + }, + "include": ["src", "vite.config.ts"] +} diff --git a/ui-web/vite.config.ts b/ui-web/vite.config.ts new file mode 100644 index 0000000..b667c41 --- /dev/null +++ b/ui-web/vite.config.ts @@ -0,0 +1,14 @@ +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [react()], + server: { + port: 5173, + strictPort: true, + open: true, + proxy: { + '/guess-market': 'http://localhost:8080', + }, + }, +}); -- cgit v1.2.3