From 74480812759f041bd38218991610a91e64cd7433 Mon Sep 17 00:00:00 2001 From: "a.ilin" Date: Thu, 1 Oct 2026 22:52:19 +0300 Subject: [PATCH] init --- .dockerignore | 8 + .env | 7 + .gitattributes | 5 + .gitignore | 24 + .oxlintrc.json | 8 + Dockerfile | 28 + README.md | 149 + docker/app-config.sh | 66 + index.html | 14 + package-lock.json | 2755 +++++++++++++++++ package.json | 33 + public/config.js | 3 + public/favicon.svg | 6 + scripts/mock-keycloak.mjs | 119 + src/App.tsx | 71 + src/api/areas.ts | 39 + src/api/attractions.ts | 102 + src/api/errors.ts | 49 + src/api/http.ts | 38 + src/api/notify.ts | 17 + src/api/sets.ts | 43 + src/api/types.ts | 146 + src/api/visits.ts | 27 + src/auth/AuthContext.tsx | 68 + src/auth/RequireRole.tsx | 12 + src/auth/keycloak.ts | 55 + src/auth/roles.ts | 3 + src/components/AreaTreeSelect.tsx | 161 + src/env.ts | 37 + src/index.css | 36 + src/layouts/AdminLayout.tsx | 143 + src/main.tsx | 55 + src/pages/ForbiddenPage.tsx | 11 + src/pages/NotFoundPage.tsx | 18 + src/pages/areas/AreaListPage.tsx | 249 ++ .../attractions/AttractionDetailPage.tsx | 267 ++ src/pages/attractions/AttractionForm.tsx | 176 ++ src/pages/attractions/AttractionListPage.tsx | 158 + src/pages/attractions/PhotoGallery.tsx | 255 ++ src/pages/sets/SetItemsModal.tsx | 186 ++ src/pages/sets/SetListPage.tsx | 242 ++ src/pages/visits/VisitListPage.tsx | 178 ++ src/utils/format.ts | 40 + tsconfig.app.json | 32 + tsconfig.json | 7 + tsconfig.node.json | 23 + vite.config.ts | 23 + 47 files changed, 6192 insertions(+) create mode 100644 .dockerignore create mode 100644 .env create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .oxlintrc.json create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker/app-config.sh create mode 100644 index.html create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 public/config.js create mode 100644 public/favicon.svg create mode 100644 scripts/mock-keycloak.mjs create mode 100644 src/App.tsx create mode 100644 src/api/areas.ts create mode 100644 src/api/attractions.ts create mode 100644 src/api/errors.ts create mode 100644 src/api/http.ts create mode 100644 src/api/notify.ts create mode 100644 src/api/sets.ts create mode 100644 src/api/types.ts create mode 100644 src/api/visits.ts create mode 100644 src/auth/AuthContext.tsx create mode 100644 src/auth/RequireRole.tsx create mode 100644 src/auth/keycloak.ts create mode 100644 src/auth/roles.ts create mode 100644 src/components/AreaTreeSelect.tsx create mode 100644 src/env.ts create mode 100644 src/index.css create mode 100644 src/layouts/AdminLayout.tsx create mode 100644 src/main.tsx create mode 100644 src/pages/ForbiddenPage.tsx create mode 100644 src/pages/NotFoundPage.tsx create mode 100644 src/pages/areas/AreaListPage.tsx create mode 100644 src/pages/attractions/AttractionDetailPage.tsx create mode 100644 src/pages/attractions/AttractionForm.tsx create mode 100644 src/pages/attractions/AttractionListPage.tsx create mode 100644 src/pages/attractions/PhotoGallery.tsx create mode 100644 src/pages/sets/SetItemsModal.tsx create mode 100644 src/pages/sets/SetListPage.tsx create mode 100644 src/pages/visits/VisitListPage.tsx create mode 100644 src/utils/format.ts create mode 100644 tsconfig.app.json create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json create mode 100644 vite.config.ts diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b370259 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +node_modules +dist +.git +.idea +.vscode +*.log +Dockerfile +.dockerignore diff --git a/.env b/.env new file mode 100644 index 0000000..c51ce4b --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +# Базовый путь API: в dev запросы уходят через vite-прокси на http://localhost:8080. +VITE_API_BASE_URL=/api + +# Keycloak (переопределяется при прод-сборке через переменные окружения CI). +VITE_KEYCLOAK_URL=http://localhost:8081 +VITE_KEYCLOAK_REALM=gorodar +VITE_KEYCLOAK_CLIENT_ID=gorodar diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4eab6b4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Force LF in the repo; checkout as-is on all platforms +* text=auto eol=lf +*.png binary +*.jpg binary +*.webp binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..6fa991d --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,8 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "typescript", "oxc"], + "rules": { + "react/rules-of-hooks": "error", + "react/only-export-components": ["warn", { "allowConstantExport": true }] + } +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..05626f2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +# Сборка SPA +FROM node:24-alpine AS build +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm ci + +COPY . . +RUN npm run build + +# Runtime: nginx + генерация конфигурации из env при старте +FROM nginx:1.29-alpine + +# Отключаем дефолтный template-механизм nginx (конфиг пишет наш скрипт), +# чтобы envsubst не интерферировал с /etc/nginx/conf.d. +RUN rm -f /etc/nginx/conf.d/default.conf /etc/nginx/templates/default.conf.template + +COPY --from=build /app/dist /usr/share/nginx/html +COPY docker/app-config.sh /docker-entrypoint.d/40-app-config.sh +RUN chmod +x /docker-entrypoint.d/40-app-config.sh + +EXPOSE 80 + +# Конфигурация при старте (см. docker/app-config.sh): +# KEYCLOAK_URL, KEYCLOAK_REALM, KEYCLOAK_CLIENT_ID — сервер авторизации; +# BACKEND_URL — куда nginx проксирует /api; +# API_BASE_URL — база API в SPA (по умолчанию /api). +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..d4380d6 --- /dev/null +++ b/README.md @@ -0,0 +1,149 @@ +# Городар — админ-панель + +SPA для административной части сервиса «Городар»: управление зонами, карточками +достопримечательностей и эталонными фото, наборами и просмотр визитов. +Работает поверх REST API бэкенда `../back` (`/api/admin/**`). + +## Стек + +- React 19 + TypeScript, Vite +- Ant Design (русская локаль), dayjs +- TanStack Query — серверное состояние +- React Router — маршрутизация и guards по ролям +- keycloak-js — авторизация (OAuth2 / OIDC, PKCE) + +## Запуск (разработка) + +```bash +npm install +npm run dev # http://localhost:5173 +``` + +Требуется Node.js ≥ 22. + +Перед стартом должны быть доступны: + +- **бэкенд** `http://localhost:8080` — в dev запросы `/api` проксируются туда + vite-плагином (`vite.config.ts`), CORS не нужен; +- **Keycloak** `http://localhost:8081` (realm `gorodar`). + +### Разработка без настоящего Keycloak + +Если Keycloak поднимать не хочется, есть мини-мок (realm `gorodar`, клиент +`gorodar`, «логинит» как `admin` с обеими ролями, токены не подписаны): + +```bash +npm run mock-keycloak # отдельный терминал, поднимает http://localhost:8081 +npm run dev # второй терминал +``` + +Мок реализует discovery, authorization (с `iss` во fragment — так требует +keycloak-js 25+), token, userinfo и logout. + +## Скрипты + +| Команда | Действие | +| ----------------------- | ----------------------------------------- | +| `npm run dev` | dev-сервер с HMR (порт 5173) | +| `npm run build` | production-сборка (tsc + vite) в `dist/` | +| `npm run preview` | локальный просмотр production-сборки | +| `npm run lint` | oxlint | +| `npm run mock-keycloak` | мок Keycloak на 8081 для работы без IdP | + +## Переменные окружения + +Для **локальной разработки** — `VITE_*` в `.env` (значения по умолчанию), +переопределяются при сборке через переменные окружения CI. В **Docker** эти же +настройки задаются runtime-переменными при старте контейнера (см. раздел +Docker) — `VITE_*` там не используются. + +| Переменная | По умолчанию | Назначение | +| -------------------------- | ------------------------- | ------------------------------ | +| `VITE_API_BASE_URL` | `/api` | базовый путь API | +| `VITE_KEYCLOAK_URL` | `http://localhost:8081` | URL Keycloak | +| `VITE_KEYCLOAK_REALM` | `gorodar` | realm | +| `VITE_KEYCLOAK_CLIENT_ID` | `gorodar` | OAuth2-клиент | + +## Настройка Keycloak (обязательно, один раз) + +Бэкенд — OAuth2 resource server: проверяет подпись JWT, а также что `aud` +содержит `gorodar` **или** `azp` = `gorodar`. Роли читаются из +`resource_access.gorodar.roles` (клиентские роли клиента `gorodar`). + +Для работы админки нужен **public-клиент** со включённым **Standard flow**: + +1. Вариант А — переиспользовать клиент `gorodar`: сделать его public и включить + Standard flow; тогда `azp` в токенах будет `gorodar` и проверка аудитории проходит. +2. Вариант Б — создать отдельный public-клиент `gorodar-admin` (Standard flow) и + добавить ему protocol-mapper типа **Audience** со значением `gorodar`; + тогда `VITE_KEYCLOAK_CLIENT_ID=gorodar-admin`. + +В обоих вариантах: + +- Valid redirect URIs: `http://localhost:5173/*` (и URL прод-стенда); +- Web origins: `http://localhost:5173`; +- пользователям выдать клиентские роли клиента `gorodar`: + - `manage_area` — разделы «Зоны», «Наборы», «Визиты»; + - `manage_attraction` — раздел «Достопримечательности». + +## Продакшен + +`npm run build` кладёт статику в `dist/`. Разворачивать за реверс-прокси, +который отдаёт статику и проксирует `/api` на бэкенд (same-origin — CORS на +бэкенке не настраивается). Минимальный пример nginx: + +```nginx +server { + listen 80; + root /var/www/gorodar-admin/dist; + location /api/ { proxy_pass http://back:8080; } + location / { try_files /index.html =404; } +} +``` + +## Docker + +Multi-stage образ: сборка Vite → nginx. Конфигурация задаётся **переменными +окружения при старте контейнера** (не при сборке): entrypoint-скрипт +`docker/app-config.sh` генерирует `/config.js` для SPA и конфиг nginx. + +```bash +docker build -t gorodar-admin-front . + +docker run -d --name gorodar-admin -p 80:80 \ + -e KEYCLOAK_URL=https://keycloak.example.com \ + -e KEYCLOAK_REALM=gorodar \ + -e KEYCLOAK_CLIENT_ID=gorodar \ + -e BACKEND_URL=http://back:8080 \ + gorodar-admin-front +``` + +| Переменная | По умолчанию | Назначение | +| --------------------- | ----------------------- | ------------------------------------------- | +| `KEYCLOAK_URL` | `http://localhost:8081` | URL Keycloak (должен быть доступен браузеру) | +| `KEYCLOAK_REALM` | `gorodar` | realm | +| `KEYCLOAK_CLIENT_ID` | `gorodar` | OAuth2-клиент | +| `BACKEND_URL` | `http://localhost:8080` | куда nginx проксирует `/api` (доступен из контейнера) | +| `API_BASE_URL` | `/api` | база API в SPA — менять не нужно, пока `/api` проксируется | + +Нюансы: + +- `/api` проксируется nginx'ом same-origin — CORS на бэкенде не нужен; + `client_max_body_size 25m` покрывает multipart-лимит бэкенда (22 МБ). +- Если бэкенд и Keycloak запущены на хосте (не в compose-сети), из контейнера + используйте `http://host.docker.internal:8080`; при этом `KEYCLOAK_URL` в + браузере должен оставаться `http://localhost:8081`. +- Изменение `KEYCLOAK_CLIENT_ID` на `gorodar-admin` требует audience-mapper + на `gorodar` (см. раздел про Keycloak). + +## Известные ограничения (следуют из API бэкенда) + +- Состав **DRAFT**-набора нельзя прочитать: редактор состава задаёт список + целиком (PUT). Для ACTIVE-наборов текущий состав подтягивается из публичного + эндпоинта активного набора зоны. +- В админ-API нет GET достопримечательности по id: при обновлении страницы + карточка восстанавливается из списка зоны (первая страница до 100 записей). +- Селекторы зон/достопримечательностей подгружают до 100 элементов на уровень. +- PATCH карточки не умеет «очищать» поля — пустые значения не отправляются. +- Время визитов и фото отображается в UTC (как хранит бэкенд). +- Presigned-ссылки на фото/иконки живут 1 час — страница не кэширует их дольше. diff --git a/docker/app-config.sh b/docker/app-config.sh new file mode 100644 index 0000000..3042e38 --- /dev/null +++ b/docker/app-config.sh @@ -0,0 +1,66 @@ +#!/bin/sh +# Entrypoint-скрипт контейнера (кладётся в /docker-entrypoint.d/ образа nginx, +# выполняется официозным entrypoint до старта nginx). +# +# Генерирует из переменных окружения: +# /usr/share/nginx/html/config.js — runtime-конфигурацию SPA (см. src/env.ts) +# /etc/nginx/conf.d/default.conf — SPA-роутинг + проксирование /api +# +# Переменные окружения: +# KEYCLOAK_URL URL Keycloak (по умолч. http://localhost:8081) +# KEYCLOAK_REALM realm (по умолчанию gorodar) +# KEYCLOAK_CLIENT_ID OAuth2-клиент (по умолчанию gorodar) +# BACKEND_URL URL бэкенда для /api (по умолч. http://localhost:8080) +# API_BASE_URL база API в SPA (по умолчанию /api — через nginx) +set -e + +: "${KEYCLOAK_URL:=http://localhost:8081}" +: "${KEYCLOAK_REALM:=gorodar}" +: "${KEYCLOAK_CLIENT_ID:=gorodar}" +: "${BACKEND_URL:=http://localhost:8080}" +: "${API_BASE_URL:=/api}" + +echo "app-config: KEYCLOAK_URL=$KEYCLOAK_URL realm=$KEYCLOAK_REALM client=$KEYCLOAK_CLIENT_ID backend=$BACKEND_URL" + +cat > /usr/share/nginx/html/config.js < /etc/nginx/conf.d/default.conf < + + + + + + + Городар — админ-панель + + +
+ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..ea46fa6 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2755 @@ +{ + "name": "admin-front", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "admin-front", + "version": "0.0.0", + "dependencies": { + "@ant-design/icons": "^6.3.4", + "@tanstack/react-query": "^5.104.0", + "antd": "^6.6.5", + "axios": "^1.20.0", + "dayjs": "^1.11.23", + "keycloak-js": "^26.2.4", + "react": "^19.2.8", + "react-dom": "^19.2.8", + "react-router-dom": "^7.18.4" + }, + "devDependencies": { + "@types/node": "^24.13.3", + "@types/react": "^19.2.18", + "@types/react-dom": "^19.2.7", + "@vitejs/plugin-react": "^6.1.1", + "oxlint": "^1.81.0", + "typescript": "~6.0.2", + "vite": "^8.3.0" + } + }, + "node_modules/@ant-design/colors": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-8.0.1.tgz", + "integrity": "sha512-foPVl0+SWIslGUtD/xBr1p9U4AKzPhNYEseXYRRo5QSzGACYZrQbe11AYJbYfAWnWSpGBx6JjBmSeugUsD9vqQ==", + "license": "MIT", + "dependencies": { + "@ant-design/fast-color": "^3.0.0" + } + }, + "node_modules/@ant-design/cssinjs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-2.1.2.tgz", + "integrity": "sha512-2Hy8BnCEH31xPeSLbhhB2ctCPXE2ZnASdi+KbSeS79BNbUhL9hAEe20SkUk+BR8aKTmqb6+FKFruk7w8z0VoRQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.1", + "@emotion/hash": "^0.8.0", + "@emotion/unitless": "^0.7.5", + "@rc-component/util": "^1.4.0", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "stylis": "^4.3.4" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/@ant-design/cssinjs-utils": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ant-design/cssinjs-utils/-/cssinjs-utils-2.1.2.tgz", + "integrity": "sha512-5fTHQ158jJJ5dC/ECeyIdZUzKxE/mpEMRZxthyG1sw/AKRHKgJBg00Yi6ACVXgycdje7KahRNvNET/uBccwCnA==", + "license": "MIT", + "dependencies": { + "@ant-design/cssinjs": "^2.1.2", + "@babel/runtime": "^7.23.2", + "@rc-component/util": "^1.4.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/@ant-design/fast-color": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@ant-design/fast-color/-/fast-color-3.0.1.tgz", + "integrity": "sha512-esKJegpW4nckh0o6kV3Tkb7NPIZYbPnnFxmQDUmL08ukXZAvV85TZBr70eGuke/CIArLaP6aw8lt9KILjnWuOw==", + "license": "MIT", + "engines": { + "node": ">=8.x" + } + }, + "node_modules/@ant-design/icons": { + "version": "6.3.4", + "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-6.3.4.tgz", + "integrity": "sha512-kDoUlppczVyCUTFthF6cHmPzMBYqNZQhu9j6EyIX/YIdM9j9CZNZoJUjzVw7/1v1VO8WwVMmPp15r/uwIAS0AQ==", + "license": "MIT", + "dependencies": { + "@ant-design/colors": "^8.0.1", + "@ant-design/icons-svg": "^4.6.0", + "@rc-component/util": "^1.11.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/@ant-design/icons-svg": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.6.0.tgz", + "integrity": "sha512-PRomU725ABMf/lnQp5HiB7my1kjEbFY0D10N4lXYxK6TIB1gKjIVD5MRThpDaezLgw1D774J8eOeeDB0M6wHrQ==", + "license": "MIT" + }, + "node_modules/@ant-design/react-slick": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-2.0.0.tgz", + "integrity": "sha512-HMS9sRoEmZey8LsE/Yo6+klhlzU12PisjrVcydW3So7RdklyEd2qehyU6a7Yp+OYN72mgsYs3NFCyP2lCPFVqg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.4", + "clsx": "^2.1.1", + "json2mq": "^0.2.0", + "throttle-debounce": "^5.0.0" + }, + "peerDependencies": { + "react": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", + "license": "MIT" + }, + "node_modules/@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", + "license": "MIT" + }, + "node_modules/@oxc-project/types": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.152.0.tgz", + "integrity": "sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.86.0.tgz", + "integrity": "sha512-63Ozq6yQn79B2UxjSZ9huJmI+3/ZPI7hxAe6TyFh9oQL447KnIMoffOdtog+h4KILbQr61ZRvFPW5gYbAUgpgQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.86.0.tgz", + "integrity": "sha512-JdLGp44phbf/0Du236Dt06yfK6Qw8xhTFeDvHJdjk167r59OfP5+BL31mgMYVnswS8e+j6tFuccSY0QDC/lgCw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.86.0.tgz", + "integrity": "sha512-h+vkOr4ik6KLFCXdtNVEj9xfnXfNUpPoF95QjORdhiSpLqQePzcN81kGHjAgsw1/G7WBWK5KsFKbI2UK8EyzMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.86.0.tgz", + "integrity": "sha512-wbglRuH5eKsp68keTOOeKDHU1astWSRYFsh2bwKQTAPb44rD6kVgzYI1ZrAJRTc6/7PH55ZXFCQx0rQXrj0UdA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.86.0.tgz", + "integrity": "sha512-yTQ7QSOlNfQsrfbeVweTiegQJLKPjUKgXp/JpGiFzza6Hp29S9LAoH77TM3L0RjK39iQRZB5lk5iq2t241Mfag==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.86.0.tgz", + "integrity": "sha512-QYJGy0E2Tv8GAayyBIeHFTwQb8u+zrvrOYrifuDGZDr9ad5XsDhiMScpZymhS9fwWjqrgG2ZUwT4vpY0ISqp4Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.86.0.tgz", + "integrity": "sha512-oQo83CafLT8p3qh0AGkN0tSUIh5Hm63mfDsoqUmBQUBnSZLNBAbyRaAftfGY5a0cKZ34dG6jAtMYgcY5kZqt5g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.86.0.tgz", + "integrity": "sha512-EM6wy5c2UM12qPb7iDJDBAZvHyfEJGH6iosFgaFiaRZpirz99//EHcUyD2KAskz07x1TULuiAtsojf4nvWWksw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.86.0.tgz", + "integrity": "sha512-vCiUQb9ZNzZalxYRU4mlZwUqT5f+c7Sk9DwUOplWHtik3Dl4r3DVnUB5tBeRuTAUe6MUVCTylNW7TkkN8J1oTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.86.0.tgz", + "integrity": "sha512-T0AzE89yjTYmOhB/hb6i+rWTpe2mYt+xiguBhs9DEPIJTZ1H8OYqsE4VxJHHw2Wlq8Mztwvp2P8NV87ZOuhPRw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.86.0.tgz", + "integrity": "sha512-s49r0K2f5Oc7fJoMUO1WkdhYK5Ob79uYRwWQ/XNoGysaOq3RUGmGUbHSuXiyydTTA+P9xEdDEnnlZVXiaSJhlw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.86.0.tgz", + "integrity": "sha512-JIa2tYR8ayb3nvcMSZzn4O/xTy13S7MHllu7cBD+B5qDQXXSRy/Vwk1aNpiTjZmBJGwKCHOy/NvnY5Xcwg27uQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.86.0.tgz", + "integrity": "sha512-XwXMyBsAuWZkhZU74UNcfQKr1CJJAKnS80dZzOnjl6A4fKcf91IjFgidegQugMHA5SN8ulwDXEDV1yPntjXgQQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.86.0.tgz", + "integrity": "sha512-C1WjukSyMnr66b+w1/tV8RFVv6d9v0MzDf4p9IxVXknqgmTHBgZh1pccN1eHzFr0b9Tbb3OXoPsAAdAuHAQfeA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.86.0.tgz", + "integrity": "sha512-ap6KLmvC38c6MdYzsIh25cXQupqYvjd37tMNftzrX1DCtkX1Gcf2B+S2B17dD4lKa5c5gJog7DQJyDo82PBKyw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.86.0.tgz", + "integrity": "sha512-996Q9w/2GLwNyy5Djs39Jt09aFlr4b7TPhoj7dvo5FHmcyiF68nPz73HNc5UAYKIYeK+M9JzPQ4Wg1r1dXvP6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.86.0.tgz", + "integrity": "sha512-9uTCHYTknNkug5+46ViSoUMuOuGWK61D87QnblU6CXaWKJC630Z7dbls61vdHxya/cR2ycQZ6Mm6ckgF6Cag5g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.86.0.tgz", + "integrity": "sha512-a47ga7EKVfMU8rO0i1m3mGwfNRj3FhQyt1d/ukO/E9u1HHF3KpR3tyb3VhuJBGEVPF8uR4exSyHUyx7xbE+uxw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.86.0.tgz", + "integrity": "sha512-az4dzifCRzES1crwu6pDFXzJTIanrdxXFL9TbiJWrx9LKcuacbR83aPvxDA1LKLNswi/RoqitC7Afcflhu3zBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rc-component/async-validator": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@rc-component/async-validator/-/async-validator-6.0.0.tgz", + "integrity": "sha512-D3AGQwdyE58gmvx6waVSXJ80JGO+IY5L2O8HDnSOex7JNlzB3GuN/4hyHNTdhy2qtOhkpbIjmeAN3tL993wKbA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.4" + }, + "engines": { + "node": ">=14.x" + } + }, + "node_modules/@rc-component/cascader": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/@rc-component/cascader/-/cascader-1.22.0.tgz", + "integrity": "sha512-SffrA57aS9oub3VuI7ajPhJTPtaNxngSvtRhD40Rd8dwJ5vfWPSrVanWgeepdWFGBt7EHftIK5RUU0u3rCTwWw==", + "license": "MIT", + "dependencies": { + "@rc-component/select": "~1.10.0", + "@rc-component/tree": "~1.4.0", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/checkbox": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@rc-component/checkbox/-/checkbox-2.0.0.tgz", + "integrity": "sha512-3CXGPpAR9gsPKeO2N78HAPOzU30UdemD6HGJoWVJOpa6WleaGB5kzZj3v6bdTZab31YuWgY/RxV3VKPctn0DwQ==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.3.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/collapse": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@rc-component/collapse/-/collapse-1.2.0.tgz", + "integrity": "sha512-ZRYSKSS39qsFx93p26bde7JUZJshsUBEQRlRXPuJYlAiNX0vyYlF5TsAm8JZN3LcF8XvKikdzPbgAtXSbkLUkw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/motion": "^1.1.4", + "@rc-component/util": "^1.3.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/color-picker": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@rc-component/color-picker/-/color-picker-3.1.1.tgz", + "integrity": "sha512-OHaCHLHszCegdXmIq2ZRIZBN/EtpT6Wm8SG/gpzLATHbVKc/avvuKi+zlOuk05FTWvgaMmpxAko44uRJ3M+2pg==", + "license": "MIT", + "dependencies": { + "@ant-design/fast-color": "^3.0.1", + "@rc-component/util": "^1.3.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/context": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@rc-component/context/-/context-2.0.2.tgz", + "integrity": "sha512-uiGpAlblCNlziHPwj4S4Iy/oemeuz/hR03mbiEjTCXwsqOIN3BOzsRMyDwpyO5Fm0vIEEJRUf9ZtbRLbhksuTA==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.11.0" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/dialog": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@rc-component/dialog/-/dialog-1.10.0.tgz", + "integrity": "sha512-eDukNlz9vNszAGv7i3zKXdxEd3wgVmNxuJijYt8zvTh17QwTu8KK/bdURRd/lU4qaMzhO1HKKmMrwOnkaw0BvQ==", + "license": "MIT", + "dependencies": { + "@rc-component/motion": "^1.3.3", + "@rc-component/portal": "^2.1.0", + "@rc-component/util": "^1.9.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/drawer": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@rc-component/drawer/-/drawer-1.4.2.tgz", + "integrity": "sha512-1ib+fZEp6FBu+YvcIktm+nCQ+Q+qIpwpoaJH6opGr4ofh2QMq+qdr5DLC4oCf5qf3pcWX9lUWPYX652k4ini8Q==", + "license": "MIT", + "dependencies": { + "@rc-component/motion": "^1.1.4", + "@rc-component/portal": "^2.1.3", + "@rc-component/util": "^1.9.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/dropdown": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rc-component/dropdown/-/dropdown-1.0.3.tgz", + "integrity": "sha512-YTST/N6kpqpDz3IMuM/PSSZnrDpSOA6dgHv12gPA90ZTSLv2CoqkZ0+9NtwTY6BeO7dstPblSic2QJg7dSFy/g==", + "license": "MIT", + "dependencies": { + "@rc-component/trigger": "^3.0.0", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.11.0", + "react-dom": ">=16.11.0" + } + }, + "node_modules/@rc-component/form": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@rc-component/form/-/form-1.8.6.tgz", + "integrity": "sha512-1EXVsSKPZC6kGrIqxVck7kAWM6T65b6et/n5wIcyiaIa41VrDshD0nVLHoBDEIZr2ATQsOP6icb4XQkNFMLBAw==", + "license": "MIT", + "dependencies": { + "@rc-component/async-validator": "^6.0.0", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/image": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@rc-component/image/-/image-1.10.0.tgz", + "integrity": "sha512-BjeZCRQ+hw+4WAhvrw8rJvy5fckA2xpf/X2XQEOABUHvLTNB9inB98X3Mp54jYQ7g10DfWERQWHXeC4ylxp1Uw==", + "license": "MIT", + "dependencies": { + "@rc-component/motion": "^1.0.0", + "@rc-component/portal": "^2.1.2", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/input": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@rc-component/input/-/input-1.3.1.tgz", + "integrity": "sha512-iFvTUT9W+JC/MSin2aGAk8NqsVlTzcExNC9DZariON1IWirju9NoNeEk47an4Q8iHazkoVI/y1LnDi88+CPcig==", + "license": "MIT", + "dependencies": { + "@rc-component/resize-observer": "^1.1.1", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/@rc-component/input-number": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@rc-component/input-number/-/input-number-1.6.2.tgz", + "integrity": "sha512-Gjcq7meZlCOiWN1t1xCC+7/s85humHVokTBI7PJgTfoyw5OWF74y3e6P8PHX104g9+b54jsodFIzyaj6p8LI9w==", + "license": "MIT", + "dependencies": { + "@rc-component/mini-decimal": "^1.0.1", + "@rc-component/util": "^1.4.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/listy": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rc-component/listy/-/listy-1.2.3.tgz", + "integrity": "sha512-IXiMjV5s0rczLBlfh7G5nB4M3365mrEeedjwKtf5I+Ns3PqRUsebR2h5u8CeFarsVfLUPC2I5p0h09TNoOWyvQ==", + "license": "MIT", + "dependencies": { + "@rc-component/motion": "^1.1.4", + "@rc-component/portal": "^2.0.0", + "@rc-component/resize-observer": "^1.0.0", + "@rc-component/util": "^1.3.1", + "@rc-component/virtual-list": "^1.4.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/mentions": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@rc-component/mentions/-/mentions-1.12.0.tgz", + "integrity": "sha512-v5MBx8zDcqCT+uybJgKpcx3Fgrvj0m3u+A/15RlSBaMx12lLoJZTTYggC3pbYYfohcKujWWUyBz6O6Gp2vGiNA==", + "license": "MIT", + "dependencies": { + "@rc-component/input": "~1.3.1", + "@rc-component/menu": "~1.5.0", + "@rc-component/trigger": "^3.0.0", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/menu": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@rc-component/menu/-/menu-1.5.0.tgz", + "integrity": "sha512-RjvzPsZkwVEg3xu+/jDDqDeUCBJAnWylONFlGeQgg5enlNAnlpybqhaMGE/UPEIvr6hL90PGhjFBguJqj0Qb2Q==", + "license": "MIT", + "dependencies": { + "@rc-component/motion": "^1.1.4", + "@rc-component/overflow": "^1.0.0", + "@rc-component/trigger": "^3.0.0", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/mini-decimal": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rc-component/mini-decimal/-/mini-decimal-1.1.4.tgz", + "integrity": "sha512-xiuXcaCwyOWpD8a8scdExFl+bntNphAW8XeenL1ig2en0AAZY0Pcp4pC0dI22qJ+NvxKn9RoNIoRdqYU3BLH4w==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0" + }, + "engines": { + "node": ">=8.x" + } + }, + "node_modules/@rc-component/motion": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@rc-component/motion/-/motion-1.3.3.tgz", + "integrity": "sha512-Xh3IszxvlSv3/PLYFyC2UZi9LNB83yOnkB/LNmRzaypZLvkhqUIPS7MQpGZcCMWrNsXV2p6YTSWbSGvFpEle9A==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.11.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/mutate-observer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rc-component/mutate-observer/-/mutate-observer-2.0.1.tgz", + "integrity": "sha512-AyarjoLU5YlxuValRi+w8JRH2Z84TBbFO2RoGWz9d8bSu0FqT8DtugH3xC3BV7mUwlmROFauyWuXFuq4IFbH+w==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.2.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/notification": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@rc-component/notification/-/notification-2.0.9.tgz", + "integrity": "sha512-jQT5IVSWSHPTNFXQM2YQONPptjiKXZa4A4Kzwh2xkh3MkL31gRzyjb98N3QHBzLxsyGGJK1aNpn9j9aSO/O0dg==", + "license": "MIT", + "dependencies": { + "@rc-component/motion": "^1.1.4", + "@rc-component/util": "^1.13.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/overflow": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rc-component/overflow/-/overflow-1.0.1.tgz", + "integrity": "sha512-syfmgAABaHCnCDzPwHZ/2tuvIcpOO3jefYZMmfkN+pmo8HKTzsfhS57vxo4ksPdN0By+uWVJhJWNFozNBxi2eA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.1", + "@rc-component/resize-observer": "^1.0.1", + "@rc-component/util": "^1.4.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/pagination": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@rc-component/pagination/-/pagination-1.4.0.tgz", + "integrity": "sha512-CW1g7P9V8u+e8JQdUsl2RWg+GCsoee0mtJjZUCCxn/vb3jzOwDKm6hAdwddHCVBfWJ58eGUBZz3IvnU8rRktjw==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/picker": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@rc-component/picker/-/picker-1.12.2.tgz", + "integrity": "sha512-ZB1A+tzTQkgtR4flPrAMvxIAOelIIOOOsp22fU2Nad6PbZcJacnyGJUJqUH7ZS9mwxeUwurf1pLMKXrVsK1tlA==", + "license": "MIT", + "dependencies": { + "@rc-component/overflow": "^1.0.0", + "@rc-component/resize-observer": "^1.0.0", + "@rc-component/trigger": "^3.6.15", + "@rc-component/util": "^1.13.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=12.x" + }, + "peerDependencies": { + "date-fns": ">= 2.x", + "dayjs": ">= 1.x", + "luxon": ">= 3.x", + "moment": ">= 2.x", + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + }, + "peerDependenciesMeta": { + "date-fns": { + "optional": true + }, + "dayjs": { + "optional": true + }, + "luxon": { + "optional": true + }, + "moment": { + "optional": true + } + } + }, + "node_modules/@rc-component/portal": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@rc-component/portal/-/portal-2.2.1.tgz", + "integrity": "sha512-ck+r1kW/JSv0wxPji3KN2ss9K6Z0qqwusw/mf/0JobXhZ8hC2ejZwCJObW/SvDi0uhA0VzmCnx0CaCci95tcmA==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.11.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=12.x" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/progress": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rc-component/progress/-/progress-1.0.3.tgz", + "integrity": "sha512-Q1nPLIvKr95el/q76yaBh5nv1hqCsWaHQb8U7vXEDMefEhHgM7n3CPoN+o4LHnTyANQHmMFgoS/naAT4Bhxuaw==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/qrcode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@rc-component/qrcode/-/qrcode-2.0.0.tgz", + "integrity": "sha512-aAv3QhPP1xyafuTZOxub6a54pCeBnN3IwQkpETrBtthq4BL5IgxnCbuoBWPDpdLw1y1j6BgBUCAKV92+yX06Dw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.7" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/rate": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rc-component/rate/-/rate-1.0.1.tgz", + "integrity": "sha512-bkXxeBqDpl5IOC7yL7GcSYjQx9G8H+6kLYQnNZWeBYq2OYIv1MONd6mqKTjnnJYpV0cQIU2z3atdW0j1kttpTw==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.3.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/resize-observer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rc-component/resize-observer/-/resize-observer-1.1.2.tgz", + "integrity": "sha512-t/Bb0W8uvL4PYKAB3YcChC+DlHh0Wt5kM7q/J+0qpVEUMLe7Hk5zuvc9km0hMnTFPSx5Z7Wu/fzCLN6erVLE8Q==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.2.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/segmented": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@rc-component/segmented/-/segmented-1.4.0.tgz", + "integrity": "sha512-NZlpKGSplOYlmF5ukUF1fCLr0ns5WfjNoqMlMkf4AHP0iu90wyiP7hn2qZKRHEuRlG4CvEEz/lF9qRiYnLTofQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^8.0.0", + "@rc-component/motion": "^1.1.4", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/@rc-component/segmented/node_modules/@babel/runtime": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-8.0.5.tgz", + "integrity": "sha512-7NK+Lz3spQ52XsUGTxIEVU4jYN2/dIaX8sTxRFAUtYmttYZnVh3aehiihv+/Gb7+duMNHl2OrFcBQRyOHScxpg==", + "license": "MIT" + }, + "node_modules/@rc-component/select": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@rc-component/select/-/select-1.10.1.tgz", + "integrity": "sha512-H+yQsl+qED9NilQ3g6zdpsMwUgwVjrcMTkNHAWRVU/MoNCYgTbDgU+MIMgZDK+rVdd2JUfI/MkysMcZZ0cyQKw==", + "license": "MIT", + "dependencies": { + "@rc-component/overflow": "^1.0.0", + "@rc-component/trigger": "^3.0.0", + "@rc-component/util": "^1.11.1", + "@rc-component/virtual-list": "^1.2.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/@rc-component/slider": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@rc-component/slider/-/slider-1.1.1.tgz", + "integrity": "sha512-LSzgWGYDgeCDgR4r1XlU29gbYws6HpLnvJd/uMhLeW/vQgxldeR+Wb4uzHDCHiYEbr1bnEHWdjkPxjJRHxuiig==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.3.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/steps": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rc-component/steps/-/steps-1.2.3.tgz", + "integrity": "sha512-/b9gHcvDGjTDWJZW7+1kKFvzs0jrEeQ8mFvvIgX+h7xNT0FsOYODJYKjyJR4fPbvMBCfCOEqaBK66HBxov5BQA==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/switch": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rc-component/switch/-/switch-1.0.3.tgz", + "integrity": "sha512-Jgi+EbOBquje/XNdofr7xbJQZPYJP+BlPfR0h+WN4zFkdtB2EWqEfvkXJWeipflwjWip0/17rNbxEAqs8hVHfw==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.3.0", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/table": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@rc-component/table/-/table-1.11.1.tgz", + "integrity": "sha512-OWdS6DMmeWb7bJBGqPxYZpQbzBlBiXZUu2sqo6Ii7Sjs9GeK1IsrXrWk26SL2c6KEseabswdxrRj7WUm9LdECw==", + "license": "MIT", + "dependencies": { + "@rc-component/context": "^2.0.1", + "@rc-component/resize-observer": "^1.0.0", + "@rc-component/util": "^1.11.1", + "@rc-component/virtual-list": "^1.0.1", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/tabs": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@rc-component/tabs/-/tabs-1.13.0.tgz", + "integrity": "sha512-3FXr+9ZII8tFLWuDWrgjRaxZd2mazkKJAGRFEfVmp4r1qnBglOlxQ78l54Td1aj6/iFaaEReKSAF2HToztU5uw==", + "license": "MIT", + "dependencies": { + "@rc-component/dropdown": "~1.0.0", + "@rc-component/menu": "~1.5.0", + "@rc-component/motion": "^1.1.3", + "@rc-component/resize-observer": "^1.0.0", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/tooltip": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@rc-component/tooltip/-/tooltip-1.5.2.tgz", + "integrity": "sha512-VLq4BclU3LgRe46g2hTr2bdsM8tFYs7dVwpuD88rPNNg4lCGe8mBSS4FiRzYzS+ffnZ46y4SI8KYKo9K7qBnhw==", + "license": "MIT", + "dependencies": { + "@rc-component/trigger": "^3.10.0", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/tour": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@rc-component/tour/-/tour-2.4.0.tgz", + "integrity": "sha512-aui4r4TqmTzwaBgcQxHYep8kM8PTjZFufjokObpy35KfFeZ0k9ArquWFZqegQlH24P14t+F0qO0mGTgzlav1yg==", + "license": "MIT", + "dependencies": { + "@rc-component/portal": "^2.2.0", + "@rc-component/trigger": "^3.0.0", + "@rc-component/util": "^1.7.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/tree": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@rc-component/tree/-/tree-1.4.0.tgz", + "integrity": "sha512-dGsJGDJQedA0BqqVgj3F8BvHXTSZijyhTXdbAdkcx8lynzZkty/CV3Z3LOm/fxz+BCfl3dfGiAQpb7Q5XNvl0Q==", + "license": "MIT", + "dependencies": { + "@rc-component/motion": "^1.0.0", + "@rc-component/util": "^1.11.1", + "@rc-component/virtual-list": "^1.2.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=10.x" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/@rc-component/tree-select": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/@rc-component/tree-select/-/tree-select-1.16.1.tgz", + "integrity": "sha512-a1Oi6EJhqAhdOxxupdJi6fP0RPHMKn5TcfkX2+llaQ4lF4nwfH7b6SCHcnsybaa2s+pk1yZYwVyeOYkDnEBRdg==", + "license": "MIT", + "dependencies": { + "@rc-component/select": "~1.10.0", + "@rc-component/tree": "~1.4.0", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/@rc-component/trigger": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-3.10.1.tgz", + "integrity": "sha512-mXlDN0IXdtV8Yqqm8195ECCyrbmfvvfKvwVvSlH0+qvKD6BUF8gRhEjSy0FOcD1+CcDRHgTiX99LoxfQrmh3Cw==", + "license": "MIT", + "dependencies": { + "@rc-component/motion": "^1.3.3", + "@rc-component/portal": "^2.2.1", + "@rc-component/resize-observer": "^1.1.2", + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/upload": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@rc-component/upload/-/upload-1.1.1.tgz", + "integrity": "sha512-GvYWSKeaJTOxxC5p6+nOSadzfvXA1h8C/iHFPFZX+szH3JUXrvs+DLiW8YUTBgvMh8m63mJeHrlYlJzAlg+pDA==", + "license": "MIT", + "dependencies": { + "@rc-component/util": "^1.11.1", + "clsx": "^2.1.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/util": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@rc-component/util/-/util-1.13.0.tgz", + "integrity": "sha512-IXf2zBfZrbQGT+G8LxnoICDBGnMHIPIiq5HCRn3EDfKUx28x1rnbZBj46ULJf4sM8ImTG1SepqfNBdxZziqQ4w==", + "license": "MIT", + "dependencies": { + "is-mobile": "^5.0.0", + "react-is": "^19.2.7" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/virtual-list": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@rc-component/virtual-list/-/virtual-list-1.5.2.tgz", + "integrity": "sha512-igfe7NP9cOmDAhLy5z+Juz8fhjOMzMbF7TRoR/yqXIsbU6XZm4TU7ogcm5O553P0rLF6n0j5F6J+n15Izb1tqg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^8.0.0", + "@rc-component/resize-observer": "^1.0.1", + "@rc-component/util": "^1.4.0", + "clsx": "^2.1.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@rc-component/virtual-list/node_modules/@babel/runtime": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-8.0.5.tgz", + "integrity": "sha512-7NK+Lz3spQ52XsUGTxIEVU4jYN2/dIaX8sTxRFAUtYmttYZnVh3aehiihv+/Gb7+duMNHl2OrFcBQRyOHScxpg==", + "license": "MIT" + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.12.tgz", + "integrity": "sha512-dB/a1214qKfHMXCpgqR4OZT+jS4kTyEXbQGJPqzobt5EwH5rX080pxE37alt3RzvR1bf1Yz/yGqRfrYAxuPw0A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.12.tgz", + "integrity": "sha512-7KHFgQ5VJxIHcLlrwrc3Xbds7oTNQT7Pgi9gQCJKrd2VGab/UksIOYp6VD8MzCstGxOKMgNamPwUCfxPdP1OHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.12.tgz", + "integrity": "sha512-3YIhqHD96nA5SaYNRBR16HnGv4oavZvXfD/ayHM+oYZ0WD/8lBAtf6zQua4kEyAvpqrluKXl0lnOBoiNby7x9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.12.tgz", + "integrity": "sha512-UuuJ35MFw4gmFOrE9pEqIV+K3syIKveph+Qc1/ljHZVdoDW4pz/JHR/eMVom+TZGl/5OOvGJOWaOCVt3ZfqhxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.12.tgz", + "integrity": "sha512-uMvssit0a4W+/7D8CbHUvG719mH3R2jwXAlh/XcPvuHTE0g++LymF88DCGNX0HM2rBOn0xrzgXktIB6fLSJBTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.12.tgz", + "integrity": "sha512-XcFu0R0xWnwzSf4IQgFH1rJIckPN1pLy2R+4r9IDB7Yfu/ys9cVqfa4pBrMHj7a3gl8mIR4nRNPg0e5IvEVs6g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.12.tgz", + "integrity": "sha512-260UrKgn8tz39ak+SMDOirKzr7V04M9dWPw5llW00SwBivCZoWcRBKV1d8cXnRkUmSZA3BdiUmBHWk7734Ulpw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.12.tgz", + "integrity": "sha512-5YK1I9SqDkbPgc1IA8BgDl34suqUS2q0KWnBrirm0E51YjOs6eo6dV6jbQfNE/argHRSvd0QUGgtpIoYx+WWpw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.12.tgz", + "integrity": "sha512-Rkcrmp7eFRg74yL5fXEU91JEWbdEPLevWwGtXpmhbjlD1StScbWTmO94Bhly+Mo+ketKYkdmM1vNUKeWSlx8cQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.12.tgz", + "integrity": "sha512-qvK4DuAsQc2BSjlx+Xr+IzOIvvxbGZqxFwdWfG6F518Erj0GGISyQbJ6pIappnOxlNPzNHvo/L0BwB30GZ+zVw==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.12.tgz", + "integrity": "sha512-Q9uLBO53Xd4QIq1WOycVQyPP1O4HhraEV2qqb3uTrnVw6QZih9duY4vNXOivL1xoUS1/z+W8eF4NMfl2a8Sdjw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.12.tgz", + "integrity": "sha512-3IBxWFMjbOZskDPKv8Lf9BCnahlKuHthWkYnyIxOH/QcJrFcS4EmcenthApkwr/5+nEqZlLzeYbxeMaX7A5u4g==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.12.tgz", + "integrity": "sha512-xtX61xg4LKPkPWilZU1ynKClz5Gj4bf74LML4r3eVLWumKnGjoEr1OSHQhMdbBDoYTi+yjrujvpZe2pUnqCrrA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.12.tgz", + "integrity": "sha512-At7fPB6PCaIjzgIhEZFxuT+BBFqiQibJDT4d3PhiR3f4E7bbMZF4aKblbFfEM3sETRDd1YiQx/+U/g/B/ou5Ew==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.12.tgz", + "integrity": "sha512-WIw2haVKwjuYdXkHaoC0mF8Le71TuCBxjrdKqLbJGctbBABj+ClfmNvtbOnzpq3RokNo5+V1qhtSzJyXorsklQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tanstack/query-core": { + "version": "5.104.0", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.104.0.tgz", + "integrity": "sha512-JrC2r/JQlXt7khBSdUpsgxNvybzOg+aITa+ARRMlP2AFo93Y8vIqz077rp+e61mJetSZ0T6AJbwW1JHer1vrPQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.104.0", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.104.0.tgz", + "integrity": "sha512-e1TZmDCQnWIfiDVryIHeA6Idj+Lfx1hORLOhXS/l5wcgvtVD4yYqbTDl378sGQKIi2cSgb0TEMC9cKK8GGoJEw==", + "license": "MIT", + "dependencies": { + "@tanstack/query-core": "5.104.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18 || ^19" + } + }, + "node_modules/@types/node": { + "version": "24.19.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.0.tgz", + "integrity": "sha512-zY+5tKxXdhGh1PYI0ac+7juvEu4OI6vWtVVoj5i2m42jxAY1U+zHGt6QCyOFwykdP62sM3MJ9stoYYUw5aCWew==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": ">=7.24.0 <7.24.7" + } + }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.3.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.1.tgz", + "integrity": "sha512-yxLaQV9gkhS8ezJqCM6+ndU7mDY6gqAg75NQ+0IjwEI8IYOmQCgkRwHKVSfWXW076DsqMo0Dk+0FK1U+M5RgFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", + "babel-plugin-react-compiler": "^1.0.0", + "oxc-transform-react": "^0.145.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + }, + "oxc-transform-react": { + "optional": true + } + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/antd": { + "version": "6.6.5", + "resolved": "https://registry.npmjs.org/antd/-/antd-6.6.5.tgz", + "integrity": "sha512-biJB/aORNU2lvZZCX783S/g8atfE8akrEKRjRrsXVttoMtJbSHLf/Z29niv0blzt6H3BgKvhkQgHoUn5MgCx7w==", + "license": "MIT", + "dependencies": { + "@ant-design/colors": "^8.0.1", + "@ant-design/cssinjs": "^2.1.2", + "@ant-design/cssinjs-utils": "^2.1.2", + "@ant-design/fast-color": "^3.0.1", + "@ant-design/icons": "^6.3.4", + "@ant-design/react-slick": "~2.0.0", + "@babel/runtime": "^7.29.2", + "@rc-component/cascader": "~1.22.0", + "@rc-component/checkbox": "~2.0.0", + "@rc-component/collapse": "~1.2.0", + "@rc-component/color-picker": "~3.1.1", + "@rc-component/dialog": "~1.10.0", + "@rc-component/drawer": "~1.4.2", + "@rc-component/dropdown": "~1.0.3", + "@rc-component/form": "~1.8.6", + "@rc-component/image": "~1.10.0", + "@rc-component/input": "~1.3.1", + "@rc-component/input-number": "~1.6.2", + "@rc-component/listy": "~1.2.3", + "@rc-component/mentions": "~1.12.0", + "@rc-component/menu": "~1.5.0", + "@rc-component/motion": "^1.3.3", + "@rc-component/mutate-observer": "^2.0.1", + "@rc-component/notification": "~2.0.8", + "@rc-component/pagination": "~1.4.0", + "@rc-component/picker": "~1.12.2", + "@rc-component/progress": "~1.0.3", + "@rc-component/qrcode": "~2.0.0", + "@rc-component/rate": "~1.0.1", + "@rc-component/resize-observer": "^1.1.2", + "@rc-component/segmented": "~1.4.0", + "@rc-component/select": "~1.10.1", + "@rc-component/slider": "~1.1.1", + "@rc-component/steps": "~1.2.3", + "@rc-component/switch": "~1.0.3", + "@rc-component/table": "~1.11.1", + "@rc-component/tabs": "~1.13.0", + "@rc-component/tooltip": "~1.5.2", + "@rc-component/tour": "~2.4.0", + "@rc-component/tree": "~1.4.0", + "@rc-component/tree-select": "~1.16.1", + "@rc-component/trigger": "^3.10.1", + "@rc-component/upload": "~1.1.1", + "@rc-component/util": "^1.13.0", + "clsx": "^2.1.1", + "dayjs": "^1.11.11", + "scroll-into-view-if-needed": "^3.1.0", + "throttle-debounce": "^5.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ant-design" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", + "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compute-scroll-into-view": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz", + "integrity": "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==", + "license": "MIT" + }, + "node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/dayjs": { + "version": "1.11.23", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz", + "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/follow-redirects": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", + "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "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/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/is-mobile": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-5.0.0.tgz", + "integrity": "sha512-Tz/yndySvLAEXh+Uk8liFCxOwVH6YutuR74utvOcu7I9Di+DwM0mtdPVZNaVvvBUM2OXxne/NhOs1zAO7riusQ==", + "license": "MIT" + }, + "node_modules/json2mq": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", + "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", + "license": "MIT", + "dependencies": { + "string-convert": "^0.2.0" + } + }, + "node_modules/keycloak-js": { + "version": "26.2.4", + "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-26.2.4.tgz", + "integrity": "sha512-PnXpR3ubETGOt0B/Qt2lxmPbkZr5bc3vlQsOqDoTPPQsZRp7JjhTKxlJ187uWh8qJhvBab6Gsjb06a8ayOPfuw==", + "license": "Apache-2.0", + "workspaces": [ + "test" + ] + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.19", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz", + "integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==", + "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/oxlint": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.86.0.tgz", + "integrity": "sha512-og0lhgvZfgGF//gOOmZXvtr+GmBbAGEnbEhv/QUg7UW2Wi4wHMnJbnMD+zuHgPdJxdklfgpPupdlAaAySyxrZg==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/oxc-project" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.86.0", + "@oxlint/binding-android-arm64": "1.86.0", + "@oxlint/binding-darwin-arm64": "1.86.0", + "@oxlint/binding-darwin-x64": "1.86.0", + "@oxlint/binding-freebsd-x64": "1.86.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.86.0", + "@oxlint/binding-linux-arm-musleabihf": "1.86.0", + "@oxlint/binding-linux-arm64-gnu": "1.86.0", + "@oxlint/binding-linux-arm64-musl": "1.86.0", + "@oxlint/binding-linux-ppc64-gnu": "1.86.0", + "@oxlint/binding-linux-riscv64-gnu": "1.86.0", + "@oxlint/binding-linux-riscv64-musl": "1.86.0", + "@oxlint/binding-linux-s390x-gnu": "1.86.0", + "@oxlint/binding-linux-x64-gnu": "1.86.0", + "@oxlint/binding-linux-x64-musl": "1.86.0", + "@oxlint/binding-openharmony-arm64": "1.86.0", + "@oxlint/binding-win32-arm64-msvc": "1.86.0", + "@oxlint/binding-win32-ia32-msvc": "1.86.0", + "@oxlint/binding-win32-x64-msvc": "1.86.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=7.0.2003", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + }, + "vite-plus": { + "optional": true + } + } + }, + "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/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", + "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", + "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.18", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.0.tgz", + "integrity": "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.28.0" + }, + "peerDependencies": { + "react": "^19.3.0" + } + }, + "node_modules/react-is": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.0.tgz", + "integrity": "sha512-UpMYezM4v5/18F28aC66AEsjXIgE02kyEMH6yLdgLXu/UTfa1Ntwck/nNLrbqJsEXW7gPb0coNO9FQse9WTovA==", + "license": "MIT" + }, + "node_modules/react-router": { + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.4.tgz", + "integrity": "sha512-PUPQcMhMGRAslLcvtlPz/kmzBEWPhLdgLFrL7pLNepBL6dX0lWj4WD2cUYVgYCuT3jxvghYFg81cDTj44DhetQ==", + "license": "MIT", + "dependencies": { + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.4.tgz", + "integrity": "sha512-yrfmJHIpDG7taCpqKjT1G5B6q3O2K+RN8/fgNf0lTjCwiPbQ0ei6vXX9ZjQR+7ld8Tr7Z5xmyMnZ8YJrphWQUw==", + "license": "MIT", + "dependencies": { + "react-router": "7.18.4" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/rolldown": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.12.tgz", + "integrity": "sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.152.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.12", + "@rolldown/binding-android-arm64": "1.2.12", + "@rolldown/binding-darwin-arm64": "1.2.12", + "@rolldown/binding-darwin-x64": "1.2.12", + "@rolldown/binding-freebsd-x64": "1.2.12", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.12", + "@rolldown/binding-linux-arm64-gnu": "1.2.12", + "@rolldown/binding-linux-arm64-musl": "1.2.12", + "@rolldown/binding-linux-ppc64-gnu": "1.2.12", + "@rolldown/binding-linux-s390x-gnu": "1.2.12", + "@rolldown/binding-linux-x64-gnu": "1.2.12", + "@rolldown/binding-linux-x64-musl": "1.2.12", + "@rolldown/binding-openharmony-arm64": "1.2.12", + "@rolldown/binding-win32-arm64-msvc": "1.2.12", + "@rolldown/binding-win32-x64-msvc": "1.2.12" + } + }, + "node_modules/scheduler": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", + "license": "MIT" + }, + "node_modules/scroll-into-view-if-needed": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz", + "integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==", + "license": "MIT", + "dependencies": { + "compute-scroll-into-view": "^3.0.2" + } + }, + "node_modules/set-cookie-parser": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", + "license": "MIT" + }, + "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/string-convert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", + "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==", + "license": "MIT" + }, + "node_modules/stylis": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.4.0.tgz", + "integrity": "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==", + "license": "MIT" + }, + "node_modules/throttle-debounce": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-5.0.2.tgz", + "integrity": "sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==", + "license": "MIT", + "engines": { + "node": ">=12.22" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.2.tgz", + "integrity": "sha512-SQr1x6W5vVSbROg7vsyXIaxK9b0G7zsT68acdWWRmnBUsgDieLCRG+Rep9WdZgcposvv/GSnr4GUUBqB3vXq6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.28", + "rolldown": "~1.2.11", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.7.1", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c17fa78 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "gorodar-admin-front", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "oxlint", + "preview": "vite preview", + "mock-keycloak": "node scripts/mock-keycloak.mjs" + }, + "dependencies": { + "@ant-design/icons": "^6.3.4", + "@tanstack/react-query": "^5.104.0", + "antd": "^6.6.5", + "axios": "^1.20.0", + "dayjs": "^1.11.23", + "keycloak-js": "^26.2.4", + "react": "^19.2.8", + "react-dom": "^19.2.8", + "react-router-dom": "^7.18.4" + }, + "devDependencies": { + "@types/node": "^24.13.3", + "@types/react": "^19.2.18", + "@types/react-dom": "^19.2.7", + "@vitejs/plugin-react": "^6.1.1", + "oxlint": "^1.81.0", + "typescript": "~6.0.2", + "vite": "^8.3.0" + } +} diff --git a/public/config.js b/public/config.js new file mode 100644 index 0000000..07bdb2c --- /dev/null +++ b/public/config.js @@ -0,0 +1,3 @@ +// Runtime-конфигурация приложения. В dev пусто (используются VITE_* из .env); +// в Docker этот файл перезаписывается entrypoint-скриптом при старте контейнера. +window.__APP_CONFIG__ = {}; diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..5c072fa --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/scripts/mock-keycloak.mjs b/scripts/mock-keycloak.mjs new file mode 100644 index 0000000..308469e --- /dev/null +++ b/scripts/mock-keycloak.mjs @@ -0,0 +1,119 @@ +/** + * Мини-мок Keycloak для локальной разработки админки без настоящего Keycloak. + * + * Поднимает http://localhost:8081 c realm `gorodar` и клиентом `gorodar`, + * автоматически «логинит» любого пользователя как admin с обеими ролями + * (manage_area, manage_attraction). Токены не подписаны — только для UI-разработки. + * + * Использование: node scripts/mock-keycloak.mjs (затем npm run dev) + */ +import { createServer } from 'node:http' + +const PORT = Number(process.env.MOCK_PORT ?? 8081) +const REALM = 'gorodar' +const CLIENT_ID = 'gorodar' +const USER = 'admin' +const ROLES = ['manage_area', 'manage_attraction'] + +const base = `http://localhost:${PORT}` +const realmBase = `${base}/realms/${REALM}` +const oidcPath = `/realms/${REALM}/protocol/openid-connect` + +const b64url = (obj) => Buffer.from(JSON.stringify(obj)).toString('base64url') + +function makeToken(ttlSeconds) { + const now = Math.floor(Date.now() / 1000) + const header = b64url({ alg: 'HS256', typ: 'JWT' }) + const payload = b64url({ + iss: realmBase, + sub: 'mock-user-id', + aud: CLIENT_ID, + azp: CLIENT_ID, + iat: now, + exp: now + ttlSeconds, + preferred_username: USER, + name: 'Админ Мок', + resource_access: { [CLIENT_ID]: { roles: ROLES } }, + }) + return `${header}.${payload}.mock-signature` +} + +function sendJson(res, req, body, status = 200) { + const headers = { 'Content-Type': 'application/json' } + // keycloak-js отправляет token-запрос с credentials, поэтому эхаем Origin + // вместо '*': wildcard не сочетается с Access-Control-Allow-Credentials. + const origin = req.headers.origin + if (origin) { + headers['Access-Control-Allow-Origin'] = origin + headers['Access-Control-Allow-Credentials'] = 'true' + headers.Vary = 'Origin' + } + res.writeHead(status, headers) + res.end(JSON.stringify(body)) +} + +const server = createServer((req, res) => { + const url = new URL(req.url ?? '/', base) + console.log(new Date().toISOString(), req.method, url.pathname + (url.search || '')) + + // discovery + if (url.pathname === `/realms/${REALM}/.well-known/openid-configuration`) { + return sendJson(res, req, { + issuer: realmBase, + authorization_endpoint: `${realmBase}/protocol/openid-connect/auth`, + token_endpoint: `${realmBase}/protocol/openid-connect/token`, + userinfo_endpoint: `${realmBase}/protocol/openid-connect/userinfo`, + end_session_endpoint: `${realmBase}/protocol/openid-connect/logout`, + jwks_uri: `${realmBase}/protocol/openid-connect/certs`, + code_challenge_methods_supported: ['S256'], + }) + } + + // авторизация: сразу возвращаем код в redirect_uri (во fragment — keycloak-js + // по умолчанию использует response_mode=fragment; iss обязателен для keycloak-js 25+) + if (url.pathname === `${oidcPath}/auth`) { + const redirect = new URL(url.searchParams.get('redirect_uri') ?? base) + const fragment = new URLSearchParams({ + state: url.searchParams.get('state') ?? '', + session_state: 'mock-session', + code: 'mock-code', + iss: realmBase, + }) + res.writeHead(302, { Location: `${redirect.toString()}#${fragment.toString()}` }) + return res.end() + } + + // обмен кода на токены + if (url.pathname === `${oidcPath}/token` && req.method === 'POST') { + return sendJson(res, req, { + access_token: makeToken(300), + expires_in: 300, + refresh_expires_in: 1800, + refresh_token: makeToken(1800), + token_type: 'Bearer', + 'not-before-policy': 0, + session_state: 'mock-session', + scope: 'openid profile', + }) + } + + if (url.pathname === `${oidcPath}/userinfo`) { + return sendJson(res, req, { sub: 'mock-user-id', preferred_username: USER }) + } + + if (url.pathname === `${oidcPath}/logout`) { + const redirect = url.searchParams.get('post_logout_redirect_uri') ?? url.searchParams.get('redirect_uri') ?? base + res.writeHead(302, { Location: redirect }) + return res.end() + } + + if (url.pathname === `/realms/${REALM}/`) { + return sendJson(res, req, { realm: REALM, public: true, 'token-service': realmBase + '/protocol/openid-connect' }) + } + + sendJson(res, req, { error: 'not_found' }, 404) +}) + +server.listen(PORT, () => { + console.log(`Mock Keycloak: ${realmBase} (user=${USER}, roles=${ROLES.join(', ')})`) +}) diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000..39292a5 --- /dev/null +++ b/src/App.tsx @@ -0,0 +1,71 @@ +import { Navigate, Route, Routes } from 'react-router-dom' +import { useAuth } from '@/auth/AuthContext' +import { RequireRole } from '@/auth/RequireRole' +import { ROLE_MANAGE_AREA, ROLE_MANAGE_ATTRACTION } from '@/auth/roles' +import { AdminLayout } from '@/layouts/AdminLayout' +import { AreaListPage } from '@/pages/areas/AreaListPage' +import { AttractionDetailPage } from '@/pages/attractions/AttractionDetailPage' +import { AttractionListPage } from '@/pages/attractions/AttractionListPage' +import { ForbiddenPage } from '@/pages/ForbiddenPage' +import { NotFoundPage } from '@/pages/NotFoundPage' +import { SetListPage } from '@/pages/sets/SetListPage' +import { VisitListPage } from '@/pages/visits/VisitListPage' + +function HomeRedirect() { + const { hasRole } = useAuth() + if (hasRole(ROLE_MANAGE_AREA)) return + if (hasRole(ROLE_MANAGE_ATTRACTION)) return + return +} + +export function App() { + return ( + + }> + } /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + } /> + } /> + + + ) +} diff --git a/src/api/areas.ts b/src/api/areas.ts new file mode 100644 index 0000000..9252eb9 --- /dev/null +++ b/src/api/areas.ts @@ -0,0 +1,39 @@ +import { http } from '@/api/http' +import type { Area, CreateAreaRequest, Page, UpdateAreaRequest } from '@/api/types' + +export interface AreaListParams { + /** null/undefined — корневые зоны. */ + parentId?: string | null + page?: number + size?: number + /** Например 'name,asc'. */ + sort?: string +} + +export async function fetchAreas(params: AreaListParams = {}): Promise> { + const resp = await http.get>('/admin/areas', { + params: { + 'parent-id': params.parentId ?? undefined, + page: params.page, + size: params.size, + sort: params.sort, + }, + }) + return resp.data +} + +export async function createArea(request: CreateAreaRequest): Promise { + const resp = await http.post('/admin/areas', request) + return resp.data +} + +export async function updateArea(id: string, request: UpdateAreaRequest): Promise { + const resp = await http.patch(`/admin/areas/${id}`, request) + return resp.data +} + +/** Публичный эндпоинт (permitAll) — источник имени зоны, когда путь в дереве не загружен. */ +export async function fetchAreaName(id: string): Promise { + const resp = await http.get<{ id: string; name: string }>(`/areas/${id}`) + return resp.data.name +} diff --git a/src/api/attractions.ts b/src/api/attractions.ts new file mode 100644 index 0000000..38778be --- /dev/null +++ b/src/api/attractions.ts @@ -0,0 +1,102 @@ +import { http } from '@/api/http' +import type { + Attraction, + AttractionCard, + CreateAttractionRequest, + Page, + Photo, + UpdateAttractionRequest, +} from '@/api/types' + +export interface AttractionListParams { + areaId: string + page?: number + size?: number + sort?: string +} + +export async function fetchAttractions(params: AttractionListParams): Promise> { + const resp = await http.get>('/admin/attractions', { + params: { + 'area-id': params.areaId, + page: params.page, + size: params.size, + sort: params.sort, + }, + }) + return resp.data +} + +export async function createAttraction(request: CreateAttractionRequest): Promise { + const resp = await http.post('/admin/attractions', request) + return resp.data +} + +export async function updateAttraction( + id: string, + request: UpdateAttractionRequest, +): Promise { + const resp = await http.patch(`/admin/attractions/${id}`, request) + return resp.data +} + +export async function uploadIcon(id: string, file: File): Promise { + const form = new FormData() + form.append('file', file) + const resp = await http.post(`/admin/attractions/${id}/icon`, form, { + headers: { 'Content-Type': 'multipart/form-data' }, + }) + return resp.data +} + +/** Публичная карточка (permitAll) — источник presigned iconUrl для превью. */ +export async function fetchAttractionCard(id: string): Promise { + const resp = await http.get(`/attractions/${id}`) + return resp.data +} + +export async function fetchPhotos(attractionId: string): Promise { + const resp = await http.get(`/admin/attractions/${attractionId}/photos`) + return resp.data +} + +export async function uploadPhoto( + attractionId: string, + file: File, + sortOrder?: number, +): Promise { + const form = new FormData() + form.append('file', file) + const resp = await http.post(`/admin/attractions/${attractionId}/photos`, form, { + params: { 'sort-order': sortOrder }, + headers: { 'Content-Type': 'multipart/form-data' }, + }) + return resp.data +} + +export async function updatePhotoSortOrder( + attractionId: string, + photoId: string, + sortOrder: number, +): Promise { + const resp = await http.patch( + `/admin/attractions/${attractionId}/photos/${photoId}`, + { sortOrder }, + ) + return resp.data +} + +/** Перезапустить извлечение признаков через сервис open_cv. */ +export async function recalcPhotoFeatures( + attractionId: string, + photoId: string, +): Promise { + const resp = await http.post( + `/admin/attractions/${attractionId}/photos/${photoId}/features`, + ) + return resp.data +} + +export async function deletePhoto(attractionId: string, photoId: string): Promise { + await http.delete(`/admin/attractions/${attractionId}/photos/${photoId}`) +} diff --git a/src/api/errors.ts b/src/api/errors.ts new file mode 100644 index 0000000..b433499 --- /dev/null +++ b/src/api/errors.ts @@ -0,0 +1,49 @@ +import { isAxiosError } from 'axios' +import { notify } from '@/api/notify' + +/** Нормализованная ошибка API: код из тела ApiError + человекочитаемое сообщение. */ +export interface ApiErrorInfo { + status: number + code?: string + message: string +} + +export function toApiError(e: unknown): ApiErrorInfo { + if (isAxiosError(e)) { + const status = e.response?.status ?? 0 + const data = e.response?.data as { code?: string; message?: string } | undefined + + if (status === 0) { + return { status, message: 'Нет соединения с сервером. Убедитесь, что бэкенд запущен.' } + } + if (status === 401) { + return { status, code: data?.code, message: 'Сессия истекла. Выполните вход заново.' } + } + if (status === 403) { + return { status, code: data?.code, message: 'Недостаточно прав для этого действия.' } + } + if (data?.code && data.message) { + // Основной случай: бэкенд отдаёт { code, message, timestamp } с русским message. + return { status, code: data.code, message: data.message } + } + if (status >= 500) { + return { status, message: 'Внутренняя ошибка сервера. Попробуйте позже.' } + } + return { + status, + code: data?.code, + message: data?.message ?? `Ошибка запроса (HTTP ${status})`, + } + } + return { status: 0, message: e instanceof Error ? e.message : 'Неизвестная ошибка' } +} + +/** Показать ошибку API пользователю (notification). */ +export function notifyApiError(e: unknown, title = 'Ошибка'): void { + const info = toApiError(e) + notify('error', title, info.message) +} + +export function notifySuccess(message: string, description?: string): void { + notify('success', message, description) +} diff --git a/src/api/http.ts b/src/api/http.ts new file mode 100644 index 0000000..54ea9ac --- /dev/null +++ b/src/api/http.ts @@ -0,0 +1,38 @@ +import axios, { type InternalAxiosRequestConfig } from 'axios' +import { env } from '@/env' +import { getToken, keycloak, login } from '@/auth/keycloak' + +export const http = axios.create({ + baseURL: env.apiBaseUrl, +}) + +interface RetriableConfig extends InternalAxiosRequestConfig { + _retried?: boolean +} + +http.interceptors.request.use(async (config) => { + if (keycloak.authenticated) { + config.headers.Authorization = `Bearer ${await getToken()}` + } + return config +}) + +http.interceptors.response.use( + (response) => response, + async (error: unknown) => { + if (axios.isAxiosError(error) && error.response?.status === 401) { + const original = error.config as RetriableConfig | undefined + if (original && !original._retried && keycloak.authenticated) { + original._retried = true + try { + // Минимальный minValidity фактически форсирует refresh. + await keycloak.updateToken(9999) + return http.request(original) + } catch { + login() + } + } + } + return Promise.reject(error) + }, +) diff --git a/src/api/notify.ts b/src/api/notify.ts new file mode 100644 index 0000000..428119b --- /dev/null +++ b/src/api/notify.ts @@ -0,0 +1,17 @@ +import type { ReactNode } from 'react' + +export type NotifyKind = 'success' | 'error' | 'info' + +export type Notifier = (kind: NotifyKind, message: ReactNode, description?: ReactNode) => void + +// Мост между axios-перехватчиками (вне React) и antd notification (внутри React). +// Корневой компонент регистрирует here функцию из App.useApp(). +let notifier: Notifier | null = null + +export function setNotifier(fn: Notifier | null): void { + notifier = fn +} + +export function notify(kind: NotifyKind, message: ReactNode, description?: ReactNode): void { + notifier?.(kind, message, description) +} diff --git a/src/api/sets.ts b/src/api/sets.ts new file mode 100644 index 0000000..6b6b15c --- /dev/null +++ b/src/api/sets.ts @@ -0,0 +1,43 @@ +import { http } from '@/api/http' +import type { ActiveSet, AttractionSet } from '@/api/types' + +export async function fetchSets(areaId: string): Promise { + const resp = await http.get(`/admin/areas/${areaId}/sets`) + return resp.data +} + +export async function createSet(areaId: string, name: string): Promise { + const resp = await http.post(`/admin/areas/${areaId}/sets`, { name }) + return resp.data +} + +export async function renameSet(id: string, name: string): Promise { + const resp = await http.patch(`/admin/sets/${id}`, { name }) + return resp.data +} + +/** Полная замена состава; порядок id задаёт порядок элементов. */ +export async function putSetItems(id: string, attractionIds: string[]): Promise { + const resp = await http.put(`/admin/sets/${id}/items`, { attractionIds }) + return resp.data +} + +export async function removeSetItem(id: string, attractionId: string): Promise { + await http.delete(`/admin/sets/${id}/items/${attractionId}`) +} + +export async function activateSet(id: string): Promise { + const resp = await http.post(`/admin/sets/${id}/activate`) + return resp.data +} + +export async function archiveSet(id: string): Promise { + const resp = await http.post(`/admin/sets/${id}/archive`) + return resp.data +} + +/** Публичный активный набор зоны — единственный способ прочитать состав набора. */ +export async function fetchActiveSet(areaId: string): Promise { + const resp = await http.get(`/areas/${areaId}/active-set`) + return resp.data +} diff --git a/src/api/types.ts b/src/api/types.ts new file mode 100644 index 0000000..3971127 --- /dev/null +++ b/src/api/types.ts @@ -0,0 +1,146 @@ +/** + * Типы, зеркалящие DTO бэкенда (ru.gorodar.api.dto). + * JSON-поля camelCase, query-параметры kebab-case — конвенция бэкенда. + */ + +/** Spring Data Page (сериализация PageImpl). */ +export interface Page { + content: T[] + totalElements: number + totalPages: number + number: number + size: number + first: boolean + last: boolean + empty: boolean +} + +// ---------- Зоны ---------- + +export interface Area { + id: string + parentId: string | null + name: string +} + +export interface CreateAreaRequest { + name: string + parentId?: string | null +} + +/** Частичное обновление: отсутствующее поле = «не менять». */ +export interface UpdateAreaRequest { + name?: string + parentId?: string | null +} + +// ---------- Достопримечательности ---------- + +export type CvProfile = 'facade' | 'monument' | 'repetitive' + +export interface Attraction { + id: string + areaId: string + name: string + /** Сырой ключ S3, не URL (для превью используется публичный эндпоинт). */ + iconKey: string | null + about: string | null + latitude: number | null + longitude: number | null + address: string | null + facts: string[] | null + cvProfile: CvProfile + photoCount: number +} + +export interface CreateAttractionRequest { + areaId: string + name: string + cvProfile: CvProfile + about?: string + latitude?: number + longitude?: number + address?: string + facts?: string[] +} + +export interface UpdateAttractionRequest { + name?: string + cvProfile?: CvProfile + about?: string + latitude?: number + longitude?: number + address?: string + facts?: string[] +} + +// ---------- Эталонные фото ---------- + +export interface Photo { + id: string + /** Presigned GET URL (TTL 1 час) — не кэшировать надолго. */ + photoUrl: string + sortOrder: number + featureFormatVersion: number + algoId: string + keypointsCount: number + /** UTC, ISO-8601 без зоны. */ + createdAt: string +} + +// ---------- Наборы ---------- + +export type SetStatus = 'DRAFT' | 'ACTIVE' | 'ARCHIVED' + +export interface AttractionSet { + id: string + areaId: string + name: string + status: SetStatus + itemCount: number +} + +/** Из публичного GET /areas/{areaId}/active-set — источник текущего состава ACTIVE-набора. */ +export interface ActiveSet { + id: string + name: string + attractions: { id: string; name: string; iconUrl: string | null; visited: boolean }[] +} + +// ---------- Визиты ---------- + +export type Verdict = 'match' | 'uncertain' | 'no_match' + +export interface Visit { + id: string + attractionId: string + attractionName: string + /** UTC, ISO-8601 без зоны. */ + visitedAt: string + verdict: Verdict + confidence: number +} + +export interface VisitFilter { + areaId?: string + attractionId?: string + userId?: string + /** YYYY-MM-DD, включительно. */ + from?: string + /** YYYY-MM-DD, включительно (бэкенд трактует как дату «по»). */ + to?: string +} + +// ---------- Публичный каталог ---------- + +export interface AttractionCard { + id: string + name: string + iconUrl: string | null + about: string | null + latitude: number | null + longitude: number | null + address: string | null + facts: string[] | null + photoUrl: string | null +} diff --git a/src/api/visits.ts b/src/api/visits.ts new file mode 100644 index 0000000..564a7d2 --- /dev/null +++ b/src/api/visits.ts @@ -0,0 +1,27 @@ +import { http } from '@/api/http' +import type { Page, Visit, VisitFilter } from '@/api/types' + +export interface VisitListParams { + page?: number + size?: number + /** Например 'visitedAt,desc'. */ + sort?: string +} + +/** Фильтр передаётся телом запроса, пагинация — query-параметрами (так задумано API). */ +export async function fetchVisits( + filter: VisitFilter, + params: VisitListParams = {}, +): Promise> { + const body: VisitFilter = {} + if (filter.areaId) body.areaId = filter.areaId + if (filter.attractionId) body.attractionId = filter.attractionId + if (filter.userId && filter.userId.trim()) body.userId = filter.userId.trim() + if (filter.from) body.from = filter.from + if (filter.to) body.to = filter.to + + const resp = await http.post>('/admin/visits', body, { + params: { page: params.page, size: params.size, sort: params.sort }, + }) + return resp.data +} diff --git a/src/auth/AuthContext.tsx b/src/auth/AuthContext.tsx new file mode 100644 index 0000000..5792595 --- /dev/null +++ b/src/auth/AuthContext.tsx @@ -0,0 +1,68 @@ +import { createContext, useContext, useEffect, useState, type ReactNode } from 'react' +import { initAuth, login, logout, readProfile } from '@/auth/keycloak' + +interface AuthContextValue { + /** Keycloak инициализацию завершил (успешно или с ошибкой). */ + ready: boolean + authenticated: boolean + userName: string + roles: string[] + hasRole: (role: string) => boolean + login: () => void + logout: () => void +} + +const AuthContext = createContext(null) + +interface AuthState { + ready: boolean + authenticated: boolean + userName: string + roles: string[] +} + +const initialState: AuthState = { ready: false, authenticated: false, userName: '', roles: [] } + +export function AuthProvider({ children }: { children: ReactNode }) { + const [state, setState] = useState(initialState) + + useEffect(() => { + let cancelled = false + initAuth() + .then((authenticated) => { + if (cancelled) return + setState({ + ready: true, + authenticated, + ...(authenticated ? readProfile() : { userName: '', roles: [] }), + }) + }) + .catch((err) => { + // Keycloak недоступен и т.п. — показываем экран ошибки вместо редиректа-цикла. + console.error('Keycloak init failed', err) + if (!cancelled) setState({ ready: true, authenticated: false, userName: '', roles: [] }) + }) + return () => { + cancelled = true + } + }, []) + + return ( + state.roles.includes(role), + login, + logout, + }} + > + {children} + + ) +} + +export function useAuth(): AuthContextValue { + const ctx = useContext(AuthContext) + if (!ctx) throw new Error('useAuth должен использоваться внутри ') + return ctx +} diff --git a/src/auth/RequireRole.tsx b/src/auth/RequireRole.tsx new file mode 100644 index 0000000..056611f --- /dev/null +++ b/src/auth/RequireRole.tsx @@ -0,0 +1,12 @@ +import type { ReactNode } from 'react' +import { Navigate } from 'react-router-dom' +import { useAuth } from '@/auth/AuthContext' + +/** Пропускает детей только при наличии роли, иначе — на страницу «нет доступа». */ +export function RequireRole({ role, children }: { role: string; children: ReactNode }) { + const { ready, authenticated, hasRole } = useAuth() + + if (!ready) return null + if (!authenticated || !hasRole(role)) return + return <>{children} +} diff --git a/src/auth/keycloak.ts b/src/auth/keycloak.ts new file mode 100644 index 0000000..78fb6b7 --- /dev/null +++ b/src/auth/keycloak.ts @@ -0,0 +1,55 @@ +import Keycloak from 'keycloak-js' +import { env } from '@/env' + +export const keycloak = new Keycloak({ + url: env.keycloak.url, + realm: env.keycloak.realm, + clientId: env.keycloak.clientId, +}) + +let initPromise: Promise | null = null + +export interface UserProfile { + userName: string + roles: string[] +} + +/** Инициализация Keycloak (single-flight: повторные вызовы возвращают тот же промис). */ +export function initAuth(): Promise { + if (!initPromise) { + initPromise = keycloak.init({ + onLoad: 'login-required', + pkceMethod: 'S256', + checkLoginIframe: false, + }) + } + return initPromise +} + +/** Актуальный access-токен; при истечении в ближайшие 30 с — молча обновляет. */ +export async function getToken(): Promise { + if (!keycloak.authenticated) return '' + await keycloak.updateToken(30) + return keycloak.token ?? '' +} + +export function readProfile(): UserProfile { + const parsed = keycloak.tokenParsed as Record | undefined + const resourceAccess = parsed?.['resource_access'] as + | Record + | undefined + const roles = resourceAccess?.[env.keycloak.clientId]?.roles ?? [] + const userName = + (parsed?.['preferred_username'] as string | undefined) ?? + (parsed?.['name'] as string | undefined) ?? + 'пользователь' + return { userName, roles } +} + +export function login(): void { + void keycloak.login() +} + +export function logout(): void { + void keycloak.logout({ redirectUri: window.location.origin }) +} diff --git a/src/auth/roles.ts b/src/auth/roles.ts new file mode 100644 index 0000000..a43b384 --- /dev/null +++ b/src/auth/roles.ts @@ -0,0 +1,3 @@ +/** Ключевые роли (клиентские роли Keycloak клиента gorodar). */ +export const ROLE_MANAGE_AREA = 'manage_area' +export const ROLE_MANAGE_ATTRACTION = 'manage_attraction' diff --git a/src/components/AreaTreeSelect.tsx b/src/components/AreaTreeSelect.tsx new file mode 100644 index 0000000..8460f70 --- /dev/null +++ b/src/components/AreaTreeSelect.tsx @@ -0,0 +1,161 @@ +import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react' +import { TreeSelect, type TreeSelectProps } from 'antd' +import { fetchAreas, fetchAreaName } from '@/api/areas' +import { notifyApiError } from '@/api/errors' + +const ROOT_KEY = '__root__' + +interface AreaTreeNode { + value: string + title: string + isLeaf?: boolean + children?: AreaTreeNode[] +} + +interface AreaTreeSelectProps { + value?: string | null + onChange?: (value: string | null) => void + placeholder?: string + disabled?: boolean + allowClear?: boolean + style?: CSSProperties + /** Скрыть эту зону (например, саму зону при смене родителя). */ + excludeId?: string + /** Показать виртуальный узел «Корень»: его выбор означает parentId = null. */ + rootAsOption?: boolean +} + +function filterTree(nodes: AreaTreeNode[], excludeId?: string): AreaTreeNode[] { + if (!excludeId) return nodes + return nodes + .filter((n) => n.value !== excludeId) + .map((n) => ({ + ...n, + children: n.children ? filterTree(n.children, excludeId) : undefined, + })) +} + +function containsValue(nodes: AreaTreeNode[], value: string): boolean { + return nodes.some( + (n) => n.value === value || (n.children ? containsValue(n.children, value) : false), + ) +} + +function insertChildren( + nodes: AreaTreeNode[], + key: string, + children: AreaTreeNode[], +): AreaTreeNode[] { + return nodes.map((n) => { + if (n.value === key) return { ...n, children } + if (n.children) return { ...n, children: insertChildren(n.children, key, children) } + return n + }) +} + +/** + * Лениво загружаемый TreeSelect зон: дети подтягиваются при раскрытии узла + * (GET /admin/areas?parent-id=…&size=100 — глубже 100 детей на уровень не видно). + * Если значение задано снаружи (например, из URL) и путь до него ещё не загружен, + * имя зоны разрешается через публичный GET /areas/{id}. + */ +export function AreaTreeSelect({ + value, + onChange, + placeholder = 'Выберите зону', + disabled, + allowClear, + style, + excludeId, + rootAsOption, +}: AreaTreeSelectProps) { + const [roots, setRoots] = useState([]) + const [resolvedName, setResolvedName] = useState(null) + const loadedKeys = useRef(new Set()) + const rootLoaded = useRef(false) + const resolvedValues = useRef(new Set()) + + useEffect(() => { + if (rootLoaded.current) return + rootLoaded.current = true + void loadChildren(ROOT_KEY) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + + async function loadChildren(key: string): Promise { + if (loadedKeys.current.has(key)) return + loadedKeys.current.add(key) + try { + const page = await fetchAreas({ + parentId: key === ROOT_KEY ? null : key, + size: 100, + sort: 'name,asc', + }) + const children: AreaTreeNode[] = page.content.map((area) => ({ + value: area.id, + title: area.name, + isLeaf: false, + })) + if (key === ROOT_KEY) setRoots(children) + else setRoots((prev) => insertChildren(prev, key, children)) + } catch (e) { + loadedKeys.current.delete(key) + notifyApiError(e, 'Не удалось загрузить зоны') + } + } + + const needsNameResolution = value != null && value !== ROOT_KEY && !containsValue(roots, value) + + useEffect(() => { + if (!needsNameResolution || !value || resolvedValues.current.has(value)) return + resolvedValues.current.add(value) + let cancelled = false + fetchAreaName(value) + .then((name) => { + if (!cancelled) setResolvedName(name) + }) + .catch((e) => notifyApiError(e, 'Не удалось получить имя зоны')) + return () => { + cancelled = true + } + }, [needsNameResolution, value]) + + const treeData = useMemo(() => { + const visible = filterTree(roots, excludeId) + const withSynthetic = + value && resolvedName && !containsValue(visible, value) + ? [{ value, title: resolvedName, isLeaf: true }, ...visible] + : visible + if (rootAsOption) { + return [{ value: ROOT_KEY, title: 'Корень', isLeaf: false, children: withSynthetic }] + } + return withSynthetic + }, [roots, excludeId, rootAsOption, value, resolvedName]) + + const handleChange: TreeSelectProps['onChange'] = (selected) => { + if (selected == null || selected === '') { + onChange?.(null) + return + } + onChange?.(String(selected)) + } + + return ( + { + const key = node.value === undefined ? ROOT_KEY : String(node.value) + await loadChildren(key) + }} + showSearch + treeNodeFilterProp="title" + /> + ) +} diff --git a/src/env.ts b/src/env.ts new file mode 100644 index 0000000..34dd067 --- /dev/null +++ b/src/env.ts @@ -0,0 +1,37 @@ +/** + * Конфигурация приложения. + * + * Приоритет источников: + * 1. window.__APP_CONFIG__ — инжектится файлом /config.js. В Docker этот файл + * генерируется entrypoint-скриптом из переменных окружения контейнера + * (KEYCLOAK_URL, KEYCLOAK_REALM, KEYCLOAK_CLIENT_ID, API_BASE_URL). + * 2. VITE_* — переменные Vite из .env (локальная разработка). + * 3. Значения по умолчанию ниже. + */ +export interface AppConfig { + apiBaseUrl?: string + keycloak?: { + url?: string + realm?: string + clientId?: string + } +} + +declare global { + interface Window { + __APP_CONFIG__?: AppConfig + } +} + +const runtime: AppConfig = window.__APP_CONFIG__ ?? {} + +export const env = { + apiBaseUrl: + runtime.apiBaseUrl ?? import.meta.env.VITE_API_BASE_URL ?? '/api', + keycloak: { + url: runtime.keycloak?.url ?? import.meta.env.VITE_KEYCLOAK_URL ?? 'http://localhost:8081', + realm: runtime.keycloak?.realm ?? import.meta.env.VITE_KEYCLOAK_REALM ?? 'gorodar', + clientId: + runtime.keycloak?.clientId ?? import.meta.env.VITE_KEYCLOAK_CLIENT_ID ?? 'gorodar', + }, +} as const diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..2c6218e --- /dev/null +++ b/src/index.css @@ -0,0 +1,36 @@ +html, +body { + margin: 0; + padding: 0; +} + +body { + font-family: + -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, + 'Noto Sans', sans-serif; + -webkit-font-smoothing: antialiased; +} + +#root { + min-height: 100vh; +} + +.fullscreen-spin { + display: flex; + align-items: center; + justify-content: center; + min-height: 100vh; +} + +.page-header-flex { + display: flex; + align-items: center; + justify-content: space-between; + gap: 16px; + flex-wrap: wrap; + margin-bottom: 16px; +} + +.page-title { + margin: 0; +} diff --git a/src/layouts/AdminLayout.tsx b/src/layouts/AdminLayout.tsx new file mode 100644 index 0000000..948fd2f --- /dev/null +++ b/src/layouts/AdminLayout.tsx @@ -0,0 +1,143 @@ +import { + ApartmentOutlined, + BarChartOutlined, + CameraOutlined, + LogoutOutlined, + OrderedListOutlined, + UserOutlined, +} from '@ant-design/icons' +import { Avatar, Button, Layout, Menu, Result, Space, Spin, Tag, Typography } from 'antd' +import { Outlet, useLocation } from 'react-router-dom' +import { useAuth } from '@/auth/AuthContext' +import { ROLE_MANAGE_AREA, ROLE_MANAGE_ATTRACTION } from '@/auth/roles' + +const { Header, Sider, Content } = Layout + +const ROLE_LABELS: Record = { + [ROLE_MANAGE_AREA]: 'управление зонами', + [ROLE_MANAGE_ATTRACTION]: 'управление контентом', +} + +export function AdminLayout() { + const { ready, authenticated, userName, roles, logout } = useAuth() + const location = useLocation() + + if (!ready) { + return ( +
+ +
+ +
+ ) + } + + if (!authenticated) { + return ( + + Войти заново + + } + /> + ) + } + + const hasManageArea = roles.includes(ROLE_MANAGE_AREA) + const hasManageAttraction = roles.includes(ROLE_MANAGE_ATTRACTION) + + if (!hasManageArea && !hasManageAttraction) { + return ( + } onClick={logout}> + Выйти + + } + /> + ) + } + + const menuItems = [ + hasManageArea && { key: '/areas', icon: , label: 'Зоны' }, + hasManageAttraction && { + key: '/attractions', + icon: , + label: 'Достопримечательности', + }, + hasManageArea && { + key: '/sets', + icon: , + label: 'Наборы', + }, + hasManageArea && { key: '/visits', icon: , label: 'Визиты' }, + ].filter(Boolean) as { key: string; icon: React.ReactNode; label: string }[] + + const selectedKey = + '/' + + (location.pathname.split('/')[1] ?? '') + + return ( + +
+ + + Городар · Админ-панель + + + + + {roles + .filter((role) => ROLE_LABELS[role]) + .map((role) => ( + + {ROLE_LABELS[role]} + + ))} + + + } /> + + {userName} + + + + +
+ + + + + + + + + + ) +} diff --git a/src/main.tsx b/src/main.tsx new file mode 100644 index 0000000..e9850cd --- /dev/null +++ b/src/main.tsx @@ -0,0 +1,55 @@ +import { useEffect } from 'react' +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { App as AntdApp, ConfigProvider } from 'antd' +import ruRU from 'antd/locale/ru_RU' +import dayjs from 'dayjs' +import 'dayjs/locale/ru' +import { BrowserRouter } from 'react-router-dom' +import { App } from '@/App' +import { AuthProvider } from '@/auth/AuthContext' +import { setNotifier } from '@/api/notify' +import '@/index.css' + +dayjs.locale('ru') + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: 1, + refetchOnWindowFocus: false, + }, + }, +}) + +/** Подключает antd notification к мосту, которым пользуются axios-перехватчики. */ +function NotifierBridge() { + const { notification } = AntdApp.useApp() + useEffect(() => { + setNotifier((kind, message, description) => { + if (kind === 'success') notification.success({ message, description }) + else if (kind === 'error') notification.error({ message, description }) + else notification.info({ message, description }) + }) + return () => setNotifier(null) + }, [notification]) + return null +} + +createRoot(document.getElementById('root')!).render( + + + + + + + + + + + + + + , +) diff --git a/src/pages/ForbiddenPage.tsx b/src/pages/ForbiddenPage.tsx new file mode 100644 index 0000000..c3d1798 --- /dev/null +++ b/src/pages/ForbiddenPage.tsx @@ -0,0 +1,11 @@ +import { Result } from 'antd' + +export function ForbiddenPage() { + return ( + + ) +} diff --git a/src/pages/NotFoundPage.tsx b/src/pages/NotFoundPage.tsx new file mode 100644 index 0000000..669acbe --- /dev/null +++ b/src/pages/NotFoundPage.tsx @@ -0,0 +1,18 @@ +import { Button, Result } from 'antd' +import { Link } from 'react-router-dom' + +export function NotFoundPage() { + return ( + + + На главную + + + } + /> + ) +} diff --git a/src/pages/areas/AreaListPage.tsx b/src/pages/areas/AreaListPage.tsx new file mode 100644 index 0000000..6301d67 --- /dev/null +++ b/src/pages/areas/AreaListPage.tsx @@ -0,0 +1,249 @@ +import { useState } from 'react' +import { keepPreviousData, useMutation, useQuery, useQueryClient } from '@tanstack/react-query' +import { Breadcrumb, Button, Empty, Form, Input, Modal, Space, Table, Typography } from 'antd' +import type { ColumnsType } from 'antd/es/table' +import { createArea, fetchAreas, updateArea } from '@/api/areas' +import { notifyApiError, notifySuccess } from '@/api/errors' +import type { Area } from '@/api/types' +import { AreaTreeSelect } from '@/components/AreaTreeSelect' + +interface TrailItem { + id: string + name: string +} + +interface CreateFormValues { + name: string +} + +interface EditFormValues { + name: string + /** undefined — не менять; null — сделать корневой; строка — новый родитель. */ + newParent?: string | null +} + +const PAGE_SIZE = 20 + +export function AreaListPage() { + const queryClient = useQueryClient() + const [parentId, setParentId] = useState(null) + const [trail, setTrail] = useState([]) + const [page, setPage] = useState(0) + + const [createOpen, setCreateOpen] = useState(false) + const [editing, setEditing] = useState(null) + const [createForm] = Form.useForm() + const [editForm] = Form.useForm() + + const areasQuery = useQuery({ + queryKey: ['admin-areas', parentId ?? 'root', page], + queryFn: () => + fetchAreas({ parentId, page, size: PAGE_SIZE, sort: 'name,asc' }), + placeholderData: keepPreviousData, + }) + + const invalidate = () => { + void queryClient.invalidateQueries({ queryKey: ['admin-areas'] }) + } + + const createMutation = useMutation({ + mutationFn: createArea, + onSuccess: (area) => { + notifySuccess('Зона создана', area.name) + setCreateOpen(false) + createForm.resetFields() + invalidate() + }, + onError: (e) => notifyApiError(e, 'Не удалось создать зону'), + }) + + const updateMutation = useMutation({ + mutationFn: ({ id, request }: { id: string; request: EditFormValues }) => { + const body: { name?: string; parentId?: string | null } = {} + if (request.name && request.name.trim()) body.name = request.name.trim() + if (request.newParent !== undefined) { + body.parentId = request.newParent === '__root__' ? null : request.newParent + } + return updateArea(id, body) + }, + onSuccess: (area) => { + notifySuccess('Зона обновлена', area.name) + setEditing(null) + invalidate() + }, + onError: (e) => notifyApiError(e, 'Не удалось обновить зону'), + }) + + const openArea = (area: Area) => { + setTrail((prev) => [...prev, { id: area.id, name: area.name }]) + setParentId(area.id) + setPage(0) + } + + const navigateTo = (index: number) => { + // -1 — корень, иначе обрезаем путь до index включительно. + if (index < 0) { + setTrail([]) + setParentId(null) + } else { + const item = trail[index] + setTrail(trail.slice(0, index + 1)) + setParentId(item.id) + } + setPage(0) + } + + const columns: ColumnsType = [ + { + title: 'Название', + dataIndex: 'name', + key: 'name', + render: (_, area) => ( + + ), + }, + { + title: 'Действия', + key: 'actions', + width: 200, + render: (_, area) => ( + + + + + ), + }, + ] + + const data = areasQuery.data + + return ( + <> +
+ + Зоны + + +
+ + navigateTo(-1)}> + Корень + + ), + }, + ...trail.map((item, index) => ({ + title: + index === trail.length - 1 ? ( + item.name + ) : ( + + ), + })), + ]} + /> + + + rowKey="id" + columns={columns} + dataSource={data?.content ?? []} + loading={areasQuery.isLoading} + locale={{ + emptyText: , + }} + pagination={{ + current: (data?.number ?? 0) + 1, + pageSize: data?.size ?? PAGE_SIZE, + total: data?.totalElements ?? 0, + showSizeChanger: false, + onChange: (p) => setPage(p - 1), + }} + /> + + setCreateOpen(false)} + confirmLoading={createMutation.isPending} + onOk={async () => { + const values = await createForm.validateFields() + createMutation.mutate({ + name: values.name.trim(), + parentId: parentId ?? undefined, + }) + }} + > +
+ + + + + + +
+
+ + setEditing(null)} + confirmLoading={updateMutation.isPending} + onOk={async () => { + const values = await editForm.validateFields() + updateMutation.mutate({ id: editing!.id, request: values }) + }} + > +
+ + + + + + +
+
+ + ) +} diff --git a/src/pages/attractions/AttractionDetailPage.tsx b/src/pages/attractions/AttractionDetailPage.tsx new file mode 100644 index 0000000..2a1e767 --- /dev/null +++ b/src/pages/attractions/AttractionDetailPage.tsx @@ -0,0 +1,267 @@ +import { useState } from 'react' +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query' +import { + Button, + Card, + Descriptions, + Form, + Image, + Modal, + Result, + Space, + Spin, + Tag, + Typography, + Upload, +} from 'antd' +import { ArrowLeftOutlined, EditOutlined, UploadOutlined } from '@ant-design/icons' +import type { UploadProps } from 'antd' +import { Link, useLocation, useParams, useSearchParams } from 'react-router-dom' +import { fetchAttractionCard, fetchAttractions, updateAttraction, uploadIcon } from '@/api/attractions' +import { notifyApiError, notifySuccess } from '@/api/errors' +import { notify } from '@/api/notify' +import type { Attraction } from '@/api/types' +import { cvProfileMeta } from '@/utils/format' +import { + AttractionForm, + toUpdateRequest, + type AttractionFormValues, +} from '@/pages/attractions/AttractionForm' +import { PhotoGallery } from '@/pages/attractions/PhotoGallery' + +const MAX_FILE_SIZE = 20 * 1024 * 1024 + +export function AttractionDetailPage() { + const { id } = useParams<{ id: string }>() + const location = useLocation() + const [searchParams] = useSearchParams() + const areaId = searchParams.get('area') + const queryClient = useQueryClient() + + const passedState = (location.state as { attraction?: Attraction } | null)?.attraction + // Карточка = последний ответ мутации (или router state), иначе — восстановление из списка зоны. + const [mutated, setMutated] = useState(passedState ?? null) + const [editOpen, setEditOpen] = useState(false) + const [editForm] = Form.useForm() + + // В админ-API нет GET по id — при прямом открытии/обновлении страницы + // восстанавливаем карточку из постраничного списка зоны. + const fallbackQuery = useQuery({ + queryKey: ['admin-attractions', areaId ?? 'none', 0, 'fallback'], + queryFn: () => fetchAttractions({ areaId: areaId!, page: 0, size: 100, sort: 'name,asc' }), + enabled: mutated == null && areaId != null && id != null, + }) + const fallback = + mutated == null ? (fallbackQuery.data?.content.find((a) => a.id === id) ?? null) : null + const attraction = mutated ?? fallback + + // Публичная карточка — единственный источник presigned iconUrl для превью. + const cardQuery = useQuery({ + queryKey: ['public-card', id], + queryFn: () => fetchAttractionCard(id!), + enabled: id != null, + staleTime: 30 * 60 * 1000, // presigned URL живёт 1 час + }) + + const editMutation = useMutation({ + mutationFn: (request: AttractionFormValues) => updateAttraction(id!, toUpdateRequest(request)), + onSuccess: (updated) => { + notifySuccess('Карточка обновлена', updated.name) + setMutated(updated) + setEditOpen(false) + void queryClient.invalidateQueries({ queryKey: ['admin-attractions'] }) + }, + onError: (e) => notifyApiError(e, 'Не удалось обновить карточку'), + }) + + const iconMutation = useMutation({ + mutationFn: (file: File) => uploadIcon(id!, file), + onSuccess: (updated) => { + notifySuccess('Иконка обновлена') + setMutated(updated) + void queryClient.invalidateQueries({ queryKey: ['public-card', id] }) + }, + onError: (e) => notifyApiError(e, 'Не удалось загрузить иконку'), + }) + + const iconUploadProps: UploadProps = { + accept: 'image/jpeg,image/png,image/webp,image/svg+xml', + showUploadList: false, + beforeUpload: (file) => { + if (file.size > MAX_FILE_SIZE) { + notify('error', 'Файл больше 20 МБ') + return Upload.LIST_IGNORE + } + return true + }, + customRequest: ({ file, onSuccess, onError }) => { + iconMutation + .mutateAsync(file as File) + .then(() => onSuccess?.(null)) + .catch((e: unknown) => onError?.(e as Error)) + }, + } + + if (attraction == null) { + if (fallbackQuery.isLoading || fallbackQuery.isFetching) { + return ( +
+ +
+ ) + } + if (areaId == null) { + return ( + + + К списку + + + } + /> + ) + } + return ( + + + К списку зоны + + + } + /> + ) + } + + const iconUrl = cardQuery.data?.iconUrl + + return ( + <> + +
+ + + + + + {attraction.name} + + + +
+ + + + {attraction.name} + + + {cvProfileMeta[attraction.cvProfile].label} + + + {attraction.address ?? '—'} + + {attraction.latitude != null && attraction.longitude != null + ? `${attraction.latitude}, ${attraction.longitude}` + : '—'} + + + {attraction.photoCount} + + + {attraction.about ?? '—'} + + + {attraction.facts?.length ? ( +
    + {attraction.facts.map((fact) => ( +
  • {fact}
  • + ))} +
+ ) : ( + '—' + )} +
+
+
+ + + + {iconUrl ? ( + + ) : ( +
+ нет +
+ )} + + + + + + JPEG / PNG / WebP / SVG, до 20 МБ. Перезаписывает текущую иконку. + + + Ключ в S3:{' '} + + {attraction.iconKey ?? '—'} + + + +
+
+ + + + setMutated((prev) => + prev ? { ...prev, photoCount: prev.photoCount + delta } : prev, + ) + } + /> + +
+ + setEditOpen(false)} + confirmLoading={editMutation.isPending} + onOk={async () => { + const values = await editForm.validateFields() + editMutation.mutate(values) + }} + > + + + + ) +} diff --git a/src/pages/attractions/AttractionForm.tsx b/src/pages/attractions/AttractionForm.tsx new file mode 100644 index 0000000..f9624bf --- /dev/null +++ b/src/pages/attractions/AttractionForm.tsx @@ -0,0 +1,176 @@ +import type { FormInstance } from 'antd' +import { Button, Form, Input, InputNumber, Select, Space } from 'antd' +import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons' +import type { CreateAttractionRequest, CvProfile, UpdateAttractionRequest } from '@/api/types' +import { cvProfileOptions } from '@/utils/format' + +export interface AttractionFormValues { + name: string + cvProfile: CvProfile + about?: string + address?: string + latitude?: number | null + longitude?: number | null + facts?: (string | undefined)[] +} + +export interface AttractionFormInitialValues { + name: string + cvProfile: CvProfile + about?: string | null + address?: string | null + latitude?: number | null + longitude?: number | null + facts?: string[] | null +} + +function normalizeFacts(facts: (string | undefined)[] | undefined): string[] { + return (facts ?? []) + .map((f) => f?.trim()) + .filter((f): f is string => !!f) +} + +export function toCreateRequest( + areaId: string, + v: AttractionFormValues, +): CreateAttractionRequest { + const facts = normalizeFacts(v.facts) + return { + areaId, + name: v.name.trim(), + cvProfile: v.cvProfile, + about: v.about?.trim() || undefined, + address: v.address?.trim() || undefined, + latitude: v.latitude ?? undefined, + longitude: v.longitude ?? undefined, + facts: facts.length ? facts : undefined, + } +} + +/** + * PATCH-семантика бэкенда: отсутствующее поле = «не менять», + * поэтому пустые значения просто не отправляем (API не поддерживает очистку полей). + */ +export function toUpdateRequest(v: AttractionFormValues): UpdateAttractionRequest { + const request: UpdateAttractionRequest = {} + const name = v.name?.trim() + if (name) request.name = name + if (v.cvProfile) request.cvProfile = v.cvProfile + const about = v.about?.trim() + if (about) request.about = about + const address = v.address?.trim() + if (address) request.address = address + if (v.latitude != null) request.latitude = v.latitude + if (v.longitude != null) request.longitude = v.longitude + const facts = normalizeFacts(v.facts) + if (facts.length) request.facts = facts + return request +} + +export function AttractionForm({ + form, + initialValues, +}: { + form: FormInstance + initialValues?: AttractionFormInitialValues +}) { + return ( +
+ + + + + + + + + value == null || (value >= -90 && value <= 90) + ? Promise.resolve() + : Promise.reject(new Error('Диапазон −90…90')), + }, + ]} + > + + + + value == null || (value >= -180 && value <= 180) + ? Promise.resolve() + : Promise.reject(new Error('Диапазон −180…180')), + }, + ]} + > + + + + + + {(fields, { add, remove }) => ( + <> + {fields.map((field) => ( + + + + + remove(field.name)} /> + + ))} + + + )} + + +
+ ) +} diff --git a/src/pages/attractions/AttractionListPage.tsx b/src/pages/attractions/AttractionListPage.tsx new file mode 100644 index 0000000..7db3c8c --- /dev/null +++ b/src/pages/attractions/AttractionListPage.tsx @@ -0,0 +1,158 @@ +import { useState } from 'react' +import { keepPreviousData, useMutation, useQuery } from '@tanstack/react-query' +import { Button, Empty, Form, Modal, Space, Table, Tag, Typography } from 'antd' +import type { ColumnsType } from 'antd/es/table' +import { useNavigate, useSearchParams } from 'react-router-dom' +import { createAttraction, fetchAttractions } from '@/api/attractions' +import { notifyApiError, notifySuccess } from '@/api/errors' +import type { Attraction } from '@/api/types' +import { AreaTreeSelect } from '@/components/AreaTreeSelect' +import { cvProfileMeta } from '@/utils/format' +import { + AttractionForm, + toCreateRequest, + type AttractionFormValues, +} from '@/pages/attractions/AttractionForm' + +const PAGE_SIZE = 20 + +export function AttractionListPage() { + const navigate = useNavigate() + const [searchParams, setSearchParams] = useSearchParams() + const [areaId, setAreaId] = useState(searchParams.get('area')) + const [page, setPage] = useState(0) + const [createOpen, setCreateOpen] = useState(false) + const [createForm] = Form.useForm() + + const attractionsQuery = useQuery({ + queryKey: ['admin-attractions', areaId ?? 'none', page], + queryFn: () => fetchAttractions({ areaId: areaId!, page, size: PAGE_SIZE, sort: 'name,asc' }), + enabled: areaId != null, + placeholderData: keepPreviousData, + }) + + const createMutation = useMutation({ + mutationFn: createAttraction, + onSuccess: (attraction) => { + notifySuccess('Достопримечательность создана', attraction.name) + setCreateOpen(false) + createForm.resetFields() + navigate(`/attractions/${attraction.id}?area=${attraction.areaId}`) + }, + onError: (e) => notifyApiError(e, 'Не удалось создать достопримечательность'), + }) + + const openDetail = (attraction: Attraction) => { + navigate(`/attractions/${attraction.id}?area=${attraction.areaId}`) + } + + const changeArea = (value: string | null) => { + setAreaId(value) + setPage(0) + setSearchParams(value ? { area: value } : {}, { replace: true }) + } + + const columns: ColumnsType = [ + { + title: 'Название', + dataIndex: 'name', + key: 'name', + render: (_, attraction) => ( + + ), + }, + { title: 'Адрес', dataIndex: 'address', key: 'address', render: (v) => v ?? '—' }, + { + title: 'CV-профиль', + dataIndex: 'cvProfile', + key: 'cvProfile', + width: 180, + render: (v: Attraction['cvProfile']) => ( + {cvProfileMeta[v].label} + ), + }, + { + title: 'Координаты', + key: 'coords', + width: 220, + render: (_, a) => + a.latitude != null && a.longitude != null + ? `${a.latitude}, ${a.longitude}` + : '—', + }, + { + title: 'Фото', + dataIndex: 'photoCount', + key: 'photoCount', + width: 90, + align: 'right', + }, + { + title: 'Действия', + key: 'actions', + width: 120, + render: (_, attraction) => ( + + ), + }, + ] + + const data = attractionsQuery.data + + return ( + <> +
+ + Достопримечательности + + + + + +
+ + {!areaId ? ( + + ) : ( + + rowKey="id" + columns={columns} + dataSource={data?.content ?? []} + loading={attractionsQuery.isLoading} + locale={{ emptyText: }} + pagination={{ + current: (data?.number ?? 0) + 1, + pageSize: data?.size ?? PAGE_SIZE, + total: data?.totalElements ?? 0, + showSizeChanger: false, + onChange: (p) => setPage(p - 1), + }} + /> + )} + + setCreateOpen(false)} + confirmLoading={createMutation.isPending} + onOk={async () => { + const values = await createForm.validateFields() + createMutation.mutate(toCreateRequest(areaId!, values)) + }} + > + + + + ) +} diff --git a/src/pages/attractions/PhotoGallery.tsx b/src/pages/attractions/PhotoGallery.tsx new file mode 100644 index 0000000..6b3f5d2 --- /dev/null +++ b/src/pages/attractions/PhotoGallery.tsx @@ -0,0 +1,255 @@ +import { useState } from 'react' +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query' +import { + Button, + Card, + Col, + Empty, + Image, + InputNumber, + Popconfirm, + Row, + Space, + Spin, + Tag, + Typography, + Upload, +} from 'antd' +import { DeleteOutlined, ExperimentOutlined, SaveOutlined, UploadOutlined } from '@ant-design/icons' +import type { UploadProps } from 'antd' +import { + deletePhoto, + fetchPhotos, + recalcPhotoFeatures, + updatePhotoSortOrder, + uploadPhoto, +} from '@/api/attractions' +import { notifyApiError, notifySuccess } from '@/api/errors' +import { notify } from '@/api/notify' +import type { Photo } from '@/api/types' +import { formatUtc } from '@/utils/format' + +const MAX_FILE_SIZE = 20 * 1024 * 1024 +const ACCEPTED_TYPES = 'image/jpeg,image/png,image/webp,image/svg+xml' + +export function PhotoGallery({ + attractionId, + onCountDelta, +}: { + attractionId: string + onCountDelta: (delta: number) => void +}) { + const queryClient = useQueryClient() + const [uploadSortOrder, setUploadSortOrder] = useState(null) + /** Черновики позиций: photoId → введённое, но не сохранённое значение. */ + const [pendingOrders, setPendingOrders] = useState>({}) + + const photosQuery = useQuery({ + queryKey: ['admin-photos', attractionId], + queryFn: () => fetchPhotos(attractionId), + }) + + const photosKey = ['admin-photos', attractionId] as const + const setPhotos = (updater: (prev: Photo[]) => Photo[]) => { + queryClient.setQueryData(photosKey, (prev) => + prev ? updater([...prev]).sort((a, b) => a.sortOrder - b.sortOrder) : prev, + ) + } + + const uploadMutation = useMutation({ + mutationFn: ({ file, sortOrder }: { file: File; sortOrder?: number }) => + uploadPhoto(attractionId, file, sortOrder), + onSuccess: (photo) => { + setPhotos((prev) => (prev.some((p) => p.id === photo.id) ? prev : [...prev, photo])) + onCountDelta(1) + notifySuccess('Фото загружено', `Позиция ${photo.sortOrder}`) + }, + onError: (e) => notifyApiError(e, 'Не удалось загрузить фото'), + }) + + const updateMutation = useMutation({ + mutationFn: ({ photoId, sortOrder }: { photoId: string; sortOrder: number }) => + updatePhotoSortOrder(attractionId, photoId, sortOrder), + onSuccess: (photo) => { + setPhotos((prev) => prev.map((p) => (p.id === photo.id ? photo : p))) + setPendingOrders((prev) => { + const next = { ...prev } + delete next[photo.id] + return next + }) + notifySuccess('Позиция обновлена') + }, + onError: (e) => notifyApiError(e, 'Не удалось изменить позицию'), + }) + + const recalcMutation = useMutation({ + mutationFn: (photoId: string) => recalcPhotoFeatures(attractionId, photoId), + onSuccess: (photo) => { + setPhotos((prev) => prev.map((p) => (p.id === photo.id ? photo : p))) + notifySuccess('Признаки пересчитаны', `Keypoints: ${photo.keypointsCount}`) + }, + onError: (e) => notifyApiError(e, 'Не удалось пересчитать признаки'), + }) + + const deleteMutation = useMutation({ + mutationFn: (photoId: string) => deletePhoto(attractionId, photoId), + onSuccess: (_, photoId) => { + setPhotos((prev) => prev.filter((p) => p.id !== photoId)) + onCountDelta(-1) + notifySuccess('Фото удалено') + }, + onError: (e) => notifyApiError(e, 'Не удалось удалить фото'), + }) + + const uploadProps: UploadProps = { + accept: ACCEPTED_TYPES, + multiple: false, + showUploadList: false, + beforeUpload: (file) => { + if (file.size > MAX_FILE_SIZE) { + notify('error', 'Файл больше 20 МБ') + return Upload.LIST_IGNORE + } + return true + }, + customRequest: ({ file, onSuccess, onError }) => { + uploadMutation + .mutateAsync({ file: file as File, sortOrder: uploadSortOrder ?? undefined }) + .then(() => onSuccess?.(null)) + .catch((e: unknown) => onError?.(e as Error)) + }, + } + + if (photosQuery.isLoading) { + return ( +
+ +
+ ) + } + + if (photosQuery.isError) { + return ( + + ) + } + + const photos = photosQuery.data ?? [] + + return ( + + + + + + + Позиция: + + + без позиции — следующая свободная + + + + + {photos.length === 0 ? ( + + ) : ( + + {photos.map((photo) => ( + + + } + > + + + позиция {photo.sortOrder} + + {formatUtc(photo.createdAt)} UTC + + + + keypoints: {photo.keypointsCount} · algo: {photo.algoId || '—'} · формат:{' '} + {photo.featureFormatVersion} + + + + setPendingOrders((prev) => ({ + ...prev, + [photo.id]: v ?? photo.sortOrder, + })) + } + status={ + pendingOrders[photo.id] != null && + pendingOrders[photo.id] !== photo.sortOrder + ? 'warning' + : undefined + } + style={{ width: 80 }} + /> + + + deleteMutation.mutate(photo.id)} + > + + + + + + + + + rowKey="id" + columns={columns} + dataSource={data?.content ?? []} + loading={visitsQuery.isLoading} + onChange={handleTableChange} + pagination={{ + current: (data?.number ?? 0) + 1, + pageSize: data?.size ?? PAGE_SIZE, + total: data?.totalElements ?? 0, + showSizeChanger: false, + showTotal: (total) => `Всего: ${total}`, + }} + /> + + ) +} diff --git a/src/utils/format.ts b/src/utils/format.ts new file mode 100644 index 0000000..64faef8 --- /dev/null +++ b/src/utils/format.ts @@ -0,0 +1,40 @@ +import dayjs from 'dayjs' +import utc from 'dayjs/plugin/utc' +import type { CvProfile, SetStatus, Verdict } from '@/api/types' + +dayjs.extend(utc) + +/** Бэкенд хранит время в UTC без зоны — форматируем как UTC. */ +export function formatUtc(iso: string | null | undefined): string { + if (!iso) return '—' + const d = dayjs.utc(iso) + return d.isValid() ? d.format('DD.MM.YYYY HH:mm:ss') : iso +} + +export function formatConfidence(confidence: number | null | undefined): string { + if (confidence == null) return '—' + return confidence.toFixed(2) +} + +export const verdictMeta: Record = { + match: { label: 'Совпадение', color: 'green' }, + uncertain: { label: 'Неопределённо', color: 'orange' }, + no_match: { label: 'Нет совпадения', color: 'red' }, +} + +export const cvProfileMeta: Record = { + facade: { label: 'Фасад', color: 'blue' }, + monument: { label: 'Памятник', color: 'purple' }, + repetitive: { label: 'Повторяющийся объект', color: 'cyan' }, +} + +export const setStatusMeta: Record = { + DRAFT: { label: 'Черновик', color: 'default' }, + ACTIVE: { label: 'Активен', color: 'green' }, + ARCHIVED: { label: 'В архиве', color: 'default' }, +} + +export const cvProfileOptions = (Object.keys(cvProfileMeta) as CvProfile[]).map((value) => ({ + value, + label: cvProfileMeta[value].label, +})) diff --git a/tsconfig.app.json b/tsconfig.app.json new file mode 100644 index 0000000..3321d19 --- /dev/null +++ b/tsconfig.app.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023", "DOM"], + "module": "esnext", + "types": ["vite/client"], + "allowArbitraryExtensions": true, + "skipLibCheck": true, + "strict": true, + + /* Path alias for '@/' */ + "paths": { + "@/*": ["./src/*"] + }, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..1ffef60 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 0000000..8455dcb --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023"], + "types": ["node"], + "skipLibCheck": true, + + /* Bundler mode */ + "module": "nodenext", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..5996c45 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,23 @@ +import { fileURLToPath, URL } from 'node:url' +import react from '@vitejs/plugin-react' +import { defineConfig } from 'vite' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)), + }, + }, + server: { + port: 5173, + proxy: { + // Бэкенд не настраивает CORS, поэтому в dev все запросы /api идут через прокси. + '/api': { + target: 'http://localhost:8080', + changeOrigin: true, + }, + }, + }, +})