diff --git a/.gitignore b/.gitignore index c44183c6..4b3ec8d1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,37 @@ nul # Claude Code settings .claude/ + +# Dependencies +node_modules/ + +# Build outputs +dist/ +build/ + +# Environment files +.env +.env.local +.env.*.local + +# IDE +.idea/ +.vscode/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Test coverage +coverage/ + +# Package lock (optional - keep package-lock.json if needed) +# package-lock.json diff --git a/backend/services/contribution-service/.env.example b/backend/services/contribution-service/.env.example new file mode 100644 index 00000000..97ec7714 --- /dev/null +++ b/backend/services/contribution-service/.env.example @@ -0,0 +1,22 @@ +# Application +APP_PORT=3020 +NODE_ENV=development + +# Database +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/rwa_contribution?schema=public" + +# Redis +REDIS_HOST=localhost +REDIS_PORT=6379 + +# Kafka +KAFKA_BROKERS=localhost:9092 +KAFKA_GROUP_ID=contribution-service-group + +# JWT (for auth validation) +JWT_SECRET=your-jwt-secret + +# CDC Topics +CDC_TOPIC_USERS=dbserver1.rwa_identity.users +CDC_TOPIC_ADOPTIONS=dbserver1.rwa_planting.adoptions +CDC_TOPIC_REFERRALS=dbserver1.rwa_referral.referral_relations diff --git a/backend/services/contribution-service/DEVELOPMENT_GUIDE.md b/backend/services/contribution-service/DEVELOPMENT_GUIDE.md new file mode 100644 index 00000000..184d7053 --- /dev/null +++ b/backend/services/contribution-service/DEVELOPMENT_GUIDE.md @@ -0,0 +1,720 @@ +# Contribution Service (贡献值/算力服务) 开发指导 + +## 1. 服务概述 + +### 1.1 核心职责 +Contribution Service 负责管理用户的贡献值(算力),这是挖矿系统的核心计算基础。 + +**主要功能:** +- 通过 Debezium CDC 同步用户、认种、推荐关系数据 +- 计算用户算力(来自自己认种 + 团队贡献) +- 维护算力明细账(每笔算力的来源可追溯) +- 处理算力过期(2年有效期) +- 管理未分配算力归总部逻辑 + +### 1.2 技术栈 +- **框架**: NestJS + TypeScript +- **数据库**: PostgreSQL (事务型) +- **ORM**: Prisma +- **消息队列**: Kafka (Debezium CDC + 事件发布) +- **缓存**: Redis + +### 1.3 端口分配 +- HTTP: 3020 +- 数据库: rwa_contribution + +--- + +## 2. 架构设计 + +### 2.1 六边形架构分层 + +``` +┌─────────────────────────────────────────────────────────────┐ +│ API Layer (api/) │ +│ Controllers, DTOs - 处理 HTTP 请求 │ +├─────────────────────────────────────────────────────────────┤ +│ Application Layer (application/) │ +│ Commands, Queries, Event Handlers - 业务流程编排 │ +├─────────────────────────────────────────────────────────────┤ +│ Domain Layer (domain/) │ +│ Aggregates, Value Objects, Domain Events - 核心业务规则 │ +├─────────────────────────────────────────────────────────────┤ +│ Infrastructure Layer (infrastructure/) │ +│ Prisma, Kafka, Redis - 技术实现细节 │ +└─────────────────────────────────────────────────────────────┘ +``` + +### 2.2 目录结构 + +``` +contribution-service/ +├── src/ +│ ├── api/ # API层 +│ │ ├── controllers/ +│ │ │ ├── contribution.controller.ts # 算力查询API +│ │ │ ├── sync-status.controller.ts # 同步状态API +│ │ │ └── health.controller.ts +│ │ └── dto/ +│ │ ├── request/ +│ │ └── response/ +│ │ ├── contribution-account.response.ts +│ │ └── contribution-detail.response.ts +│ │ +│ ├── application/ # 应用层 +│ │ ├── commands/ +│ │ │ ├── calculate-user-contribution.command.ts +│ │ │ ├── process-adoption-contribution.command.ts +│ │ │ ├── expire-contributions.command.ts +│ │ │ └── recalculate-all-contributions.command.ts +│ │ ├── queries/ +│ │ │ ├── get-user-contribution.query.ts +│ │ │ ├── get-contribution-details.query.ts +│ │ │ └── get-network-total-contribution.query.ts +│ │ ├── services/ +│ │ │ └── contribution-calculation.service.ts +│ │ ├── event-handlers/ +│ │ │ ├── adoption-synced.handler.ts +│ │ │ ├── user-synced.handler.ts +│ │ │ └── referral-synced.handler.ts +│ │ └── schedulers/ +│ │ ├── contribution-expiry.scheduler.ts +│ │ └── daily-snapshot.scheduler.ts +│ │ +│ ├── domain/ # 领域层 +│ │ ├── aggregates/ +│ │ │ ├── contribution-account.aggregate.ts +│ │ │ └── contribution-record.aggregate.ts +│ │ ├── repositories/ +│ │ │ ├── contribution-account.repository.interface.ts +│ │ │ ├── contribution-record.repository.interface.ts +│ │ │ ├── synced-user.repository.interface.ts +│ │ │ ├── synced-adoption.repository.interface.ts +│ │ │ └── synced-referral.repository.interface.ts +│ │ ├── value-objects/ +│ │ │ ├── contribution-amount.vo.ts +│ │ │ ├── distribution-rate.vo.ts +│ │ │ └── account-sequence.vo.ts +│ │ ├── events/ +│ │ │ ├── contribution-calculated.event.ts +│ │ │ ├── contribution-expired.event.ts +│ │ │ └── daily-snapshot-created.event.ts +│ │ └── services/ +│ │ ├── contribution-calculator.service.ts +│ │ └── team-contribution-calculator.service.ts +│ │ +│ ├── infrastructure/ # 基础设施层 +│ │ ├── persistence/ +│ │ │ ├── prisma/ +│ │ │ │ └── prisma.service.ts +│ │ │ ├── repositories/ +│ │ │ │ ├── contribution-account.repository.impl.ts +│ │ │ │ ├── contribution-record.repository.impl.ts +│ │ │ │ ├── synced-user.repository.impl.ts +│ │ │ │ ├── synced-adoption.repository.impl.ts +│ │ │ │ └── synced-referral.repository.impl.ts +│ │ │ └── unit-of-work/ +│ │ │ └── unit-of-work.service.ts +│ │ ├── kafka/ +│ │ │ ├── cdc-consumers/ +│ │ │ │ ├── user-cdc.consumer.ts +│ │ │ │ ├── adoption-cdc.consumer.ts +│ │ │ │ └── referral-cdc.consumer.ts +│ │ │ ├── event-publisher.service.ts +│ │ │ └── kafka.module.ts +│ │ ├── redis/ +│ │ │ └── contribution-cache.service.ts +│ │ └── infrastructure.module.ts +│ │ +│ ├── shared/ +│ ├── config/ +│ ├── app.module.ts +│ └── main.ts +│ +├── prisma/ +│ ├── schema.prisma +│ └── migrations/ +├── package.json +├── tsconfig.json +├── Dockerfile +└── docker-compose.yml +``` + +--- + +## 3. 数据库设计 + +### 3.1 数据库类型选择 + +| 表类型 | 数据库类型 | 原因 | +|--------|-----------|------| +| 同步数据表 | 事务型 (PostgreSQL) | CDC 数据需要精确同步,支持事务 | +| 算力账户表 | 事务型 (PostgreSQL) | 余额变更需要强一致性 | +| 算力明细表 | 事务型 (PostgreSQL) | 明细账需要完整性约束 | +| 快照表 | 事务型 (PostgreSQL) | 历史数据需要持久化 | + +### 3.2 核心表结构 + +```sql +-- ============================================ +-- CDC 同步数据表(从其他服务同步) +-- ============================================ + +-- 同步的用户数据 +CREATE TABLE synced_users ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + account_sequence VARCHAR(20) NOT NULL UNIQUE, -- 跨服务关联键 + original_user_id UUID NOT NULL, + phone VARCHAR(20), + status VARCHAR(20), + created_at TIMESTAMP WITH TIME ZONE, + + -- CDC 同步元数据 + source_sequence_num BIGINT NOT NULL, -- 源数据的序列号 + synced_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + + -- 算力计算状态 + contribution_calculated BOOLEAN DEFAULT FALSE, + contribution_calculated_at TIMESTAMP WITH TIME ZONE +); +CREATE INDEX idx_synced_users_sequence ON synced_users(account_sequence); +CREATE INDEX idx_synced_users_not_calculated ON synced_users(contribution_calculated) WHERE contribution_calculated = FALSE; + +-- 同步的认种数据 +CREATE TABLE synced_adoptions ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + original_adoption_id UUID NOT NULL UNIQUE, + account_sequence VARCHAR(20) NOT NULL, + tree_count INT NOT NULL, + adoption_date DATE NOT NULL, + status VARCHAR(20), + + -- 贡献值计算参数(从认种时的配置) + contribution_per_tree DECIMAL(20,10) NOT NULL, + + -- CDC 同步元数据 + source_sequence_num BIGINT NOT NULL, + synced_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + + -- 算力分配状态 + contribution_distributed BOOLEAN DEFAULT FALSE, + contribution_distributed_at TIMESTAMP WITH TIME ZONE +); +CREATE INDEX idx_synced_adoptions_account ON synced_adoptions(account_sequence); +CREATE INDEX idx_synced_adoptions_not_distributed ON synced_adoptions(contribution_distributed) WHERE contribution_distributed = FALSE; + +-- 同步的推荐关系数据 +CREATE TABLE synced_referrals ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + account_sequence VARCHAR(20) NOT NULL, -- 用户 + referrer_account_sequence VARCHAR(20), -- 推荐人 + + -- 预计算的层级路径(便于快速查询上下级) + ancestor_path TEXT, -- 格式: /root/seq1/seq2/.../ + depth INT DEFAULT 0, + + -- CDC 同步元数据 + source_sequence_num BIGINT NOT NULL, + synced_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + + UNIQUE(account_sequence) +); +CREATE INDEX idx_synced_referrals_referrer ON synced_referrals(referrer_account_sequence); +CREATE INDEX idx_synced_referrals_path ON synced_referrals USING gin(ancestor_path gin_trgm_ops); + +-- ============================================ +-- 算力账户与明细表 +-- ============================================ + +-- 算力账户表(汇总) +CREATE TABLE contribution_accounts ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + account_sequence VARCHAR(20) NOT NULL UNIQUE, + + -- 算力汇总 + personal_contribution DECIMAL(30,10) DEFAULT 0, -- 来自自己认种 (70%) + team_level_contribution DECIMAL(30,10) DEFAULT 0, -- 来自团队层级 (0.5%×N级) + team_bonus_contribution DECIMAL(30,10) DEFAULT 0, -- 来自团队额外奖励 (2.5%×N) + total_contribution DECIMAL(30,10) DEFAULT 0, -- 总算力 + effective_contribution DECIMAL(30,10) DEFAULT 0, -- 有效算力(未过期) + + -- 用户条件(决定能获得多少团队算力) + has_adopted BOOLEAN DEFAULT FALSE, + direct_referral_adopted_count INT DEFAULT 0, + + -- 解锁状态 + unlocked_level_depth INT DEFAULT 0, -- 5/10/15 + unlocked_bonus_tiers INT DEFAULT 0, -- 1/2/3 + + -- 版本号(乐观锁) + version INT DEFAULT 1, + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- 算力明细表(分类账) +CREATE TABLE contribution_records ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + account_sequence VARCHAR(20) NOT NULL, -- 算力归属用户 + + -- 来源信息(可追溯) + source_type VARCHAR(30) NOT NULL, -- PERSONAL / TEAM_LEVEL / TEAM_BONUS + source_adoption_id UUID NOT NULL, -- 来源认种记录 + source_account_sequence VARCHAR(20) NOT NULL, -- 认种人 + + -- 计算参数(审计用) + tree_count INT NOT NULL, + base_contribution DECIMAL(20,10) NOT NULL, + distribution_rate DECIMAL(10,6) NOT NULL, -- 70% / 0.5% / 2.5% + level_depth INT, -- 层级(TEAM_LEVEL时) + bonus_tier INT, -- 档位(TEAM_BONUS时,1/2/3) + + -- 结果 + amount DECIMAL(30,10) NOT NULL, + + -- 有效期 + effective_date DATE NOT NULL, -- 次日生效 + expire_date DATE NOT NULL, -- 2年后过期 + is_expired BOOLEAN DEFAULT FALSE, + expired_at TIMESTAMP WITH TIME ZONE, + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); +CREATE INDEX idx_contribution_records_account ON contribution_records(account_sequence); +CREATE INDEX idx_contribution_records_source ON contribution_records(source_adoption_id); +CREATE INDEX idx_contribution_records_expire ON contribution_records(expire_date) WHERE is_expired = FALSE; + +-- 未分配算力记录(归总部) +CREATE TABLE unallocated_contributions ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + source_adoption_id UUID NOT NULL, + source_account_sequence VARCHAR(20) NOT NULL, + + unalloc_type VARCHAR(30) NOT NULL, -- LEVEL_OVERFLOW / BONUS_TIER_1/2/3 + would_be_account_sequence VARCHAR(20), -- 本应获得的上线 + level_depth INT, + + amount DECIMAL(30,10) NOT NULL, + reason VARCHAR(200), + + -- 归总部后的处理 + allocated_to_headquarters BOOLEAN DEFAULT FALSE, + allocated_at TIMESTAMP WITH TIME ZONE, + + effective_date DATE NOT NULL, + expire_date DATE NOT NULL, + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- 系统账户(运营/省/市/总部) +CREATE TABLE system_accounts ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + account_type VARCHAR(20) NOT NULL UNIQUE, -- OPERATION/PROVINCE/CITY/HEADQUARTERS + name VARCHAR(100) NOT NULL, + + contribution_balance DECIMAL(30,10) DEFAULT 0, + contribution_never_expires BOOLEAN DEFAULT FALSE, + + version INT DEFAULT 1, + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- 系统账户算力明细 +CREATE TABLE system_contribution_records ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + system_account_id UUID NOT NULL REFERENCES system_accounts(id), + source_adoption_id UUID NOT NULL, + source_account_sequence VARCHAR(20) NOT NULL, + + distribution_rate DECIMAL(10,6) NOT NULL, -- 12% / 1% / 2% + amount DECIMAL(30,10) NOT NULL, + + effective_date DATE NOT NULL, + expire_date DATE, -- NULL = 永不过期 + is_expired BOOLEAN DEFAULT FALSE, + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- ============================================ +-- 快照与统计表 +-- ============================================ + +-- 每日算力快照(用于挖矿分配计算) +CREATE TABLE daily_contribution_snapshots ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + snapshot_date DATE NOT NULL, + account_sequence VARCHAR(20) NOT NULL, + + effective_contribution DECIMAL(30,10) NOT NULL, + network_total_contribution DECIMAL(30,10) NOT NULL, + contribution_ratio DECIMAL(30,18) NOT NULL, -- 占比(高精度) + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + + UNIQUE(snapshot_date, account_sequence) +); +CREATE INDEX idx_daily_snapshots_date ON daily_contribution_snapshots(snapshot_date); + +-- 用户团队统计(缓存,定期更新) +CREATE TABLE user_team_stats ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + account_sequence VARCHAR(20) NOT NULL, + stats_date DATE NOT NULL, + + -- 各级认种统计 + level_1_trees INT DEFAULT 0, + level_2_trees INT DEFAULT 0, + level_3_trees INT DEFAULT 0, + level_4_trees INT DEFAULT 0, + level_5_trees INT DEFAULT 0, + level_6_trees INT DEFAULT 0, + level_7_trees INT DEFAULT 0, + level_8_trees INT DEFAULT 0, + level_9_trees INT DEFAULT 0, + level_10_trees INT DEFAULT 0, + level_11_trees INT DEFAULT 0, + level_12_trees INT DEFAULT 0, + level_13_trees INT DEFAULT 0, + level_14_trees INT DEFAULT 0, + level_15_trees INT DEFAULT 0, + + total_team_trees INT DEFAULT 0, + direct_adopted_referrals INT DEFAULT 0, -- 直推认种用户数 + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + + UNIQUE(account_sequence, stats_date) +); + +-- ============================================ +-- CDC 同步状态追踪 +-- ============================================ + +-- CDC 同步进度表 +CREATE TABLE cdc_sync_progress ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + source_topic VARCHAR(100) NOT NULL UNIQUE, + last_sequence_num BIGINT DEFAULT 0, + last_synced_at TIMESTAMP WITH TIME ZONE, + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- 已处理事件表(幂等性) +CREATE TABLE processed_events ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + event_id VARCHAR(100) NOT NULL UNIQUE, + event_type VARCHAR(50) NOT NULL, + source_service VARCHAR(50), + processed_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- ============================================ +-- 配置表 +-- ============================================ + +-- 贡献值递增配置 +CREATE TABLE contribution_configs ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + + base_contribution DECIMAL(20,10) DEFAULT 22617, + increment_percentage DECIMAL(10,6) DEFAULT 0.003, -- 0.3% + unit_size INT DEFAULT 100, + start_tree_number INT DEFAULT 1000, + + is_active BOOLEAN DEFAULT TRUE, + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- 分配比例配置 +CREATE TABLE distribution_rate_configs ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + + rate_type VARCHAR(30) NOT NULL UNIQUE, -- PERSONAL/OPERATION/PROVINCE/CITY/LEVEL_PER/BONUS_PER + rate_value DECIMAL(10,6) NOT NULL, + description VARCHAR(100), + + is_active BOOLEAN DEFAULT TRUE, + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); +``` + +--- + +## 4. 核心业务逻辑 + +### 4.1 算力计算公式 + +```typescript +/** + * 计算用户 X 的总算力 + */ +function calculateUserContribution(accountSequence: string): ContributionResult { + const user = getUserWithTeamStats(accountSequence); + + // 1. 来自自己认种 (70%) + const personalContribution = user.ownAdoptions.reduce((sum, adoption) => { + return sum + adoption.treeCount * adoption.contributionPerTree * 0.70; + }, 0); + + // 2. 来自团队层级 (每级0.5%) + const unlockedLevels = getUnlockedLevelDepth(user.directReferralAdoptedCount); + let teamLevelContribution = 0; + for (let level = 1; level <= unlockedLevels; level++) { + const levelTrees = user.teamStats[`level_${level}_trees`]; + const levelContribution = levelTrees * baseContribution * 0.005; // 0.5% + teamLevelContribution += levelContribution; + } + + // 3. 来自团队额外奖励 (只看第1级,最多3个2.5%) + const unlockedBonusTiers = getUnlockedBonusTiers(user); + const level1Trees = user.teamStats.level_1_trees; + const teamBonusContribution = level1Trees * baseContribution * 0.025 * unlockedBonusTiers; + + return { + personalContribution, + teamLevelContribution, + teamBonusContribution, + totalContribution: personalContribution + teamLevelContribution + teamBonusContribution + }; +} + +/** + * 根据直推认种用户数确定解锁层级 + */ +function getUnlockedLevelDepth(directReferralAdoptedCount: number): number { + if (directReferralAdoptedCount >= 5) return 15; + if (directReferralAdoptedCount >= 3) return 10; + if (directReferralAdoptedCount >= 1) return 5; + return 0; +} + +/** + * 根据用户条件确定解锁的额外奖励档位数 + */ +function getUnlockedBonusTiers(user: User): number { + let tiers = 0; + if (user.hasAdopted) tiers++; // 自己认种过 → +1档 + if (user.directReferralAdoptedCount >= 2) tiers++; // 直推≥2 → +1档 + if (user.directReferralAdoptedCount >= 4) tiers++; // 直推≥4 → +1档 + return tiers; // 0/1/2/3 +} +``` + +### 4.2 认种事件处理流程 + +```typescript +/** + * 当新认种发生时的处理流程 + */ +async function processAdoptionContribution(adoption: SyncedAdoption): Promise { + const totalContribution = adoption.treeCount * adoption.contributionPerTree; + + await unitOfWork.runInTransaction(async (tx) => { + // 1. 分配给认种人 (70%) + await createContributionRecord(tx, { + accountSequence: adoption.accountSequence, + sourceType: 'PERSONAL', + sourceAdoptionId: adoption.id, + amount: totalContribution * 0.70, + distributionRate: 0.70, + }); + + // 2. 分配给系统账户 (15%) + await createSystemContribution(tx, 'OPERATION', adoption, 0.12); + await createSystemContribution(tx, 'PROVINCE', adoption, 0.01); + await createSystemContribution(tx, 'CITY', adoption, 0.02); + + // 3. 分配给上线团队 (15%) + await distributeTeamContribution(tx, adoption, totalContribution * 0.15); + + // 4. 标记已分配 + await markAdoptionDistributed(tx, adoption.id); + }); +} + +/** + * 分配团队贡献值给上线链条 + */ +async function distributeTeamContribution( + tx: Transaction, + adoption: Adoption, + teamTotal: number +): Promise { + const ancestors = await getAncestorChain(adoption.accountSequence, 15); + + let distributedLevel = 0; + let distributedBonus = 0; + + for (let i = 0; i < ancestors.length && i < 15; i++) { + const ancestor = ancestors[i]; + const level = i + 1; + + // 层级部分 (0.5% 每级) + const levelAmount = teamTotal * 0.5 / 15; // 7.5% / 15 = 0.5% + if (ancestor.unlockedLevelDepth >= level) { + await createContributionRecord(tx, { + accountSequence: ancestor.accountSequence, + sourceType: 'TEAM_LEVEL', + levelDepth: level, + amount: levelAmount, + }); + distributedLevel += levelAmount; + } else { + // 未解锁,归总部 + await createUnallocatedContribution(tx, { + type: 'LEVEL_OVERFLOW', + wouldBeAccount: ancestor.accountSequence, + levelDepth: level, + amount: levelAmount, + }); + } + } + + // 额外奖励部分 (只给直接上线) + if (ancestors.length > 0) { + const directReferrer = ancestors[0]; + const bonusPerTier = teamTotal * 0.5 / 3; // 7.5% / 3 = 2.5% + + for (let tier = 1; tier <= 3; tier++) { + if (directReferrer.unlockedBonusTiers >= tier) { + await createContributionRecord(tx, { + accountSequence: directReferrer.accountSequence, + sourceType: 'TEAM_BONUS', + bonusTier: tier, + amount: bonusPerTier, + }); + distributedBonus += bonusPerTier; + } else { + await createUnallocatedContribution(tx, { + type: `BONUS_TIER_${tier}`, + wouldBeAccount: directReferrer.accountSequence, + amount: bonusPerTier, + }); + } + } + } +} +``` + +### 4.3 CDC 数据同步 + +```typescript +/** + * Debezium CDC Consumer - 用户数据同步 + */ +@Consumer({ topic: 'dbserver1.rwa_identity.users' }) +async handleUserCdc(message: DebeziumMessage): Promise { + const { op, after, source } = message; + const sequenceNum = source.sequence; + + // 幂等性检查 + if (await isEventProcessed(`user-cdc-${sequenceNum}`)) { + return; + } + + switch (op) { + case 'c': // CREATE + case 'u': // UPDATE + await syncedUserRepository.upsert({ + accountSequence: after.account_sequence, + originalUserId: after.id, + phone: after.phone, + status: after.status, + sourceSequenceNum: sequenceNum, + }); + break; + case 'd': // DELETE + // 通常不处理删除,或标记为 inactive + break; + } + + await markEventProcessed(`user-cdc-${sequenceNum}`); +} +``` + +--- + +## 5. 服务间通信 + +### 5.1 事件发布(Outbox Pattern) + +```typescript +// 发布算力计算完成事件 +interface ContributionCalculatedEvent { + eventId: string; + eventType: 'ContributionCalculated'; + accountSequence: string; + totalContribution: string; + effectiveContribution: string; + calculatedAt: string; +} + +// Mining Service 订阅此事件用于挖矿分配 +``` + +### 5.2 订阅的 CDC Topics + +| Topic | 来源服务 | 数据内容 | +|-------|---------|---------| +| `dbserver1.rwa_identity.users` | identity-service | 用户基本信息 | +| `dbserver1.rwa_planting.adoptions` | planting-service | 认种记录 | +| `dbserver1.rwa_referral.referral_relations` | referral-service | 推荐关系 | + +--- + +## 6. 关键注意事项 + +### 6.1 数据一致性 +- 所有算力变更必须在事务中完成 +- 使用乐观锁 (version 字段) 处理并发更新 +- 明细账与汇总账必须保持一致 + +### 6.2 幂等性 +- CDC 消息可能重复,使用 sequence_num 去重 +- 认种分配使用 contribution_distributed 标记防止重复 + +### 6.3 性能优化 +- 团队统计表 (user_team_stats) 定期预计算 +- 使用 Redis 缓存热点用户算力 +- 批量处理历史数据计算 + +### 6.4 跨服务关联 +- **始终使用 account_sequence,不使用 userId** +- account_sequence 是唯一的跨服务关联标识 + +--- + +## 7. 开发检查清单 + +- [ ] 实现 CDC Consumer 同步用户/认种/推荐数据 +- [ ] 实现算力计算核心逻辑 +- [ ] 实现算力明细账记录 +- [ ] 实现未分配算力归总部逻辑 +- [ ] 实现算力过期处理定时任务 +- [ ] 实现每日快照生成 +- [ ] 实现查询 API +- [ ] 编写单元测试 +- [ ] 编写集成测试 +- [ ] 配置 Debezium Connector + +--- + +## 8. 启动命令 + +```bash +# 开发环境 +npm run start:dev + +# 生成 Prisma Client +npx prisma generate + +# 运行迁移 +npx prisma migrate dev + +# 生产环境 +npm run build && npm run start:prod +``` diff --git a/backend/services/contribution-service/nest-cli.json b/backend/services/contribution-service/nest-cli.json new file mode 100644 index 00000000..f9aa683b --- /dev/null +++ b/backend/services/contribution-service/nest-cli.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true + } +} diff --git a/backend/services/contribution-service/package-lock.json b/backend/services/contribution-service/package-lock.json new file mode 100644 index 00000000..87fe739d --- /dev/null +++ b/backend/services/contribution-service/package-lock.json @@ -0,0 +1,10028 @@ +{ + "name": "contribution-service", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "contribution-service", + "version": "1.0.0", + "license": "UNLICENSED", + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/jwt": "^10.2.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/passport": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/schedule": "^4.1.2", + "@nestjs/swagger": "^7.1.17", + "@prisma/client": "^5.7.0", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.0", + "decimal.js": "^10.4.3", + "ioredis": "^5.3.2", + "kafkajs": "^2.2.4", + "passport-jwt": "^4.0.1", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/passport-jwt": "^4.0.0", + "@types/uuid": "^9.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "prettier": "^3.0.0", + "prisma": "^5.7.0", + "source-map-support": "^0.5.21", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.1.3" + } + }, + "node_modules/@angular-devkit/core": { + "version": "17.3.11", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.11.tgz", + "integrity": "sha512-vTNDYNsLIWpYk2I969LMQFH29GTsLzxNk/0cLw5q56ARF0v5sIWfHYwGTS88jdDqIpuuettcSczbxeA7EuAmqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.12.0", + "ajv-formats": "2.1.1", + "jsonc-parser": "3.2.1", + "picomatch": "4.0.1", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/core/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@angular-devkit/schematics": { + "version": "17.3.11", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.3.11.tgz", + "integrity": "sha512-I5wviiIqiFwar9Pdk30Lujk8FczEEc18i22A5c6Z9lbmhPQdTroDnEQdsfXjy404wPe8H62s0I15o4pmMGfTYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "jsonc-parser": "3.2.1", + "magic-string": "0.30.8", + "ora": "5.4.1", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics-cli": { + "version": "17.3.11", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-17.3.11.tgz", + "integrity": "sha512-kcOMqp+PHAKkqRad7Zd7PbpqJ0LqLaNZdY1+k66lLWmkEBozgq8v4ASn/puPWf9Bo0HpCiK+EzLf0VHE8Z/y6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "ansi-colors": "4.1.3", + "inquirer": "9.2.15", + "symbol-observable": "4.0.0", + "yargs-parser": "21.1.1" + }, + "bin": { + "schematics": "bin/schematics.js" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/inquirer": { + "version": "9.2.15", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.15.tgz", + "integrity": "sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ljharb/through": "^2.3.12", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^3.2.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", + "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.5", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.5", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.5" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.5", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.5", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.5", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@borewit/text-codec": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.1.tgz", + "integrity": "sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@ioredis/commands": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.5.0.tgz", + "integrity": "sha512-eUgLqrMf8nJkZxT24JvVRrQya1vZkQh8BBeYNwGDqa5I0VUi8ACx7uFvAaLxintokpTenkK6DASvo/bvNbBGow==", + "license": "MIT" + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@jest/reporters/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@ljharb/through": { + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.14.tgz", + "integrity": "sha512-ajBvlKpWucBB17FuQYUShqpqy8GRgYEpJW0vWJbUu1CV9lWyrDCapy0lScU8T8Z6qn49sSwJB3+M+evYIdGg+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@microsoft/tsdoc": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.15.1.tgz", + "integrity": "sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==", + "license": "MIT" + }, + "node_modules/@nestjs/cli": { + "version": "10.4.9", + "resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-10.4.9.tgz", + "integrity": "sha512-s8qYd97bggqeK7Op3iD49X2MpFtW4LVNLAwXFkfbRxKME6IYT7X0muNTJ2+QfI8hpbNx9isWkrLWIp+g5FOhiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "@angular-devkit/schematics-cli": "17.3.11", + "@nestjs/schematics": "^10.0.1", + "chalk": "4.1.2", + "chokidar": "3.6.0", + "cli-table3": "0.6.5", + "commander": "4.1.1", + "fork-ts-checker-webpack-plugin": "9.0.2", + "glob": "10.4.5", + "inquirer": "8.2.6", + "node-emoji": "1.11.0", + "ora": "5.4.1", + "tree-kill": "1.2.2", + "tsconfig-paths": "4.2.0", + "tsconfig-paths-webpack-plugin": "4.2.0", + "typescript": "5.7.2", + "webpack": "5.97.1", + "webpack-node-externals": "3.0.0" + }, + "bin": { + "nest": "bin/nest.js" + }, + "engines": { + "node": ">= 16.14" + }, + "peerDependencies": { + "@swc/cli": "^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0", + "@swc/core": "^1.3.62" + }, + "peerDependenciesMeta": { + "@swc/cli": { + "optional": true + }, + "@swc/core": { + "optional": true + } + } + }, + "node_modules/@nestjs/cli/node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nestjs/cli/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@nestjs/cli/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@nestjs/cli/node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@nestjs/cli/node_modules/webpack": { + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/@nestjs/common": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.4.22.tgz", + "integrity": "sha512-fxJ4v85nDHaqT1PmfNCQ37b/jcv2OojtXTaK1P2uAXhzLf9qq6WNUOFvxBrV4fhQek1EQoT1o9oj5xAZmv3NRw==", + "license": "MIT", + "peer": true, + "dependencies": { + "file-type": "20.4.1", + "iterare": "1.2.1", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/config": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/config/-/config-3.3.0.tgz", + "integrity": "sha512-pdGTp8m9d0ZCrjTpjkUbZx6gyf2IKf+7zlkrPNMsJzYZ4bFRRTpXrnj+556/5uiI6AfL5mMrJc2u7dB6bvM+VA==", + "license": "MIT", + "dependencies": { + "dotenv": "16.4.5", + "dotenv-expand": "10.0.0", + "lodash": "4.17.21" + }, + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "rxjs": "^7.1.0" + } + }, + "node_modules/@nestjs/core": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.4.22.tgz", + "integrity": "sha512-6IX9+VwjiKtCjx+mXVPncpkQ5ZjKfmssOZPFexmT+6T9H9wZ3svpYACAo7+9e7Nr9DZSoRZw3pffkJP7Z0UjaA==", + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.3.0", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/websockets": "^10.0.0", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + } + } + }, + "node_modules/@nestjs/jwt": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@nestjs/jwt/-/jwt-10.2.0.tgz", + "integrity": "sha512-x8cG90SURkEiLOehNaN2aRlotxT0KZESUliOPKKnjWiyJOcWurkF3w345WOX0P4MgFzUjGoZ1Sy0aZnxeihT0g==", + "license": "MIT", + "dependencies": { + "@types/jsonwebtoken": "9.0.5", + "jsonwebtoken": "9.0.2" + }, + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/@nestjs/mapped-types": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nestjs/mapped-types/-/mapped-types-2.0.5.tgz", + "integrity": "sha512-bSJv4pd6EY99NX9CjBIyn4TVDoSit82DUZlL4I3bqNfy5Gt+gXTa86i3I/i0iIV9P4hntcGM5GyO+FhZAhxtyg==", + "license": "MIT", + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "class-transformer": "^0.4.0 || ^0.5.0", + "class-validator": "^0.13.0 || ^0.14.0", + "reflect-metadata": "^0.1.12 || ^0.2.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/microservices": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-10.4.22.tgz", + "integrity": "sha512-9Oxc0jQuppGLaQv5yaB2tVS2rAZzZ9NqDS1A4UlDLiYwJB7M6e89G6tmyOQjGjPwgoXPxQS4Vg2voSiKiED2gw==", + "license": "MIT", + "peer": true, + "dependencies": { + "iterare": "1.2.1", + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@grpc/grpc-js": "*", + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0", + "@nestjs/websockets": "^10.0.0", + "amqp-connection-manager": "*", + "amqplib": "*", + "cache-manager": "*", + "ioredis": "*", + "kafkajs": "*", + "mqtt": "*", + "nats": "*", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@grpc/grpc-js": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + }, + "amqp-connection-manager": { + "optional": true + }, + "amqplib": { + "optional": true + }, + "cache-manager": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "kafkajs": { + "optional": true + }, + "mqtt": { + "optional": true + }, + "nats": { + "optional": true + } + } + }, + "node_modules/@nestjs/passport": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@nestjs/passport/-/passport-10.0.3.tgz", + "integrity": "sha512-znJ9Y4S8ZDVY+j4doWAJ8EuuVO7SkQN3yOBmzxbGaXbvcSwFDAdGJ+OMCg52NdzIO4tQoN4pYKx8W6M0ArfFRQ==", + "license": "MIT", + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "passport": "^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0" + } + }, + "node_modules/@nestjs/platform-express": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.4.22.tgz", + "integrity": "sha512-ySSq7Py/DFozzZdNDH67m/vHoeVdphDniWBnl6q5QVoXldDdrZIHLXLRMPayTDh5A95nt7jjJzmD4qpTbNQ6tA==", + "license": "MIT", + "peer": true, + "dependencies": { + "body-parser": "1.20.4", + "cors": "2.8.5", + "express": "4.22.1", + "multer": "2.0.2", + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0" + } + }, + "node_modules/@nestjs/schedule": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-4.1.2.tgz", + "integrity": "sha512-hCTQ1lNjIA5EHxeu8VvQu2Ed2DBLS1GSC6uKPYlBiQe6LL9a7zfE9iVSK+zuK8E2odsApteEBmfAQchc8Hx0Gg==", + "license": "MIT", + "dependencies": { + "cron": "3.2.1", + "uuid": "11.0.3" + }, + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/@nestjs/schedule/node_modules/uuid": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.3.tgz", + "integrity": "sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" + } + }, + "node_modules/@nestjs/schematics": { + "version": "10.2.3", + "resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-10.2.3.tgz", + "integrity": "sha512-4e8gxaCk7DhBxVUly2PjYL4xC2ifDFexCqq1/u4TtivLGXotVk0wHdYuPYe1tHTHuR1lsOkRbfOCpkdTnigLVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "comment-json": "4.2.5", + "jsonc-parser": "3.3.1", + "pluralize": "8.0.0" + }, + "peerDependencies": { + "typescript": ">=4.8.2" + } + }, + "node_modules/@nestjs/schematics/node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nestjs/swagger": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-7.4.2.tgz", + "integrity": "sha512-Mu6TEn1M/owIvAx2B4DUQObQXqo2028R2s9rSZ/hJEgBK95+doTwS0DjmVA2wTeZTyVtXOoN7CsoM5pONBzvKQ==", + "license": "MIT", + "dependencies": { + "@microsoft/tsdoc": "^0.15.0", + "@nestjs/mapped-types": "2.0.5", + "js-yaml": "4.1.0", + "lodash": "4.17.21", + "path-to-regexp": "3.3.0", + "swagger-ui-dist": "5.17.14" + }, + "peerDependencies": { + "@fastify/static": "^6.0.0 || ^7.0.0", + "@nestjs/common": "^9.0.0 || ^10.0.0", + "@nestjs/core": "^9.0.0 || ^10.0.0", + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12 || ^0.2.0" + }, + "peerDependenciesMeta": { + "@fastify/static": { + "optional": true + }, + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/testing": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-10.4.22.tgz", + "integrity": "sha512-HO9aPus3bAedAC+jKVAA8jTdaj4fs5M9fing4giHrcYV2txe9CvC1l1WAjwQ9RDhEHdugjY4y+FZA/U/YqPZrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + } + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, + "node_modules/@prisma/client": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.22.0.tgz", + "integrity": "sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "engines": { + "node": ">=16.13" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/debug": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.22.0.tgz", + "integrity": "sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.22.0.tgz", + "integrity": "sha512-UNjfslWhAt06kVL3CjkuYpHAWSO6L4kDCVPegV6itt7nD1kSJavd3vhgAEhjglLJJKEdJ7oIqDJ+yHk6qO8gPA==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/fetch-engine": "5.22.0", + "@prisma/get-platform": "5.22.0" + } + }, + "node_modules/@prisma/engines-version": { + "version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2.tgz", + "integrity": "sha512-2PTmxFR2yHW/eB3uqWtcgRcgAbG1rwG9ZriSvQw+nnb7c4uCr3RAcGMb6/zfE88SKlC1Nj2ziUvc96Z379mHgQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.22.0.tgz", + "integrity": "sha512-bkrD/Mc2fSvkQBV5EpoFcZ87AvOgDxbG99488a5cexp5Ccny+UM6MAe/UFkUC0wLYD9+9befNOqGiIJhhq+HbA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/get-platform": "5.22.0" + } + }, + "node_modules/@prisma/get-platform": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.22.0.tgz", + "integrity": "sha512-pHhpQdr1UPFpt+zFfnPazhulaZYCUqeIcPpJViYoq9R+D/yw4fjE+CtnsnKzPYm0ddUbeXUzjGVGIRVgPDCk4Q==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tokenizer/inflate": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.2.7.tgz", + "integrity": "sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "fflate": "^0.8.2", + "token-types": "^6.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "license": "MIT" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "4.17.25", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "^1" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.8", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.8.tgz", + "integrity": "sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.5.tgz", + "integrity": "sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/luxon": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.4.2.tgz", + "integrity": "sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==", + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.19.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.28.tgz", + "integrity": "sha512-VyKBr25BuFDzBFCK5sUM6ZXiWfqgCTwTAOK8qzGV/m9FCirXYDlmczJ+d5dXBAQALGCdRRdbteKYfJ84NGEusw==", + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/passport": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.17.tgz", + "integrity": "sha512-aciLyx+wDwT2t2/kJGJR2AEeBz0nJU4WuRX04Wu9Dqc5lSUtwu0WERPHYsLhF9PtseiAMPBGNUOtFjxZ56prsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/passport-jwt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/passport-jwt/-/passport-jwt-4.0.1.tgz", + "integrity": "sha512-Y0Ykz6nWP4jpxgEUYq8NoVZeCQPo1ZndJLfapI249g1jHChvRfZRO/LS3tqu26YgAS/laI1qx98sYGz0IalRXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/jsonwebtoken": "*", + "@types/passport-strategy": "*" + } + }, + "node_modules/@types/passport-strategy": { + "version": "0.2.38", + "resolved": "https://registry.npmjs.org/@types/passport-strategy/-/passport-strategy-0.2.38.tgz", + "integrity": "sha512-GC6eMqqojOooq993Tmnmp7AUTbbQSgilyvpCYQjT+H6JfG/g6RGc7nXEniZlp0zyKJ0WUdOiZWLBZft9Yug1uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*", + "@types/passport": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz", + "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "<1" + } + }, + "node_modules/@types/serve-static/node_modules/@types/send": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz", + "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/validator": { + "version": "13.15.10", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.15.10.tgz", + "integrity": "sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA==", + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "license": "MIT" + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/array-timsort": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.9.14", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.14.tgz", + "integrity": "sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.2.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001763", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001763.tgz", + "integrity": "sha512-mh/dGtq56uN98LlNX9qdbKnzINhX0QzhiWBFEkFfsFO4QyCvL8YegrJAazCwXIeqkIob8BlZPGM3xdnY+sgmvQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/class-transformer": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", + "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", + "license": "MIT", + "peer": true + }, + "node_modules/class-validator": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.3.tgz", + "integrity": "sha512-rXXekcjofVN1LTOSw+u4u9WXVEUvNBVjORW154q/IdmYWy1nMbOU9aNtZB0t8m+FJQ9q91jlr2f9CwwUFdFMRA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/validator": "^13.15.3", + "libphonenumber-js": "^1.11.1", + "validator": "^13.15.20" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/comment-json": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.5.tgz", + "integrity": "sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-timsort": "^1.0.3", + "core-util-is": "^1.0.3", + "esprima": "^4.0.1", + "has-own-prop": "^2.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cron": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/cron/-/cron-3.2.1.tgz", + "integrity": "sha512-w2n5l49GMmmkBFEsH9FIDhjZ1n1QgTMOCMGuQtOXs5veNiosZmso6bQGuqOJSYAXXrG84WQFVneNk+Yt0Ua9iw==", + "license": "MIT", + "dependencies": { + "@types/luxon": "~3.4.0", + "luxon": "~3.5.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "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/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "license": "MIT" + }, + "node_modules/dedent": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.1.tgz", + "integrity": "sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-expand": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz", + "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "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/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.267", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz", + "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.4", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz", + "integrity": "sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "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-module-lexer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", + "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.2.tgz", + "integrity": "sha512-iI1f+D2ViGn+uvv5HuHVUamg8ll4tN+JRHGc6IJi4TP9Kl976C57fzPXgseXNs8v0iA8aSJpHsTWjDb9QJamGQ==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.11.7" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.14.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/express/node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "license": "MIT" + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/file-type": { + "version": "20.4.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-20.4.1.tgz", + "integrity": "sha512-hw9gNZXUfZ02Jo0uafWLaFVPter5/k2rfcrjFJJHX/77xtSDOfJuEFb6oKlFV86FLP1SuyHMW1PSk0U9M5tKkQ==", + "license": "MIT", + "dependencies": { + "@tokenizer/inflate": "^0.2.6", + "strtok3": "^10.2.0", + "token-types": "^6.0.0", + "uint8array-extras": "^1.4.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fork-ts-checker-webpack-plugin": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-9.0.2.tgz", + "integrity": "sha512-Uochze2R8peoN1XqlSi/rGUkDQpRogtLFocP9+PGu68zk1BDAKXfdeCdyVZpgTk8V8WFVQXdEz426VKjXLO1Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.16.7", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "cosmiconfig": "^8.2.0", + "deepmerge": "^4.2.2", + "fs-extra": "^10.0.0", + "memfs": "^3.4.1", + "minimatch": "^3.0.4", + "node-abort-controller": "^3.0.1", + "schema-utils": "^3.1.1", + "semver": "^7.3.5", + "tapable": "^2.2.1" + }, + "engines": { + "node": ">=12.13.0", + "yarn": ">=1.0.0" + }, + "peerDependencies": { + "typescript": ">3.6.0", + "webpack": "^5.11.0" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs-monkey": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.1.0.tgz", + "integrity": "sha512-QMUezzXWII9EV5aTFXW1UBVUO77wYPpjqIF8/AviUCThNeSYZykpoTixUeaNNBwmCev0AMDWMAni+f8Hxb1IFw==", + "dev": true, + "license": "Unlicense" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "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/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "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-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "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/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-own-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz", + "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "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/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ioredis": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.9.1.tgz", + "integrity": "sha512-BXNqFQ66oOsR82g9ajFFsR8ZKrjVvYCLyeML9IvSMAsP56XH2VXBdZjmI11p65nXXJxTEt1hie3J2QeFJVgrtQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@ioredis/commands": "1.5.0", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "license": "ISC", + "engines": { + "node": ">=6" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-config/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-config/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-runtime/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "license": "MIT", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.3.tgz", + "integrity": "sha512-byiJ0FLRdLdSVSReO/U4E7RoEyOCKnEnEPMjq3HxWtvzLsV08/i5RQKsFVNkCldrCaPr2vDNAOMsfs8T/Hze7g==", + "license": "MIT", + "dependencies": { + "jwa": "^1.4.2", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/kafkajs": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/kafkajs/-/kafkajs-2.2.4.tgz", + "integrity": "sha512-j/YeapB1vfPT2iOIUn/vxdyKEuhuY2PxMBvf5JWux6iSaukAccrMtXEY/Lb7OvavDhOWME589bpLrEdnVHjfjA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/libphonenumber-js": { + "version": "1.12.33", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.12.33.tgz", + "integrity": "sha512-r9kw4OA6oDO4dPXkOrXTkArQAafIKAU71hChInV4FxZ69dxCfbwQGDPzqR5/vea94wU705/3AZroEbSoeVWrQw==", + "license": "MIT" + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/loader-runner": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", + "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", + "license": "MIT" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" + }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", + "license": "MIT" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/luxon": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/magic-string": { + "version": "0.30.8", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", + "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "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/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", + "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", + "dev": true, + "license": "Unlicense", + "dependencies": { + "fs-monkey": "^1.0.4" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=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/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "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/multer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz", + "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.6.0", + "concat-stream": "^2.0.0", + "mkdirp": "^0.5.6", + "object-assign": "^4.1.1", + "type-is": "^1.6.18", + "xtend": "^4.0.2" + }, + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/passport": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/passport/-/passport-0.7.0.tgz", + "integrity": "sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "passport-strategy": "1.x.x", + "pause": "0.0.1", + "utils-merge": "^1.0.1" + }, + "engines": { + "node": ">= 0.4.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jaredhanson" + } + }, + "node_modules/passport-jwt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/passport-jwt/-/passport-jwt-4.0.1.tgz", + "integrity": "sha512-UCKMDYhNuGOBE9/9Ycuoyh7vP6jpeTp/+sfMJl7nLff/t6dps+iaeE0hhNkKN8/HZHcJ7lCdOyDxHdDoxoSvdQ==", + "license": "MIT", + "dependencies": { + "jsonwebtoken": "^9.0.0", + "passport-strategy": "^1.0.0" + } + }, + "node_modules/passport-strategy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", + "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/path-to-regexp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pause": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", + "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" + }, + "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.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.1.tgz", + "integrity": "sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz", + "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.1.tgz", + "integrity": "sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prisma": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.22.0.tgz", + "integrity": "sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@prisma/engines": "5.22.0" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=16.13" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "license": "MIT", + "dependencies": { + "redis-errors": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", + "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/standard-as-callback": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==", + "license": "MIT" + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strtok3": { + "version": "10.3.4", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.4.tgz", + "integrity": "sha512-KIy5nylvC5le1OdaaoCJ07L+8iQzJHGH6pWDuzS+d07Cu7n1MZ2x26P8ZKIWfbK02+XIL8Mp4RkWeqdUCrDMfg==", + "license": "MIT", + "dependencies": { + "@tokenizer/token": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/swagger-ui-dist": { + "version": "5.17.14", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.17.14.tgz", + "integrity": "sha512-CVbSfaLpstV65OnSjbXfVd6Sta3q3F7Cj/yYuvHMp1P90LztOLs6PfUnKEVAeiIVQt9u2SaPwv0LiH/OyMjHRw==", + "license": "Apache-2.0" + }, + "node_modules/symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/synckit": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.2.9" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/synckit" + } + }, + "node_modules/tapable": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser": { + "version": "5.44.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz", + "integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.16", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz", + "integrity": "sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser-webpack-plugin/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/token-types": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.2.tgz", + "integrity": "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==", + "license": "MIT", + "dependencies": { + "@borewit/text-codec": "^0.2.1", + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/ts-jest": { + "version": "29.4.6", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.6.tgz", + "integrity": "sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.8", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.3", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-loader": { + "version": "9.5.4", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.4.tgz", + "integrity": "sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4", + "source-map": "^0.7.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "^5.0.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tsconfig-paths-webpack-plugin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.2.0.tgz", + "integrity": "sha512-zbem3rfRS8BgeNK50Zz5SIQgXzLafiHjOwUAvk/38/o1jHn/V5QAgVUcz884or7WYcPaH3N2CIfUc2u0ul7UcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.7.0", + "tapable": "^2.2.1", + "tsconfig-paths": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/uid": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "license": "MIT", + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/uint8array-extras": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", + "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/validator": { + "version": "13.15.26", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.26.tgz", + "integrity": "sha512-spH26xU080ydGggxRyR1Yhcbgx+j3y5jbNXk/8L+iRvdIEQ4uTRH2Sgf2dokud6Q4oAtsbNvJ1Ft+9xmm6IZcA==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/watchpack": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.0.tgz", + "integrity": "sha512-e6vZvY6xboSwLz2GD36c16+O/2Z6fKvIf4pOXptw2rY9MVwE/TXc6RGqxD3I3x0a28lwBY7DE+76uTPSsBrrCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/webpack": { + "version": "5.104.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.104.1.tgz", + "integrity": "sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.28.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.4", + "es-module-lexer": "^2.0.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.3.1", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "terser-webpack-plugin": "^5.3.16", + "watchpack": "^2.4.4", + "webpack-sources": "^3.3.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-node-externals": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/webpack-node-externals/-/webpack-node-externals-3.0.0.tgz", + "integrity": "sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-sources": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/webpack/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/backend/services/contribution-service/package.json b/backend/services/contribution-service/package.json new file mode 100644 index 00000000..dd385da9 --- /dev/null +++ b/backend/services/contribution-service/package.json @@ -0,0 +1,95 @@ +{ + "name": "contribution-service", + "version": "1.0.0", + "description": "RWA Contribution/Mining Power Service - 贡献值算力计算服务", + "author": "RWA Team", + "private": true, + "license": "UNLICENSED", + "prisma": { + "schema": "prisma/schema.prisma", + "seed": "ts-node prisma/seed.ts" + }, + "scripts": { + "build": "nest build", + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", + "test": "jest", + "test:watch": "jest --watch", + "test:cov": "jest --coverage", + "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", + "test:e2e": "jest --config ./test/jest-e2e.json", + "prisma:generate": "prisma generate", + "prisma:migrate": "prisma migrate dev", + "prisma:migrate:prod": "prisma migrate deploy", + "prisma:studio": "prisma studio" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/jwt": "^10.2.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/passport": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/schedule": "^4.1.2", + "@nestjs/swagger": "^7.1.17", + "@prisma/client": "^5.7.0", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.0", + "decimal.js": "^10.4.3", + "ioredis": "^5.3.2", + "kafkajs": "^2.2.4", + "passport-jwt": "^4.0.1", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/passport-jwt": "^4.0.0", + "@types/uuid": "^9.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "prettier": "^3.0.0", + "prisma": "^5.7.0", + "source-map-support": "^0.5.21", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.1.3" + }, + "jest": { + "moduleFileExtensions": [ + "js", + "json", + "ts" + ], + "rootDir": "src", + "testRegex": ".*\\.spec\\.ts$", + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "collectCoverageFrom": [ + "**/*.(t|j)s" + ], + "coverageDirectory": "../coverage", + "testEnvironment": "node", + "moduleNameMapper": { + "^@/(.*)$": "/$1" + } + } +} diff --git a/backend/services/contribution-service/prisma/schema.prisma b/backend/services/contribution-service/prisma/schema.prisma new file mode 100644 index 00000000..1c1fff73 --- /dev/null +++ b/backend/services/contribution-service/prisma/schema.prisma @@ -0,0 +1,379 @@ +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +// ============================================ +// CDC 同步数据表(从其他服务同步) +// ============================================ + +// 同步的用户数据 +model SyncedUser { + id BigInt @id @default(autoincrement()) + accountSequence String @unique @map("account_sequence") @db.VarChar(20) + originalUserId BigInt @map("original_user_id") + phone String? @db.VarChar(20) + status String? @db.VarChar(20) + + // CDC 同步元数据 + sourceSequenceNum BigInt @map("source_sequence_num") + syncedAt DateTime @default(now()) @map("synced_at") + + // 算力计算状态 + contributionCalculated Boolean @default(false) @map("contribution_calculated") + contributionCalculatedAt DateTime? @map("contribution_calculated_at") + + createdAt DateTime @default(now()) @map("created_at") + + @@map("synced_users") + @@index([originalUserId]) + @@index([contributionCalculated]) +} + +// 同步的认种数据 +model SyncedAdoption { + id BigInt @id @default(autoincrement()) + originalAdoptionId BigInt @unique @map("original_adoption_id") + accountSequence String @map("account_sequence") @db.VarChar(20) + treeCount Int @map("tree_count") + adoptionDate DateTime @map("adoption_date") @db.Date + status String? @db.VarChar(20) + + // 贡献值计算参数(从认种时的配置) + contributionPerTree Decimal @map("contribution_per_tree") @db.Decimal(20, 10) + + // CDC 同步元数据 + sourceSequenceNum BigInt @map("source_sequence_num") + syncedAt DateTime @default(now()) @map("synced_at") + + // 算力分配状态 + contributionDistributed Boolean @default(false) @map("contribution_distributed") + contributionDistributedAt DateTime? @map("contribution_distributed_at") + + createdAt DateTime @default(now()) @map("created_at") + + @@map("synced_adoptions") + @@index([accountSequence]) + @@index([adoptionDate]) + @@index([contributionDistributed]) +} + +// 同步的推荐关系数据 +model SyncedReferral { + id BigInt @id @default(autoincrement()) + accountSequence String @unique @map("account_sequence") @db.VarChar(20) + referrerAccountSequence String? @map("referrer_account_sequence") @db.VarChar(20) + + // 预计算的层级路径(便于快速查询上下级) + ancestorPath String? @map("ancestor_path") @db.Text + depth Int @default(0) + + // CDC 同步元数据 + sourceSequenceNum BigInt @map("source_sequence_num") + syncedAt DateTime @default(now()) @map("synced_at") + + createdAt DateTime @default(now()) @map("created_at") + + @@map("synced_referrals") + @@index([referrerAccountSequence]) +} + +// ============================================ +// 算力账户与明细表 +// ============================================ + +// 算力账户表(汇总) +model ContributionAccount { + id BigInt @id @default(autoincrement()) + accountSequence String @unique @map("account_sequence") @db.VarChar(20) + + // 算力汇总 + personalContribution Decimal @default(0) @map("personal_contribution") @db.Decimal(30, 10) + teamLevelContribution Decimal @default(0) @map("team_level_contribution") @db.Decimal(30, 10) + teamBonusContribution Decimal @default(0) @map("team_bonus_contribution") @db.Decimal(30, 10) + totalContribution Decimal @default(0) @map("total_contribution") @db.Decimal(30, 10) + effectiveContribution Decimal @default(0) @map("effective_contribution") @db.Decimal(30, 10) + + // 用户条件(决定能获得多少团队算力) + hasAdopted Boolean @default(false) @map("has_adopted") + directReferralAdoptedCount Int @default(0) @map("direct_referral_adopted_count") + + // 解锁状态 + unlockedLevelDepth Int @default(0) @map("unlocked_level_depth") + unlockedBonusTiers Int @default(0) @map("unlocked_bonus_tiers") + + // 乐观锁 + version Int @default(1) + + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + @@map("contribution_accounts") + @@index([totalContribution(sort: Desc)]) + @@index([effectiveContribution(sort: Desc)]) +} + +// 算力明细表(分类账) +model ContributionRecord { + id BigInt @id @default(autoincrement()) + accountSequence String @map("account_sequence") @db.VarChar(20) + + // 来源信息(可追溯) + sourceType String @map("source_type") @db.VarChar(30) // PERSONAL / TEAM_LEVEL / TEAM_BONUS + sourceAdoptionId BigInt @map("source_adoption_id") + sourceAccountSequence String @map("source_account_sequence") @db.VarChar(20) + + // 计算参数(审计用) + treeCount Int @map("tree_count") + baseContribution Decimal @map("base_contribution") @db.Decimal(20, 10) + distributionRate Decimal @map("distribution_rate") @db.Decimal(10, 6) + levelDepth Int? @map("level_depth") + bonusTier Int? @map("bonus_tier") + + // 结果 + amount Decimal @map("amount") @db.Decimal(30, 10) + + // 有效期 + effectiveDate DateTime @map("effective_date") @db.Date + expireDate DateTime @map("expire_date") @db.Date + isExpired Boolean @default(false) @map("is_expired") + expiredAt DateTime? @map("expired_at") + + createdAt DateTime @default(now()) @map("created_at") + + @@map("contribution_records") + @@index([accountSequence, createdAt(sort: Desc)]) + @@index([sourceAdoptionId]) + @@index([sourceAccountSequence]) + @@index([sourceType]) + @@index([expireDate]) + @@index([isExpired]) +} + +// 未分配算力记录(归总部) +model UnallocatedContribution { + id BigInt @id @default(autoincrement()) + sourceAdoptionId BigInt @map("source_adoption_id") + sourceAccountSequence String @map("source_account_sequence") @db.VarChar(20) + + unallocType String @map("unalloc_type") @db.VarChar(30) // LEVEL_OVERFLOW / BONUS_TIER_1/2/3 + wouldBeAccountSequence String? @map("would_be_account_sequence") @db.VarChar(20) + levelDepth Int? @map("level_depth") + + amount Decimal @map("amount") @db.Decimal(30, 10) + reason String? @db.VarChar(200) + + // 归总部后的处理 + allocatedToHeadquarters Boolean @default(false) @map("allocated_to_headquarters") + allocatedAt DateTime? @map("allocated_at") + + effectiveDate DateTime @map("effective_date") @db.Date + expireDate DateTime @map("expire_date") @db.Date + + createdAt DateTime @default(now()) @map("created_at") + + @@map("unallocated_contributions") + @@index([sourceAdoptionId]) + @@index([unallocType]) + @@index([allocatedToHeadquarters]) +} + +// 系统账户(运营/省/市/总部) +model SystemAccount { + id BigInt @id @default(autoincrement()) + accountType String @unique @map("account_type") @db.VarChar(20) // OPERATION / PROVINCE / CITY / HEADQUARTERS + name String @db.VarChar(100) + + contributionBalance Decimal @default(0) @map("contribution_balance") @db.Decimal(30, 10) + contributionNeverExpires Boolean @default(false) @map("contribution_never_expires") + + version Int @default(1) + + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + records SystemContributionRecord[] + + @@map("system_accounts") +} + +// 系统账户算力明细 +model SystemContributionRecord { + id BigInt @id @default(autoincrement()) + systemAccountId BigInt @map("system_account_id") + sourceAdoptionId BigInt @map("source_adoption_id") + sourceAccountSequence String @map("source_account_sequence") @db.VarChar(20) + + distributionRate Decimal @map("distribution_rate") @db.Decimal(10, 6) + amount Decimal @map("amount") @db.Decimal(30, 10) + + effectiveDate DateTime @map("effective_date") @db.Date + expireDate DateTime? @map("expire_date") @db.Date + isExpired Boolean @default(false) @map("is_expired") + + createdAt DateTime @default(now()) @map("created_at") + + systemAccount SystemAccount @relation(fields: [systemAccountId], references: [id]) + + @@map("system_contribution_records") + @@index([systemAccountId]) + @@index([sourceAdoptionId]) +} + +// ============================================ +// 快照与统计表 +// ============================================ + +// 每日算力快照(用于挖矿分配计算) +model DailyContributionSnapshot { + id BigInt @id @default(autoincrement()) + snapshotDate DateTime @map("snapshot_date") @db.Date + accountSequence String @map("account_sequence") @db.VarChar(20) + + effectiveContribution Decimal @map("effective_contribution") @db.Decimal(30, 10) + networkTotalContribution Decimal @map("network_total_contribution") @db.Decimal(30, 10) + contributionRatio Decimal @map("contribution_ratio") @db.Decimal(30, 18) + + createdAt DateTime @default(now()) @map("created_at") + + @@unique([snapshotDate, accountSequence]) + @@map("daily_contribution_snapshots") + @@index([snapshotDate]) + @@index([accountSequence]) +} + +// 用户团队统计(缓存,定期更新) +model UserTeamStats { + id BigInt @id @default(autoincrement()) + accountSequence String @map("account_sequence") @db.VarChar(20) + statsDate DateTime @map("stats_date") @db.Date + + // 各级认种统计 + level1Trees Int @default(0) @map("level_1_trees") + level2Trees Int @default(0) @map("level_2_trees") + level3Trees Int @default(0) @map("level_3_trees") + level4Trees Int @default(0) @map("level_4_trees") + level5Trees Int @default(0) @map("level_5_trees") + level6Trees Int @default(0) @map("level_6_trees") + level7Trees Int @default(0) @map("level_7_trees") + level8Trees Int @default(0) @map("level_8_trees") + level9Trees Int @default(0) @map("level_9_trees") + level10Trees Int @default(0) @map("level_10_trees") + level11Trees Int @default(0) @map("level_11_trees") + level12Trees Int @default(0) @map("level_12_trees") + level13Trees Int @default(0) @map("level_13_trees") + level14Trees Int @default(0) @map("level_14_trees") + level15Trees Int @default(0) @map("level_15_trees") + + totalTeamTrees Int @default(0) @map("total_team_trees") + directAdoptedReferrals Int @default(0) @map("direct_adopted_referrals") + + createdAt DateTime @default(now()) @map("created_at") + + @@unique([accountSequence, statsDate]) + @@map("user_team_stats") + @@index([accountSequence]) + @@index([statsDate]) +} + +// ============================================ +// CDC 同步状态追踪 +// ============================================ + +// CDC 同步进度表 +model CdcSyncProgress { + id BigInt @id @default(autoincrement()) + sourceTopic String @unique @map("source_topic") @db.VarChar(100) + lastSequenceNum BigInt @default(0) @map("last_sequence_num") + lastSyncedAt DateTime? @map("last_synced_at") + + updatedAt DateTime @updatedAt @map("updated_at") + + @@map("cdc_sync_progress") +} + +// 已处理事件表(幂等性) +model ProcessedEvent { + id BigInt @id @default(autoincrement()) + eventId String @unique @map("event_id") @db.VarChar(100) + eventType String @map("event_type") @db.VarChar(50) + sourceService String? @map("source_service") @db.VarChar(50) + + processedAt DateTime @default(now()) @map("processed_at") + + @@map("processed_events") + @@index([eventType]) + @@index([processedAt]) +} + +// ============================================ +// 配置表 +// ============================================ + +// 贡献值递增配置 +model ContributionConfig { + id BigInt @id @default(autoincrement()) + + baseContribution Decimal @default(22617) @map("base_contribution") @db.Decimal(20, 10) + incrementPercentage Decimal @default(0.003) @map("increment_percentage") @db.Decimal(10, 6) + unitSize Int @default(100) @map("unit_size") + startTreeNumber Int @default(1000) @map("start_tree_number") + + isActive Boolean @default(true) @map("is_active") + + createdAt DateTime @default(now()) @map("created_at") + + @@map("contribution_configs") + @@index([isActive]) +} + +// 分配比例配置 +model DistributionRateConfig { + id BigInt @id @default(autoincrement()) + + rateType String @unique @map("rate_type") @db.VarChar(30) + rateValue Decimal @map("rate_value") @db.Decimal(10, 6) + description String? @db.VarChar(100) + + isActive Boolean @default(true) @map("is_active") + + createdAt DateTime @default(now()) @map("created_at") + + @@map("distribution_rate_configs") + @@index([isActive]) +} + +// ============================================ +// Outbox 事件表(可靠事件发布) +// ============================================ + +model OutboxEvent { + id BigInt @id @default(autoincrement()) @map("outbox_id") + + eventType String @map("event_type") @db.VarChar(100) + topic String @map("topic") @db.VarChar(100) + key String @map("key") @db.VarChar(200) + payload Json @map("payload") + + aggregateId String @map("aggregate_id") @db.VarChar(100) + aggregateType String @map("aggregate_type") @db.VarChar(50) + + status String @default("PENDING") @map("status") @db.VarChar(20) + retryCount Int @default(0) @map("retry_count") + maxRetries Int @default(5) @map("max_retries") + lastError String? @map("last_error") @db.Text + + createdAt DateTime @default(now()) @map("created_at") + publishedAt DateTime? @map("published_at") + nextRetryAt DateTime? @map("next_retry_at") + + @@map("outbox_events") + @@index([status, createdAt]) + @@index([status, nextRetryAt]) + @@index([aggregateType, aggregateId]) + @@index([topic]) +} diff --git a/backend/services/contribution-service/src/api/api.module.ts b/backend/services/contribution-service/src/api/api.module.ts new file mode 100644 index 00000000..71f3798e --- /dev/null +++ b/backend/services/contribution-service/src/api/api.module.ts @@ -0,0 +1,12 @@ +import { Module } from '@nestjs/common'; +import { ApplicationModule } from '../application/application.module'; +import { InfrastructureModule } from '../infrastructure/infrastructure.module'; +import { ContributionController } from './controllers/contribution.controller'; +import { SnapshotController } from './controllers/snapshot.controller'; +import { HealthController } from './controllers/health.controller'; + +@Module({ + imports: [ApplicationModule, InfrastructureModule], + controllers: [ContributionController, SnapshotController, HealthController], +}) +export class ApiModule {} diff --git a/backend/services/contribution-service/src/api/controllers/contribution.controller.ts b/backend/services/contribution-service/src/api/controllers/contribution.controller.ts new file mode 100644 index 00000000..476f2667 --- /dev/null +++ b/backend/services/contribution-service/src/api/controllers/contribution.controller.ts @@ -0,0 +1,99 @@ +import { Controller, Get, Param, Query, NotFoundException } from '@nestjs/common'; +import { ApiTags, ApiOperation, ApiResponse, ApiParam } from '@nestjs/swagger'; +import { GetContributionAccountQuery } from '../../application/queries/get-contribution-account.query'; +import { GetContributionStatsQuery } from '../../application/queries/get-contribution-stats.query'; +import { GetContributionRankingQuery } from '../../application/queries/get-contribution-ranking.query'; +import { + ContributionAccountResponse, + ContributionRecordsResponse, + ActiveContributionResponse, +} from '../dto/response/contribution-account.response'; +import { ContributionStatsResponse } from '../dto/response/contribution-stats.response'; +import { ContributionRankingResponse, UserRankResponse } from '../dto/response/contribution-ranking.response'; +import { GetContributionRecordsRequest } from '../dto/request/get-records.request'; + +@ApiTags('Contribution') +@Controller('contributions') +export class ContributionController { + constructor( + private readonly getAccountQuery: GetContributionAccountQuery, + private readonly getStatsQuery: GetContributionStatsQuery, + private readonly getRankingQuery: GetContributionRankingQuery, + ) {} + + @Get('stats') + @ApiOperation({ summary: '获取算力统计数据' }) + @ApiResponse({ status: 200, type: ContributionStatsResponse }) + async getStats(): Promise { + return this.getStatsQuery.execute(); + } + + @Get('ranking') + @ApiOperation({ summary: '获取算力排行榜' }) + @ApiResponse({ status: 200, type: ContributionRankingResponse }) + async getRanking(@Query('limit') limit?: number): Promise { + const data = await this.getRankingQuery.execute(limit ?? 100); + return { data }; + } + + @Get('accounts/:accountSequence') + @ApiOperation({ summary: '获取账户算力信息' }) + @ApiParam({ name: 'accountSequence', description: '账户序号' }) + @ApiResponse({ status: 200, type: ContributionAccountResponse }) + @ApiResponse({ status: 404, description: '账户不存在' }) + async getAccount(@Param('accountSequence') accountSequence: string): Promise { + const account = await this.getAccountQuery.execute(accountSequence); + if (!account) { + throw new NotFoundException(`Account ${accountSequence} not found`); + } + return account; + } + + @Get('accounts/:accountSequence/records') + @ApiOperation({ summary: '获取账户算力明细记录' }) + @ApiParam({ name: 'accountSequence', description: '账户序号' }) + @ApiResponse({ status: 200, type: ContributionRecordsResponse }) + async getRecords( + @Param('accountSequence') accountSequence: string, + @Query() query: GetContributionRecordsRequest, + ): Promise { + const result = await this.getAccountQuery.getRecords(accountSequence, { + sourceType: query.sourceType, + includeExpired: query.includeExpired, + page: query.page, + pageSize: query.pageSize, + }); + + return { + ...result, + page: query.page ?? 1, + pageSize: query.pageSize ?? 50, + }; + } + + @Get('accounts/:accountSequence/active') + @ApiOperation({ summary: '获取账户活跃算力统计' }) + @ApiParam({ name: 'accountSequence', description: '账户序号' }) + @ApiResponse({ status: 200, type: ActiveContributionResponse }) + @ApiResponse({ status: 404, description: '账户不存在' }) + async getActiveContribution(@Param('accountSequence') accountSequence: string): Promise { + const result = await this.getAccountQuery.getActiveContribution(accountSequence); + if (!result) { + throw new NotFoundException(`Account ${accountSequence} not found`); + } + return result; + } + + @Get('accounts/:accountSequence/rank') + @ApiOperation({ summary: '获取账户排名' }) + @ApiParam({ name: 'accountSequence', description: '账户序号' }) + @ApiResponse({ status: 200, type: UserRankResponse }) + @ApiResponse({ status: 404, description: '账户不存在' }) + async getUserRank(@Param('accountSequence') accountSequence: string): Promise { + const result = await this.getRankingQuery.getUserRank(accountSequence); + if (!result) { + throw new NotFoundException(`Account ${accountSequence} not found`); + } + return result; + } +} diff --git a/backend/services/contribution-service/src/api/controllers/health.controller.ts b/backend/services/contribution-service/src/api/controllers/health.controller.ts new file mode 100644 index 00000000..0e2f55da --- /dev/null +++ b/backend/services/contribution-service/src/api/controllers/health.controller.ts @@ -0,0 +1,69 @@ +import { Controller, Get } from '@nestjs/common'; +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; +import { PrismaService } from '../../infrastructure/persistence/prisma/prisma.service'; +import { RedisService } from '../../infrastructure/redis/redis.service'; + +interface HealthStatus { + status: 'healthy' | 'unhealthy'; + timestamp: string; + services: { + database: 'up' | 'down'; + redis: 'up' | 'down'; + }; +} + +@ApiTags('Health') +@Controller('health') +export class HealthController { + constructor( + private readonly prisma: PrismaService, + private readonly redis: RedisService, + ) {} + + @Get() + @ApiOperation({ summary: '健康检查' }) + @ApiResponse({ status: 200, description: '服务健康' }) + @ApiResponse({ status: 503, description: '服务不健康' }) + async check(): Promise { + const status: HealthStatus = { + status: 'healthy', + timestamp: new Date().toISOString(), + services: { + database: 'up', + redis: 'up', + }, + }; + + // 检查数据库连接 + try { + await this.prisma.$queryRaw`SELECT 1`; + } catch { + status.services.database = 'down'; + status.status = 'unhealthy'; + } + + // 检查 Redis 连接 + try { + await this.redis.getClient().ping(); + } catch { + status.services.redis = 'down'; + status.status = 'unhealthy'; + } + + return status; + } + + @Get('ready') + @ApiOperation({ summary: '就绪检查' }) + @ApiResponse({ status: 200, description: '服务就绪' }) + async ready(): Promise<{ ready: boolean }> { + return { ready: true }; + } + + @Get('live') + @ApiOperation({ summary: '存活检查' }) + @ApiResponse({ status: 200, description: '服务存活' }) + async live(): Promise<{ alive: boolean }> { + return { alive: true }; + } +} diff --git a/backend/services/contribution-service/src/api/controllers/snapshot.controller.ts b/backend/services/contribution-service/src/api/controllers/snapshot.controller.ts new file mode 100644 index 00000000..fcd5ac18 --- /dev/null +++ b/backend/services/contribution-service/src/api/controllers/snapshot.controller.ts @@ -0,0 +1,97 @@ +import { Controller, Get, Post, Query, Body, Param, NotFoundException } from '@nestjs/common'; +import { ApiTags, ApiOperation, ApiResponse, ApiParam } from '@nestjs/swagger'; +import { SnapshotService } from '../../application/services/snapshot.service'; +import { + DailySnapshotResponse, + UserContributionRatioResponse, + BatchUserRatiosResponse, +} from '../dto/response/snapshot.response'; +import { CreateSnapshotRequest, GetBatchRatiosRequest } from '../dto/request/snapshot.request'; + +@ApiTags('Snapshot') +@Controller('snapshots') +export class SnapshotController { + constructor(private readonly snapshotService: SnapshotService) {} + + @Post() + @ApiOperation({ summary: '创建每日快照' }) + @ApiResponse({ status: 201, type: DailySnapshotResponse }) + async createSnapshot(@Body() request: CreateSnapshotRequest): Promise { + const snapshot = await this.snapshotService.createDailySnapshot(new Date(request.snapshotDate)); + return this.toResponse(snapshot); + } + + @Get('latest') + @ApiOperation({ summary: '获取最新快照' }) + @ApiResponse({ status: 200, type: DailySnapshotResponse }) + @ApiResponse({ status: 404, description: '快照不存在' }) + async getLatestSnapshot(): Promise { + const latestDate = await this.snapshotService.getLatestSnapshotDate(); + if (!latestDate) { + throw new NotFoundException('No snapshot found'); + } + const snapshot = await this.snapshotService.getSnapshotSummary(latestDate); + if (!snapshot) { + throw new NotFoundException('No snapshot found'); + } + return this.toResponse(snapshot); + } + + @Get(':date') + @ApiOperation({ summary: '获取指定日期的快照' }) + @ApiParam({ name: 'date', description: '快照日期 (YYYY-MM-DD)' }) + @ApiResponse({ status: 200, type: DailySnapshotResponse }) + @ApiResponse({ status: 404, description: '快照不存在' }) + async getSnapshot(@Param('date') date: string): Promise { + const snapshot = await this.snapshotService.getSnapshotSummary(new Date(date)); + if (!snapshot) { + throw new NotFoundException(`Snapshot for ${date} not found`); + } + return this.toResponse(snapshot); + } + + @Get(':date/ratios/:accountSequence') + @ApiOperation({ summary: '获取用户在指定日期的算力占比' }) + @ApiParam({ name: 'date', description: '快照日期 (YYYY-MM-DD)' }) + @ApiParam({ name: 'accountSequence', description: '账户序号' }) + @ApiResponse({ status: 200, type: UserContributionRatioResponse }) + @ApiResponse({ status: 404, description: '快照或账户不存在' }) + async getUserRatio( + @Param('date') date: string, + @Param('accountSequence') accountSequence: string, + ): Promise { + const result = await this.snapshotService.getUserContributionRatio(accountSequence, new Date(date)); + if (!result) { + throw new NotFoundException(`Snapshot or account not found`); + } + return { + contribution: result.contribution.value.toString(), + ratio: result.ratio, + }; + } + + @Get(':date/ratios') + @ApiOperation({ summary: '批量获取用户算力占比' }) + @ApiParam({ name: 'date', description: '快照日期 (YYYY-MM-DD)' }) + @ApiResponse({ status: 200, type: BatchUserRatiosResponse }) + async getBatchRatios( + @Param('date') date: string, + @Query() query: GetBatchRatiosRequest, + ): Promise { + return this.snapshotService.batchGetUserContributionRatios(new Date(date), query.page, query.pageSize); + } + + private toResponse(snapshot: any): DailySnapshotResponse { + return { + id: snapshot.id?.toString() ?? snapshot.snapshotDate.toISOString().split('T')[0], + snapshotDate: snapshot.snapshotDate, + totalPersonalContribution: '0', // Not available in summary + totalTeamLevelContribution: '0', // Not available in summary + totalTeamBonusContribution: '0', // Not available in summary + totalContribution: snapshot.networkTotalContribution?.value?.toString() ?? '0', + totalAccounts: snapshot.totalAccounts, + activeAccounts: snapshot.activeAccounts, + createdAt: snapshot.createdAt, + }; + } +} diff --git a/backend/services/contribution-service/src/api/dto/request/get-records.request.ts b/backend/services/contribution-service/src/api/dto/request/get-records.request.ts new file mode 100644 index 00000000..140bf67a --- /dev/null +++ b/backend/services/contribution-service/src/api/dto/request/get-records.request.ts @@ -0,0 +1,37 @@ +import { ApiPropertyOptional } from '@nestjs/swagger'; +import { IsOptional, IsEnum, IsBoolean, IsInt, Min, Max } from 'class-validator'; +import { Transform, Type } from 'class-transformer'; + +export enum ContributionSourceTypeFilter { + PERSONAL = 'PERSONAL', + TEAM_LEVEL = 'TEAM_LEVEL', + TEAM_BONUS = 'TEAM_BONUS', +} + +export class GetContributionRecordsRequest { + @ApiPropertyOptional({ enum: ContributionSourceTypeFilter, description: '来源类型筛选' }) + @IsOptional() + @IsEnum(ContributionSourceTypeFilter) + sourceType?: ContributionSourceTypeFilter; + + @ApiPropertyOptional({ description: '是否包含已过期记录', default: false }) + @IsOptional() + @Transform(({ value }) => value === 'true' || value === true) + @IsBoolean() + includeExpired?: boolean = false; + + @ApiPropertyOptional({ description: '页码', default: 1 }) + @IsOptional() + @Type(() => Number) + @IsInt() + @Min(1) + page?: number = 1; + + @ApiPropertyOptional({ description: '每页大小', default: 50 }) + @IsOptional() + @Type(() => Number) + @IsInt() + @Min(1) + @Max(100) + pageSize?: number = 50; +} diff --git a/backend/services/contribution-service/src/api/dto/request/snapshot.request.ts b/backend/services/contribution-service/src/api/dto/request/snapshot.request.ts new file mode 100644 index 00000000..c0512379 --- /dev/null +++ b/backend/services/contribution-service/src/api/dto/request/snapshot.request.ts @@ -0,0 +1,36 @@ +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; +import { IsDateString, IsInt, IsOptional, Max, Min } from 'class-validator'; +import { Type } from 'class-transformer'; + +export class CreateSnapshotRequest { + @ApiProperty({ description: '快照日期 (YYYY-MM-DD)' }) + @IsDateString() + snapshotDate: string; +} + +export class GetSnapshotRequest { + @ApiProperty({ description: '快照日期 (YYYY-MM-DD)' }) + @IsDateString() + snapshotDate: string; +} + +export class GetBatchRatiosRequest { + @ApiProperty({ description: '快照日期 (YYYY-MM-DD)' }) + @IsDateString() + snapshotDate: string; + + @ApiPropertyOptional({ description: '页码', default: 1 }) + @IsOptional() + @Type(() => Number) + @IsInt() + @Min(1) + page?: number = 1; + + @ApiPropertyOptional({ description: '每页大小', default: 1000 }) + @IsOptional() + @Type(() => Number) + @IsInt() + @Min(1) + @Max(5000) + pageSize?: number = 1000; +} diff --git a/backend/services/contribution-service/src/api/dto/response/contribution-account.response.ts b/backend/services/contribution-service/src/api/dto/response/contribution-account.response.ts new file mode 100644 index 00000000..7266cdc7 --- /dev/null +++ b/backend/services/contribution-service/src/api/dto/response/contribution-account.response.ts @@ -0,0 +1,108 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class ContributionAccountResponse { + @ApiProperty({ description: '账户序号' }) + accountSequence: string; + + @ApiProperty({ description: '个人算力' }) + personalContribution: string; + + @ApiProperty({ description: '团队层级算力' }) + teamLevelContribution: string; + + @ApiProperty({ description: '团队奖励算力' }) + teamBonusContribution: string; + + @ApiProperty({ description: '总算力' }) + totalContribution: string; + + @ApiProperty({ description: '是否已认种' }) + hasAdopted: boolean; + + @ApiProperty({ description: '直推认种用户数' }) + directReferralAdoptedCount: number; + + @ApiProperty({ description: '已解锁层级深度' }) + unlockedLevelDepth: number; + + @ApiProperty({ description: '已解锁奖励档位数' }) + unlockedBonusTiers: number; + + @ApiProperty({ description: '是否已完成计算' }) + isCalculated: boolean; + + @ApiProperty({ description: '最后计算时间', nullable: true }) + lastCalculatedAt: Date | null; +} + +export class ContributionRecordResponse { + @ApiProperty({ description: '记录ID' }) + id: string; + + @ApiProperty({ description: '来源类型', enum: ['PERSONAL', 'TEAM_LEVEL', 'TEAM_BONUS'] }) + sourceType: string; + + @ApiProperty({ description: '来源认种ID' }) + sourceAdoptionId: string; + + @ApiProperty({ description: '来源账户序号', nullable: true }) + sourceAccountSequence: string | null; + + @ApiProperty({ description: '树数量' }) + treeCount: number; + + @ApiProperty({ description: '基础算力' }) + baseContribution: string; + + @ApiProperty({ description: '分配比例' }) + distributionRate: string; + + @ApiProperty({ description: '层级深度', nullable: true }) + levelDepth: number | null; + + @ApiProperty({ description: '奖励档位', nullable: true }) + bonusTier: number | null; + + @ApiProperty({ description: '最终算力' }) + finalContribution: string; + + @ApiProperty({ description: '生效日期' }) + effectiveDate: Date; + + @ApiProperty({ description: '过期日期' }) + expireDate: Date; + + @ApiProperty({ description: '是否已过期' }) + isExpired: boolean; + + @ApiProperty({ description: '创建时间' }) + createdAt: Date; +} + +export class ContributionRecordsResponse { + @ApiProperty({ type: [ContributionRecordResponse] }) + data: ContributionRecordResponse[]; + + @ApiProperty({ description: '总记录数' }) + total: number; + + @ApiProperty({ description: '当前页码' }) + page: number; + + @ApiProperty({ description: '每页大小' }) + pageSize: number; +} + +export class ActiveContributionResponse { + @ApiProperty({ description: '个人算力' }) + personal: string; + + @ApiProperty({ description: '团队层级算力' }) + teamLevel: string; + + @ApiProperty({ description: '团队奖励算力' }) + teamBonus: string; + + @ApiProperty({ description: '总算力' }) + total: string; +} diff --git a/backend/services/contribution-service/src/api/dto/response/contribution-ranking.response.ts b/backend/services/contribution-service/src/api/dto/response/contribution-ranking.response.ts new file mode 100644 index 00000000..d4f2ef7b --- /dev/null +++ b/backend/services/contribution-service/src/api/dto/response/contribution-ranking.response.ts @@ -0,0 +1,34 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class ContributionRankingItemResponse { + @ApiProperty({ description: '排名' }) + rank: number; + + @ApiProperty({ description: '账户序号' }) + accountSequence: string; + + @ApiProperty({ description: '总算力' }) + totalContribution: string; + + @ApiProperty({ description: '个人算力' }) + personalContribution: string; + + @ApiProperty({ description: '团队算力' }) + teamContribution: string; +} + +export class ContributionRankingResponse { + @ApiProperty({ type: [ContributionRankingItemResponse] }) + data: ContributionRankingItemResponse[]; +} + +export class UserRankResponse { + @ApiProperty({ description: '排名', nullable: true }) + rank: number | null; + + @ApiProperty({ description: '总算力' }) + totalContribution: string; + + @ApiProperty({ description: '百分位', nullable: true }) + percentile: number | null; +} diff --git a/backend/services/contribution-service/src/api/dto/response/contribution-stats.response.ts b/backend/services/contribution-service/src/api/dto/response/contribution-stats.response.ts new file mode 100644 index 00000000..f3d86c09 --- /dev/null +++ b/backend/services/contribution-service/src/api/dto/response/contribution-stats.response.ts @@ -0,0 +1,58 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class SystemAccountDto { + @ApiProperty({ description: '账户类型' }) + accountType: string; + + @ApiProperty({ description: '账户名称' }) + name: string; + + @ApiProperty({ description: '总算力' }) + totalContribution: string; +} + +export class ContributionByTypeDto { + @ApiProperty({ description: '个人算力' }) + personal: string; + + @ApiProperty({ description: '团队层级算力' }) + teamLevel: string; + + @ApiProperty({ description: '团队奖励算力' }) + teamBonus: string; +} + +export class ContributionStatsResponse { + @ApiProperty({ description: '总用户数' }) + totalUsers: number; + + @ApiProperty({ description: '总账户数' }) + totalAccounts: number; + + @ApiProperty({ description: '有算力的账户数' }) + accountsWithContribution: number; + + @ApiProperty({ description: '总认种数' }) + totalAdoptions: number; + + @ApiProperty({ description: '已处理认种数' }) + processedAdoptions: number; + + @ApiProperty({ description: '未处理认种数' }) + unprocessedAdoptions: number; + + @ApiProperty({ description: '总算力' }) + totalContribution: string; + + @ApiProperty({ type: ContributionByTypeDto, description: '按类型分布的算力' }) + contributionByType: ContributionByTypeDto; + + @ApiProperty({ type: [SystemAccountDto], description: '系统账户' }) + systemAccounts: SystemAccountDto[]; + + @ApiProperty({ description: '未分配算力总量' }) + totalUnallocated: string; + + @ApiProperty({ description: '按类型分布的未分配算力' }) + unallocatedByType: Record; +} diff --git a/backend/services/contribution-service/src/api/dto/response/snapshot.response.ts b/backend/services/contribution-service/src/api/dto/response/snapshot.response.ts new file mode 100644 index 00000000..ca88663e --- /dev/null +++ b/backend/services/contribution-service/src/api/dto/response/snapshot.response.ts @@ -0,0 +1,60 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class DailySnapshotResponse { + @ApiProperty({ description: '快照ID' }) + id: string; + + @ApiProperty({ description: '快照日期' }) + snapshotDate: Date; + + @ApiProperty({ description: '总个人算力' }) + totalPersonalContribution: string; + + @ApiProperty({ description: '总团队层级算力' }) + totalTeamLevelContribution: string; + + @ApiProperty({ description: '总团队奖励算力' }) + totalTeamBonusContribution: string; + + @ApiProperty({ description: '总算力' }) + totalContribution: string; + + @ApiProperty({ description: '总账户数' }) + totalAccounts: number; + + @ApiProperty({ description: '活跃账户数' }) + activeAccounts: number; + + @ApiProperty({ description: '创建时间' }) + createdAt: Date; +} + +export class UserContributionRatioResponse { + @ApiProperty({ description: '用户算力' }) + contribution: string; + + @ApiProperty({ description: '占比' }) + ratio: number; +} + +export class BatchUserRatioItem { + @ApiProperty({ description: '账户序号' }) + accountSequence: string; + + @ApiProperty({ description: '算力' }) + contribution: string; + + @ApiProperty({ description: '占比' }) + ratio: number; +} + +export class BatchUserRatiosResponse { + @ApiProperty({ type: [BatchUserRatioItem] }) + data: BatchUserRatioItem[]; + + @ApiProperty({ description: '总数' }) + total: number; + + @ApiProperty({ description: '总算力' }) + totalContribution: string; +} diff --git a/backend/services/contribution-service/src/app.module.ts b/backend/services/contribution-service/src/app.module.ts new file mode 100644 index 00000000..73a796fd --- /dev/null +++ b/backend/services/contribution-service/src/app.module.ts @@ -0,0 +1,45 @@ +import { Module } from '@nestjs/common'; +import { ConfigModule } from '@nestjs/config'; +import { APP_FILTER, APP_INTERCEPTOR, APP_GUARD } from '@nestjs/core'; +import { ApiModule } from './api/api.module'; +import { InfrastructureModule } from './infrastructure/infrastructure.module'; +import { ApplicationModule } from './application/application.module'; +import { DomainExceptionFilter } from './shared/filters/domain-exception.filter'; +import { TransformInterceptor } from './shared/interceptors/transform.interceptor'; +import { LoggingInterceptor } from './shared/interceptors/logging.interceptor'; +import { JwtAuthGuard } from './shared/guards/jwt-auth.guard'; + +@Module({ + imports: [ + ConfigModule.forRoot({ + isGlobal: true, + envFilePath: [ + `.env.${process.env.NODE_ENV || 'development'}`, + '.env', + ], + ignoreEnvFile: false, + }), + InfrastructureModule, + ApplicationModule, + ApiModule, + ], + providers: [ + { + provide: APP_FILTER, + useClass: DomainExceptionFilter, + }, + { + provide: APP_INTERCEPTOR, + useClass: LoggingInterceptor, + }, + { + provide: APP_INTERCEPTOR, + useClass: TransformInterceptor, + }, + { + provide: APP_GUARD, + useClass: JwtAuthGuard, + }, + ], +}) +export class AppModule {} diff --git a/backend/services/contribution-service/src/application/application.module.ts b/backend/services/contribution-service/src/application/application.module.ts new file mode 100644 index 00000000..b164a611 --- /dev/null +++ b/backend/services/contribution-service/src/application/application.module.ts @@ -0,0 +1,55 @@ +import { Module } from '@nestjs/common'; +import { ScheduleModule } from '@nestjs/schedule'; +import { InfrastructureModule } from '../infrastructure/infrastructure.module'; + +// Event Handlers +import { UserSyncedHandler } from './event-handlers/user-synced.handler'; +import { ReferralSyncedHandler } from './event-handlers/referral-synced.handler'; +import { AdoptionSyncedHandler } from './event-handlers/adoption-synced.handler'; +import { CDCEventDispatcher } from './event-handlers/cdc-event-dispatcher'; + +// Services +import { ContributionCalculationService } from './services/contribution-calculation.service'; +import { SnapshotService } from './services/snapshot.service'; + +// Queries +import { GetContributionAccountQuery } from './queries/get-contribution-account.query'; +import { GetContributionStatsQuery } from './queries/get-contribution-stats.query'; +import { GetContributionRankingQuery } from './queries/get-contribution-ranking.query'; + +// Schedulers +import { ContributionScheduler } from './schedulers/contribution.scheduler'; + +@Module({ + imports: [ + ScheduleModule.forRoot(), + InfrastructureModule, + ], + providers: [ + // Event Handlers + UserSyncedHandler, + ReferralSyncedHandler, + AdoptionSyncedHandler, + CDCEventDispatcher, + + // Services + ContributionCalculationService, + SnapshotService, + + // Queries + GetContributionAccountQuery, + GetContributionStatsQuery, + GetContributionRankingQuery, + + // Schedulers + ContributionScheduler, + ], + exports: [ + ContributionCalculationService, + SnapshotService, + GetContributionAccountQuery, + GetContributionStatsQuery, + GetContributionRankingQuery, + ], +}) +export class ApplicationModule {} diff --git a/backend/services/contribution-service/src/application/event-handlers/adoption-synced.handler.ts b/backend/services/contribution-service/src/application/event-handlers/adoption-synced.handler.ts new file mode 100644 index 00000000..ea92ea14 --- /dev/null +++ b/backend/services/contribution-service/src/application/event-handlers/adoption-synced.handler.ts @@ -0,0 +1,116 @@ +import { Injectable, Logger } from '@nestjs/common'; +import Decimal from 'decimal.js'; +import { CDCEvent } from '../../infrastructure/kafka/cdc-consumer.service'; +import { SyncedDataRepository } from '../../infrastructure/persistence/repositories/synced-data.repository'; +import { ContributionCalculationService } from '../services/contribution-calculation.service'; +import { UnitOfWork } from '../../infrastructure/persistence/unit-of-work/unit-of-work'; + +/** + * 认种 CDC 事件处理器 + * 处理从种植服务同步过来的认种数据 + * 认种是触发算力计算的核心事件 + */ +@Injectable() +export class AdoptionSyncedHandler { + private readonly logger = new Logger(AdoptionSyncedHandler.name); + + constructor( + private readonly syncedDataRepository: SyncedDataRepository, + private readonly contributionCalculationService: ContributionCalculationService, + private readonly unitOfWork: UnitOfWork, + ) {} + + async handle(event: CDCEvent): Promise { + const { op, before, after } = event.payload; + + try { + switch (op) { + case 'c': // create + case 'r': // read (snapshot) + await this.handleCreate(after, event.sequenceNum); + break; + case 'u': // update + await this.handleUpdate(after, before, event.sequenceNum); + break; + case 'd': // delete + await this.handleDelete(before); + break; + default: + this.logger.warn(`Unknown CDC operation: ${op}`); + } + } catch (error) { + this.logger.error(`Failed to handle adoption CDC event`, error); + throw error; + } + } + + private async handleCreate(data: any, sequenceNum: bigint): Promise { + if (!data) return; + + await this.unitOfWork.executeInTransaction(async () => { + // 保存同步的认种数据 + const adoption = await this.syncedDataRepository.upsertSyncedAdoption({ + originalAdoptionId: BigInt(data.id), + accountSequence: data.account_sequence || data.accountSequence, + treeCount: data.tree_count || data.treeCount, + adoptionDate: new Date(data.adoption_date || data.adoptionDate || data.created_at || data.createdAt), + status: data.status ?? null, + contributionPerTree: new Decimal(data.contribution_per_tree || data.contributionPerTree || '1'), + sourceSequenceNum: sequenceNum, + }); + + // 触发算力计算 + await this.contributionCalculationService.calculateForAdoption(adoption.originalAdoptionId); + }); + + this.logger.log( + `Adoption synced and contribution calculated: ${data.id}, account: ${data.account_sequence || data.accountSequence}`, + ); + } + + private async handleUpdate(after: any, before: any, sequenceNum: bigint): Promise { + if (!after) return; + + const originalAdoptionId = BigInt(after.id); + + // 检查是否已经处理过 + const existingAdoption = await this.syncedDataRepository.findSyncedAdoptionByOriginalId(originalAdoptionId); + + if (existingAdoption?.contributionDistributed) { + // 如果树数量发生变化,需要重新计算(这种情况较少) + const newTreeCount = after.tree_count || after.treeCount; + if (existingAdoption.treeCount !== newTreeCount) { + this.logger.warn( + `Adoption tree count changed after processing: ${originalAdoptionId}. This requires special handling.`, + ); + // TODO: 实现树数量变化的处理逻辑 + } + return; + } + + await this.unitOfWork.executeInTransaction(async () => { + const adoption = await this.syncedDataRepository.upsertSyncedAdoption({ + originalAdoptionId: originalAdoptionId, + accountSequence: after.account_sequence || after.accountSequence, + treeCount: after.tree_count || after.treeCount, + adoptionDate: new Date(after.adoption_date || after.adoptionDate || after.created_at || after.createdAt), + status: after.status ?? null, + contributionPerTree: new Decimal(after.contribution_per_tree || after.contributionPerTree || '1'), + sourceSequenceNum: sequenceNum, + }); + + if (!existingAdoption?.contributionDistributed) { + await this.contributionCalculationService.calculateForAdoption(adoption.originalAdoptionId); + } + }); + + this.logger.debug(`Adoption updated: ${originalAdoptionId}`); + } + + private async handleDelete(data: any): Promise { + if (!data) return; + // 认种删除需要特殊处理(回滚算力) + // 但通常不会发生删除操作 + this.logger.warn(`Adoption delete event received: ${data.id}. This may require contribution rollback.`); + } +} diff --git a/backend/services/contribution-service/src/application/event-handlers/cdc-event-dispatcher.ts b/backend/services/contribution-service/src/application/event-handlers/cdc-event-dispatcher.ts new file mode 100644 index 00000000..639d15a3 --- /dev/null +++ b/backend/services/contribution-service/src/application/event-handlers/cdc-event-dispatcher.ts @@ -0,0 +1,49 @@ +import { Injectable, OnModuleInit, Logger } from '@nestjs/common'; +import { CDCConsumerService, CDCEvent } from '../../infrastructure/kafka/cdc-consumer.service'; +import { UserSyncedHandler } from './user-synced.handler'; +import { ReferralSyncedHandler } from './referral-synced.handler'; +import { AdoptionSyncedHandler } from './adoption-synced.handler'; + +/** + * CDC 事件分发器 + * 负责将 Debezium CDC 事件路由到对应的处理器 + */ +@Injectable() +export class CDCEventDispatcher implements OnModuleInit { + private readonly logger = new Logger(CDCEventDispatcher.name); + + constructor( + private readonly cdcConsumer: CDCConsumerService, + private readonly userHandler: UserSyncedHandler, + private readonly referralHandler: ReferralSyncedHandler, + private readonly adoptionHandler: AdoptionSyncedHandler, + ) {} + + async onModuleInit() { + // 注册各表的事件处理器 + this.cdcConsumer.registerHandler('users', this.handleUserEvent.bind(this)); + this.cdcConsumer.registerHandler('referrals', this.handleReferralEvent.bind(this)); + this.cdcConsumer.registerHandler('adoptions', this.handleAdoptionEvent.bind(this)); + + // 启动 CDC 消费者 + try { + await this.cdcConsumer.start(); + this.logger.log('CDC event dispatcher started'); + } catch (error) { + this.logger.error('Failed to start CDC event dispatcher', error); + // 不抛出错误,允许服务在没有 Kafka 的情况下启动(用于本地开发) + } + } + + private async handleUserEvent(event: CDCEvent): Promise { + await this.userHandler.handle(event); + } + + private async handleReferralEvent(event: CDCEvent): Promise { + await this.referralHandler.handle(event); + } + + private async handleAdoptionEvent(event: CDCEvent): Promise { + await this.adoptionHandler.handle(event); + } +} diff --git a/backend/services/contribution-service/src/application/event-handlers/referral-synced.handler.ts b/backend/services/contribution-service/src/application/event-handlers/referral-synced.handler.ts new file mode 100644 index 00000000..1ed3113b --- /dev/null +++ b/backend/services/contribution-service/src/application/event-handlers/referral-synced.handler.ts @@ -0,0 +1,80 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { CDCEvent } from '../../infrastructure/kafka/cdc-consumer.service'; +import { SyncedDataRepository } from '../../infrastructure/persistence/repositories/synced-data.repository'; +import { UnitOfWork } from '../../infrastructure/persistence/unit-of-work/unit-of-work'; + +/** + * 引荐关系 CDC 事件处理器 + * 处理从引荐服务同步过来的引荐关系数据 + */ +@Injectable() +export class ReferralSyncedHandler { + private readonly logger = new Logger(ReferralSyncedHandler.name); + + constructor( + private readonly syncedDataRepository: SyncedDataRepository, + private readonly unitOfWork: UnitOfWork, + ) {} + + async handle(event: CDCEvent): Promise { + const { op, before, after } = event.payload; + + try { + switch (op) { + case 'c': // create + case 'r': // read (snapshot) + await this.handleCreate(after, event.sequenceNum); + break; + case 'u': // update + await this.handleUpdate(after, event.sequenceNum); + break; + case 'd': // delete + await this.handleDelete(before); + break; + default: + this.logger.warn(`Unknown CDC operation: ${op}`); + } + } catch (error) { + this.logger.error(`Failed to handle referral CDC event`, error); + throw error; + } + } + + private async handleCreate(data: any, sequenceNum: bigint): Promise { + if (!data) return; + + await this.unitOfWork.executeInTransaction(async () => { + await this.syncedDataRepository.upsertSyncedReferral({ + accountSequence: data.account_sequence || data.accountSequence, + referrerAccountSequence: data.referrer_account_sequence || data.referrerAccountSequence || null, + ancestorPath: data.ancestor_path || data.ancestorPath || null, + depth: data.depth || 0, + sourceSequenceNum: sequenceNum, + }); + }); + + this.logger.log( + `Referral synced: ${data.account_sequence || data.accountSequence} -> ${data.referrer_account_sequence || data.referrerAccountSequence || 'none'}`, + ); + } + + private async handleUpdate(data: any, sequenceNum: bigint): Promise { + if (!data) return; + + await this.syncedDataRepository.upsertSyncedReferral({ + accountSequence: data.account_sequence || data.accountSequence, + referrerAccountSequence: data.referrer_account_sequence || data.referrerAccountSequence || null, + ancestorPath: data.ancestor_path || data.ancestorPath || null, + depth: data.depth || 0, + sourceSequenceNum: sequenceNum, + }); + + this.logger.debug(`Referral updated: ${data.account_sequence || data.accountSequence}`); + } + + private async handleDelete(data: any): Promise { + if (!data) return; + // 引荐关系删除需要特殊处理 + this.logger.warn(`Referral delete event received: ${data.account_sequence || data.accountSequence}`); + } +} diff --git a/backend/services/contribution-service/src/application/event-handlers/user-synced.handler.ts b/backend/services/contribution-service/src/application/event-handlers/user-synced.handler.ts new file mode 100644 index 00000000..a4a4659f --- /dev/null +++ b/backend/services/contribution-service/src/application/event-handlers/user-synced.handler.ts @@ -0,0 +1,92 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { CDCEvent } from '../../infrastructure/kafka/cdc-consumer.service'; +import { SyncedDataRepository } from '../../infrastructure/persistence/repositories/synced-data.repository'; +import { ContributionAccountRepository } from '../../infrastructure/persistence/repositories/contribution-account.repository'; +import { ContributionAccountAggregate } from '../../domain/aggregates/contribution-account.aggregate'; +import { UnitOfWork } from '../../infrastructure/persistence/unit-of-work/unit-of-work'; + +/** + * 用户 CDC 事件处理器 + * 处理从身份服务同步过来的用户数据 + */ +@Injectable() +export class UserSyncedHandler { + private readonly logger = new Logger(UserSyncedHandler.name); + + constructor( + private readonly syncedDataRepository: SyncedDataRepository, + private readonly contributionAccountRepository: ContributionAccountRepository, + private readonly unitOfWork: UnitOfWork, + ) {} + + async handle(event: CDCEvent): Promise { + const { op, before, after } = event.payload; + + try { + switch (op) { + case 'c': // create + case 'r': // read (snapshot) + await this.handleCreate(after, event.sequenceNum); + break; + case 'u': // update + await this.handleUpdate(after, event.sequenceNum); + break; + case 'd': // delete + await this.handleDelete(before); + break; + default: + this.logger.warn(`Unknown CDC operation: ${op}`); + } + } catch (error) { + this.logger.error(`Failed to handle user CDC event`, error); + throw error; + } + } + + private async handleCreate(data: any, sequenceNum: bigint): Promise { + if (!data) return; + + await this.unitOfWork.executeInTransaction(async () => { + // 保存同步的用户数据 + await this.syncedDataRepository.upsertSyncedUser({ + originalUserId: BigInt(data.id), + accountSequence: data.account_sequence || data.accountSequence, + phone: data.phone || null, + status: data.status || 'ACTIVE', + sourceSequenceNum: sequenceNum, + }); + + // 为用户创建算力账户(如果不存在) + const accountSequence = data.account_sequence || data.accountSequence; + const existingAccount = await this.contributionAccountRepository.findByAccountSequence(accountSequence); + + if (!existingAccount) { + const newAccount = ContributionAccountAggregate.create(accountSequence); + await this.contributionAccountRepository.save(newAccount); + this.logger.log(`Created contribution account for user: ${accountSequence}`); + } + }); + + this.logger.debug(`User synced: ${data.account_sequence || data.accountSequence}`); + } + + private async handleUpdate(data: any, sequenceNum: bigint): Promise { + if (!data) return; + + await this.syncedDataRepository.upsertSyncedUser({ + originalUserId: BigInt(data.id), + accountSequence: data.account_sequence || data.accountSequence, + phone: data.phone || null, + status: data.status || 'ACTIVE', + sourceSequenceNum: sequenceNum, + }); + + this.logger.debug(`User updated: ${data.account_sequence || data.accountSequence}`); + } + + private async handleDelete(data: any): Promise { + if (!data) return; + // 用户删除一般不处理,保留历史数据 + this.logger.debug(`User delete event received: ${data.account_sequence || data.accountSequence}`); + } +} diff --git a/backend/services/contribution-service/src/application/queries/get-contribution-account.query.ts b/backend/services/contribution-service/src/application/queries/get-contribution-account.query.ts new file mode 100644 index 00000000..056b4f2d --- /dev/null +++ b/backend/services/contribution-service/src/application/queries/get-contribution-account.query.ts @@ -0,0 +1,137 @@ +import { Injectable } from '@nestjs/common'; +import { ContributionAccountRepository } from '../../infrastructure/persistence/repositories/contribution-account.repository'; +import { ContributionRecordRepository } from '../../infrastructure/persistence/repositories/contribution-record.repository'; +import { ContributionAmount } from '../../domain/value-objects/contribution-amount.vo'; + +export interface ContributionAccountDto { + accountSequence: string; + personalContribution: string; + teamLevelContribution: string; + teamBonusContribution: string; + totalContribution: string; + hasAdopted: boolean; + directReferralAdoptedCount: number; + unlockedLevelDepth: number; + unlockedBonusTiers: number; + isCalculated: boolean; + lastCalculatedAt: Date | null; +} + +export interface ContributionRecordDto { + id: string; + sourceType: string; + sourceAdoptionId: string; + sourceAccountSequence: string | null; + treeCount: number; + baseContribution: string; + distributionRate: string; + levelDepth: number | null; + bonusTier: number | null; + finalContribution: string; + effectiveDate: Date; + expireDate: Date; + isExpired: boolean; + createdAt: Date; +} + +@Injectable() +export class GetContributionAccountQuery { + constructor( + private readonly accountRepository: ContributionAccountRepository, + private readonly recordRepository: ContributionRecordRepository, + ) {} + + /** + * 获取账户算力信息 + */ + async execute(accountSequence: string): Promise { + const account = await this.accountRepository.findByAccountSequence(accountSequence); + if (!account) { + return null; + } + + return this.toDto(account); + } + + /** + * 获取账户的算力明细记录 + */ + async getRecords( + accountSequence: string, + options?: { + sourceType?: string; + includeExpired?: boolean; + page?: number; + pageSize?: number; + }, + ): Promise<{ data: ContributionRecordDto[]; total: number }> { + const result = await this.recordRepository.findByAccountSequence(accountSequence, { + sourceType: options?.sourceType as any, + includeExpired: options?.includeExpired ?? false, + page: options?.page ?? 1, + limit: options?.pageSize ?? 50, + }); + + return { + data: result.items.map((r: any) => this.toRecordDto(r)), + total: result.total, + }; + } + + /** + * 获取账户的活跃算力统计 + */ + async getActiveContribution(accountSequence: string): Promise<{ + personal: string; + teamLevel: string; + teamBonus: string; + total: string; + } | null> { + const result = await this.recordRepository.getActiveContributionByAccount(accountSequence); + if (!result) { + return null; + } + + return { + personal: result.personal.value.toString(), + teamLevel: result.teamLevel.value.toString(), + teamBonus: result.teamBonus.value.toString(), + total: result.total.value.toString(), + }; + } + + private toDto(account: any): ContributionAccountDto { + return { + accountSequence: account.accountSequence, + personalContribution: account.personalContribution.value.toString(), + teamLevelContribution: account.teamLevelContribution.value.toString(), + teamBonusContribution: account.teamBonusContribution.value.toString(), + totalContribution: account.totalContribution.value.toString(), + hasAdopted: account.hasAdopted, + directReferralAdoptedCount: account.directReferralAdoptedCount, + unlockedLevelDepth: account.unlockedLevelDepth, + unlockedBonusTiers: account.unlockedBonusTiers, + isCalculated: account.isCalculated, + lastCalculatedAt: account.lastCalculatedAt, + }; + } + + private toRecordDto(record: any): ContributionRecordDto { + return { + id: record.id, + sourceType: record.sourceType, + sourceAdoptionId: record.sourceAdoptionId, + sourceAccountSequence: record.sourceAccountSequence, + treeCount: record.treeCount, + baseContribution: record.baseContribution.value.toString(), + distributionRate: record.distributionRate.value.toString(), + levelDepth: record.levelDepth, + bonusTier: record.bonusTier, + finalContribution: record.finalContribution.value.toString(), + effectiveDate: record.effectiveDate, + expireDate: record.expireDate, + isExpired: record.isExpired, + createdAt: record.createdAt, + }; + } +} diff --git a/backend/services/contribution-service/src/application/queries/get-contribution-ranking.query.ts b/backend/services/contribution-service/src/application/queries/get-contribution-ranking.query.ts new file mode 100644 index 00000000..fffd4034 --- /dev/null +++ b/backend/services/contribution-service/src/application/queries/get-contribution-ranking.query.ts @@ -0,0 +1,87 @@ +import { Injectable } from '@nestjs/common'; +import { ContributionAccountRepository } from '../../infrastructure/persistence/repositories/contribution-account.repository'; +import { RedisService } from '../../infrastructure/redis/redis.service'; + +export interface ContributionRankingDto { + rank: number; + accountSequence: string; + totalContribution: string; + personalContribution: string; + teamContribution: string; +} + +@Injectable() +export class GetContributionRankingQuery { + private readonly RANKING_CACHE_KEY = 'contribution:ranking'; + private readonly CACHE_TTL = 300; // 5分钟缓存 + + constructor( + private readonly accountRepository: ContributionAccountRepository, + private readonly redis: RedisService, + ) {} + + /** + * 获取算力排行榜 + */ + async execute(limit: number = 100): Promise { + // 尝试从缓存获取 + const cached = await this.redis.getJson(`${this.RANKING_CACHE_KEY}:${limit}`); + if (cached) { + return cached; + } + + // 从数据库获取 + const topContributors = await this.accountRepository.findTopContributors(limit); + + const ranking: ContributionRankingDto[] = topContributors.map((account, index) => ({ + rank: index + 1, + accountSequence: account.accountSequence, + totalContribution: account.totalContribution.value.toString(), + personalContribution: account.personalContribution.value.toString(), + teamContribution: account.teamLevelContribution.add(account.teamBonusContribution).value.toString(), + })); + + // 缓存结果 + await this.redis.setJson(`${this.RANKING_CACHE_KEY}:${limit}`, ranking, this.CACHE_TTL); + + return ranking; + } + + /** + * 获取指定用户的排名 + */ + async getUserRank(accountSequence: string): Promise<{ + rank: number | null; + totalContribution: string; + percentile: number | null; + } | null> { + const account = await this.accountRepository.findByAccountSequence(accountSequence); + if (!account) { + return null; + } + + // 使用 Redis 有序集合来快速获取排名 + // 这需要在算力变化时同步更新 Redis + const rank = await this.redis.zrevrank('contribution:leaderboard', accountSequence); + const totalAccounts = await this.accountRepository.countAccountsWithContribution(); + + return { + rank: rank !== null ? rank + 1 : null, + totalContribution: account.totalContribution.value.toString(), + percentile: rank !== null && totalAccounts > 0 ? ((totalAccounts - rank) / totalAccounts) * 100 : null, + }; + } + + /** + * 刷新排行榜缓存 + */ + async refreshRankingCache(): Promise { + // 清除旧缓存 + await this.redis.del(`${this.RANKING_CACHE_KEY}:100`); + await this.redis.del(`${this.RANKING_CACHE_KEY}:50`); + await this.redis.del(`${this.RANKING_CACHE_KEY}:10`); + + // 重新生成缓存 + await this.execute(100); + } +} diff --git a/backend/services/contribution-service/src/application/queries/get-contribution-stats.query.ts b/backend/services/contribution-service/src/application/queries/get-contribution-stats.query.ts new file mode 100644 index 00000000..9d6b0ad9 --- /dev/null +++ b/backend/services/contribution-service/src/application/queries/get-contribution-stats.query.ts @@ -0,0 +1,101 @@ +import { Injectable } from '@nestjs/common'; +import { ContributionAccountRepository } from '../../infrastructure/persistence/repositories/contribution-account.repository'; +import { ContributionRecordRepository } from '../../infrastructure/persistence/repositories/contribution-record.repository'; +import { UnallocatedContributionRepository } from '../../infrastructure/persistence/repositories/unallocated-contribution.repository'; +import { SystemAccountRepository } from '../../infrastructure/persistence/repositories/system-account.repository'; +import { SyncedDataRepository } from '../../infrastructure/persistence/repositories/synced-data.repository'; +import { ContributionSourceType } from '../../domain/aggregates/contribution-account.aggregate'; + +export interface ContributionStatsDto { + // 用户统计 + totalUsers: number; + totalAccounts: number; + accountsWithContribution: number; + + // 认种统计 + totalAdoptions: number; + processedAdoptions: number; + unprocessedAdoptions: number; + + // 算力统计 + totalContribution: string; + + // 算力分布 + contributionByType: { + personal: string; + teamLevel: string; + teamBonus: string; + }; + + // 系统账户 + systemAccounts: { + accountType: string; + name: string; + totalContribution: string; + }[]; + + // 未分配算力 + totalUnallocated: string; + unallocatedByType: Record; +} + +@Injectable() +export class GetContributionStatsQuery { + constructor( + private readonly accountRepository: ContributionAccountRepository, + private readonly recordRepository: ContributionRecordRepository, + private readonly unallocatedRepository: UnallocatedContributionRepository, + private readonly systemAccountRepository: SystemAccountRepository, + private readonly syncedDataRepository: SyncedDataRepository, + ) {} + + async execute(): Promise { + const [ + totalUsers, + totalAccounts, + accountsWithContribution, + totalAdoptions, + undistributedAdoptions, + totalContribution, + contributionByType, + systemAccounts, + totalUnallocated, + unallocatedByType, + ] = await Promise.all([ + this.syncedDataRepository.countUsers(), + this.accountRepository.countAccounts(), + this.accountRepository.countAccountsWithContribution(), + this.syncedDataRepository.countAdoptions(), + this.syncedDataRepository.countUndistributedAdoptions(), + this.accountRepository.getTotalContribution(), + this.recordRepository.getContributionSummaryBySourceType(), + this.systemAccountRepository.findAll(), + this.unallocatedRepository.getTotalUnallocated(), + this.unallocatedRepository.getTotalUnallocatedByType(), + ]); + + return { + totalUsers, + totalAccounts, + accountsWithContribution, + totalAdoptions, + processedAdoptions: totalAdoptions - undistributedAdoptions, + unprocessedAdoptions: undistributedAdoptions, + totalContribution: totalContribution.value.toString(), + contributionByType: { + personal: (contributionByType.get(ContributionSourceType.PERSONAL)?.value || 0).toString(), + teamLevel: (contributionByType.get(ContributionSourceType.TEAM_LEVEL)?.value || 0).toString(), + teamBonus: (contributionByType.get(ContributionSourceType.TEAM_BONUS)?.value || 0).toString(), + }, + systemAccounts: systemAccounts.map((a) => ({ + accountType: a.accountType, + name: a.name, + totalContribution: a.contributionBalance.value.toString(), + })), + totalUnallocated: totalUnallocated.value.toString(), + unallocatedByType: Object.fromEntries( + Array.from(unallocatedByType.entries()).map(([k, v]) => [k, v.value.toString()]), + ), + }; + } +} diff --git a/backend/services/contribution-service/src/application/schedulers/contribution.scheduler.ts b/backend/services/contribution-service/src/application/schedulers/contribution.scheduler.ts new file mode 100644 index 00000000..b049826f --- /dev/null +++ b/backend/services/contribution-service/src/application/schedulers/contribution.scheduler.ts @@ -0,0 +1,178 @@ +import { Injectable, Logger, OnModuleInit } from '@nestjs/common'; +import { Cron, CronExpression } from '@nestjs/schedule'; +import { ContributionCalculationService } from '../services/contribution-calculation.service'; +import { SnapshotService } from '../services/snapshot.service'; +import { ContributionRecordRepository } from '../../infrastructure/persistence/repositories/contribution-record.repository'; +import { OutboxRepository } from '../../infrastructure/persistence/repositories/outbox.repository'; +import { KafkaProducerService } from '../../infrastructure/kafka/kafka-producer.service'; +import { RedisService } from '../../infrastructure/redis/redis.service'; + +/** + * 算力相关定时任务 + */ +@Injectable() +export class ContributionScheduler implements OnModuleInit { + private readonly logger = new Logger(ContributionScheduler.name); + private readonly LOCK_KEY = 'contribution:scheduler:lock'; + + constructor( + private readonly calculationService: ContributionCalculationService, + private readonly snapshotService: SnapshotService, + private readonly contributionRecordRepository: ContributionRecordRepository, + private readonly outboxRepository: OutboxRepository, + private readonly kafkaProducer: KafkaProducerService, + private readonly redis: RedisService, + ) {} + + async onModuleInit() { + this.logger.log('Contribution scheduler initialized'); + } + + /** + * 每分钟处理未处理的认种记录 + */ + @Cron(CronExpression.EVERY_MINUTE) + async processUnprocessedAdoptions(): Promise { + const lockValue = await this.redis.acquireLock(`${this.LOCK_KEY}:process`, 55); + if (!lockValue) { + return; // 其他实例正在处理 + } + + try { + const processed = await this.calculationService.processUndistributedAdoptions(100); + if (processed > 0) { + this.logger.log(`Processed ${processed} unprocessed adoptions`); + } + } catch (error) { + this.logger.error('Failed to process unprocessed adoptions', error); + } finally { + await this.redis.releaseLock(`${this.LOCK_KEY}:process`, lockValue); + } + } + + /** + * 每天凌晨1点创建每日快照 + */ + @Cron('0 1 * * *') + async createDailySnapshot(): Promise { + const lockValue = await this.redis.acquireLock(`${this.LOCK_KEY}:snapshot`, 300); + if (!lockValue) { + return; + } + + try { + // 创建前一天的快照 + const yesterday = new Date(); + yesterday.setDate(yesterday.getDate() - 1); + + await this.snapshotService.createDailySnapshot(yesterday); + this.logger.log(`Daily snapshot created for ${yesterday.toISOString().split('T')[0]}`); + } catch (error) { + this.logger.error('Failed to create daily snapshot', error); + } finally { + await this.redis.releaseLock(`${this.LOCK_KEY}:snapshot`, lockValue); + } + } + + /** + * 每天凌晨2点检查过期的算力记录 + */ + @Cron('0 2 * * *') + async processExpiredRecords(): Promise { + const lockValue = await this.redis.acquireLock(`${this.LOCK_KEY}:expire`, 300); + if (!lockValue) { + return; + } + + try { + const now = new Date(); + const expiredRecords = await this.contributionRecordRepository.findExpiredRecords(now, 1000); + + if (expiredRecords.length > 0) { + const ids = expiredRecords.map((r) => r.id).filter((id): id is bigint => id !== null); + await this.contributionRecordRepository.markAsExpired(ids); + this.logger.log(`Marked ${ids.length} contribution records as expired`); + + // TODO: 需要相应地减少账户的算力值 + } + } catch (error) { + this.logger.error('Failed to process expired records', error); + } finally { + await this.redis.releaseLock(`${this.LOCK_KEY}:expire`, lockValue); + } + } + + /** + * 每30秒发布 Outbox 中的事件 + */ + @Cron('*/30 * * * * *') + async publishOutboxEvents(): Promise { + const lockValue = await this.redis.acquireLock(`${this.LOCK_KEY}:outbox`, 25); + if (!lockValue) { + return; + } + + try { + const events = await this.outboxRepository.findUnprocessed(100); + + if (events.length === 0) { + return; + } + + for (const event of events) { + try { + await this.kafkaProducer.emit(`contribution.${event.eventType}`, { + key: event.aggregateId, + value: { + eventId: event.id, + aggregateType: event.aggregateType, + aggregateId: event.aggregateId, + eventType: event.eventType, + payload: event.payload, + createdAt: event.createdAt.toISOString(), + }, + }); + } catch (error) { + this.logger.error(`Failed to publish event ${event.id}`, error); + // 继续处理下一个事件 + continue; + } + } + + // 标记为已处理 + const processedIds = events.map((e) => e.id); + await this.outboxRepository.markAsProcessed(processedIds); + + this.logger.debug(`Published ${processedIds.length} outbox events`); + } catch (error) { + this.logger.error('Failed to publish outbox events', error); + } finally { + await this.redis.releaseLock(`${this.LOCK_KEY}:outbox`, lockValue); + } + } + + /** + * 每天凌晨3点清理已处理的 Outbox 事件(保留7天) + */ + @Cron('0 3 * * *') + async cleanupOutbox(): Promise { + const lockValue = await this.redis.acquireLock(`${this.LOCK_KEY}:cleanup`, 300); + if (!lockValue) { + return; + } + + try { + const sevenDaysAgo = new Date(); + sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7); + + const deleted = await this.outboxRepository.deleteProcessed(sevenDaysAgo); + if (deleted > 0) { + this.logger.log(`Cleaned up ${deleted} processed outbox events`); + } + } catch (error) { + this.logger.error('Failed to cleanup outbox', error); + } finally { + await this.redis.releaseLock(`${this.LOCK_KEY}:cleanup`, lockValue); + } + } +} diff --git a/backend/services/contribution-service/src/application/services/contribution-calculation.service.ts b/backend/services/contribution-service/src/application/services/contribution-calculation.service.ts new file mode 100644 index 00000000..1d2461b7 --- /dev/null +++ b/backend/services/contribution-service/src/application/services/contribution-calculation.service.ts @@ -0,0 +1,270 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { ContributionCalculatorService, ContributionDistributionResult } from '../../domain/services/contribution-calculator.service'; +import { ContributionAccountRepository } from '../../infrastructure/persistence/repositories/contribution-account.repository'; +import { ContributionRecordRepository } from '../../infrastructure/persistence/repositories/contribution-record.repository'; +import { SyncedDataRepository } from '../../infrastructure/persistence/repositories/synced-data.repository'; +import { UnallocatedContributionRepository } from '../../infrastructure/persistence/repositories/unallocated-contribution.repository'; +import { SystemAccountRepository } from '../../infrastructure/persistence/repositories/system-account.repository'; +import { OutboxRepository } from '../../infrastructure/persistence/repositories/outbox.repository'; +import { UnitOfWork } from '../../infrastructure/persistence/unit-of-work/unit-of-work'; +import { ContributionAccountAggregate, ContributionSourceType } from '../../domain/aggregates/contribution-account.aggregate'; +import { SyncedReferral } from '../../domain/repositories/synced-data.repository.interface'; + +/** + * 算力计算应用服务 + * 协调领域服务和仓库,完成算力计算的完整流程 + */ +@Injectable() +export class ContributionCalculationService { + private readonly logger = new Logger(ContributionCalculationService.name); + private readonly domainCalculator = new ContributionCalculatorService(); + + constructor( + private readonly contributionAccountRepository: ContributionAccountRepository, + private readonly contributionRecordRepository: ContributionRecordRepository, + private readonly syncedDataRepository: SyncedDataRepository, + private readonly unallocatedContributionRepository: UnallocatedContributionRepository, + private readonly systemAccountRepository: SystemAccountRepository, + private readonly outboxRepository: OutboxRepository, + private readonly unitOfWork: UnitOfWork, + ) {} + + /** + * 为认种计算并分配算力 + */ + async calculateForAdoption(originalAdoptionId: bigint): Promise { + // 检查是否已经处理过 + const exists = await this.contributionRecordRepository.existsBySourceAdoptionId(originalAdoptionId); + if (exists) { + this.logger.debug(`Adoption ${originalAdoptionId} already processed, skipping`); + return; + } + + // 获取认种数据 + const adoption = await this.syncedDataRepository.findSyncedAdoptionByOriginalId(originalAdoptionId); + if (!adoption) { + throw new Error(`Adoption not found: ${originalAdoptionId}`); + } + + // 获取认种用户的引荐关系 + const userReferral = await this.syncedDataRepository.findSyncedReferralByAccountSequence(adoption.accountSequence); + + // 获取上线链条(最多15级) + let ancestorChain: SyncedReferral[] = []; + if (userReferral?.referrerAccountSequence) { + ancestorChain = await this.buildAncestorChain(userReferral.referrerAccountSequence); + } + + // 获取上线的算力账户(用于判断解锁状态) + const ancestorAccountSequences = ancestorChain.map((a) => a.accountSequence); + const ancestorAccounts = await this.contributionAccountRepository.findByAccountSequences(ancestorAccountSequences); + + // 执行算力计算 + const result = this.domainCalculator.calculateAdoptionContribution(adoption, ancestorChain, ancestorAccounts); + + // 在事务中保存所有结果 + await this.unitOfWork.executeInTransaction(async () => { + await this.saveDistributionResult(result, adoption.originalAdoptionId, adoption.accountSequence); + + // 标记认种已处理 + await this.syncedDataRepository.markAdoptionContributionDistributed(adoption.originalAdoptionId); + + // 更新认种人的解锁状态(如果是首次认种) + await this.updateAdopterUnlockStatus(adoption.accountSequence); + + // 更新直接上线的解锁状态 + if (userReferral?.referrerAccountSequence) { + await this.updateReferrerUnlockStatus(userReferral.referrerAccountSequence); + } + + // 发布事件到 Outbox + await this.outboxRepository.save({ + aggregateType: 'ContributionAccount', + aggregateId: adoption.accountSequence, + eventType: 'ContributionCalculated', + payload: { + accountSequence: adoption.accountSequence, + sourceAdoptionId: originalAdoptionId.toString(), + personalContribution: result.personalRecord.amount.value.toString(), + teamLevelCount: result.teamLevelRecords.length, + teamBonusCount: result.teamBonusRecords.length, + unallocatedCount: result.unallocatedContributions.length, + calculatedAt: new Date().toISOString(), + }, + }); + }); + + this.logger.log( + `Contribution calculated for adoption ${originalAdoptionId}: ` + + `personal=${result.personalRecord.amount.value}, ` + + `teamLevel=${result.teamLevelRecords.length}, ` + + `teamBonus=${result.teamBonusRecords.length}, ` + + `unallocated=${result.unallocatedContributions.length}`, + ); + } + + /** + * 批量计算未处理的认种 + */ + async processUndistributedAdoptions(batchSize: number = 100): Promise { + const undistributed = await this.syncedDataRepository.findUndistributedAdoptions(batchSize); + + let processedCount = 0; + for (const adoption of undistributed) { + try { + await this.calculateForAdoption(adoption.originalAdoptionId); + processedCount++; + } catch (error) { + this.logger.error(`Failed to process adoption ${adoption.originalAdoptionId}`, error); + // 继续处理下一个 + } + } + + return processedCount; + } + + /** + * 重新计算指定账户的全部算力 + * 用于修正或审计 + */ + async recalculateForAccount(accountSequence: string): Promise { + const adoptions = await this.syncedDataRepository.findAdoptionsByAccountSequence(accountSequence); + + for (const adoption of adoptions) { + // 这里需要特殊处理:先清除旧记录,再重新计算 + // TODO: 实现完整的重新计算逻辑 + this.logger.warn(`Recalculation for ${accountSequence} not fully implemented yet`); + } + } + + /** + * 构建上线链条 + */ + private async buildAncestorChain(startAccountSequence: string): Promise { + return await this.syncedDataRepository.findAncestorChain(startAccountSequence, 15); + } + + /** + * 保存分配结果 + */ + private async saveDistributionResult( + result: ContributionDistributionResult, + sourceAdoptionId: bigint, + sourceAccountSequence: string, + ): Promise { + // 1. 保存个人算力记录 + await this.contributionRecordRepository.save(result.personalRecord); + + // 更新个人算力账户 + let account = await this.contributionAccountRepository.findByAccountSequence( + result.personalRecord.accountSequence, + ); + if (!account) { + account = ContributionAccountAggregate.create(result.personalRecord.accountSequence); + } + account.addPersonalContribution(result.personalRecord.amount); + await this.contributionAccountRepository.save(account); + + // 2. 保存团队层级算力记录 + if (result.teamLevelRecords.length > 0) { + await this.contributionRecordRepository.saveMany(result.teamLevelRecords); + + // 更新各上线的算力账户 + for (const record of result.teamLevelRecords) { + await this.contributionAccountRepository.updateContribution( + record.accountSequence, + ContributionSourceType.TEAM_LEVEL, + record.amount, + ); + } + } + + // 3. 保存团队奖励算力记录 + if (result.teamBonusRecords.length > 0) { + await this.contributionRecordRepository.saveMany(result.teamBonusRecords); + + // 更新直接上线的算力账户 + for (const record of result.teamBonusRecords) { + await this.contributionAccountRepository.updateContribution( + record.accountSequence, + ContributionSourceType.TEAM_BONUS, + record.amount, + ); + } + } + + // Get effectiveDate and expireDate from the personal record + const effectiveDate = result.personalRecord.effectiveDate; + const expireDate = result.personalRecord.expireDate; + + // 4. 保存未分配算力 + if (result.unallocatedContributions.length > 0) { + await this.unallocatedContributionRepository.saveMany( + result.unallocatedContributions.map((u) => ({ + ...u, + sourceAdoptionId, + sourceAccountSequence, + effectiveDate, + expireDate, + })), + ); + } + + // 5. 保存系统账户算力 + if (result.systemContributions.length > 0) { + await this.systemAccountRepository.ensureSystemAccountsExist(); + + for (const sys of result.systemContributions) { + await this.systemAccountRepository.addContribution(sys.accountType, sys.amount); + await this.systemAccountRepository.saveContributionRecord({ + systemAccountType: sys.accountType, + sourceAdoptionId, + sourceAccountSequence, + distributionRate: sys.rate.value.toNumber(), + amount: sys.amount, + effectiveDate, + expireDate: null, // System account contributions never expire based on the schema's contributionNeverExpires field + }); + } + } + } + + /** + * 更新认种人的解锁状态 + */ + private async updateAdopterUnlockStatus(accountSequence: string): Promise { + const account = await this.contributionAccountRepository.findByAccountSequence(accountSequence); + if (!account) return; + + if (!account.hasAdopted) { + account.markAsAdopted(); + await this.contributionAccountRepository.save(account); + } + } + + /** + * 更新上线的解锁状态(直推用户认种后) + */ + private async updateReferrerUnlockStatus(referrerAccountSequence: string): Promise { + const account = await this.contributionAccountRepository.findByAccountSequence(referrerAccountSequence); + if (!account) return; + + // 重新计算直推认种用户数 + const directReferralAdoptedCount = await this.syncedDataRepository.getDirectReferralAdoptedCount( + referrerAccountSequence, + ); + + // 更新解锁状态 + const currentCount = account.directReferralAdoptedCount; + if (directReferralAdoptedCount > currentCount) { + // 需要增量更新 + for (let i = currentCount; i < directReferralAdoptedCount; i++) { + account.incrementDirectReferralAdoptedCount(); + } + await this.contributionAccountRepository.save(account); + this.logger.debug( + `Updated referrer ${referrerAccountSequence} unlock status: level=${account.unlockedLevelDepth}, bonus=${account.unlockedBonusTiers}`, + ); + } + } +} diff --git a/backend/services/contribution-service/src/application/services/snapshot.service.ts b/backend/services/contribution-service/src/application/services/snapshot.service.ts new file mode 100644 index 00000000..3a09d2ff --- /dev/null +++ b/backend/services/contribution-service/src/application/services/snapshot.service.ts @@ -0,0 +1,274 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { ContributionAccountRepository } from '../../infrastructure/persistence/repositories/contribution-account.repository'; +import { OutboxRepository } from '../../infrastructure/persistence/repositories/outbox.repository'; +import { UnitOfWork } from '../../infrastructure/persistence/unit-of-work/unit-of-work'; +import { PrismaService } from '../../infrastructure/persistence/prisma/prisma.service'; +import { ContributionAmount } from '../../domain/value-objects/contribution-amount.vo'; +import Decimal from 'decimal.js'; + +export interface UserContributionSnapshot { + id: bigint; + snapshotDate: Date; + accountSequence: string; + effectiveContribution: ContributionAmount; + networkTotalContribution: ContributionAmount; + contributionRatio: Decimal; + createdAt: Date; +} + +export interface DailySnapshotSummary { + snapshotDate: Date; + networkTotalContribution: ContributionAmount; + totalAccounts: number; + activeAccounts: number; + createdAt: Date; +} + +/** + * 每日快照服务 + * 负责生成每日算力快照,供 mining-service 使用 + */ +@Injectable() +export class SnapshotService { + private readonly logger = new Logger(SnapshotService.name); + + constructor( + private readonly contributionAccountRepository: ContributionAccountRepository, + private readonly outboxRepository: OutboxRepository, + private readonly unitOfWork: UnitOfWork, + private readonly prisma: PrismaService, + ) {} + + /** + * 创建每日算力快照 + * 为所有有效算力大于0的账户创建快照记录 + */ + async createDailySnapshot(snapshotDate: Date): Promise { + const dateStr = this.formatDate(snapshotDate); + const snapshotDateOnly = new Date(dateStr); + + // 检查是否已存在快照 + const existingCount = await this.prisma.dailyContributionSnapshot.count({ + where: { snapshotDate: snapshotDateOnly }, + }); + + if (existingCount > 0) { + this.logger.warn(`Snapshot for ${dateStr} already exists with ${existingCount} records`); + const existingSummary = await this.getSnapshotSummary(snapshotDate); + if (!existingSummary) { + throw new Error(`Snapshot exists but summary could not be retrieved for ${dateStr}`); + } + return existingSummary; + } + + // 获取全网有效算力总和 + const aggregation = await this.prisma.contributionAccount.aggregate({ + _sum: { effectiveContribution: true }, + _count: { id: true }, + }); + + const networkTotalContribution = aggregation._sum.effectiveContribution || new Decimal(0); + const totalAccounts = aggregation._count.id; + + // 获取有效算力大于0的账户 + const activeAccounts = await this.prisma.contributionAccount.findMany({ + where: { effectiveContribution: { gt: 0 } }, + select: { + accountSequence: true, + effectiveContribution: true, + }, + }); + + await this.unitOfWork.executeInTransaction(async () => { + // 批量创建每个账户的快照记录 + if (activeAccounts.length > 0) { + await this.prisma.dailyContributionSnapshot.createMany({ + data: activeAccounts.map((account) => ({ + snapshotDate: snapshotDateOnly, + accountSequence: account.accountSequence, + effectiveContribution: account.effectiveContribution, + networkTotalContribution: networkTotalContribution, + contributionRatio: networkTotalContribution.isZero() + ? new Decimal(0) + : new Decimal(account.effectiveContribution).dividedBy(networkTotalContribution), + })), + }); + } + + // 发布快照创建事件 + await this.outboxRepository.save({ + aggregateType: 'DailySnapshot', + aggregateId: dateStr, + eventType: 'DailySnapshotCreated', + payload: { + snapshotDate: dateStr, + networkTotalContribution: networkTotalContribution.toString(), + activeAccounts: activeAccounts.length, + totalAccounts, + createdAt: new Date().toISOString(), + }, + }); + }); + + this.logger.log( + `Daily snapshot created for ${dateStr}: networkTotal=${networkTotalContribution}, activeAccounts=${activeAccounts.length}`, + ); + + return { + snapshotDate: snapshotDateOnly, + networkTotalContribution: new ContributionAmount(networkTotalContribution), + totalAccounts, + activeAccounts: activeAccounts.length, + createdAt: new Date(), + }; + } + + /** + * 获取指定日期的快照汇总 + */ + async getSnapshotSummary(snapshotDate: Date): Promise { + const dateStr = this.formatDate(snapshotDate); + const snapshotDateOnly = new Date(dateStr); + + const firstRecord = await this.prisma.dailyContributionSnapshot.findFirst({ + where: { snapshotDate: snapshotDateOnly }, + orderBy: { id: 'asc' }, + }); + + if (!firstRecord) { + return null; + } + + const activeCount = await this.prisma.dailyContributionSnapshot.count({ + where: { snapshotDate: snapshotDateOnly }, + }); + + const totalAccounts = await this.prisma.contributionAccount.count(); + + return { + snapshotDate: snapshotDateOnly, + networkTotalContribution: new ContributionAmount(firstRecord.networkTotalContribution), + totalAccounts, + activeAccounts: activeCount, + createdAt: firstRecord.createdAt, + }; + } + + /** + * 获取最新的快照日期 + */ + async getLatestSnapshotDate(): Promise { + const snapshot = await this.prisma.dailyContributionSnapshot.findFirst({ + orderBy: { snapshotDate: 'desc' }, + select: { snapshotDate: true }, + }); + + return snapshot?.snapshotDate ?? null; + } + + /** + * 获取用户在指定日期的算力快照 + */ + async getUserSnapshot( + accountSequence: string, + snapshotDate: Date, + ): Promise { + const dateStr = this.formatDate(snapshotDate); + const snapshotDateOnly = new Date(dateStr); + + const snapshot = await this.prisma.dailyContributionSnapshot.findUnique({ + where: { + snapshotDate_accountSequence: { + snapshotDate: snapshotDateOnly, + accountSequence, + }, + }, + }); + + if (!snapshot) { + return null; + } + + return this.toUserSnapshot(snapshot); + } + + /** + * 获取用户在指定日期的算力占比 + */ + async getUserContributionRatio( + accountSequence: string, + snapshotDate: Date, + ): Promise<{ contribution: ContributionAmount; ratio: number } | null> { + const snapshot = await this.getUserSnapshot(accountSequence, snapshotDate); + if (!snapshot) { + return null; + } + + return { + contribution: snapshot.effectiveContribution, + ratio: snapshot.contributionRatio.toNumber(), + }; + } + + /** + * 批量获取用户算力占比 + */ + async batchGetUserContributionRatios( + snapshotDate: Date, + page: number = 1, + pageSize: number = 1000, + ): Promise<{ + data: Array<{ accountSequence: string; contribution: string; ratio: number }>; + total: number; + totalContribution: string; + }> { + const dateStr = this.formatDate(snapshotDate); + const snapshotDateOnly = new Date(dateStr); + + const [snapshots, total] = await Promise.all([ + this.prisma.dailyContributionSnapshot.findMany({ + where: { snapshotDate: snapshotDateOnly }, + skip: (page - 1) * pageSize, + take: pageSize, + orderBy: { effectiveContribution: 'desc' }, + }), + this.prisma.dailyContributionSnapshot.count({ + where: { snapshotDate: snapshotDateOnly }, + }), + ]); + + if (snapshots.length === 0) { + return { data: [], total: 0, totalContribution: '0' }; + } + + const networkTotal = snapshots[0].networkTotalContribution; + + const ratios = snapshots.map((snapshot) => ({ + accountSequence: snapshot.accountSequence, + contribution: snapshot.effectiveContribution.toString(), + ratio: new Decimal(snapshot.contributionRatio).toNumber(), + })); + + return { + data: ratios, + total, + totalContribution: networkTotal.toString(), + }; + } + + private formatDate(date: Date): string { + return date.toISOString().split('T')[0]; + } + + private toUserSnapshot(record: any): UserContributionSnapshot { + return { + id: record.id, + snapshotDate: record.snapshotDate, + accountSequence: record.accountSequence, + effectiveContribution: new ContributionAmount(record.effectiveContribution), + networkTotalContribution: new ContributionAmount(record.networkTotalContribution), + contributionRatio: new Decimal(record.contributionRatio), + createdAt: record.createdAt, + }; + } +} diff --git a/backend/services/contribution-service/src/domain/aggregates/contribution-account.aggregate.ts b/backend/services/contribution-service/src/domain/aggregates/contribution-account.aggregate.ts new file mode 100644 index 00000000..204db251 --- /dev/null +++ b/backend/services/contribution-service/src/domain/aggregates/contribution-account.aggregate.ts @@ -0,0 +1,256 @@ +import Decimal from 'decimal.js'; +import { ContributionAmount } from '../value-objects/contribution-amount.vo'; + +/** + * 贡献值来源类型 + */ +export enum ContributionSourceType { + PERSONAL = 'PERSONAL', // 来自自己认种 + TEAM_LEVEL = 'TEAM_LEVEL', // 来自团队层级 + TEAM_BONUS = 'TEAM_BONUS', // 来自团队额外奖励 +} + +/** + * 算力账户聚合根 + * 管理用户的贡献值/算力 + */ +export class ContributionAccountAggregate { + private _id: bigint | null; + private _accountSequence: string; + private _personalContribution: ContributionAmount; + private _teamLevelContribution: ContributionAmount; + private _teamBonusContribution: ContributionAmount; + private _totalContribution: ContributionAmount; + private _effectiveContribution: ContributionAmount; + private _hasAdopted: boolean; + private _directReferralAdoptedCount: number; + private _unlockedLevelDepth: number; + private _unlockedBonusTiers: number; + private _version: number; + private _createdAt: Date; + private _updatedAt: Date; + + constructor(props: { + id?: bigint | null; + accountSequence: string; + personalContribution?: ContributionAmount; + teamLevelContribution?: ContributionAmount; + teamBonusContribution?: ContributionAmount; + totalContribution?: ContributionAmount; + effectiveContribution?: ContributionAmount; + hasAdopted?: boolean; + directReferralAdoptedCount?: number; + unlockedLevelDepth?: number; + unlockedBonusTiers?: number; + version?: number; + createdAt?: Date; + updatedAt?: Date; + }) { + this._id = props.id ?? null; + this._accountSequence = props.accountSequence; + this._personalContribution = props.personalContribution ?? ContributionAmount.zero(); + this._teamLevelContribution = props.teamLevelContribution ?? ContributionAmount.zero(); + this._teamBonusContribution = props.teamBonusContribution ?? ContributionAmount.zero(); + this._totalContribution = props.totalContribution ?? ContributionAmount.zero(); + this._effectiveContribution = props.effectiveContribution ?? ContributionAmount.zero(); + this._hasAdopted = props.hasAdopted ?? false; + this._directReferralAdoptedCount = props.directReferralAdoptedCount ?? 0; + this._unlockedLevelDepth = props.unlockedLevelDepth ?? 0; + this._unlockedBonusTiers = props.unlockedBonusTiers ?? 0; + this._version = props.version ?? 1; + this._createdAt = props.createdAt ?? new Date(); + this._updatedAt = props.updatedAt ?? new Date(); + } + + // Getters + get id(): bigint | null { return this._id; } + get accountSequence(): string { return this._accountSequence; } + get personalContribution(): ContributionAmount { return this._personalContribution; } + get teamLevelContribution(): ContributionAmount { return this._teamLevelContribution; } + get teamBonusContribution(): ContributionAmount { return this._teamBonusContribution; } + get totalContribution(): ContributionAmount { return this._totalContribution; } + get effectiveContribution(): ContributionAmount { return this._effectiveContribution; } + get hasAdopted(): boolean { return this._hasAdopted; } + get directReferralAdoptedCount(): number { return this._directReferralAdoptedCount; } + get unlockedLevelDepth(): number { return this._unlockedLevelDepth; } + get unlockedBonusTiers(): number { return this._unlockedBonusTiers; } + get version(): number { return this._version; } + get createdAt(): Date { return this._createdAt; } + get updatedAt(): Date { return this._updatedAt; } + + /** + * 添加个人贡献值 + */ + addPersonalContribution(amount: ContributionAmount): void { + this._personalContribution = this._personalContribution.add(amount); + this.recalculateTotal(); + } + + /** + * 添加团队层级贡献值 + */ + addTeamLevelContribution(amount: ContributionAmount): void { + this._teamLevelContribution = this._teamLevelContribution.add(amount); + this.recalculateTotal(); + } + + /** + * 添加团队额外奖励贡献值 + */ + addTeamBonusContribution(amount: ContributionAmount): void { + this._teamBonusContribution = this._teamBonusContribution.add(amount); + this.recalculateTotal(); + } + + /** + * 标记用户已认种 + */ + markAsAdopted(): void { + this._hasAdopted = true; + this.updateUnlockStatus(); + } + + /** + * 增加直推认种用户数 + */ + incrementDirectReferralAdoptedCount(): void { + this._directReferralAdoptedCount++; + this.updateUnlockStatus(); + } + + /** + * 设置直推认种用户数 + */ + setDirectReferralAdoptedCount(count: number): void { + this._directReferralAdoptedCount = count; + this.updateUnlockStatus(); + } + + /** + * 更新有效贡献值(扣除过期的) + */ + updateEffectiveContribution(effective: ContributionAmount): void { + this._effectiveContribution = effective; + this._updatedAt = new Date(); + } + + /** + * 重新计算总贡献值 + */ + private recalculateTotal(): void { + this._totalContribution = this._personalContribution + .add(this._teamLevelContribution) + .add(this._teamBonusContribution); + this._effectiveContribution = this._totalContribution; // 初始时有效=总量 + this._updatedAt = new Date(); + } + + /** + * 更新解锁状态 + * 根据直推认种用户数和是否认种过 + */ + private updateUnlockStatus(): void { + // 层级解锁规则 + if (this._directReferralAdoptedCount >= 5) { + this._unlockedLevelDepth = 15; + } else if (this._directReferralAdoptedCount >= 3) { + this._unlockedLevelDepth = 10; + } else if (this._directReferralAdoptedCount >= 1) { + this._unlockedLevelDepth = 5; + } else { + this._unlockedLevelDepth = 0; + } + + // 额外奖励解锁规则 + let bonusTiers = 0; + if (this._hasAdopted) bonusTiers++; + if (this._directReferralAdoptedCount >= 2) bonusTiers++; + if (this._directReferralAdoptedCount >= 4) bonusTiers++; + this._unlockedBonusTiers = bonusTiers; + + this._updatedAt = new Date(); + } + + /** + * 增加版本号(乐观锁) + */ + incrementVersion(): void { + this._version++; + this._updatedAt = new Date(); + } + + /** + * 创建新账户 + */ + static create(accountSequence: string): ContributionAccountAggregate { + return new ContributionAccountAggregate({ accountSequence }); + } + + /** + * 从持久化数据恢复 + */ + static fromPersistence(data: { + id: bigint; + accountSequence: string; + personalContribution: Decimal; + teamLevelContribution: Decimal; + teamBonusContribution: Decimal; + totalContribution: Decimal; + effectiveContribution: Decimal; + hasAdopted: boolean; + directReferralAdoptedCount: number; + unlockedLevelDepth: number; + unlockedBonusTiers: number; + version: number; + createdAt: Date; + updatedAt: Date; + }): ContributionAccountAggregate { + return new ContributionAccountAggregate({ + id: data.id, + accountSequence: data.accountSequence, + personalContribution: new ContributionAmount(data.personalContribution), + teamLevelContribution: new ContributionAmount(data.teamLevelContribution), + teamBonusContribution: new ContributionAmount(data.teamBonusContribution), + totalContribution: new ContributionAmount(data.totalContribution), + effectiveContribution: new ContributionAmount(data.effectiveContribution), + hasAdopted: data.hasAdopted, + directReferralAdoptedCount: data.directReferralAdoptedCount, + unlockedLevelDepth: data.unlockedLevelDepth, + unlockedBonusTiers: data.unlockedBonusTiers, + version: data.version, + createdAt: data.createdAt, + updatedAt: data.updatedAt, + }); + } + + /** + * 转换为持久化数据 + */ + toPersistence(): { + accountSequence: string; + personalContribution: Decimal; + teamLevelContribution: Decimal; + teamBonusContribution: Decimal; + totalContribution: Decimal; + effectiveContribution: Decimal; + hasAdopted: boolean; + directReferralAdoptedCount: number; + unlockedLevelDepth: number; + unlockedBonusTiers: number; + version: number; + } { + return { + accountSequence: this._accountSequence, + personalContribution: this._personalContribution.value, + teamLevelContribution: this._teamLevelContribution.value, + teamBonusContribution: this._teamBonusContribution.value, + totalContribution: this._totalContribution.value, + effectiveContribution: this._effectiveContribution.value, + hasAdopted: this._hasAdopted, + directReferralAdoptedCount: this._directReferralAdoptedCount, + unlockedLevelDepth: this._unlockedLevelDepth, + unlockedBonusTiers: this._unlockedBonusTiers, + version: this._version, + }; + } +} diff --git a/backend/services/contribution-service/src/domain/aggregates/contribution-record.aggregate.ts b/backend/services/contribution-service/src/domain/aggregates/contribution-record.aggregate.ts new file mode 100644 index 00000000..704944d1 --- /dev/null +++ b/backend/services/contribution-service/src/domain/aggregates/contribution-record.aggregate.ts @@ -0,0 +1,267 @@ +import Decimal from 'decimal.js'; +import { ContributionAmount } from '../value-objects/contribution-amount.vo'; +import { DistributionRate } from '../value-objects/distribution-rate.vo'; +import { ContributionSourceType } from './contribution-account.aggregate'; + +/** + * 贡献值记录聚合根 + * 记录每一笔贡献值的来源和详情 + */ +export class ContributionRecordAggregate { + private _id: bigint | null; + private _accountSequence: string; + private _sourceType: ContributionSourceType; + private _sourceAdoptionId: bigint; + private _sourceAccountSequence: string; + private _treeCount: number; + private _baseContribution: ContributionAmount; + private _distributionRate: DistributionRate; + private _levelDepth: number | null; + private _bonusTier: number | null; + private _amount: ContributionAmount; + private _effectiveDate: Date; + private _expireDate: Date; + private _isExpired: boolean; + private _expiredAt: Date | null; + private _createdAt: Date; + + constructor(props: { + id?: bigint | null; + accountSequence: string; + sourceType: ContributionSourceType; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + treeCount: number; + baseContribution: ContributionAmount; + distributionRate: DistributionRate; + levelDepth?: number | null; + bonusTier?: number | null; + amount: ContributionAmount; + effectiveDate: Date; + expireDate: Date; + isExpired?: boolean; + expiredAt?: Date | null; + createdAt?: Date; + }) { + this._id = props.id ?? null; + this._accountSequence = props.accountSequence; + this._sourceType = props.sourceType; + this._sourceAdoptionId = props.sourceAdoptionId; + this._sourceAccountSequence = props.sourceAccountSequence; + this._treeCount = props.treeCount; + this._baseContribution = props.baseContribution; + this._distributionRate = props.distributionRate; + this._levelDepth = props.levelDepth ?? null; + this._bonusTier = props.bonusTier ?? null; + this._amount = props.amount; + this._effectiveDate = props.effectiveDate; + this._expireDate = props.expireDate; + this._isExpired = props.isExpired ?? false; + this._expiredAt = props.expiredAt ?? null; + this._createdAt = props.createdAt ?? new Date(); + } + + // Getters + get id(): bigint | null { return this._id; } + get accountSequence(): string { return this._accountSequence; } + get sourceType(): ContributionSourceType { return this._sourceType; } + get sourceAdoptionId(): bigint { return this._sourceAdoptionId; } + get sourceAccountSequence(): string { return this._sourceAccountSequence; } + get treeCount(): number { return this._treeCount; } + get baseContribution(): ContributionAmount { return this._baseContribution; } + get distributionRate(): DistributionRate { return this._distributionRate; } + get levelDepth(): number | null { return this._levelDepth; } + get bonusTier(): number | null { return this._bonusTier; } + get amount(): ContributionAmount { return this._amount; } + get effectiveDate(): Date { return this._effectiveDate; } + get expireDate(): Date { return this._expireDate; } + get isExpired(): boolean { return this._isExpired; } + get expiredAt(): Date | null { return this._expiredAt; } + get createdAt(): Date { return this._createdAt; } + + /** + * 标记为已过期 + */ + markAsExpired(): void { + if (this._isExpired) { + return; + } + this._isExpired = true; + this._expiredAt = new Date(); + } + + /** + * 检查是否应该过期 + */ + shouldExpire(currentDate: Date = new Date()): boolean { + return !this._isExpired && currentDate >= this._expireDate; + } + + /** + * 创建个人贡献值记录 + */ + static createPersonal(props: { + accountSequence: string; + sourceAdoptionId: bigint; + treeCount: number; + baseContribution: ContributionAmount; + effectiveDate: Date; + expireDate: Date; + }): ContributionRecordAggregate { + const rate = DistributionRate.PERSONAL; + const amount = props.baseContribution.multiply(props.treeCount).multiply(rate.value); + + return new ContributionRecordAggregate({ + accountSequence: props.accountSequence, + sourceType: ContributionSourceType.PERSONAL, + sourceAdoptionId: props.sourceAdoptionId, + sourceAccountSequence: props.accountSequence, + treeCount: props.treeCount, + baseContribution: props.baseContribution, + distributionRate: rate, + amount: amount, + effectiveDate: props.effectiveDate, + expireDate: props.expireDate, + }); + } + + /** + * 创建团队层级贡献值记录 + */ + static createTeamLevel(props: { + accountSequence: string; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + treeCount: number; + baseContribution: ContributionAmount; + levelDepth: number; + effectiveDate: Date; + expireDate: Date; + }): ContributionRecordAggregate { + const rate = DistributionRate.LEVEL_PER; + const amount = props.baseContribution.multiply(props.treeCount).multiply(rate.value); + + return new ContributionRecordAggregate({ + accountSequence: props.accountSequence, + sourceType: ContributionSourceType.TEAM_LEVEL, + sourceAdoptionId: props.sourceAdoptionId, + sourceAccountSequence: props.sourceAccountSequence, + treeCount: props.treeCount, + baseContribution: props.baseContribution, + distributionRate: rate, + levelDepth: props.levelDepth, + amount: amount, + effectiveDate: props.effectiveDate, + expireDate: props.expireDate, + }); + } + + /** + * 创建团队额外奖励贡献值记录 + */ + static createTeamBonus(props: { + accountSequence: string; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + treeCount: number; + baseContribution: ContributionAmount; + bonusTier: number; + effectiveDate: Date; + expireDate: Date; + }): ContributionRecordAggregate { + const rate = DistributionRate.BONUS_PER; + const amount = props.baseContribution.multiply(props.treeCount).multiply(rate.value); + + return new ContributionRecordAggregate({ + accountSequence: props.accountSequence, + sourceType: ContributionSourceType.TEAM_BONUS, + sourceAdoptionId: props.sourceAdoptionId, + sourceAccountSequence: props.sourceAccountSequence, + treeCount: props.treeCount, + baseContribution: props.baseContribution, + distributionRate: rate, + bonusTier: props.bonusTier, + amount: amount, + effectiveDate: props.effectiveDate, + expireDate: props.expireDate, + }); + } + + /** + * 从持久化数据恢复 + */ + static fromPersistence(data: { + id: bigint; + accountSequence: string; + sourceType: string; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + treeCount: number; + baseContribution: Decimal; + distributionRate: Decimal; + levelDepth: number | null; + bonusTier: number | null; + amount: Decimal; + effectiveDate: Date; + expireDate: Date; + isExpired: boolean; + expiredAt: Date | null; + createdAt: Date; + }): ContributionRecordAggregate { + return new ContributionRecordAggregate({ + id: data.id, + accountSequence: data.accountSequence, + sourceType: data.sourceType as ContributionSourceType, + sourceAdoptionId: data.sourceAdoptionId, + sourceAccountSequence: data.sourceAccountSequence, + treeCount: data.treeCount, + baseContribution: new ContributionAmount(data.baseContribution), + distributionRate: new DistributionRate(data.distributionRate), + levelDepth: data.levelDepth, + bonusTier: data.bonusTier, + amount: new ContributionAmount(data.amount), + effectiveDate: data.effectiveDate, + expireDate: data.expireDate, + isExpired: data.isExpired, + expiredAt: data.expiredAt, + createdAt: data.createdAt, + }); + } + + /** + * 转换为持久化数据 + */ + toPersistence(): { + accountSequence: string; + sourceType: string; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + treeCount: number; + baseContribution: Decimal; + distributionRate: Decimal; + levelDepth: number | null; + bonusTier: number | null; + amount: Decimal; + effectiveDate: Date; + expireDate: Date; + isExpired: boolean; + expiredAt: Date | null; + } { + return { + accountSequence: this._accountSequence, + sourceType: this._sourceType, + sourceAdoptionId: this._sourceAdoptionId, + sourceAccountSequence: this._sourceAccountSequence, + treeCount: this._treeCount, + baseContribution: this._baseContribution.value, + distributionRate: this._distributionRate.value, + levelDepth: this._levelDepth, + bonusTier: this._bonusTier, + amount: this._amount.value, + effectiveDate: this._effectiveDate, + expireDate: this._expireDate, + isExpired: this._isExpired, + expiredAt: this._expiredAt, + }; + } +} diff --git a/backend/services/contribution-service/src/domain/aggregates/index.ts b/backend/services/contribution-service/src/domain/aggregates/index.ts new file mode 100644 index 00000000..3d53f038 --- /dev/null +++ b/backend/services/contribution-service/src/domain/aggregates/index.ts @@ -0,0 +1,2 @@ +export * from './contribution-account.aggregate'; +export * from './contribution-record.aggregate'; diff --git a/backend/services/contribution-service/src/domain/events/contribution-calculated.event.ts b/backend/services/contribution-service/src/domain/events/contribution-calculated.event.ts new file mode 100644 index 00000000..1d6fe726 --- /dev/null +++ b/backend/services/contribution-service/src/domain/events/contribution-calculated.event.ts @@ -0,0 +1,33 @@ +/** + * 贡献值计算完成事件 + * 当用户的算力被计算或更新时发布 + */ +export class ContributionCalculatedEvent { + static readonly EVENT_TYPE = 'ContributionCalculated'; + static readonly TOPIC = 'contribution.contribution-calculated'; + + constructor( + public readonly eventId: string, + public readonly accountSequence: string, + public readonly personalContribution: string, + public readonly teamLevelContribution: string, + public readonly teamBonusContribution: string, + public readonly totalContribution: string, + public readonly effectiveContribution: string, + public readonly calculatedAt: Date, + ) {} + + toPayload(): Record { + return { + eventId: this.eventId, + eventType: ContributionCalculatedEvent.EVENT_TYPE, + accountSequence: this.accountSequence, + personalContribution: this.personalContribution, + teamLevelContribution: this.teamLevelContribution, + teamBonusContribution: this.teamBonusContribution, + totalContribution: this.totalContribution, + effectiveContribution: this.effectiveContribution, + calculatedAt: this.calculatedAt.toISOString(), + }; + } +} diff --git a/backend/services/contribution-service/src/domain/events/daily-snapshot-created.event.ts b/backend/services/contribution-service/src/domain/events/daily-snapshot-created.event.ts new file mode 100644 index 00000000..51c593ec --- /dev/null +++ b/backend/services/contribution-service/src/domain/events/daily-snapshot-created.event.ts @@ -0,0 +1,27 @@ +/** + * 每日算力快照创建事件 + * 用于通知 mining-service 进行积分股分配 + */ +export class DailySnapshotCreatedEvent { + static readonly EVENT_TYPE = 'DailySnapshotCreated'; + static readonly TOPIC = 'contribution.daily-snapshot-created'; + + constructor( + public readonly eventId: string, + public readonly snapshotDate: string, + public readonly networkTotalContribution: string, + public readonly accountCount: number, + public readonly createdAt: Date, + ) {} + + toPayload(): Record { + return { + eventId: this.eventId, + eventType: DailySnapshotCreatedEvent.EVENT_TYPE, + snapshotDate: this.snapshotDate, + networkTotalContribution: this.networkTotalContribution, + accountCount: this.accountCount, + createdAt: this.createdAt.toISOString(), + }; + } +} diff --git a/backend/services/contribution-service/src/domain/events/index.ts b/backend/services/contribution-service/src/domain/events/index.ts new file mode 100644 index 00000000..6ad32f90 --- /dev/null +++ b/backend/services/contribution-service/src/domain/events/index.ts @@ -0,0 +1,2 @@ +export * from './contribution-calculated.event'; +export * from './daily-snapshot-created.event'; diff --git a/backend/services/contribution-service/src/domain/repositories/contribution-account.repository.interface.ts b/backend/services/contribution-service/src/domain/repositories/contribution-account.repository.interface.ts new file mode 100644 index 00000000..f94fd42b --- /dev/null +++ b/backend/services/contribution-service/src/domain/repositories/contribution-account.repository.interface.ts @@ -0,0 +1,54 @@ +import { ContributionAccountAggregate } from '../aggregates/contribution-account.aggregate'; + +/** + * 贡献值账户仓库接口 + */ +export interface IContributionAccountRepository { + /** + * 根据账户序列号查找 + */ + findByAccountSequence(accountSequence: string): Promise; + + /** + * 根据账户序列号查找(带锁) + */ + findByAccountSequenceForUpdate( + accountSequence: string, + tx?: any, + ): Promise; + + /** + * 保存(创建或更新) + */ + save(account: ContributionAccountAggregate, tx?: any): Promise; + + /** + * 批量保存 + */ + saveMany(accounts: ContributionAccountAggregate[], tx?: any): Promise; + + /** + * 获取所有有效贡献值大于0的账户 + */ + findAllWithEffectiveContribution(): Promise; + + /** + * 获取全网有效贡献值总和 + */ + getNetworkTotalEffectiveContribution(): Promise; + + /** + * 分页查询 + */ + findMany(options: { + page?: number; + limit?: number; + orderBy?: 'totalContribution' | 'effectiveContribution'; + order?: 'asc' | 'desc'; + }): Promise<{ + items: ContributionAccountAggregate[]; + total: number; + }>; +} + +export const CONTRIBUTION_ACCOUNT_REPOSITORY = Symbol('IContributionAccountRepository'); diff --git a/backend/services/contribution-service/src/domain/repositories/contribution-record.repository.interface.ts b/backend/services/contribution-service/src/domain/repositories/contribution-record.repository.interface.ts new file mode 100644 index 00000000..44455503 --- /dev/null +++ b/backend/services/contribution-service/src/domain/repositories/contribution-record.repository.interface.ts @@ -0,0 +1,60 @@ +import { ContributionRecordAggregate } from '../aggregates/contribution-record.aggregate'; +import { ContributionSourceType } from '../aggregates/contribution-account.aggregate'; + +/** + * 贡献值记录仓库接口 + */ +export interface IContributionRecordRepository { + /** + * 保存记录 + */ + save(record: ContributionRecordAggregate, tx?: any): Promise; + + /** + * 批量保存 + */ + saveMany(records: ContributionRecordAggregate[], tx?: any): Promise; + + /** + * 根据账户序列号查找 + */ + findByAccountSequence( + accountSequence: string, + options?: { + page?: number; + limit?: number; + sourceType?: ContributionSourceType; + includeExpired?: boolean; + }, + ): Promise<{ + items: ContributionRecordAggregate[]; + total: number; + }>; + + /** + * 根据来源认种ID查找 + */ + findBySourceAdoptionId(sourceAdoptionId: bigint): Promise; + + /** + * 查找需要过期的记录 + */ + findExpiring(beforeDate: Date, limit?: number): Promise; + + /** + * 批量标记过期 + */ + markExpiredBatch(ids: bigint[], tx?: any): Promise; + + /** + * 获取账户的有效贡献值总和 + */ + getEffectiveContributionSum(accountSequence: string): Promise; + + /** + * 检查是否已经为某个认种分配过贡献值 + */ + existsBySourceAdoptionId(sourceAdoptionId: bigint): Promise; +} + +export const CONTRIBUTION_RECORD_REPOSITORY = Symbol('IContributionRecordRepository'); diff --git a/backend/services/contribution-service/src/domain/repositories/index.ts b/backend/services/contribution-service/src/domain/repositories/index.ts new file mode 100644 index 00000000..926e035d --- /dev/null +++ b/backend/services/contribution-service/src/domain/repositories/index.ts @@ -0,0 +1,3 @@ +export * from './contribution-account.repository.interface'; +export * from './contribution-record.repository.interface'; +export * from './synced-data.repository.interface'; diff --git a/backend/services/contribution-service/src/domain/repositories/synced-data.repository.interface.ts b/backend/services/contribution-service/src/domain/repositories/synced-data.repository.interface.ts new file mode 100644 index 00000000..eaca6d22 --- /dev/null +++ b/backend/services/contribution-service/src/domain/repositories/synced-data.repository.interface.ts @@ -0,0 +1,165 @@ +import Decimal from 'decimal.js'; + +/** + * 同步的用户数据 + */ +export interface SyncedUser { + id: bigint; + accountSequence: string; + originalUserId: bigint; + phone: string | null; + status: string | null; + sourceSequenceNum: bigint; + syncedAt: Date; + contributionCalculated: boolean; + contributionCalculatedAt: Date | null; + createdAt: Date; +} + +/** + * 同步的认种数据 + */ +export interface SyncedAdoption { + id: bigint; + originalAdoptionId: bigint; + accountSequence: string; + treeCount: number; + adoptionDate: Date; + status: string | null; + contributionPerTree: Decimal; + sourceSequenceNum: bigint; + syncedAt: Date; + contributionDistributed: boolean; + contributionDistributedAt: Date | null; + createdAt: Date; +} + +/** + * 同步的推荐关系数据 + */ +export interface SyncedReferral { + id: bigint; + accountSequence: string; + referrerAccountSequence: string | null; + ancestorPath: string | null; + depth: number; + sourceSequenceNum: bigint; + syncedAt: Date; + createdAt: Date; +} + +/** + * 同步数据仓库接口 + */ +export interface ISyncedDataRepository { + // ============ 用户相关 ============ + + /** + * 保存或更新同步的用户数据 + */ + upsertSyncedUser(data: { + accountSequence: string; + originalUserId: bigint; + phone?: string | null; + status?: string | null; + sourceSequenceNum: bigint; + }): Promise; + + /** + * 根据账户序列号查找用户 + */ + findSyncedUserByAccountSequence(accountSequence: string): Promise; + + /** + * 获取未计算算力的用户 + */ + findUncalculatedUsers(limit?: number): Promise; + + /** + * 标记用户算力已计算 + */ + markUserContributionCalculated(accountSequence: string, tx?: any): Promise; + + // ============ 认种相关 ============ + + /** + * 保存或更新同步的认种数据 + */ + upsertSyncedAdoption(data: { + originalAdoptionId: bigint; + accountSequence: string; + treeCount: number; + adoptionDate: Date; + status?: string | null; + contributionPerTree: Decimal; + sourceSequenceNum: bigint; + }): Promise; + + /** + * 根据原始ID查找认种 + */ + findSyncedAdoptionByOriginalId(originalAdoptionId: bigint): Promise; + + /** + * 获取未分配贡献值的认种 + */ + findUndistributedAdoptions(limit?: number): Promise; + + /** + * 获取用户的所有认种 + */ + findAdoptionsByAccountSequence(accountSequence: string): Promise; + + /** + * 标记认种贡献值已分配 + */ + markAdoptionContributionDistributed(originalAdoptionId: bigint, tx?: any): Promise; + + /** + * 获取账户的总认种棵数 + */ + getTotalTreesByAccountSequence(accountSequence: string): Promise; + + // ============ 推荐关系相关 ============ + + /** + * 保存或更新同步的推荐关系 + */ + upsertSyncedReferral(data: { + accountSequence: string; + referrerAccountSequence?: string | null; + ancestorPath?: string | null; + depth?: number; + sourceSequenceNum: bigint; + }): Promise; + + /** + * 根据账户序列号查找推荐关系 + */ + findSyncedReferralByAccountSequence(accountSequence: string): Promise; + + /** + * 获取直推列表(直接推荐的下级) + */ + findDirectReferrals(referrerAccountSequence: string): Promise; + + /** + * 获取上线链条(最多15级) + */ + findAncestorChain(accountSequence: string, maxLevel?: number): Promise; + + /** + * 获取直推中已认种的用户数 + */ + getDirectReferralAdoptedCount(referrerAccountSequence: string): Promise; + + /** + * 获取伞下各级的认种棵数 + */ + getTeamTreesByLevel( + accountSequence: string, + maxLevel?: number, + ): Promise>; +} + +export const SYNCED_DATA_REPOSITORY = Symbol('ISyncedDataRepository'); diff --git a/backend/services/contribution-service/src/domain/services/contribution-calculator.service.ts b/backend/services/contribution-service/src/domain/services/contribution-calculator.service.ts new file mode 100644 index 00000000..4efa9384 --- /dev/null +++ b/backend/services/contribution-service/src/domain/services/contribution-calculator.service.ts @@ -0,0 +1,266 @@ +import Decimal from 'decimal.js'; +import { ContributionAmount } from '../value-objects/contribution-amount.vo'; +import { DistributionRate } from '../value-objects/distribution-rate.vo'; +import { ContributionAccountAggregate, ContributionSourceType } from '../aggregates/contribution-account.aggregate'; +import { ContributionRecordAggregate } from '../aggregates/contribution-record.aggregate'; +import { SyncedAdoption, SyncedReferral } from '../repositories/synced-data.repository.interface'; + +/** + * 算力分配结果 + */ +export interface ContributionDistributionResult { + // 个人贡献值记录 + personalRecord: ContributionRecordAggregate; + + // 团队层级贡献值记录(给上线们的) + teamLevelRecords: ContributionRecordAggregate[]; + + // 团队额外奖励贡献值记录(给直接上线的) + teamBonusRecords: ContributionRecordAggregate[]; + + // 未分配的贡献值(归总部) + unallocatedContributions: { + type: string; + wouldBeAccountSequence: string | null; + levelDepth: number | null; + amount: ContributionAmount; + reason: string; + }[]; + + // 系统账户贡献值 + systemContributions: { + accountType: 'OPERATION' | 'PROVINCE' | 'CITY'; + rate: DistributionRate; + amount: ContributionAmount; + }[]; +} + +/** + * 贡献值计算领域服务 + * 负责核心的算力计算逻辑 + */ +export class ContributionCalculatorService { + // 贡献值有效期:2年 + private static readonly CONTRIBUTION_VALIDITY_YEARS = 2; + + /** + * 计算认种产生的贡献值分配 + * + * @param adoption 认种记录 + * @param ancestorChain 上线链条(从直接上线开始,最多15级) + * @param ancestorAccounts 上线的算力账户(用于判断解锁状态) + * @returns 分配结果 + */ + calculateAdoptionContribution( + adoption: SyncedAdoption, + ancestorChain: SyncedReferral[], + ancestorAccounts: Map, + ): ContributionDistributionResult { + const baseContribution = new ContributionAmount(adoption.contributionPerTree); + const treeCount = adoption.treeCount; + const totalContribution = baseContribution.multiply(treeCount); + + // 计算生效日期(次日)和过期日期(2年后) + const effectiveDate = this.getNextDay(adoption.adoptionDate); + const expireDate = this.addYears(effectiveDate, ContributionCalculatorService.CONTRIBUTION_VALIDITY_YEARS); + + const result: ContributionDistributionResult = { + personalRecord: null as any, + teamLevelRecords: [], + teamBonusRecords: [], + unallocatedContributions: [], + systemContributions: [], + }; + + // 1. 个人贡献值 (70%) + result.personalRecord = ContributionRecordAggregate.createPersonal({ + accountSequence: adoption.accountSequence, + sourceAdoptionId: adoption.originalAdoptionId, + treeCount, + baseContribution, + effectiveDate, + expireDate, + }); + + // 2. 系统账户贡献值 (15%) + result.systemContributions = [ + { + accountType: 'OPERATION', + rate: DistributionRate.OPERATION, + amount: totalContribution.multiply(DistributionRate.OPERATION.value), + }, + { + accountType: 'PROVINCE', + rate: DistributionRate.PROVINCE, + amount: totalContribution.multiply(DistributionRate.PROVINCE.value), + }, + { + accountType: 'CITY', + rate: DistributionRate.CITY, + amount: totalContribution.multiply(DistributionRate.CITY.value), + }, + ]; + + // 3. 团队贡献值 (15%) + this.distributeTeamContribution( + adoption, + baseContribution, + treeCount, + ancestorChain, + ancestorAccounts, + effectiveDate, + expireDate, + result, + ); + + return result; + } + + /** + * 分配团队贡献值 + */ + private distributeTeamContribution( + adoption: SyncedAdoption, + baseContribution: ContributionAmount, + treeCount: number, + ancestorChain: SyncedReferral[], + ancestorAccounts: Map, + effectiveDate: Date, + expireDate: Date, + result: ContributionDistributionResult, + ): void { + // 3.1 层级部分 (7.5% = 0.5% × 15级) + for (let level = 1; level <= 15; level++) { + const ancestor = ancestorChain[level - 1]; + + if (!ancestor) { + // 没有这一级的上线,归总部 + const levelAmount = baseContribution.multiply(treeCount).multiply(DistributionRate.LEVEL_PER.value); + result.unallocatedContributions.push({ + type: 'LEVEL_NO_ANCESTOR', + wouldBeAccountSequence: null, + levelDepth: level, + amount: levelAmount, + reason: `第${level}级无上线`, + }); + continue; + } + + const ancestorAccount = ancestorAccounts.get(ancestor.accountSequence); + const unlockedLevelDepth = ancestorAccount?.unlockedLevelDepth ?? 0; + + if (unlockedLevelDepth >= level) { + // 上线已解锁该级别 + result.teamLevelRecords.push( + ContributionRecordAggregate.createTeamLevel({ + accountSequence: ancestor.accountSequence, + sourceAdoptionId: adoption.originalAdoptionId, + sourceAccountSequence: adoption.accountSequence, + treeCount, + baseContribution, + levelDepth: level, + effectiveDate, + expireDate, + }), + ); + } else { + // 上线未解锁该级别,归总部 + const levelAmount = baseContribution.multiply(treeCount).multiply(DistributionRate.LEVEL_PER.value); + result.unallocatedContributions.push({ + type: 'LEVEL_OVERFLOW', + wouldBeAccountSequence: ancestor.accountSequence, + levelDepth: level, + amount: levelAmount, + reason: `上线${ancestor.accountSequence}未解锁第${level}级(已解锁${unlockedLevelDepth}级)`, + }); + } + } + + // 3.2 额外奖励部分 (7.5% = 2.5% × 3档) - 只给直接上线 + if (ancestorChain.length > 0) { + const directReferrer = ancestorChain[0]; + const directReferrerAccount = ancestorAccounts.get(directReferrer.accountSequence); + const unlockedBonusTiers = directReferrerAccount?.unlockedBonusTiers ?? 0; + + for (let tier = 1; tier <= 3; tier++) { + if (unlockedBonusTiers >= tier) { + // 上线已解锁该档位 + result.teamBonusRecords.push( + ContributionRecordAggregate.createTeamBonus({ + accountSequence: directReferrer.accountSequence, + sourceAdoptionId: adoption.originalAdoptionId, + sourceAccountSequence: adoption.accountSequence, + treeCount, + baseContribution, + bonusTier: tier, + effectiveDate, + expireDate, + }), + ); + } else { + // 上线未解锁该档位,归总部 + const bonusAmount = baseContribution.multiply(treeCount).multiply(DistributionRate.BONUS_PER.value); + result.unallocatedContributions.push({ + type: `BONUS_TIER_${tier}`, + wouldBeAccountSequence: directReferrer.accountSequence, + levelDepth: null, + amount: bonusAmount, + reason: `上线${directReferrer.accountSequence}未解锁第${tier}档奖励(已解锁${unlockedBonusTiers}档)`, + }); + } + } + } else { + // 没有上线,三个2.5%全部归总部 + for (let tier = 1; tier <= 3; tier++) { + const bonusAmount = baseContribution.multiply(treeCount).multiply(DistributionRate.BONUS_PER.value); + result.unallocatedContributions.push({ + type: `BONUS_TIER_${tier}`, + wouldBeAccountSequence: null, + levelDepth: null, + amount: bonusAmount, + reason: `认种人无上线`, + }); + } + } + } + + /** + * 根据直推认种用户数计算解锁层级 + */ + calculateUnlockedLevelDepth(directReferralAdoptedCount: number): number { + if (directReferralAdoptedCount >= 5) return 15; + if (directReferralAdoptedCount >= 3) return 10; + if (directReferralAdoptedCount >= 1) return 5; + return 0; + } + + /** + * 根据条件计算解锁的额外奖励档位数 + */ + calculateUnlockedBonusTiers(hasAdopted: boolean, directReferralAdoptedCount: number): number { + let tiers = 0; + if (hasAdopted) tiers++; + if (directReferralAdoptedCount >= 2) tiers++; + if (directReferralAdoptedCount >= 4) tiers++; + return tiers; + } + + /** + * 获取次日日期 + */ + private getNextDay(date: Date): Date { + const nextDay = new Date(date); + nextDay.setDate(nextDay.getDate() + 1); + nextDay.setHours(0, 0, 0, 0); + return nextDay; + } + + /** + * 添加年数 + */ + private addYears(date: Date, years: number): Date { + const result = new Date(date); + result.setFullYear(result.getFullYear() + years); + return result; + } +} diff --git a/backend/services/contribution-service/src/domain/value-objects/account-sequence.vo.ts b/backend/services/contribution-service/src/domain/value-objects/account-sequence.vo.ts new file mode 100644 index 00000000..116e714f --- /dev/null +++ b/backend/services/contribution-service/src/domain/value-objects/account-sequence.vo.ts @@ -0,0 +1,33 @@ +/** + * 账户序列号值对象 + * 跨服务关联的唯一标识 + */ +export class AccountSequence { + private readonly _value: string; + + constructor(value: string) { + if (!value || value.trim().length === 0) { + throw new Error('AccountSequence cannot be empty'); + } + if (value.length > 20) { + throw new Error('AccountSequence cannot exceed 20 characters'); + } + this._value = value.trim(); + } + + get value(): string { + return this._value; + } + + equals(other: AccountSequence): boolean { + return this._value === other._value; + } + + toString(): string { + return this._value; + } + + static create(value: string): AccountSequence { + return new AccountSequence(value); + } +} diff --git a/backend/services/contribution-service/src/domain/value-objects/contribution-amount.vo.ts b/backend/services/contribution-service/src/domain/value-objects/contribution-amount.vo.ts new file mode 100644 index 00000000..6af0c5af --- /dev/null +++ b/backend/services/contribution-service/src/domain/value-objects/contribution-amount.vo.ts @@ -0,0 +1,79 @@ +import Decimal from 'decimal.js'; + +/** + * 贡献值/算力金额值对象 + * 使用 Decimal.js 保证高精度计算 + */ +export class ContributionAmount { + private readonly _value: Decimal; + + constructor(value: Decimal | string | number) { + this._value = new Decimal(value); + if (this._value.isNaN()) { + throw new Error('ContributionAmount must be a valid number'); + } + if (this._value.isNegative()) { + throw new Error('ContributionAmount cannot be negative'); + } + } + + get value(): Decimal { + return this._value; + } + + get isZero(): boolean { + return this._value.isZero(); + } + + add(other: ContributionAmount): ContributionAmount { + return new ContributionAmount(this._value.plus(other._value)); + } + + subtract(other: ContributionAmount): ContributionAmount { + const result = this._value.minus(other._value); + if (result.isNegative()) { + throw new Error('ContributionAmount cannot be negative after subtraction'); + } + return new ContributionAmount(result); + } + + multiply(rate: Decimal | string | number): ContributionAmount { + return new ContributionAmount(this._value.times(new Decimal(rate))); + } + + divide(divisor: Decimal | string | number): ContributionAmount { + const d = new Decimal(divisor); + if (d.isZero()) { + throw new Error('Cannot divide by zero'); + } + return new ContributionAmount(this._value.dividedBy(d)); + } + + equals(other: ContributionAmount): boolean { + return this._value.equals(other._value); + } + + greaterThan(other: ContributionAmount): boolean { + return this._value.greaterThan(other._value); + } + + lessThan(other: ContributionAmount): boolean { + return this._value.lessThan(other._value); + } + + toString(decimalPlaces: number = 10): string { + return this._value.toFixed(decimalPlaces); + } + + toNumber(): number { + return this._value.toNumber(); + } + + static zero(): ContributionAmount { + return new ContributionAmount(0); + } + + static create(value: Decimal | string | number): ContributionAmount { + return new ContributionAmount(value); + } +} diff --git a/backend/services/contribution-service/src/domain/value-objects/distribution-rate.vo.ts b/backend/services/contribution-service/src/domain/value-objects/distribution-rate.vo.ts new file mode 100644 index 00000000..4b362924 --- /dev/null +++ b/backend/services/contribution-service/src/domain/value-objects/distribution-rate.vo.ts @@ -0,0 +1,59 @@ +import Decimal from 'decimal.js'; + +/** + * 分配比例值对象 + * 表示贡献值分配的百分比 + */ +export class DistributionRate { + private readonly _value: Decimal; + + // 预定义的分配比例 + static readonly PERSONAL = new DistributionRate(0.70); // 70% 个人 + static readonly OPERATION = new DistributionRate(0.12); // 12% 运营 + static readonly PROVINCE = new DistributionRate(0.01); // 1% 省公司 + static readonly CITY = new DistributionRate(0.02); // 2% 市公司 + static readonly TEAM_TOTAL = new DistributionRate(0.15); // 15% 团队 + static readonly LEVEL_PER = new DistributionRate(0.005); // 0.5% 每级 + static readonly BONUS_PER = new DistributionRate(0.025); // 2.5% 每档 + + constructor(value: Decimal | string | number) { + this._value = new Decimal(value); + if (this._value.isNaN()) { + throw new Error('DistributionRate must be a valid number'); + } + if (this._value.isNegative()) { + throw new Error('DistributionRate cannot be negative'); + } + if (this._value.greaterThan(1)) { + throw new Error('DistributionRate cannot exceed 1 (100%)'); + } + } + + get value(): Decimal { + return this._value; + } + + get asPercentage(): number { + return this._value.times(100).toNumber(); + } + + multiply(amount: Decimal | string | number): Decimal { + return this._value.times(new Decimal(amount)); + } + + equals(other: DistributionRate): boolean { + return this._value.equals(other._value); + } + + toString(): string { + return `${this.asPercentage}%`; + } + + static create(value: Decimal | string | number): DistributionRate { + return new DistributionRate(value); + } + + static fromPercentage(percentage: number): DistributionRate { + return new DistributionRate(percentage / 100); + } +} diff --git a/backend/services/contribution-service/src/domain/value-objects/index.ts b/backend/services/contribution-service/src/domain/value-objects/index.ts new file mode 100644 index 00000000..0c483f18 --- /dev/null +++ b/backend/services/contribution-service/src/domain/value-objects/index.ts @@ -0,0 +1,3 @@ +export * from './account-sequence.vo'; +export * from './contribution-amount.vo'; +export * from './distribution-rate.vo'; diff --git a/backend/services/contribution-service/src/infrastructure/infrastructure.module.ts b/backend/services/contribution-service/src/infrastructure/infrastructure.module.ts new file mode 100644 index 00000000..09582d6b --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/infrastructure.module.ts @@ -0,0 +1,66 @@ +import { Module } from '@nestjs/common'; +import { PrismaModule } from './persistence/prisma/prisma.module'; +import { UnitOfWork } from './persistence/unit-of-work/unit-of-work'; +import { + ContributionAccountRepository, + ContributionRecordRepository, + SyncedDataRepository, + UnallocatedContributionRepository, + SystemAccountRepository, + OutboxRepository, +} from './persistence/repositories'; +import { KafkaModule } from './kafka/kafka.module'; +import { KafkaProducerService } from './kafka/kafka-producer.service'; +import { CDCConsumerService } from './kafka/cdc-consumer.service'; +import { RedisModule } from './redis/redis.module'; + +// Repository injection tokens +export const CONTRIBUTION_ACCOUNT_REPOSITORY = 'CONTRIBUTION_ACCOUNT_REPOSITORY'; +export const CONTRIBUTION_RECORD_REPOSITORY = 'CONTRIBUTION_RECORD_REPOSITORY'; +export const SYNCED_DATA_REPOSITORY = 'SYNCED_DATA_REPOSITORY'; + +@Module({ + imports: [PrismaModule, KafkaModule, RedisModule], + providers: [ + UnitOfWork, + // Repositories + ContributionAccountRepository, + ContributionRecordRepository, + SyncedDataRepository, + UnallocatedContributionRepository, + SystemAccountRepository, + OutboxRepository, + // Repository interface bindings + { + provide: CONTRIBUTION_ACCOUNT_REPOSITORY, + useClass: ContributionAccountRepository, + }, + { + provide: CONTRIBUTION_RECORD_REPOSITORY, + useClass: ContributionRecordRepository, + }, + { + provide: SYNCED_DATA_REPOSITORY, + useClass: SyncedDataRepository, + }, + // Kafka + KafkaProducerService, + CDCConsumerService, + ], + exports: [ + UnitOfWork, + ContributionAccountRepository, + ContributionRecordRepository, + SyncedDataRepository, + UnallocatedContributionRepository, + SystemAccountRepository, + OutboxRepository, + CONTRIBUTION_ACCOUNT_REPOSITORY, + CONTRIBUTION_RECORD_REPOSITORY, + SYNCED_DATA_REPOSITORY, + KafkaProducerService, + CDCConsumerService, + RedisModule, + ], +}) +export class InfrastructureModule {} diff --git a/backend/services/contribution-service/src/infrastructure/kafka/cdc-consumer.service.ts b/backend/services/contribution-service/src/infrastructure/kafka/cdc-consumer.service.ts new file mode 100644 index 00000000..79ad6af4 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/kafka/cdc-consumer.service.ts @@ -0,0 +1,164 @@ +import { Injectable, Logger, OnModuleInit } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { Kafka, Consumer, EachMessagePayload } from 'kafkajs'; + +export interface CDCEvent { + schema: any; + payload: { + before: any | null; + after: any | null; + source: { + version: string; + connector: string; + name: string; + ts_ms: number; + snapshot: string; + db: string; + sequence: string; + schema: string; + table: string; + txId: number; + lsn: number; + xmin: number | null; + }; + op: 'c' | 'u' | 'd' | 'r'; // create, update, delete, read (snapshot) + ts_ms: number; + transaction: any; + }; + // 内部使用:Kafka offset 作为序列号 + sequenceNum: bigint; +} + +export type CDCHandler = (event: CDCEvent) => Promise; + +@Injectable() +export class CDCConsumerService implements OnModuleInit { + private readonly logger = new Logger(CDCConsumerService.name); + private kafka: Kafka; + private consumer: Consumer; + private handlers: Map = new Map(); + private isRunning = false; + + constructor(private readonly configService: ConfigService) { + const brokers = this.configService.get('KAFKA_BROKERS', 'localhost:9092').split(','); + + this.kafka = new Kafka({ + clientId: 'contribution-service-cdc', + brokers, + }); + + this.consumer = this.kafka.consumer({ + groupId: 'contribution-service-cdc-group', + }); + } + + async onModuleInit() { + // 不在这里启动,等待注册处理器后再启动 + } + + /** + * 注册 CDC 事件处理器 + * @param tableName 表名(如 "users", "adoptions", "referrals") + * @param handler 处理函数 + */ + registerHandler(tableName: string, handler: CDCHandler): void { + this.handlers.set(tableName, handler); + this.logger.log(`Registered CDC handler for table: ${tableName}`); + } + + /** + * 启动消费者 + */ + async start(): Promise { + if (this.isRunning) { + this.logger.warn('CDC consumer is already running'); + return; + } + + try { + await this.consumer.connect(); + this.logger.log('CDC consumer connected'); + + // 订阅 Debezium CDC topics + const topics = [ + // 用户表 + this.configService.get('CDC_TOPIC_USERS', 'dbserver1.public.users'), + // 认种表 + this.configService.get('CDC_TOPIC_ADOPTIONS', 'dbserver1.public.adoptions'), + // 引荐表 + this.configService.get('CDC_TOPIC_REFERRALS', 'dbserver1.public.referrals'), + ]; + + await this.consumer.subscribe({ + topics, + fromBeginning: false, + }); + this.logger.log(`Subscribed to topics: ${topics.join(', ')}`); + + await this.consumer.run({ + eachMessage: async (payload: EachMessagePayload) => { + await this.handleMessage(payload); + }, + }); + + this.isRunning = true; + this.logger.log('CDC consumer started'); + } catch (error) { + this.logger.error('Failed to start CDC consumer', error); + throw error; + } + } + + /** + * 停止消费者 + */ + async stop(): Promise { + if (!this.isRunning) { + return; + } + + try { + await this.consumer.disconnect(); + this.isRunning = false; + this.logger.log('CDC consumer stopped'); + } catch (error) { + this.logger.error('Failed to stop CDC consumer', error); + throw error; + } + } + + private async handleMessage(payload: EachMessagePayload): Promise { + const { topic, partition, message } = payload; + + try { + if (!message.value) { + return; + } + + const eventData = JSON.parse(message.value.toString()); + const event: CDCEvent = { + ...eventData, + sequenceNum: BigInt(message.offset), + }; + + // 从 topic 名称提取表名 + // 格式通常是: dbserver1.schema.tablename + const parts = topic.split('.'); + const tableName = parts[parts.length - 1]; + + const handler = this.handlers.get(tableName); + if (handler) { + await handler(event); + this.logger.debug(`Processed CDC event for table ${tableName}, op: ${event.payload.op}`); + } else { + this.logger.warn(`No handler registered for table: ${tableName}`); + } + } catch (error) { + this.logger.error( + `Error processing CDC message from topic ${topic}, partition ${partition}`, + error, + ); + // 根据业务需求决定是否重试或记录到死信队列 + } + } +} diff --git a/backend/services/contribution-service/src/infrastructure/kafka/kafka-producer.service.ts b/backend/services/contribution-service/src/infrastructure/kafka/kafka-producer.service.ts new file mode 100644 index 00000000..6227552c --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/kafka/kafka-producer.service.ts @@ -0,0 +1,49 @@ +import { Injectable, Inject, OnModuleInit, Logger } from '@nestjs/common'; +import { ClientKafka } from '@nestjs/microservices'; +import { lastValueFrom } from 'rxjs'; + +export interface KafkaMessage { + key?: string; + value: any; + headers?: Record; +} + +@Injectable() +export class KafkaProducerService implements OnModuleInit { + private readonly logger = new Logger(KafkaProducerService.name); + + constructor( + @Inject('KAFKA_CLIENT') private readonly kafkaClient: ClientKafka, + ) {} + + async onModuleInit() { + await this.kafkaClient.connect(); + } + + async emit(topic: string, message: KafkaMessage): Promise { + try { + await lastValueFrom( + this.kafkaClient.emit(topic, { + key: message.key, + value: JSON.stringify(message.value), + headers: message.headers, + }), + ); + this.logger.debug(`Message emitted to topic ${topic}`); + } catch (error) { + this.logger.error(`Failed to emit message to topic ${topic}`, error); + throw error; + } + } + + async emitBatch(topic: string, messages: KafkaMessage[]): Promise { + try { + for (const message of messages) { + await this.emit(topic, message); + } + } catch (error) { + this.logger.error(`Failed to emit batch messages to topic ${topic}`, error); + throw error; + } + } +} diff --git a/backend/services/contribution-service/src/infrastructure/kafka/kafka.module.ts b/backend/services/contribution-service/src/infrastructure/kafka/kafka.module.ts new file mode 100644 index 00000000..c2964cfa --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/kafka/kafka.module.ts @@ -0,0 +1,29 @@ +import { Module } from '@nestjs/common'; +import { ClientsModule, Transport } from '@nestjs/microservices'; +import { ConfigModule, ConfigService } from '@nestjs/config'; + +@Module({ + imports: [ + ClientsModule.registerAsync([ + { + name: 'KAFKA_CLIENT', + imports: [ConfigModule], + useFactory: (configService: ConfigService) => ({ + transport: Transport.KAFKA, + options: { + client: { + clientId: 'contribution-service', + brokers: configService.get('KAFKA_BROKERS', 'localhost:9092').split(','), + }, + producer: { + allowAutoTopicCreation: true, + }, + }, + }), + inject: [ConfigService], + }, + ]), + ], + exports: [ClientsModule], +}) +export class KafkaModule {} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/prisma/prisma.module.ts b/backend/services/contribution-service/src/infrastructure/persistence/prisma/prisma.module.ts new file mode 100644 index 00000000..7207426f --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/prisma/prisma.module.ts @@ -0,0 +1,9 @@ +import { Global, Module } from '@nestjs/common'; +import { PrismaService } from './prisma.service'; + +@Global() +@Module({ + providers: [PrismaService], + exports: [PrismaService], +}) +export class PrismaModule {} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/prisma/prisma.service.ts b/backend/services/contribution-service/src/infrastructure/persistence/prisma/prisma.service.ts new file mode 100644 index 00000000..50374e61 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/prisma/prisma.service.ts @@ -0,0 +1,44 @@ +import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; +import { PrismaClient } from '@prisma/client'; + +@Injectable() +export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { + constructor() { + super({ + log: process.env.NODE_ENV === 'development' + ? ['query', 'info', 'warn', 'error'] + : ['error'], + }); + } + + async onModuleInit() { + await this.$connect(); + } + + async onModuleDestroy() { + await this.$disconnect(); + } + + /** + * 清理数据库连接(用于测试) + */ + async cleanDatabase() { + if (process.env.NODE_ENV !== 'test') { + throw new Error('cleanDatabase is only available in test environment'); + } + + const tablenames = await this.$queryRaw< + Array<{ tablename: string }> + >`SELECT tablename FROM pg_tables WHERE schemaname='public'`; + + const tables = tablenames + .map(({ tablename }) => tablename) + .filter((name) => name !== '_prisma_migrations') + .map((name) => `"public"."${name}"`) + .join(', '); + + if (tables.length > 0) { + await this.$executeRawUnsafe(`TRUNCATE TABLE ${tables} CASCADE;`); + } + } +} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-account.repository.ts b/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-account.repository.ts new file mode 100644 index 00000000..9196b064 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-account.repository.ts @@ -0,0 +1,216 @@ +import { Injectable } from '@nestjs/common'; +import { Decimal } from 'decimal.js'; +import { IContributionAccountRepository } from '../../../domain/repositories/contribution-account.repository.interface'; +import { ContributionAccountAggregate, ContributionSourceType } from '../../../domain/aggregates/contribution-account.aggregate'; +import { ContributionAmount } from '../../../domain/value-objects/contribution-amount.vo'; +import { UnitOfWork, TransactionClient } from '../unit-of-work/unit-of-work'; + +@Injectable() +export class ContributionAccountRepository implements IContributionAccountRepository { + constructor(private readonly unitOfWork: UnitOfWork) {} + + private get client(): TransactionClient { + return this.unitOfWork.getClient(); + } + + async findByAccountSequence(accountSequence: string): Promise { + const record = await this.client.contributionAccount.findUnique({ + where: { accountSequence }, + }); + + if (!record) { + return null; + } + + return this.toDomain(record); + } + + async findByAccountSequenceForUpdate( + accountSequence: string, + tx?: any, + ): Promise { + const client = tx ?? this.client; + // In Prisma, we use a raw query with FOR UPDATE or rely on transaction isolation + // For now, we'll use a regular findUnique within the transaction context + const record = await client.contributionAccount.findUnique({ + where: { accountSequence }, + }); + + if (!record) { + return null; + } + + return this.toDomain(record); + } + + async findByAccountSequences(accountSequences: string[]): Promise> { + const records = await this.client.contributionAccount.findMany({ + where: { accountSequence: { in: accountSequences } }, + }); + + const result = new Map(); + for (const record of records) { + result.set(record.accountSequence, this.toDomain(record)); + } + + return result; + } + + async save(aggregate: ContributionAccountAggregate, tx?: any): Promise { + const client = tx ?? this.client; + const data = this.toPersistence(aggregate); + + const result = await client.contributionAccount.upsert({ + where: { accountSequence: aggregate.accountSequence }, + create: data, + update: data, + }); + + return this.toDomain(result); + } + + async saveMany(aggregates: ContributionAccountAggregate[], tx?: any): Promise { + for (const aggregate of aggregates) { + await this.save(aggregate, tx); + } + } + + async updateContribution( + accountSequence: string, + sourceType: ContributionSourceType, + amount: ContributionAmount, + ): Promise { + const fieldMap: Record = { + [ContributionSourceType.PERSONAL]: 'personalContribution', + [ContributionSourceType.TEAM_LEVEL]: 'teamLevelContribution', + [ContributionSourceType.TEAM_BONUS]: 'teamBonusContribution', + }; + + const field = fieldMap[sourceType]; + + await this.client.contributionAccount.update({ + where: { accountSequence }, + data: { + [field]: { increment: amount.value }, + totalContribution: { increment: amount.value }, + updatedAt: new Date(), + }, + }); + } + + async findAllWithPagination(page: number, pageSize: number): Promise<{ + data: ContributionAccountAggregate[]; + total: number; + }> { + const [records, total] = await Promise.all([ + this.client.contributionAccount.findMany({ + skip: (page - 1) * pageSize, + take: pageSize, + orderBy: { totalContribution: 'desc' }, + }), + this.client.contributionAccount.count(), + ]); + + return { + data: records.map((r) => this.toDomain(r)), + total, + }; + } + + async findMany(options: { + page?: number; + limit?: number; + orderBy?: 'totalContribution' | 'effectiveContribution'; + order?: 'asc' | 'desc'; + }): Promise<{ + items: ContributionAccountAggregate[]; + total: number; + }> { + const page = options.page ?? 1; + const limit = options.limit ?? 50; + const orderBy = options.orderBy ?? 'totalContribution'; + const order = options.order ?? 'desc'; + + const [records, total] = await Promise.all([ + this.client.contributionAccount.findMany({ + skip: (page - 1) * limit, + take: limit, + orderBy: { [orderBy]: order }, + }), + this.client.contributionAccount.count(), + ]); + + return { + items: records.map((r) => this.toDomain(r)), + total, + }; + } + + async findAllWithEffectiveContribution(): Promise { + const records = await this.client.contributionAccount.findMany({ + where: { effectiveContribution: { gt: 0 } }, + orderBy: { effectiveContribution: 'desc' }, + }); + + return records.map((r) => this.toDomain(r)); + } + + async getNetworkTotalEffectiveContribution(): Promise { + const result = await this.client.contributionAccount.aggregate({ + _sum: { effectiveContribution: true }, + }); + + return (result._sum.effectiveContribution || new Decimal(0)).toString(); + } + + async findTopContributors(limit: number): Promise { + const records = await this.client.contributionAccount.findMany({ + where: { totalContribution: { gt: 0 } }, + orderBy: { totalContribution: 'desc' }, + take: limit, + }); + + return records.map((r) => this.toDomain(r)); + } + + async getTotalContribution(): Promise { + const result = await this.client.contributionAccount.aggregate({ + _sum: { totalContribution: true }, + }); + + return new ContributionAmount(result._sum.totalContribution || 0); + } + + async countAccounts(): Promise { + return this.client.contributionAccount.count(); + } + + async countAccountsWithContribution(): Promise { + return this.client.contributionAccount.count({ + where: { totalContribution: { gt: 0 } }, + }); + } + + private toDomain(record: any): ContributionAccountAggregate { + return ContributionAccountAggregate.fromPersistence({ + id: record.id, + accountSequence: record.accountSequence, + personalContribution: record.personalContribution, + teamLevelContribution: record.teamLevelContribution, + teamBonusContribution: record.teamBonusContribution, + totalContribution: record.totalContribution, + effectiveContribution: record.effectiveContribution, + hasAdopted: record.hasAdopted, + directReferralAdoptedCount: record.directReferralAdoptedCount, + unlockedLevelDepth: record.unlockedLevelDepth, + unlockedBonusTiers: record.unlockedBonusTiers, + version: record.version, + createdAt: record.createdAt, + updatedAt: record.updatedAt, + }); + } + + private toPersistence(aggregate: ContributionAccountAggregate): any { + return aggregate.toPersistence(); + } +} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-record.repository.ts b/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-record.repository.ts new file mode 100644 index 00000000..51223534 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-record.repository.ts @@ -0,0 +1,252 @@ +import { Injectable } from '@nestjs/common'; +import { IContributionRecordRepository } from '../../../domain/repositories/contribution-record.repository.interface'; +import { ContributionRecordAggregate } from '../../../domain/aggregates/contribution-record.aggregate'; +import { ContributionSourceType } from '../../../domain/aggregates/contribution-account.aggregate'; +import { ContributionAmount } from '../../../domain/value-objects/contribution-amount.vo'; +import { DistributionRate } from '../../../domain/value-objects/distribution-rate.vo'; +import { UnitOfWork, TransactionClient } from '../unit-of-work/unit-of-work'; + +@Injectable() +export class ContributionRecordRepository implements IContributionRecordRepository { + constructor(private readonly unitOfWork: UnitOfWork) {} + + private get client(): TransactionClient { + return this.unitOfWork.getClient(); + } + + async findById(id: bigint): Promise { + const record = await this.client.contributionRecord.findUnique({ + where: { id }, + }); + + if (!record) { + return null; + } + + return this.toDomain(record); + } + + async findByAccountSequence( + accountSequence: string, + options?: { + sourceType?: ContributionSourceType; + includeExpired?: boolean; + page?: number; + limit?: number; + }, + ): Promise<{ items: ContributionRecordAggregate[]; total: number }> { + const where: any = { accountSequence }; + + if (options?.sourceType) { + where.sourceType = options.sourceType; + } + + if (!options?.includeExpired) { + where.isExpired = false; + } + + const page = options?.page ?? 1; + const limit = options?.limit ?? 50; + + const [records, total] = await Promise.all([ + this.client.contributionRecord.findMany({ + where, + skip: (page - 1) * limit, + take: limit, + orderBy: { createdAt: 'desc' }, + }), + this.client.contributionRecord.count({ where }), + ]); + + return { + items: records.map((r) => this.toDomain(r)), + total, + }; + } + + async findBySourceAdoptionId(sourceAdoptionId: bigint): Promise { + const records = await this.client.contributionRecord.findMany({ + where: { sourceAdoptionId }, + orderBy: { createdAt: 'asc' }, + }); + + return records.map((r) => this.toDomain(r)); + } + + async existsBySourceAdoptionId(sourceAdoptionId: bigint): Promise { + const count = await this.client.contributionRecord.count({ + where: { sourceAdoptionId }, + }); + return count > 0; + } + + async save(aggregate: ContributionRecordAggregate, tx?: any): Promise { + const client = tx ?? this.client; + const data = aggregate.toPersistence(); + + let result; + if (aggregate.id) { + result = await client.contributionRecord.update({ + where: { id: aggregate.id }, + data, + }); + } else { + result = await client.contributionRecord.create({ + data, + }); + } + + return this.toDomain(result); + } + + async saveMany(aggregates: ContributionRecordAggregate[], tx?: any): Promise { + if (aggregates.length === 0) return; + + const client = tx ?? this.client; + // 使用事务批量插入 + const createData = aggregates.map((a) => a.toPersistence()); + + await client.contributionRecord.createMany({ + data: createData, + skipDuplicates: true, + }); + } + + async findExpiring(beforeDate: Date, limit?: number): Promise { + const records = await this.client.contributionRecord.findMany({ + where: { + expireDate: { lt: beforeDate }, + isExpired: false, + }, + take: limit ?? 1000, + orderBy: { expireDate: 'asc' }, + }); + + return records.map((r) => this.toDomain(r)); + } + + async findExpiredRecords(beforeDate: Date, limit: number): Promise { + return this.findExpiring(beforeDate, limit); + } + + async markExpiredBatch(ids: bigint[], tx?: any): Promise { + const client = tx ?? this.client; + const result = await client.contributionRecord.updateMany({ + where: { id: { in: ids } }, + data: { isExpired: true, expiredAt: new Date() }, + }); + return result.count; + } + + async markAsExpired(ids: bigint[]): Promise { + await this.markExpiredBatch(ids); + } + + async getEffectiveContributionSum(accountSequence: string): Promise { + const now = new Date(); + + const result = await this.client.contributionRecord.aggregate({ + where: { + accountSequence, + isExpired: false, + effectiveDate: { lte: now }, + expireDate: { gt: now }, + }, + _sum: { amount: true }, + }); + + return (result._sum.amount || 0).toString(); + } + + async getActiveContributionByAccount(accountSequence: string): Promise<{ + personal: ContributionAmount; + teamLevel: ContributionAmount; + teamBonus: ContributionAmount; + total: ContributionAmount; + }> { + const now = new Date(); + + const result = await this.client.contributionRecord.groupBy({ + by: ['sourceType'], + where: { + accountSequence, + isExpired: false, + effectiveDate: { lte: now }, + expireDate: { gt: now }, + }, + _sum: { amount: true }, + }); + + let personal = ContributionAmount.zero(); + let teamLevel = ContributionAmount.zero(); + let teamBonus = ContributionAmount.zero(); + + for (const item of result) { + const amount = new ContributionAmount(item._sum.amount || 0); + switch (item.sourceType) { + case 'PERSONAL': + personal = amount; + break; + case 'TEAM_LEVEL': + teamLevel = teamLevel.add(amount); + break; + case 'TEAM_BONUS': + teamBonus = teamBonus.add(amount); + break; + } + } + + return { + personal, + teamLevel, + teamBonus, + total: personal.add(teamLevel).add(teamBonus), + }; + } + + async getContributionSummaryBySourceType(): Promise> { + const now = new Date(); + + const result = await this.client.contributionRecord.groupBy({ + by: ['sourceType'], + where: { + isExpired: false, + effectiveDate: { lte: now }, + expireDate: { gt: now }, + }, + _sum: { amount: true }, + }); + + const summary = new Map(); + + for (const item of result) { + summary.set( + item.sourceType as ContributionSourceType, + new ContributionAmount(item._sum.amount || 0), + ); + } + + return summary; + } + + private toDomain(record: any): ContributionRecordAggregate { + return ContributionRecordAggregate.fromPersistence({ + id: record.id, + accountSequence: record.accountSequence, + sourceType: record.sourceType, + sourceAdoptionId: record.sourceAdoptionId, + sourceAccountSequence: record.sourceAccountSequence, + treeCount: record.treeCount, + baseContribution: record.baseContribution, + distributionRate: record.distributionRate, + levelDepth: record.levelDepth, + bonusTier: record.bonusTier, + amount: record.amount, + effectiveDate: record.effectiveDate, + expireDate: record.expireDate, + isExpired: record.isExpired, + expiredAt: record.expiredAt, + createdAt: record.createdAt, + }); + } +} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/repositories/index.ts b/backend/services/contribution-service/src/infrastructure/persistence/repositories/index.ts new file mode 100644 index 00000000..76177d8e --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/repositories/index.ts @@ -0,0 +1,6 @@ +export * from './contribution-account.repository'; +export * from './contribution-record.repository'; +export * from './synced-data.repository'; +export * from './unallocated-contribution.repository'; +export * from './system-account.repository'; +export * from './outbox.repository'; diff --git a/backend/services/contribution-service/src/infrastructure/persistence/repositories/outbox.repository.ts b/backend/services/contribution-service/src/infrastructure/persistence/repositories/outbox.repository.ts new file mode 100644 index 00000000..6e59601c --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/repositories/outbox.repository.ts @@ -0,0 +1,146 @@ +import { Injectable } from '@nestjs/common'; +import { UnitOfWork, TransactionClient } from '../unit-of-work/unit-of-work'; + +export interface OutboxEvent { + id: bigint; + aggregateType: string; + aggregateId: string; + eventType: string; + topic: string; + key: string; + payload: any; + status: string; + retryCount: number; + maxRetries: number; + lastError: string | null; + createdAt: Date; + publishedAt: Date | null; + nextRetryAt: Date | null; +} + +/** + * Outbox Pattern 仓库 + * 用于保证事件发布的可靠性 + */ +@Injectable() +export class OutboxRepository { + constructor(private readonly unitOfWork: UnitOfWork) {} + + private get client(): TransactionClient { + return this.unitOfWork.getClient(); + } + + async save(event: { + aggregateType: string; + aggregateId: string; + eventType: string; + payload: any; + topic?: string; + key?: string; + }): Promise { + const topic = event.topic ?? `contribution.${event.eventType.toLowerCase()}`; + const key = event.key ?? event.aggregateId; + + await this.client.outboxEvent.create({ + data: { + aggregateType: event.aggregateType, + aggregateId: event.aggregateId, + eventType: event.eventType, + topic, + key, + payload: event.payload, + status: 'PENDING', + }, + }); + } + + async saveMany(events: { + aggregateType: string; + aggregateId: string; + eventType: string; + payload: any; + topic?: string; + key?: string; + }[]): Promise { + if (events.length === 0) return; + + await this.client.outboxEvent.createMany({ + data: events.map((e) => ({ + aggregateType: e.aggregateType, + aggregateId: e.aggregateId, + eventType: e.eventType, + topic: e.topic ?? `contribution.${e.eventType.toLowerCase()}`, + key: e.key ?? e.aggregateId, + payload: e.payload, + status: 'PENDING', + })), + }); + } + + async findUnprocessed(limit: number): Promise { + const records = await this.client.outboxEvent.findMany({ + where: { status: 'PENDING' }, + orderBy: { createdAt: 'asc' }, + take: limit, + }); + + return records.map((r) => this.toDomain(r)); + } + + async markAsProcessed(ids: bigint[]): Promise { + await this.client.outboxEvent.updateMany({ + where: { id: { in: ids } }, + data: { status: 'PUBLISHED', publishedAt: new Date() }, + }); + } + + async markAsFailed(id: bigint, error: string): Promise { + const event = await this.client.outboxEvent.findUnique({ where: { id } }); + if (!event) return; + + const retryCount = event.retryCount + 1; + const shouldRetry = retryCount < event.maxRetries; + + await this.client.outboxEvent.update({ + where: { id }, + data: { + status: shouldRetry ? 'PENDING' : 'FAILED', + retryCount, + lastError: error, + nextRetryAt: shouldRetry + ? new Date(Date.now() + Math.pow(2, retryCount) * 1000) // exponential backoff + : null, + }, + }); + } + + async deleteProcessed(beforeDate: Date): Promise { + const result = await this.client.outboxEvent.deleteMany({ + where: { + status: 'PUBLISHED', + publishedAt: { lt: beforeDate }, + }, + }); + + return result.count; + } + + private toDomain(record: any): OutboxEvent { + return { + id: record.id, + aggregateType: record.aggregateType, + aggregateId: record.aggregateId, + eventType: record.eventType, + topic: record.topic, + key: record.key, + payload: record.payload, + status: record.status, + retryCount: record.retryCount, + maxRetries: record.maxRetries, + lastError: record.lastError, + createdAt: record.createdAt, + publishedAt: record.publishedAt, + nextRetryAt: record.nextRetryAt, + }; + } +} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/repositories/synced-data.repository.ts b/backend/services/contribution-service/src/infrastructure/persistence/repositories/synced-data.repository.ts new file mode 100644 index 00000000..e70e4ba8 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/repositories/synced-data.repository.ts @@ -0,0 +1,378 @@ +import { Injectable } from '@nestjs/common'; +import Decimal from 'decimal.js'; +import { + ISyncedDataRepository, + SyncedUser, + SyncedAdoption, + SyncedReferral, +} from '../../../domain/repositories/synced-data.repository.interface'; +import { UnitOfWork, TransactionClient } from '../unit-of-work/unit-of-work'; + +@Injectable() +export class SyncedDataRepository implements ISyncedDataRepository { + constructor(private readonly unitOfWork: UnitOfWork) {} + + private get client(): TransactionClient { + return this.unitOfWork.getClient(); + } + + // ========== User 操作 ========== + + async upsertSyncedUser(data: { + accountSequence: string; + originalUserId: bigint; + phone?: string | null; + status?: string | null; + sourceSequenceNum: bigint; + }): Promise { + const record = await this.client.syncedUser.upsert({ + where: { accountSequence: data.accountSequence }, + create: { + originalUserId: data.originalUserId, + accountSequence: data.accountSequence, + phone: data.phone ?? null, + status: data.status ?? null, + sourceSequenceNum: data.sourceSequenceNum, + syncedAt: new Date(), + }, + update: { + phone: data.phone ?? undefined, + status: data.status ?? undefined, + sourceSequenceNum: data.sourceSequenceNum, + syncedAt: new Date(), + }, + }); + + return this.toSyncedUser(record); + } + + async findSyncedUserByAccountSequence(accountSequence: string): Promise { + const record = await this.client.syncedUser.findUnique({ + where: { accountSequence }, + }); + + if (!record) { + return null; + } + + return this.toSyncedUser(record); + } + + async findUncalculatedUsers(limit: number = 100): Promise { + const records = await this.client.syncedUser.findMany({ + where: { contributionCalculated: false }, + orderBy: { createdAt: 'asc' }, + take: limit, + }); + + return records.map((r) => this.toSyncedUser(r)); + } + + async markUserContributionCalculated(accountSequence: string, tx?: any): Promise { + const client = tx ?? this.client; + await client.syncedUser.update({ + where: { accountSequence }, + data: { + contributionCalculated: true, + contributionCalculatedAt: new Date(), + }, + }); + } + + // ========== Adoption 操作 ========== + + async upsertSyncedAdoption(data: { + originalAdoptionId: bigint; + accountSequence: string; + treeCount: number; + adoptionDate: Date; + status?: string | null; + contributionPerTree: Decimal; + sourceSequenceNum: bigint; + }): Promise { + const record = await this.client.syncedAdoption.upsert({ + where: { originalAdoptionId: data.originalAdoptionId }, + create: { + originalAdoptionId: data.originalAdoptionId, + accountSequence: data.accountSequence, + treeCount: data.treeCount, + adoptionDate: data.adoptionDate, + status: data.status ?? null, + contributionPerTree: data.contributionPerTree, + sourceSequenceNum: data.sourceSequenceNum, + syncedAt: new Date(), + }, + update: { + accountSequence: data.accountSequence, + treeCount: data.treeCount, + adoptionDate: data.adoptionDate, + status: data.status ?? undefined, + contributionPerTree: data.contributionPerTree, + sourceSequenceNum: data.sourceSequenceNum, + syncedAt: new Date(), + }, + }); + + return this.toSyncedAdoption(record); + } + + async findSyncedAdoptionByOriginalId(originalAdoptionId: bigint): Promise { + const record = await this.client.syncedAdoption.findUnique({ + where: { originalAdoptionId }, + }); + + if (!record) { + return null; + } + + return this.toSyncedAdoption(record); + } + + async findUndistributedAdoptions(limit: number = 100): Promise { + const records = await this.client.syncedAdoption.findMany({ + where: { contributionDistributed: false }, + orderBy: { adoptionDate: 'asc' }, + take: limit, + }); + + return records.map((r) => this.toSyncedAdoption(r)); + } + + async findAdoptionsByAccountSequence(accountSequence: string): Promise { + const records = await this.client.syncedAdoption.findMany({ + where: { accountSequence }, + orderBy: { adoptionDate: 'asc' }, + }); + + return records.map((r) => this.toSyncedAdoption(r)); + } + + async markAdoptionContributionDistributed(originalAdoptionId: bigint, tx?: any): Promise { + const client = tx ?? this.client; + await client.syncedAdoption.update({ + where: { originalAdoptionId }, + data: { + contributionDistributed: true, + contributionDistributedAt: new Date(), + }, + }); + } + + async getTotalTreesByAccountSequence(accountSequence: string): Promise { + const result = await this.client.syncedAdoption.aggregate({ + where: { accountSequence }, + _sum: { treeCount: true }, + }); + return result._sum.treeCount ?? 0; + } + + // ========== Referral 操作 ========== + + async upsertSyncedReferral(data: { + accountSequence: string; + referrerAccountSequence?: string | null; + ancestorPath?: string | null; + depth?: number; + sourceSequenceNum: bigint; + }): Promise { + const record = await this.client.syncedReferral.upsert({ + where: { accountSequence: data.accountSequence }, + create: { + accountSequence: data.accountSequence, + referrerAccountSequence: data.referrerAccountSequence ?? null, + ancestorPath: data.ancestorPath ?? null, + depth: data.depth ?? 0, + sourceSequenceNum: data.sourceSequenceNum, + syncedAt: new Date(), + }, + update: { + referrerAccountSequence: data.referrerAccountSequence ?? undefined, + ancestorPath: data.ancestorPath ?? undefined, + depth: data.depth ?? undefined, + sourceSequenceNum: data.sourceSequenceNum, + syncedAt: new Date(), + }, + }); + + return this.toSyncedReferral(record); + } + + async findSyncedReferralByAccountSequence(accountSequence: string): Promise { + const record = await this.client.syncedReferral.findUnique({ + where: { accountSequence }, + }); + + if (!record) { + return null; + } + + return this.toSyncedReferral(record); + } + + async findDirectReferrals(referrerAccountSequence: string): Promise { + const records = await this.client.syncedReferral.findMany({ + where: { referrerAccountSequence }, + orderBy: { createdAt: 'asc' }, + }); + + return records.map((r) => this.toSyncedReferral(r)); + } + + async findAncestorChain(accountSequence: string, maxLevel: number = 15): Promise { + const ancestors: SyncedReferral[] = []; + let currentSequence = accountSequence; + + for (let i = 0; i < maxLevel; i++) { + const referral = await this.findSyncedReferralByAccountSequence(currentSequence); + if (!referral || !referral.referrerAccountSequence) { + break; + } + + const referrer = await this.findSyncedReferralByAccountSequence(referral.referrerAccountSequence); + if (!referrer) { + break; + } + + ancestors.push(referrer); + currentSequence = referrer.accountSequence; + } + + return ancestors; + } + + async getDirectReferralAdoptedCount(referrerAccountSequence: string): Promise { + const directReferrals = await this.client.syncedReferral.findMany({ + where: { referrerAccountSequence }, + select: { accountSequence: true }, + }); + + if (directReferrals.length === 0) { + return 0; + } + + const accountSequences = directReferrals.map((r) => r.accountSequence); + + const adoptedCount = await this.client.syncedAdoption.findMany({ + where: { accountSequence: { in: accountSequences } }, + distinct: ['accountSequence'], + }); + + return adoptedCount.length; + } + + async getTeamTreesByLevel( + accountSequence: string, + maxLevel: number = 15, + ): Promise> { + const result = new Map(); + + for (let level = 1; level <= maxLevel; level++) { + result.set(level, 0); + } + + const processLevel = async (sequences: string[], currentLevel: number): Promise => { + if (currentLevel > maxLevel || sequences.length === 0) return; + + const adoptions = await this.client.syncedAdoption.groupBy({ + by: ['accountSequence'], + where: { accountSequence: { in: sequences } }, + _sum: { treeCount: true }, + }); + + let levelTrees = 0; + for (const adoption of adoptions) { + levelTrees += adoption._sum.treeCount ?? 0; + } + result.set(currentLevel, levelTrees); + + const nextLevelReferrals = await this.client.syncedReferral.findMany({ + where: { referrerAccountSequence: { in: sequences } }, + select: { accountSequence: true }, + }); + + if (nextLevelReferrals.length > 0) { + await processLevel( + nextLevelReferrals.map((r) => r.accountSequence), + currentLevel + 1, + ); + } + }; + + const directReferrals = await this.client.syncedReferral.findMany({ + where: { referrerAccountSequence: accountSequence }, + select: { accountSequence: true }, + }); + + if (directReferrals.length > 0) { + await processLevel( + directReferrals.map((r) => r.accountSequence), + 1, + ); + } + + return result; + } + + // ========== 统计方法(用于查询服务)========== + + async countUsers(): Promise { + return this.client.syncedUser.count(); + } + + async countAdoptions(): Promise { + return this.client.syncedAdoption.count(); + } + + async countUndistributedAdoptions(): Promise { + return this.client.syncedAdoption.count({ + where: { contributionDistributed: false }, + }); + } + + // ========== 私有方法 ========== + + private toSyncedUser(record: any): SyncedUser { + return { + id: record.id, + accountSequence: record.accountSequence, + originalUserId: record.originalUserId, + phone: record.phone, + status: record.status, + sourceSequenceNum: record.sourceSequenceNum, + syncedAt: record.syncedAt, + contributionCalculated: record.contributionCalculated, + contributionCalculatedAt: record.contributionCalculatedAt, + createdAt: record.createdAt, + }; + } + + private toSyncedAdoption(record: any): SyncedAdoption { + return { + id: record.id, + originalAdoptionId: record.originalAdoptionId, + accountSequence: record.accountSequence, + treeCount: record.treeCount, + adoptionDate: record.adoptionDate, + status: record.status, + contributionPerTree: record.contributionPerTree, + sourceSequenceNum: record.sourceSequenceNum, + syncedAt: record.syncedAt, + contributionDistributed: record.contributionDistributed, + contributionDistributedAt: record.contributionDistributedAt, + createdAt: record.createdAt, + }; + } + + private toSyncedReferral(record: any): SyncedReferral { + return { + id: record.id, + accountSequence: record.accountSequence, + referrerAccountSequence: record.referrerAccountSequence, + ancestorPath: record.ancestorPath, + depth: record.depth, + sourceSequenceNum: record.sourceSequenceNum, + syncedAt: record.syncedAt, + createdAt: record.createdAt, + }; + } +} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/repositories/system-account.repository.ts b/backend/services/contribution-service/src/infrastructure/persistence/repositories/system-account.repository.ts new file mode 100644 index 00000000..c35fbcb4 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/repositories/system-account.repository.ts @@ -0,0 +1,204 @@ +import { Injectable } from '@nestjs/common'; +import { ContributionAmount } from '../../../domain/value-objects/contribution-amount.vo'; +import { UnitOfWork, TransactionClient } from '../unit-of-work/unit-of-work'; + +export type SystemAccountType = 'OPERATION' | 'PROVINCE' | 'CITY' | 'HEADQUARTERS'; + +export interface SystemAccount { + id: bigint; + accountType: SystemAccountType; + name: string; + contributionBalance: ContributionAmount; + contributionNeverExpires: boolean; + version: number; + createdAt: Date; + updatedAt: Date; +} + +export interface SystemContributionRecord { + id: bigint; + systemAccountId: bigint; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + distributionRate: number; + amount: ContributionAmount; + effectiveDate: Date; + expireDate: Date | null; + isExpired: boolean; + createdAt: Date; +} + +@Injectable() +export class SystemAccountRepository { + constructor(private readonly unitOfWork: UnitOfWork) {} + + private get client(): TransactionClient { + return this.unitOfWork.getClient(); + } + + async findByType(accountType: SystemAccountType): Promise { + const record = await this.client.systemAccount.findUnique({ + where: { accountType }, + }); + + if (!record) { + return null; + } + + return this.toSystemAccount(record); + } + + async findAll(): Promise { + const records = await this.client.systemAccount.findMany({ + orderBy: { accountType: 'asc' }, + }); + + return records.map((r) => this.toSystemAccount(r)); + } + + async ensureSystemAccountsExist(): Promise { + const accounts: { accountType: SystemAccountType; name: string }[] = [ + { accountType: 'OPERATION', name: '运营账户' }, + { accountType: 'PROVINCE', name: '省公司账户' }, + { accountType: 'CITY', name: '市公司账户' }, + { accountType: 'HEADQUARTERS', name: '总部账户' }, + ]; + + for (const account of accounts) { + await this.client.systemAccount.upsert({ + where: { accountType: account.accountType }, + create: { + accountType: account.accountType, + name: account.name, + contributionBalance: 0, + }, + update: {}, + }); + } + } + + async addContribution( + accountType: SystemAccountType, + amount: ContributionAmount, + ): Promise { + await this.client.systemAccount.update({ + where: { accountType }, + data: { + contributionBalance: { increment: amount.value }, + }, + }); + } + + async saveContributionRecord(record: { + systemAccountType: SystemAccountType; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + distributionRate: number; + amount: ContributionAmount; + effectiveDate: Date; + expireDate?: Date | null; + }): Promise { + const systemAccount = await this.findByType(record.systemAccountType); + if (!systemAccount) { + throw new Error(`System account ${record.systemAccountType} not found`); + } + + await this.client.systemContributionRecord.create({ + data: { + systemAccountId: systemAccount.id, + sourceAdoptionId: record.sourceAdoptionId, + sourceAccountSequence: record.sourceAccountSequence, + distributionRate: record.distributionRate, + amount: record.amount.value, + effectiveDate: record.effectiveDate, + expireDate: record.expireDate ?? null, + }, + }); + } + + async saveContributionRecords(records: { + systemAccountType: SystemAccountType; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + distributionRate: number; + amount: ContributionAmount; + effectiveDate: Date; + expireDate?: Date | null; + }[]): Promise { + if (records.length === 0) return; + + const systemAccounts = await this.findAll(); + const accountMap = new Map(); + for (const account of systemAccounts) { + accountMap.set(account.accountType, account.id); + } + + await this.client.systemContributionRecord.createMany({ + data: records.map((r) => ({ + systemAccountId: accountMap.get(r.systemAccountType)!, + sourceAdoptionId: r.sourceAdoptionId, + sourceAccountSequence: r.sourceAccountSequence, + distributionRate: r.distributionRate, + amount: r.amount.value, + effectiveDate: r.effectiveDate, + expireDate: r.expireDate ?? null, + })), + }); + } + + async findContributionRecords( + systemAccountType: SystemAccountType, + page: number, + pageSize: number, + ): Promise<{ data: SystemContributionRecord[]; total: number }> { + const systemAccount = await this.findByType(systemAccountType); + if (!systemAccount) { + return { data: [], total: 0 }; + } + + const [records, total] = await Promise.all([ + this.client.systemContributionRecord.findMany({ + where: { systemAccountId: systemAccount.id }, + skip: (page - 1) * pageSize, + take: pageSize, + orderBy: { createdAt: 'desc' }, + }), + this.client.systemContributionRecord.count({ + where: { systemAccountId: systemAccount.id }, + }), + ]); + + return { + data: records.map((r) => this.toContributionRecord(r)), + total, + }; + } + + private toSystemAccount(record: any): SystemAccount { + return { + id: record.id, + accountType: record.accountType as SystemAccountType, + name: record.name, + contributionBalance: new ContributionAmount(record.contributionBalance), + contributionNeverExpires: record.contributionNeverExpires, + version: record.version, + createdAt: record.createdAt, + updatedAt: record.updatedAt, + }; + } + + private toContributionRecord(record: any): SystemContributionRecord { + return { + id: record.id, + systemAccountId: record.systemAccountId, + sourceAdoptionId: record.sourceAdoptionId, + sourceAccountSequence: record.sourceAccountSequence, + distributionRate: record.distributionRate, + amount: new ContributionAmount(record.amount), + effectiveDate: record.effectiveDate, + expireDate: record.expireDate, + isExpired: record.isExpired, + createdAt: record.createdAt, + }; + } +} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/repositories/unallocated-contribution.repository.ts b/backend/services/contribution-service/src/infrastructure/persistence/repositories/unallocated-contribution.repository.ts new file mode 100644 index 00000000..6b00e835 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/repositories/unallocated-contribution.repository.ts @@ -0,0 +1,150 @@ +import { Injectable } from '@nestjs/common'; +import { ContributionAmount } from '../../../domain/value-objects/contribution-amount.vo'; +import { UnitOfWork, TransactionClient } from '../unit-of-work/unit-of-work'; + +export interface UnallocatedContribution { + id: bigint; + unallocType: string; + wouldBeAccountSequence: string | null; + levelDepth: number | null; + amount: ContributionAmount; + reason: string | null; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + effectiveDate: Date; + expireDate: Date; + allocatedToHeadquarters: boolean; + allocatedAt: Date | null; + createdAt: Date; +} + +@Injectable() +export class UnallocatedContributionRepository { + constructor(private readonly unitOfWork: UnitOfWork) {} + + private get client(): TransactionClient { + return this.unitOfWork.getClient(); + } + + async save(contribution: { + type: string; + wouldBeAccountSequence: string | null; + levelDepth: number | null; + amount: ContributionAmount; + reason: string; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + effectiveDate: Date; + expireDate: Date; + }): Promise { + await this.client.unallocatedContribution.create({ + data: { + unallocType: contribution.type, + wouldBeAccountSequence: contribution.wouldBeAccountSequence, + levelDepth: contribution.levelDepth, + amount: contribution.amount.value, + reason: contribution.reason, + sourceAdoptionId: contribution.sourceAdoptionId, + sourceAccountSequence: contribution.sourceAccountSequence, + effectiveDate: contribution.effectiveDate, + expireDate: contribution.expireDate, + }, + }); + } + + async saveMany(contributions: { + type: string; + wouldBeAccountSequence: string | null; + levelDepth: number | null; + amount: ContributionAmount; + reason: string; + sourceAdoptionId: bigint; + sourceAccountSequence: string; + effectiveDate: Date; + expireDate: Date; + }[]): Promise { + if (contributions.length === 0) return; + + await this.client.unallocatedContribution.createMany({ + data: contributions.map((c) => ({ + unallocType: c.type, + wouldBeAccountSequence: c.wouldBeAccountSequence, + levelDepth: c.levelDepth, + amount: c.amount.value, + reason: c.reason, + sourceAdoptionId: c.sourceAdoptionId, + sourceAccountSequence: c.sourceAccountSequence, + effectiveDate: c.effectiveDate, + expireDate: c.expireDate, + })), + }); + } + + async findBySourceAdoptionId(sourceAdoptionId: bigint): Promise { + const records = await this.client.unallocatedContribution.findMany({ + where: { sourceAdoptionId }, + orderBy: { createdAt: 'asc' }, + }); + + return records.map((r) => this.toDomain(r)); + } + + async getTotalUnallocated(): Promise { + const result = await this.client.unallocatedContribution.aggregate({ + _sum: { amount: true }, + }); + + return new ContributionAmount(result._sum.amount || 0); + } + + async getTotalUnallocatedByType(): Promise> { + const result = await this.client.unallocatedContribution.groupBy({ + by: ['unallocType'], + _sum: { amount: true }, + }); + + const map = new Map(); + for (const item of result) { + map.set(item.unallocType, new ContributionAmount(item._sum.amount || 0)); + } + + return map; + } + + async findWithPagination(page: number, pageSize: number): Promise<{ + data: UnallocatedContribution[]; + total: number; + }> { + const [records, total] = await Promise.all([ + this.client.unallocatedContribution.findMany({ + skip: (page - 1) * pageSize, + take: pageSize, + orderBy: { createdAt: 'desc' }, + }), + this.client.unallocatedContribution.count(), + ]); + + return { + data: records.map((r) => this.toDomain(r)), + total, + }; + } + + private toDomain(record: any): UnallocatedContribution { + return { + id: record.id, + unallocType: record.unallocType, + wouldBeAccountSequence: record.wouldBeAccountSequence, + levelDepth: record.levelDepth, + amount: new ContributionAmount(record.amount), + reason: record.reason, + sourceAdoptionId: record.sourceAdoptionId, + sourceAccountSequence: record.sourceAccountSequence, + effectiveDate: record.effectiveDate, + expireDate: record.expireDate, + allocatedToHeadquarters: record.allocatedToHeadquarters, + allocatedAt: record.allocatedAt, + createdAt: record.createdAt, + }; + } +} diff --git a/backend/services/contribution-service/src/infrastructure/persistence/unit-of-work/unit-of-work.ts b/backend/services/contribution-service/src/infrastructure/persistence/unit-of-work/unit-of-work.ts new file mode 100644 index 00000000..c92b6041 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/persistence/unit-of-work/unit-of-work.ts @@ -0,0 +1,61 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from '../prisma/prisma.service'; +import { Prisma } from '@prisma/client'; + +export type TransactionClient = Omit< + PrismaService, + '$connect' | '$disconnect' | '$on' | '$transaction' | '$use' | '$extends' +>; + +/** + * 工作单元模式 + * 用于管理事务边界,确保多个仓库操作在同一事务中执行 + */ +@Injectable() +export class UnitOfWork { + private transactionClient: TransactionClient | null = null; + + constructor(private readonly prisma: PrismaService) {} + + /** + * 获取当前事务客户端,如果没有活跃事务则返回普通客户端 + */ + getClient(): TransactionClient { + return this.transactionClient || this.prisma; + } + + /** + * 在事务中执行操作 + */ + async executeInTransaction( + operation: (client: TransactionClient) => Promise, + options?: { + maxWait?: number; + timeout?: number; + isolationLevel?: Prisma.TransactionIsolationLevel; + }, + ): Promise { + return this.prisma.$transaction( + async (tx) => { + this.transactionClient = tx as TransactionClient; + try { + return await operation(tx as TransactionClient); + } finally { + this.transactionClient = null; + } + }, + { + maxWait: options?.maxWait ?? 5000, + timeout: options?.timeout ?? 10000, + isolationLevel: options?.isolationLevel ?? Prisma.TransactionIsolationLevel.ReadCommitted, + }, + ); + } + + /** + * 是否在事务中 + */ + isInTransaction(): boolean { + return this.transactionClient !== null; + } +} diff --git a/backend/services/contribution-service/src/infrastructure/redis/redis.module.ts b/backend/services/contribution-service/src/infrastructure/redis/redis.module.ts new file mode 100644 index 00000000..591a7a07 --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/redis/redis.module.ts @@ -0,0 +1,23 @@ +import { Module, Global } from '@nestjs/common'; +import { ConfigModule, ConfigService } from '@nestjs/config'; +import { RedisService } from './redis.service'; + +@Global() +@Module({ + imports: [ConfigModule], + providers: [ + { + provide: 'REDIS_OPTIONS', + useFactory: (configService: ConfigService) => ({ + host: configService.get('REDIS_HOST', 'localhost'), + port: configService.get('REDIS_PORT', 6379), + password: configService.get('REDIS_PASSWORD'), + db: configService.get('REDIS_DB', 0), + }), + inject: [ConfigService], + }, + RedisService, + ], + exports: [RedisService], +}) +export class RedisModule {} diff --git a/backend/services/contribution-service/src/infrastructure/redis/redis.service.ts b/backend/services/contribution-service/src/infrastructure/redis/redis.service.ts new file mode 100644 index 00000000..f7adcfad --- /dev/null +++ b/backend/services/contribution-service/src/infrastructure/redis/redis.service.ts @@ -0,0 +1,193 @@ +import { Injectable, Inject, OnModuleInit, OnModuleDestroy, Logger } from '@nestjs/common'; +import Redis from 'ioredis'; + +interface RedisOptions { + host: string; + port: number; + password?: string; + db?: number; +} + +@Injectable() +export class RedisService implements OnModuleInit, OnModuleDestroy { + private readonly logger = new Logger(RedisService.name); + private client: Redis; + + constructor(@Inject('REDIS_OPTIONS') private readonly options: RedisOptions) {} + + async onModuleInit() { + this.client = new Redis({ + host: this.options.host, + port: this.options.port, + password: this.options.password, + db: this.options.db ?? 0, + retryStrategy: (times) => { + const delay = Math.min(times * 50, 2000); + return delay; + }, + }); + + this.client.on('error', (err) => { + this.logger.error('Redis connection error', err); + }); + + this.client.on('connect', () => { + this.logger.log('Connected to Redis'); + }); + } + + async onModuleDestroy() { + await this.client.quit(); + } + + getClient(): Redis { + return this.client; + } + + // ========== 基础操作 ========== + + async get(key: string): Promise { + return this.client.get(key); + } + + async set(key: string, value: string, ttlSeconds?: number): Promise { + if (ttlSeconds) { + await this.client.setex(key, ttlSeconds, value); + } else { + await this.client.set(key, value); + } + } + + async del(key: string): Promise { + await this.client.del(key); + } + + async exists(key: string): Promise { + const result = await this.client.exists(key); + return result === 1; + } + + // ========== JSON 操作 ========== + + async getJson(key: string): Promise { + const value = await this.get(key); + if (!value) return null; + try { + return JSON.parse(value) as T; + } catch { + return null; + } + } + + async setJson(key: string, value: T, ttlSeconds?: number): Promise { + await this.set(key, JSON.stringify(value), ttlSeconds); + } + + // ========== 分布式锁 ========== + + async acquireLock( + lockKey: string, + ttlSeconds: number = 30, + retryCount: number = 3, + retryDelay: number = 100, + ): Promise { + const lockValue = `${Date.now()}-${Math.random().toString(36).substring(7)}`; + + for (let i = 0; i < retryCount; i++) { + const result = await this.client.set(lockKey, lockValue, 'EX', ttlSeconds, 'NX'); + if (result === 'OK') { + return lockValue; + } + await new Promise((resolve) => setTimeout(resolve, retryDelay)); + } + + return null; + } + + async releaseLock(lockKey: string, lockValue: string): Promise { + const script = ` + if redis.call("get", KEYS[1]) == ARGV[1] then + return redis.call("del", KEYS[1]) + else + return 0 + end + `; + const result = await this.client.eval(script, 1, lockKey, lockValue); + return result === 1; + } + + // ========== 计数器 ========== + + async incr(key: string): Promise { + return this.client.incr(key); + } + + async incrBy(key: string, increment: number): Promise { + return this.client.incrby(key, increment); + } + + async incrByFloat(key: string, increment: number): Promise { + return this.client.incrbyfloat(key, increment); + } + + // ========== 哈希操作 ========== + + async hget(key: string, field: string): Promise { + return this.client.hget(key, field); + } + + async hset(key: string, field: string, value: string): Promise { + await this.client.hset(key, field, value); + } + + async hgetall(key: string): Promise> { + return this.client.hgetall(key); + } + + async hdel(key: string, ...fields: string[]): Promise { + await this.client.hdel(key, ...fields); + } + + // ========== 有序集合 ========== + + async zadd(key: string, score: number, member: string): Promise { + await this.client.zadd(key, score, member); + } + + async zrange(key: string, start: number, stop: number): Promise { + return this.client.zrange(key, start, stop); + } + + async zrangeWithScores( + key: string, + start: number, + stop: number, + ): Promise<{ member: string; score: number }[]> { + const result = await this.client.zrange(key, start, stop, 'WITHSCORES'); + const items: { member: string; score: number }[] = []; + for (let i = 0; i < result.length; i += 2) { + items.push({ + member: result[i], + score: parseFloat(result[i + 1]), + }); + } + return items; + } + + async zrevrange(key: string, start: number, stop: number): Promise { + return this.client.zrevrange(key, start, stop); + } + + async zscore(key: string, member: string): Promise { + const score = await this.client.zscore(key, member); + return score ? parseFloat(score) : null; + } + + async zrank(key: string, member: string): Promise { + return this.client.zrank(key, member); + } + + async zrevrank(key: string, member: string): Promise { + return this.client.zrevrank(key, member); + } +} diff --git a/backend/services/contribution-service/src/main.ts b/backend/services/contribution-service/src/main.ts new file mode 100644 index 00000000..b6d2fb90 --- /dev/null +++ b/backend/services/contribution-service/src/main.ts @@ -0,0 +1,67 @@ +import { NestFactory } from '@nestjs/core'; +import { ValidationPipe, Logger } from '@nestjs/common'; +import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; +import { MicroserviceOptions, Transport } from '@nestjs/microservices'; +import { AppModule } from './app.module'; + +async function bootstrap() { + const logger = new Logger('Bootstrap'); + const app = await NestFactory.create(AppModule); + + // Global prefix + app.setGlobalPrefix('api/v1'); + + // Validation + app.useGlobalPipes( + new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + transformOptions: { enableImplicitConversion: true }, + }), + ); + + // CORS + app.enableCors({ + origin: '*', + methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', + credentials: true, + }); + + // Swagger + const config = new DocumentBuilder() + .setTitle('Contribution Service API') + .setDescription('RWA贡献值算力服务API - 管理用户算力计算、分配、明细账等功能') + .setVersion('1.0.0') + .addBearerAuth() + .build(); + const document = SwaggerModule.createDocument(app, config); + SwaggerModule.setup('api/docs', app, document); + + // Kafka 微服务 - 用于 CDC 消费和事件处理 + const kafkaBrokers = process.env.KAFKA_BROKERS?.split(',') || ['localhost:9092']; + const kafkaGroupId = process.env.KAFKA_GROUP_ID || 'contribution-service-group'; + + app.connectMicroservice({ + transport: Transport.KAFKA, + options: { + client: { + clientId: 'contribution-service', + brokers: kafkaBrokers, + }, + consumer: { + groupId: kafkaGroupId, + }, + }, + }); + + await app.startAllMicroservices(); + logger.log('Kafka microservice started'); + + const port = process.env.APP_PORT || 3020; + await app.listen(port); + logger.log(`Contribution Service is running on port ${port}`); + logger.log(`Swagger docs: http://localhost:${port}/api/docs`); +} + +bootstrap(); diff --git a/backend/services/contribution-service/src/shared/filters/domain-exception.filter.ts b/backend/services/contribution-service/src/shared/filters/domain-exception.filter.ts new file mode 100644 index 00000000..5ba9f187 --- /dev/null +++ b/backend/services/contribution-service/src/shared/filters/domain-exception.filter.ts @@ -0,0 +1,104 @@ +import { + ExceptionFilter, + Catch, + ArgumentsHost, + HttpStatus, + Logger, + HttpException, +} from '@nestjs/common'; +import { Request, Response } from 'express'; + +/** + * 领域异常基类 + */ +export class DomainException extends Error { + constructor( + message: string, + public readonly code: string, + public readonly httpStatus: HttpStatus = HttpStatus.BAD_REQUEST, + ) { + super(message); + this.name = 'DomainException'; + } +} + +/** + * 实体未找到异常 + */ +export class EntityNotFoundException extends DomainException { + constructor(entityName: string, id: string) { + super(`${entityName} with id ${id} not found`, 'ENTITY_NOT_FOUND', HttpStatus.NOT_FOUND); + this.name = 'EntityNotFoundException'; + } +} + +/** + * 业务规则违反异常 + */ +export class BusinessRuleViolationException extends DomainException { + constructor(message: string, code: string = 'BUSINESS_RULE_VIOLATION') { + super(message, code, HttpStatus.UNPROCESSABLE_ENTITY); + this.name = 'BusinessRuleViolationException'; + } +} + +/** + * 并发冲突异常 + */ +export class ConcurrencyException extends DomainException { + constructor(message: string = 'Concurrency conflict detected') { + super(message, 'CONCURRENCY_CONFLICT', HttpStatus.CONFLICT); + this.name = 'ConcurrencyException'; + } +} + +@Catch() +export class DomainExceptionFilter implements ExceptionFilter { + private readonly logger = new Logger(DomainExceptionFilter.name); + + catch(exception: unknown, host: ArgumentsHost) { + const ctx = host.switchToHttp(); + const response = ctx.getResponse(); + const request = ctx.getRequest(); + + let status = HttpStatus.INTERNAL_SERVER_ERROR; + let code = 'INTERNAL_ERROR'; + let message = 'Internal server error'; + let details: any = null; + + if (exception instanceof DomainException) { + status = exception.httpStatus; + code = exception.code; + message = exception.message; + } else if (exception instanceof HttpException) { + status = exception.getStatus(); + const exceptionResponse = exception.getResponse(); + + if (typeof exceptionResponse === 'object' && exceptionResponse !== null) { + message = (exceptionResponse as any).message || exception.message; + code = (exceptionResponse as any).error?.toUpperCase().replace(/ /g, '_') || 'HTTP_ERROR'; + details = (exceptionResponse as any).details; + } else { + message = exception.message; + code = 'HTTP_ERROR'; + } + } else if (exception instanceof Error) { + message = exception.message; + this.logger.error(`Unhandled exception: ${exception.message}`, exception.stack); + } + + const errorResponse = { + success: false, + error: { + code, + message: Array.isArray(message) ? message : [message], + details, + }, + timestamp: new Date().toISOString(), + path: request.url, + method: request.method, + }; + + response.status(status).json(errorResponse); + } +} diff --git a/backend/services/contribution-service/src/shared/filters/http-exception.filter.ts b/backend/services/contribution-service/src/shared/filters/http-exception.filter.ts new file mode 100644 index 00000000..ec612f4a --- /dev/null +++ b/backend/services/contribution-service/src/shared/filters/http-exception.filter.ts @@ -0,0 +1,50 @@ +import { + ExceptionFilter, + Catch, + ArgumentsHost, + HttpException, + HttpStatus, + Logger, +} from '@nestjs/common'; +import { Request, Response } from 'express'; + +@Catch() +export class GlobalExceptionFilter implements ExceptionFilter { + private readonly logger = new Logger(GlobalExceptionFilter.name); + + catch(exception: unknown, host: ArgumentsHost) { + const ctx = host.switchToHttp(); + const response = ctx.getResponse(); + const request = ctx.getRequest(); + + let status = HttpStatus.INTERNAL_SERVER_ERROR; + let message = 'Internal server error'; + let error = 'Internal Server Error'; + + if (exception instanceof HttpException) { + status = exception.getStatus(); + const exceptionResponse = exception.getResponse(); + + if (typeof exceptionResponse === 'object' && exceptionResponse !== null) { + message = (exceptionResponse as any).message || exception.message; + error = (exceptionResponse as any).error || 'Error'; + } else { + message = exception.message; + } + } else if (exception instanceof Error) { + message = exception.message; + this.logger.error(`Unhandled exception: ${exception.message}`, exception.stack); + } + + const errorResponse = { + statusCode: status, + timestamp: new Date().toISOString(), + path: request.url, + method: request.method, + error, + message: Array.isArray(message) ? message : [message], + }; + + response.status(status).json(errorResponse); + } +} diff --git a/backend/services/contribution-service/src/shared/guards/jwt-auth.guard.ts b/backend/services/contribution-service/src/shared/guards/jwt-auth.guard.ts new file mode 100644 index 00000000..2892f3d4 --- /dev/null +++ b/backend/services/contribution-service/src/shared/guards/jwt-auth.guard.ts @@ -0,0 +1,83 @@ +import { + Injectable, + CanActivate, + ExecutionContext, + UnauthorizedException, + SetMetadata, +} from '@nestjs/common'; +import { Reflector } from '@nestjs/core'; +import { ConfigService } from '@nestjs/config'; +import * as jwt from 'jsonwebtoken'; + +export const IS_PUBLIC_KEY = 'isPublic'; +export const Public = () => SetMetadata(IS_PUBLIC_KEY, true); + +export interface JwtPayload { + sub: string; + accountSequence: string; + type: 'access' | 'refresh'; + iat: number; + exp: number; +} + +@Injectable() +export class JwtAuthGuard implements CanActivate { + constructor( + private reflector: Reflector, + private configService: ConfigService, + ) {} + + canActivate(context: ExecutionContext): boolean { + // 检查是否标记为公开接口 + const isPublic = this.reflector.getAllAndOverride(IS_PUBLIC_KEY, [ + context.getHandler(), + context.getClass(), + ]); + + if (isPublic) { + return true; + } + + const request = context.switchToHttp().getRequest(); + const token = this.extractTokenFromHeader(request); + + if (!token) { + throw new UnauthorizedException('No token provided'); + } + + try { + const secret = this.configService.get('JWT_SECRET', 'default-secret'); + const payload = jwt.verify(token, secret) as JwtPayload; + + if (payload.type !== 'access') { + throw new UnauthorizedException('Invalid token type'); + } + + // 将用户信息附加到请求对象 + request.user = { + userId: payload.sub, + accountSequence: payload.accountSequence, + }; + + return true; + } catch (error) { + if (error instanceof jwt.TokenExpiredError) { + throw new UnauthorizedException('Token expired'); + } + if (error instanceof jwt.JsonWebTokenError) { + throw new UnauthorizedException('Invalid token'); + } + throw new UnauthorizedException('Authentication failed'); + } + } + + private extractTokenFromHeader(request: any): string | null { + const authHeader = request.headers.authorization; + if (!authHeader) { + return null; + } + + const [type, token] = authHeader.split(' '); + return type === 'Bearer' ? token : null; + } +} diff --git a/backend/services/contribution-service/src/shared/interceptors/logging.interceptor.ts b/backend/services/contribution-service/src/shared/interceptors/logging.interceptor.ts new file mode 100644 index 00000000..43124d8a --- /dev/null +++ b/backend/services/contribution-service/src/shared/interceptors/logging.interceptor.ts @@ -0,0 +1,35 @@ +import { + Injectable, + NestInterceptor, + ExecutionContext, + CallHandler, + Logger, +} from '@nestjs/common'; +import { Observable } from 'rxjs'; +import { tap } from 'rxjs/operators'; + +@Injectable() +export class LoggingInterceptor implements NestInterceptor { + private readonly logger = new Logger('HTTP'); + + intercept(context: ExecutionContext, next: CallHandler): Observable { + const request = context.switchToHttp().getRequest(); + const { method, url, body, query } = request; + const startTime = Date.now(); + + return next.handle().pipe( + tap({ + next: () => { + const responseTime = Date.now() - startTime; + this.logger.log(`${method} ${url} ${responseTime}ms`); + }, + error: (error) => { + const responseTime = Date.now() - startTime; + this.logger.error( + `${method} ${url} ${responseTime}ms - Error: ${error.message}`, + ); + }, + }), + ); + } +} diff --git a/backend/services/contribution-service/src/shared/interceptors/transform.interceptor.ts b/backend/services/contribution-service/src/shared/interceptors/transform.interceptor.ts new file mode 100644 index 00000000..9940e88f --- /dev/null +++ b/backend/services/contribution-service/src/shared/interceptors/transform.interceptor.ts @@ -0,0 +1,27 @@ +import { + Injectable, + NestInterceptor, + ExecutionContext, + CallHandler, +} from '@nestjs/common'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +export interface ApiResponse { + success: boolean; + data: T; + timestamp: string; +} + +@Injectable() +export class TransformInterceptor implements NestInterceptor> { + intercept(context: ExecutionContext, next: CallHandler): Observable> { + return next.handle().pipe( + map((data) => ({ + success: true, + data, + timestamp: new Date().toISOString(), + })), + ); + } +} diff --git a/backend/services/contribution-service/tsconfig.json b/backend/services/contribution-service/tsconfig.json new file mode 100644 index 00000000..bd3c3946 --- /dev/null +++ b/backend/services/contribution-service/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": true, + "noImplicitAny": true, + "strictBindCallApply": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "paths": { + "@/*": ["src/*"] + } + } +}