diff --git a/.gitignore b/.gitignore index 7985c8f..c83044d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,9 @@ pnpm-debug.log* lerna-debug.log* /backend/node_modules -/frontend/dist +# /frontend/dist /backend/.env +/frontend/.env dist-ssr *.local diff --git a/BACKEND_INTEGRATION.md b/BACKEND_INTEGRATION.md new file mode 100644 index 0000000..363df1b --- /dev/null +++ b/BACKEND_INTEGRATION.md @@ -0,0 +1,242 @@ +# Backend Integration Summary + +This document summarizes all the backend endpoints and integrations that have been implemented to support the frontend features. + +## ✅ Completed Integrations + +### 1. Settings Page (`/settings`) + +**Backend Endpoints:** +- `POST /settings/get` - Get user settings +- `POST /settings/update` - Update user settings + +**Controller:** `SettingsController.js` +- `getSettings()` - Retrieves or creates default settings for user +- `updateSettings()` - Updates user settings with validation + +**Route:** `SettingsRoute.js` +- Protected routes (requires authentication via `verifyToken`) + +**Frontend Integration:** +- `Settings.jsx` already uses these endpoints +- Loads settings on mount +- Saves settings on button click + +--- + +### 2. Search Functionality (Navbar) + +**Backend Endpoint:** +- `POST /search/users` - Search for users + +**Controller:** `SearchController.js` +- `searchUsers()` - Searches users by username or name +- Filters results based on user settings (isPublic + allowSearch) +- Returns only searchable profiles +- Includes profile images + +**Route:** `SearchRoute.js` +- Public route (no authentication required) + +**Frontend Integration:** +- `Nav.jsx` already uses `/search/users` endpoint +- Debounced search (300ms) +- Shows results in dropdown +- Click to visit profile + +--- + +### 3. Profile Preview (`/profile/:username`) + +**Backend Endpoint:** +- `POST /profile/getpublicprofile` - Get public profile data + +**Controller:** `ProfileController.js` +- `getPublicProfile()` - Returns public profile with: + - Profile information (filtered by settings) + - Only public links + - Settings for display control + - Stats (if enabled) + +**Route:** `ProfileRoute.js` +- Public route (no authentication required) + +**Frontend Integration:** +- `ProfilePreview.jsx` already uses `/profile/getpublicprofile` +- Respects all visibility settings +- Shows only public links +- Displays stats based on settings + +--- + +### 4. Link Visibility Controls + +**Backend Endpoint:** +- `POST /source/updatevisibility` - Update link visibility + +**Controller:** `LinkController.js` +- `updateVisibility()` - Updates link visibility (public/unlisted/private) +- Handles password hashing for unlisted links +- Validates user ownership +- Clears password for public/private links + +**Route:** `LinkRoute.js` +- Protected route (requires authentication) + +**Frontend Integration:** +- `Linkcard.jsx` already uses `/source/updatevisibility` +- Dropdown menu for visibility selection +- Updates Redux state on success +- Visual indicators for visibility status + +--- + +### 5. Link Model Enhancements + +**Changes:** +- Added `linkId` field (unique, required) - Generated automatically +- Added `visibility` field (enum: public/unlisted/private) +- Added `password` field (for unlisted links) +- Added `deletedAt` field (soft delete) +- Pre-save hook to generate `linkId` if missing + +**Controller Updates:** +- `addNewSource()` - Generates `linkId` when creating links +- `getAllSource()` - Returns `visibility` and `linkId` fields +- Filters out deleted links (`deletedAt: null`) + +--- + +## 📋 API Endpoints Reference + +### Settings Endpoints + +``` +POST /settings/get +Body: { username?: string } +Response: { success: boolean, settings: UserSettings } +Auth: Required + +POST /settings/update +Body: { username, profile?, links?, search?, privacy?, notifications? } +Response: { success: boolean, settings: UserSettings } +Auth: Required +``` + +### Search Endpoints + +``` +POST /search/users +Body: { query: string } +Response: { success: boolean, results: User[] } +Auth: Not required (public) +``` + +### Profile Endpoints + +``` +POST /profile/getpublicprofile +Body: { username: string } +Response: { success: boolean, profile, links, settings, stats } +Auth: Not required (public) +``` + +### Link Endpoints + +``` +POST /source/updatevisibility +Body: { id: string, visibility: 'public'|'unlisted'|'private', password?: string } +Response: { success: boolean, link: Link } +Auth: Required +``` + +--- + +## 🔒 Security Features + +1. **Authentication**: All user-specific endpoints require JWT token +2. **Authorization**: Users can only modify their own data +3. **Password Hashing**: Unlisted link passwords are hashed with bcrypt +4. **Input Validation**: All endpoints validate required fields +5. **Privacy Controls**: Profile visibility respects user settings + +--- + +## 🗄️ Database Models Used + +1. **UserSettings** - Privacy and visibility settings +2. **User** - User authentication and basic info +3. **UserProfile** - Extended profile information +4. **Link** - Link data with visibility controls + +--- + +## 🔄 Data Flow + +### Settings Flow +1. User opens Settings page +2. Frontend calls `GET /settings/get` +3. Backend returns or creates default settings +4. User modifies settings +5. Frontend calls `POST /settings/update` +6. Backend updates and saves settings + +### Search Flow +1. User types in search box +2. Frontend debounces and calls `POST /search/users` +3. Backend searches users and filters by settings +4. Backend returns searchable profiles +5. Frontend displays results in dropdown + +### Profile Preview Flow +1. Visitor navigates to `/profile/:username` +2. Frontend calls `POST /profile/getpublicprofile` +3. Backend checks if profile is public +4. Backend returns profile data with only public links +5. Frontend displays based on visibility settings + +### Link Visibility Flow +1. User clicks visibility button on link card +2. User selects new visibility (public/unlisted/private) +3. Frontend calls `POST /source/updatevisibility` +4. Backend validates ownership and updates +5. Frontend updates Redux state + +--- + +## 🐛 Error Handling + +All endpoints include proper error handling: +- 400: Bad Request (missing/invalid data) +- 401: Unauthorized (authentication required) +- 403: Forbidden (insufficient permissions) +- 404: Not Found (resource doesn't exist) +- 500: Internal Server Error + +--- + +## 📝 Notes + +1. **linkId Generation**: Automatically generated using crypto.randomBytes() +2. **Default Settings**: Created automatically on first access +3. **Search Privacy**: Only shows profiles with `isPublic=true` AND `allowSearch=true` +4. **Link Visibility**: Default is 'public' for new links +5. **Soft Deletes**: All models support soft deletes via `deletedAt` field + +--- + +## ✅ Testing Checklist + +- [x] Settings page loads and saves correctly +- [x] Search functionality works with privacy settings +- [x] Profile preview respects all visibility settings +- [x] Link visibility can be changed +- [x] Only public links show in profile preview +- [x] Authentication required for protected endpoints +- [x] Error handling works correctly +- [x] linkId is generated for new links + +--- + +**Last Updated**: 2024-12-XX +**Status**: ✅ All endpoints implemented and wired up diff --git a/DEPLOYMENT_FIXES.md b/DEPLOYMENT_FIXES.md deleted file mode 100644 index 1208983..0000000 --- a/DEPLOYMENT_FIXES.md +++ /dev/null @@ -1,103 +0,0 @@ -# EC2 Deployment Issues - Fixed - -## Issues Found: - -### 1. **Nginx Location Block Order** ❌ - - - **Problem**: The `location /` block was catching all requests, including `/app`, before the more specific `/app` location could be matched. - - - **Fix**: Reordered location blocks so `/app` comes first with `^~` prefix, and backend routes are more specific. - -### 2. **API Base URL Configuration** ❌ - - **Problem**: `VITE_API_URL` was set to `http://backend:8080` (internal Docker network), but browser requests need the public URL. - - **Fix**: Changed to `https://clickly.cv` in docker-compose.yml and updated api.js to use environment variable with fallback. - -### 3. **Vite Dev Server Proxy Configuration** ⚠️ - - **Problem**: Vite dev server needs proper proxy headers for HMR (Hot Module Replacement). - - **Fix**: Added proper proxy headers including Upgrade and Connection for WebSocket support. - -## Changes Made: - -### nginx/nginx.conf -- Reordered location blocks: `/app` first, then specific backend routes -- Added Vite HMR support with proper timeout settings -- Added specific regex patterns for username routes -- Root path now redirects to `/app/` - -### frontend/src/utils/api.js -- Now uses `import.meta.env.VITE_API_URL` with fallback -- Added `withCredentials: true` for cookie support - -### docker-compose.yml -- Changed `VITE_API_URL` from `http://backend:8080` to `https://clickly.cv` - -## Deployment Steps on EC2: - -1. **Pull the latest changes:** - ```bash - git pull - ``` - -2. **Restart Docker containers:** - ```bash - docker-compose down - docker-compose up -d --build - ``` - -3. **Check nginx logs if issues persist:** - ```bash - docker logs nginx - docker logs frontend - docker logs backend - ``` - -4. **Verify SSL certificates exist:** - ```bash - sudo ls -la /etc/letsencrypt/live/clickly.cv/ - ``` - -5. **If certificates don't exist, generate them:** - ```bash - ./generate-cert.sh - ``` - -## Testing: - -1. **Frontend should be accessible at:** - - `https://clickly.cv/app/` - - `https://www.clickly.cv/app/` - -2. **Backend API should work at:** - - `https://clickly.cv/auth/...` - - `https://clickly.cv/source/...` - -3. **User profiles should work at:** - - `https://clickly.cv/username` - - `https://clickly.cv/username/source` - -## Troubleshooting: - -If frontend still not accessible: - -1. **Check if frontend container is running:** - ```bash - docker ps | grep frontend - ``` - -2. **Check frontend logs:** - ```bash - docker logs frontend - ``` - -3. **Test nginx configuration:** - ```bash - docker exec nginx nginx -t - ``` - -4. **Check if port 443 is open in EC2 security group** - -5. **Verify DNS is pointing to EC2 IP:** - ```bash - dig clickly.cv - ``` - diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md new file mode 100644 index 0000000..fd70dec --- /dev/null +++ b/DOCUMENTATION.md @@ -0,0 +1,199 @@ +# All in1 url Documentation Index + +This document provides an overview of all documentation available in the All in1 url project. + +## 📚 Documentation Structure + +### Frontend Documentation + +**Location**: `/frontend/docs/` + +- **[PAGES.md](./frontend/docs/PAGES.md)** - Comprehensive documentation about all page components + - Page descriptions and features + - Routing information + - Design patterns + - Light & dark mode guidelines + - Component dependencies + - Responsive design notes + +- **[README.md](./frontend/docs/README.md)** - Quick reference guide for frontend + - Page routes table + - Key features overview + - Design system + - Development guidelines + +- **[CHANGELOG.md](./frontend/CHANGELOG.md)** - Frontend change history + - All feature additions + - Bug fixes + - UI/UX improvements + - Breaking changes + +### Backend Documentation + +**Location**: `/backend/doc/` + +- **[README.md](./backend/doc/README.md)** - Database models overview + - Model relationships + - Common patterns + - Best practices + - Query examples + +- **[linkModel.md](./backend/doc/linkModel.md)** - Link model documentation +- **[linkAnalyticsModel.md](./backend/doc/linkAnalyticsModel.md)** - Analytics model documentation +- **[userModel.md](./backend/doc/userModel.md)** - User model documentation +- **[userProfile.md](./backend/doc/userProfile.md)** - User Profile model documentation +- **[userSettingsModel.md](./backend/doc/userSettingsModel.md)** - User Settings model documentation +- **[otpModel.md](./backend/doc/otpModel.md)** - OTP model documentation + +- **[CHANGELOG.md](./backend/CHANGELOG.md)** - Backend change history + - Model changes + - API endpoint additions + - Database schema updates + +## 🎯 Quick Links + +### For Developers + +- **Getting Started**: See [README.md](./README.md#-getting-started) +- **Frontend Pages**: See [frontend/docs/PAGES.md](./frontend/docs/PAGES.md) +- **Database Models**: See [backend/doc/README.md](./backend/doc/README.md) +- **API Endpoints**: See backend controllers (to be documented) + +### For Users + +- **User Guide**: See [Documentation Component](./frontend/src/components/Documentation.jsx) +- **Features**: See [README.md](./README.md#-features) + +## 📖 Documentation Standards + +All documentation follows these standards: + +1. **Markdown Format**: All docs use Markdown for easy reading +2. **Code Examples**: Include practical usage examples +3. **Field Descriptions**: Explain purpose and usage of each field +4. **Enum Values**: Document all possible enum values +5. **Required/Optional**: Explain why fields are required or optional +6. **Light/Dark Mode**: Document both mode behaviors +7. **Responsive Design**: Note mobile/tablet/desktop differences + +## 🔄 Keeping Documentation Updated + +When making changes: + +1. **Update CHANGELOG**: Add entry to appropriate CHANGELOG.md +2. **Update Model Docs**: If model changes, update corresponding .md file +3. **Update Page Docs**: If page changes, update PAGES.md +4. **Update README**: If major features added, update main README.md + +## 📝 Documentation Checklist + +When adding new features: + +- [ ] Update relevant CHANGELOG.md +- [ ] Update model documentation if database changes +- [ ] Update PAGES.md if new page added +- [ ] Add code comments for complex logic +- [ ] Update README.md if major feature +- [ ] Add usage examples +- [ ] Document light/dark mode behavior +- [ ] Note responsive design considerations + +## 🎨 Design Documentation + +### Color Scheme + +**Light Mode**: +- Primary: Purple (#9333EA), Pink (#EC4899), Blue (#3B82F6) +- Background: White, Gray-50 +- Text: Gray-900, Gray-700 +- Cards: White/80, White/90 + +**Dark Mode**: +- Primary: Purple (#A855F7), Pink (#F472B6), Blue (#60A5FA) +- Background: Gray-900, Gray-800 +- Text: White, Gray-300 +- Cards: Gray-900/50, Gray-800/50 + +### Typography + +- Headings: Bold, gradient text +- Body: Regular weight +- Code: Monospace font +- Sizes: Responsive (text-sm to text-5xl) + +### Spacing + +- Consistent padding: p-4, p-6, p-8 +- Gap spacing: gap-3, gap-4, gap-6 +- Margin: mb-4, mb-6, mb-8 + +## 🚀 API Documentation + +API endpoints are documented in: +- Backend controllers (inline comments) +- Frontend API calls (usage examples) +- Model documentation (data structures) + +**Note**: Comprehensive API documentation file coming soon. + +## 📱 Responsive Breakpoints + +- **Mobile**: < 640px (sm) +- **Tablet**: 640px - 1024px (md) +- **Desktop**: > 1024px (lg) + +## 🔍 Search Functionality + +**Desktop**: Full search input always visible +**Mobile**: Search icon button, expands to input when clicked + +## 🎯 Key Features Documentation + +- **Link Visibility**: See [linkModel.md](./backend/doc/linkModel.md#visibility) +- **User Settings**: See [userSettingsModel.md](./backend/doc/userSettingsModel.md) +- **Analytics**: See [linkAnalyticsModel.md](./backend/doc/linkAnalyticsModel.md) +- **Profile Preview**: See [PAGES.md](./frontend/docs/PAGES.md#6-profilepreview) + +## 💡 Tips for Contributors + +1. **Read First**: Check existing documentation before adding new features +2. **Follow Patterns**: Use existing documentation as templates +3. **Be Detailed**: Include examples and use cases +4. **Update Both**: Update both frontend and backend docs if needed +5. **Test Examples**: Ensure code examples work +6. **Check Formatting**: Use consistent Markdown formatting + +## 📞 Questions? + +- Check existing documentation first +- Review code comments +- See examples in model documentation +- Check CHANGELOG for recent changes + +--- + +## 📊 Analytics Features + +### Comprehensive Analytics Dashboard +- **Multiple Metrics**: Profile visits, click counts, location, OS, browser, device, referrer, hourly, day of week, platform, and link-based analytics +- **Visualization Types**: Line charts, bar charts, area charts, and pie charts +- **Time Ranges**: 7 days, 30 days, 90 days, 1 year, or all time +- **Summary Cards**: Total clicks, profile visits, unique countries, top referrer +- **Detailed Breakdowns**: Referrer categories, device types, browsers, operating systems, geographic distribution, hourly patterns, day of week patterns +- **Theme Support**: Full dark and light theme support with proper text contrast + +### Analytics Data Points +- **Click Tracking**: Real-time click counts with date-based trends +- **Geographic Data**: Country-level location distribution +- **Device Types**: Desktop, Mobile, Tablet breakdown +- **Browsers**: Chrome, Safari, Firefox, Edge, and more +- **Operating Systems**: Windows, macOS, Linux, iOS, Android +- **Referrers**: Categorized as Direct, Search, Social, Internal, or External +- **Temporal Patterns**: Hourly distribution and day-of-week analysis +- **Platform Performance**: Individual platform click metrics +- **Link Performance**: Per-link analytics and statistics + +--- + +**Last Updated**: 2024-12-XX +**Maintained By**: All in1 url Development Team diff --git a/LINKEDIN_POST.md b/LINKEDIN_POST.md new file mode 100644 index 0000000..03dacf9 --- /dev/null +++ b/LINKEDIN_POST.md @@ -0,0 +1,32 @@ +# LinkedIn Post Caption + +**Transform your digital presence with All in1 url - the smart way to manage all your social profiles in one place.** + +Stop juggling multiple long, forgettable links across your resume, business cards, and social media. All in1 url creates personalized, memorable links that work forever and update everywhere automatically. + +**Why professionals choose All in1 url:** +✅ **Get your own FREE domain** - Your personalized subdomain (yourname.allin1url.in) that reflects your brand +✅ **Memorable link format** - Clean URLs like yourname.allin1url.in/platform (not random codes!) +✅ **Centralized management** - Update once, changes reflect everywhere instantly +✅ **Advanced analytics** - Track clicks with detailed insights (location, device, browser, referrer) +✅ **Click details dashboard** - See exactly who clicked, when, and from where +✅ **Smart notifications** - Get email alerts for link clicks, profile views, and weekly reports +✅ **Link privacy controls** - Public, unlisted, or password-protected private links +✅ **Password protection** - Secure sensitive links with password authentication +✅ **Never expires** - Your links work forever, no subscription required +✅ **Completely free** - No hidden fees, no premium plans, open source forever + +Perfect for professionals, content creators, and anyone managing multiple online profiles. Create your personalized link hub today and simplify your digital identity. + +Try it free: allin1url.in + +--- + +**I'd love to hear from you!** 💬 + +Have you tried All in1 url? What do you think? Whether it's positive feedback, constructive criticism, feature suggestions, or ideas for improvement - I welcome all input. Your feedback helps make All in1 url better for everyone. + +Drop a comment below or reach out directly. Let's build something amazing together! 🚀 + +#DigitalPresence #LinkManagement #ProfessionalBranding #SocialMedia #OpenSource #Analytics #Privacy + diff --git a/LinkBridger.postman_collection.json b/LinkBridger.postman_collection.json new file mode 100644 index 0000000..7f433c0 --- /dev/null +++ b/LinkBridger.postman_collection.json @@ -0,0 +1,804 @@ +{ + "info": { + "_postman_id": "All in1 url-api-collection", + "name": "All in1 url API Collection", + "description": "Complete API collection for All in1 url application. Includes all authentication, links, profile, settings, and search endpoints.", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Authentication", + "item": [ + { + "name": "Send OTP (Signup)", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if (pm.response.code === 201) {", + " pm.environment.set(\"email\", pm.request.body.raw ? JSON.parse(pm.request.body.raw).email : \"\");", + "}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"user@example.com\",\n \"username\": \"testuser\"\n}" + }, + "url": { + "raw": "{{base_url}}/auth/signup", + "host": [ + "{{base_url}}" + ], + "path": [ + "auth", + "signup" + ] + }, + "description": "Send OTP to email for account verification during signup. Username is optional." + }, + "response": [] + }, + { + "name": "Verify Account (Complete Signup)", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"{{email}}\",\n \"username\": \"testuser\",\n \"password\": \"password123\",\n \"otp\": \"1234\"\n}" + }, + "url": { + "raw": "{{base_url}}/auth/verifyacc", + "host": [ + "{{base_url}}" + ], + "path": [ + "auth", + "verifyacc" + ] + }, + "description": "Complete signup by verifying OTP. Requires email, username (min 5 chars), password, and OTP." + }, + "response": [] + }, + { + "name": "Sign In", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "if (pm.response.code === 200) {", + " const response = pm.response.json();", + " if (response.user) {", + " pm.environment.set(\"username\", response.user.username);", + " pm.environment.set(\"userId\", response.user._id);", + " }", + "}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"user@example.com\",\n \"password\": \"password123\"\n}" + }, + "url": { + "raw": "{{base_url}}/auth/signin", + "host": [ + "{{base_url}}" + ], + "path": [ + "auth", + "signin" + ] + }, + "description": "Sign in with email and password. Token is stored in cookies automatically." + }, + "response": [] + }, + { + "name": "Verify Token (Get User Info)", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}", + "description": "Token from signin cookie" + } + ], + "url": { + "raw": "{{base_url}}/auth/verify", + "host": [ + "{{base_url}}" + ], + "path": [ + "auth", + "verify" + ] + }, + "description": "Verify authentication token and get user information. Requires valid token in cookies." + }, + "response": [] + }, + { + "name": "Check Username Availability", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"testuser\"\n}" + }, + "url": { + "raw": "{{base_url}}/auth/checkavailablity", + "host": [ + "{{base_url}}" + ], + "path": [ + "auth", + "checkavailablity" + ] + }, + "description": "Check if username is available. Returns status 209 if exists, 200 if available." + }, + "response": [] + }, + { + "name": "Sign Out", + "request": { + "method": "GET", + "header": [ + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "url": { + "raw": "{{base_url}}/auth/signout", + "host": [ + "{{base_url}}" + ], + "path": [ + "auth", + "signout" + ] + }, + "description": "Sign out and clear authentication cookie." + }, + "response": [] + }, + { + "name": "Password Reset - Send OTP", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"user@example.com\"\n}" + }, + "url": { + "raw": "{{base_url}}/auth/password_reset", + "host": [ + "{{base_url}}" + ], + "path": [ + "auth", + "password_reset" + ] + }, + "description": "Send OTP to email for password reset." + }, + "response": [] + }, + { + "name": "Password Reset - Validate OTP & Change Password", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"{{email}}\",\n \"otp\": \"1234\",\n \"password\": \"newpassword123\"\n}" + }, + "url": { + "raw": "{{base_url}}/auth/validate_otp", + "host": [ + "{{base_url}}" + ], + "path": [ + "auth", + "validate_otp" + ] + }, + "description": "Validate OTP and change password. OTP is deleted after successful validation." + }, + "response": [] + } + ], + "description": "Authentication endpoints for user signup, signin, verification, and password reset." + }, + { + "name": "Links", + "item": [ + { + "name": "Add New Source", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"{{username}}\",\n \"source\": \"linkedin\",\n \"destination\": \"https://linkedin.com/in/username\"\n}" + }, + "url": { + "raw": "{{base_url}}/source/addnewsource", + "host": [ + "{{base_url}}" + ], + "path": [ + "source", + "addnewsource" + ] + }, + "description": "Add a new link/source. Source is normalized to lowercase. Requires authentication." + }, + "response": [] + }, + { + "name": "Get All Sources", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"{{username}}\"\n}" + }, + "url": { + "raw": "{{base_url}}/source/getallsource", + "host": [ + "{{base_url}}" + ], + "path": [ + "source", + "getallsource" + ] + }, + "description": "Get all links/sources for a user. Returns source, destination, clicked, notSeen, visibility, and linkId. Requires authentication." + }, + "response": [] + }, + { + "name": "Edit Link", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"link_id_here\",\n \"source\": \"linkedin\",\n \"destination\": \"https://linkedin.com/in/newusername\"\n}" + }, + "url": { + "raw": "{{base_url}}/source/editlink", + "host": [ + "{{base_url}}" + ], + "path": [ + "source", + "editlink" + ] + }, + "description": "Edit an existing link. Source and destination are optional. Requires authentication and ownership." + }, + "response": [] + }, + { + "name": "Delete Link", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"link_id_here\"\n}" + }, + "url": { + "raw": "{{base_url}}/source/deletelink", + "host": [ + "{{base_url}}" + ], + "path": [ + "source", + "deletelink" + ] + }, + "description": "Delete a link by ID. Requires authentication." + }, + "response": [] + }, + { + "name": "Set Notifications to Zero", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "url": { + "raw": "{{base_url}}/source/notifications", + "host": [ + "{{base_url}}" + ], + "path": [ + "source", + "notifications" + ] + }, + "description": "Reset all notification counts (notSeen) to zero for all user's links. Requires authentication." + }, + "response": [] + }, + { + "name": "Update Link Visibility", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"link_id_here\",\n \"visibility\": \"public\",\n \"password\": \"optional_password_for_unlisted\"\n}" + }, + "url": { + "raw": "{{base_url}}/source/updatevisibility", + "host": [ + "{{base_url}}" + ], + "path": [ + "source", + "updatevisibility" + ] + }, + "description": "Update link visibility. Options: 'public', 'unlisted', 'private'. Password required for 'unlisted'. Requires authentication." + }, + "response": [] + } + ], + "description": "Link management endpoints for adding, editing, deleting, and managing link visibility." + }, + { + "name": "Profile", + "item": [ + { + "name": "Update Profile", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"{{username}}\",\n \"name\": \"John Doe\",\n \"location\": \"New York, USA\",\n \"bio\": \"Software Developer\",\n \"passion\": \"Coding\"\n}" + }, + "url": { + "raw": "{{base_url}}/profile/update", + "host": [ + "{{base_url}}" + ], + "path": [ + "profile", + "update" + ] + }, + "description": "Update user profile information. All fields are optional and will be set to empty strings if not provided." + }, + "response": [] + }, + { + "name": "Get Profile Info", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"{{username}}\"\n}" + }, + "url": { + "raw": "{{base_url}}/profile/getprofileinfo", + "host": [ + "{{base_url}}" + ], + "path": [ + "profile", + "getprofileinfo" + ] + }, + "description": "Get profile information for a user by username." + }, + "response": [] + }, + { + "name": "Update Profile Picture", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"{{username}}\",\n \"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\"\n}" + }, + "url": { + "raw": "{{base_url}}/profile/updatepic", + "host": [ + "{{base_url}}" + ], + "path": [ + "profile", + "updatepic" + ] + }, + "description": "Update profile picture. Image should be base64 encoded data URL. Image is uploaded to Cloudinary." + }, + "response": [] + }, + { + "name": "Get Public Profile", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"testuser\"\n}" + }, + "url": { + "raw": "{{base_url}}/profile/getpublicprofile", + "host": [ + "{{base_url}}" + ], + "path": [ + "profile", + "getpublicprofile" + ] + }, + "description": "Get public profile information. Returns profile data, public links, settings, and stats based on user's privacy settings. No authentication required." + }, + "response": [] + } + ], + "description": "Profile management endpoints for updating and retrieving user profile information." + }, + { + "name": "Settings", + "item": [ + { + "name": "Get Settings", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"{{username}}\"\n}" + }, + "url": { + "raw": "{{base_url}}/settings/get", + "host": [ + "{{base_url}}" + ], + "path": [ + "settings", + "get" + ] + }, + "description": "Get user settings. Username is optional - if not provided, uses authenticated user's ID. Requires authentication." + }, + "response": [] + }, + { + "name": "Update Settings", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"{{username}}\",\n \"profile\": {\n \"isPublic\": true,\n \"allowProfileView\": true,\n \"showProfileImage\": true,\n \"showBio\": true,\n \"showLocation\": true,\n \"showPassion\": true\n },\n \"links\": {\n \"showLinkCount\": true,\n \"showClickStats\": true\n },\n \"search\": {\n \"allowSearch\": true,\n \"searchKeywords\": [\"developer\", \"coder\"]\n },\n \"privacy\": {\n \"hideEmail\": true,\n \"hideUsername\": false\n },\n \"notifications\": {\n \"emailNotifications\": true,\n \"visitNotifications\": true\n }\n}" + }, + "url": { + "raw": "{{base_url}}/settings/update", + "host": [ + "{{base_url}}" + ], + "path": [ + "settings", + "update" + ] + }, + "description": "Update user settings. You can update any section (profile, links, search, privacy, notifications) independently. Requires authentication." + }, + "response": [] + } + ], + "description": "User settings endpoints for managing privacy, visibility, and notification preferences." + }, + { + "name": "Search", + "item": [ + { + "name": "Search Users", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"query\": \"test\"\n}" + }, + "url": { + "raw": "{{base_url}}/search/users", + "host": [ + "{{base_url}}" + ], + "path": [ + "search", + "users" + ] + }, + "description": "Search for users by username or name. Only returns users who have isPublic=true and allowSearch=true in their settings. No authentication required. Returns up to 20 results." + }, + "response": [] + } + ], + "description": "Search endpoints for finding users." + }, + { + "name": "Public Routes", + "item": [ + { + "name": "Get User Link Tree", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/:username", + "host": [ + "{{base_url}}" + ], + "path": [ + ":username" + ], + "variable": [ + { + "key": "username", + "value": "testuser", + "description": "Username to get link tree for" + } + ] + }, + "description": "Get user's link tree page. Renders EJS template with all user links. Sends visit notification email. No authentication required." + }, + "response": [] + }, + { + "name": "Redirect to Source", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/:username/:source", + "host": [ + "{{base_url}}" + ], + "path": [ + ":username", + ":source" + ], + "variable": [ + { + "key": "username", + "value": "testuser", + "description": "Username" + }, + { + "key": "source", + "value": "linkedin", + "description": "Source/platform name" + } + ] + }, + "description": "Redirect to destination URL for a specific source. Increments click and notSeen counters. Sends visit notification email. No authentication required." + }, + "response": [] + } + ], + "description": "Public routes that don't require authentication. Used for sharing and accessing user link trees." + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "base_url", + "value": "http://localhost:8080", + "type": "string" + }, + { + "key": "token", + "value": "", + "type": "string", + "description": "Authentication token from signin (stored in cookies)" + }, + { + "key": "username", + "value": "", + "type": "string" + }, + { + "key": "email", + "value": "", + "type": "string" + }, + { + "key": "userId", + "value": "", + "type": "string" + } + ] +} + + + + + + + + + + + diff --git a/LinkBridger_API_Environment.postman_environment.json b/LinkBridger_API_Environment.postman_environment.json new file mode 100644 index 0000000..05bf5a8 --- /dev/null +++ b/LinkBridger_API_Environment.postman_environment.json @@ -0,0 +1,48 @@ +{ + "id": "All in1 url-env", + "name": "All in1 url API Environment", + "values": [ + { + "key": "base_url", + "value": "http://localhost:8080", + "type": "default", + "enabled": true + }, + { + "key": "token", + "value": "", + "type": "secret", + "enabled": true + }, + { + "key": "username", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "email", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "userId", + "value": "", + "type": "default", + "enabled": true + } + ], + "_postman_variable_scope": "environment" +} + + + + + + + + + + + diff --git a/NAMECHEAP_DNS_SETUP.md b/NAMECHEAP_DNS_SETUP.md new file mode 100644 index 0000000..7c9a811 --- /dev/null +++ b/NAMECHEAP_DNS_SETUP.md @@ -0,0 +1,156 @@ +# Namecheap DNS TXT Record Setup - Step by Step + +## Exact Steps for Namecheap + +### Step 1: Log into Namecheap +1. Go to https://www.namecheap.com +2. Log in to your account +3. Click on **Domain List** from the left sidebar + +### Step 2: Select Your Domain +1. Find `allin1url.in` in your domain list +2. Click the **Manage** button next to it + +### Step 3: Go to Advanced DNS +1. You'll see several tabs at the top +2. Click on the **Advanced DNS** tab +3. Scroll down to the **Host Records** section + +### Step 4: Add TXT Record +1. Click the **Add New Record** button +2. A new row will appear + +### Step 5: Fill in the Record Details + +**In the new record row, fill in exactly:** + +| Field | Value | +|-------|-------| +| **Type** | Select **TXT Record** from dropdown | +| **Host** | `_acme-challenge` | +| **Value** | `xgPUGNyXbaKrC1ZSQR57af9lVwZz0Jj4UgoWTFTgLVQ` | +| **TTL** | **Automatic** (or select 300 if Automatic is not available) | + +**Important Notes:** +- ✅ **Host field**: Enter exactly `_acme-challenge` (without quotes, no spaces) +- ✅ **Value field**: Enter exactly `xgPUGNyXbaKrC1ZSQR57af9lVwZz0Jj4UgoWTFTgLVQ` (no quotes, no spaces) +- ✅ Namecheap will automatically add `.allin1url.in` to the host name +- ✅ So `_acme-challenge` becomes `_acme-challenge.allin1url.in` automatically + +### Step 6: Save the Record +1. Click the **Save All Changes** button (green checkmark icon) at the top right +2. You should see a confirmation message + +### Step 7: Verify the Record +1. After saving, scroll down to see your records +2. Look for a TXT record that shows: + - **Type**: TXT Record + - **Host**: `_acme-challenge.allin1url.in` (Namecheap shows the full name) + - **Value**: `xgPUGNyXbaKrC1ZSQR57af9lVwZz0Jj4UgoWTFTgLVQ` + +**If you see this record, it's added correctly!** + +## Visual Guide (What You Should See) + +### Before Adding: +``` +Host Records: +[Type] [Host] [Value] [TTL] +A @ 123.45.67.89 Automatic +A www 123.45.67.89 Automatic +``` + +### After Adding: +``` +Host Records: +[Type] [Host] [Value] [TTL] +A @ 123.45.67.89 Automatic +A www 123.45.67.89 Automatic +TXT _acme-challenge.allin1url.in xgPUGNyXbaKrC1ZSQR57... Automatic +``` + +## Common Mistakes to Avoid + +❌ **DON'T enter**: `_acme-challenge.allin1url.in` in the Host field +- Namecheap will create: `_acme-challenge.allin1url.in.allin1url.in` (WRONG!) + +✅ **DO enter**: `_acme-challenge` in the Host field +- Namecheap creates: `_acme-challenge.allin1url.in` (CORRECT!) + +❌ **DON'T add quotes** around the value +- Wrong: `"xgPUGNyXbaKrC1ZSQR57af9lVwZz0Jj4UgoWTFTgLVQ"` + +✅ **DO enter** the value without quotes +- Correct: `xgPUGNyXbaKrC1ZSQR57af9lVwZz0Jj4UgoWTFTgLVQ` + +## Wait for DNS Propagation + +After saving: +1. **Wait 2-5 minutes** for DNS to propagate +2. Don't press Enter in certbot yet! + +## Verify DNS is Ready + +**On your EC2 instance, run:** + +```bash +dig _acme-challenge.allin1url.in TXT +short +``` + +**Expected output:** +``` +"xgPUGNyXbaKrC1ZSQR57af9lVwZz0Jj4UgoWTFTgLVQ" +``` + +**Or use the verification script:** +```bash +./verify-dns.sh +``` + +**If you see the value above, DNS is ready!** ✅ + +## Continue with Certbot + +Once DNS is verified: +1. Go back to your EC2 terminal where certbot is waiting +2. Press **Enter** to continue +3. Certbot should now successfully verify the DNS record + +## Troubleshooting + +### Issue: Record not showing in Namecheap +- Make sure you clicked **Save All Changes** +- Refresh the page and check again +- Look in the TXT Records section + +### Issue: DNS not propagating +- Wait 5-10 minutes (can take longer) +- Try different DNS servers: `dig @8.8.8.8 _acme-challenge.allin1url.in TXT` +- Check if the record shows correctly in Namecheap dashboard + +### Issue: Wrong host name created +- If you see `_acme-challenge.allin1url.in.allin1url.in`, you entered the full name +- Delete the record and add it again with just `_acme-challenge` + +## Quick Checklist + +- [ ] Logged into Namecheap +- [ ] Went to Domain List → allin1url.in → Manage → Advanced DNS +- [ ] Added new TXT record +- [ ] Host: `_acme-challenge` (just this, no domain) +- [ ] Value: `xgPUGNyXbaKrC1ZSQR57af9lVwZz0Jj4UgoWTFTgLVQ` (exact value) +- [ ] TTL: Automatic +- [ ] Clicked Save All Changes +- [ ] Verified record shows as `_acme-challenge.allin1url.in` in dashboard +- [ ] Waited 2-5 minutes +- [ ] Verified with `dig` command +- [ ] Pressed Enter in certbot + +## Still Having Issues? + +1. Double-check the record in Namecheap dashboard +2. Make sure the Host field shows `_acme-challenge.allin1url.in` (not double domain) +3. Verify the value matches exactly (no extra spaces) +4. Wait longer (up to 10 minutes) +5. Try the verification script: `./verify-dns.sh` + diff --git a/POSTMAN_COLLECTION_README.md b/POSTMAN_COLLECTION_README.md new file mode 100644 index 0000000..0703576 --- /dev/null +++ b/POSTMAN_COLLECTION_README.md @@ -0,0 +1,249 @@ +# All in1 url API Postman Collection + +This directory contains the Postman collection and environment files for testing all All in1 url APIs. + +## Files + +- `LinkBridger_API_Collection.postman_collection.json` - Complete API collection with all endpoints +- `LinkBridger_API_Environment.postman_environment.json` - Environment variables for easy testing + +## Setup Instructions + +### 1. Import Collection and Environment + +1. Open Postman +2. Click **Import** button (top left) +3. Select both JSON files: + - `LinkBridger_API_Collection.postman_collection.json` + - `LinkBridger_API_Environment.postman_environment.json` +4. Click **Import** + +### 2. Configure Environment + +1. Select **"All in1 url API Environment"** from the environment dropdown (top right) +2. Update `base_url` if your backend is running on a different port: + - Default: `http://localhost:8080` + - Production: `https://your-production-url.com` + +### 3. Testing Authentication Flow + +1. **Sign Up Flow:** + - Run `Send OTP (Signup)` with your email and desired username + - Check your email for OTP + - Run `Verify Account (Complete Signup)` with email, username, password, and OTP + +2. **Sign In:** + - Run `Sign In` with your email and password + - The token will be automatically stored in cookies (Postman handles this) + - For manual token usage, copy the token from cookies and set it in the `token` environment variable + +3. **Using Authenticated Endpoints:** + - After signing in, all authenticated endpoints will use the cookie automatically + - If cookies don't work, manually set the `token` variable and use it in the Cookie header + +## API Endpoints Overview + +### Authentication (`/auth`) +- `POST /signup` - Send OTP for signup +- `POST /verifyacc` - Complete signup with OTP verification +- `POST /signin` - Sign in with email/password +- `POST /verify` - Verify token and get user info +- `POST /checkavailablity` - Check username availability +- `GET /signout` - Sign out +- `POST /password_reset` - Send OTP for password reset +- `POST /validate_otp` - Validate OTP and change password + +### Links (`/source`) +- `POST /addnewsource` - Add new link/source (requires auth) +- `POST /getallsource` - Get all user links (requires auth) +- `POST /editlink` - Edit existing link (requires auth) +- `POST /deletelink` - Delete link (requires auth) +- `POST /notifications` - Reset notification counts (requires auth) +- `POST /updatevisibility` - Update link visibility (requires auth) + +### Profile (`/profile`) +- `POST /update` - Update profile information +- `POST /getprofileinfo` - Get profile by username +- `POST /updatepic` - Update profile picture (base64 image) +- `POST /getpublicprofile` - Get public profile (respects privacy settings) + +### Settings (`/settings`) +- `POST /get` - Get user settings (requires auth) +- `POST /update` - Update user settings (requires auth) + +### Search (`/search`) +- `POST /users` - Search for users (public, no auth required) + +### Public Routes +- `GET /:username` - Get user's link tree page +- `GET /:username/:source` - Redirect to source destination + +## Adding New APIs + +When you add new API endpoints, follow these steps to update the collection: + +### Step 1: Add to Collection JSON + +1. Open `LinkBridger_API_Collection.postman_collection.json` +2. Find the appropriate folder (or create a new one) +3. Add a new request object following this structure: + +```json +{ + "name": "Your API Name", + "request": { + "method": "POST", // or GET, PUT, DELETE, etc. + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Cookie", + "value": "token={{token}}", // if auth required + "description": "Token from signin cookie" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"field1\": \"value1\",\n \"field2\": \"value2\"\n}" + }, + "url": { + "raw": "{{base_url}}/your/route/path", + "host": ["{{base_url}}"], + "path": ["your", "route", "path"] + }, + "description": "Description of what this API does" + }, + "response": [] +} +``` + +### Step 2: Place in Correct Folder + +- **Authentication** → Add to `"Authentication"` folder +- **Links** → Add to `"Links"` folder +- **Profile** → Add to `"Profile"` folder +- **Settings** → Add to `"Settings"` folder +- **Search** → Add to `"Search"` folder +- **New Category** → Create new folder in the `"item"` array + +### Step 3: Add Environment Variables (if needed) + +If your new API needs new environment variables: + +1. Open `LinkBridger_API_Environment.postman_environment.json` +2. Add to the `"values"` array: + +```json +{ + "key": "your_variable_name", + "value": "default_value", + "type": "default", // or "secret" for sensitive data + "enabled": true +} +``` + +3. Also add to the collection's `"variable"` array in the collection file + +### Step 4: Test and Update + +1. Import the updated collection into Postman +2. Test the new endpoint +3. Update the description if needed +4. Add example responses if helpful + +## Tips + +1. **Cookie Handling**: Postman automatically handles cookies from responses. If you need to manually set a token, use the `token` environment variable in the Cookie header. + +2. **Base64 Images**: For profile picture updates, convert your image to base64 and use the format: `data:image/png;base64,YOUR_BASE64_STRING` + +3. **Environment Variables**: Use `{{variable_name}}` syntax in URLs and request bodies to reference environment variables. + +4. **Testing Flow**: + - Always start with authentication endpoints + - Store credentials in environment variables + - Use the stored variables in subsequent requests + +5. **Error Handling**: Check response status codes: + - `200` - Success + - `201` - Created + - `400` - Bad Request + - `401` - Unauthorized + - `404` - Not Found + - `409` - Conflict + - `500` - Server Error + +## Collection Structure + +``` +All in1 url API Collection +├── Authentication +│ ├── Send OTP (Signup) +│ ├── Verify Account (Complete Signup) +│ ├── Sign In +│ ├── Verify Token (Get User Info) +│ ├── Check Username Availability +│ ├── Sign Out +│ ├── Password Reset - Send OTP +│ └── Password Reset - Validate OTP & Change Password +├── Links +│ ├── Add New Source +│ ├── Get All Sources +│ ├── Edit Link +│ ├── Delete Link +│ ├── Set Notifications to Zero +│ └── Update Link Visibility +├── Profile +│ ├── Update Profile +│ ├── Get Profile Info +│ ├── Update Profile Picture +│ └── Get Public Profile +├── Settings +│ ├── Get Settings +│ └── Update Settings +├── Search +│ └── Search Users +└── Public Routes + ├── Get User Link Tree + └── Redirect to Source +``` + +## Notes + +- All authenticated endpoints require a valid token in cookies +- The token is automatically set when you sign in (Postman handles cookies) +- For production testing, update the `base_url` environment variable +- Some endpoints may have different behaviors based on user settings (privacy, visibility, etc.) + +## Troubleshooting + +**Token not working:** +- Make sure you've signed in first +- Check that cookies are enabled in Postman settings +- Manually copy token from cookies and set in environment variable + +**CORS errors:** +- Make sure your backend CORS settings allow your Postman origin +- Check the allowed origins in `backend/index.js` + +**404 errors:** +- Verify the `base_url` is correct +- Check that the backend server is running +- Ensure the route path matches exactly + +--- + +**Last Updated**: This collection includes all APIs as of the current codebase. Update this file when adding new endpoints. + + + + + + + + + + + diff --git a/README.md b/README.md index 77fe97d..86e9254 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-# 🌉 LinkBridger +# 🌉 All in1 url ### **Personalized Social Profile Link Manager** @@ -10,13 +10,13 @@ [![MongoDB](https://img.shields.io/badge/MongoDB-Latest-brightgreen.svg)](https://www.mongodb.com/) [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/) [![Contributions Welcome](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](CONTRIBUTING.md) -[![Open Source](https://img.shields.io/badge/Open%20Source-Yes-success.svg)](https://github.com/DpkRn/LinkBridger) +[![Open Source](https://img.shields.io/badge/Open%20Source-Yes-success.svg)](https://github.com/DpkRn/All in1 url) **Transform your social media presence with memorable, personalized links that never expire** -[🚀 Live Demo](https://linkb-one.vercel.app) • [📖 Documentation](./frontend/src/components/Documentation.jsx) • [🐛 Report Bug](https://github.com/DpkRn/LinkBridger/issues) • [💡 Request Feature](https://github.com/DpkRn/LinkBridger/issues) • [💬 Discuss](https://github.com/DpkRn/LinkBridger/discussions) +[🚀 Live Demo](https://allin1url.in) • [📖 Documentation](./frontend/src/components/Documentation.jsx) • [🐛 Report Bug](https://github.com/DpkRn/All in1 url/issues) • [💡 Request Feature](https://github.com/DpkRn/All in1 url/issues) • [💬 Discuss](https://github.com/DpkRn/All in1 url/discussions) -![LinkBridger Banner](https://via.placeholder.com/1200x400/4F46E5/FFFFFF?text=LinkBridger+-+Your+Personalized+Link+Manager) +![All in1 url Banner](https://via.placeholder.com/1200x400/4F46E5/FFFFFF?text=All in1 url+-+Your+Personalized+Link+Manager)
@@ -25,9 +25,9 @@ ## 📋 Table of Contents - [About The Project](#-about-the-project) -- [Why LinkBridger?](#-why-linkbridger) +- [Why All in1 url?](#-why-All in1 url) - [Key Benefits](#-key-benefits) -- [LinkBridger vs. Competitors](#-linkbridger-vs-competitors) +- [All in1 url vs. Competitors](#-All in1 url-vs-competitors) - [Live Examples](#-live-examples) - [Features](#-features) - [Tech Stack](#-tech-stack) @@ -41,11 +41,11 @@ ## 🎯 About The Project -**LinkBridger** is a revolutionary, open-source social profile link management platform that empowers users to create personalized, memorable URLs for all their social media profiles. Unlike traditional link shorteners that generate random, forgettable codes, LinkBridger uses your username and platform name to create links that are both human-readable and professional. +**All in1 url** is a revolutionary, open-source social profile link management platform that empowers users to create personalized, memorable URLs for all their social media profiles. Unlike traditional link shorteners that generate random, forgettable codes, All in1 url uses your username and platform name to create links that are both human-readable and professional. ### 🎨 The Vision -In today's digital-first world, professionals, creators, and developers manage multiple social media profiles across various platforms. LinkBridger was born from the need to simplify this complexity and provide a unified solution that combines **memorability**, **professionalism**, and **functionality** in one powerful platform. +In today's digital-first world, professionals, creators, and developers manage multiple social media profiles across various platforms. All in1 url was born from the need to simplify this complexity and provide a unified solution that combines **memorability**, **professionalism**, and **functionality** in one powerful platform. ### 🔍 The Problem It Solves @@ -61,29 +61,60 @@ In today's digital-first world, professionals, creators, and developers manage m ### ✨ The Solution -LinkBridger bridges this gap by providing: +All in1 url bridges this gap by providing: -- 🎯 **Personalized URLs** using your username and platform name (e.g., `linkb-one.vercel.app/yourname/linkedin`) +- 🎯 **Personalized URLs** using your username and platform name (e.g., `yourname.allin1url.in/linkedin`) - 🌐 **Single Hub Link** that acts as a landing page for all your profiles - 📊 **Built-in Analytics** to track clicks and understand your audience - 🔄 **Centralized Updates** that reflect instantly across all platforms - 🚀 **Zero Expiration** - your links work forever - 🎨 **Brand Identity** - links that reflect your personal or professional brand - 🔒 **Privacy First** - no tracking scripts, no third-party analytics +- 🔐 **Link Privacy Controls** - three-tier visibility system: + - **Public**: Visible everywhere (link hub, profile preview, search) + - **Unlisted**: Visible in profile preview only, NOT in link hub (perfect for 100+ links without cluttering) + - **Private**: Hidden everywhere, password-protected for direct access +- 👥 **User Discovery** - real-time search in navigation bar to discover other users' public profiles +- ⚙️ **Granular Privacy Settings** - fully customizable visibility controls: + - Profile visibility (public/private) + - Search visibility and keywords + - Content visibility (email, location, bio, passion, image) + - Link display settings + - Privacy and notification preferences - 💰 **Completely Free** - open source and free forever ### 🏗️ How It Works 1. **Sign Up**: Create an account with your email and choose a username 2. **Add Platforms**: Add any social media platform with its destination URL -3. **Get Your Links**: Receive personalized links like `linkb-one.vercel.app/username/platform` -4. **Share Everywhere**: Use your links on resumes, business cards, email signatures, and social media -5. **Update Anytime**: Change destination URLs anytime - all your shared links update automatically -6. **Track Performance**: Monitor clicks and engagement through the dashboard +3. **Get Your Links**: Receive personalized links like `username.allin1url.in/platform` +4. **Set Link Privacy**: Choose visibility for each link: + - **Public**: Visible everywhere (link hub, profile preview, search) + - **Unlisted**: Visible in profile preview only, NOT in link hub (perfect for 100+ links without cluttering hub) + - **Private**: Hidden everywhere, password-protected for direct access +5. **Configure Privacy Settings**: Customize what information is visible in your public profile: + - Toggle profile visibility (public/private) + - Enable/disable search visibility + - Control content visibility (email, location, bio, passion, image) + - Configure link display settings + - Set up customizable email notification preferences + - Link click notifications (toggle on/off) + - Profile view notifications (toggle on/off) + - Weekly report emails (toggle on/off) +6. **Share Everywhere**: Use your links on resumes, business cards, email signatures, and social media +7. **Update Anytime**: Change destination URLs anytime - all your shared links update automatically +8. **Track Performance**: Monitor clicks and engagement through the dashboard +9. **Discover Users**: Search for other users in the navigation bar and view their public profiles +10. **Customize Notifications**: Set up email notification preferences in Settings + - Enable/disable link click notifications + - Enable/disable profile view notifications + - Enable/disable weekly report emails + - Each notification type can be controlled independently +11. **Get Notified**: Receive email notifications based on your preferences when someone clicks your links or views your profile --- -## 💡 Why LinkBridger? +## 💡 Why All in1 url? ### 👔 For Professionals @@ -127,13 +158,26 @@ LinkBridger bridges this gap by providing: ### 1. **Memorable & Professional Links** 🎯 **Before**: `https://www.linkedin.com/in/john-doe-software-engineer-123456789/` -**After**: `https://linkb-one.vercel.app/johndoe/linkedin` +**After**: `https://johndoe.allin1url.in/linkedin` -Your audience will remember it! The pattern is simple: `domain/username/platform`. Once someone knows your username, they can easily guess your other platform links. +Your audience will remember it! The pattern is simple: `username.domain/platform`. Once someone knows your username, they can easily guess your other platform links. + +**🌟 New: Custom Subdomain Format** +- Each user gets their own custom subdomain (e.g., `username.allin1url.in`) +- Hub link: `https://username.allin1url.in` (shows all your profiles) +- Platform links: `https://username.allin1url.in/platform` (direct redirects) +- More professional and memorable than path-based URLs +- Works seamlessly in both development and production environments ### 2. **Single Hub for All Profiles** 🌐 -Share one link (`https://linkb-one.vercel.app/yourname`) that acts as a beautiful landing page for all your social profiles. Visitors can browse and choose which platform to visit, creating a professional digital business card. +Share one link (`https://yourname.allin1url.in`) that acts as a beautiful landing page for all your social profiles. Visitors can browse and choose which platform to visit, creating a professional digital business card. + +**🌟 Custom Subdomain Hub** +- Your personal subdomain: `https://yourname.allin1url.in` +- Beautiful landing page showcasing all your profiles +- Easy to remember and share +- Professional digital business card **Benefits:** - One link to remember instead of dozens @@ -156,17 +200,131 @@ Imagine you've shared your LinkedIn profile link in: **The Problem**: Your LinkedIn account gets banned or you change your username. Now you need to update links in all these places - but you don't even remember where you shared them! -**The LinkBridger Solution**: Update the destination URL once in your LinkBridger dashboard, and **all your shared links automatically redirect to the new URL**. No more hunting down old links! - -### 4. **Click Analytics & Insights** 📊 +**The All in1 url Solution**: Update the destination URL once in your All in1 url dashboard, and **all your shared links automatically redirect to the new URL**. No more hunting down old links! + +### 4. **Advanced Analytics & Insights** 📊 + +Comprehensive analytics dashboard to understand your audience and optimize your strategy: + +- **Multiple Metrics**: Track profile visits, clicks, location, devices, browsers, OS, referrers, and more +- **Visual Analytics**: Multiple chart types (Line, Bar, Area, Pie) for different data views +- **Time-Based Analysis**: Analyze trends over 7 days, 30 days, 90 days, 1 year, or all time +- **Geographic Insights**: Country-level location distribution with visual breakdowns +- **Device Analytics**: Complete breakdown of Desktop, Mobile, and Tablet usage +- **Browser Analytics**: Track which browsers your audience uses (Chrome, Safari, Firefox, Edge, etc.) +- **Operating System Analytics**: Understand OS distribution (Windows, macOS, Linux, iOS, Android) +- **Referrer Analytics**: Categorized referrer tracking (Direct, Search, Social, Internal, External) +- **Top Referrer Sources**: Domain-level referrer tracking with detailed insights +- **Temporal Patterns**: Hourly distribution and day-of-week analysis +- **Platform Performance**: Individual platform click metrics +- **Link Performance**: Per-link analytics and statistics +- **Summary Statistics**: Quick overview cards with key metrics +- **Real-time Updates**: See clicks and analytics as they happen +- **Customizable Email Notifications**: Get notified based on your preferences + - Link click notifications (customizable - toggle on/off) + - Profile view notifications (customizable - toggle on/off) + - Weekly report emails (customizable - toggle on/off) + - Each notification type includes detailed information (platform, device, location, timestamp) + +### 4.5. **Link Privacy & Protection** 🔒 + +Control who can access your links with three visibility levels: + +- **Public Links**: Fully visible and accessible + - ✅ Visible in your profile preview + - ✅ Visible in link hub (`/username`) + - ✅ Visible in user search results + - ✅ Accessible via direct URL (`/username/platform`) + - Anyone can see and access these links + - Perfect for professional profiles and public content + - No password required + +- **Unlisted Links**: Hidden from hub but visible in profile preview + - ❌ **NOT** visible in link hub (`/username`) + - ✅ **Visible** in profile preview (`/profile/username`) + - ❌ **NOT** visible in user search results + - ✅ Accessible via direct URL (`/username/platform`) - **NO password required for direct access** + - **Purpose**: Allows you to preserve many links (up to 100+) in your profile preview without cluttering the public link hub + - Perfect for links that are less important but you still want visible in your profile + - Ideal for maintaining a comprehensive profile while keeping the public hub clean and focused + - Direct access works without password - anyone with the direct URL can access it + +- **Private Links**: Completely hidden - require password to access + - ❌ **NOT** visible in profile preview + - ❌ **NOT** visible in link hub + - ❌ **NOT** visible in user search results + - ✅ Only accessible via direct URL (`/username/platform`) with correct password + - Perfect for sensitive or personal content + - Secure password prompt page with validation + - Automatic redirect to destination after successful verification + +**How It Works:** + +**For Link Visibility:** +1. **Setting Link Visibility**: Use the lock icon on each link card to change visibility +2. **Public Links**: Immediately visible in link hub (`/username`), profile preview (`/profile/username`), and search results +3. **Unlisted Links**: + - ✅ Visible in profile preview (`/profile/username`) + - ❌ NOT visible in link hub (`/username`) - keeps hub clean and focused + - ✅ Accessible via direct URL (`/username/platform`) - NO password required + - **Purpose**: Perfect for preserving 100+ links in your profile preview without cluttering the public link hub + - Ideal for less important links you still want visible in your profile +4. **Private Links**: When setting a link to "private", you'll be prompted to set a password +5. **Accessing Private Links**: When someone visits a private link directly, they see a password prompt page +6. **Password Verification**: The system securely verifies the password using bcrypt hashing +7. **Automatic Redirect**: After successful verification, users are automatically redirected to the destination URL +8. **Click Tracking**: All link clicks (including private links) are tracked and can be reported via email notifications (if enabled in your notification preferences) + +**For Privacy & Permissions (Fully Customizable):** +1. **Access Settings**: Navigate to Settings page from your profile menu +2. **Profile Visibility**: Toggle whether your profile is public or private + - Public: Visible to everyone, can be found in search + - Private: Only accessible if you share the direct link +3. **Search Settings**: Control discoverability + - Enable/disable profile searchability + - Add search keywords for better discoverability + - Featured profile option for enhanced visibility +4. **Content Visibility**: Individually toggle what information is visible + - Show/hide email address + - Show/hide location + - Show/hide bio + - Show/hide passion + - Show/hide profile image + - Each setting works independently +5. **Link Display Settings**: Control what statistics are shown + - Show/hide total link count + - Show/hide click statistics +6. **Privacy Controls**: Configure advanced privacy options + - Show/hide analytics information + - Show/hide last updated timestamp + - Require authentication for profile view +7. **Email Notifications**: Fully customizable email notification preferences + - **Link Click Notifications**: Toggle email notifications when someone clicks your links + - Includes platform, device, location, and timestamp information + - Perfect for tracking engagement and recruiter interest + - Can be enabled/disabled independently + - **Profile View Notifications**: Toggle email notifications when someone views your public profile + - Know when potential clients or employers check out your profile + - Helps you understand profile visibility and interest + - Can be enabled/disabled independently + - **Weekly Reports**: Toggle weekly summary emails + - Get insights into your most popular links + - Track overall engagement trends + - Monitor profile performance over time + - Can be enabled/disabled independently + - All notification types can be controlled independently in Settings + - Changes take effect immediately + - No premium subscription required - all notification types are free +8. **Real-time Updates**: All changes take effect immediately and are reflected in profile preview +9. **Profile Preview**: Use the "Preview" button to see exactly how your profile appears to visitors with current privacy settings -Track which platforms get the most clicks to understand your audience: - -- **See Engagement**: Know which platforms drive the most traffic -- **Optimize Strategy**: Focus on platforms that get the most engagement -- **Measure Impact**: Track the effectiveness of your networking efforts -- **Real-time Updates**: See clicks as they happen -- **Email Notifications**: Get notified when someone clicks your links (with device and location info) +**Security Features:** +- **Password Protection**: Secure password verification with bcrypt hashing +- **Direct Redirection**: After password verification, users are automatically redirected to the destination +- **Secure Encoding**: Username and source are encoded (Base64) for security when passing through password prompt +- **Error Handling**: User-friendly error messages for incorrect passwords +- **Click Tracking**: Private link clicks are still tracked and can be reported via email notifications (if enabled in your notification preferences) +- **No URL Tampering**: Encoded parameters prevent unauthorized access attempts ### 5. **Platform Flexibility** 🎨 @@ -187,23 +345,107 @@ Unlike many link shorteners that: - Delete inactive links - Limit the number of links -**LinkBridger links work forever** - as long as you maintain your account, your links remain active. No expiration dates, no premium plans, no limits. +**All in1 url links work forever** - as long as you maintain your account, your links remain active. No expiration dates, no premium plans, no limits. -### 7. **Email Notifications** 📧 +### 7. **Customizable Email Notifications** 📧 -Get notified when someone clicks your links with: +Get notified about important events based on your customizable preferences: + +**Notification Types (All Customizable):** +- **Link Click Notifications**: Get notified when someone clicks your links + - Toggle on/off in Settings + - Includes platform information, device details, location data, and timestamp + - Perfect for tracking recruiter interest and engagement +- **Profile View Notifications**: Get notified when someone views your public profile + - Toggle on/off in Settings + - Know when potential clients or employers check out your profile +- **Weekly Reports**: Receive weekly summaries of your link performance + - Toggle on/off in Settings + - Get insights into your most popular links and overall engagement + +**What's Included in Notifications:** - **Platform Information**: Which link was clicked - **Device Details**: Desktop, mobile, or tablet - **Location Data**: General location information (privacy-respecting) -- **Timestamp**: When the click occurred - -Perfect for: +- **Timestamp**: When the click or view occurred +- **User Information**: Basic details about the visitor (when available) + +**Customization (Based on Your Permissions):** +- **Independent Control**: Control each notification type independently + - Link click notifications: Enable/disable in Settings + - Profile view notifications: Enable/disable in Settings + - Weekly report emails: Enable/disable in Settings +- **Permission-Based**: Email notifications are sent based on your notification preferences + - Only enabled notification types will trigger emails + - You have full control over what notifications you receive + - No emails are sent for disabled notification types +- **Easy Management**: All settings can be changed anytime in the Settings page + - Navigate to Settings from your profile menu + - Toggle each notification type on/off as needed + - Changes take effect immediately + - No premium subscription required - all notification customization is free + +**Perfect for:** - Tracking recruiter interest - Understanding audience behavior - Measuring engagement - Staying informed about your digital presence - -### 8. **Dark Mode Support** 🌓 +- Monitoring profile visibility +- Getting weekly performance insights + +### 8. **User Search & Public Profiles** 👥 + +Discover and connect with other users: + +- **User Search**: Search for other users by username or name in the navigation bar + - Real-time search with instant results + - Search dropdown with user profiles + - Click to visit any public profile + - Responsive design: search icon on mobile, full input on desktop + - Only shows users who have enabled public profile and search visibility + +- **Public Profile Viewing**: View other users' public profiles + - Access via `/profile/:username` route + - Shows only public links (filters out private links) + - Respects all privacy settings from the profile owner + - Displays profile information based on owner's permissions + +- **Profile Preview**: Preview how your own profile appears to visitors + - Click "Preview" button on your profile page + - See exactly what visitors see + - All content respects your privacy settings, even for owners + - Helps you fine-tune your public profile appearance + +- **Privacy Controls**: Granular settings for what information is visible + - Control profile visibility (public/private) + - Toggle search visibility (allow/disallow search) + - Control profile view permissions + - Fine-tune what information is shown (email, location, bio, passion, profile image) + - Link display settings (show link count, show click stats) + - Search & discovery settings (allow search, featured, search keywords) + - Privacy settings (show analytics, show last updated, require auth) + - **Customizable Email Notifications**: Fully customizable notification preferences + - Link click notifications (toggle on/off) + - Profile view notifications (toggle on/off) + - Weekly report emails (toggle on/off) + - Each notification type can be controlled independently + - All settings accessible in Settings page + +- **Search Visibility**: Control whether your profile appears in search results + - Enable/disable profile searchability + - Add search keywords for better discoverability + - Featured profile option for enhanced visibility + - Only searchable if profile is public AND search is enabled + +- **Profile Permissions**: Fine-tune visibility of email, location, bio, and more + - Show/hide email address + - Show/hide location + - Show/hide bio + - Show/hide passion + - Show/hide profile image + - Each setting can be toggled independently + +### 9. **Dark Mode Support** 🌓 Modern, eye-friendly interface with full dark mode support: - **System Preference Detection**: Automatically matches your system theme @@ -212,7 +454,7 @@ Modern, eye-friendly interface with full dark mode support: - **Smooth Transitions**: Beautiful animations when switching themes - **Accessibility**: Better for low-light environments and reducing eye strain -### 9. **Mobile Responsive Design** 📱 +### 10. **Mobile Responsive Design** 📱 Fully responsive design that works seamlessly on: - **Desktop**: Full-featured experience with all capabilities @@ -220,7 +462,7 @@ Fully responsive design that works seamlessly on: - **Mobile**: Touch-friendly interface for smartphones - **All Browsers**: Works on Chrome, Firefox, Safari, Edge, and more -### 10. **Privacy & Security** 🔒 +### 11. **Privacy & Security** 🔒 **Security Features:** - **JWT Authentication**: Secure token-based authentication @@ -237,8 +479,12 @@ Fully responsive design that works seamlessly on: - **No Data Selling**: Your data is yours - we don't sell it - **Open Source**: Transparent code you can audit - **User Control**: You control your data and links +- **Link Privacy Controls**: Three-tier visibility system (public, unlisted, private) +- **Password Protection**: Secure password protection for private links +- **Profile Privacy Settings**: Granular control over what information is visible +- **Search Visibility**: Control whether your profile appears in user searches -### 11. **Fast Performance** ⚡ +### 12. **Fast Performance** ⚡ - **Optimized Queries**: Efficient database operations - **Lazy Loading**: Code splitting and lazy imports @@ -246,7 +492,7 @@ Fully responsive design that works seamlessly on: - **CDN Ready**: Optimized for content delivery networks - **Lightweight**: Minimal dependencies and optimized bundle size -### 12. **User-Friendly Interface** 🎨 +### 13. **User-Friendly Interface** 🎨 - **Intuitive Design**: Easy to use, even for non-technical users - **Real-time Validation**: Instant feedback on form inputs @@ -255,7 +501,7 @@ Fully responsive design that works seamlessly on: - **Success Notifications**: Clear confirmation of actions - **Smooth Animations**: Polished user experience -### 13. **Free & Open Source** 💰 +### 14. **Free & Open Source** 💰 - **Completely Free**: No subscription fees, no premium plans - **Open Source**: Full source code available on GitHub @@ -264,7 +510,7 @@ Fully responsive design that works seamlessly on: - **Customizable**: Modify to fit your needs - **No Vendor Lock-in**: You're not dependent on a single service -### 14. **Easy Setup** 🚀 +### 15. **Easy Setup** 🚀 Getting started is simple: 1. Choose a short, memorable username @@ -275,13 +521,13 @@ Getting started is simple: --- -## 🆚 LinkBridger vs. Competitors +## 🆚 All in1 url vs. Competitors ### Comparison Table -| Feature | LinkBridger | Link Shorteners (bit.ly, tinyurl) | Linktree | Bio.link | Custom Domain Services | +| Feature | All in1 url | Link Shorteners (bit.ly, tinyurl) | Linktree | Bio.link | Custom Domain Services | |---------|------------|-----------------------------------|----------|----------|------------------------| -| **Link Format** | `domain/username/platform` | `bit.ly/xyz123` | `linktr.ee/username` | `bio.link/username` | `custom.com/username` | +| **Link Format** | `username.domain/platform` (🌟 Custom Subdomain) | `bit.ly/xyz123` | `linktr.ee/username` | `bio.link/username` | `custom.com/username` | | **Memorability** | ✅ Human-readable, memorable | ❌ Random codes | ⚠️ Platform-dependent | ⚠️ Platform-dependent | ✅ Customizable | | **Professionalism** | ✅ Branded, professional | ❌ Generic, unprofessional | ⚠️ Branded by platform | ⚠️ Branded by platform | ✅ Fully branded | | **Expiration** | ✅ Never expires | ❌ Often expires | ✅ Usually permanent | ✅ Usually permanent | ✅ Permanent | @@ -292,15 +538,20 @@ Getting started is simple: | **Cost** | ✅ Free and open source | ⚠️ Often requires paid plans | ⚠️ Premium features locked | ⚠️ Premium features locked | ❌ Expensive | | **Transparency** | ✅ Open source, auditable | ❌ Closed source | ❌ Closed source | ❌ Closed source | ⚠️ Varies | | **No Vendor Lock-in** | ✅ Self-hostable | ❌ Vendor-dependent | ❌ Vendor-dependent | ❌ Vendor-dependent | ✅ Self-hostable | -| **Email Notifications** | ✅ Built-in | ❌ Not available | ⚠️ Premium feature | ⚠️ Premium feature | ⚠️ Varies | +| **Email Notifications** | ✅ Fully customizable | ❌ Not available | ⚠️ Premium feature | ⚠️ Premium feature | ⚠️ Varies | +| **Notification Customization** | ✅ Per-type toggles | ❌ Not available | ⚠️ Limited | ⚠️ Limited | ⚠️ Varies | | **Platform Flexibility** | ✅ Any platform | ✅ Any URL | ⚠️ Limited platforms | ⚠️ Limited platforms | ✅ Any platform | | **Dark Mode** | ✅ Full support | ⚠️ Varies | ⚠️ Limited | ⚠️ Limited | ⚠️ Varies | | **Mobile App** | ⚠️ Web-based (responsive) | ✅ Available | ✅ Available | ✅ Available | ⚠️ Varies | +| **Link Privacy Controls** | ✅ Public/Unlisted/Private | ❌ Not available | ⚠️ Limited | ⚠️ Limited | ⚠️ Varies | +| **Password Protection** | ✅ Built-in | ❌ Not available | ⚠️ Premium feature | ⚠️ Premium feature | ⚠️ Varies | +| **User Search** | ✅ Built-in | ❌ Not available | ⚠️ Limited | ⚠️ Limited | ⚠️ Varies | +| **Profile Privacy Settings** | ✅ Granular controls | ❌ Not available | ⚠️ Limited | ⚠️ Limited | ⚠️ Varies | -### Why LinkBridger is Superior +### Why All in1 url is Superior #### 1. **Brand Identity** 🎯 -Your links become part of your brand identity, not generic shortened URLs. When someone sees `linkb-one.vercel.app/yourname/linkedin`, they immediately know it's your link and can easily remember the pattern for other platforms. +Your links become part of your brand identity, not generic shortened URLs. When someone sees `yourname.allin1url.in/linkedin`, they immediately know it's your link and can easily remember the pattern for other platforms. The custom subdomain format (`username.allin1url.in`) makes your links even more professional and memorable. #### 2. **User Trust** 🤝 Transparent, readable URLs build more trust than mysterious short codes. Users can see where the link will take them before clicking, reducing phishing concerns. @@ -327,7 +578,7 @@ Built by developers, for developers: - Transparent development process #### 6. **Cost Effective** 💰 -- **LinkBridger**: Free forever, open source +- **All in1 url**: Free forever, open source - **Linktree Pro**: $6-24/month - **Bio.link Pro**: $3-9/month - **Custom Domain Services**: $10-50+/month + setup fees @@ -349,24 +600,24 @@ Built by developers, for developers: ## 🎬 Live Examples -See LinkBridger in action with these real-world examples: +See All in1 url in action with these real-world examples: ### Example User: `dpkrn` **Single Hub Link** (Access all profiles - acts as a digital business card): ``` -https://linkb-one.vercel.app/dpkrn +https://dpkrn.allin1url.in ``` Visit this link to see a beautiful landing page with all social profiles! **Individual Platform Links** (Direct redirects to specific platforms): -- **LinkedIn**: [`https://linkb-one.vercel.app/dpkrn/linkedin`](https://linkb-one.vercel.app/dpkrn/linkedin) -- **GitHub**: [`https://linkb-one.vercel.app/dpkrn/github`](https://linkb-one.vercel.app/dpkrn/github) -- **LeetCode**: [`https://linkb-one.vercel.app/dpkrn/leetcode`](https://linkb-one.vercel.app/dpkrn/leetcode) -- **Portfolio**: [`https://linkb-one.vercel.app/dpkrn/portfolio`](https://linkb-one.vercel.app/dpkrn/portfolio) -- **Instagram**: [`https://linkb-one.vercel.app/dpkrn/instagram`](https://linkb-one.vercel.app/dpkrn/instagram) -- **Facebook**: [`https://linkb-one.vercel.app/dpkrn/facebook`](https://linkb-one.vercel.app/dpkrn/facebook) -- **Codeforces**: [`https://linkb-one.vercel.app/dpkrn/codeforces`](https://linkb-one.vercel.app/dpkrn/codeforces) +- **LinkedIn**: [`https://dpkrn.allin1url.in/linkedin`](https://dpkrn.allin1url.in/linkedin) +- **GitHub**: [`https://dpkrn.allin1url.in/github`](https://dpkrn.allin1url.in/github) +- **LeetCode**: [`https://dpkrn.allin1url.in/leetcode`](https://dpkrn.allin1url.in/leetcode) +- **Portfolio**: [`https://dpkrn.allin1url.in/portfolio`](https://dpkrn.allin1url.in/portfolio) +- **Instagram**: [`https://dpkrn.allin1url.in/instagram`](https://dpkrn.allin1url.in/instagram) +- **Facebook**: [`https://dpkrn.allin1url.in/facebook`](https://dpkrn.allin1url.in/facebook) +- **Codeforces**: [`https://dpkrn.allin1url.in/codeforces`](https://dpkrn.allin1url.in/codeforces) **Notice**: Only the platform name changes; the username remains consistent across all links! This makes it incredibly easy to remember and share. @@ -386,11 +637,48 @@ Visit this link to see a beautiful landing page with all social profiles! - 🔐 **Secure Authentication**: JWT-based authentication with email verification - 👤 **User Profiles**: Customizable profile with bio and profile picture - 🔗 **Link Management**: Create, edit, and delete social profile links -- 📊 **Click Tracking**: Real-time analytics for each link with detailed statistics -- 🔔 **Notifications**: Email notifications for link clicks with device and location information +- 📊 **Advanced Analytics Dashboard**: Comprehensive analytics with detailed insights + - Click tracking with time-based analysis (daily, weekly, monthly, yearly) + - Geographic distribution with country-level data + - Device analytics (Desktop, Mobile, Tablet breakdown) + - Browser analytics (Chrome, Safari, Firefox, Edge, etc.) + - Operating system analytics (Windows, macOS, Linux, iOS, Android) + - Referrer analytics (Direct, Search, Social, Internal, External categories) + - Top referrer sources with domain-level tracking + - Hourly distribution patterns + - Day of week analysis + - Platform performance metrics + - Link-based analytics + - Multiple chart types (Line, Bar, Area, Pie charts) + - Customizable time ranges (7 days, 30 days, 90 days, 1 year, all time) + - Summary cards with key metrics (Total Clicks, Profile Visits, Countries, Top Referrer) + - Full dark and light theme support +- 🔔 **Customizable Email Notifications**: Fully customizable email notifications based on your preferences + - Link click notifications (toggle on/off) + - Profile view notifications (toggle on/off) + - Weekly report emails (toggle on/off) + - Each notification type can be controlled independently +- 🔒 **Link Privacy Controls**: Three-tier visibility system (public, unlisted, private) with password protection + - **Public**: Visible everywhere (link hub, profile preview, search) + - **Unlisted**: Visible in profile preview, NOT in link hub, direct access without password + - **Private**: Hidden everywhere, password-protected for direct access only - 🌓 **Dark Mode**: Full dark mode support with system preference detection and manual toggle - 📱 **Responsive Design**: Works perfectly on all devices and screen sizes - 🎨 **Modern UI/UX**: Beautiful, intuitive interface built with React and Tailwind CSS + - Responsive text sizing across all pages for optimal mobile experience + - Full dark and light theme support with proper color contrast + - Mobile-optimized layouts with single-row URL inputs + - Smooth animations and transitions throughout +- 👥 **User Search & Public Profiles**: Search for users and view public profiles + - Real-time user search in navigation bar + - Public profile viewing with privacy-respecting content + - Profile preview to see how your profile appears to visitors +- ⚙️ **Granular Privacy Settings**: Comprehensive privacy and visibility controls + - Profile visibility controls (8+ toggle options) + - Link display settings + - Search & discovery settings + - Privacy and notification preferences + - Customizable content visibility (email, location, bio, passion, image) ### Advanced Features @@ -400,14 +688,68 @@ Visit this link to see a beautiful landing page with all social profiles! - 🎯 **Error Handling**: Comprehensive error handling with user-friendly messages - 🧪 **Code Quality**: ESLint, Prettier, and best practices enforced - 🔄 **Real-time Updates**: Instant updates across all shared links when you change destination URLs -- 📈 **Analytics Dashboard**: Visual representation of click statistics +- 📈 **Advanced Analytics Dashboard**: Comprehensive analytics with detailed insights + - Multiple visualization types (Line, Bar, Area, Pie charts) + - Time-based analysis (daily, weekly, monthly, yearly trends) + - Geographic analytics with country-level data + - Device, browser, and OS breakdowns + - Referrer analytics with category classification + - Hourly and day-of-week patterns + - Platform and link performance metrics + - Customizable time ranges and chart types + - Summary statistics and detailed breakdowns + - Full dark and light theme support with proper text contrast - 🎭 **Platform Customization**: Add any platform with custom names - 🔍 **Search & Filter**: Easy to find and manage your links -- 📧 **Email Integration**: Seamless email notifications for important events +- 📧 **Customizable Email Notifications**: Fully customizable email notifications based on your preferences + - **Link Click Notifications**: Get notified when someone clicks your links (toggle on/off) + - Includes platform, device, location, and timestamp + - **Profile View Notifications**: Get notified when someone views your public profile (toggle on/off) + - **Weekly Reports**: Receive weekly summaries of your link performance (toggle on/off) + - All notification types can be enabled/disabled independently in Settings +- 🔐 **Private Link Protection**: Password-protected private links with secure verification and direct redirection +- 👀 **Profile Preview**: Preview how your profile appears to visitors before making it public +- 🔎 **User Search**: Real-time search for other users in navigation bar with instant results + - Search by username or name + - Instant dropdown results + - Click to visit public profiles + - Responsive: search icon on mobile, full input on desktop + - Only shows users with public profiles and search enabled +- 🎛️ **Granular Privacy Controls**: Fully customizable visibility settings + - **Profile Visibility**: Control who can view your profile (public/private) + - **Search Visibility**: Enable/disable profile searchability and add search keywords + - **Content Visibility**: Individually toggle visibility of: + - Email address + - Location + - Bio + - Passion + - Profile image + - **Link Display**: Control whether link count and click stats are shown to visitors + - **Search Settings**: Add search keywords, enable featured profile option + - **Privacy Settings**: Control analytics visibility, last updated display, authentication requirements + - **Email Notifications**: Fully customizable email notification preferences + - **Link Click Notifications**: Toggle email notifications when someone clicks your links + - Includes detailed information: platform, device type, location, timestamp + - Perfect for tracking engagement and understanding audience behavior + - **Profile View Notifications**: Toggle email notifications when someone views your public profile + - Know when potential clients, employers, or visitors check out your profile + - Helps monitor profile visibility and interest + - **Weekly Reports**: Toggle weekly summary emails with performance insights + - Get insights into your most popular links + - Track overall engagement trends + - Monitor profile performance over time + - Each notification type can be enabled/disabled independently + - All settings customizable in Settings page + - Changes take effect immediately + - **Real-time Preview**: See changes immediately in profile preview ### Developer Features -- 📚 **Comprehensive Documentation**: Detailed README, API docs, and code comments +- 📚 **Comprehensive Documentation**: + - Detailed README, API docs, and code comments + - Model documentation in `/backend/doc/` + - Page documentation in `/frontend/docs/` + - CHANGELOG files for frontend and backend - 🧩 **Modular Architecture**: Clean, maintainable code structure - 🐳 **Docker Support**: Easy deployment with Docker and Docker Compose - 🔧 **Environment Configuration**: Flexible environment variable setup @@ -473,8 +815,8 @@ Visit this link to see a beautiful landing page with all social profiles! #### 1. Clone the Repository ```bash -git clone https://github.com/DpkRn/LinkBridger.git -cd LinkBridger +git clone https://github.com/DpkRn/All in1 url.git +cd All in1 url ``` #### 2. Install Dependencies @@ -498,9 +840,9 @@ Create a `.env` file in the `backend/` directory: JWT_KEY=your_super_secret_jwt_key_here_min_32_chars # MongoDB Connection String -DB_URL=mongodb://localhost:27017/linkbridger +DB_URL=mongodb://localhost:27017/All in1 url # Or use MongoDB Atlas: -# DB_URL=mongodb+srv://username:password@cluster.mongodb.net/linkbridger +# DB_URL=mongodb+srv://username:password@cluster.mongodb.net/All in1 url # Email Configuration (for notifications) EMAIL_USER=your_email@gmail.com @@ -555,15 +897,15 @@ docker-compose down ```bash # Build backend image cd backend -docker build -t linkbridger-backend . +docker build -t All in1 url-backend . # Build frontend image cd frontend -docker build -t linkbridger-frontend . +docker build -t All in1 url-frontend . # Run containers -docker run -d -p 8080:8080 linkbridger-backend -docker run -d -p 5173:5173 linkbridger-frontend +docker run -d -p 8080:8080 All in1 url-backend +docker run -d -p 5173:5173 All in1 url-frontend ``` ### Production Deployment @@ -681,7 +1023,7 @@ This project adheres to professional development standards and best practices: ## 🤝 Contributing -We **love** contributions! LinkBridger is an open-source project, and we welcome any contributions from the community. Whether you're fixing bugs, adding features, improving documentation, or suggesting ideas, your input is valuable! +We **love** contributions! All in1 url is an open-source project, and we welcome any contributions from the community. Whether you're fixing bugs, adding features, improving documentation, or suggesting ideas, your input is valuable! ### 🌟 Why Contribute? @@ -697,7 +1039,7 @@ We **love** contributions! LinkBridger is an open-source project, and we welcome ```bash # Click the "Fork" button on GitHub, or use: -gh repo fork DpkRn/LinkBridger +gh repo fork DpkRn/All in1 url ``` #### 2. Create a Feature Branch @@ -746,7 +1088,7 @@ git push origin feature/amazing-feature #### 7. Open a Pull Request -- Go to the [GitHub repository](https://github.com/DpkRn/LinkBridger) +- Go to the [GitHub repository](https://github.com/DpkRn/All in1 url) - Click "New Pull Request" - Select your branch - Describe your changes clearly @@ -814,7 +1156,7 @@ Contributors will be: [![GitHub](https://img.shields.io/badge/GitHub-DpkRn-181717?style=for-the-badge&logo=github&logoColor=white)](https://github.com/DpkRn) [![Email](https://img.shields.io/badge/Email-d.wizard.techno@gmail.com-D14836?style=for-the-badge&logo=gmail&logoColor=white)](mailto:d.wizard.techno@gmail.com) [![LinkedIn](https://img.shields.io/badge/LinkedIn-Profile-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/dpkrn) -[![Portfolio](https://img.shields.io/badge/Portfolio-Website-FF6B6B?style=for-the-badge&logo=firefox&logoColor=white)](https://linkb-one.vercel.app/dpkrn) +[![Portfolio](https://img.shields.io/badge/Portfolio-Website-FF6B6B?style=for-the-badge&logo=firefox&logoColor=white)](https://dpkrn.allin1url.in) **Passionate about building innovative solutions and contributing to open source** @@ -822,11 +1164,11 @@ Contributors will be: ### About the Developer -**Dwizard** is a passionate full-stack developer with expertise in modern web technologies. With a focus on creating user-friendly applications and contributing to the open-source community, Dwizard has built LinkBridger to solve real-world problems faced by professionals, content creators, and developers. +**Dwizard** is a passionate full-stack developer with expertise in modern web technologies. With a focus on creating user-friendly applications and contributing to the open-source community, Dwizard has built All in1 url to solve real-world problems faced by professionals, content creators, and developers. ### 🎯 Mission -To create tools that simplify digital life and empower users to build their online presence effectively. LinkBridger represents this mission by providing a free, open-source solution that puts users in control of their digital identity. +To create tools that simplify digital life and empower users to build their online presence effectively. All in1 url represents this mission by providing a free, open-source solution that puts users in control of their digital identity. ### 💼 Skills & Expertise @@ -844,14 +1186,14 @@ To create tools that simplify digital life and empower users to build their onli **Professional Links:** - 💼 **LinkedIn**: [Connect on LinkedIn](https://www.linkedin.com/in/dpkrn) - Let's network! - 🐙 **GitHub**: [@DpkRn](https://github.com/DpkRn) - Check out my other projects -- 🌐 **Portfolio**: [View Portfolio](https://linkb-one.vercel.app/dpkrn) - See my work +- 🌐 **Portfolio**: [View Portfolio](https://dpkrn.allin1url.in) - See my work - 📧 **Email**: [d.wizard.techno@gmail.com](mailto:d.wizard.techno@gmail.com) - Let's collaborate! **Social Media:** -- 📸 **Instagram**: [Follow on Instagram](https://linkb-one.vercel.app/dpkrn/instagram) (if available) -- 👨‍💻 **GitHub Profile**: [View GitHub Profile](https://linkb-one.vercel.app/dpkrn/github) -- 💻 **LeetCode**: [LeetCode Profile](https://linkb-one.vercel.app/dpkrn/leetcode) (if available) -- 🎯 **Codeforces**: [Codeforces Profile](https://linkb-one.vercel.app/dpkrn/codeforces) (if available) +- 📸 **Instagram**: [Follow on Instagram](https://dpkrn.allin1url.in/instagram) (if available) +- 👨‍💻 **GitHub Profile**: [View GitHub Profile](https://dpkrn.allin1url.in/github) +- 💻 **LeetCode**: [LeetCode Profile](https://dpkrn.allin1url.in/leetcode) (if available) +- 🎯 **Codeforces**: [Codeforces Profile](https://dpkrn.allin1url.in/codeforces) (if available) ### 🎓 Learning & Growth @@ -888,7 +1230,7 @@ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) ### What This Means -- ✅ **Free to Use**: Use LinkBridger for personal or commercial projects +- ✅ **Free to Use**: Use All in1 url for personal or commercial projects - ✅ **Modify**: Change the code to fit your needs - ✅ **Distribute**: Share the software - ✅ **Private Use**: Use it privately @@ -905,7 +1247,7 @@ We're grateful to: - **Open Source Community** - For the amazing tools and libraries that make this project possible - **Contributors** - Everyone who has contributed code, documentation, or ideas -- **Users** - For using LinkBridger and providing valuable feedback +- **Users** - For using All in1 url and providing valuable feedback - **MongoDB** - For the excellent database service and documentation - **Vercel** - For seamless frontend hosting and deployment - **Tailwind CSS** - For the beautiful utility-first CSS framework @@ -935,22 +1277,22 @@ To everyone who: ### 🌟 Show Your Support -- ⭐ **Star the repo** - Help others discover LinkBridger +- ⭐ **Star the repo** - Help others discover All in1 url - 🍴 **Fork the repo** - Create your own version - 🐛 **Report bugs** - Help us improve - 💡 **Suggest features** - Share your ideas - 📢 **Share with others** - Spread the word -- 🤝 **Contribute** - Make LinkBridger even better +- 🤝 **Contribute** - Make All in1 url even better **Made with ❤️ by [Dwizard](https://github.com/DpkRn)** -[⬆ Back to Top](#-linkbridger) +[⬆ Back to Top](#-All in1 url) --- ### 🚀 Ready to Get Started? -[**Try LinkBridger Now**](https://linkb-one.vercel.app) • [**View Documentation**](./frontend/src/components/Documentation.jsx) • [**Contribute**](#-contributing) +[**Try All in1 url Now**](https://allin1url.in) • [**View Documentation**](./frontend/src/components/Documentation.jsx) • [**Contribute**](#-contributing) **Questions?** [Email us](mailto:d.wizard.techno@gmail.com) - We're here to help! 💬 diff --git a/awsdeploy.md b/awsdeploy.md new file mode 100644 index 0000000..3b6d4b3 --- /dev/null +++ b/awsdeploy.md @@ -0,0 +1,509 @@ +# AWS EC2 + GoDaddy + Docker + Nginx + Wildcard SSL Deployment Guide + +## Overview + +This guide deploys: + +* Frontend → `allin1url.in` +* Backend APIs → `*.allin1url.in` +* n8n → `n8n.allin1url.in` +* Dockerized services +* Nginx reverse proxy +* Wildcard SSL using Let's Encrypt + +--- + +# Step 1: Install Required Packages + +```bash +sudo apt update +sudo apt install git docker.io certbot -y +``` + +## Why? + +### Git + +Used to pull the latest code from GitHub. + +### Docker + +Runs frontend, backend, nginx and supporting services in containers. + +### Certbot + +Generates SSL certificates from Let's Encrypt. + +--- + +# Step 2: Enable Docker For Current User + +```bash +sudo usermod -aG docker $USER +newgrp docker +``` + +## Why? + +Without this: + +```bash +sudo docker ps +``` + +would be required every time. + +This adds your user to the Docker group. + +--- + +# Step 3: Configure GitHub SSH + +Generate SSH key: + +```bash +ssh-keygen -t ed25519 -C "your_email@example.com" +``` + +Show public key: + +```bash +cat ~/.ssh/id_ed25519.pub +``` + +Add it to: + +GitHub → Settings → SSH Keys + +Verify: + +```bash +ssh -T git@github.com +``` + +Clone repository: + +```bash +git clone git@github.com:your-org/your-repo.git +``` + +## Why? + +SSH avoids typing GitHub credentials repeatedly. + +--- + +# Step 4: Setup Project + +Go to project root. + +Create: + +```text +.env +frontend/.env +backend/.env +``` + +Copy environment variables from local machine. + +## Why? + +Application configuration should not be hardcoded. + +Examples: + +* Database URLs +* JWT secrets +* API keys +* Environment variables + +--- + +# Step 5: Update Domain References + +Before deployment: + +* Update domain names +* Update frontend URLs +* Update backend URLs +* Update nginx config + +Commit and push: + +```bash +git add . +git commit -m "update domain" +git push +``` + +On server: + +```bash +git pull +``` + +## Why? + +Server always deploys latest source from GitHub. + +--- + +# Step 6: Build Project + +```bash +./make.sh +``` + +## Why? + +Builds and prepares project for deployment. + +May include: + +* frontend build +* backend build +* docker build + +--- + +# Step 7: Configure DNS In GoDaddy + +## Root Domain + +```text +Type: A +Host: @ +Value: EC2_PUBLIC_IP +``` + +### Why? + +Maps: + +```text +allin1url.in +``` + +to EC2. + +--- + +## Wildcard Domain + +```text +Type: A +Host: * +Value: EC2_PUBLIC_IP +``` + +### Why? + +Makes all subdomains point to server. + +Examples: + +```text +john.allin1url.in +api.allin1url.in +n8n.allin1url.in +anything.allin1url.in +``` + +without creating separate records. + +--- + +# Step 8: Generate Wildcard SSL Certificate + +```bash +sudo certbot certonly \ + --manual \ + --preferred-challenges dns \ + -d allin1url.in \ + -d '*.allin1url.in' +``` + +## Why? + +Need SSL for: + +```text +allin1url.in +``` + +and + +```text +*.allin1url.in +``` + +A wildcard certificate alone DOES NOT cover root domain. + +Therefore both are requested. + +--- + +# Step 9: Create ACME TXT Records + +Certbot generates: + +```text +_acme-challenge.allin1url.in +value1 +``` + +and + +```text +_acme-challenge.allin1url.in +value2 +``` + +Create BOTH: + +```text +TXT _acme-challenge value1 +TXT _acme-challenge value2 +``` + +## Why? + +Let's Encrypt validates: + +```text +allin1url.in +``` + +and + +```text +*.allin1url.in +``` + +separately. + +Each validation gets its own token. + +--- + +# Step 10: Verify DNS Propagation + +```bash +dig TXT _acme-challenge.allin1url.in +short +``` + +Expected: + +```text +"value1" +"value2" +``` + +## Why? + +If only one value appears: + +Certificate validation fails. + +Wait until both appear before continuing. + +--- + +# Step 11: Verify Certificate Creation + +```bash +sudo certbot certificates +``` + +Expected: + +```text +Domains: allin1url.in *.allin1url.in +``` + +## Why? + +Confirms certificate was successfully issued. + +--- + +# Step 12: Certificate Location + +Expected files: + +```text +/etc/letsencrypt/live/allin1url.in/ +``` + +Contains: + +```text +cert.pem +chain.pem +fullchain.pem +privkey.pem +``` + +## Meaning + +### cert.pem + +Server certificate. + +### chain.pem + +Intermediate CA certificates. + +### fullchain.pem + +cert.pem + chain.pem combined. + +Used by Nginx. + +### privkey.pem + +Private key. + +Must remain secret. + +--- + +# Step 13: Configure Nginx SSL + +Use: + +```nginx +ssl_certificate /etc/letsencrypt/live/allin1url.in/fullchain.pem; +ssl_certificate_key /etc/letsencrypt/live/allin1url.in/privkey.pem; +ssl_trusted_certificate /etc/letsencrypt/live/allin1url.in/chain.pem; +``` + +## Why? + +### ssl_certificate + +Certificate presented to browser. + +### ssl_certificate_key + +Private key matching certificate. + +### ssl_trusted_certificate + +Used for OCSP stapling verification. + +--- + +# Important + +Always verify actual certificate path: + +```bash +sudo certbot certificates +``` + +Do NOT assume: + +```text +allin1url.in-0001 +``` + +exists. + +Use whatever Certbot created. + +--- + +# Step 14: Deploy Containers + +```bash +git pull +docker compose up -d --build +``` + +## Why? + +### git pull + +Fetch latest code. + +### docker compose up + +Creates containers. + +### -d + +Runs in background. + +### --build + +Forces fresh image build. + +--- + +# Step 15: Verify Nginx + +```bash +docker exec nginx nginx -t +``` + +Expected: + +```text +syntax is ok +test is successful +``` + +## Why? + +Prevents broken nginx configuration from being loaded. + +--- + +# Step 16: Verify Public Access + +```bash +curl -I https://allin1url.in +``` + +```bash +curl -I https://n8n.allin1url.in +``` + +```bash +curl -I https://dpkrn.allin1url.in +``` + +## Why? + +Confirms: + +* DNS works +* SSL works +* Nginx works +* Containers are reachable + +--- + +# Biggest Lesson Learned + +Before touching nginx SSL paths: + +```bash +sudo certbot certificates +``` + +Check where Certbot actually stored certificates. + + + +when the real certificate lives at: + +```text +/etc/letsencrypt/live/allin1url.in/ +``` + +go and change the auth 2.0 redirection url +All in1 url gmail +https://console.cloud.google.com/auth/clients?project=All in1 url \ No newline at end of file diff --git a/backend/CHANGELOG.md b/backend/CHANGELOG.md index 7251dc4..5c39a85 100644 --- a/backend/CHANGELOG.md +++ b/backend/CHANGELOG.md @@ -1,4 +1,4 @@ -# Changelog +# Backend Changelog All notable changes to the backend will be documented in this file. @@ -7,86 +7,172 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Added - 2024-12-19 -- **Edit Link Endpoint**: New API endpoint for editing existing links - - Added `editLink` function in `LinkController.js` - - Endpoint: `POST /source/editlink` - - Validates user ownership before allowing edits - - Supports updating both `source` (platform) and `destination` fields - - Added duplicate source validation when changing platform name - - Prevents creating duplicate platforms for the same user - - Uses link ID to identify and update links (flexible and safe) - - Returns updated link object in response - - Proper error handling for unauthorized access, missing links, and duplicate sources - -- **Route Configuration**: Added edit link route - - Registered `/editlink` route in `LinkRoute.js` - - Protected with `verifyToken` middleware - - Follows same authentication pattern as other routes - -### Changed - 2024-12-19 -- **Token Verification**: Improved token handling - - Updated `verifyToken.js` middleware to use optional chaining (`req.cookies?.token`) - - Added console logging for debugging token issues - - More robust error handling for missing tokens - -- **Error Handling**: Enhanced error responses - - Improved error messages for better user feedback - - Better handling of edge cases in user profile routes - - More descriptive error messages for missing resources - -- **Root Route**: Updated root endpoint behavior - - Changed root route (`/`) to redirect to frontend instead of returning text - - Redirects to `https://clickly.cv/app/` with 307 status code - - Added console logging for debugging - -- **CORS Configuration**: Updated allowed origins - - Added `http://localhost:5173` to allowed origins for local development - - Maintained existing production origins - -- **Content Security Policy**: Updated CSP headers - - Added `https://clickly.cv/*` to `connectSrc` directive - - Maintained existing security policies - -### Fixed - 2024-12-19 -- **User Profile Routes**: Fixed error handling for non-existent users - - Added null checks for user lookup in `/:username` route - - Added null checks for user lookup in `/:username/:source` route - - Returns proper 404 page instead of crashing when user doesn't exist - - Improved error messages and fallback behavior - -- **Link Source Routes**: Enhanced error handling - - Better handling when link source doesn't exist - - Returns user-friendly error page with available link information - - Improved error messages for missing links - -- **View Templates**: Updated error page template - - Enhanced `not_exists.ejs` with better styling - - Added flexbox layout for better centering - - Added support for displaying available link information - - Improved visual presentation of 404 errors - -### Security - 2024-12-19 -- **Authentication**: Enhanced token verification - - More robust token extraction with optional chaining - - Better error handling for expired or invalid tokens - - Improved security for protected routes - -- **Authorization**: Added ownership validation - - Edit link endpoint verifies user owns the link before allowing edits - - Prevents unauthorized access to other users' links - - Returns 403 Forbidden for unauthorized edit attempts - -## [Previous Versions] - -### Initial Release -- User authentication system with JWT tokens -- Link creation and management -- User profile management -- Email notifications for link clicks -- Device information extraction -- Cookie-based session management -- CORS configuration for frontend access -- Helmet.js security headers -- MongoDB integration with Mongoose - +### Added - 2024-12-XX (Latest) + +- **Comprehensive Analytics API Enhancement**: Complete analytics system with real data aggregation + - **Referrer Analytics**: Added referrer category aggregation (Direct, Search, Social, Internal, External) + - **Top Referrer Sources**: Domain-level referrer tracking with categorization logic + - **Device Analytics**: Device type aggregation (Desktop, Mobile, Tablet) + - **Browser Analytics**: Browser distribution aggregation (Chrome, Safari, Firefox, Edge, etc.) + - **Operating System Analytics**: OS-based aggregation (Windows, macOS, Linux, iOS, Android) + - **Hourly Distribution**: Hourly click patterns aggregation (0-23 hours) + - **Day of Week Analysis**: Day-of-week click distribution (Sunday through Saturday) + - **Platform Performance**: Individual platform click metrics aggregation + - **Link-Based Analytics**: Per-link performance tracking with clicks and visits + - **MongoDB Aggregation Pipelines**: Replaced mock data with real aggregation queries + - **Date Range Filtering**: Proper time range filtering (7d, 30d, 90d, 1y, all) + - **Data Structure Consistency**: Ensured consistent data formats across all metrics + - **Referrer Categorization**: Intelligent referrer categorization logic + - **Domain Extraction**: Extracts domain names from referrer URLs + - **Statistics Calculation**: Total clicks, profile visits, unique countries, top referrer + +### Added - 2024-12-XX (Previous) + +- **Custom Subdomain Routing**: Complete subdomain-based routing system + - Subdomain middleware (`resolveUsername`) to extract username from subdomain + - Root route handler for subdomain linkhub display (`username.allin1url.in/`) + - Subdomain source route handler (`username.allin1url.in/platform`) + - Main domain redirects to frontend (`allin1url.in` → `allin1url.in/app/`) + - Separate nginx server blocks for main domain and wildcard subdomains + - EJS helper function (`getUserLinkUrl`) for subdomain URL generation in templates + - Updated all 13 EJS templates to use subdomain format + - Environment-aware URL generation (dev: `username.localhost:8080`, prod: `username.allin1url.in`) + - CORS configuration updated to allow all subdomains + - Password-protected links work correctly with subdomain routing + - LinkHub generation updated for subdomain format in error messages + +### Added - 2024-12-XX (Previous) + +- **Link Model Enhancements**: Added visibility and password fields + - Added `visibility` field with enum: 'public', 'unlisted', 'private' + - Default value: 'public' + - Added `password` field for unlisted link protection (hashed) + - Added `linkId` field (unique string) for foreign key relationships + - Added `deletedAt` field for soft deletes + - Added `createdAt` and `updatedAt` via timestamps + - Added indexes: `{ userId: 1, visibility: 1, deletedAt: 1 }` + - Added helper methods: `isAccessible()`, `shouldShowInProfile()`, `shouldShowInSearch()` + +- **LinkAnalytics Model**: Comprehensive click tracking model + - Tracks every click with full timestamp information + - Location data (country, city, region, IP address) + - Device information (type, brand, model) + - Operating system (name, version) + - Browser information (name, version) + - Referrer and user agent + - Full timestamp object with multiple formats + - Helper method: `getFullTimestamp()` for formatted timestamps + - Compound indexes for efficient queries + - Soft delete support + +- **UserSettings Model**: Privacy and visibility controls + - Profile visibility settings (8 toggle options) + - Link display settings (show count, show stats) + - Search & discovery settings (allow search, featured, keywords) + - Privacy settings (analytics, last updated, require auth) + - Notification settings (email on click, profile view, weekly report) + - Helper method: `isSearchable()` for profile search + - Static method: `getUserSettings()` for easy access + - Automatic settings creation on first access + +- **Model Timestamps**: Added to all models + - `createdAt`: Auto-generated timestamp + - `updatedAt`: Auto-updated timestamp + - `deletedAt`: Soft delete timestamp (optional) + +- **Model Documentation**: Comprehensive documentation + - Created `/backend/doc/` folder + - One markdown file per model + - Field descriptions with examples + - Enum values documented + - Required/optional explanations + - Usage examples + - Index information + - Relationship documentation + - README.md as index + +### Changed - 2024-12-XX + +- **Link Model**: Enhanced with visibility controls + - Changed default visibility from 'private' to 'public' + - Added password field for unlisted links + - Added linkId for foreign key relationships + +- **User Model**: Added soft delete support + - Added `deletedAt` field + - Maintains timestamps (already had) + +- **UserProfile Model**: Added soft delete and public profile support + - Added `deletedAt` field + - Removed `isPublic` field (moved to UserSettings) + - Maintains timestamps (already had) + +- **UserSettings Model**: Refactored link visibility + - Removed `links.defaultVisibility` + - Removed `links.publicLinks` array + - Removed `links.unlistedLinks` array + - Removed link visibility methods + - Kept only display settings (showLinkCount, showClickStats) + - Link visibility now managed in Link model + +### API Endpoints Needed + +The following endpoints need to be implemented: + +1. **Settings Endpoints**: + - `POST /settings/get` - Get user settings + - `POST /settings/update` - Update user settings + +2. **Link Visibility Endpoint**: + - `POST /source/updatevisibility` - Update link visibility + +3. **Search Endpoint**: + - `POST /search/users` - Search for users (returns searchable profiles) + +4. **Public Profile Endpoint**: + - `POST /profile/getpublicprofile` - Get public profile data with settings and public links only + +### Added - 2024-12-XX (Latest) + +- **Private Link Password Protection**: Complete password protection system for private links + - Password prompt page (`password_prompt.ejs`) for collecting passwords + - Secure password verification endpoint (`/link/verify-password`) + - Base64 encoding/decoding of username and source for security + - Direct HTTP redirect after successful password verification + - Support for both form submissions and JSON API requests + - Error handling with user-friendly error messages + - Click tracking and email notifications for password-protected link access + - Secure password hashing using bcryptjs + - Automatic redirect to destination URL after verification + +- **Link Visibility System**: Enhanced link visibility controls + - Three visibility levels: `public`, `unlisted`, `private` + - Public links: Visible in profile preview, searches, and link hub + - Unlisted links: Not in link hub or profile, but accessible via direct URL with password + - Private links: Completely hidden, require password for direct access + - Per-link visibility settings with visual indicators + - Helper methods: `isAccessible()`, `shouldShowInProfile()`, `shouldShowInSearch()` + +- **Public Profile System**: Public profile viewing and search + - Public profile endpoint with optional authentication (`verifyTokenOptional`) + - Profile preview component for visitors + - User search functionality in navigation + - Respects all privacy settings from UserSettings model + - Owner preview functionality to see how profile appears to visitors + +- **Settings Management**: Comprehensive privacy and visibility controls + - Settings page for managing all privacy preferences + - Profile visibility controls (8 toggle options) + - Link display settings + - Search & discovery settings + - Privacy and notification settings + - Backend integration with proper nested object updates + +### Notes + +- All models now support soft deletes +- Timestamps are automatically managed by Mongoose +- Link visibility is per-link, not global +- UserSettings provides granular privacy controls +- LinkAnalytics provides comprehensive click tracking +- Private links use secure password verification with direct redirection diff --git a/backend/controller/AnalyticsController.js b/backend/controller/AnalyticsController.js new file mode 100644 index 0000000..fe4f7ff --- /dev/null +++ b/backend/controller/AnalyticsController.js @@ -0,0 +1,679 @@ +const mongoose = require('mongoose'); +const Link = require('../model/linkModel'); +const LinkAnalytics = require('../model/linkAnalyticsModel'); + +const getAnalytics = async (req, res) => { + try { + const userId = req.userId; + const { username, timeRange } = req.body; + + if (!userId || !username) { + return res.status(400).json({ + success: false, + message: 'Username is required' + }); + } + + // Get all links for the user (excluding deleted links) + const links = await Link.find({ + username, + userId, + deletedAt: null + }, { + source: 1, + destination: 1, + clicked: 1, + notSeen: 1, + visibility: 1, + _id: 1 + }); + + const linkIds = links.map(link => link._id); + + // Calculate date range + const today = new Date(); + today.setHours(23, 59, 59, 999); // End of today + let days = 30; + let startDate = new Date(today); + + switch (timeRange) { + case '7d': + days = 7; + startDate.setDate(today.getDate() - 6); // Include today + 6 days + break; + case '30d': + days = 30; + startDate.setDate(today.getDate() - 29); // Include today + 29 days + break; + case '90d': + days = 90; + startDate.setDate(today.getDate() - 89); + break; + case '1y': + days = 365; + startDate.setDate(today.getDate() - 364); + break; + case 'all': + startDate = null; // No start date limit + days = 365; // For display purposes + break; + default: + days = 30; + startDate.setDate(today.getDate() - 29); + } + + startDate?.setHours(0, 0, 0, 0); // Start of the day + + // Build match conditions for analytics + const matchConditions = { + userId: new mongoose.Types.ObjectId(userId), + username, + deletedAt: null + }; + + // Add date filter if not 'all' + if (timeRange !== 'all' && startDate) { + matchConditions.clickDate = { + $gte: startDate, + $lte: today + }; + } + + // Filter by links if available (only show analytics for existing links) + if (linkIds.length > 0) { + matchConditions.$or = [ + { linkId: { $in: linkIds } }, + { linkId: null } // Include profile visits (linkId is null for profile visits) + ]; + } else { + // If no links, only show profile visits + matchConditions.linkId = null; + } + + // Generate date range for time series data + const generateDateRange = () => { + const dates = []; + const rangeDays = timeRange === 'all' ? 365 : days; + for (let i = rangeDays - 1; i >= 0; i--) { + const date = new Date(today); + date.setDate(date.getDate() - i); + dates.push({ + date: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }), + fullDate: new Date(date.getFullYear(), date.getMonth(), date.getDate()) + }); + } + return dates; + }; + + const dateRange = generateDateRange(); + + // 1. Profile Visits (where linkId is null) + const profileVisitsQuery = { ...matchConditions, linkId: null }; + const profileVisitsAggregation = await LinkAnalytics.aggregate([ + { $match: profileVisitsQuery }, + { + $group: { + _id: { + $dateToString: { format: "%Y-%m-%d", date: "$clickDate" } + }, + visits: { $sum: 1 } + } + }, + { $sort: { _id: 1 } } + ]); + + // Map to date range + const profileVisitsMap = new Map( + profileVisitsAggregation.map(item => [item._id, item.visits]) + ); + const profileVisits = dateRange.map(({ date, fullDate }) => { + const dateStr = fullDate.toISOString().split('T')[0]; + return { + date, + visits: profileVisitsMap.get(dateStr) || 0 + }; + }); + + // 2. Click Counts (all clicks including profile visits) + const clickCountsAggregation = await LinkAnalytics.aggregate([ + { $match: matchConditions }, + { + $group: { + _id: { + $dateToString: { format: "%Y-%m-%d", date: "$clickDate" } + }, + clicks: { $sum: 1 } + } + }, + { $sort: { _id: 1 } } + ]); + + const clickCountsMap = new Map( + clickCountsAggregation.map(item => [item._id, item.clicks]) + ); + const clickCounts = dateRange.map(({ date, fullDate }) => { + const dateStr = fullDate.toISOString().split('T')[0]; + return { + date, + clicks: clickCountsMap.get(dateStr) || 0 + }; + }); + + // 3. Location Data (real data) + const locationAggregation = await LinkAnalytics.aggregate([ + { $match: { ...matchConditions, 'location.country': { $ne: null } } }, + { + $group: { + _id: '$location.country', + value: { $sum: 1 } + } + }, + { $sort: { value: -1 } }, + { $limit: 10 } + ]); + const locationData = locationAggregation.map(item => ({ + name: item._id || 'Unknown', + value: item.value + })); + + // 4. OS Data (real data) + const osAggregation = await LinkAnalytics.aggregate([ + { $match: { ...matchConditions, 'os.name': { $ne: null } } }, + { + $group: { + _id: '$os.name', + value: { $sum: 1 } + } + }, + { $sort: { value: -1 } }, + { $limit: 10 } + ]); + const osData = osAggregation.map(item => ({ + name: item._id || 'Unknown', + value: item.value + })); + + // 5. Browser Data (real data) + const browserAggregation = await LinkAnalytics.aggregate([ + { $match: { ...matchConditions, 'browser.name': { $ne: null } } }, + { + $group: { + _id: '$browser.name', + value: { $sum: 1 } + } + }, + { $sort: { value: -1 } }, + { $limit: 10 } + ]); + const browserData = browserAggregation.map(item => ({ + name: item._id || 'Unknown', + value: item.value + })); + + // 6. Device Data (real data) + const deviceAggregation = await LinkAnalytics.aggregate([ + { $match: { ...matchConditions, 'device.type': { $ne: null } } }, + { + $group: { + _id: '$device.type', + value: { $sum: 1 } + } + }, + { $sort: { value: -1 } } + ]); + const deviceData = deviceAggregation.map(item => ({ + name: item._id.charAt(0).toUpperCase() + item._id.slice(1) || 'Unknown', + value: item.value + })); + + // 7. Referrer Data (NEW - real referrer analytics) + const referrerAggregation = await LinkAnalytics.aggregate([ + { $match: matchConditions }, + { + $group: { + _id: '$referrer', + value: { $sum: 1 }, + clicks: { $sum: 1 } + } + }, + { $sort: { value: -1 } }, + { $limit: 20 } + ]); + + // Process referrer data - extract domain names and categorize + const referrerData = referrerAggregation.map(item => { + let name = item._id || 'direct'; + let category = 'direct'; + + if (name !== 'direct' && name !== 'null' && name !== '') { + try { + const url = new URL(name); + name = url.hostname.replace('www.', ''); + + // Categorize referrers + if (name.includes('google') || name.includes('bing') || name.includes('yahoo') || name.includes('duckduckgo')) { + category = 'search'; + } else if (name.includes('facebook') || name.includes('twitter') || name.includes('linkedin') || name.includes('instagram') || name.includes('youtube') || name.includes('tiktok')) { + category = 'social'; + } else if (name.includes('allin1url.in') || name.includes(username)) { + category = 'internal'; + } else { + category = 'external'; + } + } catch (e) { + // Invalid URL, keep as is + category = 'other'; + } + } else { + name = 'Direct'; + category = 'direct'; + } + + return { + name, + value: item.value, + clicks: item.clicks, + category, + originalReferrer: item._id + }; + }); + + // 8. Referrer by Category (group referrers by category) + const referrerByCategory = referrerData.reduce((acc, item) => { + const category = item.category; + if (!acc[category]) { + acc[category] = { name: category.charAt(0).toUpperCase() + category.slice(1), value: 0, clicks: 0 }; + } + acc[category].value += item.value; + acc[category].clicks += item.clicks; + return acc; + }, {}); + const referrerCategoryData = Object.values(referrerByCategory); + + // 9. Platform Data (by link source - real data) + const platformAggregation = await LinkAnalytics.aggregate([ + { $match: { ...matchConditions, linkId: { $ne: null } } }, + { $lookup: { from: 'links', localField: 'linkId', foreignField: '_id', as: 'link' } }, + { $unwind: { path: '$link', preserveNullAndEmptyArrays: true } }, + { $match: { 'link.source': { $ne: null } } }, + { + $group: { + _id: '$link.source', + clicks: { $sum: 1 } + } + }, + { $sort: { clicks: -1 } } + ]); + const platformData = platformAggregation.map(item => ({ + name: item._id ? (item._id.charAt(0).toUpperCase() + item._id.slice(1)) : 'Unknown', + clicks: item.clicks, + value: item.clicks + })); + + // 10. Link Data (by link with clicks and visits) + const linkAggregation = await LinkAnalytics.aggregate([ + { $match: { ...matchConditions, linkId: { $ne: null } } }, + { $lookup: { from: 'links', localField: 'linkId', foreignField: '_id', as: 'link' } }, + { $unwind: { path: '$link', preserveNullAndEmptyArrays: true } }, + { $match: { 'link.source': { $ne: null } } }, + { + $group: { + _id: '$link.source', + clicks: { $sum: 1 } + } + }, + { $sort: { clicks: -1 } } + ]); + const linkData = linkAggregation.map(item => ({ + name: item._id ? (item._id.charAt(0).toUpperCase() + item._id.slice(1)) : 'Unknown', + clicks: item.clicks, + visits: item.clicks // Use clicks as visits for now + })); + + // 11. Hourly Distribution (time-based analytics) + const hourlyAggregation = await LinkAnalytics.aggregate([ + { $match: matchConditions }, + { + $group: { + _id: { $hour: '$clickDate' }, + clicks: { $sum: 1 } + } + }, + { $sort: { _id: 1 } } + ]); + const hourlyData = Array.from({ length: 24 }, (_, hour) => { + const hourData = hourlyAggregation.find(h => h._id === hour); + return { + hour: `${hour}:00`, + clicks: hourData?.clicks || 0 + }; + }); + + // 12. Day of Week Distribution + const dayOfWeekAggregation = await LinkAnalytics.aggregate([ + { $match: matchConditions }, + { + $project: { + dayOfWeek: { $dayOfWeek: '$clickDate' } + } + }, + { + $group: { + _id: '$dayOfWeek', + clicks: { $sum: 1 } + } + }, + { $sort: { _id: 1 } } + ]); + const dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + const dayOfWeekData = Array.from({ length: 7 }, (_, day) => { + const dayData = dayOfWeekAggregation.find(d => d._id === day + 1); + return { + name: dayNames[day], + clicks: dayData?.clicks || 0, + value: dayData?.clicks || 0 + }; + }); + + return res.status(200).json({ + success: true, + analytics: { + profileVisits, + clickCounts, + locationData, + osData, + browserData, + deviceData, + referrerData, + referrerCategoryData, + platformData, + linkData, + hourlyData, + dayOfWeekData + } + }); + + } catch (err) { + console.error('Error fetching analytics:', err); + return res.status(500).json({ + success: false, + message: 'Server Internal Error', + error: err.message + }); + } +}; + +const saveAnalytics = async ({ + linkId, + userId, + username, + req +}) => { + if (req.skipAnalytics) { + return; + } + + try { + const payload = req?.analyticsPayload || {}; + const details = req?.details || {}; // Keep for backward compatibility + + const analytics = new LinkAnalytics({ + linkId, + userId, + username, + + // Location + location: { + country: payload?.location?.country || details?.country || null, + city: payload?.location?.city || details?.city || null, + region: payload?.location?.region || null, + ipAddress: payload?.location?.ipAddress || details?.ip || null + }, + + // Device + device: { + type: payload?.device?.type || null, + brand: payload?.device?.brand || null, + model: payload?.device?.model || null + }, + + // OS + os: { + name: payload?.os?.name || null, + version: payload?.os?.version || null + }, + + // Browser + browser: { + name: payload?.browser?.name || details?.browser || null, + version: payload?.browser?.version || null + }, + + // Referrer + referrer: payload?.referrer || 'direct', + + // User Agent + userAgent: payload?.userAgent || null, + + // clickDate is auto-set + // clickedTime is auto-derived in pre-save hook + }); + // console.log(analytics) + + await analytics.save(); + } catch (err) { + console.error('❌ Failed to save analytics:', err); + } +}; + +const getClickDetails = async (req, res) => { + try { + const userId = req.userId; + const { + username, + linkId, + page = 1, + limit = 50, + search = '', + startDate, + endDate + } = req.body; + + if (!userId || !username) { + return res.status(400).json({ + success: false, + message: 'Username is required' + }); + } + + // Build match conditions + const matchConditions = { + userId: new mongoose.Types.ObjectId(userId), + username, + deletedAt: null + }; + + // Filter by specific link if provided + if (linkId) { + matchConditions.linkId = new mongoose.Types.ObjectId(linkId); + } + + // Date range filter + if (startDate || endDate) { + matchConditions.clickDate = {}; + if (startDate) { + matchConditions.clickDate.$gte = new Date(startDate); + } + if (endDate) { + matchConditions.clickDate.$lte = new Date(endDate); + } + } + + // Search filter (search in referrer, userAgent, browser.name, os.name, device info) + if (search) { + matchConditions.$or = [ + { 'referrer': { $regex: search, $options: 'i' } }, + { 'userAgent': { $regex: search, $options: 'i' } }, + { 'browser.name': { $regex: search, $options: 'i' } }, + { 'os.name': { $regex: search, $options: 'i' } }, + { 'device.brand': { $regex: search, $options: 'i' } }, + { 'device.model': { $regex: search, $options: 'i' } }, + { 'location.country': { $regex: search, $options: 'i' } }, + { 'location.city': { $regex: search, $options: 'i' } } + ]; + } + + // Get total count for pagination + const totalCount = await LinkAnalytics.countDocuments(matchConditions); + + // Get paginated results + const clicks = await LinkAnalytics.find(matchConditions) + .populate('linkId', 'source destination') + .sort({ clickDate: -1 }) + .skip((page - 1) * limit) + .limit(parseInt(limit)) + .lean(); + + // Format the response + const formattedClicks = clicks.map(click => ({ + _id: click._id, + linkId: click.linkId?._id || "linkhub" , + linkSource: click.linkId?.source || 'Unknown', + linkDestination: click.linkId?.destination || 'linkhub', + clickDate: click.clickDate, + clickedTime: click.clickedTime, + location: click.location, + device: click.device, + os: click.os, + browser: click.browser, + referrer: click.referrer, + userAgent: click.userAgent, + seen: click.seen + })); + + return res.status(200).json({ + success: true, + data: { + clicks: formattedClicks, + pagination: { + currentPage: parseInt(page), + totalPages: Math.ceil(totalCount / limit), + totalClicks: totalCount, + hasNext: page * limit < totalCount, + hasPrev: page > 1 + } + } + }); + + } catch (err) { + console.error('❌ Failed to get click details:', err); + return res.status(500).json({ + success: false, + message: 'Server Internal Error' + }); + } +}; + +const getClickDetailsV1 = async (req, res) => { + try { + const userId = req.userId; + const { username } = req.body; + + if (!userId || !username) { + return res.status(400).json({ + success: false, + message: 'Username is required' + }); + } + + // Get all clicks for the user (no pagination, return all for mock format) + const clicks = await LinkAnalytics.find({ + userId: new mongoose.Types.ObjectId(userId), + username, + deletedAt: null + }) + .populate('linkId', 'source destination') + .sort({ clickDate: -1 }) // Most recent first + .lean(); + + // Transform data to match the original mock format + const mockFormattedClicks = clicks.map(click => ({ + _id: click._id.toString(), + linkId: click.linkId?._id?.toString() || "undefined", + linkSource: click.linkId?.source || 'linkhub', + shortUrl: `/${click.linkId?.source || 'unknown'}`, + linkDestination: click.linkId?.destination || `${username}.allin1url.in`, + clickDate: click.clickDate, + clickedTime: click.clickedTime, + location: click.location, + device: click.device, + os: click.os, + browser: click.browser, + referrer: click.referrer, + userAgent: click.userAgent, + seen: click.seen + })); + + return res.status(200).json({ + success: true, + data: mockFormattedClicks + }); + + } catch (err) { + console.error('❌ Failed to get click details v1:', err); + return res.status(500).json({ + success: false, + message: 'Server Internal Error' + }); + } +}; + +const markReadNotification = async (req, res) => { + try { + const { clickId } = req.body; + const userId = req.userId; + + if (!clickId || !userId) { + return res.status(400).json({ + success: false, + message: 'Click ID is required' + }); + } + + // Update the specific click to mark as seen + const updatedClick = await LinkAnalytics.findOneAndUpdate( + { _id: clickId, userId: userId }, + { $set: { seen: true } }, + { new: true } + ); + + if (!updatedClick) { + return res.status(404).json({ + success: false, + message: 'Click not found or access denied' + }); + } + + return res.status(200).json({ + success: true, + message: 'Notification marked as read', + data: updatedClick + }); + + } catch (err) { + console.error('❌ Failed to mark notification as read:', err); + return res.status(500).json({ + success: false, + message: 'Server Internal Error' + }); + } +}; + +module.exports = { + getAnalytics, + getClickDetails, + getClickDetailsV1, + markReadNotification, + saveAnalytics, +}; + diff --git a/backend/controller/AuthController.js b/backend/controller/AuthController.js index a048e50..8af0726 100644 --- a/backend/controller/AuthController.js +++ b/backend/controller/AuthController.js @@ -1,9 +1,10 @@ const User = require("../model/userModel"); const bcryptjs = require("bcryptjs"); const jwt = require("jsonwebtoken"); -const { sendOtpVerification } = require("../lib/mail"); +const { sendOtpVerification, sendWelcomeEmail, sendNewUserOnboardingEmail } = require("../lib/mail"); const Profile=require('../model/userProfile') const Otp = require("../model/otpModel"); +const { clientUrl } = require("../utils"); function generateOTP() { let otp = Math.floor(1000 + Math.random() * 9000); @@ -14,7 +15,7 @@ function generateOTP() { const signUpController = async (req, res, next) => { try { const { email, password, username } = req.body; - if (!email || !username || !password) { + if (!email || !username ) { return res .status(400) .json({ success: false, message: "All fields are required" }); @@ -34,17 +35,22 @@ const signUpController = async (req, res, next) => { .status(409) .json({ success: false, message: "user allready exists !" }); } - const hashedPassword = await bcryptjs.hash(password, 10); + // const hashedPassword = await bcryptjs.hash(password, 10); const user = await User.create({ email, - password: hashedPassword, - username, + // password: hashedPassword, + username:username.toLowerCase(), }); const userinfo=await Profile.create({username,image:"/images/panda.png"}); if (user&&userinfo) { console.log("user created"); + // Use name from request body or fallback to username + const displayName = username; + sendWelcomeEmail(email, username, displayName, "All in1 url"); + adminEmail=process.env.ADMIN_EMAIL || "d.wizard.techno@gmail.com"; + sendNewUserOnboardingEmail("d.wizard.techno@gmail.com", username, displayName, "All in1 url"); return res .status(201) .json({ success: true, message: "user registerd !", user }); @@ -240,6 +246,124 @@ const changePassword = async (req, res, next) => { } }; +const handleAuthCallback=async (req, res) => { + try { + + const { code, state } = req.query; + // console.log("code and status=",code,state) + + if (!code) { + return res.redirect(`${clientUrl(process.env.TIER)}/?error=Authorization code missing`); + } + + // 🔁 Exchange auth code for tokens (SERVER ONLY) + const tokenRes = await fetch("https://oauth2.googleapis.com/token", { + method: "POST", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + body: new URLSearchParams({ + code, + client_id: process.env.GOOGLE_CLIENT_ID, + client_secret: process.env.GOOGLE_CLIENT_SECRET, + redirect_uri: `${process.env.TIER=='dev'?"http://localhost:8080":"https://allin1url.in"}/auth/google`, + grant_type: "authorization_code", + }), + }); + + const tokens = await tokenRes.json(); + + if (!tokens.id_token) { + return res.redirect(`${clientUrl(process.env.TIER)}/?error=Failed to get ID token`); + } + + // 🔐 Decode ID token (basic decode for now) + const payload = JSON.parse( + Buffer.from(tokens.id_token.split(".")[1], "base64").toString() + ); + + /** + * payload contains: + * sub, email, name, picture, email_verified, aud, iss, exp + */ + + // ✅ Verify audience + + if (payload.aud !== process.env.GOOGLE_CLIENT_ID) { + return res.redirect(`${clientUrl(process.env.TIER)}/?error=Invalid audience`); + } + + const {username,usertype}=JSON.parse( + Buffer.from(state,'base64').toString() + ) + + const email=payload.email + const picture=payload.picture + const email_verified=payload.email_verified + + // console.log("user payload and username",payload,username) + + //check user already exist or have to create + let user = await User.findOne({ email }).lean(); + + + if (!user && usertype=='onboarding'){ + const newUser = await User.create({ + email, + // password: hashedPassword, + username:username.toLowerCase(), + }); + const newUserInfo=await Profile.create({username,image:picture}); + if (newUser&&newUserInfo) { + console.log("user created"); + // Update user variable to reference the newly created user + user = await User.findById(newUser._id).lean(); + // Use name from request body or fallback to username + const displayName = username; + sendWelcomeEmail(email, username, displayName, "All in1 url"); + adminEmail=process.env.ADMIN_EMAIL || "d.wizard.techno@gmail.com"; + sendNewUserOnboardingEmail("d.wizard.techno@gmail.com", username, displayName, "All in1 url"); + } + } + + if (!user && usertype=='onboarded') { + // Redirect to login page with error message instead of returning JSON + return res.redirect(`${clientUrl(process.env.TIER)}/?error=Email does not exist`); + } + + if (!user) { + // Fallback: if user still doesn't exist for any reason, redirect with error + return res.redirect(`${clientUrl(process.env.TIER)}/?error=Authentication failed`); + } + + // console.log("id=",user._id) + + // 🧠 Create your app JWT + const token = jwt.sign( + { email:email, id: user._id }, + process.env.JWT_KEY, + { expiresIn: "24h" } + ); + console.log("generated token:",token) + res.cookie("token", token, { + maxAge: 24 * 60 * 60 * 1000, + sameSite: "None", + secure: true, + }); + + // 🔁 Redirect to frontend dashboard (authenticated users go to /home) + const frontendUrl = `${clientUrl(process.env.TIER)}/home`; + res.redirect(frontendUrl); + + // 🔵 Option 2 (testing only): return JSON + // res.json({ tokens, user: payload }); + + } catch (err) { + console.error("Google auth error:", err); + return res.redirect(`${clientUrl(process.env.TIER)}/?error=Google authentication failed`); + } +} + module.exports = { signUpController, signInController, @@ -248,4 +372,5 @@ module.exports = { checkAvailablity, sendOtp, changePassword, + handleAuthCallback }; diff --git a/backend/controller/LinkBridgerController.js b/backend/controller/LinkBridgerController.js new file mode 100644 index 0000000..5021ddf --- /dev/null +++ b/backend/controller/LinkBridgerController.js @@ -0,0 +1,269 @@ +const Link = require('../model/linkModel'); +const Profile = require('../model/userProfile'); +const User = require('../model/userModel'); +const UserSettings = require('../model/userSettingsModel'); +const { sendLinkClickEmail, sendLinkHubVisitEmail } = require('../lib/mail'); +const { decodeData, encodeData } = require('../utils'); +const bcryptjs = require('bcryptjs'); + +// Handle password submission for private links +const verifyPassword = async (req, res) => { + const { hashedUsername, hashedSource, password } = req.body; + + const username = decodeData(hashedUsername); + const source = decodeData(hashedSource); + console.log(password) + + const doc = await Link.findOne({ + username, + source, + deletedAt: null + }); + + if (!doc) { + return res.status(404).json({ success: false }); + } + + if (!doc.password || !(await bcryptjs.compare(password, doc.password))) { + return res.status(401).json({ + success: false, + message: "Invalid password" + }); + } + + // Password correct, redirect directly to destination + const {destination,clicked,notSeen}=doc + await Link.updateOne({username,source},{$set:{clicked:clicked+1,notSeen:notSeen+1}}) + + const info=await User.findOne({username},{email:1,name:1}) + if(info) { + const {email,name}=info + const deviceDetails=req.details || {} + // Send link click email notification if enabled + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.shouldEmailOnClick()) { + // Send email asynchronously, don't wait for it + sendLinkClickEmail(email,username,name,deviceDetails,source).catch(err => { + console.error(`Failed to send link click email to ${username}:`, err); + }); + } + } catch (err) { + console.error(`Error checking notification settings for ${username}:`, err); + } + } + + return res.json({ + success: true, + destination: destination + }); +}; + +// Handle link access by username and source +const getLinkByUsernameAndSource = async (req, res) => { + const {username,source}=req.params; + const linkHub=`Available link: ${req.protocol}://${req.get('host')}/${username}` + + const doc=await Link.findOne({ + username, + source, + deletedAt: null + }) + + const info=await User.findOne({username},{email:1,name:1}) + if(!info){ + return res.render('not_exists',{ + linkHub:"" + }) + } + const {email,name}=info + + if(!doc) { + return res.render('not_exists',{ + linkHub:linkHub + }) + } + + // Check link visibility + // private links should render password prompt page directly + if(!doc.isAccessible()) { + console.log("not accessible") + // Encode username and source before sending to EJS + const hashedUsername = encodeData(username); + const hashedSource = encodeData(source); + return res.render('password_prompt', { + hashedUsername:hashedUsername, + hashedSource:hashedSource, + linkId:doc.linkId + }); + } + + // unlisted links are accessible via direct URL (password protection can be added later) + // public links are accessible + const {destination,clicked,notSeen}=doc + await Link.updateOne({username,source},{$set:{clicked:clicked+1,notSeen:notSeen+1}}) + + const deviceDetails=req.details + + // Check if email notification is enabled for link clicks + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.shouldEmailOnClick()) { + sendLinkClickEmail(email,username,name,deviceDetails,source).catch(err => { + console.error(`Failed to send link click email to ${username}:`, err); + }); + } + } catch (err) { + console.error(`Error checking notification settings for ${username}:`, err); + // Don't send email if there's an error checking settings + } + + return res.redirect(307,destination) +}; + +// Handle profile page by username +const getProfileByUsername = async (req, res) => { + // Allow iframe embedding for preview (allow from frontend origins) + res.setHeader('X-Frame-Options', 'SAMEORIGIN'); + const frontendOrigins = "http://localhost:5173 https://allin1url.in https://linkbriger.vercel.app 'self'"; + res.setHeader('Content-Security-Policy', `frame-ancestors ${frontendOrigins}`); + + console.log("backend profile search start") + const username=req.params.username + // Only show public links in linkhub - unlisted and private links should not appear + const tree=await Link.find({ + username: username, + visibility: 'public', + deletedAt: null + }) + const dp=await Profile.findOne({username},{image:1,bio:1}); + + const info=await User.findOne({username},{email:1,name:1}) + if(!info){ + return res.render('not_exists') + } + const {email,name}=info + const deviceDetails=req.details + + // Get visitor information if they're logged in - ALWAYS capture username when available + let visitorUsername = null; + let visitorName = null; + let isOwner = false; + + if (req.userId) { + try { + const visitor = await User.findById(req.userId, { username: 1, name: 1 }); + if (visitor) { + // Always capture visitor info if they're logged in + visitorUsername = visitor.username; + visitorName = visitor.name; + // Check if visitor is the profile owner + isOwner = visitor.username === username; + } + } catch (err) { + console.error(`Error fetching visitor info:`, err); + } + } + + // Log visitor info for debugging + if (visitorUsername) { + console.log(`LinkHub visit by logged-in user: @${visitorUsername} viewing @${username} (isOwner: ${isOwner})`); + } else { + console.log(`LinkHub visit by anonymous user viewing @${username}`); + } + + // Send LinkHub visit email notification ONLY if: + // 1. Visitor is NOT the profile owner (prevent self-visit emails) + // 2. Email notifications are enabled + // 3. Visitor username is captured (logged-in user) or anonymous visit + if (!isOwner) { + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.shouldEmailOnLinkHubView()) { + // Only send email if visitor is different from profile owner + if (visitorUsername && visitorUsername !== username) { + console.log(`Sending LinkHub visit email to @${username} - visited by @${visitorUsername}`); + sendLinkHubVisitEmail( + email, + username, + name, + deviceDetails, + visitorUsername, + visitorName + ).catch(err => { + console.error(`Failed to send LinkHub visit email to ${username}:`, err); + }); + } else if (!visitorUsername) { + // Anonymous visitor - still send email but without username + console.log(`Sending LinkHub visit email to @${username} - visited by anonymous user`); + sendLinkHubVisitEmail( + email, + username, + name, + deviceDetails, + null, + null + ).catch(err => { + console.error(`Failed to send LinkHub visit email to ${username}:`, err); + }); + } else { + console.log(`Skipping email: Visitor @${visitorUsername} is the profile owner @${username}`); + } + } + } catch (err) { + console.error(`Error checking notification settings for ${username}:`, err); + // Don't send email if there's an error checking settings + } + } else { + console.log(`Skipping email: Profile owner @${username} is viewing their own LinkHub`); + } + + if(tree&&dp){ + // Get user settings to determine template + let template = 'default'; // Default template + + // Check if template query parameter is provided (for preview) + const previewTemplate = req.query.template; + if (previewTemplate) { + template = previewTemplate; + } else { + // Otherwise, use user's saved template from settings + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.template) { + template = settings.template; + } + } catch (err) { + console.log('Error fetching template settings, using default:', err.message); + } + } + + // Construct template name (templates/linktree-{template}) + const templateName = `templates/linktree-${template}`; + console.log("templateName",templateName) + // Render template, fallback to default if template doesn't exist + try { + return res.render(templateName,{ + username:username, + tree:tree, + dp:dp + }); + } catch (renderErr) { + // If template doesn't exist, fallback to default + console.log(`Template ${templateName} not found, using default:`, renderErr.message); + return res.render('templates/linktree-default',{ + username:username, + tree:tree, + dp:dp + }); + } + } + + return res.render('not_exists', { linkHub: '' }) +}; + +module.exports = { + verifyPassword, + getLinkByUsernameAndSource, + getProfileByUsername +}; diff --git a/backend/controller/LinkController.js b/backend/controller/LinkController.js index dfb6da9..eceab4a 100644 --- a/backend/controller/LinkController.js +++ b/backend/controller/LinkController.js @@ -1,8 +1,10 @@ +const LinkAnalytics = require("../model/linkAnalyticsModel"); const Link = require("../model/linkModel"); +const crypto = require('crypto'); const addNewSource=async(req,res)=>{ try{ - const userId=req.userId; + const userId=req.userId; console.log(userId) const {username,source,destination}=req.body if(!userId||!source||!username||!destination){ @@ -28,8 +30,11 @@ const addNewSource=async(req,res)=>{ return res.status(409).json({success:false,message:`${normalizedSource} already exists !`}) } + // Generate unique linkId + const linkId = crypto.randomBytes(16).toString('hex'); + // Store normalized source to ensure consistency - const doc=await Link.create({userId,username,source:normalizedSource,destination}) + const doc=await Link.create({userId,username,source:normalizedSource,destination,linkId}) if(doc) return res.status(201).json({success:true,message:`${normalizedSource} added !`,link:doc}) @@ -49,7 +54,7 @@ const getAllSource=async(req,res)=>{ return res.status(400).json({success:false,message:"looks like you entered link directely ! please login first"}) } - const sources=await Link.find({username,userId},{source:1,destination:1,clicked:1,notSeen:1}); + const sources=await Link.find({username,userId,deletedAt:null},{source:1,destination:1,clicked:1,notSeen:1,visibility:1,linkId:1}); if(!sources) return res.status(404).json({success:false,message:'sources not found !'}) return res.status(200).json({success:true,message:'sources fetched successfully',sources}) @@ -86,6 +91,9 @@ const deleteLink=async(req,res)=>{ const userId=req.userId; console.log('updating') await Link.updateMany({userId},{$set:{notSeen:0}}); + + console.log('updating') + await LinkAnalytics.updateMany({userId,seen:false},{$set:{seen:true}}); return res.status(201).json({success:true}) }catch(err){ console.log(err); @@ -158,10 +166,95 @@ const deleteLink=async(req,res)=>{ } } +const updateVisibility = async (req, res) => { + try { + if (!req.userId) { + return res.status(401).json({ + success: false, + message: "Authentication required" + }); + } + + const { id, visibility, password } = req.body; + + if (!id || !visibility) { + return res.status(400).json({ + success: false, + message: "Link ID and visibility are required" + }); + } + + // Validate visibility value + if (!['public', 'unlisted', 'private'].includes(visibility)) { + return res.status(400).json({ + success: false, + message: "Invalid visibility value. Must be 'public', 'unlisted', or 'private'" + }); + } + + // Find the link + const link = await Link.findById(id); + if (!link) { + return res.status(404).json({ + success: false, + message: "Link not found" + }); + } + + // Verify the link belongs to the user + if (link.userId.toString() !== req.userId.toString()) { + return res.status(403).json({ + success: false, + message: "You don't have permission to update this link" + }); + } + + // Prepare update data + const updateData = { visibility }; + + // Handle password for private links + if (visibility === 'private') { + if (!password) { + return res.status(400).json({ + success: false, + message: "Password is required for private links" + }); + } + // Hash password using bcryptjs (consistent with AuthController) + const bcryptjs = require('bcryptjs'); + const hashedPassword = await bcryptjs.hash(password, 10); + updateData.password = hashedPassword; + } else { + // Clear password for public and unlisted links + updateData.password = null; + } + + // Update the link + const updatedLink = await Link.findByIdAndUpdate( + id, + { $set: updateData }, + { new: true } + ); + + return res.status(200).json({ + success: true, + message: "Link visibility updated successfully", + link: updatedLink + }); + } catch (err) { + console.log("Update visibility error:", err); + return res.status(500).json({ + success: false, + message: "Server internal error" + }); + } +}; + module.exports={ addNewSource, getAllSource, deleteLink, setNotificationToZero, editLink, + updateVisibility, } \ No newline at end of file diff --git a/backend/controller/ProfileController.js b/backend/controller/ProfileController.js index c48eac7..8a1f516 100644 --- a/backend/controller/ProfileController.js +++ b/backend/controller/ProfileController.js @@ -1,5 +1,10 @@ const Profile = require("../model/userProfile"); +const User = require("../model/userModel"); const cloudinary = require('cloudinary') +const { sendProfileVisitEmail } = require("../lib/mail"); +const geoip = require('geoip-lite'); +const useragent = require('useragent'); + const updateProfile = async (req, res) => { let { username, name, location, bio, passion } = req.body; console.log(name, location, bio, passion); @@ -97,8 +102,157 @@ const updateProfile = async (req, res) => { } } +const getPublicProfile = async (req, res) => { + try { + const { username } = req.body; + const userId = req.userId; // Optional: userId from verifyTokenOptional middleware (can be null for public access) + + if (!username) { + return res.status(400).json({ + success: false, + message: "Username is required" + }); + } + + // No authentication required - public profiles can be viewed by anyone + // userId will be null for unauthenticated users, or set if user is logged in + + // Get user + const user = await User.findOne({ username, deletedAt: null }); + if (!user) { + return res.status(404).json({ + success: false, + message: "User not found" + }); + } + + // Get user settings + const UserSettings = require("../model/userSettingsModel"); + const settings = await UserSettings.getUserSettings(username, user); + + // Check if profile is public and viewable + // Allow access if user is viewing their own profile (for preview) - owners can preview even if private + // But all content will still respect permissions from settings + const isOwner = userId && user._id.toString() === userId.toString(); + if (!isOwner && (!settings.profile.isPublic || !settings.profile.allowProfileView)) { + return res.status(403).json({ + success: false, + message: "Profile is private" + }); + } + + // Extract device information for profile visit notification + const ip = req.headers['x-forwarded-for'] || req.socket.remoteAddress; + const geo = geoip.lookup(ip) || { city: "Unknown", country: "Unknown" }; + const agent = useragent.parse(req.headers['user-agent']); + const browser = agent.toAgent(); + const visitTime = new Date().toLocaleTimeString("en-IN", { hour: '2-digit', minute: '2-digit' }); + + const deviceDetails = { + ip: ip, + city: geo.city || "Unknown", + country: geo.country || "Unknown", + browser: browser, + time: visitTime, + }; + + // Get visitor information if they're logged in + let visitorUsername = null; + let visitorName = null; + if (userId && !isOwner) { + try { + const visitor = await User.findById(userId, { username: 1, name: 1 }); + if (visitor) { + visitorUsername = visitor.username; + visitorName = visitor.name; + } + } catch (err) { + console.error(`Error fetching visitor info:`, err); + } + } + + // Send profile visit email notification if enabled + if (!isOwner) { + try { + if (settings && settings.shouldEmailOnProfileView()) { + sendProfileVisitEmail( + user.email, + username, + user.name, + deviceDetails, + visitorUsername, + visitorName + ).catch(err => { + console.error(`Failed to send profile visit email to ${username}:`, err); + }); + } + } catch (err) { + console.error(`Error checking notification settings for ${username}:`, err); + } + } + + // Get profile + const profile = await Profile.findOne({ username, deletedAt: null }); + if (!profile) { + return res.status(404).json({ + success: false, + message: "Profile not found" + }); + } + + // Get public and unlisted links (unlisted appear in ProfilePreview but not linkhub) + const Link = require("../model/linkModel"); + const allLinks = await Link.find({ + username, + deletedAt: null + }).select('source destination clicked visibility'); + + // Filter public and unlisted links (exclude private) + const visibleLinks = allLinks.filter(link => + link.visibility === 'public' || link.visibility === 'unlisted' + ); + + // Calculate stats (only count public links for stats) + const publicLinks = visibleLinks.filter(link => link.visibility === 'public'); + const totalLinks = publicLinks.length; + const totalClicks = publicLinks.reduce((sum, link) => sum + (link.clicked || 0), 0); + + // Build response based on settings + const response = { + success: true, + profile: { + username: profile.username, + name: profile.name || user.name, + location: settings.profile.showLocation ? profile.location : null, + passion: settings.profile.showPassion ? profile.passion : null, + bio: settings.profile.showBio ? profile.bio : null, + image: settings.profile.showProfileImage ? profile.image : null + }, + links: visibleLinks, // Include both public and unlisted links + settings: { + profile: settings.profile, + links: settings.links, + privacy: settings.privacy + }, + stats: { + totalLinks: settings.links.showLinkCount ? totalLinks : null, + totalClicks: settings.links.showClickStats ? totalClicks : null + } + }; + + return res.status(200).json(response); + } catch (err) { + console.log("Get public profile error:", err); + return res.status(500).json({ + success: false, + message: "Server internal error" + }); + } +}; + module.exports = { updateProfile, getProfile, - updateProfilePic + updateProfilePic, + getPublicProfile }; diff --git a/backend/controller/ProjectController.js b/backend/controller/ProjectController.js new file mode 100644 index 0000000..db15d07 --- /dev/null +++ b/backend/controller/ProjectController.js @@ -0,0 +1,67 @@ +const Project = require("../model/projectModel"); + +// Get available templates (only those with status: true) +const getAvailableTemplates = async (req, res) => { + try { + const project = await Project.getProjectConfig(); + + if (!project) { + return res.status(404).json({ + success: false, + message: "Project configuration not found" + }); + } + + // Filter templates where status is true and format for frontend + const availableTemplates = project.availableTemplates + .filter(t => t.status === true) + .map(t => ({ + name: t.template, + label: t.displayName || t.template + })); + + return res.status(200).json({ + success: true, + message: "Available templates retrieved successfully", + templates: availableTemplates + }); + } catch (err) { + console.log("Get available templates error:", err); + return res.status(500).json({ + success: false, + message: "Server internal error" + }); + } +}; + +// Get all templates (including disabled ones) - for admin use +const getAllTemplates = async (req, res) => { + try { + const project = await Project.getProjectConfig(); + + if (!project) { + return res.status(404).json({ + success: false, + message: "Project configuration not found" + }); + } + + return res.status(200).json({ + success: true, + message: "All templates retrieved successfully", + templates: project.availableTemplates + }); + } catch (err) { + console.log("Get all templates error:", err); + return res.status(500).json({ + success: false, + message: "Server internal error" + }); + } +}; + +module.exports = { + getAvailableTemplates, + getAllTemplates +}; + diff --git a/backend/controller/SearchController.js b/backend/controller/SearchController.js new file mode 100644 index 0000000..eddbb08 --- /dev/null +++ b/backend/controller/SearchController.js @@ -0,0 +1,84 @@ +const User = require("../model/userModel"); +const UserSettings = require("../model/userSettingsModel"); +const UserProfile = require("../model/userProfile"); + +// Search for users +const searchUsers = async (req, res) => { + try { + const { query } = req.body; + + if (!query || !query.trim()) { + return res.status(400).json({ + success: false, + message: "Search query is required" + }); + } + + const searchQuery = query.trim().toLowerCase(); + + // Find users whose username or name matches the search query + // Only include users that are not deleted + const users = await User.find({ + $or: [ + { username: { $regex: searchQuery, $options: 'i' } }, + { name: { $regex: searchQuery, $options: 'i' } } + ], + deletedAt: null + }).select('username name email').limit(20); + + if (!users || users.length === 0) { + return res.status(200).json({ + success: true, + message: "No users found", + results: [] + }); + } + + // Filter users based on their search settings + const searchableUsers = []; + + for (const user of users) { + try { + const settings = await UserSettings.findOne({ + userId: user._id, + deletedAt: null + }); + + // Check if user is searchable + // User must have isPublic=true and allowSearch=true + if (settings && settings.isSearchable()) { + // Get profile for image + const profile = await UserProfile.findOne({ + username: user.username + }).select('image'); + + searchableUsers.push({ + username: user.username, + name: user.name || user.username, + image: profile?.image || null + }); + } + } catch (err) { + // If settings don't exist or error, skip this user + // (default settings make profile not searchable) + continue; + } + } + + return res.status(200).json({ + success: true, + message: "Search completed", + results: searchableUsers + }); + } catch (err) { + console.log("Search users error:", err); + return res.status(500).json({ + success: false, + message: "Server internal error" + }); + } +}; + +module.exports = { + searchUsers +}; diff --git a/backend/controller/SettingsController.js b/backend/controller/SettingsController.js new file mode 100644 index 0000000..589e97a --- /dev/null +++ b/backend/controller/SettingsController.js @@ -0,0 +1,325 @@ +const UserSettings = require("../model/userSettingsModel"); +const User = require("../model/userModel"); +const Project = require("../model/projectModel"); + +// Get user settings +const getSettings = async (req, res) => { + try { + const userId = req.userId; + const { username } = req.body; + + if (!userId) { + return res.status(401).json({ + success: false, + message: "Authentication required" + }); + } + + // Get user info if username not provided + let userData = null; + if (!username) { + userData = await User.findById(userId); + if (!userData) { + return res.status(404).json({ + success: false, + message: "User not found" + }); + } + } + + // Use the static method to get or create settings + const settings = await UserSettings.getUserSettings( + username || userId, + userData + ); + + if (!settings) { + return res.status(404).json({ + success: false, + message: "Settings not found" + }); + } + + return res.status(200).json({ + success: true, + message: "Settings retrieved successfully", + settings + }); + } catch (err) { + console.log("Get settings error:", err); + return res.status(500).json({ + success: false, + message: "Server internal error" + }); + } +}; + +// Update user settings +const updateSettings = async (req, res) => { + try { + const userId = req.userId; + const { username, category, field, value, ...settingsData } = req.body; + console.log("category",category) + console.log("field",field) + console.log("value",value) + console.log("settingsData",settingsData) + if (!userId) { + return res.status(401).json({ + success: false, + message: "Authentication required" + }); + } + + // Get user info + const userData = await User.findById(userId); + if (!userData) { + return res.status(404).json({ + success: false, + message: "User not found" + }); + } + + // Get or create settings + let settings = await UserSettings.getUserSettings(userId, userData); + + if (!settings) { + return res.status(404).json({ + success: false, + message: "Settings not found" + }); + } + + // Handle single field update (new format) + if (category && field !== undefined && value !== undefined) { + const validCategories = ['profile', 'links', 'search', 'privacy', 'notifications', 'template']; + + if (!validCategories.includes(category)) { + return res.status(400).json({ + success: false, + message: `Invalid category. Valid options are: ${validCategories.join(', ')}` + }); + } + + // Handle template update + if (category === 'template') { + // Get valid templates from database + const project = await Project.getProjectConfig(); + const validTemplates = project && project.availableTemplates + ? project.availableTemplates + .filter(t => t.status === true) + .map(t => t.template) + : ['default']; // Fallback to default if project config not found + + if (!validTemplates.includes(value)) { + return res.status(400).json({ + success: false, + message: `Invalid template. Valid options are: ${validTemplates.join(', ')}` + }); + } + settings.template = value; + await settings.save(); + + return res.status(200).json({ + success: true, + message: "Template updated successfully", + settings + }); + } + + // Check if profile is private and field requires public profile + const requiresPublicProfile = [ + 'showInSearch', + 'allowProfileView', + 'showEmail' + ]; + + const searchRequiresPublicProfile = [ + 'allowSearch', + 'showInFeatured' + ]; + + // If profile is private, don't allow updates to fields that require public profile + if (category === 'profile' && requiresPublicProfile.includes(field)) { + if (!settings.profile || !settings.profile.isPublic) { + return res.status(400).json({ + success: false, + message: "Cannot update this setting. Profile must be public first." + }); + } + } + + // If profile is private, don't allow updates to search fields that require public profile + if (category === 'search' && searchRequiresPublicProfile.includes(field)) { + if (!settings.profile || !settings.profile.isPublic) { + return res.status(400).json({ + success: false, + message: "Cannot update this setting. Profile must be public first." + }); + } + } + + // Validate and update the specific field + if (category === 'profile') { + const validFields = ['isPublic', 'showInSearch', 'allowProfileView', 'showEmail', 'showLocation', 'showBio', 'showPassion', 'showProfileImage']; + if (!validFields.includes(field)) { + return res.status(400).json({ + success: false, + message: `Invalid field for profile category. Valid options are: ${validFields.join(', ')}` + }); + } + // Convert boolean fields properly + const boolValue = typeof value === 'string' ? value === 'true' : Boolean(value); + settings.set(`profile.${field}`, boolValue); + settings.markModified('profile'); + } else if (category === 'links') { + const validFields = ['showLinkCount', 'showClickStats']; + if (!validFields.includes(field)) { + return res.status(400).json({ + success: false, + message: `Invalid field for links category. Valid options are: ${validFields.join(', ')}` + }); + } + const boolValue = typeof value === 'string' ? value === 'true' : Boolean(value); + settings.set(`links.${field}`, boolValue); + settings.markModified('links'); + } else if (category === 'search') { + const validFields = ['allowSearch', 'showInFeatured', 'searchKeywords']; + if (!validFields.includes(field)) { + return res.status(400).json({ + success: false, + message: `Invalid field for search category. Valid options are: ${validFields.join(', ')}` + }); + } + if (field === 'searchKeywords') { + // Validate that value is an array + if (!Array.isArray(value)) { + return res.status(400).json({ + success: false, + message: "searchKeywords must be an array" + }); + } + settings.set('search.searchKeywords', value); + } else { + const boolValue = typeof value === 'string' ? value === 'true' : Boolean(value); + settings.set(`search.${field}`, boolValue); + } + settings.markModified('search'); + } else if (category === 'privacy') { + const validFields = ['showAnalytics', 'showLastUpdated', 'requireAuth']; + if (!validFields.includes(field)) { + return res.status(400).json({ + success: false, + message: `Invalid field for privacy category. Valid options are: ${validFields.join(', ')}` + }); + } + const boolValue = typeof value === 'string' ? value === 'true' : Boolean(value); + settings.set(`privacy.${field}`, boolValue); + settings.markModified('privacy'); + } else if (category === 'notifications') { + const validFields = ['emailOnNewClick', 'emailOnProfileView', 'emailOnLinkHubView', 'weeklyReport']; + if (!validFields.includes(field)) { + return res.status(400).json({ + success: false, + message: `Invalid field for notifications category. Valid options are: ${validFields.join(', ')}` + }); + } + // Convert value to boolean if needed + const boolValue = typeof value === 'string' ? value === 'true' : Boolean(value); + + // Use set() method with dot notation for nested fields (more reliable in Mongoose) + settings.set(`notifications.${field}`, boolValue); + settings.markModified('notifications'); + + console.log(`Updating notifications.${field} to ${boolValue} (type: ${typeof boolValue}) for user ${userId}`); + } + + const savedSettings = await settings.save(); + + // Verify the save worked (especially for notifications) + if (category === 'notifications') { + const boolValue = typeof value === 'string' ? value === 'true' : Boolean(value); + const verification = await UserSettings.findById(settings._id); + console.log(`Verification - notifications.${field} saved as:`, verification?.notifications?.[field], `(expected: ${boolValue})`); + } + + return res.status(200).json({ + success: true, + message: "Setting updated successfully", + settings + }); + } + + // Handle bulk update (old format for backward compatibility) + // Update template if provided + if (settingsData.template !== undefined) { + // Get valid templates from database + const project = await Project.getProjectConfig(); + const validTemplates = project && project.availableTemplates + ? project.availableTemplates + .filter(t => t.status === true) + .map(t => t.template) + : ['default']; // Fallback to default if project config not found + + if (validTemplates.includes(settingsData.template)) { + settings.template = settingsData.template; + } else { + return res.status(400).json({ + success: false, + message: `Invalid template. Valid options are: ${validTemplates.join(', ')}` + }); + } + } + + // Update settings - use Object.assign and markModified for nested objects + if (settingsData.profile) { + Object.assign(settings.profile, settingsData.profile); + settings.markModified('profile'); + } + if (settingsData.links) { + Object.assign(settings.links, settingsData.links); + settings.markModified('links'); + } + if (settingsData.search) { + // Handle searchKeywords array separately + if (settingsData.search.searchKeywords !== undefined) { + settings.search.searchKeywords = settingsData.search.searchKeywords; + } + // Update other search fields + if (settingsData.search.allowSearch !== undefined) { + settings.search.allowSearch = settingsData.search.allowSearch; + } + if (settingsData.search.showInFeatured !== undefined) { + settings.search.showInFeatured = settingsData.search.showInFeatured; + } + settings.markModified('search'); + } + if (settingsData.privacy) { + Object.assign(settings.privacy, settingsData.privacy); + settings.markModified('privacy'); + } + if (settingsData.notifications) { + Object.assign(settings.notifications, settingsData.notifications); + settings.markModified('notifications'); + } + + await settings.save(); + + return res.status(200).json({ + success: true, + message: "Settings updated successfully", + settings + }); + } catch (err) { + console.error("Update settings error:", err); + return res.status(500).json({ + success: false, + message: "Server internal error", + error: process.env.NODE_ENV === 'development' ? err.message : undefined + }); + } +}; + +module.exports = { + getSettings, + updateSettings +}; diff --git a/backend/doc/README.md b/backend/doc/README.md new file mode 100644 index 0000000..22201f6 --- /dev/null +++ b/backend/doc/README.md @@ -0,0 +1,192 @@ +# Database Models Documentation + +This directory contains comprehensive documentation for all database models used in the All in1 url application. + +## Overview + +The All in1 url application uses MongoDB with Mongoose ODM. All models are designed with: +- **Timestamps**: Automatic `createdAt` and `updatedAt` fields +- **Soft Deletes**: `deletedAt` field for data retention +- **Indexes**: Optimized for common query patterns +- **Relationships**: Foreign key references between models + +## Models + +### 1. [Link Model](./linkModel.md) +Stores user-created personalized links (bridges) that redirect to social media profiles or external destinations. + +**Key Features:** +- Unique `linkId` for each link +- User association via `userId` and `username` +- Click tracking counters +- Soft delete support + +### 2. [Link Analytics Model](./linkAnalyticsModel.md) +Tracks detailed information about every click on user links, including timestamps, device info, location, and browser details. + +**Key Features:** +- Comprehensive timestamp tracking (date, time, timezone) +- Device, OS, and browser information +- Geographic location data +- Full timestamp formatting methods + +### 3. [User Model](./userModel.md) +Core authentication and account information for registered users. + +**Key Features:** +- Email and username authentication +- Hashed password storage +- Account management +- Soft delete support + +### 4. [User Profile Model](./userProfile.md) +Public-facing profile information including name, bio, location, passion, and profile image. + +**Key Features:** +- Display information separate from auth data +- Profile customization +- Public profile support + +### 5. [User Settings Model](./userSettingsModel.md) +Privacy and visibility preferences controlling what information is visible to other users. + +**Key Features:** +- Profile visibility controls +- Link visibility settings (public/private/unlisted) +- Search and discovery settings +- Privacy preferences +- Helper methods for visibility checks + +### 6. [OTP Model](./otpModel.md) +Temporary verification codes for email verification, password reset, and authentication. + +**Key Features:** +- Automatic expiration (5 minutes) +- Hashed OTP storage +- Email-based verification + +## Model Relationships + +``` +User +├── UserProfile (1:1 via username) +├── UserSettings (1:1 via userId/username) +├── Links (1:many via userId) +└── LinkAnalytics (1:many via userId) + +Link +└── LinkAnalytics (1:many via linkId) +``` + +## Common Patterns + +### Soft Deletes +All models support soft deletes using the `deletedAt` field: +```javascript +// Soft delete +record.deletedAt = new Date(); +await record.save(); + +// Query active records +const active = await Model.find({ deletedAt: null }); +``` + +### Timestamps +All models automatically track `createdAt` and `updatedAt`: +```javascript +// Automatically set on creation +const record = new Model({ ... }); +await record.save(); // createdAt and updatedAt set automatically + +// updatedAt automatically updated on save +record.field = 'new value'; +await record.save(); // updatedAt updated automatically +``` + +### Foreign Keys +Models use references for relationships: +```javascript +// In Link model +userId: { + type: mongoose.Schema.Types.ObjectId, + ref: 'user' +} + +// Populate when querying +const link = await Link.findById(id).populate('userId'); +``` + +## Best Practices + +1. **Always filter by `deletedAt: null`** when querying active records +2. **Hash sensitive data** (passwords, OTPs) before storing +3. **Use indexes** for frequently queried fields +4. **Validate data** before saving +5. **Use soft deletes** instead of hard deletes for data retention +6. **Check relationships** before deleting related records + +## Security Considerations + +- **Passwords**: Always hash using bcrypt or similar +- **OTPs**: Hash before storage, expire quickly +- **Email**: Validate format, handle case-insensitive matching +- **Privacy**: Respect user settings for data visibility +- **GDPR**: Handle user data according to privacy regulations + +## Query Examples + +### Finding Active User Links +```javascript +const links = await Link.find({ + userId: user._id, + deletedAt: null +}); +``` + +### Getting User Settings +```javascript +const settings = await UserSettings.getUserSettings(username); +``` + +### Finding Searchable Profiles +```javascript +const profiles = await UserSettings.find({ + 'profile.isPublic': true, + 'search.allowSearch': true, + deletedAt: null +}); +``` + +### Querying Analytics +```javascript +const clicks = await LinkAnalytics.find({ + linkId: 'linkedin', + deletedAt: null +}).sort({ clickDate: -1 }); +``` + +## Documentation Structure + +Each model documentation file includes: +- **Overview**: Purpose and use case +- **Schema Fields**: Detailed field documentation + - Type and constraints + - Purpose and examples + - Why it's required/optional + - Enum values (if applicable) +- **Indexes**: Performance optimizations +- **Relationships**: Model connections +- **Usage Examples**: Code examples +- **Notes**: Important considerations + +## Contributing + +When adding new models or modifying existing ones: +1. Update the model file +2. Update the corresponding documentation +3. Update this README if needed +4. Document any breaking changes + +## Questions? + +Refer to individual model documentation files for detailed information about each model's fields, methods, and usage patterns. diff --git a/backend/doc/linkAnalyticsModel.md b/backend/doc/linkAnalyticsModel.md new file mode 100644 index 0000000..bd15756 --- /dev/null +++ b/backend/doc/linkAnalyticsModel.md @@ -0,0 +1,289 @@ +# Link Analytics Model Documentation + +## Overview +The Link Analytics model stores detailed information about every click on user links. This includes timestamp data, device information, location, browser details, and more. Used for comprehensive analytics and reporting. + +## Model Name +`linkAnalytics` (collection name in MongoDB) + +## Schema Fields + +### `linkId` (String, Required) +- **Type**: String +- **Required**: Yes +- **Indexed**: Yes +- **Ref**: `link` +- **Purpose**: Foreign key reference to the Link model. Identifies which link was clicked. Used to aggregate all clicks for a specific link. +- **Example**: `"linkedin"`, `"github"` +- **Why Required**: Essential for linking analytics data to specific links and querying click history for a link. + +### `userId` (ObjectId, Required) +- **Type**: mongoose.Schema.Types.ObjectId +- **Required**: Yes +- **Indexed**: Yes +- **Ref**: `user` +- **Purpose**: Foreign key reference to the User model. Identifies which user owns the link that was clicked. Used for user-level analytics aggregation. +- **Example**: `ObjectId("507f1f77bcf86cd799439011")` +- **Why Required**: Enables efficient user-based analytics queries and reporting. + +### `username` (String, Required) +- **Type**: String +- **Required**: Yes +- **Indexed**: Yes +- **Purpose**: Username of the link owner. Stored redundantly for faster queries without joins. Used for filtering analytics by username. +- **Example**: `"johndoe"` +- **Why Required**: Allows quick username-based queries without joining the User collection. + +### `clickDate` (Date, Required) +- **Type**: Date +- **Required**: Yes +- **Default**: `Date.now` +- **Indexed**: Yes +- **Purpose**: The exact date and time when the click occurred. Primary timestamp for all analytics queries. Stored with millisecond precision. +- **Example**: `2024-01-15T14:30:45.123Z` +- **Why Required**: Core field for time-based analytics, sorting, and filtering clicks by date/time. + +### `timestamp` (Object, Auto-generated) +- **Type**: Object containing detailed timestamp information +- **Auto-generated**: Yes (via pre-save middleware) +- **Purpose**: Provides multiple formatted versions of the click timestamp for easy display and querying without date manipulation. + +#### `timestamp.date` (String) +- **Format**: `YYYY-MM-DD` +- **Example**: `"2024-01-15"` +- **Purpose**: Date-only string for date-based grouping and filtering. + +#### `timestamp.time` (String) +- **Format**: `HH:MM:SS` +- **Example**: `"14:30:45"` +- **Purpose**: Time-only string for time-based analysis. + +#### `timestamp.datetime` (String) +- **Format**: `YYYY-MM-DD HH:MM:SS` +- **Example**: `"2024-01-15 14:30:45"` +- **Purpose**: Human-readable full datetime string. + +#### `timestamp.unixTimestamp` (Number) +- **Format**: Unix timestamp in milliseconds +- **Example**: `1705332645123` +- **Purpose**: Numeric timestamp for calculations and comparisons. + +#### `timestamp.timezone` (String) +- **Example**: `"America/New_York"`, `"UTC"`, `"Asia/Tokyo"` +- **Purpose**: Detected timezone of the server/environment when click was recorded. + +#### `timestamp.timezoneOffset` (Number) +- **Format**: Minutes offset from UTC +- **Example**: `300` (UTC-5), `-60` (UTC+1) +- **Purpose**: Timezone offset for accurate time conversion. + +### `location` (Object, Optional) +- **Type**: Object +- **Required**: No +- **Purpose**: Geographic information about where the click originated. + +#### `location.country` (String, Optional) +- **Example**: `"United States"`, `"India"`, `"United Kingdom"` +- **Purpose**: Country where the click originated. Useful for geographic analytics. + +#### `location.city` (String, Optional) +- **Example**: `"New York"`, `"Mumbai"`, `"London"` +- **Purpose**: City where the click originated. Provides more granular location data. + +#### `location.region` (String, Optional) +- **Example**: `"New York"`, `"Maharashtra"`, `"England"` +- **Purpose**: State/province/region information. + +#### `location.ipAddress` (String, Optional) +- **Example**: `"192.168.1.1"`, `"2001:0db8:85a3:0000:0000:8a2e:0370:7334"` +- **Purpose**: IP address of the clicker. Used for location detection and fraud prevention. Should be handled according to privacy regulations. + +### `device` (Object, Optional) +- **Type**: Object +- **Required**: No +- **Purpose**: Information about the device used to click the link. + +#### `device.type` (String, Optional) +- **Enum Values**: `'mobile'`, `'desktop'`, `'tablet'`, `'unknown'` +- **Default**: `'unknown'` +- **Purpose**: Type of device. Used for device-based analytics and responsive design insights. + +#### `device.brand` (String, Optional) +- **Example**: `"Apple"`, `"Samsung"`, `"Google"` +- **Purpose**: Device manufacturer/brand. + +#### `device.model` (String, Optional) +- **Example**: `"iPhone 14 Pro"`, `"Galaxy S23"`, `"Pixel 7"` +- **Purpose**: Specific device model. + +### `os` (Object, Optional) +- **Type**: Object +- **Required**: No +- **Purpose**: Operating system information. + +#### `os.name` (String, Optional) +- **Example**: `"Windows"`, `"macOS"`, `"iOS"`, `"Android"`, `"Linux"` +- **Purpose**: Operating system name. Used for OS-based analytics. + +#### `os.version` (String, Optional) +- **Example**: `"14.2"`, `"13.0"`, `"Windows 11"` +- **Purpose**: OS version for more detailed analytics. + +### `browser` (Object, Optional) +- **Type**: Object +- **Required**: No +- **Purpose**: Browser information. + +#### `browser.name` (String, Optional) +- **Example**: `"Chrome"`, `"Firefox"`, `"Safari"`, `"Edge"` +- **Purpose**: Browser name. Used for browser compatibility insights. + +#### `browser.version` (String, Optional) +- **Example**: `"120.0.0.0"`, `"119.0"` +- **Purpose**: Browser version. + +### `referrer` (String, Optional) +- **Type**: String +- **Required**: No +- **Purpose**: The URL of the page that referred the user to the link. Useful for understanding traffic sources. +- **Example**: `"https://twitter.com"`, `"https://google.com"` + +### `userAgent` (String, Optional) +- **Type**: String +- **Required**: No +- **Purpose**: Full user agent string from the HTTP request. Used for parsing device, OS, and browser information. +- **Example**: `"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36..."` + +### `deletedAt` (Date, Optional) +- **Type**: Date +- **Required**: No +- **Default**: `null` +- **Purpose**: Soft delete field. When an analytics record is deleted, this field is set instead of removing the record. Allows for data retention and recovery. + +### `createdAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes (via `timestamps: true`) +- **Purpose**: Timestamp when the analytics record was created. Should match `clickDate` for new records. + +### `updatedAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes (via `timestamps: true`) +- **Purpose**: Timestamp when the record was last modified. Rarely changes after creation. + +## Indexes + +### Single Field Indexes +- `linkId`: For fast queries by link +- `userId`: For fast queries by user +- `username`: For fast queries by username +- `clickDate`: For date-based queries + +### Compound Indexes +- `{ linkId: 1, clickDate: -1 }`: Get clicks for a link ordered by date (descending) +- `{ userId: 1, clickDate: -1 }`: Get clicks for a user ordered by date (descending) +- `{ linkId: 1, deletedAt: 1 }`: Soft delete queries for specific links +- `{ userId: 1, deletedAt: 1 }`: Soft delete queries for specific users + +## Virtual Fields + +### `formattedDate` (Virtual) +- **Type**: String +- **Format**: Human-readable formatted date +- **Example**: `"January 15, 2024, 02:30:45 PM"` +- **Purpose**: Easy-to-read date format for display in UI. + +### `isoString` (Virtual) +- **Type**: String +- **Format**: ISO 8601 string +- **Example**: `"2024-01-15T14:30:45.123Z"` +- **Purpose**: Standard ISO format for API responses. + +## Instance Methods + +### `getFullTimestamp()` +Returns a comprehensive timestamp object with all formatted versions and components. + +**Returns**: +```javascript +{ + date: "2024-01-15", + time: "14:30:45", + datetime: "2024-01-15 14:30:45", + unixTimestamp: 1705332645123, + isoString: "2024-01-15T14:30:45.123Z", + formatted: "January 15, 2024, 02:30:45 PM", + timezone: "America/New_York", + timezoneOffset: 300, + year: 2024, + month: 1, + day: 15, + hour: 14, + minute: 30, + second: 45, + millisecond: 123, + dayOfWeek: "Monday", + dateOnly: "01/15/2024", + timeOnly: "02:30:45 PM", + utcDate: "Mon, 15 Jan 2024 14:30:45 GMT", + utcISO: "2024-01-15T14:30:45.123Z" +} +``` + +## Relationships +- **Belongs to**: Link (via `linkId`) +- **Belongs to**: User (via `userId`) + +## Usage Examples + +### Creating an Analytics Record +```javascript +const analytics = new LinkAnalytics({ + linkId: 'linkedin', + userId: user._id, + username: 'johndoe', + clickDate: new Date(), + location: { + country: 'United States', + city: 'New York', + ipAddress: '192.168.1.1' + }, + device: { + type: 'mobile', + brand: 'Apple', + model: 'iPhone 14' + }, + os: { + name: 'iOS', + version: '17.0' + }, + browser: { + name: 'Safari', + version: '17.0' + }, + referrer: 'https://twitter.com', + userAgent: req.headers['user-agent'] +}); +await analytics.save(); +``` + +### Querying Clicks for a Link +```javascript +const clicks = await LinkAnalytics.find({ + linkId: 'linkedin', + deletedAt: null +}).sort({ clickDate: -1 }); +``` + +### Getting Full Timestamp Information +```javascript +const analytics = await LinkAnalytics.findById(id); +const timestamp = analytics.getFullTimestamp(); +console.log(timestamp.formatted); // "January 15, 2024, 02:30:45 PM" +``` + +## Notes +- The `timestamp` object is automatically populated by pre-save middleware +- Always filter by `deletedAt: null` when querying active records +- IP addresses should be handled according to GDPR/privacy regulations +- Consider data retention policies for analytics records +- The model supports high-volume writes (many clicks per second) diff --git a/backend/doc/linkModel.md b/backend/doc/linkModel.md new file mode 100644 index 0000000..7e6a1b4 --- /dev/null +++ b/backend/doc/linkModel.md @@ -0,0 +1,248 @@ +# Link Model Documentation + +## Overview +The Link model stores information about user-created personalized links (bridges) that redirect users from a custom URL to their social media profiles or external destinations. + +## Model Name +`link` (collection name in MongoDB) + +## Schema Fields + +### `username` (String, Required) +- **Type**: String +- **Required**: Yes +- **Unique**: No (multiple links per user) +- **Purpose**: Identifies which user owns this link. Used for querying all links belonging to a specific user. +- **Example**: `"johndoe"` +- **Why Required**: Essential for associating links with users and filtering user-specific links. + +### `userId` (ObjectId, Required) +- **Type**: mongoose.Schema.Types.ObjectId +- **Required**: Yes +- **Unique**: No +- **Ref**: `user` +- **Purpose**: Foreign key reference to the User model. Provides a direct relationship to the user who owns this link. More efficient than username for database queries. +- **Example**: `ObjectId("507f1f77bcf86cd799439011")` +- **Why Required**: Enables efficient joins and referential integrity. Used for user-based queries and analytics. + +### `linkId` (String, Required, Unique) +- **Type**: String +- **Required**: Yes +- **Unique**: Yes +- **Purpose**: Unique identifier for each link. Used as a foreign key in the linkAnalytics model to track clicks and analytics for this specific link. Also used in URL generation (e.g., `allin1url.in/username/linkId`). +- **Example**: `"linkedin"`, `"github"`, `"instagram"` +- **Why Required**: Essential for: + - Creating unique URLs for each link + - Linking analytics data to specific links + - Identifying links in API requests + - Preventing duplicate links for the same platform per user + +### `source` (String, Required) +- **Type**: String +- **Required**: Yes +- **Purpose**: The platform or service name (e.g., "linkedin", "github", "instagram"). This is typically the part of the URL path that identifies the platform. +- **Example**: `"linkedin"`, `"github"`, `"twitter"` +- **Why Required**: Used to generate the personalized URL and identify the type of link. Must be unique per user (enforced by linkId). + +### `destination` (String, Required) +- **Type**: String +- **Required**: Yes +- **Purpose**: The actual URL where the link redirects to. This is the user's profile URL on the specified platform. +- **Example**: `"https://www.linkedin.com/in/johndoe"`, `"https://github.com/johndoe"` +- **Why Required**: The core purpose of the link - where users are redirected when they click the personalized link. + +### `notSeen` (Number, Optional) +- **Type**: Number +- **Required**: No +- **Default**: 0 +- **Purpose**: Counter for tracking how many times the link has been viewed but not clicked. Useful for analytics to understand engagement rates. +- **Example**: `5` +- **Why Optional**: Not critical for core functionality, but useful for analytics. + +### `clicked` (Number, Optional) +- **Type**: Number +- **Required**: No +- **Default**: 0 +- **Purpose**: Counter for total number of clicks on this link. Used for displaying click statistics to users. +- **Example**: `42` +- **Why Optional**: Can be calculated from analytics, but storing it here provides faster access for display purposes. + +### `visibility` (String, Required) +- **Type**: String +- **Required**: Yes +- **Default**: `'public'` +- **Enum Values**: `'public'`, `'unlisted'`, `'private'` +- **Indexed**: Yes +- **Purpose**: Controls link visibility and accessibility: + - **`'public'`**: Visible in profile preview, searches by other users, and link hub. Fully accessible without restrictions. + - **`'unlisted'`**: Visible in profile preview, but NOT shown in link hub. Accessible via direct URL. Does not require password. + - **`'private'`**: NOT visible in profile preview or link hub. If accessed directly, requires password to access. Completely hidden from public view. +- **Example**: `"public"`, `"unlisted"`, `"private"` +- **Why Required**: Essential for privacy control. Defaults to `'public'` for better sharing and discoverability - links are public by default, but users can change to `'unlisted'` or `'private'` for privacy. + +### `password` (String, Optional) +- **Type**: String (hashed using bcryptjs) +- **Required**: Yes when `visibility` is `'private'`, otherwise optional +- **Default**: `null` +- **Purpose**: Hashed password for private links. Used to protect private links - users must enter the password to access the link via direct URL. **Should always be hashed** before storage (using bcryptjs). Only used when `visibility` is `'private'`. +- **Example**: `"$2a$10$hashedpasswordstring..."` (hashed) or `null` +- **Why Required for Private**: Private links require password protection. Public and unlisted links don't require passwords. + +### `deletedAt` (Date, Optional) +- **Type**: Date +- **Required**: No +- **Default**: null +- **Purpose**: Soft delete field. When a link is deleted, this field is set to the deletion timestamp instead of actually removing the record. Allows for: + - Data recovery + - Audit trails + - Analytics on deleted links +- **Example**: `2024-01-15T10:30:00.000Z` or `null` +- **Why Optional**: Links are active by default. Only set when a link is deleted. + +### `createdAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes (via `timestamps: true`) +- **Purpose**: Timestamp of when the link was created. Useful for: + - Displaying creation date to users + - Sorting links by creation date + - Analytics on link creation patterns +- **Example**: `2024-01-15T10:30:00.000Z` + +### `updatedAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes (via `timestamps: true`) +- **Purpose**: Timestamp of when the link was last modified. Automatically updated whenever the document is saved. +- **Example**: `2024-01-15T10:30:00.000Z` + +## Indexes +- `userId`: Indexed for fast user-based queries +- `linkId`: Indexed for fast link lookups (unique index) +- `visibility`: Indexed for visibility-based queries +- `{ userId: 1, visibility: 1, deletedAt: 1 }`: Compound index for querying user's links by visibility +- `{ username: 1, visibility: 1, deletedAt: 1 }`: Compound index for querying links by username and visibility + +## Relationships +- **Belongs to**: User (via `userId`) +- **Has many**: LinkAnalytics (via `linkId`) + +## Instance Methods + +### `isAccessible(requirePassword = false)` +Checks if the link is accessible based on its visibility. + +**Parameters**: +- `requirePassword` (Boolean, Optional): If `true`, checks if password is set for unlisted links + +**Returns**: Boolean + +**Logic**: +- Returns `false` if link is deleted +- Returns `true` if visibility is `'public'` +- Returns `true` for `'unlisted'` if password is not required or password exists +- Returns `false` for `'private'` links + +### `shouldShowInProfile()` +Checks if link should be displayed in profile/hub. + +**Returns**: Boolean - `true` only if visibility is `'public'` and link is not deleted + +### `shouldShowInSearch()` +Checks if link should appear in search results. + +**Returns**: Boolean - `true` only if visibility is `'public'` and link is not deleted + +## Usage Examples + +### Creating a Public Link +```javascript +const link = new Link({ + username: 'johndoe', + userId: user._id, + linkId: 'linkedin', + source: 'linkedin', + destination: 'https://www.linkedin.com/in/johndoe', + visibility: 'public' +}); +await link.save(); +``` + +### Creating an Unlisted Link with Password +```javascript +const bcrypt = require('bcrypt'); +const password = 'mySecretPassword'; +const hashedPassword = await bcrypt.hash(password, 10); + +const link = new Link({ + username: 'johndoe', + userId: user._id, + linkId: 'private-portfolio', + source: 'portfolio', + destination: 'https://myportfolio.com', + visibility: 'unlisted', + password: hashedPassword +}); +await link.save(); +``` + +### Creating a Private Link +```javascript +const link = new Link({ + username: 'johndoe', + userId: user._id, + linkId: 'secret-link', + source: 'secret', + destination: 'https://secret.com', + visibility: 'private' + // password not needed for private links +}); +await link.save(); +``` + +### Querying Public Links for Profile +```javascript +const publicLinks = await Link.find({ + userId: user._id, + visibility: 'public', + deletedAt: null +}); +``` + +### Checking Link Accessibility +```javascript +const link = await Link.findOne({ linkId: 'linkedin' }); + +if (link.visibility === 'unlisted' && link.password) { + // Show password form + // Verify password: await bcrypt.compare(enteredPassword, link.password); +} + +if (link.shouldShowInProfile()) { + // Display in profile +} +``` + +### Querying User Links +```javascript +const userLinks = await Link.find({ + userId: user._id, + deletedAt: null +}); +``` + +### Soft Delete +```javascript +link.deletedAt = new Date(); +await link.save(); +``` + +## Notes +- The `linkId` should typically match the `source` value for consistency, but can be customized +- When a link is deleted, set `deletedAt` instead of using `remove()` or `deleteOne()` +- Always filter by `deletedAt: null` when querying active links +- **Visibility defaults to `'public'`** for better sharing and discoverability - links are public by default, but users can change to `'unlisted'` or `'private'` for privacy +- **Password must be hashed** before storing (use bcrypt, argon2, or similar) +- For `'unlisted'` links, password is required - validate this in your controller +- Use helper methods (`shouldShowInProfile()`, `shouldShowInSearch()`) for consistent visibility checks +- Public links are visible everywhere (profile, search, hub) +- Unlisted links are accessible via direct URL but require password +- Private links show "link protected" message if accessed directly diff --git a/backend/doc/otpModel.md b/backend/doc/otpModel.md new file mode 100644 index 0000000..c4a241e --- /dev/null +++ b/backend/doc/otpModel.md @@ -0,0 +1,179 @@ +# OTP Model Documentation + +## Overview +The OTP (One-Time Password) model stores temporary verification codes used for email verification, password reset, and other authentication-related operations. OTPs are automatically expired after a set time period. + +## Model Name +`Otp` (collection name in MongoDB) + +## Schema Fields + +### `email` (String, Required) +- **Type**: String +- **Required**: Yes +- **Purpose**: Email address of the user requesting the OTP. Used to: + - Identify which user the OTP belongs to + - Send the OTP via email + - Validate OTP requests + - Prevent OTP abuse (rate limiting per email) +- **Example**: `"john.doe@example.com"` +- **Why Required**: Essential for associating OTPs with users and sending verification codes. Without email, the OTP cannot be delivered or validated. + +### `otp` (String, Required) +- **Type**: String (hashed) +- **Required**: Yes +- **Purpose**: The actual one-time password code. **Should always be hashed** before storage for security. Never store plain text OTPs. +- **Example**: `"$2b$10$hashedotpstring..."` (hashed) +- **Why Required**: The core verification code. Required for OTP validation. Must be hashed using a secure hashing algorithm (bcrypt, argon2, etc.). + +### `createdAt` (Date, Auto-generated, Auto-expires) +- **Type**: Date +- **Auto-generated**: Yes +- **Default**: `Date.now` +- **Expires**: 300 seconds (5 minutes) +- **Purpose**: + - Timestamp when the OTP was created + - Used for automatic expiration via MongoDB TTL (Time To Live) index + - OTPs expire 5 minutes after creation for security +- **Example**: `2024-01-15T10:30:00.000Z` +- **Why Required**: Essential for OTP expiration. The `expires: 300` option automatically deletes the document after 5 minutes, ensuring OTPs cannot be used after expiration. + +## Indexes +- `createdAt`: Automatically indexed with TTL (Time To Live) for auto-expiration +- Consider adding index on `email` for faster lookups if needed + +## Security Considerations + +### OTP Hashing +- **Never** store OTPs in plain text +- Always hash OTPs before saving to database +- Use strong hashing algorithms (bcrypt recommended) +- Recommended: bcrypt with salt rounds >= 10 + +### OTP Generation +- Generate cryptographically secure random OTPs +- Use appropriate length (typically 4-6 digits for user-friendly, 6-8 for higher security) +- Consider alphanumeric OTPs for better security + +### Expiration +- OTPs expire after 5 minutes (300 seconds) +- This is enforced by MongoDB TTL index +- Expired OTPs are automatically deleted +- Consider shorter expiration for sensitive operations + +### Rate Limiting +- Implement rate limiting per email address +- Prevent OTP spam/abuse +- Consider maximum OTP requests per hour/day per email + +### Single Use +- OTPs should be single-use only +- Delete OTP after successful verification +- Prevent replay attacks + +## Usage Examples + +### Creating an OTP +```javascript +const bcrypt = require('bcrypt'); +const crypto = require('crypto'); + +// Generate 6-digit OTP +const otpCode = crypto.randomInt(100000, 999999).toString(); + +// Hash the OTP +const hashedOtp = await bcrypt.hash(otpCode, 10); + +// Create OTP record +const otp = new Otp({ + email: 'user@example.com', + otp: hashedOtp +}); +await otp.save(); + +// Send plain OTP via email (not stored) +await sendEmail(user.email, `Your OTP is: ${otpCode}`); +``` + +### Verifying an OTP +```javascript +const otpRecord = await Otp.findOne({ + email: 'user@example.com' +}); + +if (!otpRecord) { + throw new Error('OTP not found or expired'); +} + +const isValid = await bcrypt.compare(enteredOtp, otpRecord.otp); + +if (isValid) { + // Delete OTP after successful verification + await Otp.deleteOne({ _id: otpRecord._id }); + // Proceed with verification +} else { + throw new Error('Invalid OTP'); +} +``` + +### Checking OTP Existence +```javascript +const otpExists = await Otp.findOne({ + email: 'user@example.com' +}); + +if (otpExists) { + // OTP exists and is not expired (MongoDB TTL handles expiration) + console.log('OTP found'); +} else { + // OTP doesn't exist or has expired + console.log('OTP not found or expired'); +} +``` + +## Expiration Behavior +- MongoDB automatically deletes documents where `createdAt` is older than 300 seconds +- This happens via TTL (Time To Live) index +- No manual cleanup needed +- Expired OTPs are permanently deleted (not soft deleted) + +## Best Practices + +### OTP Generation +1. Use cryptographically secure random number generator +2. Generate appropriate length (6 digits recommended) +3. Store only hashed version + +### OTP Delivery +1. Send OTP via secure channel (email, SMS) +2. Include expiration time in message +3. Warn users about security (don't share OTP) + +### OTP Validation +1. Check if OTP exists +2. Verify OTP hash matches +3. Check if OTP is expired (MongoDB handles this) +4. Delete OTP after successful verification +5. Implement rate limiting + +### Security +1. Hash all OTPs before storage +2. Use HTTPS for OTP transmission +3. Implement rate limiting +4. Log failed OTP attempts +5. Consider CAPTCHA for OTP requests + +## Notes +- OTPs are automatically deleted after 5 minutes +- Only one OTP per email can exist at a time (consider this in implementation) +- Always hash OTPs before storing +- Delete OTP immediately after successful verification +- Consider implementing OTP attempt limits (max 3-5 attempts) +- The model is simple by design - expiration is handled automatically by MongoDB + +## Common Use Cases +1. **Email Verification**: Send OTP to verify email address during registration +2. **Password Reset**: Send OTP to verify identity before password reset +3. **Two-Factor Authentication**: Additional security layer for login +4. **Account Recovery**: Verify identity for account recovery +5. **Sensitive Operations**: Verify identity before allowing sensitive actions diff --git a/backend/doc/userModel.md b/backend/doc/userModel.md new file mode 100644 index 0000000..3d0efb0 --- /dev/null +++ b/backend/doc/userModel.md @@ -0,0 +1,151 @@ +# User Model Documentation + +## Overview +The User model stores core authentication and account information for registered users. This is the primary user account model used for login, authentication, and user identification. + +## Model Name +`user` (collection name in MongoDB) + +## Schema Fields + +### `name` (String, Optional) +- **Type**: String +- **Required**: No +- **Purpose**: User's full name or display name. Used for personalization and display purposes. Can be updated later through the profile. +- **Example**: `"John Doe"`, `"Jane Smith"` +- **Why Optional**: Users may register with just email/username initially and add their name later. + +### `email` (String, Required, Unique) +- **Type**: String +- **Required**: Yes +- **Unique**: Yes +- **Purpose**: User's email address. Used for: + - Account identification + - Password reset + - Email verification + - Communication + - Login (alternative to username) +- **Example**: `"john.doe@example.com"` +- **Why Required**: Essential for account recovery, notifications, and user identification. Must be unique to prevent duplicate accounts. + +### `password` (String, Required) +- **Type**: String (hashed) +- **Required**: Yes +- **Purpose**: User's password. **Should always be hashed** before storage (using bcrypt, argon2, or similar). Never store plain text passwords. +- **Example**: `"$2b$10$hashedpasswordstring..."` (hashed) +- **Why Required**: Required for authentication and account security. Must be hashed using a secure hashing algorithm. + +### `username` (String, Required, Unique) +- **Type**: String +- **Required**: Yes +- **Unique**: Yes +- **Purpose**: Unique username for the user. Used for: + - Public profile URLs (e.g., `allin1url.in/username`) + - User identification + - Login + - Display purposes +- **Example**: `"johndoe"`, `"jane_smith"` +- **Why Required**: Essential for creating unique user identifiers and public URLs. Must be unique to prevent conflicts. + +### `deletedAt` (Date, Optional) +- **Type**: Date +- **Required**: No +- **Default**: `null` +- **Purpose**: Soft delete field. When a user account is deleted, this field is set to the deletion timestamp instead of actually removing the record. Allows for: + - Account recovery within a grace period + - Data retention for legal/compliance reasons + - Audit trails + - Preventing username reuse immediately after deletion +- **Example**: `2024-01-15T10:30:00.000Z` or `null` +- **Why Optional**: Accounts are active by default. Only set when an account is deleted. + +### `createdAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes (via `timestamps: true`) +- **Purpose**: Timestamp of when the user account was created. Useful for: + - Displaying account age + - Analytics on user registration patterns + - Account verification timelines +- **Example**: `2024-01-15T10:30:00.000Z` + +### `updatedAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes (via `timestamps: true`) +- **Purpose**: Timestamp of when the user account was last modified. Automatically updated whenever the document is saved. Useful for tracking account activity. +- **Example**: `2024-01-15T10:30:00.000Z` + +## Indexes +- `email`: Automatically indexed due to `unique: true` +- `username`: Automatically indexed due to `unique: true` +- Consider adding compound index on `{ email: 1, deletedAt: 1 }` for soft delete queries + +## Relationships +- **Has one**: UserProfile (via `username`) +- **Has one**: UserSettings (via `userId` or `username`) +- **Has many**: Links (via `userId`) +- **Has many**: LinkAnalytics (via `userId`) + +## Security Considerations + +### Password Storage +- **Never** store passwords in plain text +- Always hash passwords before saving +- Use strong hashing algorithms (bcrypt, argon2, scrypt) +- Recommended: bcrypt with salt rounds >= 10 + +### Email Validation +- Validate email format before saving +- Consider email verification flow +- Handle case-insensitive email matching + +### Username Validation +- Enforce username rules (length, characters allowed) +- Prevent reserved usernames +- Handle case-insensitive username matching if needed + +## Usage Examples + +### Creating a User +```javascript +const bcrypt = require('bcrypt'); + +const hashedPassword = await bcrypt.hash(password, 10); +const user = new User({ + name: 'John Doe', + email: 'john.doe@example.com', + password: hashedPassword, + username: 'johndoe' +}); +await user.save(); +``` + +### Finding Active Users +```javascript +const activeUsers = await User.find({ + deletedAt: null +}); +``` + +### Soft Delete User +```javascript +user.deletedAt = new Date(); +await user.save(); +``` + +### Finding User by Email or Username +```javascript +const user = await User.findOne({ + $or: [ + { email: identifier }, + { username: identifier } + ], + deletedAt: null +}); +``` + +## Notes +- Always filter by `deletedAt: null` when querying active users +- Passwords must be hashed before saving +- Email and username are case-sensitive by default (consider normalization) +- When deleting a user, also consider soft-deleting related records (links, profiles, etc.) +- The `name` field can be synced with the UserProfile model for consistency diff --git a/backend/doc/userProfile.md b/backend/doc/userProfile.md new file mode 100644 index 0000000..4bfe389 --- /dev/null +++ b/backend/doc/userProfile.md @@ -0,0 +1,153 @@ +# User Profile Model Documentation + +## Overview +The User Profile model stores public-facing profile information for users. This includes display name, bio, location, passion, and profile image. This data is separate from authentication data and is used for public profile pages and search features. + +## Model Name +`userinfo` (collection name in MongoDB) + +## Schema Fields + +### `username` (String, Required, Unique) +- **Type**: String +- **Required**: Yes +- **Unique**: Yes +- **Ref**: `user` +- **Purpose**: Foreign key reference to the User model. Links the profile to the user account. Used as the primary identifier for profile lookups. +- **Example**: `"johndoe"`, `"jane_smith"` +- **Why Required**: Essential for linking profile data to user accounts. Must be unique (one profile per user). Used in URL generation for public profiles. + +### `name` (String, Optional) +- **Type**: String +- **Required**: No +- **Default**: `""` (empty string) +- **Purpose**: User's display name or full name. Shown on public profile pages and in search results. Can differ from the username. +- **Example**: `"John Doe"`, `"Jane Smith"`, `"Dr. Sarah Johnson"` +- **Why Optional**: Users may want to set up their account first and add their name later. Empty string allows the field to exist but be empty. + +### `passion` (String, Optional) +- **Type**: String +- **Required**: No +- **Default**: `""` (empty string) +- **Purpose**: A short description of what the user is passionate about or their profession. Used for: + - Profile personalization + - Search keywords + - Display on public profiles +- **Example**: `"Software Engineer"`, `"Digital Artist"`, `"Entrepreneur"` +- **Why Optional**: Not all users may want to share this information. Can be added later. + +### `bio` (String, Optional) +- **Type**: String +- **Required**: No +- **Default**: `""` (empty string) +- **Purpose**: Longer description about the user. Can include: + - Professional background + - Interests + - Personal information + - Links to other profiles +- **Example**: `"Full-stack developer passionate about creating beautiful web experiences. Love open source and coffee."` +- **Why Optional**: Users may not want to write a bio immediately. Can be a longer text field (consider textarea in UI). + +### `location` (String, Optional) +- **Type**: String +- **Required**: No +- **Default**: `""` (empty string) +- **Purpose**: User's location. Can be: + - City and country + - Just city + - Just country + - Any location format +- **Example**: `"New York, USA"`, `"London, UK"`, `"Mumbai, India"` +- **Why Optional**: Privacy concerns - some users may not want to share their location. + +### `image` (String, Optional) +- **Type**: String +- **Required**: No +- **Default**: `"profile.jpg"` +- **Purpose**: URL or path to the user's profile picture. Can be: + - Relative path to uploaded image + - Full URL to external image + - Default placeholder image +- **Example**: `"profile.jpg"`, `"/uploads/profiles/user123.jpg"`, `"https://example.com/avatar.jpg"` +- **Why Optional**: Users may not have a profile picture initially. Default value provides a fallback. + +### `deletedAt` (Date, Optional) +- **Type**: Date +- **Required**: No +- **Default**: `null` +- **Purpose**: Soft delete field. When a profile is deleted, this field is set to the deletion timestamp instead of removing the record. Allows for: + - Profile recovery + - Data retention + - Audit trails +- **Example**: `2024-01-15T10:30:00.000Z` or `null` +- **Why Optional**: Profiles are active by default. Only set when a profile is deleted. + +### `createdAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes (via `timestamps: true`) +- **Purpose**: Timestamp of when the profile was created. Usually matches the user account creation time. +- **Example**: `2024-01-15T10:30:00.000Z` + +### `updatedAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes (via `timestamps: true`) +- **Purpose**: Timestamp of when the profile was last modified. Updated whenever profile information is changed. +- **Example**: `2024-01-15T10:30:00.000Z` + +## Indexes +- `username`: Automatically indexed due to `unique: true` +- Consider adding index on `deletedAt` for soft delete queries + +## Relationships +- **Belongs to**: User (via `username`) +- **Related to**: UserSettings (controls profile visibility) + +## Privacy Considerations +- Profile visibility is controlled by the UserSettings model +- Some fields may be hidden based on user privacy settings +- Consider GDPR compliance for profile data + +## Usage Examples + +### Creating a Profile +```javascript +const profile = new UserProfile({ + username: 'johndoe', + name: 'John Doe', + passion: 'Software Engineer', + bio: 'Full-stack developer passionate about creating beautiful web experiences.', + location: 'New York, USA', + image: 'profile.jpg' +}); +await profile.save(); +``` + +### Updating Profile +```javascript +const profile = await UserProfile.findOne({ username: 'johndoe' }); +profile.name = 'John A. Doe'; +profile.bio = 'Updated bio text'; +await profile.save(); +``` + +### Finding Public Profiles +```javascript +// Note: Actual visibility should be checked against UserSettings +const profiles = await UserProfile.find({ + deletedAt: null +}); +``` + +### Soft Delete Profile +```javascript +profile.deletedAt = new Date(); +await profile.save(); +``` + +## Notes +- Always filter by `deletedAt: null` when querying active profiles +- Profile visibility should be checked against UserSettings model +- The `image` field should handle both relative and absolute URLs +- Consider image validation and size limits for uploaded images +- Profile data can be synced with User model's `name` field for consistency +- Empty strings are used instead of null to ensure fields exist in the document diff --git a/backend/doc/userSettingsModel.md b/backend/doc/userSettingsModel.md new file mode 100644 index 0000000..d9e8541 --- /dev/null +++ b/backend/doc/userSettingsModel.md @@ -0,0 +1,313 @@ +# User Settings Model Documentation + +## Overview +The User Settings model stores privacy and visibility preferences for users. It controls what information is visible to other users, which links appear in search results, and various privacy settings. This model is essential for the search and public profile features. + +## Model Name +`userSettings` (collection name in MongoDB) + +## Schema Fields + +### `userId` (ObjectId, Required, Unique) +- **Type**: mongoose.Schema.Types.ObjectId +- **Required**: Yes +- **Unique**: Yes +- **Ref**: `user` +- **Indexed**: Yes +- **Purpose**: Foreign key reference to the User model. Links settings to a specific user account. One settings document per user. +- **Example**: `ObjectId("507f1f77bcf86cd799439011")` +- **Why Required**: Essential for associating settings with users. Must be unique to ensure one settings document per user. + +### `username` (String, Required, Unique) +- **Type**: String +- **Required**: Yes +- **Unique**: Yes +- **Ref**: `user` +- **Indexed**: Yes +- **Purpose**: Username of the user. Stored redundantly for faster queries without joins. Used for username-based settings lookups. +- **Example**: `"johndoe"` +- **Why Required**: Allows quick username-based queries. Must match the User model's username. + +## Profile Visibility Settings + +### `profile.isPublic` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Master switch for profile visibility. When `true`, the profile can be viewed by others (subject to other settings). When `false`, profile is private. +- **Why Optional**: Defaults to private for user privacy. Users must explicitly opt-in to make profiles public. + +### `profile.showInSearch` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Controls whether the profile appears in search results. Even if `isPublic` is true, the profile won't appear in search unless this is also `true`. +- **Why Optional**: Users may want public profiles but not in search results. Provides granular control. + +### `profile.allowProfileView` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Allows other users to view the full profile page. When `false`, even if profile is public, it may not be fully accessible. +- **Why Optional**: Additional privacy layer. Users can control profile page access separately from search visibility. + +### `profile.showEmail` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Controls whether email is visible on public profile. Should default to false for privacy. +- **Why Optional**: Email is sensitive information. Should be hidden by default. + +### `profile.showLocation` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `true` +- **Purpose**: Controls whether location is shown on public profile. +- **Why Optional**: Some users may want to hide location for privacy. + +### `profile.showBio` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `true` +- **Purpose**: Controls whether bio is shown on public profile. +- **Why Optional**: Users may want to hide bio while keeping other info public. + +### `profile.showPassion` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `true` +- **Purpose**: Controls whether passion/profession is shown on public profile. +- **Why Optional**: Granular control over profile information visibility. + +### `profile.showProfileImage` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `true` +- **Purpose**: Controls whether profile image is shown on public profile. +- **Why Optional**: Some users may want to hide their profile picture. + +## Link Visibility Settings + +### `links.defaultVisibility` (String, Optional) +- **Type**: String +- **Enum Values**: `'public'`, `'private'`, `'unlisted'` +- **Default**: `'private'` +- **Purpose**: Global default visibility for all links. Can be overridden per link. + - `'public'`: Visible to everyone in search and on profile + - `'private'`: Only visible to the owner + - `'unlisted'`: Visible via direct link but not in search or on profile +- **Why Optional**: Defaults to private for privacy. Users must explicitly make links public. + +### `links.publicLinks` (Array, Optional) +- **Type**: Array of Strings (linkIds) +- **Ref**: `link` +- **Default**: `[]` +- **Purpose**: Array of `linkId`s that are explicitly set to public. These links will be visible in search and on public profiles, regardless of `defaultVisibility`. +- **Example**: `["linkedin", "github", "twitter"]` +- **Why Optional**: Not all links need to be public. Empty array means no links are explicitly public. + +### `links.unlistedLinks` (Array, Optional) +- **Type**: Array of Strings (linkIds) +- **Ref**: `link` +- **Default**: `[]` +- **Purpose**: Array of `linkId`s that are unlisted. These links are accessible via direct URL but won't appear in search results or on public profiles. +- **Example**: `["personal-blog", "private-portfolio"]` +- **Why Optional**: Not all links need special handling. Empty array by default. + +### `links.showLinkCount` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `true` +- **Purpose**: Controls whether the total number of links is shown on public profile. +- **Why Optional**: Some users may want to hide link count for privacy. + +### `links.showClickStats` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Controls whether click statistics are shown on public profile. Should default to false for privacy. +- **Why Optional**: Click statistics are sensitive business metrics. Should be private by default. + +## Search & Discovery Settings + +### `search.allowSearch` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Master switch for search visibility. When `true` and `profile.isPublic` is true, the profile can appear in search results. +- **Why Optional**: Users must explicitly opt-in to search visibility. + +### `search.showInFeatured` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Controls whether profile appears in "featured" or "popular" sections. Typically requires admin approval. +- **Why Optional**: Featured status is usually curated, not user-controlled. + +### `search.searchKeywords` (Array, Optional) +- **Type**: Array of Strings +- **Default**: `[]` +- **Purpose**: Custom keywords/tags for better searchability. Helps users find profiles by topics, skills, or interests. +- **Example**: `["developer", "javascript", "react", "open-source"]` +- **Why Optional**: Not required for basic search. Enhances discoverability. + +## Privacy Settings + +### `privacy.showAnalytics` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Controls whether analytics data is visible to public. Should default to false. +- **Why Optional**: Analytics are sensitive. Should be private by default. + +### `privacy.showLastUpdated` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Controls whether "last updated" timestamp is shown on public profile. +- **Why Optional**: Some users may not want to reveal activity patterns. + +### `privacy.requireAuth` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: When `true`, requires users to be logged in to view the profile. Adds an extra privacy layer. +- **Why Optional**: Most profiles are viewable without authentication. This is an advanced privacy option. + +## Notification Settings + +### `notifications.emailOnNewClick` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Sends email notification when a link receives a new click. +- **Why Optional**: Can be noisy. Users opt-in if they want notifications. + +### `notifications.emailOnProfileView` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Sends email notification when profile is viewed. +- **Why Optional**: Can be very noisy. Should be opt-in only. + +### `notifications.weeklyReport` (Boolean, Optional) +- **Type**: Boolean +- **Default**: `false` +- **Purpose**: Sends weekly analytics report via email. +- **Why Optional**: Users opt-in for weekly summaries. + +### `deletedAt` (Date, Optional) +- **Type**: Date +- **Default**: `null` +- **Purpose**: Soft delete field. When settings are deleted, this field is set instead of removing the record. +- **Why Optional**: Settings are active by default. + +### `createdAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes +- **Purpose**: Timestamp when settings were created. + +### `updatedAt` (Date, Auto-generated) +- **Type**: Date +- **Auto-generated**: Yes +- **Purpose**: Timestamp when settings were last modified. + +## Indexes + +### Single Field Indexes +- `userId`: For fast user-based queries +- `username`: For fast username-based queries + +### Compound Indexes +- `{ username: 1, deletedAt: 1 }`: For active settings queries +- `{ userId: 1, deletedAt: 1 }`: For active settings queries +- `{ 'profile.isPublic': 1, 'search.allowSearch': 1 }`: For finding searchable profiles + +## Instance Methods + +### `isLinkPublic(linkId)` +Checks if a specific link is visible to public. + +**Parameters**: +- `linkId` (String): The linkId to check + +**Returns**: Boolean + +**Logic**: +1. If linkId is in `publicLinks` array → returns `true` +2. If `defaultVisibility` is `'public'` and linkId is not in `unlistedLinks` → returns `true` +3. Otherwise → returns `false` + +### `isLinkUnlisted(linkId)` +Checks if a link is unlisted. + +**Parameters**: +- `linkId` (String): The linkId to check + +**Returns**: Boolean + +### `isSearchable()` +Checks if profile should appear in search results. + +**Returns**: Boolean + +**Logic**: Returns `true` if: +- `profile.isPublic` is `true` +- `search.allowSearch` is `true` +- `deletedAt` is `null` + +### `getPublicLinks(allLinks)` +Filters an array of links to return only public ones. + +**Parameters**: +- `allLinks` (Array): Array of link objects + +**Returns**: Array of public link objects + +## Static Methods + +### `getUserSettings(userIdOrUsername, userData)` +Gets or creates settings for a user. + +**Parameters**: +- `userIdOrUsername` (String|ObjectId): User ID or username +- `userData` (Object, Optional): User object with `_id` or `username` to avoid extra queries + +**Returns**: UserSettings document + +**Behavior**: +- If settings exist, returns them +- If not, creates default settings +- Automatically fetches missing userId/username from User model if needed + +## Usage Examples + +### Getting User Settings +```javascript +const settings = await UserSettings.getUserSettings('johndoe'); +// or +const settings = await UserSettings.getUserSettings(userId); +``` + +### Making Profile Public and Searchable +```javascript +const settings = await UserSettings.getUserSettings('johndoe'); +settings.profile.isPublic = true; +settings.search.allowSearch = true; +await settings.save(); +``` + +### Making Specific Links Public +```javascript +const settings = await UserSettings.getUserSettings('johndoe'); +if (!settings.links.publicLinks.includes('linkedin')) { + settings.links.publicLinks.push('linkedin'); +} +await settings.save(); +``` + +### Checking Link Visibility +```javascript +const settings = await UserSettings.getUserSettings('johndoe'); +const isPublic = settings.isLinkPublic('linkedin'); +``` + +### Finding Searchable Profiles +```javascript +const searchableProfiles = await UserSettings.find({ + 'profile.isPublic': true, + 'search.allowSearch': true, + deletedAt: null +}); +``` + +## Notes +- Always use `getUserSettings()` to ensure settings exist +- Default visibility is private for security +- Link visibility can be controlled globally or per-link +- Settings are created automatically when first accessed +- Always filter by `deletedAt: null` when querying active settings +- Consider caching settings for frequently accessed users diff --git a/backend/index.js b/backend/index.js index 3b7b1bb..3ffca19 100644 --- a/backend/index.js +++ b/backend/index.js @@ -6,20 +6,36 @@ const mongoose=require('mongoose') const dotenv = require('dotenv') const helmet = require('helmet'); const cloudinary = require('cloudinary') +const crypto = require('crypto') const authRoute=require('./routes/AuthRoute') const linkRoute=require('./routes/LinkRoute') +const analyticsRoute=require('./routes/AnalyticsRoute') const Link = require('./model/linkModel') const Profile=require('./model/userProfile') const User=require('./model/userModel') +const UserSettings=require('./model/userSettingsModel') const profileRoute=require('./routes/ProfileRoute') const { extractInfo } = require('./middleware/deviceInfo') -const { sendNotificationEmail } = require('./lib/mail') +const { sendVisitEmail, sendProfileVisitEmail } = require('./lib/mail') +const { verifyTokenOptional } = require('./middleware/verifyToken') +const resolveUsername = require('./middleware/resolveUsername') +const { getUserLinkUrl, getTemplateScripts, getFaviconScript } = require('./utils') +const bcryptjs = require('bcryptjs') +const { time } = require('console') +const { saveAnalytics } = require('./controller/AnalyticsController') dotenv.config() +// Log environment variables for debugging +const tier = process.env.TIER || 'NOT SET (defaults to production)'; +console.log('Environment check:'); +console.log(' TIER:', tier); +console.log(' Mode:', process.env.TIER === 'dev' ? 'DEVELOPMENT' : 'PRODUCTION'); +console.log(' PORT:', process.env.PORT || '8080 (default)'); + cloudinary.config({ cloud_name:process.env.CLOUDINARY_CLOUD_NAME, api_key: process.env.CLOUDINARY_API_KEY, @@ -34,114 +50,525 @@ const db_url=process.env.DATABASE_URL; app.set('view engine', 'ejs'); app.set('views', path.join(__dirname, 'views')); -// console.log('Views directory:', path.join(__dirname, 'views')); app.use(express.static(path.join(__dirname, 'public'))); +// Make helper functions available to all EJS templates +// Ensure it always reads the current environment variable +app.locals.getUserLinkUrl = getUserLinkUrl; +app.locals.getTemplateScripts = getTemplateScripts; +app.locals.getFaviconScript = getFaviconScript; + +// Allowed origins for CORS const allowedOrigins = [ - 'https://clickly.cv', - 'https://www.clickly.cv', + 'https://allin1url.in', + 'https://www.allin1url.in', 'https://linkbriger.vercel.app', - 'http://localhost:5173' + 'http://localhost:5173', + 'http://localhost:8080' ]; +// CORS configuration with subdomain support app.use(cors({ origin: function (origin, callback) { - if (!origin) return callback(null, true); + // Allow requests with no origin (like mobile apps, Postman, etc.) + if (!origin) { + return callback(null, true); + } + + // Check if origin is in explicit allowed list if (allowedOrigins.includes(origin)) { return callback(null, true); } - return callback(new Error('Not allowed by CORS')); + + // Allow all subdomains of allin1url.in (for custom user domains) + // Examples: https://dpkrn.allin1url.in, https://username.allin1url.in + try { + const url = new URL(origin); + const hostname = url.hostname.toLowerCase(); + + // Allow exact match for allin1url.in + if (hostname === 'allin1url.in') { + return callback(null, true); + } + + // Allow all subdomains (*.allin1url.in) + // Supports both single-level (dpkrn.allin1url.in) and multi-level (api.dpkrn.allin1url.in) + if (hostname.endsWith('.allin1url.in')) { + const subdomain = hostname.replace('.allin1url.in', ''); + // Subdomain should be non-empty (allows multi-level subdomains) + if (subdomain && subdomain.length > 0) { + return callback(null, true); + } + } + } catch (e) { + // Invalid URL format, reject + console.warn('Invalid CORS origin format:', origin); + } + + // Reject all other origins + return callback(new Error(`CORS: Origin ${origin} is not allowed`)); }, credentials: true, - methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'] + methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH'], + allowedHeaders: ['Content-Type', 'Authorization', 'X-Requested-With', 'Accept', 'Origin'], + exposedHeaders: ['Content-Length', 'Content-Type'], + maxAge: 86400 // 24 hours })); -// Optional: explicitly handle OPTIONS for all routes app.options('*', cors()); app.use(cookieParser()); app.use(express.json({limit:'100mb'})) -app.use(helmet()); +app.use(express.urlencoded({ extended: true, limit: '100mb' })) // For form submissions +// Configure helmet with iframe support for preview +app.use(helmet({ + frameguard: { + action: 'sameorigin' // Allow iframes from same origin, but we'll override for preview + } +})); app.use(helmet.contentSecurityPolicy({ directives: { defaultSrc: ["'self'"], - scriptSrc: ["'self'", "https://vercel.live", "https://*.vercel.app"], // Allow Vercel scripts + scriptSrc: ["'self'", "'unsafe-inline'", "https://vercel.live", "https://*.vercel.app"], // Allow inline scripts for EJS templates imgSrc: ["'self'", "data:", "https://res.cloudinary.com"], // Add your image host if needed - styleSrc: ["'self'", "'unsafe-inline'"], // Allow inline styles if needed - connectSrc: ["'self'", "https://linkb-one.vercel.app","https://linkb-one.vercel.app/*","https://clickly.cv/*"], // Add your API backend here + styleSrc: ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"], // Allow Google Fonts stylesheets + fontSrc: ["'self'", "https://fonts.gstatic.com"], // Allow Google Fonts actual font files + connectSrc: ["'self'", "https://allin1url.in","https://allin1url.in/*", "http://localhost:8080"], // Add your API backend here + frameAncestors: ["'self'", "http://localhost:5173", "https://allin1url.in", "https://linkbriger.vercel.app"], // Allow iframes from these origins // Add more directives as needed } })); -app.get('/',(req,res)=>{ - console.log("redirecting to frontend") - return res.redirect(307,"https://clickly.cv/app/") -}) +// Root route - handle main domain redirect and subdomain routing +app.get('/', resolveUsername, extractInfo, async (req, res) => { + + // If it's the main domain (allin1url.in or www.allin1url.in), redirect to frontend + if (req.isMainDomain || !req.params.username) { + console.log("Main domain detected, redirecting to frontend"); + return res.redirect(307, "https://allin1url.in/app/"); + } + + // If it's a subdomain, treat it as username route (show linkhub) + const username = req.params.username; + + // Use the same logic as /:username route + const tree = await Link.find({ + username: username, + visibility: 'public', + deletedAt: null + }); + const dp = await Profile.findOne({ username }, { image: 1, bio: 1 }); + const info = await User.findOne({ username }, { email: 1, name: 1, _id:1, username:1 }); + + if (!info) { + return res.render('not_exists'); + } + + const { email, name } = info; + const deviceDetails = req.details || {}; + + // Get visitor information if they're logged in + let visitorUsername = null; + let visitorName = null; + if (req.userId) { + try { + const visitor = await User.findById(req.userId, { username: 1, name: 1 }); + if (visitor && visitor.username !== username) { + visitorUsername = visitor.username; + visitorName = visitor.name; + } + } catch (err) { + console.error(`Error fetching visitor info:`, err); + } + } + + // Check if email notification is enabled for LinkHub views + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.shouldEmailOnLinkHubView()) { + sendProfileVisitEmail( + email, + username, + name, + deviceDetails, + visitorUsername, + visitorName + ).catch(err => { + console.error(`Failed to send LinkHub visit email to ${username}:`, err); + }); + } + } catch (err) { + console.error(`Error checking notification settings for ${username}:`, err); + } + + saveAnalytics({ + linkId: null, + userId: info._id, + username: info.username, + req + }).catch(err => { + console.error('Analytics error:', err); + }); + + if (tree && dp){ + // Get user settings to determine template + let template = 'default'; + const previewTemplate = req.query.template; + if (previewTemplate) { + template = previewTemplate; + } else { + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.template) { + template = settings.template; + } + } catch (err) { + console.log('Error fetching template settings, using default:', err.message); + } + } + + const templateName = `templates/linktree-${template}`; + console.log("templateName", templateName); + try { + return res.render(templateName, { + username: username, + tree: tree, + dp: dp + }); + } catch (renderErr) { + console.log(`Template ${templateName} not found, using default:`, renderErr.message); + return res.render('templates/linktree-default', { + username: username, + tree: tree, + dp: dp + }); + } + } + + return res.render('not_exists', { linkHub: '' }); +}); app.use('/auth',authRoute) app.use('/source',linkRoute) app.use('/profile',profileRoute) +app.use('/settings',require('./routes/SettingsRoute')) +app.use('/search',require('./routes/SearchRoute')) +app.use('/analytics',analyticsRoute) +app.use('/project',require('./routes/ProjectRoute')) + +// Helper function to encode username and source (base64) +const encodeData = (data) => { + return Buffer.from(data).toString('base64'); +}; + +// Helper function to decode username and source +const decodeData = (encodedData) => { + try { + return Buffer.from(encodedData, 'base64').toString('utf8'); + } catch (error) { + return null; + } +}; -app.get('/:username',extractInfo, async (req, res) => { - console.log("backend profile search start") - const username=req.params.username - const tree=await Link.find({username:username}) - const dp=await Profile.findOne({username},{image:1,bio:1}); - const info=await User.findOne({username},{email:1,name:1}) - if(!info){ - return res.render('not_exists') + + +// Handle password submission for private links +app.post('/link/verify-password', extractInfo, async (req, res) => { + const { hashedUsername, hashedSource, password } = req.body; + + const username = decodeData(hashedUsername); + const source = decodeData(hashedSource); + console.log(password) + + const doc = await Link.findOne({ + username, + source, + deletedAt: null + }); + + if (!doc) { + return res.status(404).json({ success: false }); } - const {email,name}=info - const deviceDetails=req.details - sendNotificationEmail(email,username,name,deviceDetails,"LinkHub") - if(tree&&dp){ - return res.render('linktree',{ - username:username, - tree:tree, - dp:dp - }) + // const bcryptjs = require('bcryptjs'); + if (!doc.password || !(await bcryptjs.compare(password, doc.password))) { + return res.status(401).json({ + success: false, + message: "Invalid password" + }); } + // // Password correct, redirect directly to destination + const {destination,clicked,notSeen}=doc + await Link.updateOne({username,source},{$set:{clicked:clicked+1,notSeen:notSeen+1}}) + + const info=await User.findOne({username},{email:1,name:1}) + if(info) { + const {email,name}=info + const deviceDetails=req.details || {} + // Send email asynchronously, don't wait for it + sendVisitEmail(email,username,name,deviceDetails,source).catch(err => { + console.error(`Failed to send visit to ${username}:`, err); + }); + } + + + return res.json({ + success: true, + destination: destination + }); +}); + +// Subdomain route handler: dpkrn.allin1url.in/github +// This route handles subdomain-based source access +// Note: API routes (defined with app.use above) will match first, so this won't interfere +app.get('/:source', resolveUsername, extractInfo, async (req, res) => { + // Only process if username was extracted from subdomain (not main domain) - return res.render('not_exists') -}) + if (req.isMainDomain || !req.params.username) { + // This is main domain, let it fall through to other routes + return res.redirect(307, "https://allin1url.in/app/"); + } + + + const username = req.params.username; + const source = req.params.source; + // Generate linkHub in subdomain format for subdomain requests + const linkHub = `Available link: ${req.protocol}://${username}.allin1url.in`; + + const link = await Link.findOne({ + username, + source, + deletedAt: null + }); + const info = await User.findOne({ username }, { email: 1, name: 1, _id:1,username:1 }); + if (!info) { + return res.render('not_exists', { + linkHub: "" + }); + } + const { email, name } = info; -app.get('/:username/:source',extractInfo, async (req, res) => { - + if (!link) { + return res.render('not_exists', { + linkHub: linkHub + }); + } + // Check link visibility + if (!link.isAccessible()) { + const hashedUsername = encodeData(username); + const hashedSource = encodeData(source); + return res.render('password_prompt', { + hashedUsername: hashedUsername, + hashedSource: hashedSource, + linkId: link.linkId + }); + } + + const { destination, clicked, notSeen } = link; + await Link.updateOne({ username, source }, { $set: { clicked: clicked + 1, notSeen: notSeen + 1 } }); + + + const deviceDetails = req.details; + + saveAnalytics({ + linkId: link._id, + userId: info._id, + username: info.username, + req + }).catch(err => { + console.error('Analytics error:', err); + }); + + + // Check if email notification is enabled for link clicks + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.shouldEmailOnClick()) { + sendVisitEmail(email, username, name, deviceDetails, source).catch(err => { + console.error(`Failed to send visit email to ${username}:`, err); + }); + } + } catch (err) { + console.error(`Error checking notification settings for ${username}:`, err); + } + + return res.redirect(307, destination); +}); + +// Main domain route handler: allin1url.in/username/source +app.get('/:username/:source', extractInfo, async (req, res) => { const {username,source}=req.params; const linkHub=`Available link: ${req.protocol}://${req.get('host')}/${username}` - const doc=await Link.findOne({username,source}) + const doc=await Link.findOne({ + username, + source, + deletedAt: null + }) const info=await User.findOne({username},{email:1,name:1}) if(!info){ - return res.render('not_exists',{ - linkHub:"" - }) + return res.render('not_exists',{ + linkHub:"" + }) } const {email,name}=info + if(!doc) { return res.render('not_exists',{ - linkHub:linkHub + linkHub:linkHub }) } - // return res.status(404).json({success:false,message:`${source} not has been added for this user !`}) + // Check link visibility + // private links should render password prompt page directly + if(!doc.isAccessible()) { + console.log("not accessible") + // Encode username and source before sending to EJS + const hashedUsername = encodeData(username); + const hashedSource = encodeData(source); + return res.render('password_prompt', { + hashedUsername:hashedUsername, + hashedSource:hashedSource, + linkId:doc.linkId + }); + } + + // unlisted links are accessible via direct URL (password protection can be added later) + // public links are accessible const {destination,clicked,notSeen}=doc await Link.updateOne({username,source},{$set:{clicked:clicked+1,notSeen:notSeen+1}}) const deviceDetails=req.details - sendNotificationEmail(email,username,name,deviceDetails,source) + + // Check if email notification is enabled for link clicks + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.shouldEmailOnClick()) { + sendVisitEmail(email,username,name,deviceDetails,source).catch(err => { + console.error(`Failed to send visit email to ${username}:`, err); + }); + } + } catch (err) { + console.error(`Error checking notification settings for ${username}:`, err); + // Don't send email if there's an error checking settings + } + return res.redirect(307,destination) }) +app.get('/:username', extractInfo, verifyTokenOptional, async (req, res) => { + // Allow iframe embedding for preview (allow from frontend origins) + res.setHeader('X-Frame-Options', 'SAMEORIGIN'); + const frontendOrigins = "http://localhost:5173 https://allin1url.in https://linkbriger.vercel.app 'self'"; + res.setHeader('Content-Security-Policy', `frame-ancestors ${frontendOrigins}`); + + console.log("backend profile search start") + const username=req.params.username + // Only show public links in linkhub - unlisted and private links should not appear + const tree=await Link.find({ + username: username, + visibility: 'public', + deletedAt: null + }) + const dp=await Profile.findOne({username},{image:1,bio:1}); + + const info=await User.findOne({username},{email:1,name:1}) + if(!info){ + return res.render('not_exists') + } + const {email,name}=info + const deviceDetails=req.details + + // Get visitor information if they're logged in + let visitorUsername = null; + let visitorName = null; + if (req.userId) { + try { + const visitor = await User.findById(req.userId, { username: 1, name: 1 }); + if (visitor && visitor.username !== username) { + // Only track if visitor is different from profile owner + visitorUsername = visitor.username; + visitorName = visitor.name; + } + } catch (err) { + console.error(`Error fetching visitor info:`, err); + } + } + + // Check if email notification is enabled for LinkHub views + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.shouldEmailOnLinkHubView()) { + sendProfileVisitEmail( + email, + username, + name, + deviceDetails, + visitorUsername, + visitorName + ).catch(err => { + console.error(`Failed to send LinkHub visit email to ${username}:`, err); + }); + } + } catch (err) { + console.error(`Error checking notification settings for ${username}:`, err); + // Don't send email if there's an error checking settings + } + + if(tree&&dp){ + // Get user settings to determine template + let template = 'default'; // Default template + + // Check if template query parameter is provided (for preview) + const previewTemplate = req.query.template; + if (previewTemplate) { + template = previewTemplate; + } else { + // Otherwise, use user's saved template from settings + try { + const settings = await UserSettings.getUserSettings(username); + if (settings && settings.template) { + template = settings.template; + } + } catch (err) { + console.log('Error fetching template settings, using default:', err.message); + } + } + + // Construct template name (templates/linktree-{template}) + const templateName = `templates/linktree-${template}`; + console.log("templateName",templateName) + // Render template, fallback to default if template doesn't exist + try { + return res.render(templateName,{ + username:username, + tree:tree, + dp:dp + }); + } catch (renderErr) { + // If template doesn't exist, fallback to default + console.log(`Template ${templateName} not found, using default:`, renderErr.message); + return res.render('templates/linktree-default',{ + username:username, + tree:tree, + dp:dp + }); + } + } + + return res.render('not_exists', { linkHub: '' }) +}) + + + mongoose.connect(db_url).then(()=>{ console.log('db connected') diff --git a/backend/lib/emailTemplate.js b/backend/lib/emailTemplate.js index 2c9af25..7cc8585 100644 --- a/backend/lib/emailTemplate.js +++ b/backend/lib/emailTemplate.js @@ -86,86 +86,346 @@ const Welcome_Email_Template = ` - Welcome to Our Community + Welcome to All in1 url! -
-
Welcome to Our Community!
+
+
+

🎉 Welcome to All in1 url!

+

Your journey to better link management starts now

+
-

Hello {name},

-

We’re thrilled to have you join us! Your registration was successful, and we’re committed to providing you with the best experience possible.

-

Here’s how you can get started:

-
    -
  • Explore our features and customize your experience.
  • -
  • Stay informed by checking out our blog for the latest updates and tips.
  • -
  • Reach out to our support team if you have any questions or need assistance.
  • -
- Get Started -

If you need any help, don’t hesitate to contact us. We’re here to support you every step of the way.

+

Hello {name} (@{username})!

+ +

+ We're absolutely thrilled to have you join the All in1 url community! 🚀 Your account has been successfully created, and you're just moments away from transforming how you share and manage your social media links. +

+ +
+ ✨ Your Personalized Link is Ready! +

+ Share all your profiles with one simple link: https://allin1url.in/{username} +

+
+ +
+

🌟 What You Can Do Now:

+ +
+
🔗
+
+

One Link, All Your Profiles

+

Create a single, memorable link that leads to all your social media profiles. No more long, complicated URLs!

+
+
+ +
+
📊
+
+

Track Every Click

+

Get real-time analytics on who's visiting your links. Know exactly when and where your audience is engaging.

+
+
+ +
+
📧
+
+

Instant Email Notifications

+

Receive email alerts every time someone clicks your links. Stay connected with your audience in real-time.

+
+
+ +
+
+
+

Update Once, Reflect Everywhere

+

Change a link once, and it updates across all platforms instantly. No more manual updates everywhere!

+
+
+ +
+
🎨
+
+

Beautiful Landing Page

+

Your profile gets a stunning, customizable landing page that showcases all your links in one beautiful place.

+
+
+
+ + + + + +
+

📋 Quick Start Guide:

+ +
+
1
+
+

Add Your First Link

+

Go to your dashboard and click "Create Bridge" to add your first social media link. Start with your most important profile!

+
+
+ +
+
2
+
+

Customize Your Profile

+

Visit your profile page to add a bio, profile picture, and personalize your landing page. Make it uniquely yours!

+
+
+ +
+
3
+
+

Share Your Link

+

Copy your personalized link https://allin1url.in/{username} and share it everywhere - in your bio, email signature, business cards, and more!

+
+
+ +
+
4
+
+

Track Your Analytics

+

Monitor who's clicking your links in real-time. You'll receive email notifications for every visit, so you never miss an engagement!

+
+
+
+ +
+

💡 Pro Tips for Success:

+
    +
  • Keep your link short and memorable - it's already done for you!
  • +
  • Update your links in one place - changes reflect everywhere instantly
  • +
  • Use descriptive platform names (e.g., "Instagram" instead of "ig")
  • +
  • Check your email notifications to see who's visiting your links
  • +
  • Share your link on all your social media profiles for maximum reach
  • +
+
+ +

+ Questions? We're here to help! Check out our documentation or reply to this email. +

@@ -260,8 +520,501 @@ const Notification_Email_Template=` ` +const Onboarding_Email_Template = ` + + + + + + New User Joined - All in1 url + + + +
+
+

🎉 New User Joined!

+

Someone just signed up for All in1 url

+
+ +
+
+

Welcome to the Community!

+

+ A new user has successfully registered and joined the All in1 url community! +

+
+ + + +
+

📊 Community Growth:

+

+ Every new member helps grow the All in1 url community! This user can now create personalized links, track analytics, and manage their social media presence all in one place. +

+
+ +

+ You can view user activity and manage your All in1 url platform from your admin dashboard. +

+
+ + +
+ + +`; + +const Profile_Visit_Email_Template = ` + + + + + + Profile Visit Notification + + + +
+
+

👋 Profile Visit Alert!

+

Someone just checked out your profile

+
+
+
+

🎉 Great News!

+

+ {{visitorName}} has visited your All in1 url profile! +

+
+ +
+
{{visitorDisplayName}}
+
+ Username: @{{visitorUsername}} +
+
+ +
+
+
📍
+
Location
+
{{city}}, {{country}}
+
+
+
🖥️
+
Browser
+
{{browser}}
+
+
+
+
Visit Time
+
{{time}}
+
+
+
🌐
+
IP Address
+
{{ipAdd}}
+
+
+ + + +
+

📊 Engagement Insight:

+

+ Profile visits are a great indicator of interest! Keep sharing your link and engaging with your audience to grow your presence. +

+
+ + + +

+ Want to see more details? Check your analytics dashboard to track all profile visits and link clicks in real-time. +

+
+ +
+ + +`; + module.exports={ Verification_Email_Template, Welcome_Email_Template, - Notification_Email_Template + Notification_Email_Template, + Onboarding_Email_Template, + Profile_Visit_Email_Template } \ No newline at end of file diff --git a/backend/lib/mail.js b/backend/lib/mail.js index 4bebe80..d30282a 100644 --- a/backend/lib/mail.js +++ b/backend/lib/mail.js @@ -2,6 +2,9 @@ const nodemailer = require("nodemailer"); const { Verification_Email_Template, Notification_Email_Template, + Welcome_Email_Template, + Onboarding_Email_Template, + Profile_Visit_Email_Template, } = require("./emailTemplate"); @@ -10,13 +13,13 @@ const transport = nodemailer.createTransport({ port: 465, secure: true, // true for 465, false for other ports auth: { - user: "d.wizard.techno@gmail.com", - pass: "lscemukhybvgeqmt", + user: process.env.EMAIL_USER || "linkbriger@gmail.com", + pass: process.env.EMAIL_PASS || "djppjsnipjufbqee", }, }); -const sendNotificationEmail = async ( +const sendVisitEmail = async ( email, username, name, @@ -40,8 +43,9 @@ const sendNotificationEmail = async ( emailHTML = emailHTML.replace(regex, value); } + const emailUser = process.env.EMAIL_USER || "linkbriger@gmail.com"; const data = { - from: `"LinkBridger" `, + from: `"All in1 url" <${emailUser}>`, to: email, subject: `New Visit on Your ${platform}`, text: `Hello ${name} (${username}), someone visited your ${platform} link.`, @@ -56,14 +60,14 @@ const sendNotificationEmail = async ( console.warn("⚠️ Email not accepted:", info); } } catch (err) { - console.error("❌ Error sending email:", err.message); + console.error(`error while sending email to ${email} : ${err.message}`); } }; const sendOtpVerification = async (otp, email, username, AppName) => { const data = { - from: `"${AppName}" `, + from: `"${AppName}" `, to: email, subject: "Your Message is", text: `Hello ${username}`, @@ -76,10 +80,10 @@ const sendOtpVerification = async (otp, email, username, AppName) => { try { const info = await transport.sendMail(data); if (info) { - console.log("email sent !"); + console.log(`otp sent to ${email} : ${otp}!`); } } catch (err) { - console.log(err); + console.log(`error while sending otp to ${email} : ${err.message}`); } }; @@ -89,8 +93,9 @@ const sendEmailVerification = async ( username, AppName ) => { + const emailUser = process.env.EMAIL_USER || "linkbriger@gmail.com"; const data = { - sender: `"${AppName}" `, + sender: `"${AppName}" <${emailUser}>`, reciever: email, subject: "Your Email Verification Link", text: "", @@ -168,17 +173,128 @@ const sendEmailVerification = async ( try { const info = await transport.sendMail(data); if (info) { - console.log(info); + console.log(`email sent to ${email} !`); } } catch (err) { - console.log(err); + console.log(`error while sending email to ${email} : ${err.message}`); } }; +const sendWelcomeEmail = async (email, username, name, AppName) => { + let html = Welcome_Email_Template.replace(/{username}/g, username); + html = html.replace(/{name}/g, name || username); + const emailUser = process.env.EMAIL_USER || "linkbriger@gmail.com"; + const supportEmail = process.env.SUPPORT_EMAIL || "support@All in1 url.com"; + + // Replace support email in template + html = html.replace(/support@All in1 url\.com/g, supportEmail); + html = html.replace(/d\.wizard\.techno@gmail\.com/g, supportEmail); + + const data = { + from: `"${AppName}" <${emailUser}>`, + to: email, + subject: "🎉 Welcome to All in1 url - Your Link Management Journey Begins!", + text: `Hello ${name || username} (@${username})! Welcome to All in1 url. Your personalized link is ready: https://allin1url.in/${username}`, + html: html, + }; + + try { + const info = await transport.sendMail(data); + if (info) { + console.log(`email sent to ${email} !`); + } + } catch (err) { + console.log(`error while sending email to ${email} : ${err.message}`); + } +}; + +const sendNewUserOnboardingEmail = async (email, username, name, AppName) => { + let html = Onboarding_Email_Template.replace(/{username}/g, username); + html = html.replace(/{name}/g, name || username); + const emailUser = process.env.EMAIL_USER || "linkbriger@gmail.com"; + + const data = { + from: `"${AppName}" <${emailUser}>`, + to: email, + subject: `🎉 New User Joined All in1 url - @${username}`, + text: `New user @${username} has joined the All in1 url community. Profile link: https://allin1url.in/${username}`, + html: html, + }; + + + try { + const info = await transport.sendMail(data); + if (info) { + console.log(`email sent to ${email} !`); + } + } catch (err) { + console.log(`error while sending email to ${email} : ${err.message}`); + } +}; +const sendProfileVisitEmail = async ( + email, + profileOwnerUsername, + profileOwnerName, + deviceDetails, + visitorUsername = null, + visitorName = null +) => { + // Determine visitor information + const visitorDisplayName = visitorName || visitorUsername || "Someone"; + const visitorUsernameDisplay = visitorUsername || "Anonymous"; + const visitorNameText = visitorUsername + ? `${visitorName || visitorUsername} (@${visitorUsername})` + : "Someone"; + + const placeholders = { + "{{username}}": profileOwnerUsername, + "{{visitorName}}": visitorNameText, + "{{visitorDisplayName}}": visitorDisplayName, + "{{visitorUsername}}": visitorUsernameDisplay, + "{{city}}": deviceDetails.city || "Unknown", + "{{country}}": deviceDetails.country || "Unknown", + "{{browser}}": deviceDetails.browser || "Unknown", + "{{time}}": deviceDetails.time || new Date().toLocaleTimeString("en-IN", { hour: '2-digit', minute: '2-digit' }), + "{{ipAdd}}": deviceDetails.ip || "Unknown", + }; + + let emailHTML = Profile_Visit_Email_Template; + for (const [key, value] of Object.entries(placeholders)) { + const regex = new RegExp(key.replace(/[{}]/g, "\\$&"), "g"); + emailHTML = emailHTML.replace(regex, value); + } + + const emailUser = process.env.EMAIL_USER || "linkbriger@gmail.com"; + const subject = visitorUsername + ? `👋 ${visitorName || visitorUsername} (@${visitorUsername}) visited your profile!` + : `👋 Someone visited your All in1 url profile!`; + + const data = { + from: `"All in1 url" <${emailUser}>`, + to: email, + subject: subject, + text: `Hello ${profileOwnerName} (@${profileOwnerUsername}), ${visitorNameText} has visited your All in1 url profile!`, + html: emailHTML, + }; + + try { + const info = await transport.sendMail(data); + if (info.accepted.length > 0) { + console.log("✅ Profile visit email sent to:", email); + } else { + console.warn("⚠️ Profile visit email not accepted:", info); + } + } catch (err) { + console.error(`error while sending profile visit email to ${email} : ${err.message}`); + } +}; module.exports = { sendEmailVerification, sendOtpVerification, - sendNotificationEmail, + sendVisitEmail, + sendWelcomeEmail, + sendNewUserOnboardingEmail, + sendProfileVisitEmail, }; diff --git a/backend/middleware/deviceInfo.js b/backend/middleware/deviceInfo.js index 66eb029..5d94b22 100644 --- a/backend/middleware/deviceInfo.js +++ b/backend/middleware/deviceInfo.js @@ -1,30 +1,153 @@ -const geoip= require('geoip-lite'); -const useragent=require('useragent'); - -const extractInfo=(req,res,next)=>{ - const ip = req.headers['x-forwarded-for'] || req.socket.remoteAddress; - const geo = geoip.lookup(ip) || { city: "Unknown", country: "Unknown" }; - const agent = useragent.parse(req.headers['user-agent']); - const browser = agent.toAgent(); - - // Get current time - const visitTime = new Date().toLocaleTimeString("en-IN", { hour: '2-digit', minute: '2-digit' }); - - // Prepare details - const details = { - ip:ip, - city: geo.city || "Unknown", - country: geo.country || "Unknown", - browser: browser, - time: visitTime, - }; - req.details=details - - // Send email notification - // console.log(details) - - return next() + +const UAParser = require('ua-parser-js'); +const geoip = require('geoip-lite'); + +const extractInfo = (req, res, next) => { + + const host = req.get('host') || ''; + + /* ---------------------------------- + 1. IP ADDRESS (proxy-safe) + ---------------------------------- */ + const ip = + req.headers['cf-connecting-ip'] || + req.headers['x-forwarded-for']?.split(',')[0] || + req.socket.remoteAddress || + null; + + /* ---------------------------------- + 2. GEO LOCATION + ---------------------------------- */ + const geo = ip ? geoip.lookup(ip) : null; + + /* ---------------------------------- + 3. USER AGENT PARSING + ---------------------------------- */ + const uaString = req.headers['user-agent'] || null; + const parser = new UAParser(uaString || ''); + const ua = parser.getResult(); + + /* ---------------------------------- + 4. DEVICE TYPE NORMALIZATION + ---------------------------------- */ + let deviceType = 'desktop'; // Default to desktop + if (ua.device && ua.device.type) { + if (ua.device.type === 'mobile') deviceType = 'mobile'; + else if (ua.device.type === 'tablet') deviceType = 'tablet'; + else deviceType = 'desktop'; + } + + /* ---------------------------------- + 5. REFERRER (fix: use lowercase 'referer') + Note: Social media platforms like LinkedIn don't send referrer due to privacy policies + ---------------------------------- */ + let referrer = req.get('referer') || req.headers.referer || req.get('Referrer') || 'direct'; + + // Additional referrer detection for social media + const origin = req.headers.origin; + const requestHost = req.get('host') || ''; + + // If referrer is 'direct' but we have an origin, use that + if (referrer === 'direct' && origin) { + referrer = origin; + } + + // Log for debugging (remove in production) + if (referrer === 'direct') { + console.log('Direct access - Headers:', { + referer: req.headers.referer, + origin: origin, + host: requestHost, + userAgent: req.headers['user-agent']?.substring(0, 50) + }); + } + + /* ---------------------------------- + 6. TIME + ---------------------------------- */ + const now = new Date(); + + let timezone = 'UTC'; + try { + timezone = Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC'; + } catch (_) {} + + /* ---------------------------------- + 7. NEW PAYLOAD (future-proof) + ---------------------------------- */ + req.analyticsPayload = { + username: req.params?.username || null, + clickDate: now, + + clickedTime: { + iso: now.toISOString(), + date: now.toISOString().split('T')[0], + time: now.toTimeString().split(' ')[0], + datetime: `${now.toISOString().split('T')[0]} ${now.toTimeString().split(' ')[0]}`, + unixTimestamp: now.getTime(), + timezone, + timezoneOffset: now.getTimezoneOffset() + }, + + location: { + country: geo?.country || null, + city: geo?.city || null, + region: geo?.region || null, + ipAddress: ip + }, + + device: { + type: deviceType, + brand: ua.device?.vendor || null, + model: ua.device?.model || null + }, + + os: { + name: ua.os?.name || null, + version: ua.os?.version || null + }, + + browser: { + name: ua.browser?.name || null, + version: ua.browser?.version || null + }, + + referrer, + userAgent: uaString + }; + + /* ---------------------------------- + 8. BACKWARD COMPATIBILITY (OLD req.details) + ---------------------------------- */ + req.details = { + ip: ip, + city: geo?.city || 'Unknown', + country: geo?.country || 'Unknown', + + // Old system used single browser string + browser: ua.browser?.name + ? `${ua.browser.name}${ua.browser.version ? ' ' + ua.browser.version : ''}`.trim() + : 'Unknown', + + // Old system stored only time (HH:MM) + time: now.toLocaleTimeString('en-IN', { + hour: '2-digit', + minute: '2-digit' + }) + }; + + if ( + host.includes('localhost') || + host.startsWith('127.0.0.1') || + host.startsWith('::1') + ) { + req.skipAnalytics = true; + return next(); + } + + return next(); +}; + +module.exports = { + extractInfo } -module.exports={ - extractInfo -} \ No newline at end of file diff --git a/backend/middleware/resolveUsername.js b/backend/middleware/resolveUsername.js new file mode 100644 index 0000000..e1aafc2 --- /dev/null +++ b/backend/middleware/resolveUsername.js @@ -0,0 +1,27 @@ +const resolveUsername = async (req, res, next) => { + const host = req.get('host'); + if (!host) { + return res.status(400).json({ success: false, message: "Invalid host" }); + } + + // Extract subdomain (first part before the first dot) + const hostParts = host.split('.'); + const subdomain = hostParts[0].toLowerCase(); + + // Handle main domain cases - redirect to frontend + if (subdomain === 'clickly' || subdomain === 'www' || subdomain === '') { + // This is the main domain, not a subdomain + // Set a flag so routes know to redirect to frontend + req.isMainDomain = true; + req.params.username = null; + return next(); + } + + // This is a subdomain - extract username + req.isMainDomain = false; + req.params.username = subdomain; + console.log("Extracted username from subdomain:", subdomain); + return next(); +}; + +module.exports = resolveUsername; \ No newline at end of file diff --git a/backend/middleware/verifyToken.js b/backend/middleware/verifyToken.js index 8496be8..99347e7 100644 --- a/backend/middleware/verifyToken.js +++ b/backend/middleware/verifyToken.js @@ -4,13 +4,13 @@ const Otp = require("../model/otpModel"); const verifyToken = async (req, res, next) => { try { const token = req.cookies?.token; - console.log("token=",token) if (!token) { return res .status(401) .json({ success: false,message:"token expired !" }); } + const auth = await jwt.verify(token, process.env.JWT_KEY); if (auth) { req.userId = auth.id; @@ -70,4 +70,31 @@ const otpVerify = async (req, res, next) => { } }; -module.exports = { verifyToken, otpVerify }; +// Optional token verification - doesn't fail if no token, but sets userId if token is valid +const verifyTokenOptional = async (req, res, next) => { + try { + const token = req.cookies?.token; + + if (!token) { + // No token provided, continue without authentication + req.userId = null; + return next(); + } + + const auth = await jwt.verify(token, process.env.JWT_KEY); + if (auth) { + req.userId = auth.id; + return next(); + } + + // Invalid token, but continue without authentication + req.userId = null; + return next(); + } catch (err) { + // Token error, but continue without authentication + req.userId = null; + return next(); + } +}; + +module.exports = { verifyToken, otpVerify, verifyTokenOptional }; diff --git a/backend/model/linkAnalyticsModel.js b/backend/model/linkAnalyticsModel.js new file mode 100644 index 0000000..c9be00a --- /dev/null +++ b/backend/model/linkAnalyticsModel.js @@ -0,0 +1,220 @@ +const mongoose = require('mongoose'); + +const linkAnalyticsSchema = new mongoose.Schema( + { + /* ========================= + Core References + ========================= */ + linkId: { + type: mongoose.Schema.Types.ObjectId, + default: null, + ref: 'link' + }, + userId: { + type: mongoose.Schema.Types.ObjectId, + required: true, + ref: 'user', + index: true + }, + username: { + type: String, + required: true, + index: true + }, + + /* ========================= + Click Date (SOURCE OF TRUTH) + ========================= */ + clickDate: { + type: Date, + required: true, + default: Date.now, + index: true + }, + + /* ========================= + Clicked Time (DERIVED) + ========================= */ + clickedTime: { + iso: { + type: String, // 2025-01-27T12:34:56.789Z + default: () => new Date().toISOString() + }, + date: { + type: String, // YYYY-MM-DD + default: () => new Date().toISOString().split('T')[0] + }, + time: { + type: String, // HH:MM:SS + default: () => new Date().toTimeString().split(' ')[0] + }, + datetime: { + type: String, // YYYY-MM-DD HH:MM:SS + default: () => { + const now = new Date(); + return `${now.toISOString().split('T')[0]} ${now + .toTimeString() + .split(' ')[0]}`; + } + }, + unixTimestamp: { + type: Number, + default: () => Date.now() + }, + timezone: { + type: String, + default: 'UTC' + }, + timezoneOffset: { + type: Number, + default: () => new Date().getTimezoneOffset() + } + }, + + /* ========================= + Location + ========================= */ + location: { + country: { type: String, default: null }, + city: { type: String, default: null }, + region: { type: String, default: null }, + ipAddress: { type: String, default: null } + }, + + /* ========================= + Device + ========================= */ + device: { + type: { + type: String, + enum: ['mobile', 'desktop', 'tablet', 'unknown'], + default: 'unknown' + }, + brand: { type: String, default: null }, + model: { type: String, default: null } + }, + + /* ========================= + OS + ========================= */ + os: { + name: { type: String, default: null }, + version: { type: String, default: null } + }, + + /* ========================= + Browser + ========================= */ + browser: { + name: { type: String, default: null }, + version: { type: String, default: null } + }, + + /* ========================= + Meta + ========================= */ + referrer: { + type: String, + default: null + }, + userAgent: { + type: String, + default: null + }, + + seen: { + type: Boolean, + default: false + }, + + deletedAt: { + type: Date, + default: null + } + }, + { + timestamps: true // createdAt & updatedAt + } +); + +/* ========================= + Indexes +========================= */ +linkAnalyticsSchema.index({ linkId: 1, clickDate: -1 }); +linkAnalyticsSchema.index({ userId: 1, clickDate: -1 }); +linkAnalyticsSchema.index({ username: 1, clickDate: -1 }); +linkAnalyticsSchema.index({ linkId: 1, deletedAt: 1 }); +linkAnalyticsSchema.index({ userId: 1, deletedAt: 1 }); + +/* ========================= + Pre-save Hook +========================= */ +linkAnalyticsSchema.pre('save', function (next) { + if (!this.isNew) return next(); + + const now = this.clickDate || new Date(); + + let timezone = 'UTC'; + try { + timezone = Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC'; + } catch (_) {} + + this.clickedTime = { + iso: now.toISOString(), // ⭐ REQUIRED FORMAT + date: now.toISOString().split('T')[0], + time: now.toTimeString().split(' ')[0], + datetime: `${now.toISOString().split('T')[0]} ${now + .toTimeString() + .split(' ')[0]}`, + unixTimestamp: now.getTime(), + timezone, + timezoneOffset: now.getTimezoneOffset() + }; + + next(); +}); + +/* ========================= + Virtuals +========================= */ +linkAnalyticsSchema.virtual('formattedDate').get(function () { + if (!this.clickDate) return null; + return this.clickDate.toLocaleString('en-IN', { + year: 'numeric', + month: 'long', + day: 'numeric', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + hour12: true + }); +}); + +linkAnalyticsSchema.virtual('isoString').get(function () { + return this.clickDate ? this.clickDate.toISOString() : null; +}); + +/* ========================= + Instance Method +========================= */ +linkAnalyticsSchema.methods.getFullTimestamp = function () { + const date = this.clickDate || new Date(); + + let timezone = 'UTC'; + try { + timezone = Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC'; + } catch (_) {} + + return { + iso: date.toISOString(), + unix: date.getTime(), + date: date.toISOString().split('T')[0], + time: date.toTimeString().split(' ')[0], + timezone, + offset: date.getTimezoneOffset() + }; +}; + +const LinkAnalytics = mongoose.model('linkAnalytics', linkAnalyticsSchema); + +module.exports = LinkAnalytics; diff --git a/backend/model/linkModel.js b/backend/model/linkModel.js index 7e78830..260d736 100644 --- a/backend/model/linkModel.js +++ b/backend/model/linkModel.js @@ -6,7 +6,13 @@ const linkSchema=mongoose.Schema({ }, userId:{ type:mongoose.Schema.Types.ObjectId, - required:true + required:true, + ref: 'user' + }, + linkId: { + type: String, + unique: true, + required: true }, source:{ type:String, @@ -23,8 +29,79 @@ const linkSchema=mongoose.Schema({ clicked:{ type:Number, default:0 + }, + visibility: { + type: String, + enum: ['public', 'unlisted', 'private'], + default: 'public', + required: true, + index: true + // public: visible in profile preview, searches by other users, and link hub + // unlisted: not in link hub, not in profile, but accessible via direct URL with password protection + // private: not visible anywhere, show "link protected" if accessed directly + }, + password: { + type: String, + default: null, + // Hashed password for unlisted links (required when visibility is 'unlisted') + // Should be hashed using bcrypt before storing + // Only used when visibility is 'unlisted' + }, + deletedAt: { + type: Date, + default: null } +}, { + timestamps: true // This adds createdAt and updatedAt automatically }) +// Index for visibility queries +linkSchema.index({ userId: 1, visibility: 1, deletedAt: 1 }); +linkSchema.index({ username: 1, visibility: 1, deletedAt: 1 }); + +// Pre-save hook to generate linkId if missing +linkSchema.pre('save', async function(next) { + if (!this.linkId) { + const crypto = require('crypto'); + let newLinkId; + let exists = true; + // Ensure uniqueness + while (exists) { + newLinkId = crypto.randomBytes(16).toString('hex'); + const existing = await this.constructor.findOne({ linkId: newLinkId }); + exists = !!existing; + } + this.linkId = newLinkId; + } + next(); +}); + +// Method to check if link is accessible +linkSchema.methods.isAccessible = function(requirePassword = false) { + if (this.deletedAt) return false; + + if (this.visibility === 'public') { + return true; + } + + if (this.visibility === 'unlisted') { + // Unlisted links are accessible but may require password + return !requirePassword || this.password !== null; + } + + // private links are not accessible + return false; +}; + +// Method to check if link should be shown in profile/hub +linkSchema.methods.shouldShowInProfile = function() { + return this.visibility === 'public' && !this.deletedAt; +}; + +// Method to check if link should be shown in search +linkSchema.methods.shouldShowInSearch = function() { + return this.visibility === 'public' && !this.deletedAt; +}; + const Link=mongoose.model('link',linkSchema) module.exports=Link \ No newline at end of file diff --git a/backend/model/projectModel.js b/backend/model/projectModel.js new file mode 100644 index 0000000..3544666 --- /dev/null +++ b/backend/model/projectModel.js @@ -0,0 +1,102 @@ +const mongoose = require('mongoose'); + +const projectSchema = new mongoose.Schema({ + // Project name/identifier (singleton - only one project config) + projectName: { + type: String, + default: 'LinkBridger', + unique: true + }, + + // Available templates configuration + availableTemplates: [{ + template: { + type: String, + required: true, + trim: true + }, + status: { + type: Boolean, + default: true + }, + displayName: { + type: String, + default: '' + }, + description: { + type: String, + default: '' + } + }], + + // Other project configuration can be added here + // e.g., maintenance mode, feature flags, etc. + + deletedAt: { + type: Date, + default: null + } +}, { + timestamps: true +}); + +// Static method to get or create project config (singleton pattern) +projectSchema.statics.getProjectConfig = async function() { + + const defaultTemplates = [ + { template: 'default', status: true, displayName: 'Default', description: 'Clean and simple default template' }, + { template: 'minimal', status: true, displayName: 'Minimal', description: 'Minimalist design' }, + { template: 'modern', status: true, displayName: 'Modern', description: 'Modern and sleek design' }, + { template: 'dark', status: true, displayName: 'Dark', description: 'Dark theme template' }, + { template: 'light', status: true, displayName: 'Light', description: 'Light theme template' }, + { template: 'hacker', status: true, displayName: 'Hacker', description: 'Hacker-style template' }, + { template: 'glass', status: true, displayName: 'Glass', description: 'Glassmorphism design' }, + { template: 'neon', status: true, displayName: 'Neon', description: 'Neon glow effects' }, + { template: 'gradient', status: true, displayName: 'Gradient', description: 'Gradient backgrounds' }, + { template: 'cards', status: true, displayName: 'Cards', description: 'Card-based layout' }, + { template: 'particles', status: true, displayName: 'Particles', description: 'Particle effects' }, + { template: '3d', status: true, displayName: '3D', description: '3D effects template' }, + { template: 'retro', status: true, displayName: 'Retro', description: 'Retro style template' }, + { template: 'water', status: true, displayName: 'Water', description: 'Water effects with flowing waves and bubbles' }, + { template: 'forest', status: true, displayName: 'Forest', description: 'Forest theme with falling leaves and nature effects' }, + { template: 'royal', status: true, displayName: 'Royal', description: 'Royal/Lords theme with gold accents and regal styling' }, + { template: 'space', status: true, displayName: 'Space', description: 'Space theme with twinkling stars and cosmic effects' }, + { template: 'ocean', status: true, displayName: 'Ocean', description: 'Ocean theme with waves, bubbles, and swimming fish' }, + { template: 'fire', status: true, displayName: 'Fire', description: 'Fire theme with flickering flames and rising embers' }, + { template: 'galaxy', status: true, displayName: 'Galaxy', description: 'Galaxy theme with nebula clouds and spiral patterns' }, + { template: 'mountain', status: true, displayName: 'Mountain', description: 'Mountain theme with peaks, snow, and clouds' }, + { template: 'storm', status: true, displayName: 'Storm', description: 'Storm theme with lightning flashes and rain effects' }, + { template: 'mystical', status: true, displayName: 'Mystical', description: 'Mystical theme with floating orbs and magic particles' } + ]; + + let project = await this.findOne({ + projectName: 'LinkBridger', + deletedAt: null + }); + + // Create project if it doesn't exist + if (!project) { + project = await this.create({ + projectName: 'LinkBridger', + availableTemplates: defaultTemplates + }); + return project; + } + + // Add templates that don't exist in the database + const existingTemplateNames = project.availableTemplates.map(t => t.template); + const notExistingTemplates = defaultTemplates.filter(template => + !existingTemplateNames.includes(template.template) + ); + + if (notExistingTemplates.length > 0) { + project.availableTemplates.push(...notExistingTemplates); + await project.save(); + } + + return project; +}; + +const Project = mongoose.model('project', projectSchema); +module.exports = Project; + diff --git a/backend/model/userModel.js b/backend/model/userModel.js index 06c9a20..c019393 100644 --- a/backend/model/userModel.js +++ b/backend/model/userModel.js @@ -6,19 +6,28 @@ const userSchema=mongoose.Schema({ email:{ type:String, required:true, - unique:true + unique:true // Allows multiple null values }, password:{ type:String, - required:true + required:false // Made optional for OAuth users }, username:{ type:String, required:true, unique:true, }, - -},{timestamps:true}) + picture:{ + type:String, + default:null + }, + deletedAt: { + type: Date, + default: null + } +}, { + timestamps: true // This adds createdAt and updatedAt automatically +}) const User=mongoose.model('user',userSchema) module.exports=User \ No newline at end of file diff --git a/backend/model/userProfile.js b/backend/model/userProfile.js index 98c55fa..688af31 100644 --- a/backend/model/userProfile.js +++ b/backend/model/userProfile.js @@ -3,7 +3,8 @@ const userProfileSchema=new mongoose.Schema({ username:{ type:String, unique:true, - required:true + required:true, + ref: 'user' }, name:{ type:String, @@ -23,10 +24,15 @@ const userProfileSchema=new mongoose.Schema({ }, image:{ type:String, - defalut:"profile.jpg" + default:"profile.jpg" + }, + deletedAt: { + type: Date, + default: null } - -},{timestamps:true}) +}, { + timestamps: true // This adds createdAt and updatedAt automatically +}) const User=mongoose.model('userinfo',userProfileSchema) module.exports=User; \ No newline at end of file diff --git a/backend/model/userSettingsModel.js b/backend/model/userSettingsModel.js new file mode 100644 index 0000000..8ade2c5 --- /dev/null +++ b/backend/model/userSettingsModel.js @@ -0,0 +1,254 @@ +const mongoose = require('mongoose'); + +const userSettingsSchema = new mongoose.Schema({ + userId: { + type: mongoose.Schema.Types.ObjectId, + required: true, + unique: true, + ref: 'user', + index: true + }, + username: { + type: String, + required: true, + unique: true, + ref: 'user', + index: true + }, + + // Template Settings + template: { + type: String, + default: 'default', // Default template name + trim: true + // Removed enum validation - templates are validated dynamically from database + }, + + // Profile Visibility Settings + profile: { + isPublic: { + type: Boolean, + default: false // Profile is private by default + }, + showInSearch: { + type: Boolean, + default: false // Don't show in search by default + }, + allowProfileView: { + type: Boolean, + default: false // Don't allow others to view profile by default + }, + showEmail: { + type: Boolean, + default: false // Don't show email in public profile + }, + showLocation: { + type: Boolean, + default: true // Show location in public profile + }, + showBio: { + type: Boolean, + default: true // Show bio in public profile + }, + showPassion: { + type: Boolean, + default: true // Show passion in public profile + }, + showProfileImage: { + type: Boolean, + default: true // Show profile image in public profile + } + }, + + // Link Display Settings (visibility is now in Link model) + links: { + // Show link count in public profile + showLinkCount: { + type: Boolean, + default: true + }, + // Show click statistics in public profile + showClickStats: { + type: Boolean, + default: false + } + }, + + // Search & Discovery Settings + search: { + // Allow profile to appear in search results + allowSearch: { + type: Boolean, + default: false + }, + // Show profile in "featured" or "popular" sections + showInFeatured: { + type: Boolean, + default: false + }, + // Keywords/tags for better searchability + searchKeywords: [{ + type: String, + trim: true + }] + }, + + // Privacy Settings + privacy: { + // Show analytics to public + showAnalytics: { + type: Boolean, + default: false + }, + // Allow others to see when profile was last updated + showLastUpdated: { + type: Boolean, + default: false + }, + // Require authentication to view profile + requireAuth: { + type: Boolean, + default: false + } + }, + + // Notification Settings (for future use) + notifications: { + emailOnNewClick: { + type: Boolean, + default: false + }, + emailOnProfileView: { + type: Boolean, + default: false + }, + emailOnLinkHubView: { + type: Boolean, + default: false + }, + weeklyReport: { + type: Boolean, + default: false + } + }, + + deletedAt: { + type: Date, + default: null + } +}, { + timestamps: true // This adds createdAt and updatedAt automatically +}); + +// Indexes for common queries +userSettingsSchema.index({ username: 1, deletedAt: 1 }); +userSettingsSchema.index({ userId: 1, deletedAt: 1 }); +userSettingsSchema.index({ 'profile.isPublic': 1, 'search.allowSearch': 1 }); + +// Method to check if profile is searchable +userSettingsSchema.methods.isSearchable = function() { + return this.profile && + this.profile.isPublic && + this.search && + this.search.allowSearch && + !this.deletedAt; +}; + +// Method to check if email notification should be sent on new click +userSettingsSchema.methods.shouldEmailOnClick = function() { + return this.notifications && + this.notifications.emailOnNewClick && + !this.deletedAt; +}; + +// Method to check if email notification should be sent on profile view +userSettingsSchema.methods.shouldEmailOnProfileView = function() { + return this.notifications && + this.notifications.emailOnProfileView && + !this.deletedAt; +}; + +// Method to check if email notification should be sent on LinkHub view +userSettingsSchema.methods.shouldEmailOnLinkHubView = function() { + return this.notifications && + this.notifications.emailOnLinkHubView && + !this.deletedAt; +}; + +// Method to check if weekly report notifications are enabled +userSettingsSchema.methods.shouldSendWeeklyReport = function() { + return this.notifications && + this.notifications.weeklyReport && + !this.deletedAt; +}; + +// Method to check if any email notifications are enabled +userSettingsSchema.methods.hasEmailNotificationsEnabled = function() { + return this.notifications && + (this.notifications.emailOnNewClick || + this.notifications.emailOnProfileView || + this.notifications.emailOnLinkHubView || + this.notifications.weeklyReport) && + !this.deletedAt; +}; + +// Static method to get settings for a user +userSettingsSchema.statics.getUserSettings = async function(userIdOrUsername, userData = null) { + let query; + let createData = {}; + + if (mongoose.Types.ObjectId.isValid(userIdOrUsername)) { + query = { userId: userIdOrUsername, deletedAt: null }; + createData.userId = userIdOrUsername; + // If userData provided, use it; otherwise we need to fetch from User model + if (userData && userData.username) { + createData.username = userData.username; + } else { + // Need to fetch username from User model + const User = mongoose.model('user'); + const user = await User.findById(userIdOrUsername); + if (user) { + createData.username = user.username; + } else { + throw new Error('User not found'); + } + } + } else { + query = { username: userIdOrUsername, deletedAt: null }; + createData.username = userIdOrUsername; + // If userData provided, use it; otherwise we need to fetch from User model + if (userData && userData._id) { + createData.userId = userData._id; + } else { + // Need to fetch userId from User model + const User = mongoose.model('user'); + const user = await User.findOne({ username: userIdOrUsername }); + if (user) { + createData.userId = user._id; + } else { + throw new Error('User not found'); + } + } + } + + let settings = await this.findOne(query); + + // Create default settings if none exist + if (!settings && createData.userId && createData.username) { + try { + settings = await this.create(createData); + } catch (error) { + // If creation fails, try to find again (might have been created by another request) + settings = await this.findOne(query); + if (!settings) { + throw error; + } + } + } + + return settings; +}; + +const UserSettings = mongoose.model('userSettings', userSettingsSchema); + +module.exports = UserSettings; diff --git a/backend/package-lock.json b/backend/package-lock.json index 0ac6bf9..bee785c 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -16,19 +16,21 @@ "dotenv": "^16.4.5", "ejs": "^3.1.10", "express": "^4.21.1", + "express-useragent": "^2.0.2", "geoip-lite": "^1.4.10", "helmet": "^8.0.0", "jsonwebtoken": "^9.0.2", "mongoose": "^8.7.1", "nodemailer": "^6.10.1", "nodemon": "^3.1.7", + "ua-parser-js": "^2.0.7", "useragent": "^2.3.0" } }, "node_modules/@mongodb-js/saslprep": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.3.0.tgz", - "integrity": "sha512-zlayKCsIjYb7/IdfqxorK5+xUMyi4vOKcFy10wKJYc63NSdKI8mNME+uJqfatkPmOSMMUiojrL58IePKBm3gvQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.4.tgz", + "integrity": "sha512-p7X/ytJDIdwUfFL/CLOhKgdfJe1Fa8uw9seJYvdOmnP9JBWGWHW69HkOixXS6Wy9yvGf1MbhcS6lVmrhy4jm2g==", "license": "MIT", "dependencies": { "sparse-bitfield": "^3.0.3" @@ -53,6 +55,7 @@ "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" @@ -65,6 +68,7 @@ "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" }, @@ -79,6 +83,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -90,27 +95,35 @@ "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==" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" }, "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.14" + } }, "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==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" }, "node_modules/bcryptjs": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", - "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==", + "license": "MIT" }, "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==", + "license": "MIT", "engines": { "node": ">=8" }, @@ -119,22 +132,23 @@ } }, "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "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", + "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.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", + "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" + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8", @@ -142,19 +156,19 @@ } }, "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==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "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==", + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -183,26 +197,39 @@ "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==" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" }, "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.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "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-define-property": "^1.0.0", "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "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" @@ -215,6 +242,7 @@ "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" @@ -226,29 +254,11 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chalk/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==", - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk/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==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -269,9 +279,10 @@ } }, "node_modules/cloudinary": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/cloudinary/-/cloudinary-2.5.1.tgz", - "integrity": "sha512-CNg6uU53Hl4FEVynkTGpt5bQEAQWDHi3H+Sm62FzKf5uQHipSN2v7qVqS8GRVqeb0T1WNV+22+75DOJeRXYeSQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/cloudinary/-/cloudinary-2.8.0.tgz", + "integrity": "sha512-s7frvR0HnQXeJsQSIsbLa/I09IMb1lOnVLEDH5b5E53WTiCYgrNNOBGV/i/nLHwrcEOUkqjfSwP1+enXWNYmdw==", + "license": "MIT", "dependencies": { "lodash": "^4.17.21", "q": "^1.5.1" @@ -284,6 +295,7 @@ "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" }, @@ -294,17 +306,20 @@ "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==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "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" }, @@ -316,14 +331,16 @@ "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/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "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" } @@ -332,6 +349,7 @@ "version": "1.4.7", "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz", "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==", + "license": "MIT", "dependencies": { "cookie": "0.7.2", "cookie-signature": "1.0.6" @@ -340,23 +358,17 @@ "node": ">= 0.8.0" } }, - "node_modules/cookie-parser/node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "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" @@ -369,30 +381,16 @@ "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/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==", - "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/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" } @@ -401,15 +399,37 @@ "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-europe-js": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/detect-europe-js/-/detect-europe-js-0.1.2.tgz", + "integrity": "sha512-lgdERlL3u0aUdHocoouzT10d9I89VVhk0qNRmll7mXdGfJT1/wqZ2ZLA4oJAjeACPY5fT1wsbq2AT+GkuInsow==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "license": "MIT" + }, "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -417,10 +437,25 @@ "url": "https://dotenvx.com" } }, + "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/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" } @@ -428,12 +463,14 @@ "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==" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "license": "Apache-2.0", "dependencies": { "jake": "^10.8.5" }, @@ -448,17 +485,16 @@ "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/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "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" } @@ -467,6 +503,19 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.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" } @@ -474,50 +523,52 @@ "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==" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" }, "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/express": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", - "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "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", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", + "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", + "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", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", + "path-to-regexp": "~0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.13.0", + "qs": "~6.14.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", + "send": "~0.19.0", + "serve-static": "~1.16.2", "setprototypeof": "1.2.0", - "statuses": "2.0.1", + "statuses": "~2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -530,6 +581,15 @@ "url": "https://opencollective.com/express" } }, + "node_modules/express-useragent": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/express-useragent/-/express-useragent-2.0.2.tgz", + "integrity": "sha512-STtNWx33HtKbE9Dpe8DTgivEMJIZh2mmFqjq9OhvHEEkB6VVjOTYGrc9djzVN5yW3s245OTDExCLjZ5oEFGp9w==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -543,34 +603,16 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "license": "Apache-2.0", "dependencies": { "minimatch": "^5.0.1" } }, - "node_modules/filelist/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==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "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==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -579,16 +621,17 @@ } }, "node_modules/finalhandler": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", - "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "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", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "statuses": "2.0.1", + "statuses": "~2.0.2", "unpipe": "~1.0.0" }, "engines": { @@ -599,6 +642,7 @@ "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" } @@ -607,6 +651,7 @@ "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" } @@ -622,6 +667,7 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -634,6 +680,7 @@ "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" } @@ -656,25 +703,22 @@ "node": ">=10.3.0" } }, - "node_modules/geoip-lite/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "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", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "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" @@ -683,6 +727,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -708,6 +765,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -715,40 +773,33 @@ "node": ">= 6" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/glob/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==", + "license": "MIT", "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "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==", + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "dependencies": { - "es-define-property": "^1.0.0" + "brace-expansion": "^1.1.7" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": "*" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "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" }, @@ -756,10 +807,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "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" }, @@ -771,6 +832,7 @@ "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" }, @@ -779,32 +841,39 @@ } }, "node_modules/helmet": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-8.0.0.tgz", - "integrity": "sha512-VyusHLEIIO5mjQPUI1wpOAEu+wl6Q0998jzTxqUYGE45xCIcAxy3MsbEK/yyJUJ3ADeMoB6MornPH6GMWAf+Pw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-8.1.0.tgz", + "integrity": "sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==", + "license": "MIT", "engines": { "node": ">=18.0.0" } }, "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "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.1", - "toidentifier": "1.0.1" + "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/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" }, @@ -815,7 +884,8 @@ "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "license": "ISC" }, "node_modules/inflight": { "version": "1.0.6", @@ -831,7 +901,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/ip-address": { "version": "5.9.4", @@ -851,6 +922,7 @@ "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" } @@ -859,6 +931,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -870,6 +943,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -878,6 +952,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -889,19 +964,40 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } }, + "node_modules/is-standalone-pwa": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-standalone-pwa/-/is-standalone-pwa-0.1.1.tgz", + "integrity": "sha512-9Cbovsa52vNQCjdXOzeQq5CnCbAcRk05aU62K20WO372NrTv0NxibLFCK6lQ4/iZEFdEA3p3t2VNOn8AJ53F5g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "license": "MIT" + }, "node_modules/jake": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", - "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "license": "Apache-2.0", "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", + "async": "^3.2.6", "filelist": "^1.0.4", - "minimatch": "^3.1.2" + "picocolors": "^1.1.1" }, "bin": { "jake": "bin/cli.js" @@ -910,6 +1006,12 @@ "node": ">=10" } }, + "node_modules/jake/node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", @@ -917,11 +1019,12 @@ "license": "MIT" }, "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz", + "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==", + "license": "MIT", "dependencies": { - "jws": "^3.2.2", + "jws": "^4.0.1", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", @@ -940,24 +1043,27 @@ "node_modules/jsonwebtoken/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==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "license": "MIT", "dependencies": { - "buffer-equal-constant-time": "1.0.1", + "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "license": "MIT", "dependencies": { - "jwa": "^1.4.1", + "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, @@ -965,6 +1071,7 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz", "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==", + "license": "Apache-2.0", "engines": { "node": ">=12.0.0" } @@ -981,42 +1088,50 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "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==" + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "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==" + "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==" + "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==" + "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==" + "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==" + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "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==" + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" }, "node_modules/lru-cache": { "version": "4.1.5", @@ -1028,10 +1143,20 @@ "yallist": "^2.1.2" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/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" } @@ -1046,6 +1171,7 @@ "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" } @@ -1054,6 +1180,7 @@ "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" } @@ -1062,6 +1189,7 @@ "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" }, @@ -1073,6 +1201,7 @@ "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" } @@ -1081,6 +1210,7 @@ "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" }, @@ -1089,25 +1219,26 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=10" } }, "node_modules/mongodb": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.17.0.tgz", - "integrity": "sha512-neerUzg/8U26cgruLysKEjJvoNSXhyID3RvzvdcpsIi2COYM3FS3o9nlH7fxFtefTb942dX3W9i37oPfCVj4wA==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.20.0.tgz", + "integrity": "sha512-Tl6MEIU3K4Rq3TSHd+sZQqRBoGlFsOgNrH5ltAcFBV62Re3Fd+FcaVf8uSEQFOJ51SDowDVttBTONMfoYWrWlQ==", "license": "Apache-2.0", "dependencies": { - "@mongodb-js/saslprep": "^1.1.9", + "@mongodb-js/saslprep": "^1.3.0", "bson": "^6.10.4", - "mongodb-connection-string-url": "^3.0.0" + "mongodb-connection-string-url": "^3.0.2" }, "engines": { "node": ">=16.20.1" @@ -1118,7 +1249,7 @@ "gcp-metadata": "^5.2.0", "kerberos": "^2.0.1", "mongodb-client-encryption": ">=6.0.0 <7", - "snappy": "^7.2.2", + "snappy": "^7.3.2", "socks": "^2.7.1" }, "peerDependenciesMeta": { @@ -1156,14 +1287,14 @@ } }, "node_modules/mongoose": { - "version": "8.16.1", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.16.1.tgz", - "integrity": "sha512-Q+0TC+KLdY4SYE+u9gk9pdW1tWu/pl0jusyEkMGTgBoAbvwQdfy4f9IM8dmvCwb/blSfp7IfLkob7v76x6ZGpQ==", + "version": "8.20.4", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.20.4.tgz", + "integrity": "sha512-o4ABeT3IEk1Z4dGt3XjHJ0x9OjyWvakC1+btPpzWqCovqyidKGdbB05/g87cdh7AuWXFQKHOxt+L/OZOBps4hw==", "license": "MIT", "dependencies": { "bson": "^6.10.4", "kareem": "2.6.3", - "mongodb": "~6.17.0", + "mongodb": "~6.20.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", @@ -1180,12 +1311,14 @@ "node_modules/mongoose/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==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/mpath": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "license": "MIT", "engines": { "node": ">=4.0.0" } @@ -1194,6 +1327,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "license": "MIT", "dependencies": { "debug": "4.x" }, @@ -1202,9 +1336,10 @@ } }, "node_modules/mquery/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "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" }, @@ -1220,17 +1355,20 @@ "node_modules/mquery/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==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "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" } @@ -1245,9 +1383,10 @@ } }, "node_modules/nodemon": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz", - "integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==", + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.11.tgz", + "integrity": "sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g==", + "license": "MIT", "dependencies": { "chokidar": "^3.5.2", "debug": "^4", @@ -1271,10 +1410,21 @@ "url": "https://opencollective.com/nodemon" } }, + "node_modules/nodemon/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==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/nodemon/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "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" }, @@ -1287,15 +1437,50 @@ } } }, + "node_modules/nodemon/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/nodemon/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/nodemon/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==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nodemon/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } }, "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==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1304,14 +1489,16 @@ "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.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "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" }, @@ -1323,6 +1510,7 @@ "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" }, @@ -1352,6 +1540,7 @@ "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" } @@ -1377,10 +1566,17 @@ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "license": "MIT" }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -1392,6 +1588,7 @@ "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" @@ -1409,7 +1606,8 @@ "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "license": "MIT" }, "node_modules/punycode": { "version": "2.3.1", @@ -1425,17 +1623,19 @@ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", + "license": "MIT", "engines": { "node": ">=0.6.0", "teleport": ">=0.2.0" } }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -1448,19 +1648,21 @@ "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.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "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.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8" @@ -1470,6 +1672,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -1507,17 +1710,20 @@ "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==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "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" }, @@ -1526,85 +1732,120 @@ } }, "node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "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": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "range-parser": "~1.2.1", - "statuses": "2.0.1" + "statuses": "~2.0.2" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/send/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==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/serve-static": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", - "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "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.0" + "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==", + "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/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": { - "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" + "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/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + "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": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "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-bind": "^1.0.7", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "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" @@ -1616,12 +1857,14 @@ "node_modules/sift": { "version": "17.1.3", "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz", - "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==" + "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==", + "license": "MIT" }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -1645,22 +1888,24 @@ "license": "BSD-3-Clause" }, "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "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/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "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": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/tmp": { @@ -1679,6 +1924,7 @@ "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==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -1690,6 +1936,7 @@ "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" } @@ -1698,6 +1945,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "license": "ISC", "bin": { "nodetouch": "bin/nodetouch.js" } @@ -1718,6 +1966,7 @@ "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" @@ -1726,15 +1975,68 @@ "node": ">= 0.6" } }, + "node_modules/ua-is-frozen": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ua-is-frozen/-/ua-is-frozen-0.1.2.tgz", + "integrity": "sha512-RwKDW2p3iyWn4UbaxpP2+VxwqXh0jpvdxsYpZ5j/MLLiQOfbsV5shpgQiw93+KMYQPcteeMQ289MaAFzs3G9pw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "license": "MIT" + }, + "node_modules/ua-parser-js": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-2.0.7.tgz", + "integrity": "sha512-CFdHVHr+6YfbktNZegH3qbYvYgC7nRNEUm2tk7nSFXSODUu4tDBpaFpP1jdXBUOKKwapVlWRfTtS8bCPzsQ47w==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "license": "AGPL-3.0-or-later", + "dependencies": { + "detect-europe-js": "^0.1.2", + "is-standalone-pwa": "^0.1.1", + "ua-is-frozen": "^0.1.2" + }, + "bin": { + "ua-parser-js": "script/cli.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "license": "MIT" }, "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" } @@ -1753,6 +2055,7 @@ "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" } @@ -1761,6 +2064,7 @@ "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" } diff --git a/backend/package.json b/backend/package.json index 934a251..da171c2 100644 --- a/backend/package.json +++ b/backend/package.json @@ -19,12 +19,14 @@ "dotenv": "^16.4.5", "ejs": "^3.1.10", "express": "^4.21.1", + "express-useragent": "^2.0.2", "geoip-lite": "^1.4.10", "helmet": "^8.0.0", "jsonwebtoken": "^9.0.2", "mongoose": "^8.7.1", "nodemailer": "^6.10.1", "nodemon": "^3.1.7", + "ua-parser-js": "^2.0.7", "useragent": "^2.3.0" } } diff --git a/backend/public/css/styles.css b/backend/public/css/styles.css index 3373078..428cc5d 100644 --- a/backend/public/css/styles.css +++ b/backend/public/css/styles.css @@ -1,83 +1,537 @@ -/* styles.css */ -body { +/* Modern Linktree Styles */ +* { margin: 0; padding: 0; - font-family: Arial, sans-serif; - background-color: #000; + box-sizing: border-box; +} + +body { + font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; + background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%); color: #fff; - text-align: center; + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; + padding: 20px; + overflow: hidden; + position: relative; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* Animated Background */ +.background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; + overflow: hidden; +} + +.gradient-orb { + position: absolute; + border-radius: 50%; + filter: blur(80px); + opacity: 0.3; + transition: transform 0.3s ease-out; + pointer-events: none; +} + +.orb-1 { + width: 500px; + height: 500px; + background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%); + top: -250px; + left: -250px; +} + +.orb-2 { + width: 400px; + height: 400px; + background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%); + bottom: -200px; + right: -200px; +} + +.orb-3 { + width: 350px; + height: 350px; + background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); + top: 50%; + left: 50%; + transform: translate(-50%, -50%); } +.grid-pattern { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image: + linear-gradient(to right, rgba(128, 128, 128, 0.05) 1px, transparent 1px), + linear-gradient(to bottom, rgba(128, 128, 128, 0.05) 1px, transparent 1px); + background-size: 24px 24px; + mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%); +} + +/* Container */ .container { display: flex; justify-content: center; align-items: center; - height: 100vh; + min-height: 100vh; + padding: 20px; + position: relative; + z-index: 1; + width: 100%; } +/* Profile Card */ .profile { width: 100%; - max-width: 400px; - padding: 60px; - border:2px solid rgb(56, 37, 37); - border-radius: 10px; - background-color: #433c3c; + max-width: 470px; + max-height: 95vh; + padding: 20px 30px; + background: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 24px; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); + position: relative; + text-align: center; + animation: fadeInUp 0.8s ease-out; + display: flex; + flex-direction: column; + align-items: center; + overflow: hidden; +} + +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(30px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes fadeInScale { + from { + opacity: 0; + transform: scale(0.8); + } + to { + opacity: 1; + transform: scale(1); + } } -.profile-pic img { +/* Profile Picture */ +.profile-pic-wrapper { + position: relative; + display: block; + margin: 0 auto 20px auto; + flex-shrink: 0; + text-align: center; +} + +.profile-pic-glow { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); width: 120px; height: 120px; + background: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #3b82f6 100%); + border-radius: 50%; + filter: blur(20px); + opacity: 0.6; + animation: pulse 3s ease-in-out infinite; +} + +@keyframes pulse { + 0%, 100% { + transform: translate(-50%, -50%) scale(1); + opacity: 0.6; + } + 50% { + transform: translate(-50%, -50%) scale(1.1); + opacity: 0.8; + } +} + +.profile-pic { + width: 100px; + height: 100px; border-radius: 50%; object-fit: cover; - border: 2px solid white ; - + border: 3px solid rgba(255, 255, 255, 0.3); + position: relative; + z-index: 1; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); + transition: transform 0.3s ease; + background: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #3b82f6 100%); + display: block; } -.bio{ - color: #fff; +.profile-pic:hover { + transform: scale(1.05); } -.title h1 { - font-size: 24px; - margin-bottom: 20px; +.profile-pic[src=""] { + display: none; +} + +/* Username */ +.username-wrapper { + margin-bottom: 12px; + position: relative; + flex-shrink: 0; +} + +.username { + font-family: 'Montserrat', 'Poppins', sans-serif; + font-size: 26px; + font-weight: 700; + margin-bottom: 6px; + background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 50%, #a5b4fc 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + letter-spacing: 2px; + text-align: center; } +.username-underline { + width: 60px; + height: 3px; + background: linear-gradient(90deg, #9333ea 0%, #ec4899 50%, #3b82f6 100%); + margin: 0 auto; + border-radius: 2px; + animation: expandWidth 0.8s ease-out 0.3s both; +} +@keyframes expandWidth { + from { + width: 0; + } + to { + width: 60px; + } +} -.social-icons a img { - width: 40px; +/* Bio */ +.bio { + color: rgba(255, 255, 255, 0.8); + font-size: 16px; + line-height: 1.6; + text-align: center; margin-bottom: 20px; + padding: 0 10px; + flex-shrink: 0; } -.links .link-item { - margin-bottom: 15px; +/* Links Container */ +.links { + flex: 1; + overflow-y: auto; + overflow-x: hidden; + padding-right: 5px; + margin-bottom: 20px; + min-height: 50px; + scrollbar-width: thin; + scrollbar-color: rgba(255, 255, 255, 0.3) transparent; } -.links .btn { - display: block; - padding: 15px; - background-color: #333; +.links::-webkit-scrollbar { + width: 6px; +} + +.links::-webkit-scrollbar-track { + background: transparent; +} + +.links::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.3); + border-radius: 3px; +} + +.links::-webkit-scrollbar-thumb:hover { + background: rgba(255, 255, 255, 0.5); +} + +.link-item { + margin-bottom: 16px; + animation: fadeInUp 0.6s ease-out both; + position: relative; +} + +.no-links { + text-align: center; + padding: 40px 20px; + background: rgba(255, 255, 255, 0.05); + border-radius: 16px; + border: 1px dashed rgba(255, 255, 255, 0.2); +} + +.no-links-text { + color: rgba(255, 255, 255, 0.6); + font-size: 16px; + font-style: italic; +} + +.btn { + display: flex; + align-items: center; + justify-content: space-between; + padding: 14px 20px; + background: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); color: white; text-decoration: none; - border-radius: 25px; + border-radius: 16px; font-size: 18px; - transition: background-color 0.3s; - display: flex; + font-weight: 600; + border: 1px solid rgba(255, 255, 255, 0.2); + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + position: relative; + overflow: hidden; + cursor: pointer; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.btn::before { + content: ''; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); + transition: left 0.5s ease; +} + +.btn:hover::before { + left: 100%; +} + +.btn:hover { + background: rgba(255, 255, 255, 0.15); + border-color: rgba(255, 255, 255, 0.3); + transform: translateY(-5px) scale(1.02); + box-shadow: 0 10px 30px rgba(147, 51, 234, 0.3); +} + +.btn:active { + transform: translateY(-2px) scale(1); +} + +.btn-text { + flex: 1; + text-align: left; + letter-spacing: 1px; +} + +.btn-arrow { + font-size: 20px; + opacity: 0.7; + transition: transform 0.3s ease, opacity 0.3s ease; +} + +.btn:hover .btn-arrow { + transform: translateX(5px); + opacity: 1; +} + +/* Footer */ +.footer { + text-align: center; + padding-top: 20px; + margin-top: 10px; + border-top: 1px solid rgba(255, 255, 255, 0.1); + flex-shrink: 0; + visibility: visible; + opacity: 1; +} + +.website { + color: rgba(255, 255, 255, 0.6); + text-decoration: none; + font-size: 14px; + transition: color 0.3s ease; + display: inline-flex; align-items: center; - justify-content: center; + gap: 6px; } -.links .btn:hover { - background-color: #555; +.website:hover { + color: rgba(255, 255, 255, 0.9); } -.links .btn img { - width: 35px; - height: 35px; - border-radius: 50%; - margin-right: 10px; +.heart { + color: #ec4899; + animation: heartbeat 1.5s ease-in-out infinite; + display: inline-block; +} + +@keyframes heartbeat { + 0%, 100% { + transform: scale(1); + } + 50% { + transform: scale(1.2); + } +} + +/* Touch device optimizations */ +@media (hover: none) and (pointer: coarse) { + .btn:hover { + transform: none; + } + + .btn:active { + transform: translateY(-2px) scale(0.98); + background: rgba(255, 255, 255, 0.2); + } +} + +/* Responsive Design */ +@media (max-width: 480px) { + body { + padding: 10px; + } + + .profile { + padding: 20px 15px; + max-width: 100%; + max-height: 98vh; + } + + .links { + margin-bottom: 15px; + } + + .username { + font-size: 24px; + letter-spacing: 1px; + } + + .bio { + font-size: 14px; + padding: 0 5px; + } + + .btn { + padding: 16px 20px; + font-size: 16px; + } + + .btn-text { + letter-spacing: 0.5px; + } + + .profile-pic { + width: 100px; + height: 100px; + } + + .profile-pic-glow { + width: 120px; + height: 120px; + } + + .username-underline { + width: 50px; + } +} + +@media (max-height: 600px) { + .profile { + max-height: 98vh; + } + + .profile-pic { + width: 80px; + height: 80px; + } + + .profile-pic-glow { + width: 100px; + height: 100px; + } + + .username { + font-size: 22px; + } + + .bio { + font-size: 14px; + margin-bottom: 15px; + } +} + +@media (max-width: 360px) { + .profile { + padding: 20px 15px; + } + + .username { + font-size: 20px; + letter-spacing: 0.5px; + } + + .btn { + padding: 14px 18px; + font-size: 15px; + } + + .bio { + font-size: 13px; + } + + .username-underline { + width: 40px; + } +} + +/* Loading state */ +.profile { + will-change: transform; +} + +.link-item { + will-change: transform, opacity; +} + +/* Accessibility improvements */ +.btn:focus { + outline: 2px solid rgba(147, 51, 234, 0.5); + outline-offset: 2px; +} + +.website:focus { + outline: 2px solid rgba(255, 255, 255, 0.5); + outline-offset: 2px; + border-radius: 4px; +} + +/* Smooth scrolling */ +html { + scroll-behavior: smooth; } -.website{ - color: rgb(15, 15, 71); +/* Dark mode support (if system prefers dark) */ +@media (prefers-color-scheme: dark) { + body { + background: linear-gradient(135deg, #030712 0%, #1e1b4b 50%, #030712 100%); + } } diff --git a/backend/routes/AnalyticsRoute.js b/backend/routes/AnalyticsRoute.js new file mode 100644 index 0000000..63fa4b0 --- /dev/null +++ b/backend/routes/AnalyticsRoute.js @@ -0,0 +1,12 @@ +const { getAnalytics, getClickDetails, getClickDetailsV1, markReadNotification } = require('../controller/AnalyticsController'); +const { verifyToken } = require('../middleware/verifyToken'); + +const router = require('express').Router(); + +router.post('/get', verifyToken, getAnalytics); +router.post('/click-details', verifyToken, getClickDetails); +router.post('/click-details-v1', verifyToken, getClickDetailsV1); +router.post('/mark-read', verifyToken, markReadNotification); + +module.exports = router; + diff --git a/backend/routes/AuthRoute.js b/backend/routes/AuthRoute.js index 4402b14..15a4923 100644 --- a/backend/routes/AuthRoute.js +++ b/backend/routes/AuthRoute.js @@ -1,4 +1,4 @@ -const { signUpController, signInController, getUserInfo ,signOut,checkAvailablity,sendOtp,changePassword,resendOtp} = require('../controller/AuthController'); +const { signUpController, signInController, getUserInfo ,signOut,checkAvailablity,sendOtp,changePassword, handleAuthCallback} = require('../controller/AuthController'); const { verifyToken, otpVerify } = require('../middleware/verifyToken'); const router=require('express').Router(); @@ -7,6 +7,7 @@ const router=require('express').Router(); router.post('/signup',sendOtp) router.post('/signin',signInController) +router.get('/google',handleAuthCallback) router.post('/checkavailablity',checkAvailablity) router.post('/verify',verifyToken,getUserInfo) router.post('/verifyacc',otpVerify,signUpController) @@ -14,7 +15,6 @@ router.get('/signout',signOut) router.post('/password_reset',sendOtp) -// router.post('/resend_otp',resendOtp) router.post('/validate_otp',otpVerify,changePassword) module.exports=router diff --git a/backend/routes/LinkBridgerRoute.js b/backend/routes/LinkBridgerRoute.js new file mode 100644 index 0000000..f595edf --- /dev/null +++ b/backend/routes/LinkBridgerRoute.js @@ -0,0 +1,19 @@ +const router=require('express').Router(); +const { extractInfo } = require('../middleware/deviceInfo'); +const { verifyTokenOptional } = require('../middleware/verifyToken'); +const { + verifyPassword, + getLinkByUsernameAndSource, + getProfileByUsername +} = require('../controller/LinkBridgerController'); + +// Handle password submission for private links +router.post('/link/verify-password', extractInfo, verifyPassword); + +// Handle link access by username and source +router.get('/:username/:source', extractInfo, getLinkByUsernameAndSource); + +// Handle profile page by username +router.get('/:username', extractInfo, verifyTokenOptional, getProfileByUsername); + +module.exports=router \ No newline at end of file diff --git a/backend/routes/LinkRoute.js b/backend/routes/LinkRoute.js index 0a55754..3e79826 100644 --- a/backend/routes/LinkRoute.js +++ b/backend/routes/LinkRoute.js @@ -1,4 +1,4 @@ -const { addNewSource, getAllSource,deleteLink,setNotificationToZero,editLink } = require('../controller/LinkController'); +const { addNewSource, getAllSource,deleteLink,setNotificationToZero,editLink, updateVisibility } = require('../controller/LinkController'); const { verifyToken } = require('../middleware/verifyToken'); const router=require('express').Router(); @@ -10,7 +10,6 @@ router.post('/getallsource',verifyToken,getAllSource) router.post('/deletelink',verifyToken,deleteLink) router.post('/editlink',verifyToken,editLink) router.post('/notifications',verifyToken,setNotificationToZero) - -// router.get('/verify',verifyToken,getUserInfo) +router.post('/updatevisibility',verifyToken,updateVisibility) module.exports=router \ No newline at end of file diff --git a/backend/routes/ProfileRoute.js b/backend/routes/ProfileRoute.js index fcab7fb..2e261f1 100644 --- a/backend/routes/ProfileRoute.js +++ b/backend/routes/ProfileRoute.js @@ -1,8 +1,14 @@ const route=require('express').Router(); -const {updateProfile,getProfile, updateProfilePic}=require('../controller/ProfileController') +const {updateProfile,getProfile, updateProfilePic, getPublicProfile}=require('../controller/ProfileController') +const { verifyToken, verifyTokenOptional } = require('../middleware/verifyToken'); route.post('/update',updateProfile) route.post('/getprofileinfo',getProfile) route.post('/updatepic',updateProfilePic) +// Public route - allows optional authentication +// verifyTokenOptional sets req.userId if user is logged in, otherwise null +// Allows public viewing of profiles, but owners can preview their own private profiles +// All content respects permissions from settings, even for owners +route.post('/getpublicprofile', verifyTokenOptional, getPublicProfile) module.exports=route \ No newline at end of file diff --git a/backend/routes/ProjectRoute.js b/backend/routes/ProjectRoute.js new file mode 100644 index 0000000..a5effc7 --- /dev/null +++ b/backend/routes/ProjectRoute.js @@ -0,0 +1,12 @@ +const route = require('express').Router(); +const { getAvailableTemplates, getAllTemplates } = require('../controller/ProjectController'); +const { verifyToken } = require('../middleware/verifyToken'); + +// Public route - anyone can see available templates +route.get('/templates', getAvailableTemplates); + +// Protected route - admin can see all templates (including disabled) +// route.get('/templates/all', verifyToken, getAllTemplates); + +module.exports = route; + diff --git a/backend/routes/SearchRoute.js b/backend/routes/SearchRoute.js new file mode 100644 index 0000000..1004741 --- /dev/null +++ b/backend/routes/SearchRoute.js @@ -0,0 +1,7 @@ +const route = require('express').Router(); +const { searchUsers } = require('../controller/SearchController'); + +// Search doesn't require authentication (public search) +route.post('/users', searchUsers); + +module.exports = route; diff --git a/backend/routes/SettingsRoute.js b/backend/routes/SettingsRoute.js new file mode 100644 index 0000000..e91236a --- /dev/null +++ b/backend/routes/SettingsRoute.js @@ -0,0 +1,8 @@ +const route = require('express').Router(); +const { getSettings, updateSettings } = require('../controller/SettingsController'); +const { verifyToken } = require('../middleware/verifyToken'); + +route.post('/get', verifyToken, getSettings); +route.post('/update', verifyToken, updateSettings); + +module.exports = route; diff --git a/backend/utils.js b/backend/utils.js new file mode 100644 index 0000000..72e40c1 --- /dev/null +++ b/backend/utils.js @@ -0,0 +1,208 @@ +const crypto = require('crypto'); + +const hashData = (data) => { + const algorithm = 'aes-256-cbc'; + const secretKey = process.env.ENCRYPTION_KEY || 'default-secret-key-change-in-production-32chars!!'; + const key = crypto.scryptSync(secretKey, 'salt', 32); + const iv = crypto.randomBytes(16); + const cipher = crypto.createCipheriv(algorithm, key, iv); + let encrypted = cipher.update(data, 'utf8', 'hex'); + encrypted += cipher.final('hex'); + return iv.toString('hex') + ':' + encrypted; +}; + + // Helper function to unhash/decrypt username and source +const unhashData = (hashedData) => { + try { + const algorithm = 'aes-256-cbc'; + const secretKey = process.env.ENCRYPTION_KEY || 'default-secret-key-change-in-production-32chars!!'; + const key = crypto.scryptSync(secretKey, 'salt', 32); + const parts = hashedData.split(':'); + if (parts.length !== 2) return null; + const iv = Buffer.from(parts[0], 'hex'); + const encrypted = parts[1]; + const decipher = crypto.createDecipheriv(algorithm, key, iv); + let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + decrypted += decipher.final('utf8'); + return decrypted; + } catch (error) { + return null; + } +}; + +const clientUrl=(tier)=>{ + if(tier==='dev'){ + return "http://localhost:5173/app" + } + return "https://allin1url.in/app" +} + + +const serverUrl=(tier)=>{ + if(tier==='dev'){ + return "http://localhost:8080" + } + return "https://allin1url.in" +} + +const getUserLinkUrl = (username, source = null) => { + if (!username) return ''; + + // Check if we're explicitly in development mode + // Default to production if not explicitly dev (safer for production) + const isDev = process.env.TIER === 'dev'; + + if (isDev) { + // Development: Use localhost subdomain format + const port = process.env.PORT || '8080'; + const baseUrl = `http://${username}.localhost:${port}`; + return source ? `${baseUrl}/${source}` : baseUrl; + } else { + // Production: Use subdomain format (default) + const baseUrl = `https://${username}.allin1url.in`; + return source ? `${baseUrl}/${source}` : baseUrl; + } +}; + +// Shared JavaScript code for all templates (image error handling and favicon creation) +// themeColors: { bgColor: string, textColor: string } +const getTemplateScripts = (themeColors = {}) => { + const { + bgColor = 'rgba(26, 26, 46, 0.8)', + textColor = '#9333ea' + } = themeColors; + + // Escape single quotes and backslashes for safe embedding in single-quoted JavaScript strings + const escapeForJS = (str) => { + return str.replace(/\\/g, '\\\\') + .replace(/'/g, "\\'"); + }; + + const escapedBgColor = escapeForJS(bgColor); + const escapedTextColor = escapeForJS(textColor); + + return ''; +}; + +// Helper function that returns only the createCircularFavicon function code (for templates with custom handleImageError) +const getFaviconScript = () => { + return ` + function createCircularFavicon(imageUrl) { + if (!imageUrl || imageUrl === '' || imageUrl.includes('data:')) { + return; + } + const img = new Image(); + img.crossOrigin = 'anonymous'; + img.onload = function() { + try { + const canvas = document.createElement('canvas'); + const size = 32; + canvas.width = size; + canvas.height = size; + const ctx = canvas.getContext('2d'); + ctx.beginPath(); + ctx.arc(size / 2, size / 2, size / 2, 0, 2 * Math.PI); + ctx.clip(); + const imgSize = Math.min(img.width, img.height); + const sx = (img.width - imgSize) / 2; + const sy = (img.height - imgSize) / 2; + ctx.drawImage(img, sx, sy, imgSize, imgSize, 0, 0, size, size); + const dataUrl = canvas.toDataURL('image/png'); + const favicon = document.getElementById('dynamic-favicon'); + if (favicon) { + favicon.href = dataUrl; + } else { + const link = document.createElement('link'); + link.id = 'dynamic-favicon'; + link.rel = 'icon'; + link.type = 'image/png'; + link.href = dataUrl; + document.head.appendChild(link); + } + } catch (e) { + console.log('Error creating circular favicon:', e); + } + }; + img.onerror = function() { + if (img.crossOrigin === 'anonymous') { + const img2 = new Image(); + img2.onload = img.onload; + img2.onerror = function() {}; + img2.src = imageUrl; + } + }; + img.src = imageUrl; + } + + window.addEventListener('load', () => { + const profilePic = document.querySelector('.profile-pic'); + if (profilePic && profilePic.src && profilePic.src !== window.location.href) { + createCircularFavicon(profilePic.src); + } + });`; +}; + +module.exports = { hashData, unhashData, getUserLinkUrl, clientUrl, serverUrl, getTemplateScripts, getFaviconScript }; diff --git a/backend/views/linktree-minimal.ejs b/backend/views/linktree-minimal.ejs new file mode 100644 index 0000000..63838b8 --- /dev/null +++ b/backend/views/linktree-minimal.ejs @@ -0,0 +1,299 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + + + +
+
+ <%=username.toUpperCase()%>'s Profile Picture +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/linktree.ejs b/backend/views/linktree.ejs deleted file mode 100644 index d4996a1..0000000 --- a/backend/views/linktree.ejs +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - <%=username.toUpperCase()%> - - - -
-
-
- Profile Picture -
-

<%=dp.bio||"bio not available"%>

- -
-

<%= username.toUpperCase() %>

-
- - - - Click here to make your own links. -
-
- - diff --git a/backend/views/not_exists.ejs b/backend/views/not_exists.ejs index a7a7ce2..0ddbb09 100644 --- a/backend/views/not_exists.ejs +++ b/backend/views/not_exists.ejs @@ -63,7 +63,9 @@

404 - Page Not Found

Sorry, the page you're looking for doesn't exist.

-

<%=linkHub%>

+ <% if (typeof linkHub !== 'undefined' && linkHub) { %> +

<%=linkHub%>

+ <% } %> Go Back to Home
diff --git a/backend/views/password_prompt.ejs b/backend/views/password_prompt.ejs new file mode 100644 index 0000000..0b1637b --- /dev/null +++ b/backend/views/password_prompt.ejs @@ -0,0 +1,283 @@ + + + + + + Protected Link - Enter Password + + + + +
+
🔒
+

Protected Link

+

+ This link cannot be accessed without a password. Please enter the + password to continue. +

+ + <% if (typeof error !== 'undefined' && error) { %> +
<%= error %>
+ <% } else { %> +
+ <% } %> + + +
+ + +
+ + +
+ + + +
+ ← Go back to home + +
+ + + + diff --git a/backend/views/templates/linktree-3d.ejs b/backend/views/templates/linktree-3d.ejs new file mode 100644 index 0000000..db53468 --- /dev/null +++ b/backend/views/templates/linktree-3d.ejs @@ -0,0 +1,353 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+ <%=username.toUpperCase()%>'s Profile +
+

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/templates/linktree-cards.ejs b/backend/views/templates/linktree-cards.ejs new file mode 100644 index 0000000..f27a0cb --- /dev/null +++ b/backend/views/templates/linktree-cards.ejs @@ -0,0 +1,284 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: '#f0f2f5', textColor: '#667eea' }) %> + + + diff --git a/backend/views/templates/linktree-dark.ejs b/backend/views/templates/linktree-dark.ejs new file mode 100644 index 0000000..1e400ef --- /dev/null +++ b/backend/views/templates/linktree-dark.ejs @@ -0,0 +1,437 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+ +
+
+
+
+ <%=username.toUpperCase()%>'s Profile +
+

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/templates/linktree-default.ejs b/backend/views/templates/linktree-default.ejs new file mode 100644 index 0000000..69597db --- /dev/null +++ b/backend/views/templates/linktree-default.ejs @@ -0,0 +1,795 @@ + + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + + + +
+
+
+
+
+
+ +
+
+
+
+ <%=username.toUpperCase()%>'s Profile Picture +
+ +
+

<%= username.toUpperCase() %>

+
+
+ +

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+ + + + +
+
+ + + + diff --git a/backend/views/templates/linktree-fire.ejs b/backend/views/templates/linktree-fire.ejs new file mode 100644 index 0000000..e73917e --- /dev/null +++ b/backend/views/templates/linktree-fire.ejs @@ -0,0 +1,450 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(26,0,0,0.8)', textColor: '#ff6600' }) %> + + + diff --git a/backend/views/templates/linktree-forest.ejs b/backend/views/templates/linktree-forest.ejs new file mode 100644 index 0000000..8720e3d --- /dev/null +++ b/backend/views/templates/linktree-forest.ejs @@ -0,0 +1,409 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(30,60,30,0.6)', textColor: '#81c784' }) %> + + + diff --git a/backend/views/templates/linktree-galaxy.ejs b/backend/views/templates/linktree-galaxy.ejs new file mode 100644 index 0000000..ef609a7 --- /dev/null +++ b/backend/views/templates/linktree-galaxy.ejs @@ -0,0 +1,458 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(10,10,26,0.8)', textColor: '#8a2be2' }) %> + + + diff --git a/backend/views/templates/linktree-glass.ejs b/backend/views/templates/linktree-glass.ejs new file mode 100644 index 0000000..a97f05a --- /dev/null +++ b/backend/views/templates/linktree-glass.ejs @@ -0,0 +1,369 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/templates/linktree-gradient.ejs b/backend/views/templates/linktree-gradient.ejs new file mode 100644 index 0000000..ad51e8c --- /dev/null +++ b/backend/views/templates/linktree-gradient.ejs @@ -0,0 +1,341 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(255,255,255,0.2)', textColor: 'white' }) %> + + + diff --git a/backend/views/templates/linktree-hacker.ejs b/backend/views/templates/linktree-hacker.ejs new file mode 100644 index 0000000..fef3570 --- /dev/null +++ b/backend/views/templates/linktree-hacker.ejs @@ -0,0 +1,462 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+ +
+
+
+
+ <%=username.toUpperCase()%>'s Profile +
+

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/templates/linktree-light.ejs b/backend/views/templates/linktree-light.ejs new file mode 100644 index 0000000..ecf039a --- /dev/null +++ b/backend/views/templates/linktree-light.ejs @@ -0,0 +1,459 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+ +
+
+
+
+ <%=username.toUpperCase()%>'s Profile +
+

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/templates/linktree-minimal.ejs b/backend/views/templates/linktree-minimal.ejs new file mode 100644 index 0000000..caedc25 --- /dev/null +++ b/backend/views/templates/linktree-minimal.ejs @@ -0,0 +1,245 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: '#667eea', textColor: 'white' }) %> + + + diff --git a/backend/views/templates/linktree-modern.ejs b/backend/views/templates/linktree-modern.ejs new file mode 100644 index 0000000..f5bc0d9 --- /dev/null +++ b/backend/views/templates/linktree-modern.ejs @@ -0,0 +1,234 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: '#f0f0f0', textColor: '#999' }) %> + + + diff --git a/backend/views/templates/linktree-mountain.ejs b/backend/views/templates/linktree-mountain.ejs new file mode 100644 index 0000000..f5000f3 --- /dev/null +++ b/backend/views/templates/linktree-mountain.ejs @@ -0,0 +1,494 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(26,35,50,0.8)', textColor: '#87ceeb' }) %> + + + diff --git a/backend/views/templates/linktree-mystical.ejs b/backend/views/templates/linktree-mystical.ejs new file mode 100644 index 0000000..731fcf3 --- /dev/null +++ b/backend/views/templates/linktree-mystical.ejs @@ -0,0 +1,546 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ <%=username.toUpperCase()%>'s Profile +
+

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(26,0,51,0.8)', textColor: '#ff00ff' }) %> + + + diff --git a/backend/views/templates/linktree-neon.ejs b/backend/views/templates/linktree-neon.ejs new file mode 100644 index 0000000..1f9b12c --- /dev/null +++ b/backend/views/templates/linktree-neon.ejs @@ -0,0 +1,418 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+ +
+
+
+ <%=username.toUpperCase()%>'s Profile +
+

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/templates/linktree-ocean.ejs b/backend/views/templates/linktree-ocean.ejs new file mode 100644 index 0000000..ba9dfd4 --- /dev/null +++ b/backend/views/templates/linktree-ocean.ejs @@ -0,0 +1,443 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(0,51,102,0.6)', textColor: '#0099ff' }) %> + + + diff --git a/backend/views/templates/linktree-particles.ejs b/backend/views/templates/linktree-particles.ejs new file mode 100644 index 0000000..2e64b6c --- /dev/null +++ b/backend/views/templates/linktree-particles.ejs @@ -0,0 +1,363 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + + + +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/templates/linktree-retro.ejs b/backend/views/templates/linktree-retro.ejs new file mode 100644 index 0000000..bb8cdfb --- /dev/null +++ b/backend/views/templates/linktree-retro.ejs @@ -0,0 +1,393 @@ + + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + + + + diff --git a/backend/views/templates/linktree-royal.ejs b/backend/views/templates/linktree-royal.ejs new file mode 100644 index 0000000..18eafbd --- /dev/null +++ b/backend/views/templates/linktree-royal.ejs @@ -0,0 +1,433 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ <%=username.toUpperCase()%>'s Profile +
+

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(26,26,46,0.8)', textColor: '#ffd700' }) %> + + + diff --git a/backend/views/templates/linktree-space.ejs b/backend/views/templates/linktree-space.ejs new file mode 100644 index 0000000..a60c029 --- /dev/null +++ b/backend/views/templates/linktree-space.ejs @@ -0,0 +1,403 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: '#000', textColor: '#8a2be2' }) %> + + + diff --git a/backend/views/templates/linktree-storm.ejs b/backend/views/templates/linktree-storm.ejs new file mode 100644 index 0000000..dce844c --- /dev/null +++ b/backend/views/templates/linktree-storm.ejs @@ -0,0 +1,523 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ <%=username.toUpperCase()%>'s Profile +

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(10,10,26,0.8)', textColor: '#87ceeb' }) %> + + + diff --git a/backend/views/templates/linktree-water.ejs b/backend/views/templates/linktree-water.ejs new file mode 100644 index 0000000..edc807a --- /dev/null +++ b/backend/views/templates/linktree-water.ejs @@ -0,0 +1,418 @@ + + + + + + + + <%=username.toUpperCase()%> - All in1 url + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ <%=username.toUpperCase()%>'s Profile +
+

<%= username.toUpperCase() %>

+

<%=dp.bio||"Welcome to my link hub! Explore all my profiles below."%>

+
+ + + + +
+ + <%- getTemplateScripts({ bgColor: 'rgba(255,255,255,0.2)', textColor: 'white' }) %> + + + diff --git a/docker-compose.yml b/docker-compose.yml index 7772a66..be6b7ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.9" - services: backend: build: ./backend @@ -16,12 +14,30 @@ services: build: ./frontend container_name: frontend expose: - - "5173" - volumes: - - ./frontend:/app - - /app/node_modules + - "80" + environment: + - VITE_API_URL=https://allin1url.in + depends_on: + - backend + + n8n: + image: docker.n8n.io/n8nio/n8n:latest + container_name: n8n + expose: + - "5678" environment: - - VITE_API_URL=https://clickly.cv + - N8N_HOST=n8n.allin1url.in + - N8N_PORT=5678 + - N8N_PROTOCOL=https + # Trust nginx (1 proxy): fixes "X-Forwarded-For header set but trust proxy is false" + - N8N_PROXY_HOPS=1 + # Required: nginx (another container) can only reach n8n if it listens on 0.0.0.0 + - N8N_LISTEN_ADDRESS=0.0.0.0 + - NODE_ENV=production + - WEBHOOK_URL=https://n8n.allin1url.in + - GENERIC_TIMEZONE=Asia/Kolkata + volumes: + - n8n_data:/home/node/.n8n depends_on: - backend @@ -38,3 +54,7 @@ services: depends_on: - frontend - backend + - n8n + +volumes: + n8n_data: diff --git a/frontend/.env b/frontend/.env new file mode 100644 index 0000000..b3e5df2 --- /dev/null +++ b/frontend/.env @@ -0,0 +1,2 @@ +VITE_GITHUB_TOKEN='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' +VITE_GOOGLE_CLIENT_ID='82343726980-l5frel7ehhv36rcuqo4vu5adkf8vkanq.apps.googleusercontent.com' \ No newline at end of file diff --git a/frontend/.gitignore b/frontend/.gitignore index a547bf3..6421d62 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -8,9 +8,10 @@ pnpm-debug.log* lerna-debug.log* node_modules -dist +# dist dist-ssr *.local +.env # Editor directories and files .vscode/* @@ -22,3 +23,4 @@ dist-ssr *.njsproj *.sln *.sw? +.env \ No newline at end of file diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md index 1deb23f..2e18cbe 100644 --- a/frontend/CHANGELOG.md +++ b/frontend/CHANGELOG.md @@ -7,7 +7,979 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Changed - 2024-12-19 +### Added - 2024-12-XX (Latest) + +- **Comprehensive Analytics Dashboard Enhancement**: Complete analytics system overhaul + - **Referrer-Based Analytics**: Added referrer category analytics (Direct, Search, Social, Internal, External) + - **Top Referrer Sources**: Domain-level referrer tracking with detailed breakdowns + - **Device Analytics**: Complete device type breakdown (Desktop, Mobile, Tablet) + - **Browser Analytics**: Browser distribution tracking (Chrome, Safari, Firefox, Edge, etc.) + - **Operating System Analytics**: OS-based analytics (Windows, macOS, Linux, iOS, Android) + - **Hourly Distribution**: Hourly click patterns throughout the day + - **Day of Week Analysis**: Day-of-week click distribution patterns + - **Platform Performance**: Individual platform click metrics + - **Link-Based Analytics**: Per-link performance tracking + - **Multiple Chart Types**: Line, Bar, Area, and Pie charts for different data visualizations + - **Customizable Time Ranges**: 7 days, 30 days, 90 days, 1 year, or all time + - **Summary Cards**: Quick overview with Total Clicks, Profile Visits, Unique Countries, Top Referrer + - **Detailed Breakdown Sections**: Referrer categories, device types, browsers, OS, geographic distribution, hourly patterns, day of week patterns + - **Backend Integration**: Real MongoDB aggregation queries replacing mock data + - **Data Validation**: Robust data validation with fallback logic for missing keys + - **Chart Re-rendering**: Fixed chart updates when switching between metrics + - **Immutable Array Handling**: Fixed "read-only array" errors by creating copies before sorting + - **Full Theme Support**: Complete dark and light theme support with proper text contrast + - **Responsive Design**: Mobile-optimized analytics dashboard with responsive text sizing + +- **Responsive Text Sizing**: Implemented responsive typography across all pages + - **Global Font Scaling**: Base font size scales from 14px (mobile) to 17px (desktop) + - **Tailwind Configuration**: Added responsive font size scale to tailwind.config.js + - **Custom Utility Classes**: Created responsive typography classes (.text-h1 to .text-h6, .text-body, .text-btn, etc.) + - **Applied to Components**: Updated HomePage, HeroSection, AboutDeveloper, and other key pages + - **Mobile Optimization**: Ensures optimal readability on all device sizes + +- **Mobile Layout Improvements**: Enhanced mobile user experience + - **Hero Section URL Input**: Fixed URL input box to stay on single row on mobile + - Changed from flex-col to flex-row flex-nowrap + - Added whitespace-nowrap to prevent text wrapping + - Adjusted input width and spacing for mobile + - Reduced text size on mobile for URL parts + - **Mobile Menu Background**: Set solid background for mobile hamburger menu + - Removed backdrop-blur for solid background + - Added proper z-index (z-[9999]) to ensure visibility + - Fixed backdrop overlay z-index (z-[9998]) + - Ensures menu is always visible above other elements + +- **Theme Color Improvements**: Enhanced text colors for dark and light themes + - **Analytics Page**: Complete text color overhaul for proper theme support + - Updated all select dropdowns with proper light/dark backgrounds and text colors + - Fixed card backgrounds from bg-white/10 to bg-white/80 for light mode visibility + - Updated all text colors with dark mode variants (text-gray-900 dark:text-white, etc.) + - Fixed table headers, labels, and body text for proper contrast + - Updated progress bars and background elements for theme consistency + - Enhanced icon colors and interactive elements + - **Consistent Theme Support**: All text elements now properly adapt to both themes + +### Added - 2024-12-XX (Previous) + +- **Custom Subdomain Routing**: Revolutionary subdomain-based link format + - Each user now gets their own custom subdomain (e.g., `username.allin1url.in`) + - Hub link format: `https://username.allin1url.in` (replaces `https://allin1url.in/username`) + - Platform links format: `https://username.allin1url.in/platform` (replaces `https://allin1url.in/username/platform`) + - Environment-aware URL generation (dev: `username.localhost:8080`, prod: `username.allin1url.in`) + - Updated all frontend components to use new subdomain format + - Updated utility functions for consistent URL generation across app + - All link displays, copy functions, and previews now use subdomain format + - Backward compatible - legacy format still works for main domain access + +### Added - 2024-12-XX (Previous) + +- **Private Link Password Protection**: Complete password protection UI for private links + - Password modal in Linkcard component for setting private link passwords + - Password input with confirmation field + - Visual indicators for link visibility status (public/unlisted/private) + - Lock icon button on each link card for quick visibility changes + - Dropdown menu for changing link visibility + - Color-coded visibility badges (green/yellow/red) + - Secure password handling with minimum length validation + - Loading states during password setting + +- **Settings Page**: Comprehensive settings page for privacy and permissions + - Profile visibility controls (8 toggle options) + - Link display settings (show link count, show click stats) + - Search & discovery settings (allow search, featured, search keywords) + - Privacy settings (show analytics, show last updated, require auth) + - Notification settings (email on click, email on profile view, weekly report) + - Modern UI with toggle switches and keyword management + - Full light and dark mode support + - Backend integration with proper state management + +- **Profile Page Redesign**: Complete redesign of Profile page with modern UI + - Added animated background with gradient orbs and grid pattern + - Implemented glassmorphism design with backdrop blur effects + - Enhanced profile picture upload with hover effects and loading states + - Added form inputs with icons (User, Location, Heart, Edit) + - Improved layout with two-column grid (profile picture on left, form on right) + - Added smooth animations using Framer Motion + - Added stat cards (Total Links, Total Clicks, Hub Page Status) + - Added public profile information section + - Full light and dark mode support + +- **Settings Page**: New comprehensive settings page for privacy and permissions + - Profile visibility controls (public, search, profile view, email, location, bio, passion, image) + - Link display settings (show link count, show click stats) + - Search & discovery settings (allow search, featured, search keywords) + - Privacy settings (show analytics, show last updated, require auth) + - Notification settings (email on click, email on profile view, weekly report) + - Modern UI with toggle switches and keyword management + - Full light and dark mode support + +- **ProfilePreview Component**: Public profile view for visitors + - Respects all visibility settings from user settings + - Shows only public links (filters out unlisted/private) + - Displays profile information based on permissions + - Stats display (link count, clicks) based on settings + - Responsive design with animations + - Full light and dark mode support + - Back button for navigation + +- **Search Functionality**: User search in navigation bar + - Real-time search with 300ms debounce + - Search dropdown with user results + - Click to visit profile from search results + - Responsive design: icon on mobile, full input on desktop + - Mobile search expands when icon is clicked + - Loading spinner during search + - Click-outside to close dropdown + - Full light and dark mode support + +- **Link Visibility Controls**: Per-link privacy settings + - Added visibility field to Link model (public, unlisted, private) + - Lock icon button on each link card + - Dropdown menu to change visibility (public/unlisted/private) + - Visual badge showing current visibility status + - Color-coded visibility indicators (green/yellow/red) + - Password protection for private links with secure modal + - Password modal with confirmation field and validation + - Helper methods for visibility checks + - React Portal implementation for dropdown to prevent z-index issues + +- **Database Models Enhancement**: Added timestamps and analytics support + - Added `createdAt`, `updatedAt`, `deletedAt` to all models + - Added `linkId` to Link model for foreign key relationships + - Created LinkAnalytics model with comprehensive click tracking + - Created UserSettings model for privacy and visibility controls + - Added full timestamp tracking (date, time, timezone) in analytics + - Comprehensive documentation for all models in `/backend/doc/` + +- **Model Documentation**: Complete documentation for all database models + - Created `/backend/doc/` folder with detailed model documentation + - One documentation file per model (linkModel.md, userModel.md, etc.) + - Each file includes field descriptions, enum values, usage examples + - Added README.md in doc folder as index + - Documentation explains why each field is required/optional + +### Changed - 2024-12-XX +- **Link Model**: Added visibility and password fields + - Added `visibility` field with enum: 'public', 'unlisted', 'private' + - Added `password` field for unlisted link protection + - Changed default visibility from 'private' to 'public' + - Added helper methods: `isAccessible()`, `shouldShowInProfile()`, `shouldShowInSearch()` + - Added indexes for visibility queries + +- **UserSettings Model**: Refactored to remove redundant link visibility fields + - Removed `links.defaultVisibility`, `links.publicLinks`, `links.unlistedLinks` + - Removed methods: `isLinkPublic()`, `isLinkUnlisted()`, `getPublicLinks()` + - Kept only display settings: `showLinkCount`, `showClickStats` + - Link visibility now managed directly in Link model + +- **Profile Page**: Added Preview button + - Added "Preview" button to see how profile looks to visitors + - Button only shows when not in edit mode + - Navigates to public profile preview page + +- **Navigation**: Enhanced with search functionality + - Added search input with icon in navbar + - Responsive: shows icon on mobile, full input on desktop + - Mobile search expands when icon is clicked + - Connected Settings link in profile menu + +### Fixed - 2024-12-XX (Latest) + +- **Private Link Password Modal Duplication**: Fixed duplicate password modal rendering + - Removed duplicate password modal code block in Linkcard.jsx + - Only one modal instance now renders when setting link to private + - Eliminated overlapping overlays and duplicate forms + +- **Private Link Redirection**: Fixed password verification and redirection flow + - Implemented proper form submission for password verification + - Fixed backend to decode username and source before verification + - Added direct HTTP redirect after successful password verification + - Fixed CSP and CORS issues for password prompt page + - Improved error handling with user-friendly messages + - Removed client-side fetch logic in favor of standard form submission + +- **Linkcard Dropdown Visibility**: Fixed privacy button dropdown visibility issues + - Implemented React Portal to render dropdown outside parent container + - Fixed z-index conflicts with other page elements + - Added dynamic position calculation with viewport bounds checking + - Fixed dropdown positioning to use viewport-relative coordinates + - Ensured dropdown is always visible and clickable + +- **CreateBridge Copy Button**: Fixed form submission issue + - Added `type="button"` to copy button to prevent form submission + - Copy button no longer triggers platform validation warning + - Fixed issue where clicking copy showed "first fill the platform" warning + +- **Profile Picture Upload**: Fixed click handler issues + - Restructured profile picture container to fix hover and click handlers + - Removed blocking div that was preventing clicks + - Added proper event handlers on main container + - Added pointer-events-none to hover overlay + +### Added - 2024-12-20 +- **Logo Implementation**: Added All in1 url logo across all navigation bars + - Imported logo from `assets/logo.png` in all navbar components + - Added rotating 3D flip animation to logo (20s infinite rotation) + - Implemented round logo design with proper visibility in both light and dark modes + - Added logo to `Nav.jsx`, `HomePage.jsx`, `Documentation.jsx`, and `AboutDeveloper.jsx` + - Logo includes fallback image and error handling + - Enhanced logo visibility with background and padding for better contrast + +- **Footer Component Integration**: Added Footer component to HomePage + - Integrated Footer component into HomePage for consistent site-wide navigation + - Footer includes links, social media icons, and "Made with ❤️" section + - Maintains consistent design language across all pages + +- **About Developer Page Navigation**: Added navigation bar to AboutDeveloper page + - Implemented full navigation bar with logo, links (Home, Documentation, Login), and dark mode toggle + - Navigation bar matches design pattern from Documentation page + - Includes animated background glow and smooth transitions + - Properly integrated with page content and animations + +- **Footer About Developer Button Animation**: Enhanced "About Developer" button with advanced animations + - Added pulsing background glow effects (multiple layers with different opacities) + - Implemented continuous text translation animation (subtle x-axis movement) + - Added rotating and scaling rocket icon animation + - Implemented shimmer effect that sweeps across the button + - Button now has enhanced focus and visual appeal + +- **Documentation Page Interactive Cards**: Enhanced documentation page with interactive card designs + - Replaced static "Only the platform name changes" card with interactive MagneticCard + - Added matrix-style falling character background (50 animated Katakana characters) + - Implemented floating particles animation (8 particles with position, scale, opacity animations) + - Added rotating sparkle emojis and animated gradient title text + - Enhanced "Special Link Section" card with matrix rain effects and glowing black background + - Cards now feature animated border glows, corner glows, and hover effects + +### Changed - 2024-12-20 +- **Dashboard Light Mode Background**: Updated Dashboard background for light mode + - Changed light mode background from dark gradient (`from-slate-900 via-purple-900 to-slate-900`) to light gradient (`from-slate-50 via-blue-50 to-purple-50`) + - Dark mode background remains unchanged (`dark:from-gray-950 dark:via-purple-950 dark:to-gray-950`) + - Dashboard now matches LinkPage light mode styling for consistency + +- **Content Component Light Mode**: Enhanced Content component for light mode visibility + - Updated text colors: `text-gray-200` → `text-gray-700`, `text-gray-300` → `text-gray-600` + - Updated gradient text colors to darker shades in light mode (`from-purple-600`, `to-pink-600`) + - Enhanced icon colors with better opacity for light mode visibility + - Updated decorative elements (gradient lines, dots) to darker colors in light mode + - All changes maintain dark mode compatibility + +- **CreateBridge Component Light Mode**: Completely redesigned for light mode visibility + - Changed form background from `bg-white/10` to `bg-white/80` for better contrast + - Updated all text colors: white text → `text-gray-700`/`text-gray-800` for light mode + - Updated input fields: `bg-white/90` with `text-gray-900` and proper borders + - Enhanced labels, icons, and helper text for light mode visibility + - Updated edit mode indicator with light background and dark text + - Redesigned generated link display with light backgrounds + - Enhanced warning modal with light backgrounds and proper text contrast + - Updated all buttons with appropriate colors for light mode + - All changes maintain dark mode compatibility + +- **API Configuration**: Updated API base URL configuration + - Changed from hardcoded `http://localhost:8080` to environment variable-based configuration + - Now uses `import.meta.env.VITE_API_URL || 'https://allin1url.in'` + - Enabled `withCredentials: true` for proper cookie handling + - Supports both development and production environments + +### Fixed - 2024-12-20 +- **VerificationPage Navigation Bug**: Fixed React Router navigation API misuse + - Changed `navigate("/verified", { state: "verified" }, { replace: true })` to `navigate("/verified", { state: "verified", replace: true })` + - Removed unused `replace` import from react-router-dom + - Navigation now correctly uses React Router's API with options merged into second argument + +- **Documentation Page SSR Safety**: Fixed potential server-side rendering issue + - Added safety check for `window.innerHeight` access: `(typeof window !== 'undefined' ? window.innerHeight : 800)` + - Prevents errors during SSR or hydration mismatches + - Ensures animation works correctly in client-side React environments + +- **Logo Visibility Issues**: Fixed logo visibility across all navigation bars + - Removed `dark:brightness-0 dark:invert` classes that caused white-only display + - Changed `object-cover` to `object-contain` for proper logo scaling + - Added `bg-white/10 dark:bg-gray-800/20 p-1` for subtle background and padding + - Logo now visible in both light and dark modes with proper contrast + +- **Content Component Light Mode Text Visibility**: Fixed text visibility in light mode + - Updated tagline text colors for better contrast + - Enhanced gradient text colors for light mode readability + - Improved icon and decorative element visibility + +- **CreateBridge Component Light Mode Visibility**: Fixed all visibility issues in light mode + - Fixed form background transparency for better readability + - Updated all input field colors and borders + - Fixed label and helper text visibility + - Enhanced modal and button visibility + - All text elements now properly visible in light mode + +- **Dashboard Light Mode Consistency**: Fixed Dashboard background to match LinkPage + - Updated Dashboard background gradient to match LinkPage light mode styling + - Ensures visual consistency across all dashboard sections + - Dark mode remains unchanged + +### Removed - 2024-12-20 +- **Unused Code Cleanup**: Removed unused imports and code + - Removed unused `axios` import from `Profile.jsx` + - Removed unused `resendOtp` from `AuthRoute.js` + - Removed unused `setDarkMode` action from `pageSlice.js` + - Removed unused `replace` import from `VerificationPage.jsx` + - Removed unused imports from `DashBoard.jsx` (useEffect, useState, toast, useDispatch, useSelector, api, setLinks, Nav, Form) + - Removed commented-out code and unused route handlers + - Cleaned up `AnalysisPage.jsx` (deleted unused file) + +### Added +- **Documentation Page Glowing Background Animations**: Added multiple glowing background animation effects: + - **Pulsing Glow Rings**: 4 animated rings that pulse with different colors (purple, pink, blue, cyan) with blur and box-shadow effects + - **Animated Glowing Waves**: Horizontal and vertical gradient waves that sweep across the background + - **Radial Glow Effects**: 6 radial gradient orbs that pulse and move in circular patterns + - **Glowing Grid Lines**: Animated grid pattern with glowing purple and pink lines that pulse in opacity + - **Animated Glow Spots**: 8 glowing spots that scale, fade, and move in wave patterns across the background + - All effects use smooth animations with varying durations and delays for a dynamic, layered glow effect + +### Fixed +- **Documentation Page Example Links Section Card Animations**: Enhanced card animations and particle positioning: + - Moved floating particles (dots) from card's top-left corner to be centered with the icon + - Particles now orbit around the icon center when card is hovered + - Added continuous glowing animation on each card using animated boxShadow that pulses + - Particles are now positioned relative to the icon container, ensuring they stay centered with the icon + +- **Documentation Page Example Links Section Card Layout**: Improved card layout and text display: + - Centered icon horizontally with animated glow effect that moves with the icon + - Restored continuous icon animation (rotate, scale, and float) that was previously working + - Icon glow effect is now centered and moves along with the icon animation + - Changed URL text to show full link without ellipsis by using tighter letter spacing (`letterSpacing: '-0.3px'`) and word spacing (`wordSpacing: '-1px'`) + - Reduced font size to `text-[10px] md:text-xs` to ensure full link visibility + - Centered all text elements (icon, platform name, URL) for better visual alignment + +- **Documentation Page Example Links Section Animation Fix**: Fixed animation conflicts in the AnimatedLinkCard component: + - Separated floating animation into a wrapper motion.div to prevent conflicts with initial animations + - Fixed animate prop structure to ensure cards are visible and animate correctly + - Improved inView detection margin from "-50px" to "-100px" for better trigger timing + - Added proper component structure with nested motion wrappers + - Ensured cards have minimum height (`min-h-[180px]`) and proper flex layout + - Fixed title gradient to use bg-clip-text instead of inline styles for better compatibility + +### Changed +- **Documentation Page Example Links Section Redesign**: Completely replaced the ContainerScroll component with a stunning new animated 3D card grid: + - **3D Floating Cards**: Each platform link is now displayed in a beautiful 3D floating card with magnetic hover effects + - **Individual Card Animations**: Each card features: + - Continuous floating animation (up and down movement) + - 3D rotation effects on hover with perspective transforms + - Animated gradient backgrounds that pulse and morph + - Shimmer effects that sweep across cards on hover + - 6 floating particles that explode outward on hover + - Platform-specific emoji icons with rotation animations + - Pulsing glow effects that intensify on hover + - Arrow indicators with animated movement + - **Animated Title**: Gradient text title with moving background position animation + - **Background Glow**: Pulsing background glow effect behind the card grid + - **Grid Layout**: Responsive 3-column grid (1 column mobile, 2 columns tablet, 3 columns desktop) + - **Color-Coded Cards**: Each platform has its own unique gradient color scheme + - **Enhanced Bottom Note**: Animated note text with pulsing opacity + - Removed ContainerScroll dependency and replaced with custom animated component + - Cards use MagneticCard wrapper for 3D magnetic hover effects + - All animations are optimized for performance with proper cleanup + +### Fixed +- **Footer Vertical Height Reduction**: Significantly reduced the vertical height of the Footer component: + - Reduced main padding from `py-8 md:py-10` to `py-4 md:py-6` + - Reduced grid gap from `gap-8 md:gap-12` to `gap-6 md:gap-8` + - Reduced logo margin from `mb-6` to `mb-3` + - Reduced heading margins from `mb-4` to `mb-2` + - Reduced divider margin from `my-8` to `my-4` + - Reduced bottom section gap from `gap-6` to `gap-4` + - Reduced "Made with Love" margin from `mt-6` to `mt-4` + - Changed description line-height from `leading-relaxed` to `leading-normal` for more compact text +- **Footer Light Mode Visibility and Spacing**: Fixed footer visibility issues and reduced excessive spacing: + - Fixed Footer component text colors for light mode: changed headings from `text-white` to `text-gray-900 dark:text-gray-200` + - Fixed footer links from `text-gray-400` to `text-gray-700 dark:text-gray-500` with proper hover states + - Fixed footer description and copyright text colors for light mode visibility + - Removed duplicate footer element in Documentation.jsx (removed redundant ``) +- **Documentation Page Spacing Optimization**: Significantly reduced spacing throughout the page for a more compact layout: + - Reduced section margins from `mb-12 md:mb-16` to `mb-6 md:mb-8` + - Reduced heading margins from `mb-12` to `mb-6 md:mb-8` + - Reduced feature cards spacing from `space-y-8 md:space-y-12` to `space-y-4 md:space-y-6` + - Reduced various `mb-8` values to `mb-4 md:mb-6` for tighter spacing + - Reduced hero section spacing (`mb-6` to `mb-4`) +- **Documentation Page Light Mode Text Visibility**: Fixed multiple text visibility issues in light mode: + - Changed Platform Support section text from `text-gray-300` to `text-gray-700` for better contrast + - Fixed Troubleshooting section heading from `text-white` to `text-gray-900 dark:text-white` + - Fixed FAQ question text from `text-white` to `text-gray-900 dark:text-gray-200` + - Improved subtitle text visibility by changing `text-gray-400` to `text-gray-600` in multiple locations (CTA subtitle and Platform Support footer text) + - All text elements now have proper dark mode variants for optimal visibility in both themes + +### Added +- **Documentation Page Complete Animation Redesign**: Completely redesigned the Documentation page with cutting-edge animations and visual effects: + - **Floating Particle System**: Added 30+ floating particles throughout the page with dynamic colors (purple, pink, blue, cyan) that continuously animate with varying sizes, delays, and durations + - **3D Card Transforms**: Implemented `MagneticCard` component with 3D perspective transforms that respond to mouse movement, creating immersive magnetic hover effects + - **Enhanced Feature Cards**: Redesigned feature cards with: + - 3D rotation effects on hover (rotateY, rotateZ) + - Shimmer effects that sweep across cards + - Floating particles that appear on hover (6 particles per card) + - Animated gradient backgrounds that pulse and morph + - Icon rotation animations with glow effects + - Image parallax effects with 3D transforms + - Text animations with scale and position changes + - **Dynamic Background Enhancements**: + - Morphing gradient orbs that scale and change opacity continuously + - 5 additional floating orbs with random movement patterns + - Rotating gradient rings (3 rings) with conic gradients + - Animated grid with wave opacity effects + - **Enhanced Navigation**: + - Logo with continuous 3D rotation (20s infinite rotation) + - Animated gradient text with moving background position + - Text glow effects with pulsing opacity + - Navigation links with magnetic hover and slide animations + - Dark mode toggle with rotation and glow effects + - Get Started button with shimmer, gradient animation, and particle effects + - **3D Introduction Section**: + - Magnetic card with 3D hover effects + - Animated border glow that sweeps around the card + - Floating particles within the section + - Text with animated gradient background position + - Text shadow glow effects + - Animated bold text with pulsing text shadows + - URL highlighting with color animation + - **Enhanced CTA Button**: + - 3D magnetic hover effects with perspective transforms + - Animated gradient background with moving position + - Shimmer effect that continuously sweeps across + - Rocket icon with rotation and vertical movement + - Glow effect that pulses on hover + - 8 floating particles that explode outward on hover + - **Parallax Effects**: Multiple elements use parallax scrolling and mouse-tracking for depth + - **Morphing Gradients**: Background gradients continuously morph with scale and opacity changes + - **Wave Animations**: Grid and border elements use wave-like opacity animations + - All animations are optimized for performance with proper cleanup and throttling + +### Changed +- **HomePage Dark Mode Background Reverted**: Reverted the dark mode main background gradient from `dark:from-gray-950 dark:via-purple-950 dark:to-gray-950` back to the original `dark:from-slate-900 dark:via-purple-900 dark:to-slate-900` to restore the original dark mode appearance. Light mode improvements remain unchanged. +- **HomePage Card Edge Animations Finalized**: Implemented final animation styles for card borders: + - **"Trusted by Thousands" section**: Rotating conic gradient border (3s rotation) with pulsing glow effect (3s cycle) and 8 animated dots/orbs moving around the border perimeter continuously + - **"Perfect for Everyone" section**: Added 8 animated dots/orbs moving around the border perimeter of each benefit card + - **"Powerful Features" section**: Kept pulsing glow border animation, made all cards consistent height using flexbox layout (`h-full flex flex-col`) to prevent odd-looking card size variations + - Dots animation: 8 dots move clockwise around card perimeter with staggered delays (0.15s between each), pulsing scale and opacity effects +- **HomePage Animated Edge Borders on Cards**: Added continuous rotating edge animations to cards in "Trusted by Thousands" and "Powerful Features" sections: + - Implemented rotating conic gradient borders that continuously animate around card edges + - Uses Framer Motion's `animate` with `rotate` from 0 to 360 degrees + - 3-second rotation duration with infinite repeat and linear easing + - Gradient colors: purple (#9333ea), pink (#ec4899), blue (#3b82f6) + - Animation runs automatically without mouse interaction + - Applied to both statistics cards and feature cards +- **HomePage Statistics and Features Sections Dark Mode Redesign**: Enhanced the "Trusted by Thousands" and "Powerful Features" sections specifically for dark mode with: + - Added gradient backgrounds (`dark:from-purple-950/40 dark:via-slate-900/60 dark:to-blue-950/40` for stats, `dark:from-slate-900/60 dark:via-purple-950/40 dark:to-pink-950/40` for features) + - Decorative background blur orbs for visual depth + - Enhanced card designs with gradient backgrounds (`dark:from-gray-800/80 dark:via-gray-900/80 dark:to-gray-800/80`) + - Improved borders with purple glow effects (`dark:border-purple-500/30` with `dark:shadow-[0_0_20px_rgba(147,51,234,0.15)]`) + - Gradient text effects for headings and numbers in dark mode + - Hover effects with enhanced shadows and border glows + - Icon drop shadows for better visibility + - Gradient overlays on hover for interactive feedback + - Light mode remains completely unchanged + +### Fixed +- **AuthPage Axios Error Status Check**: Fixed the 409 conflict detection in `handleSignUp` function. Changed `err.status === 409` to `err.response?.status === 409` to correctly access the HTTP status code from axios error objects. This ensures username conflict handling (redirecting to login) works properly. +- **Documentation Page DOM Nesting Warning**: Fixed React DOM nesting warning where `
` (from `FlipWords` component) was appearing as a descendant of `

`. Changed the parent `` to `` to allow proper nesting of block-level elements. +- **AuthPage Signup Button Validation**: Fixed the signup button's `disabled` condition to properly prevent form submission with invalid usernames. Changed from `disabled={loading || (username.length >= 5 && !isAvailable)}` to `disabled={loading || username.length < 5 || (username.length >= 5 && !isAvailable)}`. The button is now correctly disabled when username length is less than 5 characters, preventing invalid form submissions. + +### Added +- **Documentation Page Navigation Menu with Theme Toggle**: Added a comprehensive navigation menu to the Documentation page (`/doc`) with: + - Logo and brand name (clickable to navigate home) + - Navigation links (Home, Login) - visible on desktop + - Dark mode toggle button with improved visibility in light mode (`bg-white/90`, `text-gray-800`, `border-gray-300`) + - Get Started button with responsive text + - Consistent styling with `bg-white/95 dark:bg-gray-900/50` navbar background + - Proper z-index and backdrop blur for glassmorphism effect + +### Changed +- **Documentation Page Theme Consistency**: Updated `Documentation.jsx` to match `LinkPage`'s dark mode and light mode styling. Removed explicit background gradient (now inherits from Dashboard), updated all text colors to use `text-gray-900 dark:text-white` for headings and `text-gray-700 dark:text-gray-400` for body text, updated navigation bar to `bg-white/95` in light mode, and adjusted example links container to use darker backgrounds in light mode for better visibility. + +### Enhanced +- **Documentation Page Text Visibility Improvements**: Enhanced text visibility throughout the Documentation page: + - Updated body text colors from `text-gray-700` to `text-gray-800` for better contrast in light mode + - Improved FAQ chevron icon colors: `text-purple-600 dark:text-purple-400` for better visibility + - Enhanced example check circle colors: `text-green-600 dark:text-green-400` + - Updated subtitle text from `text-gray-400` to `text-gray-600` for better readability + - Fixed use case section heading colors to match theme consistency + - All text now properly adapts to both light and dark modes with improved contrast ratios + +### Added - 2024-12-19 ++- **HomePage Background Gradients for Card Effects**: Added subtle gradients to section backgrounds to enhance card visual appeal + - Statistics section: Added gradient background (`from-purple-50/80 via-pink-50/80 to-blue-50/80`) in light mode + - Features section: Added gradient background (`from-blue-50/80 via-purple-50/80 to-pink-50/80`) in light mode + - Benefits section: Added gradient background (`from-blue-50/80 via-indigo-50/80 to-purple-50/80`) in light mode + - Hero section: Updated gradient to lighter tones (`from-purple-50/60 via-pink-50/60 to-blue-50/60`) in light mode + - Statistics cards: Updated to `bg-white/90` with purple-tinted borders (`border-purple-200/60`) for better contrast + - Features cards: Updated to `bg-white/90` with purple-tinted borders (`border-purple-200/60`) for better contrast + - Added hover effects on card borders for better interactivity + - Reduced radial gradient opacity in hero section for subtler effect + - All gradients use low opacity (80% or 60%) to maintain readability while adding visual depth + - Dark mode remains unchanged with transparent backgrounds + ++- **HomePage Light Mode Visibility Improvements**: Improved visibility in light mode with lighter backgrounds and better text contrast + - Changed main background from dark (`from-slate-900 via-purple-900 to-slate-900`) to light (`from-slate-50 via-blue-50 to-purple-50`) in light mode + - Statistics section: Added light background (`bg-white/80`) in light mode with backdrop blur + - Features section: Added light gradient background (`from-blue-50 via-purple-50 to-pink-50`) in light mode + - Benefits section: Added light background (`bg-white/80`) in light mode with backdrop blur + - Updated all text colors: headings use `text-gray-800` in light mode, body text uses `text-gray-600` + - Statistics cards: Changed from glassmorphism to solid white background (`bg-white`) in light mode + - Features cards: Changed from glassmorphism to solid white background (`bg-white`) in light mode + - Updated navigation bar: Changed to white background (`bg-white/95`) in light mode for better visibility + - Updated dark mode toggle button: Changed to white background (`bg-white/90`) with dark text in light mode + - Updated hero section background: Lighter gradient (`from-purple-100/50 via-pink-100/50 to-blue-100/50`) in light mode + - All sections now have proper contrast and visibility in both light and dark modes + - Dark mode remains unchanged with dark backgrounds and light text + ++- **HomePage Dark Mode Toggle Button**: Added dark mode/light mode toggle button to HomePage + - Added dark mode toggle button in the navigation header (similar to Nav component) + - Imported `useDispatch` and `toggleDarkMode` from Redux + - Imported `MdDarkMode` and `MdLightMode` icons from react-icons + - Toggle button positioned between logo and navigation links + - Button has hover effects (scale and rotate) and smooth transitions + - Shows sun icon (MdLightMode) in dark mode and moon icon (MdDarkMode) in light mode + - Button styled with glassmorphism design matching the application theme + - HomePage now defaults to dark mode background (`from-slate-900 via-purple-900 to-slate-900`) + - Updated all text colors to work properly in both light and dark modes + - Updated navigation bar background to dark (`bg-gray-800/95`) in light mode for consistency + - All sections (Statistics, Features, Benefits) now use transparent backgrounds to inherit dark theme + - Updated all text colors: headings use `text-white dark:text-gray-200`, body text uses `text-gray-300 dark:text-gray-400` + - Cards use glassmorphism with `bg-white/10` backgrounds for proper contrast + - Maintains responsive design and all animations + +### Fixed - 2024-12-19 ++- **Nav Component Complete Redesign**: Completely redesigned the navigation bar with modern interactive design + - Implemented glassmorphism design with backdrop blur and gradient borders + - Added interactive mouse-tracking gradient orb background + - Redesigned logo section with hover effects and gradient text + - Enhanced navigation links with active state indicators using Framer Motion `layoutId` + - Added icons to navigation links (FaHome, FaLink, FaBook) + - Redesigned dark mode toggle with smooth animations and hover effects + - Enhanced notification button with animated badge and modern dropdown + - Redesigned profile menu with glassmorphism, icons (FaUser, FaCog, FaSignOutAlt), and smooth animations + - Improved mobile menu with slide-in animation and modern styling + - Added AnimatePresence for smooth transitions on dropdowns and mobile menu + - Consistent gradient color scheme (purple, pink, blue) matching the rest of the application + - Improved accessibility with proper ARIA labels and focus states + ++- **Footer Component Complete Redesign**: Completely redesigned the footer with modern interactive design + - Implemented glassmorphism design with backdrop blur and gradient borders + - Added interactive mouse-tracking gradient orbs background + - Added animated grid pattern for visual depth + - Redesigned brand section with hover effects and gradient text + - Enhanced footer links with hover animations (translate-x effect) and rocket icons + - Redesigned social media icons with hover effects, glassmorphism cards, and smooth animations + - Added "Made with ❤️" section with animated heart icon + - Improved responsive design with better grid layout + - Added Framer Motion animations for scroll-triggered reveals + - Consistent gradient color scheme matching the application theme + - Improved visual hierarchy and spacing + ++- **Notification Component Complete Redesign**: Completely redesigned the notification component with improved text and styling + - Enhanced notification cards with glassmorphism design and gradient borders + - Added icons (FaChartLine, FaLink, FaMousePointer) for better visual communication + - Improved text: Changed from "X clicks on Y" to "X New Click(s)" with platform badge + - Added empty state with friendly message and icon + - Implemented staggered entry animations using Framer Motion + - Added hover effects and smooth transitions + - Enhanced visual hierarchy with gradient badges and progress indicators + - Better spacing and typography for improved readability + - Consistent design language with the rest of the application + ++- **Nav Component Light Mode Visibility**: Improved navigation links and navbar visibility in light mode + - Changed navbar background from `bg-white/10` to `bg-gray-800/95` in light mode for better visibility + - Updated navbar border from `border-white/20` to `border-gray-700/50` in light mode + - Desktop nav links: Changed inactive links from `text-gray-300` to `text-gray-900 dark:text-gray-300` for better contrast + - Desktop nav links: Updated active link text to `text-white dark:text-white` for consistency + - Mobile sidebar: Changed background from `bg-white/10` to `bg-gray-800/95` in light mode + - Mobile sidebar links: Updated to `text-white dark:text-gray-300` for better visibility + - Maintained all dark mode styles unchanged + ++- **Notification and Profile Menu Z-Index and Light Mode Visibility**: Fixed overlapping issues and improved visibility + - Increased z-index from `z-10` to `z-[100]` for both notification dropdown and profile menu to appear above other elements + - Changed notification dropdown background from `bg-white/10` to `bg-gray-800/95` in light mode (95% opacity for better visibility) + - Changed profile menu background from `bg-white/10` to `bg-gray-800/95` in light mode + - Updated borders from `border-white/20` to `border-gray-700/50` in light mode for better definition + - Updated notification item backgrounds to `bg-gray-700/30` in light mode for better contrast + - Changed all text colors to white/light colors for readability on dark backgrounds in light mode + - Maintained all dark mode styles unchanged + - Fixed overlapping with Create Bridge button and other page elements + ++- **Notification and Profile Menu Light Mode Text Visibility**: Improved text visibility in light mode + - Notification empty state: Changed `text-gray-300` to `text-gray-900` and `text-gray-400` to `text-gray-700` + - Notification items: Changed count text from `text-white` to `text-gray-900 dark:text-white` + - Notification badge: Changed `text-purple-300` to `text-purple-600 dark:text-purple-300` for better contrast + - Notification destination: Changed `text-gray-400` to `text-gray-700` for better readability + - Profile menu dropdown: Changed username from `text-white` to `text-gray-900 dark:text-white` + - Profile menu welcome text: Changed `text-gray-400` to `text-gray-700 dark:text-gray-400` + - Profile menu items: Changed `text-gray-200` to `text-gray-900 dark:text-gray-200` for better visibility + - Profile menu sign out: Changed `text-red-300` to `text-red-600 dark:text-red-300` for better contrast + - Notification dropdown header: Changed title from `text-white` to `text-gray-900 dark:text-white` + - Maintained all dark mode styles unchanged + ++- **LinkPage Light Mode Transparent Link Containers**: Made link containers more transparent and less dark + - Reduced link container opacity from `bg-gray-800/90` to `bg-gray-800/40` in light mode for better transparency + - Reduced border opacity from `border-gray-700/50` to `border-gray-700/30` for lighter appearance + - Link text remains white for readability on semi-transparent dark containers + - Maintained all dark mode styles unchanged + - Applied to Hub Link container and Personalized Link containers in Linkcard components + ++- **LinkPage Light Mode Text Visibility**: Improved text visibility in light mode for LinkPage and Linkcard components + - Changed text colors from `text-white` to `text-gray-900 dark:text-white` for headings and important text + - Changed `text-gray-300` to `text-gray-700` for body text in light mode + - Changed `text-gray-400` to `text-gray-700` for labels and secondary text in light mode + - Maintained all dark mode styles unchanged + - Improved contrast and readability across all text elements in light mode + ++- **CreateBridge and LinkPage Excessive Gap**: Fixed excessive spacing between CreateBridge and LinkPage components + - Removed `min-h-screen` from both components since they're sections within Dashboard, not standalone pages + - Removed duplicate background containers (Dashboard now provides the background) + - Changed padding from `min-h-screen p-4` to `py-8 md:py-12 px-4` for more reasonable section spacing + - Components now flow seamlessly as sections within the Dashboard without forced full-screen heights + - Maintains all interactive background effects while eliminating excessive gaps + ++- **Content.jsx Design Consistency**: Fixed visual inconsistency between Content, CreateBridge, and LinkPage components + - Updated Dashboard background to match dark theme (`from-slate-900 via-purple-900 to-slate-900`) + - Removed duplicate background container from Content.jsx to allow seamless flow with Dashboard + - Standardized gradient orbs pattern to match CreateBridge and LinkPage (purple, pink, blue with /20 opacity) + - Updated animated grid pattern to match other components + - Adjusted text colors and icon opacity to work consistently across all sections + - All three sections (Content, CreateBridge, LinkPage) now appear as one cohesive page with seamless transitions + - Maintains interactive mouse-tracking background effects across all sections + ++- **linktree.ejs Profile Picture Centering**: Fixed profile picture alignment + - Profile picture was appearing on the left instead of being horizontally centered + - Added `text-align: center` to `.profile` class in styles.css + - Profile picture wrapper (inline-block) now centers properly within the profile card + - Also centers username, bio, and other text content for better visual balance + ++- **linktree.ejs CSS Linter Error**: Fixed red line/linter error on EJS template syntax + - CSS linter was complaining about EJS syntax `<%= index * 0.1 %>` inside inline style attribute + - Changed from inline style with EJS to data attribute `data-delay` + - Updated JavaScript to read `data-delay` attribute and apply animation delay programmatically + - Eliminates CSS linter false positive while maintaining the same functionality + - Animation delay is now applied both via CSS `animationDelay` and JavaScript `setTimeout` timing + ++- **SVG Attribute Warnings (Nav & Footer)**: Fixed React DOM property warnings for SVG attributes + - Converted kebab-case SVG attributes to camelCase as required by React + - Fixed `stroke-width` → `strokeWidth` in Nav.jsx (3 occurrences) + - Fixed `stroke-linecap` → `strokeLinecap` in Nav.jsx (3 occurrences) + - Fixed `stroke-linejoin` → `strokeLinejoin` in Nav.jsx (3 occurrences) + - Fixed `fill-rule` → `fillRule` in Footer.jsx (4 occurrences) + - Eliminates all React warnings about invalid DOM properties in SVG elements + ++- **Content Component Icon Import Error**: Fixed `FaSparkles` import error + - `FaSparkles` is not exported from `react-icons/fa` + - Replaced with `HiSparkles` from `react-icons/hi2` to match usage in other components + - Resolves "The requested module does not provide an export named 'FaSparkles'" error + ++- **AnimatedCounter IntersectionObserver Conflict**: Fixed frozen counter display when props change + - Removed redundant internal `IntersectionObserver` that conflicted with parent's `useInView` hook + - The component was using both `statsInView` (from parent) and its own observer, causing issues when `end` or `duration` props changed + - When props changed, the effect would re-run, disconnect the observer, but the new observer wouldn't fire because `useInView` already triggered with `once: true` + - Now uses `statsInView` directly to trigger animation, eliminating the conflict + - Added `hasAnimatedRef` to track animation state and properly restart animation when props change + - Animation now correctly restarts when `end` or `duration` changes, even if element is already in view + - Prevents frozen counter display on subsequent prop updates + ++- **Content Component Complete Redesign**: Completely redesigned the Content component with modern interactive design + - Added interactive mouse-tracking gradient orbs that follow cursor movement + - Implemented animated grid pattern background with parallax effect + - Redesigned logo/title with gradient text effect and glowing backdrop + - Added floating decorative icons (FaLink, FaSparkles, FaRocket) with pulse animations + - Enhanced taglines with gradient text highlights and improved typography + - Added scroll-triggered animations using Framer Motion's `useInView` hook + - Implemented smooth spring animations for all elements + - Added decorative wave effect at the bottom + - Improved responsive design for all screen sizes + - Matches the modern glassmorphism and interactive style of other redesigned pages + - Maintains dark mode support with proper color transitions + ++- **State Update on Unmounted Component (AuthPage)**: Fixed React warnings about state updates on unmounted components ++ - Added `isMountedRef` to track component mount status ++ - Modified `handleSignUp` and `handleLogin` to check `isMountedRef.current` before calling `setLoading(false)` in finally block ++ - Set loading to false before navigation in success paths to prevent finally block from executing after unmount ++ - Added early returns after navigation to prevent finally block execution ++ - Properly handles cleanup in useEffect to set `isMountedRef.current = false` on unmount ++ - Eliminates React warnings about memory leaks and state updates on unmounted components + ++- **React Hooks Rules Violation (Documentation)**: Fixed hooks being called inside map loop ++ - `useRef()` and `useInView()` were being called inside `features.map()` loop, violating React's Rules of Hooks ++ - Created separate `FeatureCard` component that properly uses hooks at the top level ++ - Each feature card now has its own component instance with proper hook usage ++ - Maintains all animations and functionality while following React best practices ++ - Prevents potential errors when number of features changes between renders + ++- **CreateBridge Component Complete Redesign**: Completely redesigned the bridge creation/editing component with modern animations ++ - Added interactive mouse-tracking gradient orbs that follow cursor movement ++ - Implemented glassmorphism design with backdrop blur effects throughout ++ - Enhanced form with modern input fields featuring icons and better visual hierarchy ++ - Redesigned header with gradient icon and animated title ++ - Added edit mode indicator with animated badge ++ - Improved input fields with icon indicators (Link icon for platform, Globe icon for URL) ++ - Enhanced action buttons with gradient backgrounds and loading states ++ - Redesigned generated link display with animated entrance and gradient background ++ - Modernized warning modal with glassmorphism, gradient backgrounds, and better visual hierarchy ++ - Added smooth animations for form elements using Framer Motion ++ - Improved visual feedback for all interactions ++ - Fully responsive design optimized for all screen sizes ++ - Better spacing, typography, and color scheme ++ - Maintained all original functionality (create, edit, warning modal, etc.) + ++- **LinkPage Complete Redesign**: Completely redesigned the user's link management page with modern animations ++ - Added interactive mouse-tracking gradient orbs that follow cursor movement ++ - Implemented glassmorphism design with backdrop blur effects throughout ++ - Enhanced header section with gradient text and modern typography ++ - Redesigned hub link card with icon, better layout, and hover effects ++ - Added stats summary cards showing total links, total clicks, and hub page status ++ - Improved empty state with animated icon and call-to-action button ++ - Enhanced link cards with staggered animations on load ++ - Fully responsive design optimized for all screen sizes ++ - Smooth scroll animations using Framer Motion ++ - Modern gradient buttons with hover effects ++ - Animated grid background pattern for depth + ++- **Linkcard Component Redesign**: Completely redesigned individual link cards ++ - Modern glassmorphism card design with gradient borders ++ - Redesigned click counter with gradient icon and better visual hierarchy ++ - Enhanced action buttons with gradient backgrounds and hover animations ++ - Added "Open" button to directly visit the link ++ - Improved mobile responsiveness with separate mobile click counter ++ - Better spacing and typography throughout ++ - Smooth hover effects with scale and translate animations ++ - Gradient text for platform names ++ - Modern copy button with gradient background + ++- **Public Linktree Page Fixes and Enhancements**: Fixed issues and enhanced the public linktree page (linktree.ejs) ++ - **Fixed Mouse Tracking Performance**: Improved mouse tracking with requestAnimationFrame and percentage-based calculations ++ - Changed from direct pixel calculations to percentage-based for better responsiveness ++ - Implemented RAF loop for smooth animations instead of updating on every mousemove ++ - Added proper cleanup to prevent memory leaks ++ - Better performance on all devices ++ - **Fixed Image Loading**: Added fallback image with SVG placeholder if profile image fails to load + - Shows user's initial letter in a gradient circle if image is missing + - Prevents broken image icons ++ - **Fixed Empty State**: Added proper handling for when user has no links ++ - Shows friendly message instead of empty space ++ - Styled empty state with dashed border ++ - **Enhanced Script Execution**: Improved JavaScript with proper DOM ready checks ++ - Wrapped code in IIFE for better scope management ++ - Added proper event listener cleanup ++ - Prevents errors if elements don't exist ++ - **Added Ripple Effect**: Added click ripple animation on buttons for better feedback ++ - Creates visual feedback when links are clicked ++ - Smooth animation that fades out ++ - **Improved Accessibility**: Added better accessibility features ++ - Added focus states for keyboard navigation + - Added proper alt text for images ++ - Added rel="noopener noreferrer" for security ++ - Added meta description for SEO ++ - **Touch Device Optimizations**: Added specific styles for touch devices ++ - Removed hover effects on touch devices ++ - Better active states for mobile ++ - Improved tap targets ++ - **Performance Improvements**: Added will-change properties for better animation performance ++ - Smooth scrolling enabled ++ - Better browser optimization hints ++ - **Enhanced Responsive Design**: Improved mobile experience ++ - Better spacing on very small screens ++ - Adjusted font sizes and letter spacing ++ - Improved button sizes for touch ++ - **Better Error Handling**: Added null checks and error handling throughout ++ - Prevents JavaScript errors if elements are missing ++ - Graceful degradation + ++- **Public Linktree Page Redesign**: Completely redesigned the public linktree page (linktree.ejs) ++ - Modern glassmorphism design with backdrop blur effects ++ - Interactive mouse-tracking gradient orbs (purple, blue, orange) that follow cursor ++ - Animated grid background pattern for depth ++ - Enhanced profile picture with glowing effect and pulse animation ++ - Gradient username text with animated underline ++ - Modern link buttons with hover effects, scale animations, and shimmer effect +- - Smooth fade-in animations for all elements ++ - Smooth fade-in animations for all elements with staggered delays ++ - Arrow indicators on buttons that animate on hover ++ - Heart animation in footer ++ - Fully responsive design for mobile, tablet, and desktop ++ - Updated typography with Poppins and Montserrat fonts ++ - Modern CSS with smooth transitions and animations ++ - Improved accessibility and user experience + ++- **Added Missing Features to HomePage and Documentation**: Added two important features that were missing ++ - **All Links at One Place**: Added feature highlighting the hub link functionality ++ - Users can access all their links by visiting https://allin1url.in/username (without platform name) ++ - Creates a beautiful landing page showing all profiles in one place ++ - Perfect for sharing in bios, resumes, and business cards ++ - Added to HomePage features section with FaHome icon ++ - Updated in Documentation page with enhanced description ++ - **Real-Time Email Notifications**: Added email notification feature ++ - Get instant email notifications every time someone visits your links ++ - Stay informed about who's checking out your profiles in real-time ++ - Perfect for tracking engagement and knowing when potential clients or employers view your links ++ - Added to HomePage features section with FaEnvelope icon ++ - Added to Documentation page features section ++ - Mentioned in "How It Works" section for better visibility + ++- **Documentation Page Complete Redesign**: Completely redesigned documentation page with modern animations and interactive elements ++ - Added interactive mouse-tracking gradient orbs that follow cursor movement ++ - Implemented glassmorphism design with backdrop blur effects throughout ++ - Enhanced all sections with smooth scroll animations using Framer Motion ++ - Redesigned feature cards with gradient icons, hover effects, and scale animations ++ - Added interactive FAQ section with smooth expand/collapse animations ++ - Enhanced "How It Works" section with step-by-step cards and icons ++ - Redesigned testimonials with star ratings and hover effects ++ - Added gradient buttons with hover animations ++ - Improved visual hierarchy with gradient text headings ++ - Added animated grid background pattern for depth ++ - Enhanced all links with hover effects and smooth transitions ++ - Redesigned future enhancements section with gradient cards ++ - Improved spacing, typography, and responsive design ++ - Added icon components from react-icons for better visual appeal ++ - Maintained all original content and functionality ++ - Fully responsive design optimized for all screen sizes ++ - **NEW: Use Cases Section**: Added comprehensive use cases for different user types ++ - Job Seekers, Content Creators, Developers, Students, Businesses, and Freelancers ++ - Each use case includes description, icon, gradient styling, and example applications ++ - Interactive cards with hover effects and smooth animations ++ - **NEW: Best Practices Section**: Added best practices guide for optimal All in1 url usage ++ - Six key best practices with icons and detailed explanations + - Tips on username selection, platform naming, link updates, analytics, testing, and sharing ++ - **NEW: Platform Support Section**: Added comprehensive list of supported platforms ++ - Visual grid showcasing 30+ supported platforms (LinkedIn, GitHub, Instagram, etc.) ++ - Interactive platform cards with hover effects ++ - Emphasizes that any platform with a URL can be supported ++ - **NEW: Security & Privacy Section**: Added security and privacy information ++ - Four key security features: Secure Authentication, Privacy First, HTTPS Encryption, Secure Infrastructure ++ - Gradient icon cards with detailed explanations ++ - Builds user trust and confidence ++ - **NEW: Troubleshooting Section**: Added comprehensive troubleshooting guide ++ - Six common issues with detailed solutions ++ - Color-coded icons for different issue types ++ - Contact information for additional support ++ - Interactive cards with hover effects + ++- **Mouse Position Calculation Bug**: Fixed incorrect mouse position calculation in HomePage.jsx ++ - Previous calculation `(e.clientX / window.innerWidth - 0.5) * 20` produced values in -10 to 10 pixel range ++ - These small/negative values caused incorrect gradient positioning when used in CSS `radial-gradient` ++ - Changed to percentage-based calculation: `(e.clientX / window.innerWidth) * 100` for x and `(e.clientY / window.innerHeight) * 100` for y ++ - Updated gradient to use percentages (`${mousePosition.x}% ${mousePosition.y}%`) instead of pixels ++ - Gradient now correctly follows mouse cursor across entire viewport (0% to 100%) ++ - Fixed backgroundPosition animation to use percentages with proper bounds checking ++ - Eliminates off-screen gradient placement and ensures smooth mouse tracking + ++- **State Update on Unmounted Component**: Fixed memory leak warnings in AuthPage.jsx ++ - Removed `setLoading(false)` calls before `navigate()` in both `handleSignUp` and `handleLogin` ++ - After navigation, component unmounts, causing finally block's `setLoading(false)` to update unmounted component ++ - Now only the finally block handles `setLoading(false)`, preventing state updates on unmounted components ++ - Moved form state resets (`setLoginEmail`, `setLoginPassword`) before navigation to ensure they execute ++ - Eliminates React warnings about memory leaks and state updates on unmounted components + ++- **AuthPage Complete Redesign**: Completely redesigned login/signup page with modern animations ++ - Removed old CSS-based design that had z-index conflicts preventing input clicks ++ - Created new modern design with glassmorphism effects and gradient backgrounds ++ - Added interactive mouse-tracking gradient orbs that follow cursor movement ++ - Implemented smooth form transitions with Framer Motion AnimatePresence ++ - Added animated toggle buttons with layoutId for smooth tab switching ++ - Modern input fields with icons, focus states, and proper z-index hierarchy ++ - Gradient buttons with hover animations and loading states ++ - Animated grid background pattern for depth ++ - Feature pills showcasing key benefits ++ - Fully responsive design for all screen sizes ++ - All input fields now properly clickable and functional ++ - Maintained all original authentication logic and functionality ++ - Added password visibility toggles with eye icons ++ - Username availability indicator with animated icons ++ - Smooth entrance animations for all form elements + ++- **Mouse Position Throttling Logic Bug**: Fixed incorrect throttle timestamp update in RAF callback ++ - `lastUpdateTime` was being updated inside RAF callback, causing continuous unnecessary RAF scheduling ++ - When RAF was scheduled, `lastUpdateTime` remained old, so subsequent mousemove events would see `now - lastUpdateTime < throttleDelay` as true ++ - This caused multiple RAFs to be scheduled unnecessarily, even though `rafId === null` check prevented duplicates ++ - Fixed by updating `lastUpdateTime` immediately when scheduling RAF, not inside the callback ++ - Now subsequent mousemove events correctly see we're still within throttle window ++ - Prevents unnecessary RAF scheduling and improves performance + ++- **Mouse Position Throttling Bug**: Fixed stale mouse position in RAF callback ++ - RAF callback was capturing event coordinates from first mousemove event via closure ++ - When multiple mousemove events fired before RAF executed, it used stale coordinates ++ - Added `latestMousePositionRef` to store latest position, updated on every mousemove ++ - RAF callback now reads from ref at execution time, ensuring latest position is used ++ - Eliminates lag in mouse tracking gradient effect ++ - Mouse tracking now smoothly follows actual cursor movement + ++- **AuthPage Functionality**: Fixed login and signup forms not working properly ++ - Added Font Awesome CDN link to index.html for icon support ++ - Changed button types from "button" to "submit" for proper form submission ++ - Added `onSubmit` handlers to forms instead of `onClick` on buttons ++ - Added form validation with `required` and `minLength` attributes ++ - Added `disabled` state to buttons during loading to prevent multiple submissions ++ - Improved user experience with proper form validation and loading states ++ - Fixed email input types to use `type="email"` for better validation + ++- **AuthPage CSS Overlap Issue**: Fixed login page overlapping HomePage ++ - Scoped all AuthPage CSS classes to `.auth-container` to prevent global style conflicts ++ - Added `isolation: isolate` to create new stacking context for AuthPage ++ - Updated all `.container` references in App.css to `.auth-container` to prevent affecting other pages ++ - Scoped form, input-field, panel, button, and animation styles to AuthPage only ++ - Prevents AuthPage styles from leaking to HomePage and other components ++ - Ensures proper z-index isolation between pages ++ ++- **AnimatedCounter Performance Issue**: Fixed component recreation on every parent re-render ++ - Moved `AnimatedCounter` component outside of `HomePage` to prevent recreation on re-renders ++ - `AnimatedCounter` was being recreated on every `mousePosition` state update, causing unmount/remount cycles ++ - This interrupted animations and canceled pending `requestAnimationFrame` calls ++ - Component is now stable and only re-renders when its own props change ++ - Added `statsInView` as a prop instead of using closure to maintain proper dependency tracking ++ - Optimized mouse position updates with throttling (16ms delay, ~60fps) to reduce unnecessary re-renders ++ - Added `passive: true` to mouse event listener for better performance ++ - Proper cleanup of `requestAnimationFrame` in mouse handler cleanup function ++ ++- **AnimatedCounter Memory Leak**: Fixed memory leak in AnimatedCounter component ++ - Added proper cleanup for `requestAnimationFrame` using `cancelAnimationFrame` ++ - Added `isMountedRef` to prevent state updates on unmounted components ++ - Stored animation frame ID in `animationFrameRef` for proper cancellation ++ - Prevents React warnings about updating state on unmounted components ++ - Eliminates memory leaks when component unmounts during animation ++ ++- **Twitter Icon Import Error**: Fixed import error for Twitter icon ++ - Changed `SiTwitter` to `SiX` from `react-icons/si` (Twitter rebranded to X) ++ - Resolves "does not provide an export named 'SiTwitter'" error ++ - Updated to use correct export name for X/Twitter icon ++ ++### Added - 2024-12-19 ++- **Interactive Home Page**: Completely redesigned landing page with modern animations and investor-friendly content ++ - Hero section with typewriter effect and gradient text animations ++ - Flip words animation for platform names (LinkedIn, GitHub, Instagram, etc.) ++ - Mouse-tracking background effects for interactive experience ++ - Animated scroll indicator with smooth transitions ++ - Platform icons showcase with hover animations ++ - Statistics section with animated counters (10,000+ users, 50,000+ links, 1M+ clicks, 99% uptime) ++ - Interactive feature cards with gradient icons and hover effects ++ - Benefits section for three target audiences (Professionals, Creators, Developers) ++ - Final CTA section with gradient background ++ - Navigation header for non-authenticated users with logo and action buttons ++ - Fully responsive design optimized for mobile, tablet, and desktop devices ++ - Mobile-first approach with breakpoints: sm (640px), md (768px), lg (1024px) ++ - Responsive text sizes: text-2xl sm:text-3xl md:text-4xl lg:text-5xl ++ - Flexible grid layouts: grid-cols-2 md:grid-cols-4 for stats, md:grid-cols-2 lg:grid-cols-3 for features ++ - Responsive padding and spacing: px-4 sm:px-6 lg:px-8, gap-4 sm:gap-6 md:gap-8 ++ - Mobile-optimized buttons: full-width on mobile, auto-width on larger screens ++ - Responsive navigation: logo text hidden on very small screens, compact button sizes ++ - Touch-friendly interactive elements with appropriate sizing for mobile devices ++ - Dark mode support throughout all sections ++ - Smooth scroll animations using Framer Motion ++ - Performance optimized with `useInView` hooks for scroll-triggered animations ++ ++- **Enhanced Typography**: Upgraded font system for better visual appeal ++ - Added Poppins font family for body text (weights 300-900) ++ - Added Montserrat font family for headings (weights 300-900) ++ - Maintained Inter font as fallback ++ - Improved font weights and letter spacing for better readability ++ - Enhanced typography hierarchy across the application ++ ++- **Routing Updates**: Updated App.jsx to use new HomePage as landing page ++ - Changed root route (`/`) to display new interactive HomePage ++ - HomePage now serves as the primary landing experience for non-authenticated users ++ - Maintains existing Documentation page at `/doc` route ++ ++### Changed - 2024-12-19 - **Edit Link Functionality**: Redesigned edit link feature to reuse CreateBridge component - Removed prompt dialog for editing links - Edit button now populates CreateBridge form with existing link data @@ -92,7 +1064,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - "you have no any new clicks" → "You have no new clicks" - "mark as read" → "Mark as Read" - "bridge has been made successfully" → "Bridge has been created successfully" - - "Link Bridger" → "LinkBridger" (consistent branding) + - "Link Bridger" → "All in1 url" (consistent branding) - "No links found. add new link..." → "No links found. Add a new link..." - "Codeforce" → "Codeforces" - Fixed various capitalization and punctuation issues diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 629e490..801f3f5 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,10 +1,14 @@ -FROM node:22-alpine - +# Build stage +FROM node:20-alpine AS builder WORKDIR /app - -COPY package*.json ./ -RUN npm install - +COPY package*.json . +RUN npm ci COPY . . -EXPOSE 5173 -CMD ["npm", "run", "dev", "--", "--host"] \ No newline at end of file +# RUN npm run build + +# Runtime stage +FROM nginx:alpine +COPY dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/frontend/ENV_SETUP.md b/frontend/ENV_SETUP.md new file mode 100644 index 0000000..bd3e414 --- /dev/null +++ b/frontend/ENV_SETUP.md @@ -0,0 +1,95 @@ +# Environment Variables Setup + +## Frontend Environment Variables + +In Vite, environment variables must be prefixed with `VITE_` to be accessible in the frontend code. + +## Required Variables + +### For Production (EC2): + +```bash +# In your .env file or environment +VITE_TIER=prod +VITE_API_URL=https://allin1url.in +``` + +### For Development (Local): + +```bash +# In your .env file or environment +VITE_TIER=dev +VITE_API_URL=http://localhost:8080 +``` + +## How to Set on EC2 + +### Option 1: Environment File + +Create or update `.env` file in the frontend directory: + +```bash +cd frontend +echo "VITE_TIER=prod" >> .env +echo "VITE_API_URL=https://allin1url.in" >> .env +``` + +### Option 2: Docker Environment + +If using Docker, add to `docker-compose.yml`: + +```yaml +frontend: + environment: + - VITE_TIER=prod + - VITE_API_URL=https://allin1url.in +``` + +### Option 3: Build-time Variables + +Set during build: + +```bash +VITE_TIER=prod VITE_API_URL=https://allin1url.in npm run build +``` + +## Verification + +After setting variables, rebuild the frontend: + +```bash +cd frontend +npm run build +``` + +The build will include the environment variables. + +## How It Works + +The `isProduction()` function in `utils.js` checks: +1. `VITE_TIER` environment variable first (explicit override) +2. `import.meta.env.PROD` (Vite's production flag) +3. `VITE_API_URL` containing 'allin1url.in' +4. Current hostname containing 'allin1url.in' + +## Important Notes + +- ⚠️ **Environment variables must be set BEFORE building** +- ⚠️ **Variables must be prefixed with `VITE_`** +- ⚠️ **After changing env vars, rebuild the frontend** +- ⚠️ **Runtime environment variables won't work - they're baked into the build** + +## Quick Fix for EC2 + +```bash +# On EC2, in the frontend directory +echo "VITE_TIER=prod" > .env +echo "VITE_API_URL=https://allin1url.in" >> .env + +# Rebuild +npm run build + +# Restart frontend container +docker-compose restart frontend +``` + diff --git a/frontend/dist/assets/index-BXrOK7sz.css b/frontend/dist/assets/index-BXrOK7sz.css new file mode 100644 index 0000000..85b6d61 --- /dev/null +++ b/frontend/dist/assets/index-BXrOK7sz.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap";@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap";@import"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap";@import"https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap";*{margin:0;padding:0;box-sizing:border-box}body,input{font-family:Poppins,sans-serif}.auth-container,.container.auth-container{position:relative;width:100vw;min-width:100vw;min-height:100vh;overflow:hidden;isolation:isolate}.auth-container .forms-container{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1}.auth-container .signin-signup{position:absolute;top:50%;transform:translate(-50%,-50%);left:75%;width:50%;transition:1s .7s ease-in-out;display:grid;grid-template-columns:1fr;z-index:5}.auth-container form{display:flex;align-items:center;justify-content:center;flex-direction:column;padding:0rem 5rem;transition:all .2s .7s;overflow:hidden;grid-column:1 / 2;grid-row:1 / 2}.auth-container form.sign-up-form{opacity:0;z-index:1}.auth-container form.sign-in-form{z-index:2}.auth-container .title{font-size:2.2rem;color:#444;margin-bottom:10px;transition:color .3s ease}.dark .auth-container .title{color:#fff}.auth-container .input-field{max-width:380px;width:100%;background-color:#fff;margin:10px 0;height:55px;border-radius:55px;display:grid;grid-template-columns:15% 85%;padding:0 .4rem;position:relative;transition:background-color .3s ease}.dark .auth-container .input-field{background-color:#374151}.auth-container .input-field i{text-align:center;line-height:55px;color:#acacac;transition:.5s;font-size:1.1rem}.dark .auth-container .input-field i{color:#9ca3af}.auth-container .input-field input{background:none;outline:none;border:none;line-height:1;font-weight:600;font-size:1.1rem;color:#333;transition:color .3s ease}.dark .auth-container .input-field input{color:#f3f4f6}.auth-container .input-field input::-moz-placeholder{color:#aaa;font-weight:500;-moz-transition:color .3s ease;transition:color .3s ease}.auth-container .input-field input::placeholder{color:#aaa;font-weight:500;transition:color .3s ease}.dark .auth-container .input-field input::-moz-placeholder{color:#9ca3af}.dark .auth-container .input-field input::placeholder{color:#9ca3af}.auth-container .social-text{padding:.7rem 0;font-size:1rem}.auth-container .social-media{display:flex;justify-content:center}.auth-container .social-icon{height:46px;width:46px;display:flex;justify-content:center;align-items:center;margin:0 .45rem;color:#333;border-radius:50%;border:1px solid #333;text-decoration:none;font-size:1.1rem;transition:.3s}.auth-container .social-icon:hover{color:#4481eb;border-color:#4481eb}.auth-container .btn{width:150px;background-color:#5995fd;border:none;outline:none;height:49px;border-radius:49px;color:#fff;text-transform:uppercase;font-weight:600;margin:10px 0;cursor:pointer;transition:.5s}.auth-container .btn:hover{background-color:#4d84e2}.auth-container .panels-container{position:absolute;height:100%;width:100%;top:0;left:0;display:grid;grid-template-columns:repeat(2,1fr);z-index:1}.auth-container:before{content:"";position:absolute;height:2000px;width:2000px;top:-10%;right:48%;transform:translateY(-50%);background-image:linear-gradient(-45deg,#4481eb,#04befe);transition:1.8s ease-in-out;border-radius:50%;z-index:6}.auth-container .image{width:100%;transition:transform 1.1s ease-in-out;transition-delay:.4s}.auth-container .panel{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-around;text-align:center;z-index:6}.auth-container .left-panel{pointer-events:all;padding:3rem 17% 2rem 12%}.auth-container .right-panel{pointer-events:none;padding:3rem 12% 2rem 17%}.auth-container .panel .content{color:#fff;transition:transform .9s ease-in-out;transition-delay:.6s}.auth-container .panel h3{font-weight:600;line-height:1;font-size:1.5rem}.auth-container .panel p{font-size:.95rem;padding:.7rem 0}.auth-container .btn.transparent{margin:0;background:none;border:2px solid #fff;width:130px;height:41px;font-weight:600;font-size:.8rem}.auth-container .right-panel .image,.auth-container .right-panel .content{transform:translate(800px)}.auth-container.sign-up-mode:before{transform:translate(100%,-50%);right:52%}.auth-container.sign-up-mode .left-panel .image,.auth-container.sign-up-mode .left-panel .content{transform:translate(-800px)}.auth-container.sign-up-mode .signin-signup{left:25%}.auth-container.sign-up-mode form.sign-up-form{opacity:1;z-index:2}.auth-container.sign-up-mode form.sign-in-form{opacity:0;z-index:1}.auth-container.sign-up-mode .right-panel .image,.auth-container.sign-up-mode .right-panel .content{transform:translate(0)}.auth-container.sign-up-mode .left-panel{pointer-events:none}.auth-container.sign-up-mode .right-panel{pointer-events:all}@media (max-width: 870px){.auth-container{min-height:800px;height:100vh}.auth-container .signin-signup{width:100%;top:95%;transform:translate(-50%,-100%);transition:1s .8s ease-in-out}.auth-container .signin-signup,.auth-container.sign-up-mode .signin-signup{left:50%}.auth-container .panels-container{grid-template-columns:1fr;grid-template-rows:1fr 2fr 1fr}.auth-container .panel{flex-direction:row;justify-content:space-around;align-items:center;padding:2.5rem 8%;grid-column:1 / 2}.auth-container .right-panel{grid-row:3 / 4}.auth-container .left-panel{grid-row:1 / 2}.auth-container .image{width:200px;transition:transform .9s ease-in-out;transition-delay:.6s}.auth-container .panel .content{padding-right:15%;transition:transform .9s ease-in-out;transition-delay:.8s}.auth-container .panel h3{font-size:1.2rem}.auth-container .panel p{font-size:.7rem;padding:.5rem 0}.auth-container .btn.transparent{width:110px;height:35px;font-size:.7rem}.auth-container:before{width:1500px;height:1500px;transform:translate(-50%);left:30%;bottom:68%;right:initial;top:initial;transition:2s ease-in-out}.auth-container.sign-up-mode:before{transform:translate(-50%,100%);bottom:32%;right:initial}.auth-container.sign-up-mode .left-panel .image,.auth-container.sign-up-mode .left-panel .content{transform:translateY(-300px)}.auth-container.sign-up-mode .right-panel .image,.auth-container.sign-up-mode .right-panel .content{transform:translateY(0)}.auth-container .right-panel .image,.auth-container .right-panel .content{transform:translateY(300px)}.auth-container.sign-up-mode .signin-signup{top:5%;transform:translate(-50%)}}@media (max-width: 570px){.auth-container form{padding:0 1.5rem}.auth-container .image{display:none}.auth-container .panel .content{padding:.5rem 1rem}.auth-container{padding:1.5rem}.auth-container:before{bottom:72%;left:50%}.auth-container.sign-up-mode:before{bottom:28%;left:50%}}.balloon{position:absolute;bottom:-100px;left:calc(100% * var(--random-position));width:40px;height:60px;background-color:var(--random-color);border-radius:50%;opacity:.7;animation:float 10s linear infinite}@keyframes float{0%{transform:translateY(0);opacity:.8}to{transform:translateY(-100vh);opacity:0}}.balloon:after{content:"";position:absolute;bottom:-10px;left:50%;width:2px;height:20px;background-color:#fff;transform:translate(-50%);border-radius:50px}.balloon{--random-color: hsl(calc(360 * var(--random-hue)), 70%, 80%);--random-position: calc(.2 + .6*random()) }*{font-family:Poppins,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{font-family:Poppins,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif;font-weight:400;line-height:1.6;letter-spacing:-.01em}h1,h2,h3,h4,h5,h6{font-family:Montserrat,Poppins,Inter,sans-serif;font-weight:700;line-height:1.2;letter-spacing:-.02em}p{line-height:1.7}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}html{font-size:16px}@media (max-width: 639px){html{font-size:14px}}@media (min-width: 640px) and (max-width: 1023px){html{font-size:15px}}@media (min-width: 1024px){html{font-size:16px}}@media (min-width: 1280px){html{font-size:17px}}.container{width:100%}@media (min-width: 475px){.container{max-width:475px}}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-0\.5{top:-.125rem;right:-.125rem;bottom:-.125rem;left:-.125rem}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.-inset-\[2px\]{top:-2px;right:-2px;bottom:-2px;left:-2px}.inset-0{top:0;right:0;bottom:0;left:0}.-inset-x-10{left:-2.5rem;right:-2.5rem}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.-top-10{top:-2.5rem}.bottom-0{bottom:0}.bottom-1\/3{bottom:33.333333%}.bottom-1\/4{bottom:25%}.bottom-10{bottom:2.5rem}.bottom-4{bottom:1rem}.bottom-8{bottom:2rem}.left-0{left:0}.left-1\/2{left:50%}.left-1\/4{left:25%}.left-12{left:3rem}.left-3{left:.75rem}.left-4{left:1rem}.left-8{left:2rem}.right-0{right:0}.right-1\/4{right:25%}.right-3{right:.75rem}.right-4{right:1rem}.right-8{right:2rem}.top-0{top:0}.top-1\/2{top:50%}.top-1\/3{top:33.333333%}.top-1\/4{top:25%}.top-20{top:5rem}.top-4{top:1rem}.top-6{top:1.5rem}.top-8{top:2rem}.top-full{top:100%}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.z-\[9998\]{z-index:9998}.z-\[999999\]{z-index:999999}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2 / span 2}.m-auto{margin:auto}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mr-16{margin-right:-4rem}.-mt-16{margin-top:-4rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-12{margin-bottom:3rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[120px\]{margin-bottom:120px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[3rem\]{margin-top:3rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-96{height:24rem}.h-\[600px\]{height:600px}.h-\[70px\]{height:70px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[800px\]{max-height:800px}.min-h-\[180px\]{min-height:180px}.min-h-\[400px\]{min-height:400px}.min-h-\[40vh\]{min-height:40vh}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-96{width:24rem}.w-\[4px\]{width:4px}.w-\[8px\]{width:8px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.min-w-\[80px\]{min-width:80px}.min-w-\[90px\]{min-width:90px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-48{max-width:12rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[120px\]{max-width:120px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.origin-top-left{transform-origin:top left}.origin-top-right{transform-origin:top right}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\[1\.01\]{--tw-scale-x: 1.01;--tw-scale-y: 1.01;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\[1\.02\]{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-0{--tw-scale-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[2\.5rem\]{border-radius:2.5rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b-2xl{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-b-4{border-bottom-width:4px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.border-blue-300\/50{border-color:#93c5fd80}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-blue-500\/30{border-color:#3b82f64d}.border-cyan-500\/30{border-color:#06b6d44d}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-200\/50{border-color:#e5e7eb80}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-600\/30{border-color:#4b55634d}.border-gray-600\/50{border-color:#4b556380}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-700\/30{border-color:#3741514d}.border-gray-700\/50{border-color:#37415180}.border-gray-900{--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity))}.border-green-500\/30{border-color:#22c55e4d}.border-pink-500\/30{border-color:#ec48994d}.border-purple-200\/50{border-color:#e9d5ff80}.border-purple-400{--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity))}.border-purple-400\/20{border-color:#c084fc33}.border-purple-400\/30{border-color:#c084fc4d}.border-purple-500{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity))}.border-purple-500\/20{border-color:#a855f733}.border-purple-500\/30{border-color:#a855f74d}.border-purple-500\/50{border-color:#a855f780}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(147 51 234 / var(--tw-border-opacity))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-slate-600\/50{border-color:#47556980}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-white\/10{border-color:#ffffff1a}.border-white\/20{border-color:#fff3}.border-white\/\[0\.08\]{border-color:#ffffff14}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity))}.border-yellow-400\/50{border-color:#facc1580}.\!border-l-purple-500{--tw-border-opacity: 1 !important;border-left-color:rgb(168 85 247 / var(--tw-border-opacity))!important}.border-t-purple-500{--tw-border-opacity: 1;border-top-color:rgb(168 85 247 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[\#1d1c20\]{--tw-bg-opacity: 1;background-color:rgb(29 28 32 / var(--tw-bg-opacity))}.bg-\[\#323238\]{--tw-bg-opacity: 1;background-color:rgb(50 50 56 / var(--tw-bg-opacity))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/20{background-color:#0003}.bg-black\/5{background-color:#0000000d}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-blue-100\/80{background-color:#dbeafecc}.bg-blue-400\/30{background-color:#60a5fa4d}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-500\/30{background-color:#3b82f64d}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-cyan-400\/30{background-color:#22d3ee4d}.bg-cyan-500\/10{background-color:#06b6d41a}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-700\/30{background-color:#3741514d}.bg-gray-700\/50{background-color:#37415180}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-800\/40{background-color:#1f293766}.bg-gray-800\/50{background-color:#1f293780}.bg-gray-800\/95{background-color:#1f2937f2}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.bg-green-500\/20{background-color:#22c55e33}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.bg-pink-400\/30{background-color:#f472b64d}.bg-pink-500\/10{background-color:#ec48991a}.bg-pink-500\/20{background-color:#ec489933}.bg-pink-500\/30{background-color:#ec48994d}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity))}.bg-purple-400\/20{background-color:#c084fc33}.bg-purple-400\/30{background-color:#c084fc4d}.bg-purple-400\/40{background-color:#c084fc66}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity))}.bg-purple-500\/10{background-color:#a855f71a}.bg-purple-500\/20{background-color:#a855f733}.bg-purple-500\/30{background-color:#a855f74d}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(147 51 234 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-rose-500\/10{background-color:#f43f5e1a}.bg-slate-700\/50{background-color:#33415580}.bg-transparent{background-color:transparent}.bg-violet-500\/10{background-color:#8b5cf61a}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-white\/5{background-color:#ffffff0d}.bg-white\/80{background-color:#fffc}.bg-white\/90{background-color:#ffffffe6}.bg-white\/95{background-color:#fffffff2}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-opacity-10{--tw-bg-opacity: .1}.bg-\[linear-gradient\(to_right\,\#80808008_1px\,transparent_1px\)\,linear-gradient\(to_bottom\,\#80808008_1px\,transparent_1px\)\]{background-image:linear-gradient(to right,#80808008 1px,transparent 1px),linear-gradient(to bottom,#80808008 1px,transparent 1px)}.bg-\[linear-gradient\(to_right\,\#80808012_1px\,transparent_1px\)\,linear-gradient\(to_bottom\,\#80808012_1px\,transparent_1px\)\]{background-image:linear-gradient(to right,#80808012 1px,transparent 1px),linear-gradient(to bottom,#80808012 1px,transparent 1px)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-blue-400{--tw-gradient-from: #60a5fa var(--tw-gradient-from-position);--tw-gradient-to: rgb(96 165 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-50{--tw-gradient-from: #eff6ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 246 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-50\/80{--tw-gradient-from: rgb(239 246 255 / .8) var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 246 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from: #2563eb var(--tw-gradient-from-position);--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-600\/10{--tw-gradient-from: rgb(37 99 235 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-400{--tw-gradient-from: #9ca3af var(--tw-gradient-from-position);--tw-gradient-to: rgb(156 163 175 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-500{--tw-gradient-from: #6b7280 var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 114 128 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-600{--tw-gradient-from: #4b5563 var(--tw-gradient-from-position);--tw-gradient-to: rgb(75 85 99 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #4ade80 var(--tw-gradient-from-position);--tw-gradient-to: rgb(74 222 128 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #22c55e var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-600{--tw-gradient-from: #16a34a var(--tw-gradient-from-position);--tw-gradient-to: rgb(22 163 74 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-600\/10{--tw-gradient-from: rgb(22 163 74 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(22 163 74 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-400{--tw-gradient-from: #fb923c var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 146 60 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500{--tw-gradient-from: #f97316 var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-200{--tw-gradient-from: #fbcfe8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 207 232 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-600{--tw-gradient-from: #db2777 var(--tw-gradient-from-position);--tw-gradient-to: rgb(219 39 119 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-300{--tw-gradient-from: #d8b4fe var(--tw-gradient-from-position);--tw-gradient-to: rgb(216 180 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400{--tw-gradient-from: #c084fc var(--tw-gradient-from-position);--tw-gradient-to: rgb(192 132 252 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/20{--tw-gradient-from: rgb(192 132 252 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(192 132 252 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-50\/60{--tw-gradient-from: rgb(250 245 255 / .6) var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 245 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-50\/80{--tw-gradient-from: rgb(250 245 255 / .8) var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 245 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #a855f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500\/10{--tw-gradient-from: rgb(168 85 247 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500\/20{--tw-gradient-from: rgb(168 85 247 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500\/30{--tw-gradient-from: rgb(168 85 247 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500\/5{--tw-gradient-from: rgb(168 85 247 / .05) var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500\/50{--tw-gradient-from: rgb(168 85 247 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #9333ea var(--tw-gradient-from-position);--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600\/10{--tw-gradient-from: rgb(147 51 234 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600\/20{--tw-gradient-from: rgb(147 51 234 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600\/30{--tw-gradient-from: rgb(147 51 234 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-900\/40{--tw-gradient-from: rgb(88 28 135 / .4) var(--tw-gradient-from-position);--tw-gradient-to: rgb(88 28 135 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-950\/10{--tw-gradient-from: rgb(59 7 100 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 7 100 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-600{--tw-gradient-from: #dc2626 var(--tw-gradient-from-position);--tw-gradient-to: rgb(220 38 38 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-100{--tw-gradient-from: #f1f5f9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(241 245 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-50{--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: rgb(248 250 252 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-500{--tw-gradient-from: #64748b var(--tw-gradient-from-position);--tw-gradient-to: rgb(100 116 139 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-800\/95{--tw-gradient-from: rgb(30 41 59 / .95) var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 41 59 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-900{--tw-gradient-from: #0f172a var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #14b8a6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(20 184 166 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from: #8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-400{--tw-gradient-from: #facc15 var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-50\/50{--tw-gradient-from: rgb(254 252 232 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 252 232 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-500{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-600{--tw-gradient-from: #ca8a04 var(--tw-gradient-from-position);--tw-gradient-to: rgb(202 138 4 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blue-50{--tw-gradient-to: rgb(239 246 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #eff6ff var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-indigo-500{--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #6366f1 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-100{--tw-gradient-to: rgb(236 252 203 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ecfccb var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-neutral-800{--tw-gradient-to: rgb(38 38 38 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #262626 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-orange-50\/50{--tw-gradient-to: rgb(255 247 237 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 247 237 / .5) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-300{--tw-gradient-to: rgb(249 168 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #f9a8d4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-400{--tw-gradient-to: rgb(244 114 182 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #f472b6 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-400\/20{--tw-gradient-to: rgb(244 114 182 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(244 114 182 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-50\/60{--tw-gradient-to: rgb(253 242 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(253 242 248 / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-50\/80{--tw-gradient-to: rgb(253 242 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(253 242 248 / .8) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-500{--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ec4899 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-500\/10{--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(236 72 153 / .1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-500\/20{--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(236 72 153 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(219 39 119 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #db2777 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600\/10{--tw-gradient-to: rgb(219 39 119 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(219 39 119 / .1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600\/20{--tw-gradient-to: rgb(219 39 119 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(219 39 119 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600\/30{--tw-gradient-to: rgb(219 39 119 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(219 39 119 / .3) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-900\/40{--tw-gradient-to: rgb(131 24 67 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(131 24 67 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-950\/10{--tw-gradient-to: rgb(80 7 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(80 7 36 / .1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-50\/80{--tw-gradient-to: rgb(250 245 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(250 245 255 / .8) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-500{--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #a855f7 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #9333ea var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-900{--tw-gradient-to: rgb(88 28 135 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #581c87 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-sky-200{--tw-gradient-to: rgb(186 230 253 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #bae6fd var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-slate-700\/95{--tw-gradient-to: rgb(51 65 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(51 65 85 / .95) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-violet-200{--tw-gradient-to: rgb(221 214 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ddd6fe var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fff var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white\/10{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / .1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white\/20{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white\/30{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / .3) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white\/40{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-blue-300{--tw-gradient-to: #93c5fd var(--tw-gradient-to-position)}.to-blue-400{--tw-gradient-to: #60a5fa var(--tw-gradient-to-position)}.to-blue-400\/20{--tw-gradient-to: rgb(96 165 250 / .2) var(--tw-gradient-to-position)}.to-blue-50\/60{--tw-gradient-to: rgb(239 246 255 / .6) var(--tw-gradient-to-position)}.to-blue-50\/80{--tw-gradient-to: rgb(239 246 255 / .8) var(--tw-gradient-to-position)}.to-blue-500{--tw-gradient-to: #3b82f6 var(--tw-gradient-to-position)}.to-blue-500\/10{--tw-gradient-to: rgb(59 130 246 / .1) var(--tw-gradient-to-position)}.to-blue-500\/20{--tw-gradient-to: rgb(59 130 246 / .2) var(--tw-gradient-to-position)}.to-blue-500\/5{--tw-gradient-to: rgb(59 130 246 / .05) var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #2563eb var(--tw-gradient-to-position)}.to-blue-600\/10{--tw-gradient-to: rgb(37 99 235 / .1) var(--tw-gradient-to-position)}.to-blue-600\/20{--tw-gradient-to: rgb(37 99 235 / .2) var(--tw-gradient-to-position)}.to-blue-600\/30{--tw-gradient-to: rgb(37 99 235 / .3) var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.to-blue-900\/40{--tw-gradient-to: rgb(30 58 138 / .4) var(--tw-gradient-to-position)}.to-blue-950\/10{--tw-gradient-to: rgb(23 37 84 / .1) var(--tw-gradient-to-position)}.to-cyan-500{--tw-gradient-to: #06b6d4 var(--tw-gradient-to-position)}.to-cyan-600{--tw-gradient-to: #0891b2 var(--tw-gradient-to-position)}.to-cyan-600\/10{--tw-gradient-to: rgb(8 145 178 / .1) var(--tw-gradient-to-position)}.to-emerald-400{--tw-gradient-to: #34d399 var(--tw-gradient-to-position)}.to-emerald-500{--tw-gradient-to: #10b981 var(--tw-gradient-to-position)}.to-emerald-600{--tw-gradient-to: #059669 var(--tw-gradient-to-position)}.to-emerald-600\/10{--tw-gradient-to: rgb(5 150 105 / .1) var(--tw-gradient-to-position)}.to-gray-600{--tw-gradient-to: #4b5563 var(--tw-gradient-to-position)}.to-gray-800{--tw-gradient-to: #1f2937 var(--tw-gradient-to-position)}.to-green-600{--tw-gradient-to: #16a34a var(--tw-gradient-to-position)}.to-neutral-300{--tw-gradient-to: #d4d4d4 var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #fb923c var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.to-orange-600{--tw-gradient-to: #ea580c var(--tw-gradient-to-position)}.to-pink-400{--tw-gradient-to: #f472b6 var(--tw-gradient-to-position)}.to-pink-50\/80{--tw-gradient-to: rgb(253 242 248 / .8) var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #ec4899 var(--tw-gradient-to-position)}.to-pink-500\/20{--tw-gradient-to: rgb(236 72 153 / .2) var(--tw-gradient-to-position)}.to-pink-500\/30{--tw-gradient-to: rgb(236 72 153 / .3) var(--tw-gradient-to-position)}.to-pink-500\/50{--tw-gradient-to: rgb(236 72 153 / .5) var(--tw-gradient-to-position)}.to-pink-600{--tw-gradient-to: #db2777 var(--tw-gradient-to-position)}.to-pink-600\/10{--tw-gradient-to: rgb(219 39 119 / .1) var(--tw-gradient-to-position)}.to-pink-600\/20{--tw-gradient-to: rgb(219 39 119 / .2) var(--tw-gradient-to-position)}.to-purple-50{--tw-gradient-to: #faf5ff var(--tw-gradient-to-position)}.to-purple-500{--tw-gradient-to: #a855f7 var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #9333ea var(--tw-gradient-to-position)}.to-red-400{--tw-gradient-to: #f87171 var(--tw-gradient-to-position)}.to-red-50\/50{--tw-gradient-to: rgb(254 242 242 / .5) var(--tw-gradient-to-position)}.to-red-500{--tw-gradient-to: #ef4444 var(--tw-gradient-to-position)}.to-red-600{--tw-gradient-to: #dc2626 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #b91c1c var(--tw-gradient-to-position)}.to-rose-500{--tw-gradient-to: #f43f5e var(--tw-gradient-to-position)}.to-sky-200{--tw-gradient-to: #bae6fd var(--tw-gradient-to-position)}.to-slate-100{--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position)}.to-slate-800\/95{--tw-gradient-to: rgb(30 41 59 / .95) var(--tw-gradient-to-position)}.to-slate-900{--tw-gradient-to: #0f172a var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-500{--tw-gradient-to: #eab308 var(--tw-gradient-to-position)}.bg-\[size\:24px_24px\]{background-size:24px 24px}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-no-repeat{background-repeat:no-repeat}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[2px\]{padding:2px}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-12{padding-bottom:3rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-9{padding-bottom:2.25rem}.pl-10{padding-left:2.5rem}.pl-12{padding-left:3rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-10{padding-top:2.5rem}.pt-12{padding-top:3rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-20{padding-top:5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-extralight{font-weight:200}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-8{line-height:2rem}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#a9a9a9\]{--tw-text-opacity: 1;color:rgb(169 169 169 / var(--tw-text-opacity))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-500\/40{color:#3b82f666}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-600\/80{color:#2563ebcc}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-neutral-900{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.text-pink-400{--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(236 72 153 / var(--tw-text-opacity))}.text-pink-500\/40{color:#ec489966}.text-pink-600{--tw-text-opacity: 1;color:rgb(219 39 119 / var(--tw-text-opacity))}.text-purple-200{--tw-text-opacity: 1;color:rgb(233 213 255 / var(--tw-text-opacity))}.text-purple-300{--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity))}.text-purple-500\/40{color:#a855f766}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white\/50{color:#ffffff80}.text-white\/80{color:#fffc}.text-white\/90{color:#ffffffe6}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.decoration-purple-400\/50{text-decoration-color:#c084fc80}.decoration-2{text-decoration-thickness:2px}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-15{opacity:.15}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-purple-500\/20{--tw-shadow-color: rgb(168 85 247 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(168 85 247 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(96 165 250 / var(--tw-ring-opacity))}.ring-blue-700{--tw-ring-opacity: 1;--tw-ring-color: rgb(29 78 216 / var(--tw-ring-opacity))}.ring-purple-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(168 85 247 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-2xl{--tw-blur: blur(40px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-lg{--tw-blur: blur(16px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-md{--tw-blur: blur(12px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-sm{--tw-blur: blur(4px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-xl{--tw-blur: blur(24px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.brightness-0{--tw-brightness: brightness(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-transform{will-change:transform}.scroll-smooth{scroll-behavior:smooth}.custom-scrollbar::-webkit-scrollbar{width:8px}.custom-scrollbar::-webkit-scrollbar-track{background:#0000000d;border-radius:10px}.dark .custom-scrollbar::-webkit-scrollbar-track{background:#ffffff0d}.custom-scrollbar::-webkit-scrollbar-thumb{background:#9333ea4d;border-radius:10px}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#9333ea80}.dark .custom-scrollbar::-webkit-scrollbar-thumb{background:#a855f766}.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#a855f799}.\[mask-image\:linear-gradient\(to_bottom\,transparent\,white\,transparent\)\]{-webkit-mask-image:linear-gradient(to bottom,transparent,white,transparent);mask-image:linear-gradient(to bottom,transparent,white,transparent)}.\[mask-image\:radial-gradient\(ellipse_80\%_50\%_at_50\%_0\%\,\#000_70\%\,transparent_110\%\)\]{-webkit-mask-image:radial-gradient(ellipse 80% 50% at 50% 0%,#000 70%,transparent 110%);mask-image:radial-gradient(ellipse 80% 50% at 50% 0%,#000 70%,transparent 110%)}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.01\]:hover{--tw-scale-x: 1.01;--tw-scale-y: 1.01;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.02\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-l-4:hover{border-left-width:4px}.hover\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.hover\:border-purple-300\/80:hover{border-color:#d8b4fecc}.hover\:border-purple-400:hover{--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity))}.hover\:border-purple-400\/50:hover{border-color:#c084fc80}.hover\:border-purple-500:hover{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity))}.hover\:border-white\/20:hover{border-color:#fff3}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-500:hover{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.hover\:bg-gray-500\/20:hover{background-color:#6b728033}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.hover\:bg-gray-700\/40:hover{background-color:#37415166}.hover\:bg-gray-800\/70:hover{background-color:#1f2937b3}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.hover\:bg-purple-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity))}.hover\:bg-purple-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity))}.hover\:bg-purple-500\/30:hover{background-color:#a855f74d}.hover\:bg-purple-700:hover{--tw-bg-opacity: 1;background-color:rgb(126 34 206 / var(--tw-bg-opacity))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/15:hover{background-color:#ffffff26}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:from-blue-700:hover{--tw-gradient-from: #1d4ed8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(29 78 216 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-green-700:hover{--tw-gradient-from: #15803d var(--tw-gradient-from-position);--tw-gradient-to: rgb(21 128 61 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-pink-700:hover{--tw-gradient-from: #be185d var(--tw-gradient-from-position);--tw-gradient-to: rgb(190 24 93 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-purple-300:hover{--tw-gradient-from: #d8b4fe var(--tw-gradient-from-position);--tw-gradient-to: rgb(216 180 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-purple-600:hover{--tw-gradient-from: #9333ea var(--tw-gradient-from-position);--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-purple-600\/30:hover{--tw-gradient-from: rgb(147 51 234 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(147 51 234 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-purple-700:hover{--tw-gradient-from: #7e22ce var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 34 206 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-red-700:hover{--tw-gradient-from: #b91c1c var(--tw-gradient-from-position);--tw-gradient-to: rgb(185 28 28 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-yellow-600:hover{--tw-gradient-from: #ca8a04 var(--tw-gradient-from-position);--tw-gradient-to: rgb(202 138 4 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:via-pink-600\/30:hover{--tw-gradient-to: rgb(219 39 119 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(219 39 119 / .3) var(--tw-gradient-via-position), var(--tw-gradient-to)}.hover\:via-pink-700:hover{--tw-gradient-to: rgb(190 24 93 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #be185d var(--tw-gradient-via-position), var(--tw-gradient-to)}.hover\:via-purple-700:hover{--tw-gradient-to: rgb(126 34 206 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7e22ce var(--tw-gradient-via-position), var(--tw-gradient-to)}.hover\:to-blue-600\/30:hover{--tw-gradient-to: rgb(37 99 235 / .3) var(--tw-gradient-to-position)}.hover\:to-blue-700:hover{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.hover\:to-cyan-700:hover{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.hover\:to-emerald-700:hover{--tw-gradient-to: #047857 var(--tw-gradient-to-position)}.hover\:to-orange-600:hover{--tw-gradient-to: #ea580c var(--tw-gradient-to-position)}.hover\:to-pink-300:hover{--tw-gradient-to: #f9a8d4 var(--tw-gradient-to-position)}.hover\:to-pink-600:hover{--tw-gradient-to: #db2777 var(--tw-gradient-to-position)}.hover\:to-pink-700:hover{--tw-gradient-to: #be185d var(--tw-gradient-to-position)}.hover\:to-purple-700:hover{--tw-gradient-to: #7e22ce var(--tw-gradient-to-position)}.hover\:to-red-800:hover{--tw-gradient-to: #991b1b var(--tw-gradient-to-position)}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity))}.hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.hover\:text-cyan-400:hover{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-pink-500:hover{--tw-text-opacity: 1;color:rgb(236 72 153 / var(--tw-text-opacity))}.hover\:text-purple-200:hover{--tw-text-opacity: 1;color:rgb(233 213 255 / var(--tw-text-opacity))}.hover\:text-purple-300:hover{--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity))}.hover\:text-purple-400:hover{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}.hover\:text-purple-600:hover{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity))}.hover\:text-purple-900:hover{--tw-text-opacity: 1;color:rgb(88 28 135 / var(--tw-text-opacity))}.hover\:text-red-200:hover{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-purple-400:hover{text-decoration-color:#c084fc}.hover\:opacity-20:hover{opacity:.2}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-purple-500\/20:hover{--tw-shadow-color: rgb(168 85 247 / .2);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-purple-500\/50:hover{--tw-shadow-color: rgb(168 85 247 / .5);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-white\/50:hover{--tw-shadow-color: rgb(255 255 255 / .5);--tw-shadow: var(--tw-shadow-colored)}.hover\:drop-shadow-lg:hover{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:border-purple-500:focus{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.focus\:border-transparent:focus{border-color:transparent}.focus\:bg-gray-50:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-pink-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(236 72 153 / var(--tw-ring-opacity))}.focus\:ring-purple-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(168 85 247 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:ring-offset-transparent:focus{--tw-ring-offset-color: transparent}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.98\]:active{--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:focus-within .group-focus-within\:text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.group:focus-within .group-focus-within\:text-pink-600{--tw-text-opacity: 1;color:rgb(219 39 119 / var(--tw-text-opacity))}.group:focus-within .group-focus-within\:text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}.group:focus-within .group-focus-within\:text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity))}.group:hover .group-hover\:-translate-x-1{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-x-100{--tw-scale-x: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-purple-400\/50{border-color:#c084fc80}.group\/item:hover .group-hover\/item\:text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.group\/item:hover .group-hover\/item\:text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity))}.group:hover .group-hover\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.group:hover .group-hover\:text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity))}.group:hover .group-hover\:text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group\/item:hover .group-hover\/item\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-10{opacity:.1}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-20{opacity:.2}.group:hover .group-hover\:opacity-50{opacity:.5}.group:hover .group-hover\:opacity-60{opacity:.6}.dark\:block:is(.dark *){display:block}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\:border-amber-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity))}.dark\:border-blue-400\/20:is(.dark *){border-color:#60a5fa33}.dark\:border-blue-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.dark\:border-blue-600\/50:is(.dark *){border-color:#2563eb80}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-700\/30:is(.dark *){border-color:#3741514d}.dark\:border-gray-700\/50:is(.dark *){border-color:#37415180}.dark\:border-gray-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900\/50:is(.dark *){border-color:#11182780}.dark\:border-green-400\/20:is(.dark *){border-color:#4ade8033}.dark\:border-green-500\/20:is(.dark *){border-color:#22c55e33}.dark\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity))}.dark\:border-purple-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity))}.dark\:border-purple-400\/20:is(.dark *){border-color:#c084fc33}.dark\:border-purple-400\/30:is(.dark *){border-color:#c084fc4d}.dark\:border-purple-400\/50:is(.dark *){border-color:#c084fc80}.dark\:border-purple-600\/30:is(.dark *){border-color:#9333ea4d}.dark\:border-red-500\/20:is(.dark *){border-color:#ef444433}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity))}.dark\:border-slate-700\/50:is(.dark *){border-color:#33415580}.dark\:border-white\/10:is(.dark *){border-color:#ffffff1a}.dark\:border-white\/20:is(.dark *){border-color:#fff3}.dark\:border-yellow-400\/30:is(.dark *){border-color:#facc154d}.dark\:border-yellow-500\/50:is(.dark *){border-color:#eab30880}.dark\:bg-amber-900\/20:is(.dark *){background-color:#78350f33}.dark\:bg-black:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-black\/20:is(.dark *){background-color:#0003}.dark\:bg-black\/80:is(.dark *){background-color:#000c}.dark\:bg-blue-500\/10:is(.dark *){background-color:#3b82f61a}.dark\:bg-blue-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.dark\:bg-blue-900\/10:is(.dark *){background-color:#1e3a8a1a}.dark\:bg-blue-900\/20:is(.dark *){background-color:#1e3a8a33}.dark\:bg-blue-900\/30:is(.dark *){background-color:#1e3a8a4d}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-gray-700\/50:is(.dark *){background-color:#37415180}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-800\/20:is(.dark *){background-color:#1f293733}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-gray-800\/80:is(.dark *){background-color:#1f2937cc}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-gray-900\/50:is(.dark *){background-color:#11182780}.dark\:bg-gray-900\/80:is(.dark *){background-color:#111827cc}.dark\:bg-gray-900\/90:is(.dark *){background-color:#111827e6}.dark\:bg-gray-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.dark\:bg-green-500\/10:is(.dark *){background-color:#22c55e1a}.dark\:bg-green-900\/20:is(.dark *){background-color:#14532d33}.dark\:bg-pink-500\/10:is(.dark *){background-color:#ec48991a}.dark\:bg-purple-300\/40:is(.dark *){background-color:#d8b4fe66}.dark\:bg-purple-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity))}.dark\:bg-purple-400\/30:is(.dark *){background-color:#c084fc4d}.dark\:bg-purple-500\/10:is(.dark *){background-color:#a855f71a}.dark\:bg-purple-500\/20:is(.dark *){background-color:#a855f733}.dark\:bg-purple-500\/30:is(.dark *){background-color:#a855f74d}.dark\:bg-purple-900\/20:is(.dark *){background-color:#581c8733}.dark\:bg-purple-900\/30:is(.dark *){background-color:#581c874d}.dark\:bg-purple-900\/50:is(.dark *){background-color:#581c8780}.dark\:bg-red-500\/10:is(.dark *){background-color:#ef44441a}.dark\:bg-red-900\/20:is(.dark *){background-color:#7f1d1d33}.dark\:bg-slate-800\/50:is(.dark *){background-color:#1e293b80}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-yellow-500\/20:is(.dark *){background-color:#eab30833}.dark\:bg-yellow-900\/20:is(.dark *){background-color:#713f1233}.dark\:bg-gradient-to-br:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.dark\:bg-gradient-to-r:is(.dark *){background-image:linear-gradient(to right,var(--tw-gradient-stops))}.dark\:from-blue-300:is(.dark *){--tw-gradient-from: #93c5fd var(--tw-gradient-from-position);--tw-gradient-to: rgb(147 197 253 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-blue-400:is(.dark *){--tw-gradient-from: #60a5fa var(--tw-gradient-from-position);--tw-gradient-to: rgb(96 165 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-gray-800\/80:is(.dark *){--tw-gradient-from: rgb(31 41 55 / .8) var(--tw-gradient-from-position);--tw-gradient-to: rgb(31 41 55 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-gray-900:is(.dark *){--tw-gradient-from: #111827 var(--tw-gradient-from-position);--tw-gradient-to: rgb(17 24 39 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-gray-950:is(.dark *){--tw-gradient-from: #030712 var(--tw-gradient-from-position);--tw-gradient-to: rgb(3 7 18 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-purple-200:is(.dark *){--tw-gradient-from: #e9d5ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(233 213 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-purple-300:is(.dark *){--tw-gradient-from: #d8b4fe var(--tw-gradient-from-position);--tw-gradient-to: rgb(216 180 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-purple-400:is(.dark *){--tw-gradient-from: #c084fc var(--tw-gradient-from-position);--tw-gradient-to: rgb(192 132 252 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-from: rgb(168 85 247 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-purple-500\/30:is(.dark *){--tw-gradient-from: rgb(168 85 247 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-purple-950\/15:is(.dark *){--tw-gradient-from: rgb(59 7 100 / .15) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 7 100 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-purple-950\/40:is(.dark *){--tw-gradient-from: rgb(59 7 100 / .4) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 7 100 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-purple-950\/60:is(.dark *){--tw-gradient-from: rgb(59 7 100 / .6) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 7 100 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-slate-900:is(.dark *){--tw-gradient-from: #0f172a var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-slate-900\/60:is(.dark *){--tw-gradient-from: rgb(15 23 42 / .6) var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-slate-900\/95:is(.dark *){--tw-gradient-from: rgb(15 23 42 / .95) var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-yellow-400:is(.dark *){--tw-gradient-from: #facc15 var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-yellow-600\/10:is(.dark *){--tw-gradient-from: rgb(202 138 4 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(202 138 4 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:via-gray-800:is(.dark *){--tw-gradient-to: rgb(31 41 55 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1f2937 var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-gray-900\/80:is(.dark *){--tw-gradient-to: rgb(17 24 39 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(17 24 39 / .8) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-orange-600\/10:is(.dark *){--tw-gradient-to: rgb(234 88 12 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(234 88 12 / .1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-pink-200:is(.dark *){--tw-gradient-to: rgb(251 207 232 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fbcfe8 var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-pink-300:is(.dark *){--tw-gradient-to: rgb(249 168 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #f9a8d4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-pink-400:is(.dark *){--tw-gradient-to: rgb(244 114 182 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #f472b6 var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-pink-500\/20:is(.dark *){--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(236 72 153 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-pink-500\/30:is(.dark *){--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(236 72 153 / .3) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-pink-950\/15:is(.dark *){--tw-gradient-to: rgb(80 7 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(80 7 36 / .15) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-pink-950\/60:is(.dark *){--tw-gradient-to: rgb(80 7 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(80 7 36 / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-purple-300:is(.dark *){--tw-gradient-to: rgb(216 180 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #d8b4fe var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-purple-400:is(.dark *){--tw-gradient-to: rgb(192 132 252 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #c084fc var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-purple-900:is(.dark *){--tw-gradient-to: rgb(88 28 135 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #581c87 var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-purple-950:is(.dark *){--tw-gradient-to: rgb(59 7 100 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #3b0764 var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-purple-950\/40:is(.dark *){--tw-gradient-to: rgb(59 7 100 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(59 7 100 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-slate-800\/95:is(.dark *){--tw-gradient-to: rgb(30 41 59 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(30 41 59 / .95) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-slate-900\/60:is(.dark *){--tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(15 23 42 / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:via-violet-100:is(.dark *){--tw-gradient-to: rgb(237 233 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ede9fe var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:to-blue-200:is(.dark *){--tw-gradient-to: #bfdbfe var(--tw-gradient-to-position)}.dark\:to-blue-300:is(.dark *){--tw-gradient-to: #93c5fd var(--tw-gradient-to-position)}.dark\:to-blue-400:is(.dark *){--tw-gradient-to: #60a5fa var(--tw-gradient-to-position)}.dark\:to-blue-500\/20:is(.dark *){--tw-gradient-to: rgb(59 130 246 / .2) var(--tw-gradient-to-position)}.dark\:to-blue-500\/30:is(.dark *){--tw-gradient-to: rgb(59 130 246 / .3) var(--tw-gradient-to-position)}.dark\:to-blue-950\/15:is(.dark *){--tw-gradient-to: rgb(23 37 84 / .15) var(--tw-gradient-to-position)}.dark\:to-blue-950\/40:is(.dark *){--tw-gradient-to: rgb(23 37 84 / .4) var(--tw-gradient-to-position)}.dark\:to-blue-950\/60:is(.dark *){--tw-gradient-to: rgb(23 37 84 / .6) var(--tw-gradient-to-position)}.dark\:to-gray-800\/80:is(.dark *){--tw-gradient-to: rgb(31 41 55 / .8) var(--tw-gradient-to-position)}.dark\:to-gray-900:is(.dark *){--tw-gradient-to: #111827 var(--tw-gradient-to-position)}.dark\:to-gray-950:is(.dark *){--tw-gradient-to: #030712 var(--tw-gradient-to-position)}.dark\:to-orange-400:is(.dark *){--tw-gradient-to: #fb923c var(--tw-gradient-to-position)}.dark\:to-pink-300:is(.dark *){--tw-gradient-to: #f9a8d4 var(--tw-gradient-to-position)}.dark\:to-pink-400:is(.dark *){--tw-gradient-to: #f472b6 var(--tw-gradient-to-position)}.dark\:to-pink-950\/40:is(.dark *){--tw-gradient-to: rgb(80 7 36 / .4) var(--tw-gradient-to-position)}.dark\:to-red-600\/10:is(.dark *){--tw-gradient-to: rgb(220 38 38 / .1) var(--tw-gradient-to-position)}.dark\:to-slate-900:is(.dark *){--tw-gradient-to: #0f172a var(--tw-gradient-to-position)}.dark\:to-slate-900\/95:is(.dark *){--tw-gradient-to: rgb(15 23 42 / .95) var(--tw-gradient-to-position)}.dark\:bg-clip-text:is(.dark *){-webkit-background-clip:text;background-clip:text}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity))}.dark\:text-blue-300\/80:is(.dark *){color:#93c5fdcc}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.dark\:text-blue-400\/30:is(.dark *){color:#60a5fa4d}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity))}.dark\:text-neutral-100:is(.dark *){--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity))}.dark\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity))}.dark\:text-pink-400\/30:is(.dark *){color:#f472b64d}.dark\:text-purple-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 232 255 / var(--tw-text-opacity))}.dark\:text-purple-200:is(.dark *){--tw-text-opacity: 1;color:rgb(233 213 255 / var(--tw-text-opacity))}.dark\:text-purple-300:is(.dark *){--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}.dark\:text-purple-400\/30:is(.dark *){color:#c084fc4d}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.dark\:text-transparent:is(.dark *){color:transparent}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.dark\:opacity-30:is(.dark *){opacity:.3}.dark\:opacity-40:is(.dark *){opacity:.4}.dark\:opacity-70:is(.dark *){opacity:.7}.dark\:shadow-\[0_0_10px_rgba\(236\,72\,153\,0\.5\)\]:is(.dark *){--tw-shadow: 0 0 10px rgba(236,72,153,.5);--tw-shadow-colored: 0 0 10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:shadow-\[0_0_20px_rgba\(147\,51\,234\,0\.15\)\]:is(.dark *){--tw-shadow: 0 0 20px rgba(147,51,234,.15);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:ring-blue-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.dark\:brightness-100:is(.dark *){--tw-brightness: brightness(1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.dark\:brightness-90:is(.dark *){--tw-brightness: brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.dark\:drop-shadow-\[0_0_12px_rgba\(147\,51\,234\,0\.4\)\]:is(.dark *){--tw-drop-shadow: drop-shadow(0 0 12px rgba(147,51,234,.4));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.dark\:drop-shadow-\[0_0_8px_rgba\(147\,51\,234\,0\.5\)\]:is(.dark *){--tw-drop-shadow: drop-shadow(0 0 8px rgba(147,51,234,.5));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.dark\:invert-0:is(.dark *){--tw-invert: invert(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.dark\:hover\:border-purple-400:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity))}.dark\:hover\:border-purple-400\/60:hover:is(.dark *){border-color:#c084fc99}.dark\:hover\:border-purple-500:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity))}.dark\:hover\:border-white\/30:hover:is(.dark *){border-color:#ffffff4d}.dark\:hover\:bg-blue-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700\/50:hover:is(.dark *){background-color:#37415180}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800\/20:hover:is(.dark *){background-color:#1f293733}.dark\:hover\:bg-gray-800\/40:hover:is(.dark *){background-color:#1f293766}.dark\:hover\:bg-gray-800\/50:hover:is(.dark *){background-color:#1f293780}.dark\:hover\:bg-purple-500\/40:hover:is(.dark *){background-color:#a855f766}.dark\:hover\:bg-purple-900\/30:hover:is(.dark *){background-color:#581c874d}.dark\:hover\:bg-white\/10:hover:is(.dark *){background-color:#ffffff1a}.dark\:hover\:bg-white\/5:hover:is(.dark *){background-color:#ffffff0d}.dark\:hover\:text-blue-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:hover\:text-purple-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(243 232 255 / var(--tw-text-opacity))}.dark\:hover\:text-purple-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(233 213 255 / var(--tw-text-opacity))}.dark\:hover\:text-purple-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:text-yellow-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.dark\:hover\:shadow-\[0_0_30px_rgba\(147\,51\,234\,0\.25\)\]:hover:is(.dark *){--tw-shadow: 0 0 30px rgba(147,51,234,.25);--tw-shadow-colored: 0 0 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:hover\:shadow-purple-400\/20:hover:is(.dark *){--tw-shadow-color: rgb(192 132 252 / .2);--tw-shadow: var(--tw-shadow-colored)}.group:focus-within .dark\:group-focus-within\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.group:focus-within .dark\:group-focus-within\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity))}.group:focus-within .dark\:group-focus-within\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}.group\/item:hover .dark\:group-hover\/item\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.group\/item:hover .dark\:group-hover\/item\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}.group:hover .dark\:group-hover\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.group:hover .dark\:group-hover\:text-purple-300:is(.dark *){--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity))}.group:hover .dark\:group-hover\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:left-6{left:1.5rem}.sm\:top-6{top:1.5rem}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:mb-10{margin-bottom:2.5rem}.sm\:mb-2{margin-bottom:.5rem}.sm\:mb-3{margin-bottom:.75rem}.sm\:mb-4{margin-bottom:1rem}.sm\:mb-5{margin-bottom:1.25rem}.sm\:mb-6{margin-bottom:1.5rem}.sm\:mb-8{margin-bottom:2rem}.sm\:ml-8{margin-left:2rem}.sm\:mr-2{margin-right:.5rem}.sm\:mt-2{margin-top:.5rem}.sm\:mt-4{margin-top:1rem}.sm\:mt-5{margin-top:1.25rem}.sm\:mt-6{margin-top:1.5rem}.sm\:mt-8{margin-top:2rem}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:table-cell{display:table-cell}.sm\:hidden{display:none}.sm\:h-1{height:.25rem}.sm\:h-10{height:2.5rem}.sm\:h-12{height:3rem}.sm\:h-14{height:3.5rem}.sm\:h-16{height:4rem}.sm\:h-4{height:1rem}.sm\:h-40{height:10rem}.sm\:h-5{height:1.25rem}.sm\:h-6{height:1.5rem}.sm\:w-10{width:2.5rem}.sm\:w-12{width:3rem}.sm\:w-14{width:3.5rem}.sm\:w-20{width:5rem}.sm\:w-24{width:6rem}.sm\:w-32{width:8rem}.sm\:w-36{width:9rem}.sm\:w-4{width:1rem}.sm\:w-40{width:10rem}.sm\:w-5{width:1.25rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:min-w-\[100px\]{min-width:100px}.sm\:max-w-none{max-width:none}.sm\:flex-none{flex:none}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-1{gap:.25rem}.sm\:gap-2{gap:.5rem}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:gap-5{gap:1.25rem}.sm\:gap-6{gap:1.5rem}.sm\:gap-8{gap:2rem}.sm\:space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.sm\:space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.sm\:space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.sm\:rounded-2xl{border-radius:1rem}.sm\:rounded-xl{border-radius:.75rem}.sm\:p-2{padding:.5rem}.sm\:p-2\.5{padding:.625rem}.sm\:p-3{padding:.75rem}.sm\:p-4{padding:1rem}.sm\:p-5{padding:1.25rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-1{padding-left:.25rem;padding-right:.25rem}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-2{padding-left:.5rem;padding-right:.5rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:py-1{padding-top:.25rem;padding-bottom:.25rem}.sm\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}.sm\:py-12{padding-top:3rem;padding-bottom:3rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:py-2{padding-top:.5rem;padding-bottom:.5rem}.sm\:py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.sm\:py-3{padding-top:.75rem;padding-bottom:.75rem}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.sm\:pb-12{padding-bottom:3rem}.sm\:pb-4{padding-bottom:1rem}.sm\:pt-12{padding-top:3rem}.sm\:pt-24{padding-top:6rem}.sm\:pt-4{padding-top:1rem}.sm\:text-left{text-align:left}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-\[11px\]{font-size:11px}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.sm\:shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.sm\:hover\:scale-\[1\.02\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}@media (min-width: 768px){.md\:left-16{left:4rem}.md\:left-24{left:6rem}.md\:left-8{left:2rem}.md\:right-16{right:4rem}.md\:top-8{top:2rem}.md\:col-span-1{grid-column:span 1 / span 1}.md\:mx-6{margin-left:1.5rem;margin-right:1.5rem}.md\:mb-0{margin-bottom:0}.md\:mb-10{margin-bottom:2.5rem}.md\:mb-12{margin-bottom:3rem}.md\:mb-16{margin-bottom:4rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-8{margin-bottom:2rem}.md\:mt-10{margin-top:2.5rem}.md\:mt-12{margin-top:3rem}.md\:mt-6{margin-top:1.5rem}.md\:mt-8{margin-top:2rem}.md\:block{display:block}.md\:flex{display:flex}.md\:table-cell{display:table-cell}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-10{height:2.5rem}.md\:h-12{height:3rem}.md\:h-14{height:3.5rem}.md\:h-16{height:4rem}.md\:h-20{height:5rem}.md\:h-40{height:10rem}.md\:h-48{height:12rem}.md\:h-6{height:1.5rem}.md\:h-64{height:16rem}.md\:h-7{height:1.75rem}.md\:h-8{height:2rem}.md\:h-\[40rem\]{height:40rem}.md\:h-\[650px\]{height:650px}.md\:h-\[700px\]{height:700px}.md\:min-h-\[500px\]{min-height:500px}.md\:min-h-\[50vh\]{min-height:50vh}.md\:w-10{width:2.5rem}.md\:w-12{width:3rem}.md\:w-14{width:3.5rem}.md\:w-16{width:4rem}.md\:w-24{width:6rem}.md\:w-28{width:7rem}.md\:w-40{width:10rem}.md\:w-44{width:11rem}.md\:w-48{width:12rem}.md\:w-64{width:16rem}.md\:w-7{width:1.75rem}.md\:w-8{width:2rem}.md\:w-80{width:20rem}.md\:w-96{width:24rem}.md\:min-w-\[120px\]{min-width:120px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-row-reverse{flex-direction:row-reverse}.md\:items-start{align-items:flex-start}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-between{justify-content:space-between}.md\:gap-5{gap:1.25rem}.md\:gap-6{gap:1.5rem}.md\:gap-8{gap:2rem}.md\:space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.md\:space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.md\:space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.md\:space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.md\:space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.md\:break-normal{overflow-wrap:normal;word-break:normal}.md\:rounded-2xl{border-radius:1rem}.md\:rounded-3xl{border-radius:1.5rem}.md\:border-4{border-width:4px}.md\:p-10{padding:2.5rem}.md\:p-16{padding:4rem}.md\:p-3{padding:.75rem}.md\:p-5{padding:1.25rem}.md\:p-6{padding:1.5rem}.md\:p-8{padding:2rem}.md\:px-10{padding-left:2.5rem;padding-right:2.5rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-12{padding-top:3rem;padding-bottom:3rem}.md\:py-16{padding-top:4rem;padding-bottom:4rem}.md\:py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.md\:py-20{padding-top:5rem;padding-bottom:5rem}.md\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\:py-4{padding-top:1rem;padding-bottom:1rem}.md\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.md\:py-8{padding-top:2rem;padding-bottom:2rem}.md\:pb-16{padding-bottom:4rem}.md\:pb-20{padding-bottom:5rem}.md\:pb-6{padding-bottom:1.5rem}.md\:pt-16{padding-top:4rem}.md\:pt-28{padding-top:7rem}.md\:pt-6{padding-top:1.5rem}.md\:text-left{text-align:left}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-7xl{font-size:4.5rem;line-height:1}.md\:text-8xl{font-size:6rem;line-height:1}.md\:text-base{font-size:1rem;line-height:1.5rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:text-xs{font-size:.75rem;line-height:1rem}.md\:leading-\[1\.85\]{line-height:1.85}}@media (min-width: 1024px){.lg\:sticky{position:sticky}.lg\:top-8{top:2rem}.lg\:col-span-1{grid-column:span 1 / span 1}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:mx-8{margin-left:2rem;margin-right:2rem}.lg\:mb-8{margin-bottom:2rem}.lg\:mt-8{margin-top:2rem}.lg\:table-cell{display:table-cell}.lg\:h-10{height:2.5rem}.lg\:h-56{height:14rem}.lg\:h-\[680px\]{height:680px}.lg\:w-56{width:14rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[2fr_1fr\]{grid-template-columns:2fr 1fr}.lg\:gap-8{gap:2rem}.lg\:space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.lg\:self-start{align-self:flex-start}.lg\:overflow-y-auto{overflow-y:auto}.lg\:p-10{padding:2.5rem}.lg\:p-12{padding:3rem}.lg\:p-6{padding:1.5rem}.lg\:p-8{padding:2rem}.lg\:px-12{padding-left:3rem;padding-right:3rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-20{padding-top:5rem;padding-bottom:5rem}.lg\:pb-20{padding-bottom:5rem}.lg\:pb-8{padding-bottom:2rem}.lg\:pr-4{padding-right:1rem}.lg\:pt-20{padding-top:5rem}.lg\:pt-8{padding-top:2rem}.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}.lg\:text-5xl{font-size:3rem;line-height:1}.lg\:text-6xl{font-size:3.75rem;line-height:1}.lg\:text-8xl{font-size:6rem;line-height:1}.lg\:text-\[1\.125rem\]{font-size:1.125rem}.lg\:text-base{font-size:1rem;line-height:1.5rem}.lg\:text-lg{font-size:1.125rem;line-height:1.75rem}.lg\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1280px){.xl\:table-cell{display:table-cell}.xl\:h-12{height:3rem}.xl\:p-10{padding:2.5rem}.xl\:text-3xl{font-size:1.875rem;line-height:2.25rem}.xl\:text-4xl{font-size:2.25rem;line-height:2.5rem}.xl\:text-5xl{font-size:3rem;line-height:1}} diff --git a/frontend/dist/assets/index-Cec1goc5.js b/frontend/dist/assets/index-Cec1goc5.js new file mode 100644 index 0000000..3077182 --- /dev/null +++ b/frontend/dist/assets/index-Cec1goc5.js @@ -0,0 +1,521 @@ +var LO=Object.defineProperty;var DO=(e,t,r)=>t in e?LO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var vm=(e,t,r)=>DO(e,typeof t!="symbol"?t+"":t,r);function RO(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Q6={exports:{}},Tf={},J6={exports:{}},he={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Wc=Symbol.for("react.element"),$O=Symbol.for("react.portal"),zO=Symbol.for("react.fragment"),BO=Symbol.for("react.strict_mode"),FO=Symbol.for("react.profiler"),VO=Symbol.for("react.provider"),UO=Symbol.for("react.context"),HO=Symbol.for("react.forward_ref"),WO=Symbol.for("react.suspense"),KO=Symbol.for("react.memo"),GO=Symbol.for("react.lazy"),u2=Symbol.iterator;function YO(e){return e===null||typeof e!="object"?null:(e=u2&&e[u2]||e["@@iterator"],typeof e=="function"?e:null)}var ej={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tj=Object.assign,rj={};function Vs(e,t,r){this.props=e,this.context=t,this.refs=rj,this.updater=r||ej}Vs.prototype.isReactComponent={};Vs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Vs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nj(){}nj.prototype=Vs.prototype;function ov(e,t,r){this.props=e,this.context=t,this.refs=rj,this.updater=r||ej}var sv=ov.prototype=new nj;sv.constructor=ov;tj(sv,Vs.prototype);sv.isPureReactComponent=!0;var d2=Array.isArray,aj=Object.prototype.hasOwnProperty,lv={current:null},ij={key:!0,ref:!0,__self:!0,__source:!0};function oj(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)aj.call(t,n)&&!ij.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1>>1,ee=O[q];if(0>>1;qa(Z,U))lea(Q,Z)?(O[q]=Q,O[le]=U,q=le):(O[q]=Z,O[D]=U,q=D);else if(lea(Q,U))O[q]=Q,O[le]=U,q=le;else break e}}return R}function a(O,R){var U=O.sortIndex-R.sortIndex;return U!==0?U:O.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],u=[],d=1,f=null,p=3,h=!1,g=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(O){for(var R=r(u);R!==null;){if(R.callback===null)n(u);else if(R.startTime<=O)n(u),R.sortIndex=R.expirationTime,t(c,R);else break;R=r(u)}}function j(O){if(x=!1,w(O),!g)if(r(c)!==null)g=!0,B(N);else{var R=r(u);R!==null&&V(j,R.startTime-O)}}function N(O,R){g=!1,x&&(x=!1,y(C),C=-1),h=!0;var U=p;try{for(w(R),f=r(c);f!==null&&(!(f.expirationTime>R)||O&&!A());){var q=f.callback;if(typeof q=="function"){f.callback=null,p=f.priorityLevel;var ee=q(f.expirationTime<=R);R=e.unstable_now(),typeof ee=="function"?f.callback=ee:f===r(c)&&n(c),w(R)}else n(c);f=r(c)}if(f!==null)var oe=!0;else{var D=r(u);D!==null&&V(j,D.startTime-R),oe=!1}return oe}finally{f=null,p=U,h=!1}}var S=!1,P=null,C=-1,M=5,T=-1;function A(){return!(e.unstable_now()-TO||125q?(O.sortIndex=U,t(u,O),r(c)===null&&O===r(u)&&(x?(y(C),C=-1):x=!0,V(j,U-q))):(O.sortIndex=ee,t(c,O),g||h||(g=!0,B(N))),O},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(O){var R=p;return function(){var U=p;p=R;try{return O.apply(this,arguments)}finally{p=U}}}})(dj);uj.exports=dj;var iT=uj.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var oT=m,Dr=iT;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$h=Object.prototype.hasOwnProperty,sT=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p2={},m2={};function lT(e){return $h.call(m2,e)?!0:$h.call(p2,e)?!1:sT.test(e)?m2[e]=!0:(p2[e]=!0,!1)}function cT(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function uT(e,t,r,n){if(t===null||typeof t>"u"||cT(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function hr(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ut[e]=new hr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ut[t]=new hr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ut[e]=new hr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ut[e]=new hr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ut[e]=new hr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ut[e]=new hr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ut[e]=new hr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ut[e]=new hr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ut[e]=new hr(e,5,!1,e.toLowerCase(),null,!1,!1)});var uv=/[\-:]([a-z])/g;function dv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(uv,dv);Ut[t]=new hr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(uv,dv);Ut[t]=new hr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(uv,dv);Ut[t]=new hr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ut[e]=new hr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ut.xlinkHref=new hr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ut[e]=new hr(e,1,!1,e.toLowerCase(),null,!0,!0)});function fv(e,t,r,n){var a=Ut.hasOwnProperty(t)?Ut[t]:null;(a!==null?a.type!==0:n||!(2s||a[o]!==i[s]){var c=` +`+a[o].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=o&&0<=s);break}}}finally{wm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ml(e):""}function dT(e){switch(e.tag){case 5:return Ml(e.type);case 16:return Ml("Lazy");case 13:return Ml("Suspense");case 19:return Ml("SuspenseList");case 0:case 2:case 15:return e=km(e.type,!1),e;case 11:return e=km(e.type.render,!1),e;case 1:return e=km(e.type,!0),e;default:return""}}function Vh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ko:return"Fragment";case Wo:return"Portal";case zh:return"Profiler";case pv:return"StrictMode";case Bh:return"Suspense";case Fh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mj:return(e.displayName||"Context")+".Consumer";case pj:return(e._context.displayName||"Context")+".Provider";case mv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hv:return t=e.displayName||null,t!==null?t:Vh(e.type)||"Memo";case Va:t=e._payload,e=e._init;try{return Vh(e(t))}catch{}}return null}function fT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vh(t);case 8:return t===pv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function di(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gj(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pT(e){var t=gj(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Au(e){e._valueTracker||(e._valueTracker=pT(e))}function yj(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=gj(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Kd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uh(e,t){var r=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function g2(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=di(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function vj(e,t){t=t.checked,t!=null&&fv(e,"checked",t,!1)}function Hh(e,t){vj(e,t);var r=di(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Wh(e,t.type,r):t.hasOwnProperty("defaultValue")&&Wh(e,t.type,di(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function y2(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Wh(e,t,r){(t!=="number"||Kd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Il=Array.isArray;function fs(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Ou.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function oc(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ul={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mT=["Webkit","ms","Moz","O"];Object.keys(Ul).forEach(function(e){mT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ul[t]=Ul[e]})});function kj(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ul.hasOwnProperty(e)&&Ul[e]?(""+t).trim():t+"px"}function jj(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=kj(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var hT=Je({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yh(e,t){if(t){if(hT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function qh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xh=null;function gv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zh=null,ps=null,ms=null;function b2(e){if(e=Yc(e)){if(typeof Zh!="function")throw Error(G(280));var t=e.stateNode;t&&(t=Df(t),Zh(e.stateNode,e.type,t))}}function Nj(e){ps?ms?ms.push(e):ms=[e]:ps=e}function Sj(){if(ps){var e=ps,t=ms;if(ms=ps=null,b2(e),t)for(e=0;e>>=0,e===0?32:31-(PT(e)/CT|0)|0}var Tu=64,Mu=4194304;function _l(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xd(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~a;s!==0?n=_l(s):(i&=o,i!==0&&(n=_l(i)))}else o=r&~a,o!==0?n=_l(o):i!==0&&(n=_l(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Kc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yn(t),e[t]=r}function TT(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Wl),A2=" ",O2=!1;function Wj(e,t){switch(e){case"keyup":return iM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Go=!1;function sM(e,t){switch(e){case"compositionend":return Kj(t);case"keypress":return t.which!==32?null:(O2=!0,A2);case"textInput":return e=t.data,e===A2&&O2?null:e;default:return null}}function lM(e,t){if(Go)return e==="compositionend"||!Nv&&Wj(e,t)?(e=Uj(),vd=wv=Xa=null,Go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_2(r)}}function Xj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zj(){for(var e=window,t=Kd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Kd(e.document)}return t}function Sv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function yM(e){var t=Zj(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Xj(r.ownerDocument.documentElement,r)){if(n!==null&&Sv(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=L2(r,i);var o=L2(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Yo=null,ng=null,Gl=null,ag=!1;function D2(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ag||Yo==null||Yo!==Kd(n)||(n=Yo,"selectionStart"in n&&Sv(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Gl&&fc(Gl,n)||(Gl=n,n=Jd(ng,"onSelect"),0Zo||(e.current=ug[Zo],ug[Zo]=null,Zo--)}function Le(e,t){Zo++,ug[Zo]=e.current,e.current=t}var fi={},rr=Pi(fi),br=Pi(!1),ho=fi;function Ns(e,t){var r=e.type.contextTypes;if(!r)return fi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function wr(e){return e=e.childContextTypes,e!=null}function t0(){Fe(br),Fe(rr)}function U2(e,t,r){if(rr.current!==fi)throw Error(G(168));Le(rr,t),Le(br,r)}function o8(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(G(108,fT(e)||"Unknown",a));return Je({},r,n)}function r0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fi,ho=rr.current,Le(rr,e),Le(br,br.current),!0}function H2(e,t,r){var n=e.stateNode;if(!n)throw Error(G(169));r?(e=o8(e,t,ho),n.__reactInternalMemoizedMergedChildContext=e,Fe(br),Fe(rr),Le(rr,e)):Fe(br),Le(br,r)}var Qn=null,Rf=!1,Dm=!1;function s8(e){Qn===null?Qn=[e]:Qn.push(e)}function AM(e){Rf=!0,s8(e)}function Ci(){if(!Dm&&Qn!==null){Dm=!0;var e=0,t=Ce;try{var r=Qn;for(Ce=1;e>=o,a-=o,ta=1<<32-yn(t)+a|r<C?(M=P,P=null):M=P.sibling;var T=p(y,P,w[C],j);if(T===null){P===null&&(P=M);break}e&&P&&T.alternate===null&&t(y,P),b=i(T,b,C),S===null?N=T:S.sibling=T,S=T,P=M}if(C===w.length)return r(y,P),We&&$i(y,C),N;if(P===null){for(;CC?(M=P,P=null):M=P.sibling;var A=p(y,P,T.value,j);if(A===null){P===null&&(P=M);break}e&&P&&A.alternate===null&&t(y,P),b=i(A,b,C),S===null?N=A:S.sibling=A,S=A,P=M}if(T.done)return r(y,P),We&&$i(y,C),N;if(P===null){for(;!T.done;C++,T=w.next())T=f(y,T.value,j),T!==null&&(b=i(T,b,C),S===null?N=T:S.sibling=T,S=T);return We&&$i(y,C),N}for(P=n(y,P);!T.done;C++,T=w.next())T=h(P,y,C,T.value,j),T!==null&&(e&&T.alternate!==null&&P.delete(T.key===null?C:T.key),b=i(T,b,C),S===null?N=T:S.sibling=T,S=T);return e&&P.forEach(function(E){return t(y,E)}),We&&$i(y,C),N}function v(y,b,w,j){if(typeof w=="object"&&w!==null&&w.type===Ko&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Eu:e:{for(var N=w.key,S=b;S!==null;){if(S.key===N){if(N=w.type,N===Ko){if(S.tag===7){r(y,S.sibling),b=a(S,w.props.children),b.return=y,y=b;break e}}else if(S.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Va&&G2(N)===S.type){r(y,S.sibling),b=a(S,w.props),b.ref=hl(y,S,w),b.return=y,y=b;break e}r(y,S);break}else t(y,S);S=S.sibling}w.type===Ko?(b=no(w.props.children,y.mode,j,w.key),b.return=y,y=b):(j=Pd(w.type,w.key,w.props,null,y.mode,j),j.ref=hl(y,b,w),j.return=y,y=j)}return o(y);case Wo:e:{for(S=w.key;b!==null;){if(b.key===S)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){r(y,b.sibling),b=a(b,w.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else t(y,b);b=b.sibling}b=Hm(w,y.mode,j),b.return=y,y=b}return o(y);case Va:return S=w._init,v(y,b,S(w._payload),j)}if(Il(w))return g(y,b,w,j);if(ul(w))return x(y,b,w,j);zu(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(r(y,b.sibling),b=a(b,w),b.return=y,y=b):(r(y,b),b=Um(w,y.mode,j),b.return=y,y=b),o(y)):r(y,b)}return v}var Ps=d8(!0),f8=d8(!1),i0=Pi(null),o0=null,es=null,Av=null;function Ov(){Av=es=o0=null}function Tv(e){var t=i0.current;Fe(i0),e._currentValue=t}function pg(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function gs(e,t){o0=e,Av=es=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(vr=!0),e.firstContext=null)}function rn(e){var t=e._currentValue;if(Av!==e)if(e={context:e,memoizedValue:t,next:null},es===null){if(o0===null)throw Error(G(308));es=e,o0.dependencies={lanes:0,firstContext:e}}else es=es.next=e;return t}var Yi=null;function Mv(e){Yi===null?Yi=[e]:Yi.push(e)}function p8(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,Mv(t)):(r.next=a.next,a.next=r),t.interleaved=r,ha(e,n)}function ha(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ua=!1;function Iv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function m8(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function la(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ai(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,xe&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,ha(e,r)}return a=n.interleaved,a===null?(t.next=t,Mv(n)):(t.next=a.next,a.next=t),n.interleaved=t,ha(e,r)}function bd(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,vv(e,r)}}function Y2(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?a=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function s0(e,t,r,n){var a=e.updateQueue;Ua=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var c=s,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==o&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=c))}if(i!==null){var f=a.baseState;o=0,d=u=c=null,s=i;do{var p=s.lane,h=s.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,x=s;switch(p=t,h=r,x.tag){case 1:if(g=x.payload,typeof g=="function"){f=g.call(h,f,p);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=x.payload,p=typeof g=="function"?g.call(h,f,p):g,p==null)break e;f=Je({},f,p);break e;case 2:Ua=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[s]:p.push(s))}else h={eventTime:h,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=h,c=f):d=d.next=h,o|=p;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;p=s,s=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(d===null&&(c=f),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=d,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);vo|=o,e.lanes=o,e.memoizedState=f}}function q2(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=$m.transition;$m.transition={};try{e(!1),t()}finally{Ce=r,$m.transition=n}}function T8(){return nn().memoizedState}function IM(e,t,r){var n=oi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},M8(e))I8(t,r);else if(r=p8(e,t,r,n),r!==null){var a=dr();vn(r,e,n,a),_8(r,t,n)}}function _M(e,t,r){var n=oi(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(M8(e))I8(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,r);if(a.hasEagerState=!0,a.eagerState=s,bn(s,o)){var c=t.interleaved;c===null?(a.next=a,Mv(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=p8(e,t,a,n),r!==null&&(a=dr(),vn(r,e,n,a),_8(r,t,n))}}function M8(e){var t=e.alternate;return e===Qe||t!==null&&t===Qe}function I8(e,t){Yl=c0=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function _8(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,vv(e,r)}}var u0={readContext:rn,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},LM={readContext:rn,useCallback:function(e,t){return Cn().memoizedState=[e,t===void 0?null:t],e},useContext:rn,useEffect:Z2,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,kd(4194308,4,P8.bind(null,t,e),r)},useLayoutEffect:function(e,t){return kd(4194308,4,e,t)},useInsertionEffect:function(e,t){return kd(4,2,e,t)},useMemo:function(e,t){var r=Cn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Cn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=IM.bind(null,Qe,e),[n.memoizedState,e]},useRef:function(e){var t=Cn();return e={current:e},t.memoizedState=e},useState:X2,useDebugValue:Fv,useDeferredValue:function(e){return Cn().memoizedState=e},useTransition:function(){var e=X2(!1),t=e[0];return e=MM.bind(null,e[1]),Cn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Qe,a=Cn();if(We){if(r===void 0)throw Error(G(407));r=r()}else{if(r=t(),It===null)throw Error(G(349));yo&30||v8(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,Z2(b8.bind(null,n,i,e),[e]),n.flags|=2048,bc(9,x8.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Cn(),t=It.identifierPrefix;if(We){var r=ra,n=ta;r=(n&~(1<<32-yn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=vc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[An]=t,e[hc]=n,H8(e,t,!1,!1),t.stateNode=e;e:{switch(o=qh(r,n),r){case"dialog":ze("cancel",e),ze("close",e),a=n;break;case"iframe":case"object":case"embed":ze("load",e),a=n;break;case"video":case"audio":for(a=0;aAs&&(t.flags|=128,n=!0,gl(i,!1),t.lanes=4194304)}else{if(!n)if(e=l0(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),gl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!We)return qt(t),null}else 2*dt()-i.renderingStartTime>As&&r!==1073741824&&(t.flags|=128,n=!0,gl(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=dt(),t.sibling=null,r=Xe.current,Le(Xe,n?r&1|2:r&1),t):(qt(t),null);case 22:case 23:return Gv(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Pr&1073741824&&(qt(t),t.subtreeFlags&6&&(t.flags|=8192)):qt(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function UM(e,t){switch(Cv(t),t.tag){case 1:return wr(t.type)&&t0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cs(),Fe(br),Fe(rr),Dv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lv(t),null;case 13:if(Fe(Xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(Xe),null;case 4:return Cs(),null;case 10:return Tv(t.type._context),null;case 22:case 23:return Gv(),null;case 24:return null;default:return null}}var Fu=!1,Qt=!1,HM=typeof WeakSet=="function"?WeakSet:Set,ne=null;function ts(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){it(e,t,n)}else r.current=null}function kg(e,t,r){try{r()}catch(n){it(e,t,n)}}var lw=!1;function WM(e,t){if(ig=Zd,e=Zj(),Sv(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,s=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==r||a!==0&&f.nodeType!==3||(s=o+a),f!==i||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===e)break t;if(p===r&&++u===a&&(s=o),p===i&&++d===n&&(c=o),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}r=s===-1||c===-1?null:{start:s,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(og={focusedElem:e,selectionRange:r},Zd=!1,ne=t;ne!==null;)if(t=ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ne=e;else for(;ne!==null;){t=ne;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,v=g.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?x:fn(t.type,x),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(j){it(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,ne=e;break}ne=t.return}return g=lw,lw=!1,g}function ql(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&kg(t,r,i)}a=a.next}while(a!==n)}}function Bf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function jg(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function G8(e){var t=e.alternate;t!==null&&(e.alternate=null,G8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[An],delete t[hc],delete t[cg],delete t[CM],delete t[EM])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Y8(e){return e.tag===5||e.tag===3||e.tag===4}function cw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ng(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=e0));else if(n!==4&&(e=e.child,e!==null))for(Ng(e,t,r),e=e.sibling;e!==null;)Ng(e,t,r),e=e.sibling}function Sg(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Sg(e,t,r),e=e.sibling;e!==null;)Sg(e,t,r),e=e.sibling}var Bt=null,pn=!1;function Da(e,t,r){for(r=r.child;r!==null;)q8(e,t,r),r=r.sibling}function q8(e,t,r){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(Mf,r)}catch{}switch(r.tag){case 5:Qt||ts(r,t);case 6:var n=Bt,a=pn;Bt=null,Da(e,t,r),Bt=n,pn=a,Bt!==null&&(pn?(e=Bt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Bt.removeChild(r.stateNode));break;case 18:Bt!==null&&(pn?(e=Bt,r=r.stateNode,e.nodeType===8?Lm(e.parentNode,r):e.nodeType===1&&Lm(e,r),uc(e)):Lm(Bt,r.stateNode));break;case 4:n=Bt,a=pn,Bt=r.stateNode.containerInfo,pn=!0,Da(e,t,r),Bt=n,pn=a;break;case 0:case 11:case 14:case 15:if(!Qt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&kg(r,t,o),a=a.next}while(a!==n)}Da(e,t,r);break;case 1:if(!Qt&&(ts(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){it(r,t,s)}Da(e,t,r);break;case 21:Da(e,t,r);break;case 22:r.mode&1?(Qt=(n=Qt)||r.memoizedState!==null,Da(e,t,r),Qt=n):Da(e,t,r);break;default:Da(e,t,r)}}function uw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new HM),t.forEach(function(n){var a=eI.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function dn(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=o),n&=~i}if(n=a,n=dt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*GM(n/1960))-n,10e?16:e,Za===null)var n=!1;else{if(e=Za,Za=null,p0=0,xe&6)throw Error(G(331));var a=xe;for(xe|=4,ne=e.current;ne!==null;){var i=ne,o=i.child;if(ne.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cdt()-Wv?ro(e,0):Hv|=r),kr(e,t)}function nN(e,t){t===0&&(e.mode&1?(t=Mu,Mu<<=1,!(Mu&130023424)&&(Mu=4194304)):t=1);var r=dr();e=ha(e,t),e!==null&&(Kc(e,t,r),kr(e,r))}function JM(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),nN(e,r)}function eI(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(G(314))}n!==null&&n.delete(t),nN(e,r)}var aN;aN=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||br.current)vr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return vr=!1,FM(e,t,r);vr=!!(e.flags&131072)}else vr=!1,We&&t.flags&1048576&&l8(t,a0,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;jd(e,t),e=t.pendingProps;var a=Ns(t,rr.current);gs(t,r),a=$v(null,t,n,e,a,r);var i=zv();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,wr(n)?(i=!0,r0(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Iv(t),a.updater=zf,t.stateNode=a,a._reactInternals=t,hg(t,n,e,r),t=vg(null,t,n,!0,i,r)):(t.tag=0,We&&i&&Pv(t),sr(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(jd(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=rI(n),e=fn(n,e),a){case 0:t=yg(null,t,n,e,r);break e;case 1:t=iw(null,t,n,e,r);break e;case 11:t=nw(null,t,n,e,r);break e;case 14:t=aw(null,t,n,fn(n.type,e),r);break e}throw Error(G(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:fn(n,a),yg(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:fn(n,a),iw(e,t,n,a,r);case 3:e:{if(F8(t),e===null)throw Error(G(387));n=t.pendingProps,i=t.memoizedState,a=i.element,m8(e,t),s0(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Es(Error(G(423)),t),t=ow(e,t,n,r,a);break e}else if(n!==a){a=Es(Error(G(424)),t),t=ow(e,t,n,r,a);break e}else for(Ar=ni(t.stateNode.containerInfo.firstChild),Ir=t,We=!0,mn=null,r=f8(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ss(),n===a){t=ga(e,t,r);break e}sr(e,t,n,r)}t=t.child}return t;case 5:return h8(t),e===null&&fg(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,sg(n,a)?o=null:i!==null&&sg(n,i)&&(t.flags|=32),B8(e,t),sr(e,t,o,r),t.child;case 6:return e===null&&fg(t),null;case 13:return V8(e,t,r);case 4:return _v(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ps(t,null,n,r):sr(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:fn(n,a),nw(e,t,n,a,r);case 7:return sr(e,t,t.pendingProps,r),t.child;case 8:return sr(e,t,t.pendingProps.children,r),t.child;case 12:return sr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,Le(i0,n._currentValue),n._currentValue=o,i!==null)if(bn(i.value,o)){if(i.children===a.children&&!br.current){t=ga(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var c=s.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=la(-1,r&-r),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),pg(i.return,r,t),s.lanes|=r;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(G(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),pg(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}sr(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,gs(t,r),a=rn(a),n=n(a),t.flags|=1,sr(e,t,n,r),t.child;case 14:return n=t.type,a=fn(n,t.pendingProps),a=fn(n.type,a),aw(e,t,n,a,r);case 15:return $8(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:fn(n,a),jd(e,t),t.tag=1,wr(n)?(e=!0,r0(t)):e=!1,gs(t,r),L8(t,n,a),hg(t,n,a,r),vg(null,t,n,!0,e,r);case 19:return U8(e,t,r);case 22:return z8(e,t,r)}throw Error(G(156,t.tag))};function iN(e,t){return Mj(e,t)}function tI(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qr(e,t,r,n){return new tI(e,t,r,n)}function qv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rI(e){if(typeof e=="function")return qv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mv)return 11;if(e===hv)return 14}return 2}function si(e,t){var r=e.alternate;return r===null?(r=Qr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Pd(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")qv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ko:return no(r.children,a,i,t);case pv:o=8,a|=8;break;case zh:return e=Qr(12,r,t,a|2),e.elementType=zh,e.lanes=i,e;case Bh:return e=Qr(13,r,t,a),e.elementType=Bh,e.lanes=i,e;case Fh:return e=Qr(19,r,t,a),e.elementType=Fh,e.lanes=i,e;case hj:return Vf(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pj:o=10;break e;case mj:o=9;break e;case mv:o=11;break e;case hv:o=14;break e;case Va:o=16,n=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=Qr(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function no(e,t,r,n){return e=Qr(7,e,n,t),e.lanes=r,e}function Vf(e,t,r,n){return e=Qr(22,e,n,t),e.elementType=hj,e.lanes=r,e.stateNode={isHidden:!1},e}function Um(e,t,r){return e=Qr(6,e,null,t),e.lanes=r,e}function Hm(e,t,r){return t=Qr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nI(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nm(0),this.expirationTimes=Nm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nm(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Xv(e,t,r,n,a,i,o,s,c){return e=new nI(e,t,r,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Qr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Iv(i),e}function aI(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cN)}catch(e){console.error(e)}}cN(),cj.exports=Br;var pi=cj.exports;const Hu=Hn(pi);var uN,vw=pi;uN=vw.createRoot,vw.hydrateRoot;function cI(e){if(typeof Proxy>"u")return e;const t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}function Gf(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Og=e=>Array.isArray(e);function dN(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function ex(e,t,r,n){if(typeof t=="function"){const[a,i]=xw(n);t=t(r!==void 0?r:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=xw(n);t=t(r!==void 0?r:e.custom,a,i)}return t}function Yf(e,t,r){const n=e.getProps();return ex(n,t,r!==void 0?r:n.custom,e)}const tx=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rx=["initial",...tx],Xc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lo=new Set(Xc),_n=e=>e*1e3,Ln=e=>e/1e3,uI={type:"spring",stiffness:500,damping:25,restSpeed:10},dI=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fI={type:"keyframes",duration:.8},pI={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mI=(e,{keyframes:t})=>t.length>2?fI:Lo.has(e)?e.startsWith("scale")?dI(t[1]):uI:pI;function nx(e,t){return e?e[t]||e.default||e:void 0}const hI={skipAnimations:!1,useManualTiming:!1},gI=e=>e!==null;function qf(e,{repeat:t,repeatType:r="loop"},n){const a=e.filter(gI),i=t&&r!=="loop"&&t%2===1?0:a.length-1;return!i||n===void 0?a[i]:n}const _t=e=>e;function yI(e){let t=new Set,r=new Set,n=!1,a=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(u){i.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,d=!1,f=!1)=>{const h=f&&n?t:r;return d&&i.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),i.delete(u)},process:u=>{if(o=u,n){a=!0;return}n=!0,[t,r]=[r,t],r.clear(),t.forEach(s),n=!1,a&&(a=!1,c.process(u))}};return c}const Wu=["read","resolveKeyframes","update","preRender","render","postRender"],vI=40;function fN(e,t){let r=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,o=Wu.reduce((y,b)=>(y[b]=yI(i),y),{}),{read:s,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:p}=o,h=()=>{const y=performance.now();r=!1,a.delta=n?1e3/60:Math.max(Math.min(y-a.timestamp,vI),1),a.timestamp=y,a.isProcessing=!0,s.process(a),c.process(a),u.process(a),d.process(a),f.process(a),p.process(a),a.isProcessing=!1,r&&t&&(n=!1,e(h))},g=()=>{r=!0,n=!0,a.isProcessing||e(h)};return{schedule:Wu.reduce((y,b)=>{const w=o[b];return y[b]=(j,N=!1,S=!1)=>(r||g(),w.schedule(j,N,S)),y},{}),cancel:y=>{for(let b=0;b(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,xI=1e-7,bI=12;function wI(e,t,r,n,a){let i,o,s=0;do o=t+(r-t)/2,i=pN(o,n,a)-e,i>0?r=o:t=o;while(Math.abs(i)>xI&&++swI(i,0,1,e,r);return i=>i===0||i===1?i:pN(a(i),t,n)}const mN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hN=e=>t=>1-e(1-t),gN=Zc(.33,1.53,.69,.99),ax=hN(gN),yN=mN(ax),vN=e=>(e*=2)<1?.5*ax(e):.5*(2-Math.pow(2,-10*(e-1))),ix=e=>1-Math.sin(Math.acos(e)),xN=hN(ix),bN=mN(ix),wN=e=>/^0[^.\s]+$/u.test(e);function kI(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wN(e):!0}let jI=_t,g0=_t;const kN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),jN=e=>t=>typeof t=="string"&&t.startsWith(e),NN=jN("--"),NI=jN("var(--"),ox=e=>NI(e)?SI.test(e.split("/*")[0].trim()):!1,SI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,PI=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function CI(e){const t=PI.exec(e);if(!t)return[,];const[,r,n,a]=t;return[`--${r??n}`,a]}function SN(e,t,r=1){const[n,a]=CI(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const o=i.trim();return kN(o)?parseFloat(o):o}return ox(a)?SN(a,t,r+1):a}const mi=(e,t,r)=>r>t?t:rtypeof e=="number",parse:parseFloat,transform:e=>e},jc={...Ws,transform:e=>mi(0,1,e)},Ku={...Ws,default:1},Qc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ba=Qc("deg"),Dn=Qc("%"),ue=Qc("px"),EI=Qc("vh"),AI=Qc("vw"),bw={...Dn,parse:e=>Dn.parse(e)/100,transform:e=>Dn.transform(e*100)},OI=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ww=e=>e===Ws||e===ue,kw=(e,t)=>parseFloat(e.split(", ")[t]),jw=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const a=n.match(/^matrix3d\((.+)\)$/u);if(a)return kw(a[1],t);{const i=n.match(/^matrix\((.+)\)$/u);return i?kw(i[1],e):0}},TI=new Set(["x","y","z"]),MI=Xc.filter(e=>!TI.has(e));function II(e){const t=[];return MI.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const Os={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jw(4,13),y:jw(5,14)};Os.translateX=Os.x;Os.translateY=Os.y;const PN=e=>t=>t.test(e),_I={test:e=>e==="auto",parse:e=>e},CN=[Ws,ue,Dn,Ba,AI,EI,_I],Nw=e=>CN.find(PN(e)),ao=new Set;let Tg=!1,Mg=!1;function EN(){if(Mg){const e=Array.from(ao).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const a=II(n);a.length&&(r.set(n,a),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=r.get(n);a&&a.forEach(([i,o])=>{var s;(s=n.getValue(i))===null||s===void 0||s.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Mg=!1,Tg=!1,ao.forEach(e=>e.complete()),ao.clear()}function AN(){ao.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mg=!0)})}function LI(){AN(),EN()}class sx{constructor(t,r,n,a,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=a,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ao.add(this),Tg||(Tg=!0,ye.read(AN),ye.resolveKeyframes(EN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:a}=this;for(let i=0;iMath.round(e*1e5)/1e5,lx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DI(e){return e==null}const RI=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cx=(e,t)=>r=>!!(typeof r=="string"&&RI.test(r)&&r.startsWith(e)||t&&!DI(r)&&Object.prototype.hasOwnProperty.call(r,t)),ON=(e,t,r)=>n=>{if(typeof n!="string")return n;const[a,i,o,s]=n.match(lx);return{[e]:parseFloat(a),[t]:parseFloat(i),[r]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},$I=e=>mi(0,255,e),Km={...Ws,transform:e=>Math.round($I(e))},Xi={test:cx("rgb","red"),parse:ON("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Km.transform(e)+", "+Km.transform(t)+", "+Km.transform(r)+", "+Ql(jc.transform(n))+")"};function zI(e){let t="",r="",n="",a="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),a=e.substring(4,5),t+=t,r+=r,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Ig={test:cx("#"),parse:zI,transform:Xi.transform},ns={test:cx("hsl","hue"),parse:ON("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Dn.transform(Ql(t))+", "+Dn.transform(Ql(r))+", "+Ql(jc.transform(n))+")"},Xt={test:e=>Xi.test(e)||Ig.test(e)||ns.test(e),parse:e=>Xi.test(e)?Xi.parse(e):ns.test(e)?ns.parse(e):Ig.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xi.transform(e):ns.transform(e)},BI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FI(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(lx))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(BI))===null||r===void 0?void 0:r.length)||0)>0}const TN="number",MN="color",VI="var",UI="var(",Sw="${}",HI=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Nc(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},a=[];let i=0;const s=t.replace(HI,c=>(Xt.test(c)?(n.color.push(i),a.push(MN),r.push(Xt.parse(c))):c.startsWith(UI)?(n.var.push(i),a.push(VI),r.push(c)):(n.number.push(i),a.push(TN),r.push(parseFloat(c))),++i,Sw)).split(Sw);return{values:r,split:s,indexes:n,types:a}}function IN(e){return Nc(e).values}function _N(e){const{split:t,types:r}=Nc(e),n=t.length;return a=>{let i="";for(let o=0;otypeof e=="number"?0:e;function KI(e){const t=IN(e);return _N(e)(t.map(WI))}const hi={test:FI,parse:IN,createTransformer:_N,getAnimatableNone:KI},GI=new Set(["brightness","contrast","saturate","opacity"]);function YI(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(lx)||[];if(!n)return e;const a=r.replace(n,"");let i=GI.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+a+")"}const qI=/\b([a-z-]*)\(.*?\)/gu,_g={...hi,getAnimatableNone:e=>{const t=e.match(qI);return t?t.map(YI).join(" "):e}},XI={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,backgroundPositionX:ue,backgroundPositionY:ue},ZI={rotate:Ba,rotateX:Ba,rotateY:Ba,rotateZ:Ba,scale:Ku,scaleX:Ku,scaleY:Ku,scaleZ:Ku,skew:Ba,skewX:Ba,skewY:Ba,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:jc,originX:bw,originY:bw,originZ:ue},Pw={...Ws,transform:Math.round},ux={...XI,...ZI,zIndex:Pw,size:ue,fillOpacity:jc,strokeOpacity:jc,numOctaves:Pw},QI={...ux,color:Xt,backgroundColor:Xt,outlineColor:Xt,fill:Xt,stroke:Xt,borderColor:Xt,borderTopColor:Xt,borderRightColor:Xt,borderBottomColor:Xt,borderLeftColor:Xt,filter:_g,WebkitFilter:_g},dx=e=>QI[e];function LN(e,t){let r=dx(e);return r!==_g&&(r=hi),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const JI=new Set(["auto","none","0"]);function e_(e,t,r){let n=0,a;for(;n{r.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Xf(e){return typeof e=="function"}let Cd;function t_(){Cd=void 0}const Rn={now:()=>(Cd===void 0&&Rn.set(Et.isProcessing||hI.useManualTiming?Et.timestamp:performance.now()),Cd),set:e=>{Cd=e,queueMicrotask(t_)}},Cw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hi.test(e)||e==="0")&&!e.startsWith("url("));function r_(e){const t=e[0];if(e.length===1)return!0;for(let r=0;ra_?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&LI(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=Rn.now(),this.hasAttemptedResolve=!0;const{name:n,type:a,velocity:i,delay:o,onComplete:s,onUpdate:c,isGenerator:u}=this.options;if(!u&&!n_(t,n,a,i))if(o)this.options.duration=0;else{c==null||c(qf(t,this.options,r)),s==null||s(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,r);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...d},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function fx(e,t){return t?e*(1e3/t):0}const i_=5;function $N(e,t,r){const n=Math.max(t-i_,0);return fx(r-e(n),t-n)}const Gm=.001,o_=.01,s_=10,l_=.05,c_=1;function u_({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let a,i,o=1-t;o=mi(l_,c_,o),e=mi(o_,s_,Ln(e)),o<1?(a=u=>{const d=u*o,f=d*e,p=d-r,h=Lg(u,o),g=Math.exp(-f);return Gm-p/h*g},i=u=>{const f=u*o*e,p=f*r+r,h=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-f),x=Lg(Math.pow(u,2),o);return(-a(u)+Gm>0?-1:1)*((p-h)*g)/x}):(a=u=>{const d=Math.exp(-u*e),f=(u-r)*e+1;return-Gm+d*f},i=u=>{const d=Math.exp(-u*e),f=(r-u)*(e*e);return d*f});const s=5/e,c=f_(a,i,s);if(e=_n(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}const d_=12;function f_(e,t,r){let n=r;for(let a=1;ae[r]!==void 0)}function h_(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Ew(e,m_)&&Ew(e,p_)){const r=u_(e);t={...t,...r,mass:1},t.isResolvedFromDuration=!0}return t}function px({keyframes:e,restDelta:t,restSpeed:r,...n}){const a=e[0],i=e[e.length-1],o={done:!1,value:a},{stiffness:s,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=h_({...n,velocity:-Ln(n.velocity||0)}),h=f||0,g=c/(2*Math.sqrt(s*u)),x=i-a,v=Ln(Math.sqrt(s/u)),y=Math.abs(x)<5;r||(r=y?.01:2),t||(t=y?.005:.5);let b;if(g<1){const w=Lg(v,g);b=j=>{const N=Math.exp(-g*v*j);return i-N*((h+g*v*x)/w*Math.sin(w*j)+x*Math.cos(w*j))}}else if(g===1)b=w=>i-Math.exp(-v*w)*(x+(h+v*x)*w);else{const w=v*Math.sqrt(g*g-1);b=j=>{const N=Math.exp(-g*v*j),S=Math.min(w*j,300);return i-N*((h+g*v*x)*Math.sinh(S)+w*x*Math.cosh(S))/w}}return{calculatedDuration:p&&d||null,next:w=>{const j=b(w);if(p)o.done=w>=d;else{let N=0;g<1&&(N=w===0?_n(h):$N(b,w,j));const S=Math.abs(N)<=r,P=Math.abs(i-j)<=t;o.done=S&&P}return o.value=o.done?i:j,o}}}function Aw({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:o,min:s,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},h=C=>s!==void 0&&Cc,g=C=>s===void 0?c:c===void 0||Math.abs(s-C)-x*Math.exp(-C/n),w=C=>y+b(C),j=C=>{const M=b(C),T=w(C);p.done=Math.abs(M)<=u,p.value=p.done?y:T};let N,S;const P=C=>{h(p.value)&&(N=C,S=px({keyframes:[p.value,g(p.value)],velocity:$N(w,C,p.value),damping:a,stiffness:i,restDelta:u,restSpeed:d}))};return P(0),{calculatedDuration:null,next:C=>{let M=!1;return!S&&N===void 0&&(M=!0,j(C),P(C)),N!==void 0&&C>=N?S.next(C-N):(!M&&j(C),p)}}}const g_=Zc(.42,0,1,1),y_=Zc(0,0,.58,1),zN=Zc(.42,0,.58,1),BN=e=>Array.isArray(e)&&typeof e[0]!="number",mx=e=>Array.isArray(e)&&typeof e[0]=="number",Ow={linear:_t,easeIn:g_,easeInOut:zN,easeOut:y_,circIn:ix,circInOut:bN,circOut:xN,backIn:ax,backInOut:yN,backOut:gN,anticipate:vN},Dg=e=>{if(mx(e)){g0(e.length===4);const[t,r,n,a]=e;return Zc(t,r,n,a)}else if(typeof e=="string")return g0(Ow[e]!==void 0),Ow[e];return e},v_=(e,t)=>r=>t(e(r)),ca=(...e)=>e.reduce(v_),gi=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Ke=(e,t,r)=>e+(t-e)*r;function Ym(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function x_({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let a=0,i=0,o=0;if(!t)a=i=o=r;else{const s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;a=Ym(c,s,e+1/3),i=Ym(c,s,e),o=Ym(c,s,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}function y0(e,t){return r=>r>0?t:e}const qm=(e,t,r)=>{const n=e*e,a=r*(t*t-n)+n;return a<0?0:Math.sqrt(a)},b_=[Ig,Xi,ns],w_=e=>b_.find(t=>t.test(e));function Tw(e){const t=w_(e);if(!t)return!1;let r=t.parse(e);return t===ns&&(r=x_(r)),r}const Mw=(e,t)=>{const r=Tw(e),n=Tw(t);if(!r||!n)return y0(e,t);const a={...r};return i=>(a.red=qm(r.red,n.red,i),a.green=qm(r.green,n.green,i),a.blue=qm(r.blue,n.blue,i),a.alpha=Ke(r.alpha,n.alpha,i),Xi.transform(a))},Rg=new Set(["none","hidden"]);function k_(e,t){return Rg.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function j_(e,t){return r=>Ke(e,t,r)}function hx(e){return typeof e=="number"?j_:typeof e=="string"?ox(e)?y0:Xt.test(e)?Mw:P_:Array.isArray(e)?FN:typeof e=="object"?Xt.test(e)?Mw:N_:y0}function FN(e,t){const r=[...e],n=r.length,a=e.map((i,o)=>hx(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in n)r[i]=n[i](a);return r}}function S_(e,t){var r;const n=[],a={color:0,var:0,number:0};for(let i=0;i{const r=hi.createTransformer(t),n=Nc(e),a=Nc(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?Rg.has(e)&&!a.values.length||Rg.has(t)&&!n.values.length?k_(e,t):ca(FN(S_(n,a),a.values),r):y0(e,t)};function VN(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Ke(e,t,r):hx(e)(e,t)}function C_(e,t,r){const n=[],a=r||VN,i=e.length-1;for(let o=0;ot[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=C_(t,n,a),s=o.length,c=u=>{let d=0;if(s>1)for(;dc(mi(e[0],e[i-1],u)):c}function UN(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const a=gi(0,t,n);e.push(Ke(r,1,a))}}function yx(e){const t=[0];return UN(t,e.length-1),t}function E_(e,t){return e.map(r=>r*t)}function A_(e,t){return e.map(()=>t||zN).splice(0,e.length-1)}function v0({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const a=BN(n)?n.map(Dg):Dg(n),i={done:!1,value:t[0]},o=E_(r&&r.length===t.length?r:yx(t),e),s=gx(o,t,{ease:Array.isArray(a)?a:A_(t,a)});return{calculatedDuration:e,next:c=>(i.value=s(c),i.done=c>=e,i)}}const $g=2e4;function HN(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<$g;)t+=r,n=e.next(t);return t>=$g?1/0:t}const O_=e=>{const t=({timestamp:r})=>e(r);return{start:()=>ye.update(t,!0),stop:()=>wn(t),now:()=>Et.isProcessing?Et.timestamp:Rn.now()}},T_={decay:Aw,inertia:Aw,tween:v0,keyframes:v0,spring:px},M_=e=>e/100;class vx extends RN{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:r,motionValue:n,element:a,keyframes:i}=this.options,o=(a==null?void 0:a.KeyframeResolver)||sx,s=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(i,s,r,n,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:r="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:o=0}=this.options,s=Xf(r)?r:T_[r]||v0;let c,u;s!==v0&&typeof t[0]!="number"&&(c=ca(M_,VN(t[0],t[1])),t=[0,100]);const d=s({...this.options,keyframes:t});i==="mirror"&&(u=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=HN(d));const{calculatedDuration:f}=d,p=f+a,h=p*(n+1)-a;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){const{resolved:n}=this;if(!n){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=n;if(this.startTime===null)return i.next(0);const{delay:p,repeat:h,repeatType:g,repeatDelay:x,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-p*(this.speed>=0?1:-1),b=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,j=i;if(h){const C=Math.min(this.currentTime,d)/f;let M=Math.floor(C),T=C%1;!T&&C>=1&&(T=1),T===1&&M--,M=Math.min(M,h+1),!!(M%2)&&(g==="reverse"?(T=1-T,x&&(T-=x/f)):g==="mirror"&&(j=o)),w=mi(0,1,T)*f}const N=b?{done:!1,value:c[0]}:j.next(w);s&&(N.value=s(N.value));let{done:S}=N;!b&&u!==null&&(S=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return P&&a!==void 0&&(N.value=qf(c,this.options,a)),v&&v(N.value),P&&this.finish(),N}get duration(){const{resolved:t}=this;return t?Ln(t.calculatedDuration):0}get time(){return Ln(this.currentTime)}set time(t){t=_n(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ln(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=O_,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),r&&r();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const I_=new Set(["opacity","clipPath","filter","transform"]),__=10,L_=(e,t)=>{let r="";const n=Math.max(Math.round(t/__),2);for(let a=0;a(t===void 0&&(t=e()),t)}const D_={linearEasing:void 0};function R_(e,t){const r=xx(e);return()=>{var n;return(n=D_[t])!==null&&n!==void 0?n:r()}}const x0=R_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function WN(e){return!!(typeof e=="function"&&x0()||!e||typeof e=="string"&&(e in zg||x0())||mx(e)||Array.isArray(e)&&e.every(WN))}const Dl=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,zg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dl([0,.65,.55,1]),circOut:Dl([.55,0,1,.45]),backIn:Dl([.31,.01,.66,-.59]),backOut:Dl([.33,1.53,.69,.99])};function KN(e,t){if(e)return typeof e=="function"&&x0()?L_(e,t):mx(e)?Dl(e):Array.isArray(e)?e.map(r=>KN(r,t)||zg.easeOut):zg[e]}function $_(e,t,r,{delay:n=0,duration:a=300,repeat:i=0,repeatType:o="loop",ease:s="easeInOut",times:c}={}){const u={[t]:r};c&&(u.offset=c);const d=KN(s,a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:n,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function Iw(e,t){e.timeline=t,e.onfinish=null}const z_=xx(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),b0=10,B_=2e4;function F_(e){return Xf(e.type)||e.type==="spring"||!WN(e.ease)}function V_(e,t){const r=new vx({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:e[0]};const a=[];let i=0;for(;!n.done&&ithis.onKeyframesResolved(o,s),r,n,a),this.resolver.scheduleResolve()}initPlayback(t,r){var n;let{duration:a=300,times:i,ease:o,type:s,motionValue:c,name:u,startTime:d}=this.options;if(!(!((n=c.owner)===null||n===void 0)&&n.current))return!1;if(typeof o=="string"&&x0()&&U_(o)&&(o=GN[o]),F_(this.options)){const{onComplete:p,onUpdate:h,motionValue:g,element:x,...v}=this.options,y=V_(t,v);t=y.keyframes,t.length===1&&(t[1]=t[0]),a=y.duration,i=y.times,o=y.ease,s="keyframes"}const f=$_(c.owner.current,u,t,{...this.options,duration:a,times:i,ease:o});return f.startTime=d??this.calcStartTime(),this.pendingTimeline?(Iw(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:p}=this.options;c.set(qf(t,this.options,r)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:a,times:i,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:r}=t;return Ln(r)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:r}=t;return Ln(r.currentTime||0)}set time(t){const{resolved:r}=this;if(!r)return;const{animation:n}=r;n.currentTime=_n(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:r}=t;return r.playbackRate}set speed(t){const{resolved:r}=this;if(!r)return;const{animation:n}=r;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:r}=t;return r.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:r}=this;if(!r)return _t;const{animation:n}=r;Iw(n,t)}return _t}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:r,keyframes:n,duration:a,type:i,ease:o,times:s}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:p,...h}=this.options,g=new vx({...h,keyframes:n,duration:a,type:i,ease:o,times:s,isGenerator:!0}),x=_n(this.time);u.setWithVelocity(g.sample(x-b0).value,g.sample(x).value,b0)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:r,name:n,repeatDelay:a,repeatType:i,damping:o,type:s}=t;return z_()&&n&&I_.has(n)&&r&&r.owner&&r.owner.current instanceof HTMLElement&&!r.owner.getProps().onUpdate&&!a&&i!=="mirror"&&o!==0&&s!=="inertia"}}const YN=xx(()=>window.ScrollTimeline!==void 0);class qN{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,r){return Promise.all(this.animations).then(t).catch(r)}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;nYN()&&a.attachTimeline?a.attachTimeline(t):r(a));return()=>{n.forEach((a,i)=>{a&&a(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;rr[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function H_({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:o,repeatDelay:s,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const bx=(e,t,r,n={},a,i)=>o=>{const s=nx(n,e)||{},c=s.delay||n.delay||0;let{elapsed:u=0}=n;u=u-_n(c);let d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:a};H_(s)||(d={...d,...mI(e,d)}),d.duration&&(d.duration=_n(d.duration)),d.repeatDelay&&(d.repeatDelay=_n(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const p=qf(d.keyframes,s);if(p!==void 0)return ye.update(()=>{d.onUpdate(p),d.onComplete()}),new qN([])}return!i&&_w.supports(d)?new _w(d):new vx(d)},W_=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),K_=e=>Og(e)?e[e.length-1]||0:e;function wx(e,t){e.indexOf(t)===-1&&e.push(t)}function Zf(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class kx{constructor(){this.subscriptions=[]}add(t){return wx(this.subscriptions,t),()=>Zf(this.subscriptions,t)}notify(t,r,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,r,n);else for(let i=0;i!isNaN(parseFloat(e)),Jl={current:void 0};class Y_{constructor(t,r={}){this.version="11.11.17",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{const i=Rn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Rn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=G_(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new kx);const n=this.events[t].add(r);return t==="change"?()=>{n(),ye.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Jl.current&&Jl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Rn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Lw)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,Lw);return fx(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function On(e,t){return new Y_(e,t)}function q_(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,On(r))}function X_(e,t){const r=Yf(e,t);let{transitionEnd:n={},transition:a={},...i}=r||{};i={...i,...n};for(const o in i){const s=K_(i[o]);q_(e,o,s)}}const jx=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Z_="framerAppearId",XN="data-"+jx(Z_);function ZN(e){return e.props[XN]}const Tt=e=>!!(e&&e.getVelocity);function Q_(e){return!!(Tt(e)&&e.add)}function Bg(e,t){const r=e.getValue("willChange");if(Q_(r))return r.add(t)}function J_({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function Nx(e,t,{delay:r=0,transitionOverride:n,type:a}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...c}=t;n&&(o=n);const u=[],d=a&&e.animationState&&e.animationState.getState()[a];for(const f in c){const p=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),h=c[f];if(h===void 0||d&&J_(d,f))continue;const g={delay:r,...nx(o||{},f)};let x=!1;if(window.MotionHandoffAnimation){const y=ZN(e);if(y){const b=window.MotionHandoffAnimation(y,f,ye);b!==null&&(g.startTime=b,x=!0)}}Bg(e,f),p.start(bx(f,p,h,e.shouldReduceMotion&&Lo.has(f)?{type:!1}:g,e,x));const v=p.animation;v&&u.push(v)}return s&&Promise.all(u).then(()=>{ye.update(()=>{s&&X_(e,s)})}),u}function Fg(e,t,r={}){var n;const a=Yf(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};r.transitionOverride&&(i=r.transitionOverride);const o=a?()=>Promise.all(Nx(e,a,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=i;return eL(e,t,d+u,f,p,r)}:()=>Promise.resolve(),{when:c}=i;if(c){const[u,d]=c==="beforeChildren"?[o,s]:[s,o];return u().then(()=>d())}else return Promise.all([o(),s(r.delay)])}function eL(e,t,r=0,n=0,a=1,i){const o=[],s=(e.variantChildren.size-1)*n,c=a===1?(u=0)=>u*n:(u=0)=>s-u*n;return Array.from(e.variantChildren).sort(tL).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(Fg(u,t,{...i,delay:r+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function tL(e,t){return e.sortNodePosition(t)}function rL(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const a=t.map(i=>Fg(e,i,r));n=Promise.all(a)}else if(typeof t=="string")n=Fg(e,t,r);else{const a=typeof t=="function"?Yf(e,t,r.custom):t;n=Promise.all(Nx(e,a,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}const nL=rx.length;function QN(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?QN(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;rPromise.all(t.map(({animation:r,options:n})=>rL(e,r,n)))}function sL(e){let t=oL(e),r=Dw(),n=!0;const a=c=>(u,d)=>{var f;const p=Yf(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(p){const{transition:h,transitionEnd:g,...x}=p;u={...u,...x,...g}}return u};function i(c){t=c(e)}function o(c){const{props:u}=e,d=QN(e.parent)||{},f=[],p=new Set;let h={},g=1/0;for(let v=0;vg&&j,M=!1;const T=Array.isArray(w)?w:[w];let A=T.reduce(a(y),{});N===!1&&(A={});const{prevResolvedValues:E={}}=b,_={...E,...A},L=V=>{C=!0,p.has(V)&&(M=!0,p.delete(V)),b.needsAnimating[V]=!0;const O=e.getValue(V);O&&(O.liveStyle=!1)};for(const V in _){const O=A[V],R=E[V];if(h.hasOwnProperty(V))continue;let U=!1;Og(O)&&Og(R)?U=!dN(O,R):U=O!==R,U?O!=null?L(V):p.add(V):O!==void 0&&p.has(V)?L(V):b.protectedKeys[V]=!0}b.prevProp=w,b.prevResolvedValues=A,b.isActive&&(h={...h,...A}),n&&e.blockInitialAnimation&&(C=!1),C&&(!(S&&P)||M)&&f.push(...T.map(V=>({animation:V,options:{type:y}})))}if(p.size){const v={};p.forEach(y=>{const b=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),v[y]=b??null}),f.push({animation:v})}let x=!!f.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),n=!1,x?t(f):Promise.resolve()}function s(c,u){var d;if(r[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var h;return(h=p.animationState)===null||h===void 0?void 0:h.setActive(c,u)}),r[c].isActive=u;const f=o(c);for(const p in r)r[p].protectedKeys={};return f}return{animateChanges:o,setActive:s,setAnimateFunction:i,getState:()=>r,reset:()=>{r=Dw(),n=!0}}}function lL(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!dN(t,e):!1}function Ri(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Dw(){return{animate:Ri(!0),whileInView:Ri(),whileHover:Ri(),whileTap:Ri(),whileDrag:Ri(),whileFocus:Ri(),exit:Ri()}}class Ei{constructor(t){this.isMounted=!1,this.node=t}update(){}}class cL extends Ei{constructor(t){super(t),t.animationState||(t.animationState=sL(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gf(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let uL=0;class dL extends Ei{constructor(){super(...arguments),this.id=uL++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const a=this.node.animationState.setActive("exit",!t);r&&!t&&a.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const fL={animation:{Feature:cL},exit:{Feature:dL}},JN=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Qf(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const pL=e=>t=>JN(t)&&e(t,Qf(t));function na(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function ua(e,t,r,n){return na(e,t,pL(r),n)}const Rw=(e,t)=>Math.abs(e-t);function mL(e,t){const r=Rw(e.x,t.x),n=Rw(e.y,t.y);return Math.sqrt(r**2+n**2)}class eS{constructor(t,r,{transformPagePoint:n,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Zm(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=mL(f.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:g}=f,{timestamp:x}=Et;this.history.push({...g,timestamp:x});const{onStart:v,onMove:y}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xm(p,this.transformPagePoint),ye.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:h,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Zm(f.type==="pointercancel"?this.lastMoveEventInfo:Xm(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),g&&g(f,v)},!JN(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.contextWindow=a||window;const o=Qf(t),s=Xm(o,this.transformPagePoint),{point:c}=s,{timestamp:u}=Et;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=r;d&&d(t,Zm(s,this.history)),this.removeListeners=ca(ua(this.contextWindow,"pointermove",this.handlePointerMove),ua(this.contextWindow,"pointerup",this.handlePointerUp),ua(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),wn(this.updatePoint)}}function Xm(e,t){return t?{point:t(e.point)}:e}function $w(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zm({point:e},t){return{point:e,delta:$w(e,tS(t)),offset:$w(e,hL(t)),velocity:gL(t,.1)}}function hL(e){return e[0]}function tS(e){return e[e.length-1]}function gL(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const a=tS(e);for(;r>=0&&(n=e[r],!(a.timestamp-n.timestamp>_n(t)));)r--;if(!n)return{x:0,y:0};const i=Ln(a.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const o={x:(a.x-n.x)/i,y:(a.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function rS(e){let t=null;return()=>{const r=()=>{t=null};return t===null?(t=e,r):!1}}const zw=rS("dragHorizontal"),Bw=rS("dragVertical");function nS(e){let t=!1;if(e==="y")t=Bw();else if(e==="x")t=zw();else{const r=zw(),n=Bw();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function aS(){const e=nS(!0);return e?(e(),!1):!0}function as(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const iS=1e-4,yL=1-iS,vL=1+iS,oS=.01,xL=0-oS,bL=0+oS;function Rr(e){return e.max-e.min}function wL(e,t,r){return Math.abs(e-t)<=r}function Fw(e,t,r,n=.5){e.origin=n,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=Rr(r)/Rr(t),e.translate=Ke(r.min,r.max,e.origin)-e.originPoint,(e.scale>=yL&&e.scale<=vL||isNaN(e.scale))&&(e.scale=1),(e.translate>=xL&&e.translate<=bL||isNaN(e.translate))&&(e.translate=0)}function ec(e,t,r,n){Fw(e.x,t.x,r.x,n?n.originX:void 0),Fw(e.y,t.y,r.y,n?n.originY:void 0)}function Vw(e,t,r){e.min=r.min+t.min,e.max=e.min+Rr(t)}function kL(e,t,r){Vw(e.x,t.x,r.x),Vw(e.y,t.y,r.y)}function Uw(e,t,r){e.min=t.min-r.min,e.max=e.min+Rr(t)}function tc(e,t,r){Uw(e.x,t.x,r.x),Uw(e.y,t.y,r.y)}function jL(e,{min:t,max:r},n){return t!==void 0&&er&&(e=n?Ke(r,e,n.max):Math.min(e,r)),e}function Hw(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function NL(e,{top:t,left:r,bottom:n,right:a}){return{x:Hw(e.x,r,a),y:Hw(e.y,t,n)}}function Ww(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.minn?r=gi(t.min,t.max-n,e.min):n>a&&(r=gi(e.min,e.max-a,t.min)),mi(0,1,r)}function CL(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Vg=.35;function EL(e=Vg){return e===!1?e=0:e===!0&&(e=Vg),{x:Kw(e,"left","right"),y:Kw(e,"top","bottom")}}function Kw(e,t,r){return{min:Gw(e,t),max:Gw(e,r)}}function Gw(e,t){return typeof e=="number"?e:e[t]||0}const Yw=()=>({translate:0,scale:1,origin:0,originPoint:0}),is=()=>({x:Yw(),y:Yw()}),qw=()=>({min:0,max:0}),nt=()=>({x:qw(),y:qw()});function Yr(e){return[e("x"),e("y")]}function sS({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function AL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function OL(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function Qm(e){return e===void 0||e===1}function Ug({scale:e,scaleX:t,scaleY:r}){return!Qm(e)||!Qm(t)||!Qm(r)}function Bi(e){return Ug(e)||lS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function lS(e){return Xw(e.x)||Xw(e.y)}function Xw(e){return e&&e!=="0%"}function w0(e,t,r){const n=e-r,a=t*n;return r+a}function Zw(e,t,r,n,a){return a!==void 0&&(e=w0(e,a,n)),w0(e,r,n)+t}function Hg(e,t=0,r=1,n,a){e.min=Zw(e.min,t,r,n,a),e.max=Zw(e.max,t,r,n,a)}function cS(e,{x:t,y:r}){Hg(e.x,t.translate,t.scale,t.originPoint),Hg(e.y,r.translate,r.scale,r.originPoint)}const Qw=.999999999999,Jw=1.0000000000001;function TL(e,t,r,n=!1){const a=r.length;if(!a)return;t.x=t.y=1;let i,o;for(let s=0;sQw&&(t.x=1),t.yQw&&(t.y=1)}function os(e,t){e.min=e.min+t,e.max=e.max+t}function e4(e,t,r,n,a=.5){const i=Ke(e.min,e.max,a);Hg(e,t,r,i,n)}function ss(e,t){e4(e.x,t.x,t.scaleX,t.scale,t.originX),e4(e.y,t.y,t.scaleY,t.scale,t.originY)}function uS(e,t){return sS(OL(e.getBoundingClientRect(),t))}function ML(e,t,r){const n=uS(e,r),{scroll:a}=t;return a&&(os(n.x,a.offset.x),os(n.y,a.offset.y)),n}const dS=({current:e})=>e?e.ownerDocument.defaultView:null,IL=new WeakMap;class _L{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const a=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Qf(d,"page").point)},i=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:g}=this.getProps();if(p&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=nS(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yr(v=>{let y=this.getAxisMotionValue(v).get()||0;if(Dn.test(y)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[v];w&&(y=Rr(w)*(parseFloat(y)/100))}}this.originPoint[v]=y}),g&&ye.postRender(()=>g(d,f)),Bg(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:g,onDrag:x}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=LL(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&x(d,f)},s=(d,f)=>this.stop(d,f),c=()=>Yr(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new eS(t,{onSessionStart:a,onStart:i,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:dS(this.visualElement)})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&ye.postRender(()=>i(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:a}=this.getProps();if(!n||!Gu(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=jL(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:r,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;r&&as(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&a?this.constraints=NL(a.layoutBox,r):this.constraints=!1,this.elastic=EL(n),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&Yr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=CL(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!as(t))return!1;const n=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=ML(n,a.root,this.visualElement.getTransformPagePoint());let o=SL(a.layout.layoutBox,i);if(r){const s=r(AL(o));this.hasMutatedConstraints=!!s,s&&(o=sS(s))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:a,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},u=Yr(d=>{if(!Gu(d,r,this.currentDirection))return;let f=c&&c[d]||{};o&&(f={min:0,max:0});const p=a?200:1e6,h=a?40:1e7,g={type:"inertia",velocity:n?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Bg(this.visualElement,t),n.start(bx(t,n,0,r,this.visualElement,!1))}stopAnimation(){Yr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Yr(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),a=n[r];return a||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Yr(r=>{const{drag:n}=this.getProps();if(!Gu(r,n,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(r);if(a&&a.layout){const{min:o,max:s}=a.layout.layoutBox[r];i.set(t[r]-Ke(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!as(r)||!n||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};Yr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const c=s.get();a[o]=PL({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Yr(o=>{if(!Gu(o,t,null))return;const s=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];s.set(Ke(c,u,a[o]))})}addListeners(){if(!this.visualElement.current)return;IL.set(this.visualElement,this);const t=this.visualElement.current,r=ua(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();as(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",n);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),ye.read(n);const o=na(window,"resize",()=>this.scalePositionWithinConstraints()),s=a.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Yr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),r(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:o=Vg,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:a,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function Gu(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function LL(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class DL extends Ei{constructor(t){super(t),this.removeGroupControls=_t,this.removeListeners=_t,this.controls=new _L(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_t}unmount(){this.removeGroupControls(),this.removeListeners()}}const t4=e=>(t,r)=>{e&&ye.postRender(()=>e(t,r))};class RL extends Ei{constructor(){super(...arguments),this.removePointerDownListener=_t}onPointerDown(t){this.session=new eS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:a}=this.node.getProps();return{onSessionStart:t4(t),onStart:t4(r),onMove:n,onEnd:(i,o)=>{delete this.session,a&&ye.postRender(()=>a(i,o))}}}mount(){this.removePointerDownListener=ua(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Jf=m.createContext(null);function $L(){const e=m.useContext(Jf);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:n}=e,a=m.useId();m.useEffect(()=>n(a),[]);const i=m.useCallback(()=>r&&r(a),[a,r]);return!t&&r?[!1,i]:[!0]}const Sx=m.createContext({}),fS=m.createContext({}),Ed={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function r4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;const r=r4(e,t.target.x),n=r4(e,t.target.y);return`${r}% ${n}%`}},zL={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,a=hi.parse(e);if(a.length>5)return n;const i=hi.createTransformer(e),o=typeof a[0]!="number"?1:0,s=r.x.scale*t.x,c=r.y.scale*t.y;a[0+o]/=s,a[1+o]/=c;const u=Ke(s,c,.5);return typeof a[2+o]=="number"&&(a[2+o]/=u),typeof a[3+o]=="number"&&(a[3+o]/=u),i(a)}},k0={};function BL(e){Object.assign(k0,e)}const{schedule:Px,cancel:Ace}=fN(queueMicrotask,!1);class FL extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:a}=this.props,{projection:i}=t;BL(VL),i&&(r.group&&r.group.add(i),n&&n.register&&a&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Ed.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:a,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,a||t.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ye.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Px.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(a),n&&n.deregister&&n.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function pS(e){const[t,r]=$L(),n=m.useContext(Sx);return l.jsx(FL,{...e,layoutGroup:n,switchLayoutGroup:m.useContext(fS),isPresent:t,safeToRemove:r})}const VL={borderRadius:{...vl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vl,borderTopRightRadius:vl,borderBottomLeftRadius:vl,borderBottomRightRadius:vl,boxShadow:zL},mS=["TopLeft","TopRight","BottomLeft","BottomRight"],UL=mS.length,n4=e=>typeof e=="string"?parseFloat(e):e,a4=e=>typeof e=="number"||ue.test(e);function HL(e,t,r,n,a,i){a?(e.opacity=Ke(0,r.opacity!==void 0?r.opacity:1,WL(n)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,KL(n))):i&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;ont?1:r(gi(e,t,n))}function o4(e,t){e.min=t.min,e.max=t.max}function Hr(e,t){o4(e.x,t.x),o4(e.y,t.y)}function s4(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function l4(e,t,r,n,a){return e-=t,e=w0(e,1/r,n),a!==void 0&&(e=w0(e,1/a,n)),e}function GL(e,t=0,r=1,n=.5,a,i=e,o=e){if(Dn.test(t)&&(t=parseFloat(t),t=Ke(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=Ke(i.min,i.max,n);e===i&&(s-=t),e.min=l4(e.min,t,r,s,a),e.max=l4(e.max,t,r,s,a)}function c4(e,t,[r,n,a],i,o){GL(e,t[r],t[n],t[a],t.scale,i,o)}const YL=["x","scaleX","originX"],qL=["y","scaleY","originY"];function u4(e,t,r,n){c4(e.x,t,YL,r?r.x:void 0,n?n.x:void 0),c4(e.y,t,qL,r?r.y:void 0,n?n.y:void 0)}function d4(e){return e.translate===0&&e.scale===1}function gS(e){return d4(e.x)&&d4(e.y)}function f4(e,t){return e.min===t.min&&e.max===t.max}function XL(e,t){return f4(e.x,t.x)&&f4(e.y,t.y)}function p4(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yS(e,t){return p4(e.x,t.x)&&p4(e.y,t.y)}function m4(e){return Rr(e.x)/Rr(e.y)}function h4(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ZL{constructor(){this.members=[]}add(t){wx(this.members,t),t.scheduleRender()}remove(t){if(Zf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(a=>t===a);if(r===0)return!1;let n;for(let a=r;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function QL(e,t,r){let n="";const a=e.x.translate/t.x,i=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((a||i||o)&&(n=`translate3d(${a}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:h,skewY:g}=r;u&&(n=`perspective(${u}px) ${n}`),d&&(n+=`rotate(${d}deg) `),f&&(n+=`rotateX(${f}deg) `),p&&(n+=`rotateY(${p}deg) `),h&&(n+=`skewX(${h}deg) `),g&&(n+=`skewY(${g}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(n+=`scale(${s}, ${c})`),n||"none"}const JL=(e,t)=>e.depth-t.depth;class eD{constructor(){this.children=[],this.isDirty=!1}add(t){wx(this.children,t),this.isDirty=!0}remove(t){Zf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(JL),this.isDirty=!1,this.children.forEach(t)}}function Ad(e){const t=Tt(e)?e.get():e;return W_(t)?t.toValue():t}function tD(e,t){const r=Rn.now(),n=({timestamp:a})=>{const i=a-r;i>=t&&(wn(n),e(i-t))};return ye.read(n,!0),()=>wn(n)}function vS(e){return e instanceof SVGElement&&e.tagName!=="svg"}function xS(e,t,r){const n=Tt(e)?e:On(e);return n.start(bx("",n,t,r)),n.animation}const Fi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Rl=typeof window<"u"&&window.MotionDebug!==void 0,Jm=["","X","Y","Z"],rD={visibility:"hidden"},g4=1e3;let nD=0;function eh(e,t,r,n){const{latestValues:a}=t;a[e]&&(r[e]=a[e],t.setStaticValue(e,0),n&&(n[e]=0))}function bS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=ZN(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",ye,!(a||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&bS(n)}function wS({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:a}){return class{constructor(o={},s=t==null?void 0:t()){this.id=nD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Rl&&(Fi.totalNodes=Fi.resolvedTargetDeltas=Fi.recalculatedProjection=0),this.nodes.forEach(oD),this.nodes.forEach(dD),this.nodes.forEach(fD),this.nodes.forEach(sD),Rl&&window.MotionDebug.record(Fi)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=tD(p,250),Ed.hasAnimatedSinceResize&&(Ed.hasAnimatedSinceResize=!1,this.nodes.forEach(v4))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:h,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||yD,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=d.getProps(),b=!this.targetLayout||!yS(this.targetLayout,g)||h,w=!p&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const j={...nx(x,"layout"),onPlay:v,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else p||v4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,wn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(pD),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&bS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const N=j/1e3;x4(f.x,o.x,N),x4(f.y,o.y,N),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),hD(this.relativeTarget,this.relativeTargetOrigin,p,N),w&&XL(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=nt()),Hr(w,this.relativeTarget)),x&&(this.animationValues=d,HL(d,u,this.latestValues,N,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(wn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ye.update(()=>{Ed.hasAnimatedSinceResize=!0,this.currentAnimation=xS(0,g4,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(g4),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:c,layout:u,latestValues:d}=o;if(!(!s||!c||!u)){if(this!==o&&this.layout&&u&&kS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||nt();const f=Rr(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const p=Rr(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}Hr(s,c),ss(s,d),ec(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ZL),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const u={};c.z&&eh("z",o,u,this.animationValues);for(let d=0;d{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(y4),this.root.sharedNodes.clear()}}}function aD(e){e.updateLayout()}function iD(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:a}=e.layout,{animationType:i}=e.options,o=r.source!==e.layout.source;i==="size"?Yr(f=>{const p=o?r.measuredBox[f]:r.layoutBox[f],h=Rr(p);p.min=n[f].min,p.max=p.min+h}):kS(i,r.layoutBox,n)&&Yr(f=>{const p=o?r.measuredBox[f]:r.layoutBox[f],h=Rr(n[f]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const s=is();ec(s,n,r.layoutBox);const c=is();o?ec(c,e.applyTransform(a,!0),r.measuredBox):ec(c,n,r.layoutBox);const u=!gS(s);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:h}=f;if(p&&h){const g=nt();tc(g,r.layoutBox,p.layoutBox);const x=nt();tc(x,n,h.layoutBox),yS(g,x)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function oD(e){Rl&&Fi.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lD(e){e.clearSnapshot()}function y4(e){e.clearMeasurements()}function cD(e){e.isLayoutDirty=!1}function uD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function v4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function dD(e){e.resolveTargetDelta()}function fD(e){e.calcProjection()}function pD(e){e.resetSkewAndRotation()}function mD(e){e.removeLeadSnapshot()}function x4(e,t,r){e.translate=Ke(t.translate,0,r),e.scale=Ke(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function b4(e,t,r,n){e.min=Ke(t.min,r.min,n),e.max=Ke(t.max,r.max,n)}function hD(e,t,r,n){b4(e.x,t.x,r.x,n),b4(e.y,t.y,r.y,n)}function gD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yD={duration:.45,ease:[.4,0,.1,1]},w4=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),k4=w4("applewebkit/")&&!w4("chrome/")?Math.round:_t;function j4(e){e.min=k4(e.min),e.max=k4(e.max)}function vD(e){j4(e.x),j4(e.y)}function kS(e,t,r){return e==="position"||e==="preserve-aspect"&&!wL(m4(t),m4(r),.2)}function xD(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bD=wS({attachResizeListener:(e,t)=>na(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),th={current:void 0},jS=wS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!th.current){const e=new bD({});e.mount(window),e.setOptions({layoutScroll:!0}),th.current=e}return th.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wD={pan:{Feature:RL},drag:{Feature:DL,ProjectionNode:jS,MeasureLayout:pS}};function N4(e,t){const r=t?"pointerenter":"pointerleave",n=t?"onHoverStart":"onHoverEnd",a=(i,o)=>{if(i.pointerType==="touch"||aS())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const c=s[n];c&&ye.postRender(()=>c(i,o))};return ua(e.current,r,a,{passive:!e.getProps()[n]})}class kD extends Ei{mount(){this.unmount=ca(N4(this.node,!0),N4(this.node,!1))}unmount(){}}class jD extends Ei{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ca(na(this.node.current,"focus",()=>this.onFocus()),na(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const NS=(e,t)=>t?e===t?!0:NS(e,t.parentElement):!1;function rh(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,Qf(r))}class ND extends Ei{constructor(){super(...arguments),this.removeStartListeners=_t,this.removeEndListeners=_t,this.removeAccessibleListeners=_t,this.startPointerPress=(t,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=ua(window,"pointerup",(s,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d,globalTapTarget:f}=this.node.getProps(),p=!f&&!NS(this.node.current,s.target)?d:u;p&&ye.update(()=>p(s,c))},{passive:!(n.onTap||n.onPointerUp)}),o=ua(window,"pointercancel",(s,c)=>this.cancelPress(s,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ca(i,o),this.startPress(t,r)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||rh("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&ye.postRender(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=na(this.node.current,"keyup",o),rh("down",(s,c)=>{this.startPress(s,c)})},r=na(this.node.current,"keydown",t),n=()=>{this.isPressing&&rh("cancel",(i,o)=>this.cancelPress(i,o))},a=na(this.node.current,"blur",n);this.removeAccessibleListeners=ca(r,a)}}startPress(t,r){this.isPressing=!0;const{onTapStart:n,whileTap:a}=this.node.getProps();a&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&ye.postRender(()=>n(t,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!aS()}cancelPress(t,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&ye.postRender(()=>n(t,r))}mount(){const t=this.node.getProps(),r=ua(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=na(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ca(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Wg=new WeakMap,nh=new WeakMap,SD=e=>{const t=Wg.get(e.target);t&&t(e)},PD=e=>{e.forEach(SD)};function CD({root:e,...t}){const r=e||document;nh.has(r)||nh.set(r,{});const n=nh.get(r),a=JSON.stringify(t);return n[a]||(n[a]=new IntersectionObserver(PD,{root:e,...t})),n[a]}function ED(e,t,r){const n=CD(t);return Wg.set(e,r),n.observe(e),()=>{Wg.delete(e),n.unobserve(e)}}const AD={some:0,all:1};class OD extends Ei{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:a="some",once:i}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof a=="number"?a:AD[a]},s=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(c)};return ED(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(TD(t,r))&&this.startObserver()}unmount(){}}function TD({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const MD={inView:{Feature:OD},tap:{Feature:ND},focus:{Feature:jD},hover:{Feature:kD}},ID={layout:{ProjectionNode:jS,MeasureLayout:pS}},ep=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),tp=m.createContext({}),Cx=typeof window<"u",rp=Cx?m.useLayoutEffect:m.useEffect,SS=m.createContext({strict:!1});function _D(e,t,r,n,a){var i,o;const{visualElement:s}=m.useContext(tp),c=m.useContext(SS),u=m.useContext(Jf),d=m.useContext(ep).reducedMotion,f=m.useRef();n=n||c.renderer,!f.current&&n&&(f.current=n(e,{visualState:t,parent:s,props:r,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const p=f.current,h=m.useContext(fS);p&&!p.projection&&a&&(p.type==="html"||p.type==="svg")&&LD(f.current,r,a,h);const g=m.useRef(!1);m.useInsertionEffect(()=>{p&&g.current&&p.update(r,u)});const x=r[XN],v=m.useRef(!!x&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,x))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,x)));return rp(()=>{p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Px.render(p.render),v.current&&p.animationState&&p.animationState.animateChanges())}),m.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,x)}),v.current=!1))}),p}function LD(e,t,r,n){const{layoutId:a,layout:i,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:PS(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!o||s&&as(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,layoutScroll:c,layoutRoot:u})}function PS(e){if(e)return e.options.allowProjection!==!1?e.projection:PS(e.parent)}function DD(e,t,r){return m.useCallback(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):as(r)&&(r.current=n))},[t])}function np(e){return Gf(e.animate)||rx.some(t=>kc(e[t]))}function CS(e){return!!(np(e)||e.variants)}function RD(e,t){if(np(e)){const{initial:r,animate:n}=e;return{initial:r===!1||kc(r)?r:void 0,animate:kc(n)?n:void 0}}return e.inherit!==!1?t:{}}function $D(e){const{initial:t,animate:r}=RD(e,m.useContext(tp));return m.useMemo(()=>({initial:t,animate:r}),[S4(t),S4(r)])}function S4(e){return Array.isArray(e)?e.join(" "):e}const P4={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ts={};for(const e in P4)Ts[e]={isEnabled:t=>P4[e].some(r=>!!t[r])};function zD(e){for(const t in e)Ts[t]={...Ts[t],...e[t]}}const BD=Symbol.for("motionComponentSymbol");function FD({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:a}){e&&zD(e);function i(s,c){let u;const d={...m.useContext(ep),...s,layoutId:VD(s)},{isStatic:f}=d,p=$D(s),h=n(s,f);if(!f&&Cx){UD();const g=HD(d);u=g.MeasureLayout,p.visualElement=_D(a,h,d,t,g.ProjectionNode)}return l.jsxs(tp.Provider,{value:p,children:[u&&p.visualElement?l.jsx(u,{visualElement:p.visualElement,...d}):null,r(a,s,DD(h,p.visualElement,c),h,f,p.visualElement)]})}const o=m.forwardRef(i);return o[BD]=a,o}function VD({layoutId:e}){const t=m.useContext(Sx).id;return t&&e!==void 0?t+"-"+e:e}function UD(e,t){m.useContext(SS).strict}function HD(e){const{drag:t,layout:r}=Ts;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const WD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ex(e){return typeof e!="string"||e.includes("-")?!1:!!(WD.indexOf(e)>-1||/[A-Z]/u.test(e))}function ES(e,{style:t,vars:r},n,a){Object.assign(e.style,t,a&&a.getProjectionStyles(n));for(const i in r)e.style.setProperty(i,r[i])}const AS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function OS(e,t,r,n){ES(e,t,void 0,n);for(const a in t.attrs)e.setAttribute(AS.has(a)?a:jx(a),t.attrs[a])}function TS(e,{layout:t,layoutId:r}){return Lo.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!k0[e]||e==="opacity")}function Ax(e,t,r){var n;const{style:a}=e,i={};for(const o in a)(Tt(a[o])||t.style&&Tt(t.style[o])||TS(o,e)||((n=r==null?void 0:r.getValue(o))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(i[o]=a[o]);return i}function MS(e,t,r){const n=Ax(e,t,r);for(const a in e)if(Tt(e[a])||Tt(t[a])){const i=Xc.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=e[a]}return n}function yi(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}function KD({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,a,i){const o={latestValues:GD(n,a,i,e),renderState:t()};return r&&(o.mount=s=>r(n,s,o)),o}const IS=e=>(t,r)=>{const n=m.useContext(tp),a=m.useContext(Jf),i=()=>KD(e,t,n,a);return r?i():yi(i)};function GD(e,t,r,n){const a={},i=n(e,{});for(const p in i)a[p]=Ad(i[p]);let{initial:o,animate:s}=e;const c=np(e),u=CS(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let d=r?r.initial===!1:!1;d=d||o===!1;const f=d?s:o;if(f&&typeof f!="boolean"&&!Gf(f)){const p=Array.isArray(f)?f:[f];for(let h=0;h({style:{},transform:{},transformOrigin:{},vars:{}}),_S=()=>({...Ox(),attrs:{}}),LS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,YD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qD=Xc.length;function XD(e,t,r){let n="",a=!0;for(let i=0;itypeof e=="string"&&e.toLowerCase()==="svg",tR={useVisualState:IS({scrapeMotionValuesFromProps:MS,createRenderState:_S,onMount:(e,t,{renderState:r,latestValues:n})=>{ye.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),ye.render(()=>{Mx(r,n,Ix(t.tagName),e.transformTemplate),OS(t,r)})}})},rR={useVisualState:IS({scrapeMotionValuesFromProps:Ax,createRenderState:Ox})};function DS(e,t,r){for(const n in t)!Tt(t[n])&&!TS(n,r)&&(e[n]=t[n])}function nR({transformTemplate:e},t){return m.useMemo(()=>{const r=Ox();return Tx(r,t,e),Object.assign({},r.vars,r.style)},[t])}function aR(e,t){const r=e.style||{},n={};return DS(n,r,e),Object.assign(n,nR(e,t)),n}function iR(e,t){const r={},n=aR(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const oR=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function j0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oR.has(e)}let RS=e=>!j0(e);function sR(e){e&&(RS=t=>t.startsWith("on")?!j0(t):e(t))}try{sR(require("@emotion/is-prop-valid").default)}catch{}function lR(e,t,r){const n={};for(const a in e)a==="values"&&typeof e.values=="object"||(RS(a)||r===!0&&j0(a)||!t&&!j0(a)||e.draggable&&a.startsWith("onDrag"))&&(n[a]=e[a]);return n}function cR(e,t,r,n){const a=m.useMemo(()=>{const i=_S();return Mx(i,t,Ix(n),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};DS(i,e.style,e),a.style={...i,...a.style}}return a}function uR(e=!1){return(r,n,a,{latestValues:i},o)=>{const c=(Ex(r)?cR:iR)(n,i,o,r),u=lR(n,typeof r=="string",e),d=r!==m.Fragment?{...u,...c,ref:a}:{},{children:f}=n,p=m.useMemo(()=>Tt(f)?f.get():f,[f]);return m.createElement(r,{...d,children:p})}}function dR(e,t){return function(n,{forwardMotionProps:a}={forwardMotionProps:!1}){const o={...Ex(n)?tR:rR,preloadedFeatures:e,useRender:uR(a),createVisualElement:t,Component:n};return FD(o)}}const Kg={current:null},$S={current:!1};function fR(){if($S.current=!0,!!Cx)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kg.current=e.matches;e.addListener(t),t()}else Kg.current=!1}function pR(e,t,r){for(const n in t){const a=t[n],i=r[n];if(Tt(a))e.addValue(n,a);else if(Tt(i))e.addValue(n,On(a,{owner:e}));else if(i!==a)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(a):o.hasAnimated||o.set(a)}else{const o=e.getStaticValue(n);e.addValue(n,On(o!==void 0?o:a,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const Ms=new WeakMap,mR=[...CN,Xt,hi],hR=e=>mR.find(PN(e)),E4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class zS{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=sx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Rn.now();this.renderScheduledAtthis.bindToMotionValue(n,r)),$S.current||fR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kg.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ms.delete(this.current),this.projection&&this.projection.unmount(),wn(this.notifyUpdate),wn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Lo.has(t),a=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ye.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{a(),i(),o&&o(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ts){const r=Ts[t];if(!r)continue;const{isEnabled:n,Feature:a}=r;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;nr.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=On(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(kN(a)||wN(a))?a=parseFloat(a):!hR(a)&&hi.test(r)&&(a=LN(t,r)),this.setBaseTarget(t,Tt(a)?a.get():a)),Tt(a)?a.get():a}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props;let a;if(typeof n=="string"||typeof n=="object"){const o=ex(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);o&&(a=o[t])}if(n&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Tt(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new kx),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class BS extends zS{constructor(){super(...arguments),this.KeyframeResolver=DN}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}}function gR(e){return window.getComputedStyle(e)}class FS extends BS{constructor(){super(...arguments),this.type="html",this.renderInstance=ES}readValueFromInstance(t,r){if(Lo.has(r)){const n=dx(r);return n&&n.default||0}else{const n=gR(t),a=(NN(r)?n.getPropertyValue(r):n[r])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:r}){return uS(t,r)}build(t,r,n){Tx(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Ax(t,r,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Tt(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class VS extends BS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Lo.has(r)){const n=dx(r);return n&&n.default||0}return r=AS.has(r)?r:jx(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return MS(t,r,n)}build(t,r,n){Mx(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,a){OS(t,r,n,a)}mount(t){this.isSVGTag=Ix(t.tagName),super.mount(t)}}const yR=(e,t)=>Ex(e)?new VS(t):new FS(t,{allowProjection:e!==m.Fragment}),vR=dR({...fL,...MD,...wD,...ID},yR),k=cI(vR);class xR extends m.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bR({children:e,isPresent:t}){const r=m.useId(),n=m.useRef(null),a=m.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=m.useContext(ep);return m.useInsertionEffect(()=>{const{width:o,height:s,top:c,left:u}=a.current;if(t||!n.current||!o||!s)return;n.current.dataset.motionPopId=r;const d=document.createElement("style");return i&&(d.nonce=i),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` + [data-motion-pop-id="${r}"] { + position: absolute !important; + width: ${o}px !important; + height: ${s}px !important; + top: ${c}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(d)}},[t]),l.jsx(xR,{isPresent:t,childRef:n,sizeRef:a,children:m.cloneElement(e,{ref:n})})}const wR=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:a,presenceAffectsLayout:i,mode:o})=>{const s=yi(kR),c=m.useId(),u=m.useCallback(f=>{s.set(f,!0);for(const p of s.values())if(!p)return;n&&n()},[s,n]),d=m.useMemo(()=>({id:c,initial:t,isPresent:r,custom:a,onExitComplete:u,register:f=>(s.set(f,!1),()=>s.delete(f))}),i?[Math.random(),u]:[r,u]);return m.useMemo(()=>{s.forEach((f,p)=>s.set(p,!1))},[r]),m.useEffect(()=>{!r&&!s.size&&n&&n()},[r]),o==="popLayout"&&(e=l.jsx(bR,{isPresent:r,children:e})),l.jsx(Jf.Provider,{value:d,children:e})};function kR(){return new Map}const Yu=e=>e.key||"";function A4(e){const t=[];return m.Children.forEach(e,r=>{m.isValidElement(r)&&t.push(r)}),t}const Ue=({children:e,exitBeforeEnter:t,custom:r,initial:n=!0,onExitComplete:a,presenceAffectsLayout:i=!0,mode:o="sync"})=>{const s=m.useMemo(()=>A4(e),[e]),c=s.map(Yu),u=m.useRef(!0),d=m.useRef(s),f=yi(()=>new Map),[p,h]=m.useState(s),[g,x]=m.useState(s);rp(()=>{u.current=!1,d.current=s;for(let b=0;b{const w=Yu(b),j=s===g||c.includes(w),N=()=>{if(f.has(w))f.set(w,!0);else return;let S=!0;f.forEach(P=>{P||(S=!1)}),S&&(y==null||y(),x(d.current),a&&a())};return l.jsx(wR,{isPresent:j,initial:!u.current||n?void 0:!1,custom:j?void 0:r,presenceAffectsLayout:i,mode:o,onExitComplete:j?void 0:N,children:b},w)})})};function jR(e){const t=yi(()=>On(e)),{isStatic:r}=m.useContext(ep);if(r){const[,n]=m.useState(e);m.useEffect(()=>t.on("change",n),[])}return t}function US(e,t){const r=jR(t()),n=()=>r.set(t());return n(),rp(()=>{const a=()=>ye.preRender(n,!1,!0),i=e.map(o=>o.on("change",a));return()=>{i.forEach(o=>o()),wn(n)}}),r}const NR=e=>e&&typeof e=="object"&&e.mix,SR=e=>NR(e)?e.mix:void 0;function PR(...e){const t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],a=e[1+r],i=e[2+r],o=e[3+r],s=gx(a,i,{mixer:SR(i[0]),...o});return t?s(n):s}function CR(e){Jl.current=[],e();const t=US(Jl.current,e);return Jl.current=void 0,t}function O4(e,t,r,n){if(typeof e=="function")return CR(e);const a=typeof t=="function"?t:PR(t,r,n);return Array.isArray(e)?T4(e,a):T4([e],([i])=>a(i))}function T4(e,t){const r=yi(()=>[]);return US(e,()=>{r.length=0;const n=e.length;for(let a=0;a{a({target:e,contentSize:t,get size(){return ER(e,r)}})})}function OR(e){e.forEach(AR)}function TR(){typeof ResizeObserver>"u"||(Fa=new ResizeObserver(OR))}function MR(e,t){Fa||TR();const r=_x(e);return r.forEach(n=>{let a=Od.get(n);a||(a=new Set,Od.set(n,a)),a.add(t),Fa==null||Fa.observe(n)}),()=>{r.forEach(n=>{const a=Od.get(n);a==null||a.delete(t),a!=null&&a.size||Fa==null||Fa.unobserve(n)})}}const Td=new Set;let rc;function IR(){rc=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};Td.forEach(r=>r(t))},window.addEventListener("resize",rc)}function _R(e){return Td.add(e),rc||IR(),()=>{Td.delete(e),!Td.size&&rc&&(rc=void 0)}}function LR(e,t){return typeof e=="function"?_R(e):MR(e,t)}const DR=50,M4=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),RR=()=>({time:0,x:M4(),y:M4()}),$R={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function I4(e,t,r,n){const a=r[t],{length:i,position:o}=$R[t],s=a.current,c=r.time;a.current=e[`scroll${o}`],a.scrollLength=e[`scroll${i}`]-e[`client${i}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=gi(0,a.scrollLength,a.current);const u=n-c;a.velocity=u>DR?0:fx(a.current-s,u)}function zR(e,t,r){I4(e,"x",t,r),I4(e,"y",t,r),t.time=r}function BR(e,t){const r={x:0,y:0};let n=e;for(;n&&n!==t;)if(n instanceof HTMLElement)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;else if(n.tagName==="svg"){const a=n.getBoundingClientRect();n=n.parentElement;const i=n.getBoundingClientRect();r.x+=a.left-i.left,r.y+=a.top-i.top}else if(n instanceof SVGGraphicsElement){const{x:a,y:i}=n.getBBox();r.x+=a,r.y+=i;let o=null,s=n.parentNode;for(;!o;)s.tagName==="svg"&&(o=s),s=n.parentNode;n=o}else break;return r}const FR={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Gg={start:0,center:.5,end:1};function _4(e,t,r=0){let n=0;if(e in Gg&&(e=Gg[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?n=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?n=a/100*document.documentElement.clientWidth:e.endsWith("vh")?n=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(n=t*e),r+n}const VR=[0,0];function UR(e,t,r,n){let a=Array.isArray(e)?e:VR,i=0,o=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,Gg[e]?e:"0"]),i=_4(a[0],r,n),o=_4(a[1],t),i-o}const HR={x:0,y:0};function WR(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function KR(e,t,r){const{offset:n=FR.All}=r,{target:a=e,axis:i="y"}=r,o=i==="y"?"height":"width",s=a!==e?BR(a,e):HR,c=a===e?{width:e.scrollWidth,height:e.scrollHeight}:WR(a),u={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let d=!t[i].interpolate;const f=n.length;for(let p=0;pGR(e,n.target,r),update:a=>{zR(e,r,a),(n.offset||n.target)&&KR(e,r,n)},notify:()=>t(r)}}const xl=new WeakMap,L4=new WeakMap,ah=new WeakMap,D4=e=>e===document.documentElement?window:e;function Lx(e,{container:t=document.documentElement,...r}={}){let n=ah.get(t);n||(n=new Set,ah.set(t,n));const a=RR(),i=YR(t,e,a,r);if(n.add(i),!xl.has(t)){const s=()=>{for(const p of n)p.measure()},c=()=>{for(const p of n)p.update(Et.timestamp)},u=()=>{for(const p of n)p.notify()},d=()=>{ye.read(s,!1,!0),ye.read(c,!1,!0),ye.update(u,!1,!0)};xl.set(t,d);const f=D4(t);window.addEventListener("resize",d,{passive:!0}),t!==document.documentElement&&L4.set(t,LR(t,d)),f.addEventListener("scroll",d,{passive:!0})}const o=xl.get(t);return ye.read(o,!1,!0),()=>{var s;wn(o);const c=ah.get(t);if(!c||(c.delete(i),c.size))return;const u=xl.get(t);xl.delete(t),u&&(D4(t).removeEventListener("scroll",u),(s=L4.get(t))===null||s===void 0||s(),window.removeEventListener("resize",u))}}function HS(e,t){let r;const n=()=>{const{currentTime:a}=t,o=(a===null?0:a.value)/100;r!==o&&e(o),r=o};return ye.update(n,!0),()=>wn(n)}function qR({source:e,container:t,axis:r="y"}){e&&(t=e);const n={value:0},a=Lx(i=>{n.value=i[r].progress*100},{container:t,axis:r});return{currentTime:n,cancel:a}}const ih=new Map;function WS({source:e,container:t=document.documentElement,axis:r="y"}={}){e&&(t=e),ih.has(t)||ih.set(t,{});const n=ih.get(t);return n[r]||(n[r]=YN()?new ScrollTimeline({source:t,axis:r}):qR({source:t,axis:r})),n[r]}function XR(e){return e.length===2}function KS(e){return e&&(e.target||e.offset)}function ZR(e,t){return XR(e)||KS(t)?Lx(r=>{e(r[t.axis].progress,r)},t):HS(e,WS(t))}function QR(e,t){if(e.flatten(),KS(t))return e.pause(),Lx(r=>{e.time=e.duration*r[t.axis].progress},t);{const r=WS(t);return e.attachTimeline?e.attachTimeline(r,n=>(n.pause(),HS(a=>{n.time=n.duration*a},r))):_t}}function JR(e,{axis:t="y",...r}={}){const n={axis:t,...r};return typeof e=="function"?ZR(e,n):QR(e,n)}function R4(e,t){jI(!!(!t||t.current))}const e$=()=>({scrollX:On(0),scrollY:On(0),scrollXProgress:On(0),scrollYProgress:On(0)});function t$({container:e,target:t,layoutEffect:r=!0,...n}={}){const a=yi(e$);return(r?rp:m.useEffect)(()=>(R4("target",t),R4("container",e),JR((o,{x:s,y:c})=>{a.scrollX.set(s.current),a.scrollXProgress.set(s.progress),a.scrollY.set(c.current),a.scrollYProgress.set(c.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(n.offset)]),a}function r$(e){return m.useEffect(()=>()=>e(),[])}function n$(e,t=100,r){const n=r({...e,keyframes:[0,t]}),a=Math.min(HN(n),$g);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:Ln(a)}}function Dx(e){return typeof e=="object"&&!Array.isArray(e)}function GS(e,t,r,n){return typeof e=="string"&&Dx(t)?_x(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function $4(e,t,r,n){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:(a=n.get(t))!==null&&a!==void 0?a:e}const a$=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function i$(e,t){return BN(e)?e[a$(0,e.length,t)]:e}function o$(e,t,r){for(let n=0;nt&&a.at{const M=d$(j),{delay:T=0,times:A=yx(M),type:E="keyframes",..._}=N;let{ease:L=t.ease||"easeOut",duration:I}=N;const B=typeof T=="function"?T(P,C):T,V=M.length,O=Xf(E)?E:a==null?void 0:a[E];if(V<=2&&O){let ee=100;if(V===2&&m$(M)){const Z=M[1]-M[0];ee=Math.abs(Z)}const oe={..._};I!==void 0&&(oe.duration=_n(I));const D=n$(oe,ee,O);L=D.ease,I=D.duration}I??(I=i);const R=f+B,U=R+I;A.length===1&&A[0]===0&&(A[1]=1);const q=A.length-M.length;q>0&&UN(A,q),M.length===1&&M.unshift(null),s$(S,M,L,A,R,U),b=Math.max(B+I,b),p=Math.max(U,p)};if(Tt(x)){const j=z4(x,s);w(v,y,B4("default",j))}else{const j=GS(x,v,n,c),N=j.length;for(let S=0;S{for(const x in h){const v=h[x];v.sort(l$);const y=[],b=[],w=[];for(let N=0;Ntypeof e=="number",m$=e=>e.every(p$);function h$(e,t){return e in t}class g$ extends zS{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(h$(r,t)){const n=t[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return nt()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}}function y$(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=vS(e)?new VS(t):new FS(t);r.mount(e),Ms.set(e,r)}function v$(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new g$(t);r.mount(e),Ms.set(e,r)}function x$(e,t){return Tt(e)||typeof e=="number"||typeof e=="string"&&!Dx(t)}function YS(e,t,r,n){const a=[];if(x$(e,t))a.push(xS(e,Dx(t)&&t.default||t,r&&(r.default||r)));else{const i=GS(e,t,n),o=i.length;for(let s=0;s{n.push(...YS(s,i,o))}),n}function w$(e){return Array.isArray(e)&&Array.isArray(e[0])}function k$(e){function t(r,n,a){let i=[];w$(r)?i=b$(r,n,e):i=YS(r,n,a,e);const o=new qN(i);return e&&e.animations.push(o),o}return t}function j$(){const e=yi(()=>({current:null,animations:[]})),t=yi(()=>k$(e));return r$(()=>{e.animations.forEach(r=>r.stop())}),[e,t]}const N$={some:0,all:1};function S$(e,t,{root:r,margin:n,amount:a="some"}={}){const i=_x(e),o=new WeakMap,s=u=>{u.forEach(d=>{const f=o.get(d.target);if(d.isIntersecting!==!!f)if(d.isIntersecting){const p=t(d);typeof p=="function"?o.set(d.target,p):c.unobserve(d.target)}else f&&(f(d),o.delete(d.target))})},c=new IntersectionObserver(s,{root:r,rootMargin:n,threshold:typeof a=="number"?a:N$[a]});return i.forEach(u=>c.observe(u)),()=>c.disconnect()}function ap(e,{root:t,margin:r,amount:n,once:a=!1}={}){const[i,o]=m.useState(!1);return m.useEffect(()=>{if(!e.current||a&&i)return;const s=()=>(o(!0),a?void 0:()=>o(!1)),c={root:t&&t.current||void 0,margin:r,amount:n};return S$(e.current,s,c)},[t,e,r,a,n]),i}function P$(e,t){if(e==="first")return 0;{const r=t-1;return e==="last"?r:r/2}}function C$(e=.1,{startDelay:t=0,from:r=0,ease:n}={}){return(a,i)=>{const o=typeof r=="number"?r:P$(r,i),s=Math.abs(o-a);let c=e*s;if(n){const u=i*e;c=Dg(n)(c/u)*u}return t+c}}let E$={data:""},A$=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||E$,O$=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,T$=/\/\*[^]*?\*\/| +/g,F4=/\n+/g,Ya=(e,t)=>{let r="",n="",a="";for(let i in e){let o=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+o+";":n+=i[1]=="f"?Ya(o,i):i+"{"+Ya(o,i[1]=="k"?"":t)+"}":typeof o=="object"?n+=Ya(o,t?t.replace(/([^,])+/g,s=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=Ya.p?Ya.p(i,o):i+":"+o+";")}return r+(t&&a?t+"{"+a+"}":a)+n},qn={},qS=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+qS(e[r]);return t}return e},M$=(e,t,r,n,a)=>{let i=qS(e),o=qn[i]||(qn[i]=(c=>{let u=0,d=11;for(;u>>0;return"go"+d})(i));if(!qn[o]){let c=i!==e?e:(u=>{let d,f,p=[{}];for(;d=O$.exec(u.replace(T$,""));)d[4]?p.shift():d[3]?(f=d[3].replace(F4," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][d[1]]=d[2].replace(F4," ").trim();return p[0]})(e);qn[o]=Ya(a?{["@keyframes "+o]:c}:c,r?"":"."+o)}let s=r&&qn.g?qn.g:null;return r&&(qn.g=qn[o]),((c,u,d,f)=>{f?u.data=u.data.replace(f,c):u.data.indexOf(c)===-1&&(u.data=d?c+u.data:u.data+c)})(qn[o],t,n,s),o},I$=(e,t,r)=>e.reduce((n,a,i)=>{let o=t[i];if(o&&o.call){let s=o(r),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=c?"."+c:s&&typeof s=="object"?s.props?"":Ya(s,""):s===!1?"":s}return n+a+(o??"")},"");function ip(e){let t=this||{},r=e.call?e(t.p):e;return M$(r.unshift?r.raw?I$(r,[].slice.call(arguments,1),t.p):r.reduce((n,a)=>Object.assign(n,a&&a.call?a(t.p):a),{}):r,A$(t.target),t.g,t.o,t.k)}let XS,Yg,qg;ip.bind({g:1});let ya=ip.bind({k:1});function _$(e,t,r,n){Ya.p=t,XS=e,Yg=r,qg=n}function Ai(e,t){let r=this||{};return function(){let n=arguments;function a(i,o){let s=Object.assign({},i),c=s.className||a.className;r.p=Object.assign({theme:Yg&&Yg()},s),r.o=/ *go\d+/.test(c),s.className=ip.apply(r,n)+(c?" "+c:"");let u=e;return e[0]&&(u=s.as||e,delete s.as),qg&&u[0]&&qg(s),XS(u,s)}return a}}var L$=e=>typeof e=="function",N0=(e,t)=>L$(e)?e(t):e,D$=(()=>{let e=0;return()=>(++e).toString()})(),ZS=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),R$=20,Md=new Map,$$=1e3,V4=e=>{if(Md.has(e))return;let t=setTimeout(()=>{Md.delete(e),Do({type:4,toastId:e})},$$);Md.set(e,t)},z$=e=>{let t=Md.get(e);t&&clearTimeout(t)},Xg=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,R$)};case 1:return t.toast.id&&z$(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:r}=t;return e.toasts.find(i=>i.id===r.id)?Xg(e,{type:1,toast:r}):Xg(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?V4(n):e.toasts.forEach(i=>{V4(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+a}))}}},Id=[],_d={toasts:[],pausedAt:void 0},Do=e=>{_d=Xg(_d,e),Id.forEach(t=>{t(_d)})},B$={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},F$=(e={})=>{let[t,r]=m.useState(_d);m.useEffect(()=>(Id.push(r),()=>{let a=Id.indexOf(r);a>-1&&Id.splice(a,1)}),[t]);let n=t.toasts.map(a=>{var i,o;return{...e,...e[a.type],...a,duration:a.duration||((i=e[a.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||B$[a.type],style:{...e.style,...(o=e[a.type])==null?void 0:o.style,...a.style}}});return{...t,toasts:n}},V$=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||D$()}),Jc=e=>(t,r)=>{let n=V$(t,e,r);return Do({type:2,toast:n}),n.id},Or=(e,t)=>Jc("blank")(e,t);Or.error=Jc("error");Or.success=Jc("success");Or.loading=Jc("loading");Or.custom=Jc("custom");Or.dismiss=e=>{Do({type:3,toastId:e})};Or.remove=e=>Do({type:4,toastId:e});Or.promise=(e,t,r)=>{let n=Or.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(a=>(Or.success(N0(t.success,a),{id:n,...r,...r==null?void 0:r.success}),a)).catch(a=>{Or.error(N0(t.error,a),{id:n,...r,...r==null?void 0:r.error})}),e};var U$=(e,t)=>{Do({type:1,toast:{id:e,height:t}})},H$=()=>{Do({type:5,time:Date.now()})},W$=e=>{let{toasts:t,pausedAt:r}=F$(e);m.useEffect(()=>{if(r)return;let i=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let c=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(c<0){s.visible&&Or.dismiss(s.id);return}return setTimeout(()=>Or.dismiss(s.id),c)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=m.useCallback(()=>{r&&Do({type:6,time:Date.now()})},[r]),a=m.useCallback((i,o)=>{let{reverseOrder:s=!1,gutter:c=8,defaultPosition:u}=o||{},d=t.filter(h=>(h.position||u)===(i.position||u)&&h.height),f=d.findIndex(h=>h.id===i.id),p=d.filter((h,g)=>gh.visible).slice(...s?[p+1]:[0,p]).reduce((h,g)=>h+(g.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:U$,startPause:H$,endPause:n,calculateOffset:a}}},K$=ya` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,G$=ya` +from { + transform: scale(0); + opacity: 0; +} +to { + transform: scale(1); + opacity: 1; +}`,Y$=ya` +from { + transform: scale(0) rotate(90deg); + opacity: 0; +} +to { + transform: scale(1) rotate(90deg); + opacity: 1; +}`,q$=Ai("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#ff4b4b"}; + position: relative; + transform: rotate(45deg); + + animation: ${K$} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + + &:after, + &:before { + content: ''; + animation: ${G$} 0.15s ease-out forwards; + animation-delay: 150ms; + position: absolute; + border-radius: 3px; + opacity: 0; + background: ${e=>e.secondary||"#fff"}; + bottom: 9px; + left: 4px; + height: 2px; + width: 12px; + } + + &:before { + animation: ${Y$} 0.15s ease-out forwards; + animation-delay: 180ms; + transform: rotate(90deg); + } +`,X$=ya` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`,Z$=Ai("div")` + width: 12px; + height: 12px; + box-sizing: border-box; + border: 2px solid; + border-radius: 100%; + border-color: ${e=>e.secondary||"#e0e0e0"}; + border-right-color: ${e=>e.primary||"#616161"}; + animation: ${X$} 1s linear infinite; +`,Q$=ya` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,J$=ya` +0% { + height: 0; + width: 0; + opacity: 0; +} +40% { + height: 0; + width: 6px; + opacity: 1; +} +100% { + opacity: 1; + height: 10px; +}`,ez=Ai("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#61d345"}; + position: relative; + transform: rotate(45deg); + + animation: ${Q$} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + &:after { + content: ''; + box-sizing: border-box; + animation: ${J$} 0.2s ease-out forwards; + opacity: 0; + animation-delay: 200ms; + position: absolute; + border-right: 2px solid; + border-bottom: 2px solid; + border-color: ${e=>e.secondary||"#fff"}; + bottom: 6px; + left: 6px; + height: 10px; + width: 6px; + } +`,tz=Ai("div")` + position: absolute; +`,rz=Ai("div")` + position: relative; + display: flex; + justify-content: center; + align-items: center; + min-width: 20px; + min-height: 20px; +`,nz=ya` +from { + transform: scale(0.6); + opacity: 0.4; +} +to { + transform: scale(1); + opacity: 1; +}`,az=Ai("div")` + position: relative; + transform: scale(0.6); + opacity: 0.4; + min-width: 20px; + animation: ${nz} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; +`,iz=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?m.createElement(az,null,t):t:r==="blank"?null:m.createElement(rz,null,m.createElement(Z$,{...n}),r!=="loading"&&m.createElement(tz,null,r==="error"?m.createElement(q$,{...n}):m.createElement(ez,{...n})))},oz=e=>` +0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} +100% {transform: translate3d(0,0,0) scale(1); opacity:1;} +`,sz=e=>` +0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} +100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} +`,lz="0%{opacity:0;} 100%{opacity:1;}",cz="0%{opacity:1;} 100%{opacity:0;}",uz=Ai("div")` + display: flex; + align-items: center; + background: #fff; + color: #363636; + line-height: 1.3; + will-change: transform; + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); + max-width: 350px; + pointer-events: auto; + padding: 8px 10px; + border-radius: 8px; +`,dz=Ai("div")` + display: flex; + justify-content: center; + margin: 4px 10px; + color: inherit; + flex: 1 1 auto; + white-space: pre-line; +`,fz=(e,t)=>{let r=e.includes("top")?1:-1,[n,a]=ZS()?[lz,cz]:[oz(r),sz(r)];return{animation:t?`${ya(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ya(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},pz=m.memo(({toast:e,position:t,style:r,children:n})=>{let a=e.height?fz(e.position||t||"top-center",e.visible):{opacity:0},i=m.createElement(iz,{toast:e}),o=m.createElement(dz,{...e.ariaProps},N0(e.message,e));return m.createElement(uz,{className:e.className,style:{...a,...r,...e.style}},typeof n=="function"?n({icon:i,message:o}):m.createElement(m.Fragment,null,i,o))});_$(m.createElement);var mz=({id:e,className:t,style:r,onHeightUpdate:n,children:a})=>{let i=m.useCallback(o=>{if(o){let s=()=>{let c=o.getBoundingClientRect().height;n(e,c)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return m.createElement("div",{ref:i,className:t,style:r},a)},hz=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:ZS()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...a}},gz=ip` + z-index: 9999; + > * { + pointer-events: auto; + } +`,qu=16,yz=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:a,containerStyle:i,containerClassName:o})=>{let{toasts:s,handlers:c}=W$(r);return m.createElement("div",{style:{position:"fixed",zIndex:9999,top:qu,left:qu,right:qu,bottom:qu,pointerEvents:"none",...i},className:o,onMouseEnter:c.startPause,onMouseLeave:c.endPause},s.map(u=>{let d=u.position||t,f=c.calculateOffset(u,{reverseOrder:e,gutter:n,defaultPosition:t}),p=hz(d,f);return m.createElement(mz,{id:u.id,key:u.id,onHeightUpdate:c.updateHeight,className:u.visible?gz:"",style:p},u.type==="custom"?N0(u.message,u):a?a(u):m.createElement(pz,{toast:u,position:d}))}))},J=Or;function QS(e,t){return function(){return e.apply(t,arguments)}}const{toString:vz}=Object.prototype,{getPrototypeOf:Rx}=Object,op=(e=>t=>{const r=vz.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kn=e=>(e=e.toLowerCase(),t=>op(t)===e),sp=e=>t=>typeof t===e,{isArray:Ks}=Array,Sc=sp("undefined");function xz(e){return e!==null&&!Sc(e)&&e.constructor!==null&&!Sc(e.constructor)&&_r(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const JS=kn("ArrayBuffer");function bz(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&JS(e.buffer),t}const wz=sp("string"),_r=sp("function"),eP=sp("number"),lp=e=>e!==null&&typeof e=="object",kz=e=>e===!0||e===!1,Ld=e=>{if(op(e)!=="object")return!1;const t=Rx(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jz=kn("Date"),Nz=kn("File"),Sz=kn("Blob"),Pz=kn("FileList"),Cz=e=>lp(e)&&_r(e.pipe),Ez=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_r(e.append)&&((t=op(e))==="formdata"||t==="object"&&_r(e.toString)&&e.toString()==="[object FormData]"))},Az=kn("URLSearchParams"),[Oz,Tz,Mz,Iz]=["ReadableStream","Request","Response","Headers"].map(kn),_z=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function eu(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Ks(e))for(n=0,a=e.length;n0;)if(a=r[n],t===a.toLowerCase())return a;return null}const Zi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rP=e=>!Sc(e)&&e!==Zi;function Zg(){const{caseless:e}=rP(this)&&this||{},t={},r=(n,a)=>{const i=e&&tP(t,a)||a;Ld(t[i])&&Ld(n)?t[i]=Zg(t[i],n):Ld(n)?t[i]=Zg({},n):Ks(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n(eu(t,(a,i)=>{r&&_r(a)?e[i]=QS(a,r):e[i]=a},{allOwnKeys:n}),e),Dz=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rz=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},$z=(e,t,r,n)=>{let a,i,o;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Rx(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},zz=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Bz=e=>{if(!e)return null;if(Ks(e))return e;let t=e.length;if(!eP(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Fz=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Rx(Uint8Array)),Vz=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},Uz=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Hz=kn("HTMLFormElement"),Wz=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),U4=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Kz=kn("RegExp"),nP=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};eu(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},Gz=e=>{nP(e,(t,r)=>{if(_r(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(_r(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Yz=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return Ks(e)?n(e):n(String(e).split(t)),r},qz=()=>{},Xz=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,oh="abcdefghijklmnopqrstuvwxyz",H4="0123456789",aP={DIGIT:H4,ALPHA:oh,ALPHA_DIGIT:oh+oh.toUpperCase()+H4},Zz=(e=16,t=aP.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function Qz(e){return!!(e&&_r(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Jz=e=>{const t=new Array(10),r=(n,a)=>{if(lp(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=Ks(n)?[]:{};return eu(n,(o,s)=>{const c=r(o,a+1);!Sc(c)&&(i[s]=c)}),t[a]=void 0,i}}return n};return r(e,0)},eB=kn("AsyncFunction"),tB=e=>e&&(lp(e)||_r(e))&&_r(e.then)&&_r(e.catch),iP=((e,t)=>e?setImmediate:t?((r,n)=>(Zi.addEventListener("message",({source:a,data:i})=>{a===Zi&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Zi.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",_r(Zi.postMessage)),rB=typeof queueMicrotask<"u"?queueMicrotask.bind(Zi):typeof process<"u"&&process.nextTick||iP,F={isArray:Ks,isArrayBuffer:JS,isBuffer:xz,isFormData:Ez,isArrayBufferView:bz,isString:wz,isNumber:eP,isBoolean:kz,isObject:lp,isPlainObject:Ld,isReadableStream:Oz,isRequest:Tz,isResponse:Mz,isHeaders:Iz,isUndefined:Sc,isDate:jz,isFile:Nz,isBlob:Sz,isRegExp:Kz,isFunction:_r,isStream:Cz,isURLSearchParams:Az,isTypedArray:Fz,isFileList:Pz,forEach:eu,merge:Zg,extend:Lz,trim:_z,stripBOM:Dz,inherits:Rz,toFlatObject:$z,kindOf:op,kindOfTest:kn,endsWith:zz,toArray:Bz,forEachEntry:Vz,matchAll:Uz,isHTMLForm:Hz,hasOwnProperty:U4,hasOwnProp:U4,reduceDescriptors:nP,freezeMethods:Gz,toObjectSet:Yz,toCamelCase:Wz,noop:qz,toFiniteNumber:Xz,findKey:tP,global:Zi,isContextDefined:rP,ALPHABET:aP,generateString:Zz,isSpecCompliantForm:Qz,toJSONObject:Jz,isAsyncFn:eB,isThenable:tB,setImmediate:iP,asap:rB};function fe(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}F.inherits(fe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}});const oP=fe.prototype,sP={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{sP[e]={value:e}});Object.defineProperties(fe,sP);Object.defineProperty(oP,"isAxiosError",{value:!0});fe.from=(e,t,r,n,a,i)=>{const o=Object.create(oP);return F.toFlatObject(e,o,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),fe.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const nB=null;function Qg(e){return F.isPlainObject(e)||F.isArray(e)}function lP(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function W4(e,t,r){return e?e.concat(t).map(function(a,i){return a=lP(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function aB(e){return F.isArray(e)&&!e.some(Qg)}const iB=F.toFlatObject(F,{},null,function(t){return/^is[A-Z]/.test(t)});function cp(e,t,r){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=F.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!F.isUndefined(v[x])});const n=r.metaTokens,a=r.visitor||d,i=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(a))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(F.isDate(g))return g.toISOString();if(!c&&F.isBlob(g))throw new fe("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(g)||F.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,x,v){let y=g;if(g&&!v&&typeof g=="object"){if(F.endsWith(x,"{}"))x=n?x:x.slice(0,-2),g=JSON.stringify(g);else if(F.isArray(g)&&aB(g)||(F.isFileList(g)||F.endsWith(x,"[]"))&&(y=F.toArray(g)))return x=lP(x),y.forEach(function(w,j){!(F.isUndefined(w)||w===null)&&t.append(o===!0?W4([x],j,i):o===null?x:x+"[]",u(w))}),!1}return Qg(g)?!0:(t.append(W4(v,x,i),u(g)),!1)}const f=[],p=Object.assign(iB,{defaultVisitor:d,convertValue:u,isVisitable:Qg});function h(g,x){if(!F.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(g),F.forEach(g,function(y,b){(!(F.isUndefined(y)||y===null)&&a.call(t,y,F.isString(b)?b.trim():b,x,p))===!0&&h(y,x?x.concat(b):[b])}),f.pop()}}if(!F.isObject(e))throw new TypeError("data must be an object");return h(e),t}function K4(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function $x(e,t){this._pairs=[],e&&cp(e,this,t)}const cP=$x.prototype;cP.append=function(t,r){this._pairs.push([t,r])};cP.toString=function(t){const r=t?function(n){return t.call(this,n,K4)}:K4;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function oB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function uP(e,t,r){if(!t)return e;const n=r&&r.encode||oB,a=r&&r.serialize;let i;if(a?i=a(t,r):i=F.isURLSearchParams(t)?t.toString():new $x(t,r).toString(n),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class G4{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){F.forEach(this.handlers,function(n){n!==null&&t(n)})}}const dP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sB=typeof URLSearchParams<"u"?URLSearchParams:$x,lB=typeof FormData<"u"?FormData:null,cB=typeof Blob<"u"?Blob:null,uB={isBrowser:!0,classes:{URLSearchParams:sB,FormData:lB,Blob:cB},protocols:["http","https","file","blob","url","data"]},zx=typeof window<"u"&&typeof document<"u",Jg=typeof navigator=="object"&&navigator||void 0,dB=zx&&(!Jg||["ReactNative","NativeScript","NS"].indexOf(Jg.product)<0),fB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pB=zx&&window.location.href||"http://localhost",mB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zx,hasStandardBrowserEnv:dB,hasStandardBrowserWebWorkerEnv:fB,navigator:Jg,origin:pB},Symbol.toStringTag,{value:"Module"})),jr={...mB,...uB};function hB(e,t){return cp(e,new jr.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return jr.isNode&&F.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function gB(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yB(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n=r.length;return o=!o&&F.isArray(a)?a.length:o,c?(F.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!s):((!a[o]||!F.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&F.isArray(a[o])&&(a[o]=yB(a[o])),!s)}if(F.isFormData(e)&&F.isFunction(e.entries)){const r={};return F.forEachEntry(e,(n,a)=>{t(gB(n),a,r,0)}),r}return null}function vB(e,t,r){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const tu={transitional:dP,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=F.isObject(t);if(i&&F.isHTMLForm(t)&&(t=new FormData(t)),F.isFormData(t))return a?JSON.stringify(fP(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t)||F.isReadableStream(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return hB(t,this.formSerializer).toString();if((s=F.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return cp(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),vB(t)):t}],transformResponse:[function(t){const r=this.transitional||tu.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(F.isResponse(t)||F.isReadableStream(t))return t;if(t&&F.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?fe.from(s,fe.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jr.classes.FormData,Blob:jr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],e=>{tu.headers[e]={}});const xB=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bB=e=>{const t={};let r,n,a;return e&&e.split(` +`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&xB[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Y4=Symbol("internals");function bl(e){return e&&String(e).trim().toLowerCase()}function Dd(e){return e===!1||e==null?e:F.isArray(e)?e.map(Dd):String(e)}function wB(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const kB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sh(e,t,r,n,a){if(F.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!F.isString(t)){if(F.isString(n))return t.indexOf(n)!==-1;if(F.isRegExp(n))return n.test(t)}}function jB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function NB(e,t){const r=F.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class Nr{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(s,c,u){const d=bl(c);if(!d)throw new Error("header name must be a non-empty string");const f=F.findKey(a,d);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||c]=Dd(s))}const o=(s,c)=>F.forEach(s,(u,d)=>i(u,d,c));if(F.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(F.isString(t)&&(t=t.trim())&&!kB(t))o(bB(t),r);else if(F.isHeaders(t))for(const[s,c]of t.entries())i(c,s,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=bl(t),t){const n=F.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return wB(a);if(F.isFunction(r))return r.call(this,a,n);if(F.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=bl(t),t){const n=F.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||sh(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=bl(o),o){const s=F.findKey(n,o);s&&(!r||sh(n,n[s],s,r))&&(delete n[s],a=!0)}}return F.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||sh(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return F.forEach(this,(a,i)=>{const o=F.findKey(n,i);if(o){r[o]=Dd(a),delete r[i];return}const s=t?jB(i):String(i).trim();s!==i&&delete r[i],r[s]=Dd(a),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return F.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&F.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[Y4]=this[Y4]={accessors:{}}).accessors,a=this.prototype;function i(o){const s=bl(o);n[s]||(NB(a,o),n[s]=!0)}return F.isArray(t)?t.forEach(i):i(t),this}}Nr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.reduceDescriptors(Nr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});F.freezeMethods(Nr);function lh(e,t){const r=this||tu,n=t||r,a=Nr.from(n.headers);let i=n.data;return F.forEach(e,function(s){i=s.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function pP(e){return!!(e&&e.__CANCEL__)}function Gs(e,t,r){fe.call(this,e??"canceled",fe.ERR_CANCELED,t,r),this.name="CanceledError"}F.inherits(Gs,fe,{__CANCEL__:!0});function mP(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new fe("Request failed with status code "+r.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function SB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function PB(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=n[i];o||(o=u),r[a]=c,n[a]=u;let f=i,p=0;for(;f!==a;)p+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o{r=d,a=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-r;f>=n?o(u,d):(a=u,i||(i=setTimeout(()=>{i=null,o(a)},n-f)))},()=>a&&o(a)]}const S0=(e,t,r=3)=>{let n=0;const a=PB(50,250);return CB(i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,c=o-n,u=a(c),d=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&d?(s-o)/u:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},r)},q4=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},X4=e=>(...t)=>F.asap(()=>e(...t)),EB=jr.hasStandardBrowserEnv?function(){const t=jr.navigator&&/(msie|trident)/i.test(jr.navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const s=F.isString(o)?a(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}(),AB=jr.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const o=[e+"="+encodeURIComponent(t)];F.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),F.isString(n)&&o.push("path="+n),F.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function OB(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function TB(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function hP(e,t){return e&&!OB(t)?TB(e,t):t}const Z4=e=>e instanceof Nr?{...e}:e;function bo(e,t){t=t||{};const r={};function n(u,d,f){return F.isPlainObject(u)&&F.isPlainObject(d)?F.merge.call({caseless:f},u,d):F.isPlainObject(d)?F.merge({},d):F.isArray(d)?d.slice():d}function a(u,d,f){if(F.isUndefined(d)){if(!F.isUndefined(u))return n(void 0,u,f)}else return n(u,d,f)}function i(u,d){if(!F.isUndefined(d))return n(void 0,d)}function o(u,d){if(F.isUndefined(d)){if(!F.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function s(u,d,f){if(f in t)return n(u,d);if(f in e)return n(void 0,u)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,d)=>a(Z4(u),Z4(d),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=c[d]||a,p=f(e[d],t[d],d);F.isUndefined(p)&&f!==s||(r[d]=p)}),r}const gP=e=>{const t=bo({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:s}=t;t.headers=o=Nr.from(o),t.url=uP(hP(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(F.isFormData(r)){if(jr.hasStandardBrowserEnv||jr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(jr.hasStandardBrowserEnv&&(n&&F.isFunction(n)&&(n=n(t)),n||n!==!1&&EB(t.url))){const u=a&&i&&AB.read(i);u&&o.set(a,u)}return t},MB=typeof XMLHttpRequest<"u",IB=MB&&function(e){return new Promise(function(r,n){const a=gP(e);let i=a.data;const o=Nr.from(a.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:u}=a,d,f,p,h,g;function x(){h&&h(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function y(){if(!v)return;const w=Nr.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),N={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:w,config:e,request:v};mP(function(P){r(P),x()},function(P){n(P),x()},N),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(n(new fe("Request aborted",fe.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new fe("Network Error",fe.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let j=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const N=a.transitional||dP;a.timeoutErrorMessage&&(j=a.timeoutErrorMessage),n(new fe(j,N.clarifyTimeoutError?fe.ETIMEDOUT:fe.ECONNABORTED,e,v)),v=null},i===void 0&&o.setContentType(null),"setRequestHeader"in v&&F.forEach(o.toJSON(),function(j,N){v.setRequestHeader(N,j)}),F.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),s&&s!=="json"&&(v.responseType=a.responseType),u&&([p,g]=S0(u,!0),v.addEventListener("progress",p)),c&&v.upload&&([f,h]=S0(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(d=w=>{v&&(n(!w||w.type?new Gs(null,e,v):w),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const b=SB(a.url);if(b&&jr.protocols.indexOf(b)===-1){n(new fe("Unsupported protocol "+b+":",fe.ERR_BAD_REQUEST,e));return}v.send(i||null)})},_B=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(u){if(!a){a=!0,s();const d=u instanceof Error?u:this.reason;n.abort(d instanceof fe?d:new Gs(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new fe(`timeout ${t} of ms exceeded`,fe.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>F.asap(s),c}},LB=function*(e,t){let r=e.byteLength;if(r{const a=DB(e,t);let i=0,o,s=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await a.next();if(u){s(),c.close();return}let f=d.byteLength;if(r){let p=i+=f;r(p)}c.enqueue(new Uint8Array(d))}catch(u){throw s(u),u}},cancel(c){return s(c),a.return()}},{highWaterMark:2})},up=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",yP=up&&typeof ReadableStream=="function",$B=up&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),vP=(e,...t)=>{try{return!!e(...t)}catch{return!1}},zB=yP&&vP(()=>{let e=!1;const t=new Request(jr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),J4=64*1024,ey=yP&&vP(()=>F.isReadableStream(new Response("").body)),P0={stream:ey&&(e=>e.body)};up&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!P0[t]&&(P0[t]=F.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new fe(`Response type '${t}' is not supported`,fe.ERR_NOT_SUPPORT,n)})})})(new Response);const BB=async e=>{if(e==null)return 0;if(F.isBlob(e))return e.size;if(F.isSpecCompliantForm(e))return(await new Request(jr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(F.isArrayBufferView(e)||F.isArrayBuffer(e))return e.byteLength;if(F.isURLSearchParams(e)&&(e=e+""),F.isString(e))return(await $B(e)).byteLength},FB=async(e,t)=>{const r=F.toFiniteNumber(e.getContentLength());return r??BB(t)},VB=up&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:i,timeout:o,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:p}=gP(e);u=u?(u+"").toLowerCase():"text";let h=_B([a,i&&i.toAbortSignal()],o),g;const x=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(c&&zB&&r!=="get"&&r!=="head"&&(v=await FB(d,n))!==0){let N=new Request(t,{method:"POST",body:n,duplex:"half"}),S;if(F.isFormData(n)&&(S=N.headers.get("content-type"))&&d.setContentType(S),N.body){const[P,C]=q4(v,S0(X4(c)));n=Q4(N.body,J4,P,C)}}F.isString(f)||(f=f?"include":"omit");const y="credentials"in Request.prototype;g=new Request(t,{...p,signal:h,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:y?f:void 0});let b=await fetch(g);const w=ey&&(u==="stream"||u==="response");if(ey&&(s||w&&x)){const N={};["status","statusText","headers"].forEach(M=>{N[M]=b[M]});const S=F.toFiniteNumber(b.headers.get("content-length")),[P,C]=s&&q4(S,S0(X4(s),!0))||[];b=new Response(Q4(b.body,J4,P,()=>{C&&C(),x&&x()}),N)}u=u||"text";let j=await P0[F.findKey(P0,u)||"text"](b,e);return!w&&x&&x(),await new Promise((N,S)=>{mP(N,S,{data:j,headers:Nr.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(y){throw x&&x(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new fe("Network Error",fe.ERR_NETWORK,e,g),{cause:y.cause||y}):fe.from(y,y&&y.code,e,g)}}),ty={http:nB,xhr:IB,fetch:VB};F.forEach(ty,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const e3=e=>`- ${e}`,UB=e=>F.isFunction(e)||e===null||e===!1,xP={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : +`+i.map(e3).join(` +`):" "+e3(i[0]):"as no adapter specified";throw new fe("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:ty};function ch(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gs(null,e)}function t3(e){return ch(e),e.headers=Nr.from(e.headers),e.data=lh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xP.getAdapter(e.adapter||tu.adapter)(e).then(function(n){return ch(e),n.data=lh.call(e,e.transformResponse,n),n.headers=Nr.from(n.headers),n},function(n){return pP(n)||(ch(e),n&&n.response&&(n.response.data=lh.call(e,e.transformResponse,n.response),n.response.headers=Nr.from(n.response.headers))),Promise.reject(n)})}const bP="1.7.7",Bx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Bx[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const r3={};Bx.transitional=function(t,r,n){function a(i,o){return"[Axios v"+bP+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(t===!1)throw new fe(a(o," has been removed"+(r?" in "+r:"")),fe.ERR_DEPRECATED);return r&&!r3[o]&&(r3[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,s):!0}};function HB(e,t,r){if(typeof e!="object")throw new fe("options must be an object",fe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const s=e[i],c=s===void 0||o(s,i,e);if(c!==!0)throw new fe("option "+i+" must be "+c,fe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new fe("Unknown option "+i,fe.ERR_BAD_OPTION)}}const ry={assertOptions:HB,validators:Bx},Ra=ry.validators;class io{constructor(t){this.defaults=t,this.interceptors={request:new G4,response:new G4}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` +`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=bo(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&ry.assertOptions(n,{silentJSONParsing:Ra.transitional(Ra.boolean),forcedJSONParsing:Ra.transitional(Ra.boolean),clarifyTimeoutError:Ra.transitional(Ra.boolean)},!1),a!=null&&(F.isFunction(a)?r.paramsSerializer={serialize:a}:ry.assertOptions(a,{encode:Ra.function,serialize:Ra.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&F.merge(i.common,i[r.method]);i&&F.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),r.headers=Nr.concat(o,i);const s=[];let c=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(c=c&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let d,f=0,p;if(!c){const g=[t3.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,u),p=g.length,d=Promise.resolve(r);f{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{n.subscribe(s),i=s}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,s){n.reason||(n.reason=new Gs(i,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Fx(function(a){t=a}),cancel:t}}}function WB(e){return function(r){return e.apply(null,r)}}function KB(e){return F.isObject(e)&&e.isAxiosError===!0}const ny={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ny).forEach(([e,t])=>{ny[t]=e});function wP(e){const t=new io(e),r=QS(io.prototype.request,t);return F.extend(r,io.prototype,t,{allOwnKeys:!0}),F.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return wP(bo(e,a))},r}const pt=wP(tu);pt.Axios=io;pt.CanceledError=Gs;pt.CancelToken=Fx;pt.isCancel=pP;pt.VERSION=bP;pt.toFormData=cp;pt.AxiosError=fe;pt.Cancel=pt.CanceledError;pt.all=function(t){return Promise.all(t)};pt.spread=WB;pt.isAxiosError=KB;pt.mergeConfig=bo;pt.AxiosHeaders=Nr;pt.formToJSON=e=>fP(F.isHTMLForm(e)?new FormData(e):e);pt.getAdapter=xP.getAdapter;pt.HttpStatusCode=ny;pt.default=pt;const uh={BASE_URL:"/app",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_GITHUB_TOKEN:"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",VITE_GOOGLE_CLIENT_ID:"82343726980-l5frel7ehhv36rcuqo4vu5adkf8vkanq.apps.googleusercontent.com"},GB=()=>{if(!(uh!=null&&uh.VITE_TIER)){if(typeof window<"u"){const e=window.location.hostname;if(e==="localhost"||e==="127.0.0.1"||e.includes("localhost"))return"dev";if(e.includes("allin1url.in"))return"prod"}return"prod"}},C0=GB();typeof window<"u"&&(window.tier=C0,console.log("🌍 Detected tier:",C0));const ay=e=>C0=="dev"?"http://localhost:8080":"https://allin1url.in",dh={BASE_URL:"/app",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_GITHUB_TOKEN:"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",VITE_GOOGLE_CLIENT_ID:"82343726980-l5frel7ehhv36rcuqo4vu5adkf8vkanq.apps.googleusercontent.com"},be=pt.create({baseURL:(dh==null?void 0:dh.VITE_API_URL)||ay(),withCredentials:!0});var kP={exports:{}},jP={};/** + * @license React + * use-sync-external-store-with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ru=m;function YB(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qB=typeof Object.is=="function"?Object.is:YB,XB=ru.useSyncExternalStore,ZB=ru.useRef,QB=ru.useEffect,JB=ru.useMemo,eF=ru.useDebugValue;jP.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var i=ZB(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=JB(function(){function c(h){if(!u){if(u=!0,d=h,h=n(h),a!==void 0&&o.hasValue){var g=o.value;if(a(g,h))return f=g}return f=h}if(g=f,qB(d,h))return g;var x=n(h);return a!==void 0&&a(g,x)?g:(d=h,f=x)}var u=!1,d,f,p=r===void 0?null:r;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,r,n,a]);var s=XB(e,i[0],i[1]);return QB(function(){o.hasValue=!0,o.value=s},[s]),eF(s),s};kP.exports=jP;var tF=kP.exports,Tr="default"in Wd?Ne:Wd,n3=Symbol.for("react-redux-context"),a3=typeof globalThis<"u"?globalThis:{};function rF(){if(!Tr.createContext)return{};const e=a3[n3]??(a3[n3]=new Map);let t=e.get(Tr.createContext);return t||(t=Tr.createContext(null),e.set(Tr.createContext,t)),t}var vi=rF(),nF=()=>{throw new Error("uSES not initialized!")};function Vx(e=vi){return function(){return Tr.useContext(e)}}var NP=Vx(),SP=nF,aF=e=>{SP=e},iF=(e,t)=>e===t;function oF(e=vi){const t=e===vi?NP:Vx(e),r=(n,a={})=>{const{equalityFn:i=iF,devModeChecks:o={}}=typeof a=="function"?{equalityFn:a}:a,{store:s,subscription:c,getServerState:u,stabilityCheck:d,identityFunctionCheck:f}=t();Tr.useRef(!0);const p=Tr.useCallback({[n.name](g){return n(g)}}[n.name],[n,d,o.stabilityCheck]),h=SP(c.addNestedSub,s.getState,u||s.getState,p,i);return Tr.useDebugValue(h),h};return Object.assign(r,{withTypes:()=>r}),r}var we=oF();function sF(e){e()}function lF(){let e=null,t=null;return{clear(){e=null,t=null},notify(){sF(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var i3={notify(){},get:()=>[]};function cF(e,t){let r,n=i3,a=0,i=!1;function o(x){d();const v=n.subscribe(x);let y=!1;return()=>{y||(y=!0,v(),f())}}function s(){n.notify()}function c(){g.onStateChange&&g.onStateChange()}function u(){return i}function d(){a++,r||(r=e.subscribe(c),n=lF())}function f(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=i3)}function p(){i||(i=!0,d())}function h(){i&&(i=!1,f())}const g={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:h,getListeners:()=>n};return g}var uF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dF=typeof navigator<"u"&&navigator.product==="ReactNative",fF=uF||dF?Tr.useLayoutEffect:Tr.useEffect;function o3(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function pF(e,t){if(o3(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a{const u=cF(e);return{store:e,subscription:u,getServerState:n?()=>n:void 0,stabilityCheck:a,identityFunctionCheck:i}},[e,n,a,i]),s=Tr.useMemo(()=>e.getState(),[e]);fF(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,s]);const c=t||vi;return Tr.createElement(c.Provider,{value:o},r)}var PP=mF;function CP(e=vi){const t=e===vi?NP:Vx(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var hF=CP();function gF(e=vi){const t=e===vi?hF:CP(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var Oi=gF();aF(tF.useSyncExternalStoreWithSelector);function zt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yF=typeof Symbol=="function"&&Symbol.observable||"@@observable",s3=yF,fh=()=>Math.random().toString(36).substring(7).split("").join("."),vF={INIT:`@@redux/INIT${fh()}`,REPLACE:`@@redux/REPLACE${fh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${fh()}`},E0=vF;function Ux(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function EP(e,t,r){if(typeof e!="function")throw new Error(zt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(zt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(zt(1));return r(EP)(e,t)}let n=e,a=t,i=new Map,o=i,s=0,c=!1;function u(){o===i&&(o=new Map,i.forEach((v,y)=>{o.set(y,v)}))}function d(){if(c)throw new Error(zt(3));return a}function f(v){if(typeof v!="function")throw new Error(zt(4));if(c)throw new Error(zt(5));let y=!0;u();const b=s++;return o.set(b,v),function(){if(y){if(c)throw new Error(zt(6));y=!1,u(),o.delete(b),i=null}}}function p(v){if(!Ux(v))throw new Error(zt(7));if(typeof v.type>"u")throw new Error(zt(8));if(typeof v.type!="string")throw new Error(zt(17));if(c)throw new Error(zt(9));try{c=!0,a=n(a,v)}finally{c=!1}return(i=o).forEach(b=>{b()}),v}function h(v){if(typeof v!="function")throw new Error(zt(10));n=v,p({type:E0.REPLACE})}function g(){const v=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(zt(11));function b(){const j=y;j.next&&j.next(d())}return b(),{unsubscribe:v(b)}},[s3](){return this}}}return p({type:E0.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:h,[s3]:g}}function xF(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:E0.INIT})>"u")throw new Error(zt(12));if(typeof r(void 0,{type:E0.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(zt(13))})}function AP(e){const t=Object.keys(e),r={};for(let i=0;i"u")throw s&&s.type,new Error(zt(14));u[f]=g,c=c||g!==h}return c=c||n.length!==Object.keys(o).length,c?u:o}}function A0(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function bF(...e){return t=>(r,n)=>{const a=t(r,n);let i=()=>{throw new Error(zt(15))};const o={getState:a.getState,dispatch:(c,...u)=>i(c,...u)},s=e.map(c=>c(o));return i=A0(...s)(a.dispatch),{...a,dispatch:i}}}function OP(e){return Ux(e)&&"type"in e&&typeof e.type=="string"}var TP=Symbol.for("immer-nothing"),l3=Symbol.for("immer-draftable"),$r=Symbol.for("immer-state");function hn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Is=Object.getPrototypeOf;function wo(e){return!!e&&!!e[$r]}function va(e){var t;return e?MP(e)||Array.isArray(e)||!!e[l3]||!!((t=e.constructor)!=null&&t[l3])||fp(e)||pp(e):!1}var wF=Object.prototype.constructor.toString();function MP(e){if(!e||typeof e!="object")return!1;const t=Is(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===wF}function O0(e,t){dp(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function dp(e){const t=e[$r];return t?t.type_:Array.isArray(e)?1:fp(e)?2:pp(e)?3:0}function iy(e,t){return dp(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function IP(e,t,r){const n=dp(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function kF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function fp(e){return e instanceof Map}function pp(e){return e instanceof Set}function Vi(e){return e.copy_||e.base_}function oy(e,t){if(fp(e))return new Map(e);if(pp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=MP(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[$r];let a=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=jF),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Hx(n,!0))),e}function jF(){hn(2)}function mp(e){return Object.isFrozen(e)}var NF={};function ko(e){const t=NF[e];return t||hn(0,e),t}var Pc;function _P(){return Pc}function SF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function c3(e,t){t&&(ko("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function sy(e){ly(e),e.drafts_.forEach(PF),e.drafts_=null}function ly(e){e===Pc&&(Pc=e.parent_)}function u3(e){return Pc=SF(Pc,e)}function PF(e){const t=e[$r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function d3(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[$r].modified_&&(sy(t),hn(4)),va(e)&&(e=T0(t,e),t.parent_||M0(t,e)),t.patches_&&ko("Patches").generateReplacementPatches_(r[$r].base_,e,t.patches_,t.inversePatches_)):e=T0(t,r,[]),sy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==TP?e:void 0}function T0(e,t,r){if(mp(t))return t;const n=t[$r];if(!n)return O0(t,(a,i)=>f3(e,n,t,a,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return M0(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const a=n.copy_;let i=a,o=!1;n.type_===3&&(i=new Set(a),a.clear(),o=!0),O0(i,(s,c)=>f3(e,n,a,s,c,r,o)),M0(e,a,!1),r&&e.patches_&&ko("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function f3(e,t,r,n,a,i,o){if(wo(a)){const s=i&&t&&t.type_!==3&&!iy(t.assigned_,n)?i.concat(n):void 0,c=T0(e,a,s);if(IP(r,n,c),wo(c))e.canAutoFreeze_=!1;else return}else o&&r.add(a);if(va(a)&&!mp(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;T0(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&M0(e,a)}}function M0(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hx(t,r)}function CF(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:_P(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,i=Wx;r&&(a=[n],i=Cc);const{revoke:o,proxy:s}=Proxy.revocable(a,i);return n.draft_=s,n.revoke_=o,s}var Wx={get(e,t){if(t===$r)return e;const r=Vi(e);if(!iy(r,t))return EF(e,r,t);const n=r[t];return e.finalized_||!va(n)?n:n===ph(e.base_,t)?(mh(e),e.copy_[t]=uy(n,e)):n},has(e,t){return t in Vi(e)},ownKeys(e){return Reflect.ownKeys(Vi(e))},set(e,t,r){const n=LP(Vi(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=ph(Vi(e),t),i=a==null?void 0:a[$r];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(kF(r,a)&&(r!==void 0||iy(e.base_,t)))return!0;mh(e),cy(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ph(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,mh(e),cy(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Vi(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){hn(11)},getPrototypeOf(e){return Is(e.base_)},setPrototypeOf(){hn(12)}},Cc={};O0(Wx,(e,t)=>{Cc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Cc.deleteProperty=function(e,t){return Cc.set.call(this,e,t,void 0)};Cc.set=function(e,t,r){return Wx.set.call(this,e[0],t,r,e[0])};function ph(e,t){const r=e[$r];return(r?Vi(r):e)[t]}function EF(e,t,r){var a;const n=LP(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function LP(e,t){if(!(t in e))return;let r=Is(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Is(r)}}function cy(e){e.modified_||(e.modified_=!0,e.parent_&&cy(e.parent_))}function mh(e){e.copy_||(e.copy_=oy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var AF=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const i=r;r=t;const o=this;return function(c=i,...u){return o.produce(c,d=>r.call(this,d,...u))}}typeof r!="function"&&hn(6),n!==void 0&&typeof n!="function"&&hn(7);let a;if(va(t)){const i=u3(this),o=uy(t,void 0);let s=!0;try{a=r(o),s=!1}finally{s?sy(i):ly(i)}return c3(i,n),d3(a,i)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===TP&&(a=void 0),this.autoFreeze_&&Hx(a,!0),n){const i=[],o=[];ko("Patches").generateReplacementPatches_(t,a,i,o),n(i,o)}return a}else hn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,c=>t(c,...s));let n,a;return[this.produce(t,r,(o,s)=>{n=o,a=s}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){va(e)||hn(8),wo(e)&&(e=xn(e));const t=u3(this),r=uy(e,void 0);return r[$r].isManual_=!0,ly(t),r}finishDraft(e,t){const r=e&&e[$r];(!r||!r.isManual_)&&hn(9);const{scope_:n}=r;return c3(n,t),d3(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=ko("Patches").applyPatches_;return wo(e)?n(e,t):this.produce(e,a=>n(a,t))}};function uy(e,t){const r=fp(e)?ko("MapSet").proxyMap_(e,t):pp(e)?ko("MapSet").proxySet_(e,t):CF(e,t);return(t?t.scope_:_P()).drafts_.push(r),r}function xn(e){return wo(e)||hn(10,e),DP(e)}function DP(e){if(!va(e)||mp(e))return e;const t=e[$r];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=oy(e,t.scope_.immer_.useStrictShallowCopy_)}else r=oy(e,!0);return O0(r,(n,a)=>{IP(r,n,DP(a))}),t&&(t.finalized_=!1),r}var zr=new AF,RP=zr.produce;zr.produceWithPatches.bind(zr);zr.setAutoFreeze.bind(zr);zr.setUseStrictShallowCopy.bind(zr);zr.applyPatches.bind(zr);zr.createDraft.bind(zr);zr.finishDraft.bind(zr);function OF(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function TF(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function MF(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var p3=e=>Array.isArray(e)?e:[e];function IF(e){const t=Array.isArray(e[0])?e[0]:e;return MF(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _F(e,t){const r=[],{length:n}=e;for(let a=0;a{r=Xu(),o.resetResultsCount()},o.resultsCount=()=>i,o.resetResultsCount=()=>{i=0},o}function $F(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let i=0,o=0,s,c={},u=a.pop();typeof u=="object"&&(c=u,u=a.pop()),OF(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...r,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:h=$P,argsMemoizeOptions:g=[],devModeChecks:x={}}=d,v=p3(p),y=p3(g),b=IF(a),w=f(function(){return i++,u.apply(null,arguments)},...v),j=h(function(){o++;const S=_F(b,arguments);return s=w.apply(null,S),s},...y);return Object.assign(j,{resultFunc:u,memoizedResultFunc:w,dependencies:b,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var $=$F($P),zF=Object.assign((e,t=$)=>{TF(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((o,s,c)=>(o[r[c]]=s,o),{}))},{withTypes:()=>zF});function zP(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var BF=zP(),FF=zP,VF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?A0:A0.apply(null,arguments)};function an(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(Sr(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>OP(n)&&n.type===e,r}function h3(e,t){for(const r of e)if(t(r))return r}var BP=class $l extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,$l.prototype)}static get[Symbol.species](){return $l}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new $l(...t[0].concat(this)):new $l(...t.concat(this))}};function g3(e){return va(e)?RP(e,()=>{}):e}function y3(e,t,r){if(e.has(t)){let a=e.get(t);return r.update&&(a=r.update(a,t,e),e.set(t,a)),a}if(!r.insert)throw new Error(Sr(10));const n=r.insert(t,e);return e.set(t,n),n}function UF(e){return typeof e=="boolean"}var HF=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let o=new BP;return r&&(UF(r)?o.push(BF):o.push(FF(r.extraArgument))),o},FP="RTK_autoBatch",He=()=>e=>({payload:e,meta:{[FP]:!0}}),VP=e=>t=>{setTimeout(t,e)},WF=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:VP(10),UP=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,i=!1,o=!1;const s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?WF:e.type==="callback"?e.queueNotification:VP(e.timeout),u=()=>{o=!1,i&&(i=!1,s.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){const f=()=>a&&d(),p=n.subscribe(f);return s.add(d),()=>{p(),s.delete(d)}},dispatch(d){var f;try{return a=!((f=d==null?void 0:d.meta)!=null&&f[FP]),i=!a,i&&(o||(o=!0,c(u))),n.dispatch(d)}finally{a=!0}}})},KF=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new BP(e);return n&&a.push(UP(typeof n=="object"?n:void 0)),a};function HP(e){const t=HF(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:i=void 0,enhancers:o=void 0}=e||{};let s;if(typeof r=="function")s=r;else if(Ux(r))s=AP(r);else throw new Error(Sr(1));let c;typeof n=="function"?c=n(t):c=t();let u=A0;a&&(u=VF({trace:!1,...typeof a=="object"&&a}));const d=bF(...c),f=KF(d);let p=typeof o=="function"?o(f):f();const h=u(...p);return EP(s,i,h)}function WP(e){const t={},r=[];let n;const a={addCase(i,o){const s=typeof i=="string"?i:i.type;if(!s)throw new Error(Sr(28));if(s in t)throw new Error(Sr(29));return t[s]=o,a},addMatcher(i,o){return r.push({matcher:i,reducer:o}),a},addDefaultCase(i){return n=i,a}};return e(a),[t,r,n]}function GF(e){return typeof e=="function"}function YF(e,t){let[r,n,a]=WP(t),i;if(GF(e))i=()=>g3(e());else{const s=g3(e);i=()=>s}function o(s=i(),c){let u=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[a]),u.reduce((d,f)=>{if(f)if(wo(d)){const h=f(d,c);return h===void 0?d:h}else{if(va(d))return RP(d,p=>f(p,c));{const p=f(d,c);if(p===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return d},s)}return o.getInitialState=i,o}var qF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",XF=(e=21)=>{let t="",r=e;for(;r--;)t+=qF[Math.random()*64|0];return t},ZF=Symbol.for("rtk-slice-createasyncthunk");function QF(e,t){return`${e}/${t}`}function JF({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[ZF];return function(a){const{name:i,reducerPath:o=i}=a;if(!i)throw new Error(Sr(11));typeof process<"u";const s=(typeof a.reducers=="function"?a.reducers(tV()):a.reducers)||{},c=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(w,j){const N=typeof w=="string"?w:w.type;if(!N)throw new Error(Sr(12));if(N in u.sliceCaseReducersByType)throw new Error(Sr(13));return u.sliceCaseReducersByType[N]=j,d},addMatcher(w,j){return u.sliceMatchers.push({matcher:w,reducer:j}),d},exposeAction(w,j){return u.actionCreators[w]=j,d},exposeCaseReducer(w,j){return u.sliceCaseReducersByName[w]=j,d}};c.forEach(w=>{const j=s[w],N={reducerName:w,type:QF(i,w),createNotation:typeof a.reducers=="function"};nV(j)?iV(N,j,d,t):rV(N,j,d)});function f(){const[w={},j=[],N=void 0]=typeof a.extraReducers=="function"?WP(a.extraReducers):[a.extraReducers],S={...w,...u.sliceCaseReducersByType};return YF(a.initialState,P=>{for(let C in S)P.addCase(C,S[C]);for(let C of u.sliceMatchers)P.addMatcher(C.matcher,C.reducer);for(let C of j)P.addMatcher(C.matcher,C.reducer);N&&P.addDefaultCase(N)})}const p=w=>w,h=new Map;let g;function x(w,j){return g||(g=f()),g(w,j)}function v(){return g||(g=f()),g.getInitialState()}function y(w,j=!1){function N(P){let C=P[w];return typeof C>"u"&&j&&(C=v()),C}function S(P=p){const C=y3(h,j,{insert:()=>new WeakMap});return y3(C,P,{insert:()=>{const M={};for(const[T,A]of Object.entries(a.selectors??{}))M[T]=eV(A,P,v,j);return M}})}return{reducerPath:w,getSelectors:S,get selectors(){return S(N)},selectSlice:N}}const b={name:i,reducer:x,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...y(o),injectInto(w,{reducerPath:j,...N}={}){const S=j??o;return w.inject({reducerPath:S,reducer:x},N),{...b,...y(S,!0)}}};return b}}function eV(e,t,r,n){function a(i,...o){let s=t(i);return typeof s>"u"&&n&&(s=r()),e(s,...o)}return a.unwrapped=e,a}var ar=JF();function tV(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function rV({type:e,reducerName:t,createNotation:r},n,a){let i,o;if("reducer"in n){if(r&&!aV(n))throw new Error(Sr(17));i=n.reducer,o=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?an(e,o):an(e))}function nV(e){return e._reducerDefinitionType==="asyncThunk"}function aV(e){return e._reducerDefinitionType==="reducerWithPrepare"}function iV({type:e,reducerName:t},r,n,a){if(!a)throw new Error(Sr(18));const{payloadCreator:i,fulfilled:o,pending:s,rejected:c,settled:u,options:d}=r,f=a(e,i,d);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),s&&n.addCase(f.pending,s),c&&n.addCase(f.rejected,c),u&&n.addMatcher(f.settled,u),n.exposeCaseReducer(t,{fulfilled:o||Zu,pending:s||Zu,rejected:c||Zu,settled:u||Zu})}function Zu(){}var oV="task",KP="listener",GP="completed",Kx="cancelled",sV=`task-${Kx}`,lV=`task-${GP}`,dy=`${KP}-${Kx}`,cV=`${KP}-${GP}`,hp=class{constructor(e){vm(this,"name","TaskAbortError");vm(this,"message");this.code=e,this.message=`${oV} ${Kx} (reason: ${e})`}},Gx=(e,t)=>{if(typeof e!="function")throw new TypeError(Sr(32))},I0=()=>{},YP=(e,t=I0)=>(e.catch(t),e),qP=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),oo=(e,t)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},so=e=>{if(e.aborted){const{reason:t}=e;throw new hp(t)}};function XP(e,t){let r=I0;return new Promise((n,a)=>{const i=()=>a(new hp(e.reason));if(e.aborted){i();return}r=qP(e,i),t.finally(()=>r()).then(n,a)}).finally(()=>{r=I0})}var uV=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof hp?"cancelled":"rejected",error:r}}finally{t==null||t()}},_0=e=>t=>YP(XP(e,t).then(r=>(so(e),r))),ZP=e=>{const t=_0(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:vs}=Object,v3={},gp="listenerMiddleware",dV=(e,t)=>{const r=n=>qP(e,()=>oo(n,e.reason));return(n,a)=>{Gx(n);const i=new AbortController;r(i);const o=uV(async()=>{so(e),so(i.signal);const s=await n({pause:_0(i.signal),delay:ZP(i.signal),signal:i.signal});return so(i.signal),s},()=>oo(i,lV));return a!=null&&a.autoJoin&&t.push(o.catch(I0)),{result:_0(e)(o),cancel(){oo(i,sV)}}}},fV=(e,t)=>{const r=async(n,a)=>{so(t);let i=()=>{};const s=[new Promise((c,u)=>{let d=e({predicate:n,effect:(f,p)=>{p.unsubscribe(),c([f,p.getState(),p.getOriginalState()])}});i=()=>{d(),u()}})];a!=null&&s.push(new Promise(c=>setTimeout(c,a,null)));try{const c=await XP(t,Promise.race(s));return so(t),c}finally{i()}};return(n,a)=>YP(r(n,a))},QP=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:i}=e;if(t)a=an(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(Sr(21));return Gx(i),{predicate:a,type:t,effect:i}},JP=vs(e=>{const{type:t,predicate:r,effect:n}=QP(e);return{id:XF(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Sr(22))}}},{withTypes:()=>JP}),fy=e=>{e.pending.forEach(t=>{oo(t,dy)})},pV=e=>()=>{e.forEach(fy),e.clear()},x3=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},e7=vs(an(`${gp}/add`),{withTypes:()=>e7}),mV=an(`${gp}/removeAll`),t7=vs(an(`${gp}/remove`),{withTypes:()=>t7}),hV=(...e)=>{console.error(`${gp}/error`,...e)},nu=(e={})=>{const t=new Map,{extra:r,onError:n=hV}=e;Gx(n);const a=d=>(d.unsubscribe=()=>t.delete(d.id),t.set(d.id,d),f=>{d.unsubscribe(),f!=null&&f.cancelActive&&fy(d)}),i=d=>{let f=h3(Array.from(t.values()),p=>p.effect===d.effect);return f||(f=JP(d)),a(f)};vs(i,{withTypes:()=>i});const o=d=>{const{type:f,effect:p,predicate:h}=QP(d),g=h3(Array.from(t.values()),x=>(typeof f=="string"?x.type===f:x.predicate===h)&&x.effect===p);return g&&(g.unsubscribe(),d.cancelActive&&fy(g)),!!g};vs(o,{withTypes:()=>o});const s=async(d,f,p,h)=>{const g=new AbortController,x=fV(i,g.signal),v=[];try{d.pending.add(g),await Promise.resolve(d.effect(f,vs({},p,{getOriginalState:h,condition:(y,b)=>x(y,b).then(Boolean),take:x,delay:ZP(g.signal),pause:_0(g.signal),extra:r,signal:g.signal,fork:dV(g.signal,v),unsubscribe:d.unsubscribe,subscribe:()=>{t.set(d.id,d)},cancelActiveListeners:()=>{d.pending.forEach((y,b,w)=>{y!==g&&(oo(y,dy),w.delete(y))})},cancel:()=>{oo(g,dy),d.pending.delete(g)},throwIfCancelled:()=>{so(g.signal)}})))}catch(y){y instanceof hp||x3(n,y,{raisedBy:"effect"})}finally{await Promise.all(v),oo(g,cV),d.pending.delete(g)}},c=pV(t);return{middleware:d=>f=>p=>{if(!OP(p))return f(p);if(e7.match(p))return i(p.payload);if(mV.match(p)){c();return}if(t7.match(p))return o(p.payload);let h=d.getState();const g=()=>{if(h===v3)throw new Error(Sr(23));return h};let x;try{if(x=f(p),t.size>0){const v=d.getState(),y=Array.from(t.values());for(const b of y){let w=!1;try{w=b.predicate(p,v,h)}catch(j){w=!1,x3(n,j,{raisedBy:"predicate"})}w&&s(b,p,d,g)}}}finally{h=v3}return x},startListening:i,stopListening:o,clearListeners:c}};function Sr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const r7=ar({name:"user",initialState:{user:null,isAuthenticated:!1,links:[],notifications:0},reducers:{setUser:(e,t)=>{e.user=t.payload},setAuthenticated:(e,t)=>{e.isAuthenticated=t.payload},setLinks:(e,t)=>{console.log(t),e.links=t.payload},setNotifications:(e,t)=>{e.notifications=t.payload}}}),{setUser:L0,setAuthenticated:D0,setLinks:xi,setNotifications:b3}=r7.actions,gV=r7.reducer;/** + * @remix-run/router v1.20.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ec(){return Ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function n7(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vV(){return Math.random().toString(36).substr(2,8)}function k3(e,t){return{usr:e.state,key:e.key,idx:t}}function py(e,t,r,n){return r===void 0&&(r=null),Ec({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ys(t):t,{state:r,key:t&&t.key||n||vV()})}function R0(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ys(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function xV(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,s=Qa.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Ec({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){s=Qa.Pop;let v=d(),y=v==null?null:v-u;u=v,c&&c({action:s,location:x.location,delta:y})}function p(v,y){s=Qa.Push;let b=py(x.location,v,y);u=d()+1;let w=k3(b,u),j=x.createHref(b);try{o.pushState(w,"",j)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(j)}i&&c&&c({action:s,location:x.location,delta:1})}function h(v,y){s=Qa.Replace;let b=py(x.location,v,y);u=d();let w=k3(b,u),j=x.createHref(b);o.replaceState(w,"",j),i&&c&&c({action:s,location:x.location,delta:0})}function g(v){let y=a.location.origin!=="null"?a.location.origin:a.location.href,b=typeof v=="string"?v:R0(v);return b=b.replace(/ $/,"%20"),ft(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let x={get action(){return s},get location(){return e(a,o)},listen(v){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(w3,f),c=v,()=>{a.removeEventListener(w3,f),c=null}},createHref(v){return t(a,v)},createURL:g,encodeLocation(v){let y=g(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:h,go(v){return o.go(v)}};return x}var j3;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(j3||(j3={}));function bV(e,t,r){return r===void 0&&(r="/"),wV(e,t,r,!1)}function wV(e,t,r,n){let a=typeof t=="string"?Ys(t):t,i=Yx(a.pathname||"/",r);if(i==null)return null;let o=a7(e);kV(o);let s=null;for(let c=0;s==null&&c{let c={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(ft(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=li([n,c.relativePath]),d=r.concat(c);i.children&&i.children.length>0&&(ft(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),a7(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:AV(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let c of i7(i.path))a(i,o,c)}),t}function i7(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=i7(n.join("/")),s=[];return s.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&s.push(...o),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function kV(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:OV(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const jV=/^:[\w-]+$/,NV=3,SV=2,PV=1,CV=10,EV=-2,N3=e=>e==="*";function AV(e,t){let r=e.split("/"),n=r.length;return r.some(N3)&&(n+=EV),t&&(n+=SV),r.filter(a=>!N3(a)).reduce((a,i)=>a+(jV.test(i)?NV:i===""?PV:CV),n)}function OV(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function TV(e,t,r){let{routesMeta:n}=e,a={},i="/",o=[];for(let s=0;s{let{paramName:p,isOptional:h}=d;if(p==="*"){let x=s[f]||"";o=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const g=s[f];return h&&!g?u[p]=void 0:u[p]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function MV(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),n7(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,c)=>(n.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function IV(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return n7(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Yx(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function _V(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Ys(e):e;return{pathname:r?r.startsWith("/")?r:LV(r,t):t,search:$V(n),hash:zV(a)}}function LV(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function hh(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function DV(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function qx(e,t){let r=DV(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Xx(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Ys(e):(a=Ec({},e),ft(!a.pathname||!a.pathname.includes("?"),hh("?","pathname","search",a)),ft(!a.pathname||!a.pathname.includes("#"),hh("#","pathname","hash",a)),ft(!a.search||!a.search.includes("#"),hh("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}s=f>=0?t[f]:"/"}let c=_V(a,s),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const li=e=>e.join("/").replace(/\/\/+/g,"/"),RV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$V=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function BV(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const o7=["post","put","patch","delete"];new Set(o7);const FV=["get",...o7];new Set(FV);/** + * React Router v6.27.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),m.useCallback(function(u,d){if(d===void 0&&(d={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=Xx(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:li([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,o,i,e])}function WV(){let{matches:e}=m.useContext(Ca),t=e[e.length-1];return t?t.params:{}}function c7(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=m.useContext(Ti),{matches:a}=m.useContext(Ca),{pathname:i}=Vr(),o=JSON.stringify(qx(a,n.v7_relativeSplatPath));return m.useMemo(()=>Xx(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function KV(e,t){return GV(e,t)}function GV(e,t,r,n){qs()||ft(!1);let{navigator:a}=m.useContext(Ti),{matches:i}=m.useContext(Ca),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Vr(),d;if(t){var f;let v=typeof t=="string"?Ys(t):t;c==="/"||(f=v.pathname)!=null&&f.startsWith(c)||ft(!1),d=v}else d=u;let p=d.pathname||"/",h=p;if(c!=="/"){let v=c.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(v.length).join("/")}let g=bV(e,{pathname:h}),x=QV(g&&g.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:li([c,a.encodeLocation?a.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:li([c,a.encodeLocation?a.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r,n);return t&&x?m.createElement(yp.Provider,{value:{location:Ac({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Qa.Pop}},x):x}function YV(){let e=rU(),t=BV(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:a},r):null,null)}const qV=m.createElement(YV,null);class XV extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?m.createElement(Ca.Provider,{value:this.props.routeContext},m.createElement(s7.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ZV(e){let{routeContext:t,match:r,children:n}=e,a=m.useContext(Zx);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),m.createElement(Ca.Provider,{value:t},n)}function QV(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(a=r)==null?void 0:a.errors;if(s!=null){let d=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||ft(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,p)=>{let h,g=!1,x=null,v=null;r&&(h=s&&f.route.id?s[f.route.id]:void 0,x=f.route.errorElement||qV,c&&(u<0&&p===0?(g=!0,v=null):u===p&&(g=!0,v=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,p+1)),b=()=>{let w;return h?w=x:g?w=v:f.route.Component?w=m.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,m.createElement(ZV,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:r!=null},children:w})};return r&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?m.createElement(XV,{location:r.location,revalidation:r.revalidation,component:x,error:h,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var u7=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(u7||{}),$0=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($0||{});function JV(e){let t=m.useContext(Zx);return t||ft(!1),t}function eU(e){let t=m.useContext(VV);return t||ft(!1),t}function tU(e){let t=m.useContext(Ca);return t||ft(!1),t}function d7(e){let t=tU(),r=t.matches[t.matches.length-1];return r.route.id||ft(!1),r.route.id}function rU(){var e;let t=m.useContext(s7),r=eU($0.UseRouteError),n=d7($0.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function nU(){let{router:e}=JV(u7.UseNavigateStable),t=d7($0.UseNavigateStable),r=m.useRef(!1);return l7(()=>{r.current=!0}),m.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Ac({fromRouteId:t},i)))},[e,t])}function my(e){let{to:t,replace:r,state:n,relative:a}=e;qs()||ft(!1);let{future:i,static:o}=m.useContext(Ti),{matches:s}=m.useContext(Ca),{pathname:c}=Vr(),u=Ht(),d=Xx(t,qx(s,i.v7_relativeSplatPath),c,a==="path"),f=JSON.stringify(d);return m.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:a}),[u,f,a,r,n]),null}function rt(e){ft(!1)}function aU(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Qa.Pop,navigator:i,static:o=!1,future:s}=e;qs()&&ft(!1);let c=t.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:c,navigator:i,static:o,future:Ac({v7_relativeSplatPath:!1},s)}),[c,s,i,o]);typeof n=="string"&&(n=Ys(n));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:g="default"}=n,x=m.useMemo(()=>{let v=Yx(d,c);return v==null?null:{location:{pathname:v,search:f,hash:p,state:h,key:g},navigationType:a}},[c,d,f,p,h,g,a]);return x==null?null:m.createElement(Ti.Provider,{value:u},m.createElement(yp.Provider,{children:r,value:x}))}function iU(e){let{children:t,location:r}=e;return KV(hy(t),r)}new Promise(()=>{});function hy(e,t){t===void 0&&(t=[]);let r=[];return m.Children.forEach(e,(n,a)=>{if(!m.isValidElement(n))return;let i=[...t,a];if(n.type===m.Fragment){r.push.apply(r,hy(n.props.children,i));return}n.type!==rt&&ft(!1),!n.props.index||!n.props.children||ft(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=hy(n.props.children,i)),r.push(o)}),r}/** + * React Router DOM v6.27.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function sU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lU(e,t){return e.button===0&&(!t||t==="_self")&&!sU(e)}const cU=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],uU="6";try{window.__reactRouterVersion=uU}catch{}const dU="startTransition",P3=Wd[dU];function fU(e){let{basename:t,children:r,future:n,window:a}=e,i=m.useRef();i.current==null&&(i.current=yV({window:a,v5Compat:!0}));let o=i.current,[s,c]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=m.useCallback(f=>{u&&P3?P3(()=>c(f)):c(f)},[c,u]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.createElement(aU,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const pU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ls=m.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:s,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,p=oU(t,cU),{basename:h}=m.useContext(Ti),g,x=!1;if(typeof u=="string"&&mU.test(u)&&(g=u,pU))try{let w=new URL(window.location.href),j=u.startsWith("//")?new URL(w.protocol+u):new URL(u),N=Yx(j.pathname,h);j.origin===w.origin&&N!=null?u=N+j.search+j.hash:x=!0}catch{}let v=UV(u,{relative:a}),y=hU(u,{replace:o,state:s,target:c,preventScrollReset:d,relative:a,viewTransition:f});function b(w){n&&n(w),w.defaultPrevented||y(w)}return m.createElement("a",gy({},p,{href:g||v,onClick:x||i?n:b,ref:r,target:c}))});var C3;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(C3||(C3={}));var E3;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(E3||(E3={}));function hU(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:o,viewTransition:s}=t===void 0?{}:t,c=Ht(),u=Vr(),d=c7(e,{relative:o});return m.useCallback(f=>{if(lU(f,r)){f.preventDefault();let p=n!==void 0?n:R0(u)===R0(d);c(e,{replace:p,state:a,preventScrollReset:i,relative:o,viewTransition:s})}},[u,c,d,n,a,r,e,i,o,s])}var f7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},A3=Ne.createContext&&Ne.createContext(f7),gU=["attr","size","title"];function yU(e,t){if(e==null)return{};var r=vU(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function z0(){return z0=Object.assign?Object.assign.bind():function(e){for(var t=1;tNe.createElement(t.tag,B0({key:r},t.attr),p7(t.child)))}function X(e){return t=>Ne.createElement(kU,z0({attr:B0({},e.attr)},t),p7(e.child))}function kU(e){var t=r=>{var{attr:n,size:a,title:i}=e,o=yU(e,gU),s=a||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),Ne.createElement("svg",z0({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:B0(B0({color:e.color||r.color},r.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&Ne.createElement("title",null,i),e.children)};return A3!==void 0?Ne.createElement(A3.Consumer,null,r=>t(r)):t(f7)}function jU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M425.344 22.22c-9.027.085-18.7 5.826-24.344 19.405-11.143 26.803-31.93 59.156-58.563 93.47 10.57 8.694 19.85 18.92 27.5 30.31 35.1-26.57 68.882-46.81 98.125-56.75 44.6-15.16 12.02-69.72-35.343-35.343 26.91-27.842 11.107-51.27-7.376-51.093zm-341.22.03c-18.5.378-37.604 23.962-16.343 49.875C31.523 38.635-.802 85.48 37.095 102.813c28.085 12.844 62.54 35.66 99.062 64.343 8.125-12.5 18.207-23.61 29.78-32.937-26.782-35.743-48.44-69.835-61.78-98.47-4.515-9.69-12.22-13.66-20.03-13.5zm169.5 99.688c-67.104 0-121.31 54.21-121.31 121.312 0 44.676 24.04 83.613 59.905 104.656v56.406h18.718v-47.468c5.203 1.95 10.576 3.552 16.093 4.78v42.688h18.69v-40.03c2.614.167 5.247.25 7.905.25 2.637 0 5.25-.086 7.844-.25v40.03h18.686v-42.687c5.52-1.226 10.89-2.834 16.094-4.78v47.467h18.688V347.97c35.92-21.03 60-60.003 60-104.72 0-67.105-54.208-121.313-121.313-121.313zm-66.874 88.218c19.88 0 36 16.12 36 36s-16.12 36-36 36-36-16.12-36-36 16.12-36 36-36zm133.563 0c19.878 0 36 16.12 36 36s-16.122 36-36 36c-19.88 0-36-16.12-36-36s16.12-36 36-36zm-66.72 52.344l29.938 48.188h-59.874l29.938-48.188zm-107.28 70.563c-40.263 32.472-78.546 58.41-109.22 72.437-37.896 17.334-5.57 64.146 30.688 30.656-30.237 36.854 21.167 69.05 36.376 36.406 15.072-32.352 40.727-71.7 72.438-112.5-11.352-7.506-21.564-16.603-30.28-27zm213.156 1.718c-8.155 9.415-17.542 17.72-27.908 24.69 31.846 39.39 56.82 76.862 69.438 107.217 17.203 41.383 71.774 9.722 31.72-31.718 47.363 34.376 79.94-20.185 35.342-35.345-32.146-10.926-69.758-34.3-108.593-64.844z"},child:[]}]})(e)}function T3(e){return X({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M131.5 217.5L55.1 100.1c47.6-59.2 119-91.8 192-92.1 42.3-.3 85.5 10.5 124.8 33.2 43.4 25.2 76.4 61.4 97.4 103L264 133.4c-58.1-3.4-113.4 29.3-132.5 84.1zm32.9 38.5c0 46.2 37.4 83.6 83.6 83.6s83.6-37.4 83.6-83.6-37.4-83.6-83.6-83.6-83.6 37.3-83.6 83.6zm314.9-89.2L339.6 174c37.9 44.3 38.5 108.2 6.6 157.2L234.1 503.6c46.5 2.5 94.4-7.7 137.8-32.9 107.4-62 150.9-192 107.4-303.9zM133.7 303.6L40.4 120.1C14.9 159.1 0 205.9 0 256c0 124 90.8 226.7 209.5 244.9l63.7-124.8c-57.6 10.8-113.2-20.8-139.5-72.5z"},child:[]}]})(e)}function NU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.252 8 8 119.252 8 256s111.252 248 248 248 248-111.252 248-248S392.748 8 256 8zm163.97 114.366c29.503 36.046 47.369 81.957 47.835 131.955-6.984-1.477-77.018-15.682-147.502-6.818-5.752-14.041-11.181-26.393-18.617-41.614 78.321-31.977 113.818-77.482 118.284-83.523zM396.421 97.87c-3.81 5.427-35.697 48.286-111.021 76.519-34.712-63.776-73.185-116.168-79.04-124.008 67.176-16.193 137.966 1.27 190.061 47.489zm-230.48-33.25c5.585 7.659 43.438 60.116 78.537 122.509-99.087 26.313-186.36 25.934-195.834 25.809C62.38 147.205 106.678 92.573 165.941 64.62zM44.17 256.323c0-2.166.043-4.322.108-6.473 9.268.19 111.92 1.513 217.706-30.146 6.064 11.868 11.857 23.915 17.174 35.949-76.599 21.575-146.194 83.527-180.531 142.306C64.794 360.405 44.17 310.73 44.17 256.323zm81.807 167.113c22.127-45.233 82.178-103.622 167.579-132.756 29.74 77.283 42.039 142.053 45.189 160.638-68.112 29.013-150.015 21.053-212.768-27.882zm248.38 8.489c-2.171-12.886-13.446-74.897-41.152-151.033 66.38-10.626 124.7 6.768 131.947 9.055-9.442 58.941-43.273 109.844-90.795 141.978z"},child:[]}]})(e)}function SU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"},child:[]}]})(e)}function PU(e){return X({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"},child:[]}]})(e)}function CU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"},child:[]}]})(e)}function m7(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(e)}function jo(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"},child:[]}]})(e)}function Rd(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z"},child:[]}]})(e)}function Qu(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"},child:[]}]})(e)}function Qx(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M320 336c0 8.84-7.16 16-16 16h-96c-8.84 0-16-7.16-16-16v-48H0v144c0 25.6 22.4 48 48 48h416c25.6 0 48-22.4 48-48V288H320v48zm144-208h-80V80c0-25.6-22.4-48-48-48H176c-25.6 0-48 22.4-48 48v48H48c-25.6 0-48 22.4-48 48v80h512v-80c0-25.6-22.4-48-48-48zm-144 0H192V96h128v32z"},child:[]}]})(e)}function wl(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm320-196c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM192 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM64 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"},child:[]}]})(e)}function EU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z"},child:[]}]})(e)}function AU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M332.8 320h38.4c6.4 0 12.8-6.4 12.8-12.8V172.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V76.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-288 0h38.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zM496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"},child:[]}]})(e)}function st(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM464 96H345.94c-21.38 0-32.09 25.85-16.97 40.97l32.4 32.4L288 242.75l-73.37-73.37c-12.5-12.5-32.76-12.5-45.25 0l-68.69 68.69c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L192 237.25l73.37 73.37c12.5 12.5 32.76 12.5 45.25 0l96-96 32.4 32.4c15.12 15.12 40.97 4.41 40.97-16.97V112c.01-8.84-7.15-16-15.99-16z"},child:[]}]})(e)}function OU(e){return X({tag:"svg",attr:{viewBox:"0 0 544 512"},child:[{tag:"path",attr:{d:"M527.79 288H290.5l158.03 158.03c6.04 6.04 15.98 6.53 22.19.68 38.7-36.46 65.32-85.61 73.13-140.86 1.34-9.46-6.51-17.85-16.06-17.85zm-15.83-64.8C503.72 103.74 408.26 8.28 288.8.04 279.68-.59 272 7.1 272 16.24V240h223.77c9.14 0 16.82-7.68 16.19-16.8zM224 288V50.71c0-9.55-8.39-17.4-17.84-16.06C86.99 51.49-4.1 155.6.14 280.37 4.5 408.51 114.83 513.59 243.03 511.98c50.4-.63 96.97-16.87 135.26-44.03 7.9-5.6 8.42-17.23 1.57-24.08L224 288z"},child:[]}]})(e)}function fr(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},child:[]}]})(e)}function lo(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(e)}function Oc(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(e)}function TU(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(e)}function Jx(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function Tc(e){return X({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"},child:[]}]})(e)}function _s(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"},child:[]}]})(e)}function aa(e){return X({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h192l-16 48h-72c-13.3 0-24 10.7-24 24s10.7 24 24 24h272c13.3 0 24-10.7 24-24s-10.7-24-24-24h-72l-16-48h192c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h448v288z"},child:[]}]})(e)}function MU(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm192 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(e)}function IU(e){return X({tag:"svg",attr:{viewBox:"0 0 288 512"},child:[{tag:"path",attr:{d:"M209.2 233.4l-108-31.6C88.7 198.2 80 186.5 80 173.5c0-16.3 13.2-29.5 29.5-29.5h66.3c12.2 0 24.2 3.7 34.2 10.5 6.1 4.1 14.3 3.1 19.5-2l34.8-34c7.1-6.9 6.1-18.4-1.8-24.5C238 74.8 207.4 64.1 176 64V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48h-2.5C45.8 64-5.4 118.7.5 183.6c4.2 46.1 39.4 83.6 83.8 96.6l102.5 30c12.5 3.7 21.2 15.3 21.2 28.3 0 16.3-13.2 29.5-29.5 29.5h-66.3C100 368 88 364.3 78 357.5c-6.1-4.1-14.3-3.1-19.5 2l-34.8 34c-7.1 6.9-6.1 18.4 1.8 24.5 24.5 19.2 55.1 29.9 86.5 30v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48.2c46.6-.9 90.3-28.6 105.7-72.7 21.5-61.6-14.6-124.8-72.5-141.7z"},child:[]}]})(e)}function Mc(e){return X({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"},child:[]}]})(e)}function M3(e){return X({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"},child:[]}]})(e)}function No(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"},child:[]}]})(e)}function _U(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function F0(e){return X({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function Ls(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"},child:[]}]})(e)}function So(e){return X({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(e)}function Lr(e){return X({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(e)}function LU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function cr(e){return X({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"},child:[]}]})(e)}function e1(e){return X({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"},child:[]}]})(e)}function V0(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"},child:[]}]})(e)}function Ds(e){return X({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"},child:[]}]})(e)}function DU(e){return X({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M471.1 96C405 96 353.3 137.3 320 174.6 286.7 137.3 235 96 168.9 96 75.8 96 0 167.8 0 256s75.8 160 168.9 160c66.1 0 117.8-41.3 151.1-78.6 33.3 37.3 85 78.6 151.1 78.6 93.1 0 168.9-71.8 168.9-160S564.2 96 471.1 96zM168.9 320c-40.2 0-72.9-28.7-72.9-64s32.7-64 72.9-64c38.2 0 73.4 36.1 94 64-20.4 27.6-55.9 64-94 64zm302.2 0c-38.2 0-73.4-36.1-94-64 20.4-27.6 55.9-64 94-64 40.2 0 72.9 28.7 72.9 64s-32.7 64-72.9 64z"},child:[]}]})(e)}function RU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"},child:[]}]})(e)}function h7(e){return X({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"},child:[]}]})(e)}function Ge(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"},child:[]}]})(e)}function $U(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48 48a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm448 16H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"},child:[]}]})(e)}function er(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"},child:[]}]})(e)}function ci(e){return X({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"},child:[]}]})(e)}function U0(e){return X({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M272 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h224c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM160 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm112-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v312z"},child:[]}]})(e)}function co(e){return X({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"},child:[]}]})(e)}function H0(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"},child:[]}]})(e)}function zU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z"},child:[]}]})(e)}function Mr(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505.12019,19.09375c-1.18945-5.53125-6.65819-11-12.207-12.1875C460.716,0,435.507,0,410.40747,0,307.17523,0,245.26909,55.20312,199.05238,128H94.83772c-16.34763.01562-35.55658,11.875-42.88664,26.48438L2.51562,253.29688A28.4,28.4,0,0,0,0,264a24.00867,24.00867,0,0,0,24.00582,24H127.81618l-22.47457,22.46875c-11.36521,11.36133-12.99607,32.25781,0,45.25L156.24582,406.625c11.15623,11.1875,32.15619,13.15625,45.27726,0l22.47457-22.46875V488a24.00867,24.00867,0,0,0,24.00581,24,28.55934,28.55934,0,0,0,10.707-2.51562l98.72834-49.39063c14.62888-7.29687,26.50776-26.5,26.50776-42.85937V312.79688c72.59753-46.3125,128.03493-108.40626,128.03493-211.09376C512.07526,76.5,512.07526,51.29688,505.12019,19.09375ZM384.04033,168A40,40,0,1,1,424.05,128,40.02322,40.02322,0,0,1,384.04033,168Z"},child:[]}]})(e)}function BU(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"},child:[]}]})(e)}function nc(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function Ic(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 160H32c-17.673 0-32-14.327-32-32V64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24z"},child:[]}]})(e)}function I3(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"},child:[]}]})(e)}function bi(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M466.5 83.7l-192-80a48.15 48.15 0 0 0-36.9 0l-192 80C27.7 91.1 16 108.6 16 128c0 198.5 114.5 335.7 221.5 380.3 11.8 4.9 25.1 4.9 36.9 0C360.1 472.6 496 349.3 496 128c0-19.4-11.7-36.9-29.5-44.3zM256.1 446.3l-.1-381 175.9 73.3c-3.3 151.4-82.1 261.1-175.8 307.7z"},child:[]}]})(e)}function FU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"},child:[]}]})(e)}function VU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function vp(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(e)}function _c(e){return X({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"},child:[]}]})(e)}function xs(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"},child:[]}]})(e)}function UU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M440.65 12.57l4 82.77A247.16 247.16 0 0 0 255.83 8C134.73 8 33.91 94.92 12.29 209.82A12 12 0 0 0 24.09 224h49.05a12 12 0 0 0 11.67-9.26 175.91 175.91 0 0 1 317-56.94l-101.46-4.86a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12H500a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12h-47.37a12 12 0 0 0-11.98 12.57zM255.83 432a175.61 175.61 0 0 1-146-77.8l101.8 4.87a12 12 0 0 0 12.57-12v-47.4a12 12 0 0 0-12-12H12a12 12 0 0 0-12 12V500a12 12 0 0 0 12 12h47.35a12 12 0 0 0 12-12.6l-4.15-82.57A247.17 247.17 0 0 0 255.83 504c121.11 0 221.93-86.92 243.55-201.82a12 12 0 0 0-11.8-14.18h-49.05a12 12 0 0 0-11.67 9.26A175.86 175.86 0 0 1 255.83 432z"},child:[]}]})(e)}function HU(e){return X({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z"},child:[]}]})(e)}function WU(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm176-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h328c6.6 0 12 5.4 12 12v312z"},child:[]}]})(e)}function xa(e){return X({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(e)}function KU(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"},child:[]}]})(e)}function GU(e){return X({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 208h-64v-64c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v64h-64c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h64v64c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-64h64c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function YU(e){return X({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z"},child:[]}]})(e)}function W0(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm95.8 32.6L272 480l-32-136 32-56h-96l32 56-32 136-47.8-191.4C56.9 292 0 350.3 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-72.1-56.9-130.4-128.2-133.8z"},child:[]}]})(e)}function ia(e){return X({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function Po(e){return X({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(e)}function g7(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5ZM16.5 15a.75.75 0 0 1 .712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 0 1 0 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 0 1-1.422 0l-.395-1.183a1.5 1.5 0 0 0-.948-.948l-1.183-.395a.75.75 0 0 1 0-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0 1 16.5 15Z",clipRule:"evenodd"},child:[]}]})(e)}function _3(e){return X({tag:"svg",attr:{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#FFC107",d:`M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r + c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r + c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z`},child:[]},{tag:"path",attr:{fill:"#FF3D00",d:`M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r + C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z`},child:[]},{tag:"path",attr:{fill:"#4CAF50",d:`M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r + c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z`},child:[]},{tag:"path",attr:{fill:"#1976D2",d:`M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r + c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z`},child:[]}]})(e)}const qU=()=>{const e=Oi(),t=Ht(),[r,n]=m.useState(!1),[a,i]=m.useState(!1),[o,s]=m.useState(!1),[c,u]=m.useState(!1),[d,f]=m.useState(!1),[p,h]=m.useState({x:0,y:0}),g=m.useRef(!0),[x,v]=m.useState(""),[y,b]=m.useState(""),[w,j]=m.useState(""),[N,S]=m.useState(""),[P,C]=m.useState("");m.useEffect(()=>(g.current=!0,()=>{g.current=!1}),[]),m.useEffect(()=>{const L=I=>{h({x:I.clientX/window.innerWidth*100,y:I.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",L,{passive:!0}),()=>window.removeEventListener("mousemove",L)},[]);const M=async L=>{var I,B,V;L.preventDefault();try{n(!0);const O=await be.post("/auth/signup",{username:P,email:w,password:N},{withCredentials:!0});if(O.status===201&&O.data.success){J.success(O.data.message),g.current&&n(!1),t("/verify",{state:{username:P,email:w,password:N}});return}}catch(O){console.log(O);const R=((B=(I=O.response)==null?void 0:I.data)==null?void 0:B.message)||"Network Slow ! Try again";if(J.error(R),((V=O.response)==null?void 0:V.status)===409){g.current&&n(!1),t("/login");return}}finally{g.current&&n(!1)}},T=async L=>{var I,B;L.preventDefault();try{n(!0);const V=await be.post("/auth/signin",{email:x,password:y},{withCredentials:!0});if(V.status===200&&V.data.success){e(L0(V.data.user)),e(D0(!0)),v(""),b(""),J.success(`Welcome ${V.data.user.username}!`),g.current&&n(!1),t("/home",{replace:!0});return}}catch(V){console.log(V);const O=((B=(I=V.response)==null?void 0:I.data)==null?void 0:B.message)||"Network Slow ! Try again";J.error(O)}finally{g.current&&n(!1)}},A=async L=>{if(L.length<5){s(!1);return}try{const I=await be.post("/auth/checkavailablity",{username:L});I.status===209&&I.data.success&&s(!1),I.status===200&&I.data.success&&s(!0)}catch(I){console.log(I),s(!1)}},E=async L=>{let I=L;if(typeof L=="object"&&L!==null&&(I=P),!I||I.length<5){J.error("Please enter a valid username (min 5 characters)");return}const B=new URLSearchParams({client_id:"82343726980-l5frel7ehhv36rcuqo4vu5adkf8vkanq.apps.googleusercontent.com",redirect_uri:`${ay()}/auth/google`,response_type:"code",scope:"openid email profile",access_type:"offline",prompt:"select_account",state:btoa(JSON.stringify({username:I,usertype:"onboarding"}))});window.location.href="https://accounts.google.com/o/oauth2/v2/auth?"+B.toString()},_=async L=>{let I=L;typeof L=="object"&&L!==null&&(I=P);const B=new URLSearchParams({client_id:"82343726980-l5frel7ehhv36rcuqo4vu5adkf8vkanq.apps.googleusercontent.com",redirect_uri:`${ay()}/auth/google`,response_type:"code",scope:"openid email profile",access_type:"offline",prompt:"select_account",state:btoa(JSON.stringify({username:I,usertype:"onboarded"}))});window.location.href="https://accounts.google.com/o/oauth2/v2/auth?"+B.toString()};return l.jsxs("div",{className:"min-h-screen w-full overflow-hidden relative bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 dark:from-gray-950 dark:via-purple-950 dark:to-gray-950",children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/30 rounded-full blur-3xl",animate:{x:p.x*.5-200,y:p.y*.5-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/30 rounded-full blur-3xl",animate:{x:p.x*.3-200,y:p.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-blue-500/30 rounded-full blur-3xl",animate:{x:p.x*.7-200,y:p.y*.7-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_110%)]"})]}),l.jsxs("div",{className:"relative z-10 min-h-screen flex items-center justify-center p-4 sm:p-6 lg:p-8",children:[l.jsxs(k.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.5},onClick:()=>t("/"),whileHover:{scale:1.05,x:-5},whileTap:{scale:.95},className:"absolute top-4 left-4 sm:top-6 sm:left-6 md:top-8 md:left-8 flex items-center gap-2 text-white dark:text-gray-300 hover:text-purple-400 dark:hover:text-purple-400 transition-colors z-20",children:[l.jsx(m7,{}),l.jsx("span",{children:"Back to Home"})]}),l.jsx(k.div,{initial:"hidden",animate:"visible",className:"w-full max-w-5xl",children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-6 md:gap-8 items-center",children:[l.jsxs(k.div,{className:"flex flex-col items-center justify-center text-center space-y-4 md:space-y-6 p-4 md:p-8 mb-6 md:mb-0",children:[l.jsxs(k.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15,delay:.2},className:"relative",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-600 to-pink-600 rounded-full blur-2xl opacity-50 animate-pulse"}),l.jsx("div",{className:"relative bg-gradient-to-br from-purple-600 to-pink-600 p-4 sm:p-6 rounded-2xl shadow-2xl",children:l.jsx(g7,{className:"text-4xl sm:text-5xl md:text-6xl text-white"})})]}),l.jsx(k.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Welcome to All in1 url"}),l.jsx(k.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"text-sm sm:text-base md:text-lg text-gray-300 dark:text-gray-400 max-w-md",children:"Transform your social media presence with personalized, memorable links that never expire."}),l.jsx(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8},className:"flex flex-wrap gap-2 sm:gap-3 justify-center mt-4 md:mt-6",children:["Personalized Links","Analytics","Free Forever"].map((L,I)=>l.jsx(k.div,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{delay:.9+I*.1,type:"spring"},className:"px-3 py-1.5 sm:px-4 sm:py-2 bg-white/10 backdrop-blur-md rounded-full text-xs sm:text-sm text-white border border-white/20",children:L},L))})]}),l.jsx(k.div,{className:"w-full",children:l.jsx("div",{className:"relative",children:l.jsxs(k.div,{className:"relative bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 sm:p-8 md:p-10 overflow-hidden",whileHover:{scale:1.02},transition:{duration:.3},children:[l.jsx("div",{className:"absolute inset-0 rounded-3xl bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 opacity-0 hover:opacity-20 transition-opacity duration-500 -z-10 blur-xl"}),l.jsxs("div",{className:"flex gap-2 mb-6 p-1 bg-white/5 dark:bg-gray-800/50 rounded-xl backdrop-blur-sm",children:[l.jsxs(k.button,{type:"button",onClick:()=>i(!1),className:`flex-1 py-3 px-4 rounded-lg font-semibold text-sm transition-all duration-300 relative ${a?"text-gray-400 dark:text-gray-500":"text-white"}`,whileHover:{scale:1.05},whileTap:{scale:.95},children:[!a&&l.jsx(k.div,{layoutId:"activeModeTab",className:"absolute inset-0 bg-gradient-to-r from-purple-600 to-pink-600 rounded-lg",transition:{type:"spring",stiffness:500,damping:30}}),l.jsx("span",{className:"relative z-10",children:"Sign In"})]}),l.jsxs(k.button,{type:"button",onClick:()=>i(!0),className:`flex-1 py-3 px-4 rounded-lg font-semibold text-sm transition-all duration-300 relative ${a?"text-white":"text-gray-400 dark:text-gray-500"}`,whileHover:{scale:1.05},whileTap:{scale:.95},children:[a&&l.jsx(k.div,{layoutId:"activeModeTab",className:"absolute inset-0 bg-gradient-to-r from-purple-600 to-pink-600 rounded-lg",transition:{type:"spring",stiffness:500,damping:30}}),l.jsx("span",{className:"relative z-10",children:"Sign Up"})]})]}),l.jsx(Ue,{mode:"wait",children:a?l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3},className:"space-y-6",children:[l.jsxs(k.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-center mb-6",children:[l.jsx("h2",{className:"text-2xl font-bold text-white",children:"Create Account"}),l.jsx("p",{className:"text-gray-300 dark:text-gray-400 text-sm mt-1",children:"Username is required for both Google and password registration"})]}),l.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 group-focus-within:text-purple-400 transition-colors z-10",children:l.jsx(ia,{className:"w-5 h-5"})}),l.jsx("input",{type:"text",placeholder:"Username (min 5 characters)",value:P,required:!0,minLength:5,onChange:L=>{if(L.target.value.includes(" ")){J.error("Space not allowed");return}A(L.target.value.toLowerCase()),C(L.target.value.toLowerCase())},className:"w-full pl-12 pr-12 py-4 bg-white/10 dark:bg-gray-800/50 border border-white/20 dark:border-gray-700 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm"}),l.jsx("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 z-10",children:P.length>=5&&l.jsx(k.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring"},children:o?l.jsx(lo,{className:"w-5 h-5 text-green-400"}):l.jsx(jU,{className:"w-5 h-5 text-red-400"})})})]}),P.length>=5&&l.jsx(k.p,{initial:{opacity:0},animate:{opacity:1},className:`text-xs ml-1 transition-all duration-300 ${o?"text-green-400":"text-red-400"}`,children:o?"✓ Username is available":"✗ Username is not available"}),P.length>=5&&o&&l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"space-y-6",children:[l.jsxs(k.button,{type:"button",onClick:()=>E(P),disabled:r,whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full py-4 px-6 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 text-white font-bold rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed relative overflow-hidden group",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),l.jsxs("span",{className:"relative z-10 flex items-center justify-center gap-3",children:[l.jsx(_3,{className:"w-5 h-5"}),l.jsx("span",{children:"Register with Google"}),l.jsx(jo,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform duration-300"}),r&&l.jsxs("svg",{className:"animate-spin h-5 w-5 ml-2",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]})]}),l.jsxs("div",{className:"relative my-6",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("div",{className:"w-full border-t border-gray-600"})}),l.jsx("div",{className:"relative flex justify-center text-sm",children:l.jsx("span",{className:"px-2 bg-gray-900 text-gray-400",children:"or use password"})})]}),l.jsxs(k.form,{onSubmit:M,className:"space-y-4",children:[l.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 group-focus-within:text-purple-400 transition-colors z-10",children:l.jsx(No,{className:"w-5 h-5"})}),l.jsx("input",{type:"email",placeholder:"Email",value:w,required:!0,onChange:L=>{if(L.target.value.includes(" ")){J.error("Space not allowed");return}j(L.target.value)},className:"w-full pl-12 pr-4 py-4 bg-white/10 dark:bg-gray-800/50 border border-white/20 dark:border-gray-700 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm"})]}),l.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 group-focus-within:text-purple-400 transition-colors z-10",children:l.jsx(er,{className:"w-5 h-5"})}),l.jsx("input",{type:d?"text":"password",placeholder:"Password (min 6 characters)",value:N,required:!0,minLength:6,onChange:L=>{if(L.target.value.includes(" ")){J.error("Space not allowed");return}S(L.target.value)},className:"w-full pl-12 pr-12 py-4 bg-white/10 dark:bg-gray-800/50 border border-white/20 dark:border-gray-700 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm"}),l.jsx("button",{type:"button",onClick:()=>f(!d),className:"absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 hover:text-purple-400 transition-colors z-10",children:d?l.jsx(So,{className:"w-5 h-5"}):l.jsx(Lr,{className:"w-5 h-5"})})]}),l.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:"flex items-center gap-2 text-gray-300 dark:text-gray-400",children:[l.jsx("input",{type:"checkbox",id:"signupCheck",checked:d,onChange:()=>f(!d),className:"w-4 h-4 rounded border-gray-400 text-purple-600 focus:ring-purple-500"}),l.jsx("label",{htmlFor:"signupCheck",className:"text-sm cursor-pointer",children:"Show Password"})]}),l.jsxs(k.button,{type:"submit",disabled:r,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full py-4 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 text-white font-bold rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed relative overflow-hidden group",children:[l.jsx("span",{className:"relative z-10 flex items-center justify-center gap-2",children:r?l.jsxs(l.Fragment,{children:[l.jsxs("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Creating Account..."]}):"Create Account"}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 opacity-0 group-hover:opacity-100 transition-opacity",initial:{x:"-100%"},whileHover:{x:"100%"},transition:{duration:.6}})]})]})]}),(!P||P.length<5)&&l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-gray-400 text-sm",children:"Enter a valid username first to continue registration"}),P&&P.length>=5&&!o&&l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-red-400 text-sm",children:"Please choose a different username - this one is already taken"})]},"signup"):l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3},className:"space-y-6",children:[l.jsxs(k.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-center mb-6",children:[l.jsx("h2",{className:"text-2xl font-bold text-white",children:"Welcome Back"}),l.jsx("p",{className:"text-gray-300 dark:text-gray-400 text-sm mt-1",children:"Sign in with your preferred method"})]}),l.jsxs(k.button,{type:"button",onClick:()=>_(P),disabled:r,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full py-4 px-6 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 text-white font-bold rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed relative overflow-hidden group",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),l.jsxs("span",{className:"relative z-10 flex items-center justify-center gap-3",children:[l.jsx(_3,{className:"w-5 h-5"}),l.jsx("span",{children:"Continue with Gmail"}),l.jsx(jo,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform duration-300"}),r&&l.jsxs("svg",{className:"animate-spin h-5 w-5 ml-2",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]})]}),l.jsxs("div",{className:"relative my-6",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("div",{className:"w-full border-t border-gray-600"})}),l.jsx("div",{className:"relative flex justify-center text-sm",children:l.jsx("span",{className:"px-2 bg-gray-900 text-gray-400",children:"or"})})]}),l.jsxs(k.form,{onSubmit:T,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"space-y-4",children:[l.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 group-focus-within:text-purple-400 transition-colors z-10",children:l.jsx(No,{className:"w-5 h-5"})}),l.jsx("input",{type:"email",placeholder:"Email",value:x,required:!0,onChange:L=>{if(L.target.value.includes(" ")){J.error("Space not allowed");return}v(L.target.value)},className:"w-full pl-12 pr-4 py-4 bg-white/10 dark:bg-gray-800/50 border border-white/20 dark:border-gray-700 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm"})]}),l.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 group-focus-within:text-purple-400 transition-colors z-10",children:l.jsx(er,{className:"w-5 h-5"})}),l.jsx("input",{type:c?"text":"password",placeholder:"Password",value:y,required:!0,minLength:6,onChange:L=>{if(L.target.value.includes(" ")){J.error("Space not allowed");return}b(L.target.value)},className:"w-full pl-12 pr-12 py-4 bg-white/10 dark:bg-gray-800/50 border border-white/20 dark:border-gray-700 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm"}),l.jsx("button",{type:"button",onClick:()=>u(!c),className:"absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 hover:text-purple-400 transition-colors z-10",children:c?l.jsx(So,{className:"w-5 h-5"}):l.jsx(Lr,{className:"w-5 h-5"})})]}),l.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:"flex items-center justify-between",children:[l.jsxs("label",{className:"flex items-center gap-2 text-gray-300 dark:text-gray-400 cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:c,onChange:()=>u(!c),className:"w-4 h-4 rounded border-gray-400 text-purple-600 focus:ring-purple-500"}),l.jsx("span",{className:"text-sm",children:"Show Password"})]}),l.jsx(ls,{to:"/reset_password",className:"text-sm text-purple-400 hover:text-purple-300 transition-colors",children:"Forgot password?"})]}),l.jsxs(k.button,{type:"submit",disabled:r,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full py-4 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 text-white font-bold rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed relative overflow-hidden group",children:[l.jsx("span",{className:"relative z-10 flex items-center justify-center gap-2",children:r?l.jsxs(l.Fragment,{children:[l.jsxs("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Signing In..."]}):"Sign In"}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 opacity-0 group-hover:opacity-100 transition-opacity",initial:{x:"-100%"},whileHover:{x:"100%"},transition:{duration:.6}})]})]})]},"signin")})]})})})]})})]})]})};function XU(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"},child:[]}]})(e)}function t1(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(e)}function y7(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(e)}function v7(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"},child:[]}]})(e)}function ZU(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}function QU(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"},child:[]}]})(e)}function Ju(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 13-4-4h8z"},child:[]}]})(e)}const JU=()=>{const e=localStorage.getItem("darkMode");return e!==null?e==="true":!1},x7=ar({name:"page",initialState:{sidebarMenu:!1,darkMode:JU(),editLinkData:null},reducers:{setSidebarMenu:(e,t)=>{e.sidebarMenu=t.payload},toggleDarkMode:e=>{e.darkMode=!e.darkMode,localStorage.setItem("darkMode",e.darkMode.toString())},setEditLinkData:(e,t)=>{e.editLinkData=t.payload},clearEditLinkData:e=>{e.editLinkData=null}}}),{setSidebarMenu:ed,toggleDarkMode:b7,setEditLinkData:eH,clearEditLinkData:L3}=x7.actions,tH=x7.reducer;function w7(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t=aH(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(r1);return s[0]===""&&s.length!==1&&s.shift(),k7(s,t)||nH(o)},getConflictingClassGroupIds:(o,s)=>{const c=r[o]||[];return s&&n[o]?[...c,...n[o]]:c}}},k7=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?k7(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(r1);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},D3=/^\[(.+)\]$/,nH=e=>{if(D3.test(e)){const t=D3.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},aH=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return oH(Object.entries(e.classGroups),r).forEach(([i,o])=>{yy(o,n,i,t)}),n},yy=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:R3(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(iH(a)){yy(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{yy(o,R3(t,i),r,n)})})},R3=(e,t)=>{let r=e;return t.split(r1).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},iH=e=>e.isThemeGetter,oH=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,sH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},j7="!",lH=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{const c=[];let u=0,d=0,f;for(let v=0;vd?f-d:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:x}};return r?s=>r({className:s,parseClassName:o}):o},cH=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},uH=e=>({cache:sH(e.cacheSize),parseClassName:lH(e),...rH(e)}),dH=/\s+/,fH=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(dH);let s="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:h}=r(u);let g=!!h,x=n(g?p.substring(0,h):p);if(!x){if(!g){s=u+(s.length>0?" "+s:s);continue}if(x=n(p),!x){s=u+(s.length>0?" "+s:s);continue}g=!1}const v=cH(d).join(":"),y=f?v+j7:v,b=y+x;if(i.includes(b))continue;i.push(b);const w=a(x,g);for(let j=0;j0?" "+s:s)}return s};function pH(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;nf(d),e());return r=uH(u),n=r.cache.get,a=r.cache.set,i=s,s(c)}function s(c){const u=n(c);if(u)return u;const d=fH(c,r);return a(c,d),d}return function(){return i(pH.apply(null,arguments))}}const $e=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},S7=/^\[(?:([a-z-]+):)?(.+)\]$/i,hH=/^\d+\/\d+$/,gH=new Set(["px","full","screen"]),yH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,bH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xn=e=>bs(e)||gH.has(e)||hH.test(e),$a=e=>Xs(e,"length",AH),bs=e=>!!e&&!Number.isNaN(Number(e)),gh=e=>Xs(e,"number",bs),kl=e=>!!e&&Number.isInteger(Number(e)),kH=e=>e.endsWith("%")&&bs(e.slice(0,-1)),pe=e=>S7.test(e),za=e=>yH.test(e),jH=new Set(["length","size","percentage"]),NH=e=>Xs(e,jH,P7),SH=e=>Xs(e,"position",P7),PH=new Set(["image","url"]),CH=e=>Xs(e,PH,TH),EH=e=>Xs(e,"",OH),jl=()=>!0,Xs=(e,t,r)=>{const n=S7.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},AH=e=>vH.test(e)&&!xH.test(e),P7=()=>!1,OH=e=>bH.test(e),TH=e=>wH.test(e),MH=()=>{const e=$e("colors"),t=$e("spacing"),r=$e("blur"),n=$e("brightness"),a=$e("borderColor"),i=$e("borderRadius"),o=$e("borderSpacing"),s=$e("borderWidth"),c=$e("contrast"),u=$e("grayscale"),d=$e("hueRotate"),f=$e("invert"),p=$e("gap"),h=$e("gradientColorStops"),g=$e("gradientColorStopPositions"),x=$e("inset"),v=$e("margin"),y=$e("opacity"),b=$e("padding"),w=$e("saturate"),j=$e("scale"),N=$e("sepia"),S=$e("skew"),P=$e("space"),C=$e("translate"),M=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",pe,t],E=()=>[pe,t],_=()=>["",Xn,$a],L=()=>["auto",bs,pe],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",pe],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[bs,pe];return{cacheSize:500,separator:":",theme:{colors:[jl],spacing:[Xn,$a],blur:["none","",za,pe],brightness:q(),borderColor:[e],borderRadius:["none","","full",za,pe],borderSpacing:E(),borderWidth:_(),contrast:q(),grayscale:R(),hueRotate:q(),invert:R(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[kH,$a],inset:A(),margin:A(),opacity:q(),padding:E(),saturate:q(),scale:q(),sepia:R(),skew:q(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[za]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),pe]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kl,pe]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",pe]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",kl,pe]}],"grid-cols":[{"grid-cols":[jl]}],"col-start-end":[{col:["auto",{span:["full",kl,pe]},pe]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[jl]}],"row-start-end":[{row:["auto",{span:[kl,pe]},pe]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",pe]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[za]},za]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",za,$a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gh]}],"font-family":[{font:[jl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",bs,gh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xn,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xn,$a]}],"underline-offset":[{"underline-offset":["auto",Xn,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),SH]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NH]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},CH]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:B()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Xn,pe]}],"outline-w":[{outline:[Xn,$a]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Xn,$a]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",za,EH]}],"shadow-color":[{shadow:[jl]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",za,pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[kl,pe]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xn,$a,gh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},IH=mH(MH);function uo(...e){return IH(ve(e))}function _H(){return C0==="prod"}function LH(){return _H()?{domain:"allin1url.in",protocol:"https",port:""}:{domain:"localhost",protocol:"http",port:":8080"}}function Jr(e,t=null){if(!e)return"";const r=LH(),n=`${r.protocol}://${e}.${r.domain}${r.port}`;return t?`${n}/${t}`:n}const DH=({sources:e})=>{const t=m.useRef(null),{username:r}=we(O=>O.admin.user),n=we(O=>O.admin.links),a=Oi(),[i,o]=m.useState(!1),[s,c]=m.useState(!1),[u,d]=m.useState({top:0,left:0}),[f,p]=m.useState(!1),[h,g]=m.useState(""),[x,v]=m.useState(""),{source:y,destination:b,clicked:w,_id:j,visibility:N="public"}=e,S=m.useRef(null),P=m.useRef(null),C=m.useRef(null);m.useEffect(()=>{if(i&&C.current){const O=()=>{if(C.current){const U=C.current.getBoundingClientRect(),q=200,ee=180,oe=8;let D=U.left,Z=U.bottom+oe;D+q>window.innerWidth&&(D=window.innerWidth-q-oe),Dwindow.innerHeight&&(Z=U.top-ee-oe,Z{window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O),cancelAnimationFrame(R)}}},[i]),m.useEffect(()=>{const O=R=>{P.current&&!P.current.contains(R.target)&&C.current&&!C.current.contains(R.target)&&!R.target.closest(".privacy-button")&&o(!1)};return i&&document.addEventListener("mousedown",O,!0),()=>{document.removeEventListener("mousedown",O,!0)}},[i]);const M=async O=>{var R,U;try{const q=await be.post("/source/deletelink",{id:O},{withCredentials:!0});if(q.status===200&&q.data.success){const ee=n.filter(oe=>oe._id!=O);a(xi(ee)),J.success("Bridge has been deleted successfully!")}}catch(q){const ee=((U=(R=q.response)==null?void 0:R.data)==null?void 0:U.message)||"Server Internal Error";J.error(ee)}},T=O=>{const R=n.find(U=>U._id===O);if(!R){J.error("Link not found");return}a(eH({id:R._id,source:R.source,destination:R.destination})),setTimeout(()=>{const U=document.querySelector("[data-create-bridge]");U&&U.scrollIntoView({behavior:"smooth",block:"start"})},100)},A=()=>{const O=t.current.innerText;navigator.clipboard.writeText(O).then(()=>{J.success("Link copied to clipboard!")}).catch(R=>{J.error("Failed to copy!")})},E=async O=>{if(O==="private"){p(!0),o(!1);return}await _(O)},_=async(O,R=null)=>{var U,q;try{c(!0);const ee={id:j,visibility:O};R&&(ee.password=R);const oe=await be.post("/source/updatevisibility",ee,{withCredentials:!0});if(oe.status===200&&oe.data.success){const D=n.map(Z=>Z._id===j?{...Z,visibility:O}:Z);a(xi(D)),J.success(`Link visibility changed to ${O}`),o(!1),p(!1),g(""),v("")}else J.error(oe.data.message||"Failed to update visibility")}catch(ee){const oe=((q=(U=ee.response)==null?void 0:U.data)==null?void 0:q.message)||"Server Internal Error";J.error(oe)}finally{c(!1)}},L=async O=>{if(O.preventDefault(),!h||h.length<4){J.error("Password must be at least 4 characters long");return}if(h!==x){J.error("Passwords do not match");return}await _("private",h)},I=()=>{switch(N){case"public":return l.jsx(cr,{className:"text-sm"});case"unlisted":return l.jsx(So,{className:"text-sm"});case"private":return l.jsx(er,{className:"text-sm"});default:return l.jsx(cr,{className:"text-sm"})}},B=()=>{switch(N){case"public":return"from-green-600 to-emerald-600";case"unlisted":return"from-yellow-600 to-orange-600";case"private":return"from-red-600 to-red-700";default:return"from-green-600 to-emerald-600"}},V=()=>{switch(N){case"public":return"Public";case"unlisted":return"Unlisted";case"private":return"Private";default:return"Public"}};return l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},whileHover:{scale:1.01,y:-2},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl shadow-xl border border-white/20 dark:border-gray-700/50 p-4 md:p-5 relative group",style:{transformOrigin:"center",willChange:"transform",overflow:"visible",zIndex:1},children:[l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-600/10 via-pink-600/10 to-blue-600/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{pointerEvents:"none",zIndex:0}}),l.jsx("div",{className:"relative z-10",style:{pointerEvents:"auto",position:"relative"},children:l.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[l.jsxs(k.div,{className:"hidden md:flex flex-col items-center justify-center border-r-2 border-dashed border-white/20 dark:border-gray-600 pr-4 min-w-[90px]",whileHover:{scale:1.05},style:{transformOrigin:"center",willChange:"transform"},children:[l.jsx(k.div,{className:"bg-gradient-to-r from-blue-600 to-cyan-600 p-3 rounded-xl shadow-lg mb-2",whileHover:{rotate:5,scale:1.05},style:{transformOrigin:"center",willChange:"transform"},children:l.jsx(co,{className:"text-xl text-white"})}),l.jsx(k.div,{className:"text-2xl md:text-3xl font-bold text-gray-900 dark:text-white mb-1",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15},children:w||0}),l.jsx("span",{className:"bg-white/10 dark:bg-gray-800/50 px-2 py-1 rounded-md text-xs font-semibold text-gray-900 dark:text-gray-200 border border-white/20",children:"Clicks"})]}),l.jsxs("div",{className:"flex-1 space-y-2",children:[l.jsxs("div",{children:[l.jsx(k.h3,{className:"text-xl md:text-2xl font-bold bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent mb-1",whileHover:{scale:1.02},style:{transformOrigin:"center",willChange:"transform"},children:y.toUpperCase()}),l.jsx("p",{className:"font-mono text-xs md:text-sm text-gray-700 dark:text-gray-400 break-all line-clamp-1",children:b})]}),l.jsxs("div",{className:"p-3 bg-gray-800/40 dark:bg-gray-800/30 rounded-xl border border-gray-700/30 dark:border-white/10",children:[l.jsx("p",{className:"text-xs text-gray-300 dark:text-gray-500 mb-1.5 font-semibold",children:"Your Personalized Link:"}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{ref:t,className:"break-all font-mono text-xs md:text-sm text-white dark:text-gray-200 flex-1 min-w-0 line-clamp-1",children:Jr(r,y)}),l.jsx(k.button,{whileHover:{scale:1.05,rotate:3},style:{transformOrigin:"center",willChange:"transform"},whileTap:{scale:.95},onClick:A,className:"bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 p-2 rounded-md transition-all duration-300 flex-shrink-0",title:"Copy link",children:l.jsx(t1,{className:"text-base text-white"})})]})]}),l.jsxs("div",{className:"md:hidden flex items-center gap-3 p-2.5 bg-white/5 dark:bg-gray-800/30 rounded-xl border border-white/10",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-blue-600 to-cyan-600 p-2 rounded-lg",whileHover:{scale:1.05,rotate:3},style:{transformOrigin:"center",willChange:"transform"},children:l.jsx(co,{className:"text-lg text-white"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-lg font-bold text-gray-900 dark:text-white",children:w||0}),l.jsx("div",{className:"text-xs text-gray-700 dark:text-gray-500",children:"Total Clicks"})]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1 flex-wrap",children:[l.jsxs("span",{className:`px-2.5 py-1 rounded-full text-xs font-semibold bg-gradient-to-r ${B()} text-white flex items-center gap-1.5`,children:[I(),l.jsx("span",{className:"hidden sm:inline",children:V()})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap relative",style:{zIndex:100},children:[l.jsxs("div",{className:"relative",ref:S,style:{zIndex:1e3},children:[l.jsxs(k.button,{ref:C,whileHover:{scale:1.05,y:-1},whileTap:{scale:.95},onClick:O=>{O.stopPropagation(),O.preventDefault();const R=!i;if(R&&C.current){const U=C.current.getBoundingClientRect(),q=200,ee=180,oe=8;let D=U.left,Z=U.bottom+oe;D+q>window.innerWidth&&(D=window.innerWidth-q-oe),Dwindow.innerHeight&&(Z=U.top-ee-oe,Z{O.stopPropagation()},style:{top:`${u.top}px`,left:`${u.left}px`,zIndex:999999,pointerEvents:"auto",position:"fixed",transform:"translateZ(0)"},children:[l.jsxs("button",{onClick:O=>{O.stopPropagation(),E("public")},className:`w-full text-left px-4 py-3 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors flex items-center gap-3 ${N==="public"?"bg-green-50 dark:bg-green-900/20":""}`,children:[l.jsx(cr,{className:`text-lg ${N==="public"?"text-green-600":"text-gray-400"}`}),l.jsxs("div",{children:[l.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:"Public"}),l.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Visible everywhere"})]})]}),l.jsxs("button",{onClick:O=>{O.stopPropagation(),E("unlisted")},className:`w-full text-left px-4 py-3 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors flex items-center gap-3 ${N==="unlisted"?"bg-yellow-50 dark:bg-yellow-900/20":""}`,children:[l.jsx(So,{className:`text-lg ${N==="unlisted"?"text-yellow-600":"text-gray-400"}`}),l.jsxs("div",{children:[l.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:"Unlisted"}),l.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"In profile, not in hub"})]})]}),l.jsxs("button",{onClick:O=>{O.stopPropagation(),E("private")},className:`w-full text-left px-4 py-3 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors flex items-center gap-3 ${N==="private"?"bg-red-50 dark:bg-red-900/20":""}`,children:[l.jsx(er,{className:`text-lg ${N==="private"?"text-red-600":"text-gray-400"}`}),l.jsxs("div",{children:[l.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:"Private"}),l.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Hidden, password required"})]})]})]},"visibility-dropdown")}),document.body)]}),typeof document<"u"&&pi.createPortal(l.jsx(Ue,{children:f&&l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[999999] flex items-center justify-center p-4",onClick:O=>{O.target===O.currentTarget&&(p(!1),g(""),v(""))},children:l.jsxs(k.div,{initial:{scale:.9,y:20},animate:{scale:1,y:0},exit:{scale:.9,y:20},className:"bg-white dark:bg-gray-800 rounded-2xl shadow-2xl p-6 max-w-md w-full",onClick:O=>O.stopPropagation(),children:[l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-r from-red-500 to-red-600 flex items-center justify-center",children:l.jsx(er,{className:"text-xl text-white"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Set Private Link Password"}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"This link will be hidden and require a password to access"})]})]}),l.jsxs("form",{onSubmit:L,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Password"}),l.jsx("input",{type:"password",value:h,onChange:O=>g(O.target.value),className:"w-full px-4 py-3 rounded-xl border-2 border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:border-red-500 focus:outline-none transition-colors",placeholder:"Enter password (min 4 characters)",required:!0,minLength:4,autoFocus:!0})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Confirm Password"}),l.jsx("input",{type:"password",value:x,onChange:O=>v(O.target.value),className:"w-full px-4 py-3 rounded-xl border-2 border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:border-red-500 focus:outline-none transition-colors",placeholder:"Confirm password",required:!0,minLength:4})]}),l.jsxs("div",{className:"flex gap-3 pt-2",children:[l.jsx(k.button,{type:"button",onClick:()=>{p(!1),g(""),v("")},whileHover:{scale:1.02},style:{transformOrigin:"center",willChange:"transform"},whileTap:{scale:.98},className:"flex-1 px-4 py-3 rounded-xl bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white font-semibold transition-colors hover:bg-gray-300 dark:hover:bg-gray-600",children:"Cancel"}),l.jsx(k.button,{type:"submit",disabled:s||!h||!x,whileHover:{scale:s?1:1.02},style:{transformOrigin:"center",willChange:"transform"},whileTap:{scale:s?1:.98},className:"flex-1 px-4 py-3 rounded-xl bg-gradient-to-r from-red-500 to-red-600 text-white font-semibold transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg hover:shadow-xl",children:s?l.jsxs("span",{className:"flex items-center justify-center gap-2",children:[l.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Setting..."]}):"Set Private"})]})]})]})})}),document.body),l.jsxs(k.button,{whileHover:{scale:1.05,y:-1},whileTap:{scale:.95},onClick:()=>M(j),className:"bg-gradient-to-r from-red-600 to-red-700 hover:from-red-700 hover:to-red-800 text-white p-2 rounded-lg transition-all duration-300 shadow-md hover:shadow-lg flex items-center gap-1.5",title:"Delete link",children:[l.jsx(KU,{className:"text-sm"}),l.jsx("span",{className:"hidden sm:inline text-xs",children:"Delete"})]}),l.jsxs(k.button,{whileHover:{scale:1.05,y:-1},whileTap:{scale:.95},onClick:()=>T(j),className:"bg-gradient-to-r from-blue-600 to-cyan-600 hover:from-blue-700 hover:to-cyan-700 text-white p-2 rounded-lg transition-all duration-300 shadow-md hover:shadow-lg flex items-center gap-1.5",title:"Edit link",style:{transformOrigin:"center",willChange:"transform"},children:[l.jsx(Mc,{className:"text-sm"}),l.jsx("span",{className:"hidden sm:inline text-xs",children:"Edit"})]}),l.jsxs(k.a,{href:`https://allin1url.in/${r}/${y}`,target:"_blank",rel:"noopener noreferrer",whileHover:{scale:1.05,y:-1},whileTap:{scale:.95},className:"bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 text-white p-2 rounded-lg transition-all duration-300 shadow-md hover:shadow-lg flex items-center gap-1.5",title:"Open link",style:{transformOrigin:"center",willChange:"transform"},children:[l.jsx(Ls,{className:"text-sm"}),l.jsx("span",{className:"hidden sm:inline text-xs",children:"Open"})]})]})]})]})]})})]})},C7=({children:e})=>{const t=Ht(),r=Oi(),n=m.useRef(null),a=Vr(),[i,o]=m.useState({x:0,y:0}),s=m.useRef(null),c=we(y=>y.admin.links),u=we(y=>y.admin.user.username),[d,f]=m.useState(0);m.useEffect(()=>{const y=b=>{o({x:b.clientX/window.innerWidth*100,y:b.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",y,{passive:!0}),()=>window.removeEventListener("mousemove",y)},[]);const p=()=>{t("/home")},h=()=>{t("/preview")};m.useEffect(()=>{(async()=>{var b,w;try{const j=await be.post("/source/getallsource",{username:u},{withCredentials:!0});j.status===200&&j.data.success&&(r(xi(j.data.sources)),f(N=>N+1))}catch(j){console.log(j);const N=((w=(b=j.response)==null?void 0:b.data)==null?void 0:w.message)||"Server Internal Error";J.error(N)}})()},[]),m.useEffect(()=>{c.length>0&&f(y=>y+1)},[c]);const g=()=>{const y=n.current.innerText;navigator.clipboard.writeText(y).then(()=>{J.success("Link copied to clipboard!")}).catch(b=>{J.error("Failed to copy!")})},x={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},v={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5}}};return l.jsxs("div",{className:"w-full overflow-hidden relative",children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/20 rounded-full blur-3xl",animate:{x:i.x*.5-200,y:i.y*.5-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/20 rounded-full blur-3xl",animate:{x:i.x*.3-200,y:i.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-blue-500/20 rounded-full blur-3xl",animate:{x:i.x*.7-200,y:i.y*.7-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_110%)]"})]}),l.jsx("div",{className:"relative z-10 py-8 md:py-12 px-4 sm:px-6 md:px-10 lg:px-12",children:l.jsxs(k.div,{ref:s,variants:x,initial:"hidden",animate:"visible",className:"max-w-7xl mx-auto",children:[l.jsxs(k.div,{variants:v,className:"mb-8 md:mb-12",children:[l.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-6 mb-8",children:[l.jsxs(k.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},className:"flex-1",children:[l.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-4 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Your Links"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 text-lg md:text-xl",children:"Manage and track all your personalized social media links"})]}),a.pathname==="/links"&&l.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[l.jsxs(k.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:h,className:"bg-gradient-to-r from-pink-600 via-purple-600 to-blue-600 hover:from-pink-700 hover:via-purple-700 hover:to-blue-700 text-white font-bold py-4 px-6 rounded-xl shadow-lg hover:shadow-2xl transition-all duration-300 flex items-center gap-3 text-base sm:text-lg",children:[l.jsx(Lr,{className:"text-xl sm:text-2xl"}),l.jsx("span",{className:"hidden sm:inline",children:"Preview LinkHub"}),l.jsx("span",{className:"sm:hidden",children:"Preview"})]}),l.jsxs(k.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:p,className:"bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 hover:from-purple-700 hover:via-pink-700 hover:to-blue-700 text-white font-bold py-4 px-6 rounded-xl shadow-lg hover:shadow-2xl transition-all duration-300 flex items-center gap-3 text-base sm:text-lg",children:[l.jsx(XU,{className:"text-xl sm:text-2xl"}),l.jsx("span",{className:"hidden sm:inline",children:"Create New Bridge"}),l.jsx("span",{className:"sm:hidden",children:"Create"})]})]})]}),l.jsxs(k.div,{variants:v,className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-8 overflow-hidden relative group",whileHover:{scale:1.02},transition:{duration:.3},children:[l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-600/10 via-pink-600/10 to-blue-600/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),l.jsxs("div",{className:"relative z-10",children:[l.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-purple-600 to-pink-600 p-4 rounded-xl",whileHover:{scale:1.1,rotate:5},children:l.jsx(Ds,{className:"text-3xl text-white"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h3",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-2",children:"Your Linktree Hub"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 text-sm md:text-base",children:"Share this link to let visitors see all your profiles in one place"})]})]}),l.jsx("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4 p-4 bg-gray-800/40 dark:bg-gray-800/30 rounded-2xl border border-gray-700/30 dark:border-white/10",children:l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm text-gray-300 dark:text-gray-500 mb-2 font-semibold",children:"Hub Link:"}),l.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[l.jsx("span",{ref:n,className:"break-all font-mono text-base md:text-lg text-white dark:text-gray-200",children:Jr(u)}),l.jsx(k.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:g,className:"bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 p-2 rounded-lg transition-all duration-300 flex-shrink-0",title:"Copy link",children:l.jsx(t1,{className:"text-xl text-white"})})]})]})})]})]})]}),l.jsxs("div",{className:`grid grid-cols-1 ${e?"lg:grid-cols-[2fr_1fr]":""} gap-6 lg:gap-8`,children:[l.jsx(k.div,{variants:v,className:`space-y-3 scroll-smooth custom-scrollbar ${e&&a.pathname!=="/links"?"lg:h-[680px] lg:overflow-y-auto lg:pr-4":""}`,children:c.length===0?l.jsxs(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-12 md:p-16 text-center",children:[l.jsx(k.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15},className:"mb-6",children:l.jsx(Ge,{className:"text-6xl md:text-8xl text-gray-400 dark:text-gray-600 mx-auto"})}),l.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-gray-900 dark:text-white mb-4",children:"No Links Yet"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 text-lg mb-8 max-w-md mx-auto",children:"Get started by creating your first personalized link. Click the button above to create a new bridge!"}),l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:p,className:"bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 hover:from-purple-700 hover:via-pink-700 hover:to-blue-700 text-white font-bold py-4 px-8 rounded-xl shadow-lg hover:shadow-2xl transition-all duration-300 flex items-center gap-3 mx-auto",children:[l.jsx(Mr,{className:"text-xl"}),"Create Your First Link"]})]}):l.jsx(Ue,{children:c.map((y,b)=>l.jsx(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},exit:{opacity:0,y:-30},transition:{delay:b*.1,duration:.5},children:l.jsx(DH,{sources:y})},y._id))})}),e&&a.pathname!=="/links"&&l.jsx(k.div,{variants:v,className:"lg:sticky lg:top-8 lg:self-start",children:l.jsx("div",{className:"w-full",children:Ne.cloneElement(e,{refreshTrigger:d,height:"h-[600px] md:h-[650px]"})},d)})]}),c.length>0&&l.jsxs(k.div,{variants:v,className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6",children:[l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl shadow-xl border border-white/20 dark:border-gray-700/50 p-6 text-center",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-blue-500 to-cyan-500 p-4 rounded-xl w-fit mx-auto mb-4",whileHover:{scale:1.1,rotate:5},children:l.jsx(Ge,{className:"text-3xl text-white"})}),l.jsx("h3",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-2",children:c.length}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Total Links"})]}),l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl shadow-xl border border-white/20 dark:border-gray-700/50 p-6 text-center",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-purple-500 to-pink-500 p-4 rounded-xl w-fit mx-auto mb-4",whileHover:{scale:1.1,rotate:5},children:l.jsx(st,{className:"text-3xl text-white"})}),l.jsx("h3",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-2",children:c.reduce((y,b)=>y+(b.clicked||0),0)}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Total Clicks"})]}),l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl shadow-xl border border-white/20 dark:border-gray-700/50 p-6 text-center",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-green-500 to-emerald-500 p-4 rounded-xl w-fit mx-auto mb-4",whileHover:{scale:1.1,rotate:5},children:l.jsx(Ds,{className:"text-3xl text-white"})}),l.jsx("h3",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-2",children:"Live"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Hub Page"})]})]})]})})]})},RH=()=>{const[e,t]=m.useState({x:50,y:50}),r=m.useRef(null),n=ap(r,{once:!0,margin:"-100px"});return m.useEffect(()=>{const a=i=>{t({x:i.clientX/window.innerWidth*100,y:i.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",a,{passive:!0}),()=>window.removeEventListener("mousemove",a)},[]),l.jsxs("div",{ref:r,className:"relative w-full min-h-[40vh] md:min-h-[50vh] overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/20 rounded-full blur-3xl",animate:{x:e.x*.5-200,y:e.y*.5-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/20 rounded-full blur-3xl",animate:{x:e.x*.3-200,y:e.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-blue-500/20 rounded-full blur-3xl",animate:{x:e.x*.7-200,y:e.y*.7-200},transition:{type:"spring",stiffness:50,damping:20}})]}),l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_110%)]"}),l.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center min-h-[40vh] md:min-h-[50vh] px-4 py-12 md:py-16",children:[l.jsx(k.div,{initial:{opacity:0,y:20},animate:n?{opacity:1,y:0}:{},transition:{duration:.6,delay:.2},className:"absolute top-8 left-8 md:left-16 text-purple-500/40 dark:text-purple-400/30",children:l.jsx(Ge,{className:"w-8 h-8 md:w-12 md:h-12 animate-pulse"})}),l.jsx(k.div,{initial:{opacity:0,y:20},animate:n?{opacity:1,y:0}:{},transition:{duration:.6,delay:.4},className:"absolute top-8 right-8 md:right-16 text-pink-500/40 dark:text-pink-400/30",children:l.jsx(g7,{className:"w-8 h-8 md:w-12 md:h-12 animate-pulse"})}),l.jsx(k.div,{initial:{opacity:0,y:20},animate:n?{opacity:1,y:0}:{},transition:{duration:.6,delay:.6},className:"absolute bottom-8 left-12 md:left-24 text-blue-500/40 dark:text-blue-400/30",children:l.jsx(Mr,{className:"w-6 h-6 md:w-10 md:h-10 animate-pulse"})}),l.jsxs(k.div,{initial:{opacity:0,scale:.9},animate:n?{opacity:1,scale:1}:{},transition:{duration:.8,type:"spring"},className:"text-center space-y-4 md:space-y-6",children:[l.jsxs(k.div,{initial:{opacity:0,y:30},animate:n?{opacity:1,y:0}:{},transition:{duration:.8,delay:.2},className:"relative",children:[l.jsx("h1",{className:"text-5xl md:text-7xl lg:text-8xl font-extrabold font-montserrat",children:l.jsx("span",{className:"bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent animate-gradient",children:"All in1 url"})}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-400/20 via-pink-400/20 to-blue-400/20 blur-2xl -z-10"})]}),l.jsxs(k.p,{initial:{opacity:0,y:20},animate:n?{opacity:1,y:0}:{},transition:{duration:.8,delay:.4},className:"text-lg md:text-2xl lg:text-3xl font-light text-gray-700 dark:text-gray-300 tracking-wide",children:["Generate Links You'll"," ",l.jsx("span",{className:"font-semibold bg-gradient-to-r from-purple-600 to-pink-600 dark:from-purple-300 dark:to-pink-300 bg-clip-text text-transparent",children:"Never Forget"})]}),l.jsxs(k.p,{initial:{opacity:0,y:20},animate:n?{opacity:1,y:0}:{},transition:{duration:.8,delay:.6},className:"text-sm md:text-lg lg:text-xl font-extralight text-gray-600 dark:text-gray-400 max-w-2xl mx-auto px-4",children:["Turn Your Username Into"," ",l.jsx("span",{className:"font-medium text-purple-600 dark:text-purple-300",children:"Smart Links"})," - Quick and Simple!"]}),l.jsxs(k.div,{initial:{opacity:0,scale:0},animate:n?{opacity:1,scale:1}:{},transition:{duration:.6,delay:.8,type:"spring"},className:"flex items-center justify-center gap-2 mt-6 md:mt-8",children:[l.jsx("div",{className:"h-px w-16 bg-gradient-to-r from-transparent via-purple-600 dark:via-purple-400 to-transparent"}),l.jsx(k.div,{animate:{rotate:360},transition:{duration:20,repeat:1/0,ease:"linear"},className:"w-2 h-2 rounded-full bg-purple-600 dark:bg-purple-400"}),l.jsx("div",{className:"h-px w-16 bg-gradient-to-r from-transparent via-pink-600 dark:via-pink-400 to-transparent"})]})]})]})]})},$H=()=>{const e=Oi(),[t,r]=m.useState(!1),[n,a]=m.useState(""),[i,o]=m.useState(""),[s,c]=m.useState(""),[u,d]=m.useState(!1),[f,p]=m.useState(!1),[h,g]=m.useState(null),[x,v]=m.useState({x:0,y:0}),y=m.useRef(null),{username:b,_id:w}=we(B=>B.admin.user);let j=we(B=>B.admin.links);const N=we(B=>B.page.editLinkData),S=N!==null;m.useEffect(()=>{const B=V=>{v({x:V.clientX/window.innerWidth*100,y:V.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",B,{passive:!0}),()=>window.removeEventListener("mousemove",B)},[]),m.useEffect(()=>{if(N){const B=N.source.toLowerCase().trim();a(B),c(N.destination),o(B),d(!1)}else a(""),c(""),o(""),d(!1)},[N]);const P=async B=>{var V,O;if(B.preventDefault(),S&&N){if(n.toLowerCase().trim()!==N.source.toLowerCase().trim()){g({id:N.id,source:n.toLowerCase().trim(),destination:s.trim()}),p(!0);return}await C({id:N.id,source:n.toLowerCase().trim(),destination:s.trim()})}else try{r(!0);const R=await be.post("/source/addnewsource",{userId:w,username:b,source:n,destination:s},{withCredentials:!0});if(R.status===201&&R.data.success)j=[...j,R.data.link],e(xi(j)),o(R.data.link.source),d(!0),a(""),c(""),J.success("Bridge has been created successfully!");else if(R.status===201&&!R.data.success){const U=R.data.message||"Creation failed";J.error(U)}}catch(R){const U=((O=(V=R.response)==null?void 0:V.data)==null?void 0:O.message)||"Server Internal Error";J.error(U)}finally{r(!1)}},C=async B=>{var V,O;try{r(!0);const R=await be.post("/source/editlink",B,{withCredentials:!0});if(R.status===200&&R.data.success){const U=R.data.link||R.data,q=j.some(oe=>oe._id===N.id);let ee;q?ee=j.map(oe=>oe._id===N.id?{...oe,...U}:oe):(ee=[...j,U],J.warning("Link was restored and updated. It may have been removed from the list.")),e(xi(ee)),o(U.source),d(!0),e(L3()),J.success("Bridge has been updated successfully!")}else if(R.status===200&&!R.data.success){const U=R.data.message||"Update failed";J.error(U)}}catch(R){const U=((O=(V=R.response)==null?void 0:V.data)==null?void 0:O.message)||"Server Internal Error";J.error(U)}finally{r(!1)}},M=async()=>{r(!0),p(!1),N&&await C({id:N.id,source:n.toLowerCase().trim(),destination:s.trim()}),g(null)},T=()=>{p(!1),g(null)},A=()=>{e(L3()),a(""),c(""),o(""),d(!1)},E=()=>{const B=y.current.innerText;navigator.clipboard.writeText(B).then(()=>{J.success("Link copied to clipboard!")}).catch(V=>{J.error("Failed to copy!")})},_=()=>{const B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let V="";for(let O=0;O<8;O++)V+=B.charAt(Math.floor(Math.random()*B.length));a(V),S&&o(V),J.success("Random code generated!")},L={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},I={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5}}};return l.jsxs("div",{className:"w-full overflow-hidden relative","data-create-bridge":!0,children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/20 rounded-full blur-3xl",animate:{x:x.x*.5-200,y:x.y*.5-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/20 rounded-full blur-3xl",animate:{x:x.x*.3-200,y:x.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-blue-500/20 rounded-full blur-3xl",animate:{x:x.x*.7-200,y:x.y*.7-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_110%)]"})]}),l.jsx("div",{className:"relative z-10 py-8 md:py-12 px-4 sm:px-6 md:px-10 lg:px-12",children:l.jsx(k.div,{variants:L,initial:"hidden",animate:"visible",className:"max-w-3xl mx-auto",children:l.jsxs(k.form,{variants:I,onSubmit:P,className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-10 lg:p-12 space-y-6 md:space-y-8",children:[l.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"flex items-center gap-4 mb-6",children:[l.jsx(k.div,{className:`bg-gradient-to-r ${S?"from-blue-500 to-cyan-500":"from-purple-600 to-pink-600"} p-4 rounded-xl`,whileHover:{scale:1.1,rotate:5},children:S?l.jsx(Mc,{className:"text-3xl text-white"}):l.jsx(Ge,{className:"text-3xl text-white"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 dark:from-purple-400 dark:via-pink-400 dark:to-blue-400 bg-clip-text text-transparent",children:S?"Edit Bridge":"Create Bridge"}),l.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm md:text-base mt-1",children:S?"Update your personalized link":"Create a new personalized social media link"})]})]}),S&&l.jsxs(k.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"bg-blue-100/80 dark:bg-blue-900/30 border border-blue-300/50 dark:border-blue-600/50 rounded-2xl p-4 flex items-center gap-3",children:[l.jsx(fr,{className:"text-blue-600 dark:text-blue-400 text-xl flex-shrink-0"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-blue-700 dark:text-blue-200 font-semibold",children:"Edit Mode Active"}),l.jsxs("p",{className:"text-blue-600/80 dark:text-blue-300/80 text-sm",children:["Editing link ID: ",l.jsx("span",{className:"font-mono font-bold",children:N==null?void 0:N.id})]})]})]}),l.jsxs(k.div,{variants:I,className:"space-y-2 relative",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("label",{className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 font-semibold text-lg",children:[l.jsx(Ge,{className:"text-purple-600 dark:text-purple-400"}),"Platform Name"]}),l.jsxs(k.button,{type:"button",onClick:_,disabled:f||t,whileHover:{scale:t?1:1.02},whileTap:{scale:t?1:.98},className:"bg-transparent hover:bg-gray-500/20 border border-gray-400 hover:border-gray-500 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white font-semibold py-1.5 px-3 rounded-lg shadow-sm hover:shadow-md transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1.5 text-xs",title:"Generate Random Code",children:[l.jsx(MU,{className:"text-sm"}),"Random"]})]}),l.jsxs("div",{className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 group-focus-within:text-purple-600 dark:group-focus-within:text-purple-400 transition-colors z-10",children:l.jsx(Ge,{className:"w-5 h-5"})}),l.jsx("input",{type:"text",placeholder:"e.g., linkedin, instagram, facebook, github",value:n,onChange:B=>{const V=B.target.value.toLowerCase();a(V),S&&o(V)},disabled:f||t,className:"w-full pl-12 pr-4 py-4 bg-white/90 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700 rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm disabled:opacity-50 disabled:cursor-not-allowed lowercase",required:!0})]}),l.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-500",children:'Enter the platform name in lowercase (e.g., "linkedin" not "LinkedIn")'})]}),l.jsxs(k.div,{variants:I,className:"space-y-2",children:[l.jsxs("label",{className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 font-semibold text-lg",children:[l.jsx(cr,{className:"text-blue-600 dark:text-blue-400"}),"Destination URL"]}),l.jsxs("div",{className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 group-focus-within:text-blue-600 dark:group-focus-within:text-blue-400 transition-colors z-10",children:l.jsx(cr,{className:"w-5 h-5"})}),l.jsx("input",{type:"url",placeholder:"https://www.linkedin.com/in/your-profile",value:s,onChange:B=>c(B.target.value),disabled:f||t,className:"w-full pl-12 pr-4 py-4 bg-white/90 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700 rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm disabled:opacity-50 disabled:cursor-not-allowed",required:!0})]}),l.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-500",children:"Enter the full URL of your profile on this platform"})]}),l.jsxs(k.div,{variants:I,className:"flex flex-col sm:flex-row gap-4 pt-4",children:[l.jsx(k.button,{type:"submit",disabled:t||f,whileHover:{scale:t?1:1.05},whileTap:{scale:t?1:.95},className:`flex-1 py-4 px-8 bg-gradient-to-r ${S?"from-blue-600 to-cyan-600 hover:from-blue-700 hover:to-cyan-700":"from-purple-600 via-pink-600 to-blue-600 hover:from-purple-700 hover:via-pink-700 hover:to-blue-700"} text-white font-bold rounded-xl shadow-lg hover:shadow-2xl transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-3`,children:t?l.jsxs(l.Fragment,{children:[l.jsxs("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),S?"Updating...":"Creating..."]}):l.jsxs(l.Fragment,{children:[S?l.jsx(Mc,{}):l.jsx(Mr,{}),S?"Update Bridge":"Create Bridge"]})}),S&&l.jsxs(k.button,{type:"button",onClick:A,disabled:t||f,whileHover:{scale:t?1:1.05},whileTap:{scale:t?1:.95},className:"py-4 px-8 bg-gray-100 dark:bg-gray-800/50 hover:bg-gray-200 dark:hover:bg-gray-700/50 text-gray-700 dark:text-white font-bold rounded-xl border border-gray-300 dark:border-gray-700 transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[l.jsx(xa,{}),"Cancel"]})]}),l.jsx(Ue,{children:u&&l.jsxs(k.div,{initial:{opacity:0,y:20,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:-20,height:0},transition:{duration:.3},className:"mt-6 p-6 bg-gradient-to-r from-purple-600/20 via-pink-600/20 to-blue-600/20 backdrop-blur-sm rounded-2xl border border-purple-400/30",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(fr,{className:"text-green-600 dark:text-green-400 text-xl"}),l.jsx("h3",{className:"text-lg font-bold text-gray-800 dark:text-white",children:"Your Personalized Link:"})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3 p-4 bg-gray-50 dark:bg-gray-800/30 rounded-xl border border-gray-200 dark:border-white/10",children:[l.jsx("span",{ref:y,className:"break-all font-mono text-base md:text-lg text-gray-900 dark:text-gray-200 flex-1",children:Jr(b,i)}),l.jsx(k.button,{type:"button",whileHover:{scale:1.1,rotate:5},whileTap:{scale:.9},onClick:E,className:"bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 p-3 rounded-lg transition-all duration-300 flex-shrink-0",title:"Copy link",children:l.jsx(t1,{className:"text-xl text-white"})})]})]})})]})})}),l.jsx(Ue,{children:f&&N&&l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/70 dark:bg-black/80 backdrop-blur-sm",onClick:T,children:l.jsxs(k.div,{initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},onClick:B=>B.stopPropagation(),className:"bg-white/95 dark:bg-gray-900/90 backdrop-blur-xl rounded-3xl shadow-2xl max-w-md w-full p-6 md:p-8 border-2 border-yellow-400/50 dark:border-yellow-500/50 relative overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-yellow-50/50 via-orange-50/50 to-red-50/50 dark:from-yellow-600/10 dark:via-orange-600/10 dark:to-red-600/10"}),l.jsxs("div",{className:"relative z-10",children:[l.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-yellow-500 to-orange-500 p-4 rounded-xl",whileHover:{scale:1.1,rotate:5},children:l.jsx(F0,{className:"text-3xl text-white"})}),l.jsx("h3",{className:"text-2xl md:text-3xl font-bold text-gray-800 dark:text-white",children:"Platform Change Warning"})]}),l.jsxs("div",{className:"mb-6",children:[l.jsxs("p",{className:"text-gray-700 dark:text-gray-300 mb-4 leading-relaxed",children:["Changing the platform from ",l.jsxs("span",{className:"font-bold text-red-600 dark:text-red-400",children:['"',N.source,'"']})," to ",l.jsxs("span",{className:"font-bold text-green-600 dark:text-green-400",children:['"',n.toLowerCase(),'"']})," will make your old link invalid!"]}),l.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/30 rounded-2xl p-4 space-y-4 mb-4 border border-gray-200 dark:border-white/10",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-semibold text-gray-700 dark:text-gray-400 mb-2 flex items-center gap-2",children:[l.jsx(xa,{className:"text-red-600 dark:text-red-400"}),"Old Link (will become invalid):"]}),l.jsx("p",{className:"text-sm font-mono text-red-600 dark:text-red-400 break-all bg-red-100 dark:bg-red-500/10 p-3 rounded-lg border border-red-300 dark:border-red-500/20",children:Jr(b,N.source)})]}),l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-semibold text-gray-700 dark:text-gray-400 mb-2 flex items-center gap-2",children:[l.jsx(fr,{className:"text-green-600 dark:text-green-400"}),"New Link:"]}),l.jsx("p",{className:"text-sm font-mono text-green-600 dark:text-green-400 break-all bg-green-100 dark:bg-green-500/10 p-3 rounded-lg border border-green-300 dark:border-green-500/20",children:Jr(b,n.toLowerCase())})]})]}),l.jsx("div",{className:"bg-yellow-100 dark:bg-yellow-500/20 border border-yellow-300 dark:border-yellow-400/30 rounded-xl p-4",children:l.jsxs("p",{className:"text-sm text-yellow-800 dark:text-yellow-300 flex items-start gap-2",children:[l.jsx(F0,{className:"text-yellow-600 dark:text-yellow-400 mt-0.5 flex-shrink-0"}),l.jsx("span",{children:"Anyone who has bookmarked or shared the old link will need to use the new one."})]})})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[l.jsx(k.button,{type:"button",onClick:T,disabled:t,whileHover:{scale:t?1:1.05},whileTap:{scale:t?1:.95},className:"flex-1 py-3 px-6 bg-gray-100 dark:bg-gray-800/50 hover:bg-gray-200 dark:hover:bg-gray-700/50 text-gray-700 dark:text-white font-semibold rounded-xl border border-gray-300 dark:border-white/20 transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),l.jsx(k.button,{type:"button",onClick:M,disabled:t,whileHover:{scale:t?1:1.05},whileTap:{scale:t?1:.95},className:"flex-1 py-3 px-6 bg-gradient-to-r from-yellow-500 to-orange-500 hover:from-yellow-600 hover:to-orange-600 text-white font-semibold rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:t?l.jsxs(l.Fragment,{children:[l.jsxs("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Updating..."]}):l.jsx(l.Fragment,{children:"Continue Anyway"})})]})]})]})})})]})},Mi=()=>{const[e,t]=m.useState({x:50,y:50});m.useEffect(()=>{const a=i=>{t({x:i.clientX/window.innerWidth*100,y:i.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",a,{passive:!0}),()=>window.removeEventListener("mousemove",a)},[]);const r={Resources:[{href:"https://deepak-aryan.vercel.app/",label:"Portfolio",external:!0},{href:"https://www.instagram.com/uffh_rn/?hl=en",label:"Instagram",external:!0}],"Follow Us":[{href:"https://github.com/DpkRn",label:"GitHub",external:!0},{href:"https://www.linkedin.com/in/deepak-kumar-b3181a236/",label:"LinkedIn",external:!0}],Legal:[{href:"#",label:"Privacy Policy",external:!1},{href:"#",label:"Terms & Conditions",external:!1}],About:[{to:"/about-developer",label:"About Developer",external:!1}]},n=[{href:"#",icon:SU,label:"Facebook",color:"hover:text-blue-500"},{href:"#",icon:CU,label:"Twitter",color:"hover:text-cyan-400"},{href:"https://github.com/DpkRn",icon:PU,label:"GitHub",color:"hover:text-gray-300"},{href:"#",icon:NU,label:"Dribbble",color:"hover:text-pink-500"}];return l.jsxs("footer",{className:"relative w-full overflow-hidden border-t border-white/10 dark:border-gray-700/50",children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/10 rounded-full blur-3xl",animate:{x:e.x*.3-200,y:e.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/10 rounded-full blur-3xl",animate:{x:e.x*.5-200,y:e.y*.5-200},transition:{type:"spring",stiffness:50,damping:20}})]}),l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808008_1px,transparent_1px),linear-gradient(to_bottom,#80808008_1px,transparent_1px)] bg-[size:24px_24px] opacity-50"}),l.jsxs("div",{className:"relative z-10 mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-4 md:py-6",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-6 md:grid-cols-4 md:gap-8",children:[l.jsx("div",{className:"col-span-2 md:col-span-1",children:l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[l.jsxs("a",{href:"https://deepak-aryan.vercel.app/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 group mb-3",children:[l.jsxs(k.div,{whileHover:{scale:1.1,rotate:5},className:"relative",children:[l.jsx("img",{src:"https://flowbite.com/docs/images/logo.svg",className:"h-10 w-10 filter brightness-0 invert dark:brightness-100 dark:invert-0 transition-all duration-300",alt:"Dwizard Logo"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-500/20 to-pink-500/20 rounded-lg blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),l.jsx("span",{className:"text-2xl font-bold bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Dwizard"})]}),l.jsx("p",{className:"text-gray-700 dark:text-gray-500 text-sm leading-normal max-w-xs",children:"Building innovative solutions to simplify digital life and empower users worldwide."})]})}),Object.entries(r).map(([a,i],o)=>l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:o*.1},children:[l.jsx("h2",{className:"mb-2 text-sm font-bold text-gray-900 dark:text-gray-200 uppercase tracking-wider",children:a}),l.jsx("ul",{className:"space-y-2",children:i.map((s,c)=>{const u=s.label==="About Developer";return l.jsx("li",{children:s.external?l.jsxs("a",{href:s.href,target:"_blank",rel:"noopener noreferrer",className:"text-gray-700 dark:text-gray-500 hover:text-purple-600 dark:hover:text-gray-300 transition-colors duration-200 text-sm flex items-center gap-2 group",children:[l.jsx("span",{className:"group-hover:translate-x-1 transition-transform duration-200",children:s.label}),l.jsx(Mr,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]}):s.to?l.jsxs(k.div,{className:"relative inline-block",whileHover:{scale:1.05},whileTap:{scale:.95},children:[u&&l.jsxs(l.Fragment,{children:[l.jsx(k.div,{className:"absolute -inset-1 rounded-lg bg-gradient-to-r from-purple-500 via-pink-500 to-blue-500 opacity-20 blur-sm",animate:{opacity:[.2,.4,.2],scale:[1,1.05,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"}}),l.jsx(k.div,{className:"absolute -inset-0.5 rounded-lg bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 opacity-30 blur-xs",animate:{opacity:[.1,.3,.1]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut",delay:.5}})]}),l.jsxs(ls,{to:s.to,className:`relative text-sm flex items-center gap-2 group ${u?"px-3 py-1.5 rounded-lg font-semibold bg-gradient-to-r from-purple-500/20 via-pink-500/20 to-blue-500/20 dark:from-purple-500/30 dark:via-pink-500/30 dark:to-blue-500/30 border border-purple-400/30 dark:border-purple-400/50 text-purple-700 dark:text-purple-300 hover:text-purple-600 dark:hover:text-purple-200 transition-all duration-300 shadow-lg hover:shadow-xl":"text-gray-700 dark:text-gray-500 hover:text-purple-600 dark:hover:text-gray-300 transition-colors duration-200"}`,children:[l.jsx(k.span,{className:"group-hover:translate-x-1 transition-transform duration-200",animate:u?{x:[0,2,0]}:{},transition:u?{duration:2,repeat:1/0,ease:"easeInOut"}:{},children:s.label}),l.jsx(k.div,{animate:u?{rotate:[0,10,-10,0],scale:[1,1.2,1]}:{},transition:u?{duration:1.5,repeat:1/0,ease:"easeInOut"}:{},children:l.jsx(Mr,{className:`${u?"w-4 h-4 opacity-100 text-purple-500 dark:text-purple-400":"w-3 h-3 opacity-0 group-hover:opacity-100"} transition-opacity duration-200`})}),u&&l.jsx(k.div,{className:"absolute inset-0 rounded-lg bg-gradient-to-r from-transparent via-white/20 to-transparent",animate:{x:["-100%","100%"]},transition:{duration:2,repeat:1/0,repeatDelay:1,ease:"easeInOut"},style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent)"}})]})]}):l.jsxs("a",{href:s.href,className:"text-gray-700 dark:text-gray-500 hover:text-purple-600 dark:hover:text-gray-300 transition-colors duration-200 text-sm flex items-center gap-2 group",children:[l.jsx("span",{className:"group-hover:translate-x-1 transition-transform duration-200",children:s.label}),l.jsx(Mr,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]})},c)})})]},a))]}),l.jsx(k.div,{initial:{opacity:0,scaleX:0},whileInView:{opacity:1,scaleX:1},viewport:{once:!0},transition:{duration:.5,delay:.3},className:"my-4 h-px bg-gradient-to-r from-transparent via-white/20 to-transparent"}),l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[l.jsxs(k.span,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:.4},className:"text-sm text-gray-700 dark:text-gray-500 text-center sm:text-left",children:["© 2025"," ",l.jsx("a",{href:"https://allin1url.in",className:"font-semibold bg-gradient-to-r from-purple-400 to-pink-400 bg-clip-text text-transparent hover:from-purple-300 hover:to-pink-300 transition-all duration-200",children:"All in1 url™"}),". All Rights Reserved."]}),l.jsx(k.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:.4},className:"flex items-center justify-center sm:justify-end gap-4",children:n.map((a,i)=>{const o=a.icon;return l.jsx(k.a,{href:a.href,target:a.href!=="#"?"_blank":void 0,rel:a.href!=="#"?"noopener noreferrer":void 0,whileHover:{scale:1.2,y:-3},whileTap:{scale:.9},className:`text-gray-700 dark:text-gray-500 ${a.color} transition-colors duration-200 p-2 rounded-lg bg-white/5 hover:bg-white/10 backdrop-blur-sm border border-white/10 dark:border-gray-700/50`,"aria-label":a.label,children:l.jsx(o,{className:"w-5 h-5"})},i)})})]}),l.jsx(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.5},className:"mt-4 text-center",children:l.jsxs("p",{className:"text-sm text-gray-700 dark:text-gray-600 flex items-center justify-center gap-2",children:["Made with",l.jsx(k.span,{animate:{scale:[1,1.2,1]},transition:{duration:1,repeat:1/0,repeatDelay:1},className:"text-red-500",children:l.jsx(V0,{})}),"by"," ",l.jsx("a",{href:"https://deepak-aryan.vercel.app/",target:"_blank",rel:"noopener noreferrer",className:"font-semibold bg-gradient-to-r from-purple-400 to-pink-400 bg-clip-text text-transparent hover:from-purple-300 hover:to-pink-300 transition-all duration-200",children:"Dwizard"})]})})]})]})},zH=()=>{var T;const{username:e}=we(A=>A.admin.user),[t,r]=m.useState("default"),[n,a]=m.useState("desktop"),[i,o]=m.useState([]),[s,c]=m.useState(!0),[u,d]=m.useState(!0),[f,p]=m.useState(""),[h,g]=m.useState(0),[x,v]=m.useState(!1),[y,b]=m.useState(!1),[w,j]=m.useState(!1),N=m.useRef(null);m.useEffect(()=>{(async()=>{try{const E=await be.get("/project/templates");if(E.status===200&&E.data.success){const _=(E.data.templates||[]).map(L=>({template:L.name||L.template,displayName:L.label||L.displayName||L.name||L.template,description:L.description||""}));o(_)}}catch(E){console.error("Error fetching available templates:",E),o([{template:"default",displayName:"Default"},{template:"minimal",displayName:"Minimal"},{template:"modern",displayName:"Modern"},{template:"dark",displayName:"Dark"},{template:"light",displayName:"Light"}])}finally{d(!1)}})()},[]),m.useEffect(()=>{(async()=>{var E;if(e)try{const _=await be.post("/settings/get",{username:e},{withCredentials:!0});if(_.status===200&&_.data.success){const B=((E=_.data.settings)==null?void 0:E.template)||"default";r(B)}const I=`${Jr(e)}?preview=${Date.now()}`;console.log("Setting preview URL:",I),p(I)}catch(_){console.error("Error loading template:",_);const I=`${Jr(e)}?preview=${Date.now()}`;console.log("Setting fallback preview URL:",I),p(I)}finally{c(!1)}})()},[e]),m.useEffect(()=>{const A=E=>{y&&!E.target.closest(".template-dropdown-container")&&b(!1),w&&!E.target.closest(".device-dropdown-container")&&j(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[y,w]),m.useEffect(()=>{if(!f||s)return;const A=setTimeout(()=>{try{const E=N.current;E&&E.contentDocument?console.log("Iframe loaded successfully"):E&&E.src&&console.log("Iframe src set, should be loading")}catch{console.log("Cross-origin iframe (expected behavior)")}},5e3);return()=>clearTimeout(A)},[f,s]);const S=()=>{g(A=>A+1),v(!1),P(t)},P=A=>{const _=`${Jr(e)}?template=${A}&preview=${Date.now()}`;p(_),N.current&&(N.current.src=_)},C=A=>{r(A),b(!1),P(A)},M=A=>{a(A),j(!1)};return e?l.jsx(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mx-4 md:mx-6 lg:mx-8 mb-6",children:l.jsxs("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"bg-gradient-to-r from-purple-600 to-pink-600 p-3 rounded-xl",children:l.jsx(Lr,{className:"text-xl text-white"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white",children:"Your LinkHub Preview"}),l.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Template: ",l.jsx("span",{className:"font-semibold capitalize",children:t})," •",l.jsx("span",{className:"ml-1 text-xs",children:"Shows public view"})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsxs("div",{className:"relative device-dropdown-container",children:[l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>j(!w),className:"flex items-center gap-2 px-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-xl transition-colors text-sm font-semibold",title:"Select device view",children:[n==="desktop"?l.jsx(aa,{className:"text-sm"}):l.jsx(U0,{className:"text-sm"}),l.jsx("span",{className:"capitalize",children:n}),l.jsx(Oc,{className:`text-xs transition-transform ${w?"rotate-180":""}`})]}),w&&l.jsxs("div",{className:"absolute right-0 mt-2 w-40 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-xl shadow-2xl z-50",children:[l.jsxs("button",{onClick:()=>M("desktop"),className:`w-full text-left px-4 py-2 text-sm hover:bg-purple-50 dark:hover:bg-purple-900/30 transition-colors flex items-center gap-2 ${n==="desktop"?"bg-purple-100 dark:bg-purple-900/50 text-purple-700 dark:text-purple-300 font-semibold":"text-gray-700 dark:text-gray-300"}`,children:[l.jsx(aa,{className:"text-sm"}),l.jsx("span",{children:"Desktop"})]},"desktop"),l.jsxs("button",{onClick:()=>M("phone"),className:`w-full text-left px-4 py-2 text-sm hover:bg-purple-50 dark:hover:bg-purple-900/30 transition-colors flex items-center gap-2 ${n==="phone"?"bg-purple-100 dark:bg-purple-900/50 text-purple-700 dark:text-purple-300 font-semibold":"text-gray-700 dark:text-gray-300"}`,children:[l.jsx(U0,{className:"text-sm"}),l.jsx("span",{children:"Phone"})]},"phone")]})]}),l.jsxs("div",{className:"relative template-dropdown-container",children:[l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>b(!y),className:"flex items-center gap-2 px-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-xl transition-colors text-sm font-semibold",title:"Select template to preview",children:[l.jsx("span",{className:"capitalize",children:((T=i.find(A=>(A.template||A.name)===t))==null?void 0:T.displayName)||(t?t.charAt(0).toUpperCase()+t.slice(1):"Default")}),l.jsx(Oc,{className:`text-xs transition-transform ${y?"rotate-180":""}`})]}),y&&!u&&l.jsx("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-xl shadow-2xl z-50 max-h-64 overflow-y-auto",children:i.length>0?i.map((A,E)=>{const _=A.template||A.name||`template-${E}`;return l.jsxs("button",{onClick:()=>C(_),className:`w-full text-left px-4 py-2 text-sm hover:bg-purple-50 dark:hover:bg-purple-900/30 transition-colors ${_===t?"bg-purple-100 dark:bg-purple-900/50 text-purple-700 dark:text-purple-300 font-semibold":"text-gray-700 dark:text-gray-300"}`,children:[l.jsx("div",{className:"capitalize",children:A.displayName||A.label||_}),A.description&&l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:A.description})]},_)}):l.jsx("div",{className:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",children:"No templates available"})})]}),l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:S,className:"flex items-center gap-2 px-4 py-2 bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 rounded-xl transition-colors text-sm font-semibold",title:"Refresh preview to see latest changes",children:[l.jsx(UU,{className:"text-xs"}),l.jsx("span",{children:"Refresh"})]}),l.jsxs("a",{href:f.split("?")[0],target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-xl transition-colors text-sm font-semibold",children:[l.jsx("span",{children:"View Live"}),l.jsx(Ls,{className:"text-xs"})]})]})]}),s?l.jsx("div",{className:"flex items-center justify-center h-96 bg-gray-100 dark:bg-gray-800 rounded-2xl",children:l.jsx(vp,{className:"animate-spin text-purple-600 text-3xl"})}):l.jsxs("div",{className:`relative ${n==="phone"?"flex justify-center":"w-full"} bg-gray-100 dark:bg-gray-800 rounded-2xl overflow-hidden border-2 border-gray-200 dark:border-gray-700 shadow-inner`,children:[n==="phone"&&l.jsx("div",{className:"relative mx-auto",style:{width:"375px",maxWidth:"375px"},children:l.jsxs("div",{className:"relative bg-gray-900 dark:bg-gray-950 rounded-[2.5rem] p-2 shadow-2xl",children:[l.jsx("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-32 h-6 bg-gray-900 dark:bg-gray-950 rounded-b-2xl z-20"}),l.jsxs("div",{className:"relative bg-white dark:bg-gray-800 rounded-[2rem] overflow-hidden",children:[l.jsxs("div",{className:"absolute top-0 left-0 right-0 h-6 bg-gray-900 dark:bg-gray-900 flex items-center justify-between px-4 text-white text-xs z-10",children:[l.jsx("span",{children:"9:41"}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("div",{className:"w-4 h-2 border border-white rounded-sm"}),l.jsx("div",{className:"w-1 h-1 rounded-full bg-white"})]})]}),l.jsx("div",{className:"absolute top-6 left-0 right-0 h-12 bg-gray-200 dark:bg-gray-700 flex items-center px-3 gap-2 z-10 border-b border-gray-300 dark:border-gray-600",children:l.jsx("div",{className:"flex-1 bg-white dark:bg-gray-800 rounded px-2 py-1 text-xs text-gray-600 dark:text-gray-400 truncate",children:f.split("?")[0]})}),l.jsx("div",{className:"relative w-full h-[600px] md:h-[700px] overflow-auto mt-[3rem]",children:x?l.jsxs("div",{className:"flex flex-col items-center justify-center h-full bg-gray-100 dark:bg-gray-800 rounded-2xl p-8",children:[l.jsx(Lr,{className:"text-4xl text-gray-400 mb-4"}),l.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center mb-4 text-sm",children:"Unable to load preview. This might happen if:"}),l.jsxs("ul",{className:"text-xs text-gray-500 dark:text-gray-500 text-center space-y-2 mb-6",children:[l.jsx("li",{children:"• Your profile doesn't have any public links yet"}),l.jsx("li",{children:"• Your profile information is not set up"}),l.jsx("li",{children:"• The page is still loading"})]}),l.jsx("a",{href:f.split("?")[0],target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-xl transition-colors text-xs font-semibold",children:"Open in New Tab"})]}):l.jsx("iframe",{ref:N,src:f,className:"w-full h-full border-0",title:"LinkHub Preview",loading:"lazy",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",onError:()=>{console.error("Iframe load error"),v(!0)},onLoad:()=>{v(!1);try{const A=N.current;A&&A.contentWindow&&console.log("Iframe loaded successfully")}catch{console.log("Cross-origin iframe (expected)")}}},h)})]})]})}),n==="desktop"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"absolute top-0 left-0 right-0 h-10 bg-gray-200 dark:bg-gray-700 flex items-center px-4 gap-2 z-10 border-b border-gray-300 dark:border-gray-600",children:[l.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),l.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),l.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"}),l.jsx("div",{className:"ml-4 flex-1 bg-white dark:bg-gray-800 rounded px-3 py-1 text-xs text-gray-600 dark:text-gray-400 truncate",children:f.split("?")[0]})]}),l.jsx("div",{className:"relative w-full h-[600px] md:h-[700px] overflow-auto mt-10",children:x?l.jsxs("div",{className:"flex flex-col items-center justify-center h-full bg-gray-100 dark:bg-gray-800 rounded-2xl p-8",children:[l.jsx(Lr,{className:"text-4xl text-gray-400 mb-4"}),l.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center mb-4",children:"Unable to load preview. This might happen if:"}),l.jsxs("ul",{className:"text-sm text-gray-500 dark:text-gray-500 text-center space-y-2 mb-6",children:[l.jsx("li",{children:"• Your profile doesn't have any public links yet"}),l.jsx("li",{children:"• Your profile information is not set up"}),l.jsx("li",{children:"• The page is still loading"})]}),l.jsx("a",{href:f.split("?")[0],target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-xl transition-colors text-sm font-semibold",children:"Open in New Tab"})]}):l.jsx("iframe",{ref:N,src:f,className:"w-full h-full border-0",title:"LinkHub Preview",loading:"lazy",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",onError:()=>{console.error("Iframe load error"),v(!0)},onLoad:()=>{v(!1);try{const A=N.current;A&&A.contentWindow&&console.log("Iframe loaded successfully")}catch{console.log("Cross-origin iframe (expected)")}}},h)})]})]})]})}):null},BH=({className:e="",height:t="h-[600px] md:h-[700px]",showStatusBar:r=!0,showBrowserChrome:n=!0,template:a=null,refreshTrigger:i=0})=>{const{username:o}=we(b=>b.admin.user),[s,c]=m.useState(a||"default"),[u,d]=m.useState(!0),[f,p]=m.useState(""),[h,g]=m.useState(!1),[x,v]=m.useState(0),y=m.useRef(null);return m.useEffect(()=>{(async()=>{var w;if(!o){d(!1);return}try{if(a)c(a);else{const P=await be.post("/settings/get",{username:o},{withCredentials:!0});if(P.status===200&&P.data.success){const C=((w=P.data.settings)==null?void 0:w.template)||"default";c(C)}}const j=a||s,S=`${Jr(o)}?template=${j}&preview=${Date.now()}`;console.log("Setting preview URL:",S),p(S)}catch(j){console.error("Error loading template:",j);const N=a||s||"default",P=`${Jr(o)}?template=${N}&preview=${Date.now()}`;console.log("Setting fallback preview URL:",P),p(P)}finally{d(!1)}})()},[o,a]),m.useEffect(()=>{if(!o||!s||a)return;const w=`${Jr(o)}?template=${s}&preview=${Date.now()}`;p(w),v(j=>j+1),y.current&&(y.current.src=w)},[s,o,a]),m.useEffect(()=>{if(!o||i===0)return;const j=`${Jr(o)}?template=${a||s||"default"}&preview=${Date.now()}`;p(j),v(N=>N+1),y.current&&(y.current.src=j)},[i,o,s,a]),o?l.jsx(k.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},className:`flex justify-center ${e}`,children:l.jsx("div",{className:"relative mx-auto",style:{width:"375px",maxWidth:"375px"},children:l.jsxs("div",{className:"relative bg-gray-900 dark:bg-gray-950 rounded-[2.5rem] p-2 shadow-2xl",children:[l.jsx("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-32 h-6 bg-gray-900 dark:bg-gray-950 rounded-b-2xl z-20"}),l.jsxs("div",{className:"relative bg-white dark:bg-gray-800 rounded-[2rem] overflow-hidden",children:[r&&l.jsxs("div",{className:"absolute top-0 left-0 right-0 h-6 bg-gray-900 dark:bg-gray-900 flex items-center justify-between px-4 text-white text-xs z-10",children:[l.jsx("span",{children:"9:41"}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("div",{className:"w-4 h-2 border border-white rounded-sm"}),l.jsx("div",{className:"w-1 h-1 rounded-full bg-white"})]})]}),n&&l.jsx("div",{className:`absolute ${r?"top-6":"top-0"} left-0 right-0 h-12 bg-gray-200 dark:bg-gray-700 flex items-center px-3 gap-2 z-10 border-b border-gray-300 dark:border-gray-600`,children:l.jsx("div",{className:"flex-1 bg-white dark:bg-gray-800 rounded px-2 py-1 text-xs text-gray-600 dark:text-gray-400 truncate",children:f.split("?")[0]||"LinkHub Preview"})}),l.jsx("div",{className:`relative w-full ${t} overflow-auto ${r&&n?"mt-[3rem]":r||n?"mt-6":"mt-0"}`,children:u?l.jsx("div",{className:"flex items-center justify-center h-full bg-gray-100 dark:bg-gray-800",children:l.jsx(vp,{className:"animate-spin text-purple-600 text-3xl"})}):h?l.jsxs("div",{className:"flex flex-col items-center justify-center h-full bg-gray-100 dark:bg-gray-800 rounded-2xl p-8",children:[l.jsx(Lr,{className:"text-4xl text-gray-400 mb-4"}),l.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center mb-4 text-sm",children:"Unable to load preview. This might happen if:"}),l.jsxs("ul",{className:"text-xs text-gray-500 dark:text-gray-500 text-center space-y-2 mb-6",children:[l.jsx("li",{children:"• Your profile doesn't have any public links yet"}),l.jsx("li",{children:"• Your profile information is not set up"}),l.jsx("li",{children:"• The page is still loading"})]}),l.jsx("a",{href:f.split("?")[0],target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-xl transition-colors text-xs font-semibold",children:"Open in New Tab"})]}):l.jsx("iframe",{ref:y,src:f,className:"w-full h-full border-0",title:"LinkHub Preview",loading:"lazy",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",onError:()=>{console.error("Iframe load error"),g(!0)},onLoad:()=>{g(!1);try{const b=y.current;b&&b.contentWindow&&console.log("Iframe loaded successfully")}catch{console.log("Cross-origin iframe (expected)")}}},x)})]})]})})}):null},FH=()=>l.jsxs("div",{className:"flex flex-col dark:from-slate-900 dark:via-purple-900 dark:to-slate-900 dark:bg-gradient-to-br transition-colors duration-300",children:[l.jsx(RH,{}),l.jsx($H,{}),l.jsx(C7,{children:l.jsx(BH,{})}),l.jsx(Mi,{})]}),VH=()=>{const e=Vr(),t=Ht(),{username:r,email:n,password:a}=e.state||"",[i,o]=m.useState(["","","",""]),s=m.useRef([]),[c,u]=m.useState(!1),d=async g=>{var v,y;g.preventDefault();const x=i.reduce((b,w)=>b+w,"");J(i);try{const b=await be.post("/auth/verifyAcc",{otp:x,username:r,email:n,password:a},{withCredentials:!0});b.status===201&&b.data.success&&(J.success(b.data.message),t("/verified",{state:"verified",replace:!0}))}catch(b){console.log(b);const w=((y=(v=b.response)==null?void 0:v.data)==null?void 0:y.message)||"Server Internal Error !";J.error(w)}},f=(g,x)=>{const{value:v}=g.target;if(/^[0-9]$/.test(v)||v===""){const y=[...i];y[x]=v,o(y),v&&x{g.key==="Backspace"&&!i[x]&&x>0&&s.current[x-1].focus()},h=async g=>{var x,v;g.preventDefault();try{u(!1);const y=await be.post("/auth/signup",{email:n},{withCredentials:!0});y.status===201&&y.data.success&&(J.success(y.data.message),u(!0))}catch(y){u(!1);const b=((v=(x=y.response)==null?void 0:x.data)==null?void 0:v.message)||"something got wrong !";J.error(b)}};return l.jsx("div",{className:"relative flex min-h-screen flex-col justify-center overflow-hidden py-12",children:l.jsx("div",{className:"relative px-6 pt-10 pb-9 shadow-xl mx-auto w-full max-w-lg rounded-2xl",children:l.jsxs("div",{className:"mx-auto flex w-full max-w-md flex-col space-y-16",children:[l.jsxs("div",{className:"flex flex-col items-center justify-center text-center space-y-2",children:[l.jsx("div",{className:"font-semibold text-3xl",children:l.jsx("p",{children:"Email Verification"})}),l.jsx("div",{className:"flex flex-row text-sm font-medium text-gray-400",children:l.jsx("p",{children:`We have sent a code to your email ${n}`})})]}),l.jsx("div",{children:l.jsx("form",{children:l.jsxs("div",{className:"flex flex-col space-y-16",children:[l.jsx("div",{className:"flex flex-row items-center justify-between mx-auto h-16",children:i.map((g,x)=>l.jsx("input",{type:"text",maxLength:1,value:i[x],onChange:v=>f(v,x),onKeyDown:v=>p(v,x),ref:v=>s.current[x]=v,className:"w-full h-full flex flex-col items-center justify-center text-center px-5 outline-none rounded-xl border border-gray-200 text-lg bg-white focus:bg-gray-50 focus:ring-1 ring-blue-700"},x))}),l.jsxs("div",{className:"flex flex-col space-y-5",children:[l.jsx("div",{children:l.jsx("button",{className:"flex flex-row items-center justify-center text-center w-full border rounded-xl outline-none py-5 bg-blue-700 border-none text-white text-sm shadow-sm",onClick:d,children:"Verify Account"})}),c&&l.jsx("p",{className:"text-red-500",children:"otp sent !"}),l.jsx("p",{children:"Otp will be valid only for 5 minutes"}),l.jsxs("div",{className:"flex flex-row items-center justify-center text-center text-sm font-medium space-x-1 text-gray-500",children:[l.jsx("p",{children:"Didn't recieve code?"})," ",l.jsx("p",{className:"flex flex-row items-center text-blue-600 cursor-pointer hover:underline",onClick:h,children:"Resend"})]})]})]})})})]})})})},$d="/app/assets/logo-jUAiJw4s.png",UH=()=>{const t=we(r=>r.admin.links).filter(r=>r.notSeen>0);return t.length===0?l.jsx("div",{className:"p-8 text-center",children:l.jsxs(k.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3},className:"flex flex-col items-center justify-center gap-4",children:[l.jsx("div",{className:"w-16 h-16 rounded-full bg-gradient-to-r from-purple-500/20 to-pink-500/20 flex items-center justify-center",children:l.jsx(co,{className:"w-8 h-8 text-purple-400"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-gray-900 dark:text-gray-400 font-semibold text-lg mb-1",children:"No New Activity"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-500 text-sm",children:"You're all caught up! Check back later for new clicks."})]})]})}):l.jsx("div",{className:"p-4",children:l.jsx(Ue,{children:t.map((r,n)=>l.jsx(k.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.3,delay:n*.1},className:"mb-3 p-4 rounded-xl bg-gray-700/30 dark:bg-gray-800/30 hover:bg-gray-700/40 dark:hover:bg-gray-700/50 border border-gray-600/30 dark:border-gray-700/50 transition-all duration-200 group",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(k.div,{whileHover:{scale:1.1,rotate:5},className:"flex-shrink-0 w-10 h-10 rounded-lg bg-gradient-to-r from-purple-500/20 to-pink-500/20 flex items-center justify-center border border-purple-500/30",children:l.jsx(st,{className:"w-5 h-5 text-purple-400"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsxs("span",{className:"text-white dark:text-white font-semibold text-sm",children:[r.notSeen," ",r.notSeen===1?"New Click":"New Clicks"]}),l.jsx("span",{className:"px-2 py-0.5 rounded-full bg-gradient-to-r from-purple-500/30 to-pink-500/30 text-xs font-bold text-purple-300 dark:text-purple-300 border border-purple-400/30",children:r.source.toUpperCase()})]}),l.jsxs("p",{className:"text-gray-300 dark:text-gray-500 text-xs flex items-center gap-2",children:[l.jsx(Ge,{className:"w-3 h-3"}),l.jsx("span",{className:"truncate",children:r.destination||"Your personalized link"})]}),l.jsx(k.div,{initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:n*.1+.2},className:"mt-2 h-0.5 bg-gradient-to-r from-purple-500/50 to-pink-500/50 rounded-full"})]})]})},r._id||n))})})},HH=()=>{const e=Ht(),t=Oi(),r=m.useRef(null),n=m.useRef(null),a=m.useRef(null),i=Vr(),[o,s]=m.useState(!1),[c,u]=m.useState(!1),[d,f]=m.useState({x:50,y:50}),[p,h]=m.useState(""),[g,x]=m.useState([]),[v,y]=m.useState(!1),[b,w]=m.useState(!1),[j,N]=m.useState(!1),S=m.useRef(null),[P,C]=m.useState(!1),M=m.useRef(null),{sidebarMenu:T,darkMode:A}=we(H=>H.page),E=we(H=>H.admin.isAuthenticated),_=we(H=>{var z;return(z=H.admin.user)==null?void 0:z.username}),L=we(H=>H.admin.links)||[],I=we(H=>H.admin.notifications)||0;m.useEffect(()=>{const H=z=>{f({x:z.clientX/window.innerWidth*100,y:z.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",H,{passive:!0}),()=>window.removeEventListener("mousemove",H)},[]);const B=async H=>{var z,re;try{const ce=await be.get("/auth/signout",{withCredentials:!0});ce.status===200&&ce.data.success&&(t(L0(null)),t(D0(!1)),t(xi([])),e("/login",{replace:!0}),J.success(ce.data.message))}catch(ce){const K=((re=(z=ce.response)==null?void 0:z.data)==null?void 0:re.message)||"Server Internal Error";J.error(K)}},V=async()=>{var H,z;try{const re=await be.post("/source/getallsource",{username:_},{withCredentials:!0});re.status===200&&re.data.success&&t(xi(re.data.sources))}catch(re){console.log(re);const ce=((z=(H=re.response)==null?void 0:H.data)==null?void 0:z.message)||"Server Internal Error";J.error(ce)}},O=async()=>{try{const H=await be.post("/source/notifications",{},{withCredentials:!0});H.status===201&&H.data.success&&(await V(),t(b3(0)),u(!1),J.success("All notifications marked as read!"))}catch(H){console.log(H)}};m.useEffect(()=>{t(b3(L.reduce((H,z)=>H+z.notSeen,0)))},[L,t]);const R=async()=>{if(I===0){e("/click-details");return}u(H=>!H)},U=m.useCallback(async H=>{if(!H.trim()){x([]),y(!1);return}try{w(!0);const z=await be.post("/search/users",{query:H.trim()},{withCredentials:!0});z.status===200&&z.data.success&&(x(z.data.results||[]),y(!0))}catch(z){console.error("Search error:",z),x([])}finally{w(!1)}},[]);m.useEffect(()=>{const H=setTimeout(()=>{p?U(p):(x([]),y(!1))},300);return()=>clearTimeout(H)},[p,U]),m.useEffect(()=>{const H=z=>{r.current&&!r.current.contains(z.target)&&!z.target.closest(".notification-button")&&u(!1),n.current&&!n.current.contains(z.target)&&!z.target.closest(".profileMenu-button")&&s(!1),S.current&&!S.current.contains(z.target)&&!z.target.closest(".search-button")&&(y(!1),N(!1)),M.current&&!M.current.contains(z.target)&&!z.target.closest(".docs-menu-button")&&C(!1)};return c||o||v||j||P?document.addEventListener("mousedown",H):document.removeEventListener("mousedown",H),()=>{document.removeEventListener("mousedown",H)}},[c,o,v,j,P]);const q=H=>{e("/profile"),s(!1)},ee=H=>{e("/settings"),s(!1)},oe=[{to:"/home",label:"Home",icon:Ds},{to:"/links",label:"Links",icon:Ge},{to:"/analytics",label:"Analytics",icon:st}],D=[{to:"/docs/features",label:"Features",icon:Mr},{to:"/docs/benefits",label:"Benefits",icon:_c},{to:"/docs/security",label:"Security",icon:bi},{to:"/docs/how-to-use",label:"How to Use",icon:Qu},{to:"/docs/different",label:"How it's Different",icon:h7}],Z=["/","/login","/verify","/verified","/reset_password","/about-developer"],le=i.pathname.startsWith("/docs")||i.pathname==="/doc",Q=!E&&(Z.includes(i.pathname)||le);return l.jsxs("nav",{className:`${Q?"fixed":"sticky"} top-0 left-0 right-0 w-full z-50 backdrop-blur-xl ${Q?"bg-white/95 dark:bg-gray-900/80":"bg-gray-800/95 dark:bg-gray-900/50"} border-b ${Q?"border-gray-200 dark:border-gray-700":"border-gray-700/50 dark:border-gray-700/50"} shadow-lg`,children:[l.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/10 rounded-full blur-3xl",animate:{x:d.x*.3-200,y:d.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}})}),l.jsxs("div",{className:"relative z-10 w-full",children:[l.jsxs("div",{className:`relative flex items-center justify-between w-full ${Q?"h-14 sm:h-16 md:h-20 px-3 sm:px-4 md:px-6 lg:px-8":"h-16 md:h-20 px-4 sm:px-6 lg:px-8"}`,children:[E&&l.jsx("div",{className:"flex items-center sm:hidden",children:l.jsx(k.button,{type:"button",whileHover:{scale:1.1},whileTap:{scale:.9},className:"relative inline-flex items-center justify-center rounded-lg p-2 text-gray-300 hover:text-white bg-white/5 hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-purple-500 transition-all duration-200","aria-controls":"mobile-menu",onClick:()=>t(ed(!T)),children:l.jsx(Ue,{mode:"wait",children:T?l.jsx(k.div,{initial:{rotate:-90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:90,opacity:0},transition:{duration:.2},children:l.jsx(ZU,{className:"h-6 w-6"})},"close"):l.jsx(k.div,{initial:{rotate:90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:-90,opacity:0},transition:{duration:.2},children:l.jsx(QU,{className:"h-6 w-6"})},"menu")})})}),l.jsxs("div",{className:"flex items-center justify-center flex-1 sm:flex-none",children:[l.jsxs(ls,{to:E?"/home":"/",className:"flex items-center gap-3 group",children:[l.jsxs(k.div,{whileHover:{scale:1.05,rotateY:5},whileTap:{scale:.95},className:`relative ${Q?"h-8 w-8 sm:h-10 sm:w-10":"h-10 w-10"} rounded-full overflow-hidden`,style:{transformStyle:"preserve-3d"},children:[l.jsx(k.div,{animate:{rotateY:[0,360]},transition:{duration:20,repeat:1/0,ease:"linear"},style:{transformStyle:"preserve-3d"},className:"h-full w-full",children:l.jsx("img",{className:`${Q?"h-8 w-8 sm:h-10 sm:w-10":"h-10 w-10"} rounded-full object-contain bg-white/10 dark:bg-gray-800/20 p-1 drop-shadow-lg transition-all duration-300`,src:$d,alt:"All in1 url Logo",onError:H=>{H.target.src="https://tailwindui.com/plus/img/logos/mark.svg?color=indigo&shade=500"}})}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-500/20 to-pink-500/20 rounded-full blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),l.jsx(k.span,{className:"hidden sm:block text-lg sm:text-xl md:text-2xl font-bold bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",whileHover:{scale:1.05},children:"All in1 url"})]}),E&&l.jsxs("div",{className:"hidden sm:ml-8 sm:flex sm:items-center sm:gap-2",children:[oe.map(H=>{const z=H.icon,re=i.pathname===H.to;return l.jsxs(ls,{to:H.to,className:`relative px-4 py-2 rounded-lg font-medium text-sm md:text-base transition-all duration-200 ${re?"text-white dark:text-white bg-gradient-to-r from-purple-600/30 via-pink-600/30 to-blue-600/30":"text-white dark:text-gray-300 hover:text-white dark:hover:text-white hover:bg-white/10 dark:hover:bg-white/10"}`,children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(z,{className:"w-4 h-4"}),H.label]}),re&&l.jsx(k.div,{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400",layoutId:"activeTab",transition:{type:"spring",stiffness:380,damping:30}})]},H.to)}),l.jsxs("div",{className:"relative docs-menu-button",ref:M,children:[l.jsxs(k.button,{type:"button",onClick:()=>C(!P),className:`relative px-4 py-2 rounded-lg font-medium text-sm md:text-base transition-all duration-200 flex items-center gap-2 ${i.pathname.startsWith("/docs")?"text-white dark:text-white bg-gradient-to-r from-purple-600/30 via-pink-600/30 to-blue-600/30":"text-white dark:text-gray-300 hover:text-white dark:hover:text-white hover:bg-white/10 dark:hover:bg-white/10"}`,children:[l.jsx(Qu,{className:"w-4 h-4"}),"Docs",l.jsx(k.div,{animate:{rotate:P?180:0},transition:{duration:.2},children:l.jsx(Ju,{className:"w-4 h-4"})})]}),l.jsx(Ue,{children:P&&l.jsx(k.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute top-full left-0 z-[100] mt-2 w-56 origin-top-left rounded-2xl bg-gray-800/95 dark:bg-gray-900/90 backdrop-blur-xl border border-gray-700/50 dark:border-gray-700/50 shadow-2xl overflow-hidden",children:l.jsx("div",{className:"p-2",children:D.map(H=>{const z=H.icon,re=i.pathname===H.to;return l.jsxs(k.div,{whileHover:{x:5},className:`flex items-center gap-3 px-4 py-3 text-sm rounded-lg cursor-pointer transition-colors duration-200 ${re?"text-white dark:text-white bg-gradient-to-r from-purple-600/30 via-pink-600/30 to-blue-600/30":"text-white dark:text-gray-200 hover:text-white dark:hover:text-white hover:bg-white/10 dark:hover:bg-gray-800/50"}`,onClick:()=>{e(H.to),C(!1)},children:[l.jsx(z,{className:"w-4 h-4"}),H.label]},H.to)})})})})]})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[E&&l.jsxs("div",{className:"relative search-button",ref:S,children:[l.jsx(k.button,{type:"button",whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>N(!0),className:"md:hidden rounded-lg bg-white/10 dark:bg-gray-800/50 backdrop-blur-sm p-2.5 text-gray-300 hover:text-white focus:outline-none focus:ring-2 focus:ring-purple-500 transition-all duration-200 hover:bg-white/20 dark:hover:bg-gray-700/50 border border-white/10 dark:border-gray-700/50","aria-label":"Search users",children:l.jsx(nc,{className:"h-5 w-5"})}),l.jsxs("div",{className:"hidden md:block relative",children:[l.jsx(nc,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-gray-500 h-4 w-4 z-10"}),l.jsx("input",{ref:a,type:"text",placeholder:"Search users...",value:p,onChange:H=>h(H.target.value),onFocus:()=>{g.length>0&&y(!0)},className:"pl-10 pr-10 py-2 bg-white/10 dark:bg-gray-800/50 backdrop-blur-sm text-white placeholder-gray-400 dark:placeholder-gray-500 rounded-lg border border-white/10 dark:border-gray-700/50 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-200 w-48 md:w-64 text-sm"}),p&&l.jsx("button",{onClick:()=>{h(""),x([]),y(!1)},className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-gray-500 hover:text-white dark:hover:text-white z-10",children:l.jsx(xa,{className:"h-3 w-3"})})]}),l.jsx(Ue,{children:j&&l.jsxs(k.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"md:hidden absolute top-full left-0 mt-2 w-64 bg-white dark:bg-gray-800 rounded-xl shadow-2xl border border-gray-200 dark:border-gray-700 p-4 z-50",children:[l.jsxs("div",{className:"relative",children:[l.jsx(nc,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-gray-500 h-4 w-4"}),l.jsx("input",{ref:a,type:"text",placeholder:"Search users...",value:p,onChange:H=>h(H.target.value),onFocus:()=>{g.length>0&&y(!0)},autoFocus:!0,className:"w-full pl-10 pr-10 py-2 bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 rounded-lg border border-gray-300 dark:border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-200 text-sm"}),l.jsx("button",{onClick:()=>{N(!1),h(""),x([]),y(!1)},className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300",children:l.jsx(xa,{className:"h-4 w-4"})})]}),v&&(g.length>0||b)&&l.jsx(k.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"mt-2 w-full bg-white dark:bg-gray-800 rounded-xl shadow-xl border border-gray-200 dark:border-gray-700 overflow-hidden",children:b?l.jsx("div",{className:"p-4 text-center text-gray-600 dark:text-gray-400",children:l.jsx("div",{className:"animate-spin h-5 w-5 border-2 border-purple-500 border-t-transparent rounded-full mx-auto"})}):g.length>0?l.jsx("div",{className:"max-h-96 overflow-y-auto",children:g.map(H=>{var z,re;return l.jsxs(k.div,{whileHover:{backgroundColor:"rgba(147, 51, 234, 0.1)"},onClick:()=>{e(`/profile/${H.username}`),y(!1),h(""),N(!1)},className:"p-4 hover:bg-purple-50 dark:hover:bg-gray-700 cursor-pointer border-b border-gray-200 dark:border-gray-700 last:border-b-0 flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 flex items-center justify-center text-white font-bold flex-shrink-0",children:((re=(z=H.name)==null?void 0:z[0])==null?void 0:re.toUpperCase())||H.username[0].toUpperCase()}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"font-semibold text-gray-900 dark:text-white truncate",children:H.name||H.username}),l.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:["@",H.username]})]}),l.jsx(ia,{className:"text-gray-400 dark:text-gray-500 flex-shrink-0"})]},H.username)})}):l.jsx("div",{className:"p-4 text-center text-gray-600 dark:text-gray-400",children:"No users found"})})]})}),l.jsx(Ue,{children:!j&&v&&(g.length>0||b)&&l.jsx(k.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"hidden md:block absolute top-full left-0 mt-2 w-64 md:w-80 bg-white dark:bg-gray-800 rounded-xl shadow-2xl border border-gray-200 dark:border-gray-700 overflow-hidden z-50",children:b?l.jsx("div",{className:"p-4 text-center text-gray-600 dark:text-gray-400",children:l.jsx("div",{className:"animate-spin h-5 w-5 border-2 border-purple-500 border-t-transparent rounded-full mx-auto"})}):g.length>0?l.jsx("div",{className:"max-h-96 overflow-y-auto",children:g.map(H=>{var z,re;return l.jsxs(k.div,{whileHover:{backgroundColor:"rgba(147, 51, 234, 0.1)"},onClick:()=>{e(`/profile/${H.username}`),y(!1),h("")},className:"p-4 hover:bg-purple-50 dark:hover:bg-gray-700 cursor-pointer border-b border-gray-200 dark:border-gray-700 last:border-b-0 flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 flex items-center justify-center text-white font-bold flex-shrink-0",children:((re=(z=H.name)==null?void 0:z[0])==null?void 0:re.toUpperCase())||H.username[0].toUpperCase()}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"font-semibold text-gray-900 dark:text-white truncate",children:H.name||H.username}),l.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:["@",H.username]})]}),l.jsx(ia,{className:"text-gray-400 dark:text-gray-500 flex-shrink-0"})]},H.username)})}):l.jsx("div",{className:"p-4 text-center text-gray-600 dark:text-gray-400",children:"No users found"})})})]}),l.jsx(k.button,{type:"button",whileHover:{scale:1.1,rotate:15},whileTap:{scale:.9},onClick:()=>t(b7()),className:`relative rounded-lg backdrop-blur-sm p-2.5 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 focus:ring-offset-transparent transition-all duration-200 border ${Q?"bg-white/90 dark:bg-gray-800/50 text-gray-800 dark:text-gray-300 hover:text-purple-600 dark:hover:text-yellow-300 hover:bg-white dark:hover:bg-gray-700/50 border-gray-300 dark:border-gray-700/50 shadow-md":"bg-white/10 dark:bg-gray-800/50 text-gray-300 hover:text-white dark:hover:text-yellow-300 hover:bg-white/20 dark:hover:bg-gray-700/50 border-white/10 dark:border-gray-700/50"}`,"aria-label":"Toggle dark mode",title:A?"Switch to light mode":"Switch to dark mode",children:A?l.jsx(v7,{className:"h-5 w-5 text-yellow-300"}):l.jsx(y7,{className:`h-5 w-5 ${Q?"text-gray-800":""}`})}),!E&&l.jsxs("div",{className:"relative docs-menu-button",ref:M,children:[l.jsxs(k.button,{type:"button",onClick:()=>C(!P),className:`relative px-3 sm:px-4 py-1.5 sm:py-2 rounded-lg font-medium text-xs sm:text-sm md:text-base transition-all duration-200 flex items-center gap-1.5 sm:gap-2 ${i.pathname.startsWith("/docs")||i.pathname==="/doc"?"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/20":"text-gray-800 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[l.jsx(Qu,{className:"w-3 h-3 sm:w-4 sm:h-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Docs"}),l.jsx(k.div,{animate:{rotate:P?180:0},transition:{duration:.2},children:l.jsx(Ju,{className:"w-3 h-3 sm:w-4 sm:h-4"})})]}),l.jsx(Ue,{children:P&&l.jsx(k.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute top-full right-0 z-[100] mt-2 w-56 origin-top-right rounded-2xl bg-white dark:bg-gray-800 backdrop-blur-xl border border-gray-200 dark:border-gray-700 shadow-2xl overflow-hidden",children:l.jsx("div",{className:"p-2",children:D.map(H=>{const z=H.icon,re=i.pathname===H.to;return l.jsxs(k.div,{whileHover:{x:5},className:`flex items-center gap-3 px-4 py-3 text-sm rounded-lg cursor-pointer transition-colors duration-200 ${re?"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/20":"text-gray-800 dark:text-gray-200 hover:text-purple-600 dark:hover:text-purple-400 hover:bg-gray-100 dark:hover:bg-gray-700"}`,onClick:()=>{e(H.to),C(!1)},children:[l.jsx(z,{className:"w-4 h-4"}),H.label]},H.to)})})})})]}),E&&l.jsxs("div",{className:"relative",children:[l.jsxs(k.button,{type:"button",whileHover:{scale:1.1},whileTap:{scale:.9},className:"notification-button relative rounded-lg bg-white/10 dark:bg-gray-800/50 backdrop-blur-sm p-2.5 text-gray-300 hover:text-white focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 focus:ring-offset-transparent transition-all duration-200 hover:bg-white/20 dark:hover:bg-gray-700/50 border border-white/10 dark:border-gray-700/50",onClick:R,children:[l.jsx(Rd,{className:"h-5 w-5"}),I>0&&l.jsx(k.div,{initial:{scale:0},animate:{scale:1},className:"absolute -top-1 -right-1 bg-gradient-to-r from-red-500 to-pink-500 text-white text-xs font-bold rounded-full w-5 h-5 flex items-center justify-center shadow-lg border-2 border-white/20 dark:border-gray-900/50",children:I>9?"9+":I})]}),l.jsx(Ue,{children:c&&l.jsxs(k.div,{ref:r,initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute right-0 z-[100] mt-2 w-80 md:w-96 origin-top-right rounded-2xl bg-gray-800/95 dark:bg-gray-900/90 backdrop-blur-xl border border-gray-700/50 dark:border-gray-700/50 shadow-2xl overflow-hidden",children:[l.jsx("div",{className:"p-4 border-b border-gray-600/30 dark:border-gray-700/50",children:l.jsxs("h3",{className:"text-lg font-bold text-white dark:text-white flex items-center gap-2",children:[l.jsx(Rd,{className:"text-purple-400"}),"Notifications",I>0&&l.jsxs("span",{className:"ml-auto bg-gradient-to-r from-purple-500 to-pink-500 text-white text-xs font-bold px-2 py-1 rounded-full",children:[I," new"]})]})}),l.jsx("div",{className:"max-h-96 overflow-y-auto",children:l.jsx(UH,{})}),l.jsxs("div",{className:"p-4 border-t border-gray-600/30 dark:border-gray-700/50 space-y-3",children:[I>0&&l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:O,className:"w-full py-2 px-3 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 hover:from-purple-700 hover:via-pink-700 hover:to-blue-700 text-white font-medium rounded-lg shadow-md hover:shadow-lg transition-all duration-300 flex items-center justify-center gap-2 text-sm",children:[l.jsx(Rd,{className:"w-3 h-3"}),"Mark All as Read"]}),l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{e("/click-details"),u(!1)},className:"w-full py-2 px-3 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white font-medium rounded-lg shadow-md hover:shadow-lg transition-all duration-300 flex items-center justify-center gap-2 text-sm",children:[l.jsx($U,{className:"w-3 h-3"}),"See All Notifications"]})]})]})})]}),E&&l.jsxs("div",{className:"relative ml-2",children:[l.jsxs(k.button,{type:"button",whileHover:{scale:1.05},whileTap:{scale:.95},className:"profileMenu-button relative flex items-center gap-2 px-4 py-2 rounded-lg bg-gradient-to-r from-purple-600/20 via-pink-600/20 to-blue-600/20 hover:from-purple-600/30 hover:via-pink-600/30 hover:to-blue-600/30 backdrop-blur-sm border border-white/20 dark:border-gray-700/50 text-white font-semibold text-sm uppercase focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 focus:ring-offset-transparent transition-all duration-200",onClick:()=>s(H=>!H),children:[l.jsx(ia,{className:"w-4 h-4"}),l.jsx("span",{className:"hidden sm:inline",children:_}),l.jsx(k.div,{animate:{rotate:o?180:0},transition:{duration:.2},children:l.jsx(Ju,{className:"w-5 h-5"})})]}),l.jsx(Ue,{children:o&&l.jsx(k.div,{ref:n,initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute right-0 z-[100] mt-2 w-56 origin-top-right rounded-2xl bg-gray-800/95 dark:bg-gray-900/90 backdrop-blur-xl border border-gray-700/50 dark:border-gray-700/50 shadow-2xl overflow-hidden",role:"menu",children:l.jsxs("div",{className:"p-2",children:[l.jsxs("div",{className:"px-4 py-3 border-b border-gray-600/30 dark:border-gray-700/50",children:[l.jsx("p",{className:"text-sm font-semibold text-white dark:text-white uppercase",children:_}),l.jsx("p",{className:"text-xs text-gray-300 dark:text-gray-400 mt-1",children:"Welcome back!"})]}),l.jsxs(k.div,{whileHover:{x:5},className:"flex items-center gap-3 px-4 py-3 text-sm text-white dark:text-gray-200 hover:text-white dark:hover:text-white hover:bg-white/10 dark:hover:bg-gray-800/50 rounded-lg cursor-pointer transition-colors duration-200",role:"menuitem",onClick:q,children:[l.jsx(ia,{className:"w-4 h-4 text-purple-400"}),"Your Profile"]}),l.jsxs(k.div,{whileHover:{x:5},className:"flex items-center gap-3 px-4 py-3 text-sm text-white dark:text-gray-200 hover:text-white dark:hover:text-white hover:bg-white/10 dark:hover:bg-gray-800/50 rounded-lg cursor-pointer transition-colors duration-200",role:"menuitem",onClick:ee,children:[l.jsx(_s,{className:"w-4 h-4 text-blue-400"}),"Settings"]}),l.jsxs(k.div,{whileHover:{x:5},className:"flex items-center gap-3 px-4 py-3 text-sm text-red-300 dark:text-red-300 hover:text-red-200 dark:hover:text-red-400 hover:bg-red-500/10 rounded-lg cursor-pointer transition-colors duration-200",role:"menuitem",onClick:B,children:[l.jsx(VU,{className:"w-4 h-4"}),"Sign out"]})]})})})]}),!E&&l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>e("/login"),className:"px-3 sm:px-4 md:px-6 py-1.5 sm:py-2 text-xs sm:text-sm md:text-base bg-gradient-to-r from-purple-600 to-pink-600 text-white font-semibold rounded-full shadow-lg hover:shadow-xl transition-all whitespace-nowrap",children:[l.jsx("span",{className:"hidden sm:inline",children:"Get Started"}),l.jsx("span",{className:"sm:hidden",children:"Start"})]})]})]}),E&&typeof document<"u"&&pi.createPortal(l.jsx(Ue,{children:T&&l.jsxs(l.Fragment,{children:[l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},onClick:()=>t(ed(!1)),className:"sm:hidden fixed inset-0 bg-black/70 dark:bg-black/80 z-[9998]",style:{pointerEvents:"auto"}}),l.jsx(k.div,{initial:{opacity:0,x:-300},animate:{opacity:1,x:0},exit:{opacity:0,x:-300},transition:{duration:.3},className:"sm:hidden fixed inset-y-0 left-0 w-64 z-[9999] bg-gray-800 dark:bg-gray-900 border-r-2 border-gray-700 dark:border-gray-700 shadow-2xl",id:"mobile-menu",style:{pointerEvents:"auto"},children:l.jsxs("div",{className:"p-4 space-y-2 h-full overflow-y-auto",children:[oe.map(H=>{const z=H.icon,re=i.pathname===H.to;return l.jsxs(ls,{to:H.to,onClick:()=>t(ed(!1)),className:`flex items-center gap-3 px-4 py-3 rounded-lg font-medium transition-all duration-200 ${re?"text-white dark:text-white bg-gradient-to-r from-purple-600/30 via-pink-600/30 to-blue-600/30":"text-white dark:text-gray-300 hover:text-white dark:hover:text-white hover:bg-white/10 dark:hover:bg-white/10"}`,children:[l.jsx(z,{className:"w-5 h-5"}),H.label]},H.to)}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs(k.button,{type:"button",onClick:()=>C(!P),className:`w-full flex items-center justify-between gap-3 px-4 py-3 rounded-lg font-medium transition-all duration-200 ${i.pathname.startsWith("/docs")?"text-white dark:text-white bg-gradient-to-r from-purple-600/30 via-pink-600/30 to-blue-600/30":"text-white dark:text-gray-300 hover:text-white dark:hover:text-white hover:bg-white/10 dark:hover:bg-white/10"}`,children:[l.jsxs("span",{className:"flex items-center gap-3",children:[l.jsx(Qu,{className:"w-5 h-5"}),"Docs"]}),l.jsx(k.div,{animate:{rotate:P?180:0},transition:{duration:.2},children:l.jsx(Ju,{className:"w-5 h-5"})})]}),l.jsx(Ue,{children:P&&l.jsx(k.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"overflow-hidden",children:l.jsx("div",{className:"pl-4 space-y-1",children:D.map(H=>{const z=H.icon,re=i.pathname===H.to;return l.jsxs(ls,{to:H.to,onClick:()=>{t(ed(!1)),C(!1)},className:`flex items-center gap-3 px-4 py-2 rounded-lg text-sm transition-all duration-200 ${re?"text-white dark:text-white bg-gradient-to-r from-purple-600/20 via-pink-600/20 to-blue-600/20":"text-gray-300 dark:text-gray-400 hover:text-white dark:hover:text-white hover:bg-white/5 dark:hover:bg-white/5"}`,children:[l.jsx(z,{className:"w-4 h-4"}),H.label]},H.to)})})})})]})]})})]})}),document.body)]})]})},WH=()=>{const e=Ht();if((Vr().state||"")!="verified")return l.jsx(my,{to:"/login","replace:true":!0});m.useEffect(()=>{const i=setInterval(()=>{n()},200);return()=>clearInterval(i)},[]);const n=()=>{const i=document.createElement("div");i.classList.add("balloon"),document.body.appendChild(i),setTimeout(()=>{i.remove()},1e4)},a=()=>{e("/login",{replace:!0})};return l.jsx("div",{className:"flex items-center justify-center h-screen bg-gradient-to-r from-blue-400 to-purple-600 relative overflow-hidden",children:l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"text-4xl font-bold text-white mb-4",children:"Your account has been verified!"}),l.jsx("p",{className:"text-lg text-white mb-8",children:"Please go to the login page to continue."}),l.jsx("button",{onClick:a,className:"bg-white text-purple-600 font-bold py-2 px-6 rounded-full shadow-lg transition transform hover:scale-105 hover:bg-purple-100",children:"Go to Login"})]})})};function vy(){return vy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[e,t]=m.useState(1),[r,n]=m.useState(""),[a,i]=m.useState(""),[o,s]=m.useState(""),[c,u]=m.useState(""),[d,f]=m.useState(""),[p,h]=m.useState(!1),g=Ht(),x=async y=>{var b,w;y.preventDefault();try{const j=await be.post("/auth/password_reset",{email:r},{withCredentials:!0});j.status===201&&j.data.success&&(J.success(j.data.message),h(!0),f(`OTP has been sent to your ${r}. Please check your inbox.`),t(2))}catch(j){console.log(j);const N=((w=(b=j.response)==null?void 0:b.data)==null?void 0:w.message)||"something went wrong";J.error(N)}},v=async y=>{var b,w;y.preventDefault();try{const j=await be.post("/auth/validate_otp",{email:r,otp:a,password:o},{withCredentials:!0});j.status===201&&j.data.success&&(J.success(j.data.message),g("/login",{replace:!0}))}catch(j){console.log(j),f("Invalid OTP. Please try again.");const N=((w=(b=j.response)==null?void 0:b.data)==null?void 0:w.message)||"something went wrong";J.error(N)}};return l.jsx("div",{className:"w-screen h-screen flex items-center justify-center",children:l.jsxs("div",{className:"w-full max-w-md shadow-lg rounded-lg p-8 transition-all duration-500 ease-in-out transform",children:[l.jsx("h2",{className:"text-2xl font-semibold text-gray-800 text-center mb-6",children:"Forgot Password"}),d&&l.jsx("div",{className:"mb-4 text-center text-green-500",children:d}),l.jsx(K0,{in:e===1,timeout:300,classNames:"fade",unmountOnExit:!0,children:l.jsxs("form",{onSubmit:x,className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700",children:"Email Address"}),l.jsx("input",{type:"email",name:"email",id:"email",className:"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",value:r,onChange:y=>n(y.target.value),required:!0})]}),l.jsx("button",{type:"submit",className:"w-full bg-indigo-600 text-white py-2 px-4 rounded-md shadow hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:"Send OTP"})]})}),l.jsx(K0,{in:e===2,timeout:300,classNames:"fade",unmountOnExit:!0,children:l.jsxs("form",{onSubmit:v,className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"otp",className:"block text-sm font-medium text-gray-700",children:"Enter OTP"}),l.jsx("input",{type:"text",name:"otp",id:"otp",className:"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",value:a,onChange:y=>i(y.target.value),required:!0})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700",children:"New Password"}),l.jsx("input",{type:"password",name:"password",id:"password",className:"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",value:o,onChange:y=>s(y.target.value),required:!0})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-gray-700",children:"Confirm New Password"}),l.jsx("input",{type:"password",name:"confirmPassword",id:"confirmPassword",className:"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",value:c,onChange:y=>u(y.target.value),required:!0})]}),l.jsx("button",{type:"submit",className:"w-full bg-indigo-600 text-white py-2 px-4 rounded-md shadow hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:"Change Password"})]})})]})})},M7=({words:e,className:t,cursorClassName:r})=>{const n=e.map(c=>({...c,text:c.text.split("")})),[a,i]=j$(),o=ap(a);m.useEffect(()=>{o&&i("span",{display:"inline-block",opacity:1,width:"fit-content"},{duration:.3,delay:C$(.1),ease:"easeInOut"})},[o]);const s=()=>l.jsx(k.div,{ref:a,className:"inline",children:n.map((c,u)=>l.jsxs("div",{className:"inline-block",children:[c.text.map((d,f)=>l.jsx(k.span,{initial:{},className:uo(" text-black opacity-0 hidden",c.className),children:d},`char-${f}`))," "]},`word-${u}`))});return l.jsxs("div",{className:uo("text-base sm:text-xl md:text-3xl lg:text-5xl font-bold text-center",t),children:[s(),l.jsx(k.span,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:uo("inline-block rounded-sm w-[4px] h-4 md:h-6 lg:h-10 bg-blue-500",r)})]})},ZH=({text:e,revealText:t,children:r,className:n})=>{const[a,i]=m.useState(0),o=m.useRef(null),[s,c]=m.useState(0),[u,d]=m.useState(0),[f,p]=m.useState(!1);m.useEffect(()=>{if(o.current){const{left:b,width:w}=o.current.getBoundingClientRect();c(b),d(w)}},[]);function h(b){b.preventDefault();const{clientX:w}=b;if(o.current){const j=w-s;i(j/u*100)}}function g(){p(!1),i(0)}function x(){p(!0)}function v(b){b.preventDefault();const w=b.touches[0].clientX;if(o.current){const j=w-s;i(j/u*100)}}const y=(a-50)*.1;return l.jsxs("div",{onMouseEnter:x,onMouseLeave:g,onMouseMove:h,onTouchStart:x,onTouchEnd:g,onTouchMove:v,ref:o,className:uo("bg-[#1d1c20] border border-white/[0.08] rounded-lg p-2 relative overflow-hidden",n),children:[r,l.jsxs("div",{className:" relative flex items-center justify-center overflow-hidden",children:[l.jsx(k.div,{style:{width:"100%"},animate:f?{opacity:a>0?1:0,clipPath:`inset(0 ${100-a}% 0 0)`}:{clipPath:`inset(0 ${100-a}% 0 0)`},transition:f?{duration:0}:{duration:.4},className:"absolute bg-gradient-to-r from-pink-200 to-sky-200 z-20 text-center p-2 will-change-transform",children:l.jsx("p",{style:{textShadow:"4px 4px 15px rgba(0,0,0,0.5)"},className:"text-lg py-4 font-bold bg-clip-text text-transparent bg-gradient-to-b from-slate-500 to-neutral-300",children:t})}),l.jsx(k.div,{animate:{left:`${a}%`,rotate:`${y}deg`,opacity:a>0?1:0},transition:f?{duration:0}:{duration:.4},className:"h-40 w-[8px] bg-gradient-to-b from-transparent via-neutral-800 to-transparent absolute z-50 will-change-transform"}),l.jsxs("div",{className:" overflow-hidden w-max [mask-image:linear-gradient(to_bottom,transparent,white,transparent)]",children:[l.jsx("p",{className:"text-lg py-4 font-bold bg-clip-text text-transparent bg-[#323238]",children:e}),l.jsx(JH,{})]})]})]})},QH=()=>{const e=()=>Math.random()*4-2,t=()=>Math.random(),r=()=>Math.random();return l.jsx("div",{className:"absolute inset-0",children:[...Array(100)].map((n,a)=>l.jsx(k.span,{animate:{top:`calc(${r()*100}% + ${e()}px)`,left:`calc(${r()*100}% + ${e()}px)`,opacity:t(),scale:[2,2,2]},transition:{duration:r()*10+20,repeat:1/0,ease:"linear"},style:{position:"absolute",top:`${r()*100}%`,left:`${r()*100}%`,width:"2px",height:"2px",backgroundColor:"red",borderRadius:"50%",zIndex:1},className:"inline-block"},`star-${a}`))})},JH=m.memo(QH),n1=({words:e,duration:t=1e3,className:r})=>{const[n,a]=m.useState(e[0]),[i,o]=m.useState(!1),s=m.useCallback(()=>{const c=e[e.indexOf(n)+1]||e[0];a(c),o(!0)},[n,e]);return m.useEffect(()=>{let c;return i||(c=setTimeout(()=>{s()},t)),()=>{c&&clearTimeout(c)}},[i,t,s]),l.jsx(Ue,{onExitComplete:()=>{o(!1)},children:l.jsx(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{type:"spring",stiffness:100,damping:10},exit:{opacity:0,y:-40,x:40,filter:"blur(8px)",scale:2,position:"absolute"},className:uo("z-10 inline-block relative text-left text-neutral-900 dark:text-neutral-100",r),children:n.split(" ").map((c,u)=>l.jsxs(k.span,{initial:{opacity:0,y:10,filter:"blur(8px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{delay:u*.1,duration:.3},className:"inline-block whitespace-nowrap text-blue-500",children:[c.split("").map((d,f)=>l.jsx(k.span,{initial:{opacity:0,y:10,filter:"blur(8px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{delay:u*.1+f*.05,duration:.2},className:"inline-block underline",children:d},c+f)),l.jsx("span",{className:"inline-block",children:" "})]},c+u))},n)})},eW=Ne.forwardRef(({parentRef:e,containerRef:t,beamOptions:r={}},n)=>{const a=m.useRef(null),[i,o]=m.useState({detected:!1,coordinates:null}),[s,c]=m.useState(0),[u,d]=m.useState(!1);return m.useEffect(()=>{const p=setInterval(()=>{if(a.current&&t.current&&e.current&&!u){const h=a.current.getBoundingClientRect(),g=t.current.getBoundingClientRect(),x=e.current.getBoundingClientRect();if(h.bottom>=g.top){const v=h.left-x.left+h.width/2,y=h.bottom-x.top;o({detected:!0,coordinates:{x:v,y}}),d(!0)}}},50);return()=>clearInterval(p)},[u,t]),m.useEffect(()=>{i.detected&&i.coordinates&&(setTimeout(()=>{o({detected:!1,coordinates:null}),d(!1)},2e3),setTimeout(()=>{c(f=>f+1)},2e3))},[i]),l.jsxs(l.Fragment,{children:[l.jsx(k.div,{ref:a,animate:"animate",initial:{translateY:r.initialY||"-200px",translateX:r.initialX||"0px",rotate:r.rotate||0},variants:{animate:{translateY:r.translateY||"1800px",translateX:r.translateX||"0px",rotate:r.rotate||0}},transition:{duration:r.duration||8,repeat:1/0,repeatType:"loop",ease:"linear",delay:r.delay||0,repeatDelay:r.repeatDelay||0},className:uo("absolute left-0 top-20 m-auto h-14 w-px rounded-full bg-gradient-to-t from-indigo-500 via-purple-500 to-transparent",r.className)},s),l.jsx(Ue,{children:i.detected&&i.coordinates&&l.jsx(tW,{className:"",style:{left:`${i.coordinates.x}px`,top:`${i.coordinates.y}px`,transform:"translate(-50%, -50%)"}},`${i.coordinates.x}-${i.coordinates.y}`)})]})});eW.displayName="CollisionMechanism";const tW=({...e})=>{const t=Array.from({length:20},(r,n)=>({id:n,initialX:0,initialY:0,directionX:Math.floor(Math.random()*80-40),directionY:Math.floor(Math.random()*-50-10)}));return l.jsxs("div",{...e,className:uo("absolute z-50 h-2 w-2",e.className),children:[l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:1.5,ease:"easeOut"},className:"absolute -inset-x-10 top-0 m-auto h-2 w-10 rounded-full bg-gradient-to-r from-transparent via-indigo-500 to-transparent blur-sm"}),t.map(r=>l.jsx(k.span,{initial:{x:r.initialX,y:r.initialY,opacity:1},animate:{x:r.directionX,y:r.directionY,opacity:0},transition:{duration:Math.random()*1.5+.5,ease:"easeOut"},className:"absolute h-1 w-1 rounded-full bg-gradient-to-b from-indigo-500 to-purple-500"},r.id))]})},rW=({features:e=[],title:t="Powerful Features",subtitle:r="Everything you need to manage your social presence in one place",className:n="",sectionRef:a=null,layout:i="grid"})=>{const o=a||Ne.useRef(null),s=e.map(c=>({...c,description:c.description||c.desc||"",color:c.color||c.gradient||"from-purple-500 to-pink-500",icon:c.icon}));return l.jsxs("section",{ref:o,className:`py-20 bg-gradient-to-br from-blue-50/80 via-purple-50/80 to-pink-50/80 dark:bg-gradient-to-br dark:from-slate-900/60 dark:via-purple-950/40 dark:to-pink-950/40 backdrop-blur-sm relative overflow-hidden ${n}`,children:[l.jsxs("div",{className:"hidden dark:block absolute inset-0 overflow-hidden pointer-events-none",children:[l.jsx("div",{className:"absolute top-1/3 right-1/4 w-96 h-96 bg-pink-500/10 rounded-full blur-3xl"}),l.jsx("div",{className:"absolute bottom-1/3 left-1/4 w-96 h-96 bg-purple-500/10 rounded-full blur-3xl"})]}),l.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:[l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"text-center mb-16",children:[l.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-white mb-4 dark:bg-gradient-to-r dark:from-blue-300 dark:via-purple-300 dark:to-pink-300 dark:bg-clip-text dark:text-transparent",children:t}),r&&l.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-2xl mx-auto",children:r})]}),i==="list"?l.jsx("div",{className:"space-y-4 md:space-y-6",children:s.map((c,u)=>{const d=c.icon;return l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:c.delay||u*.1},whileHover:{y:-5,scale:1.01},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-8 relative overflow-hidden group",children:[l.jsx("div",{className:`hidden dark:block absolute inset-0 bg-gradient-to-r ${c.color} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsxs("div",{className:"relative z-10 flex items-start gap-4",children:[d&&l.jsx(k.div,{className:`bg-gradient-to-r ${c.color} p-4 rounded-xl flex-shrink-0`,whileHover:{scale:1.1,rotate:5},children:typeof d=="function"?l.jsx(d,{className:"text-2xl text-white"}):l.jsx("div",{className:"text-2xl text-white",children:d})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h3",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-3",children:c.title}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed",children:c.description})]})]})]},c.title||u)})}):l.jsx("div",{className:"grid sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8",children:s.map((c,u)=>{const d=c.icon;return l.jsxs(k.div,{initial:{opacity:0,y:50},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:c.delay||u*.1},whileHover:{y:-10,scale:1.02},className:"relative group",children:[l.jsx(k.div,{className:"absolute -inset-[2px] rounded-xl sm:rounded-2xl",animate:{boxShadow:["0 0 10px rgba(147, 51, 234, 0.5), 0 0 20px rgba(236, 72, 153, 0.3), 0 0 30px rgba(59, 130, 246, 0.2)","0 0 20px rgba(147, 51, 234, 0.8), 0 0 40px rgba(236, 72, 153, 0.6), 0 0 60px rgba(59, 130, 246, 0.4)","0 0 10px rgba(147, 51, 234, 0.5), 0 0 20px rgba(236, 72, 153, 0.3), 0 0 30px rgba(59, 130, 246, 0.2)"]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},style:{background:"linear-gradient(135deg, #9333ea, #ec4899, #3b82f6)"}}),l.jsxs("div",{className:"relative p-6 sm:p-8 rounded-xl sm:rounded-2xl bg-white/90 dark:bg-gradient-to-br dark:from-gray-800/80 dark:via-gray-900/80 dark:to-gray-800/80 backdrop-blur-xl border-2 border-transparent dark:shadow-[0_0_20px_rgba(147,51,234,0.15)] hover:border-purple-400 dark:hover:border-purple-400/60 dark:hover:shadow-[0_0_30px_rgba(147,51,234,0.25)] shadow-lg hover:shadow-2xl transition-all duration-300 overflow-hidden h-full flex flex-col",children:[l.jsx("div",{className:`hidden dark:block absolute inset-0 bg-gradient-to-br ${c.color} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsxs("div",{className:"relative z-10 flex flex-col h-full",children:[d&&l.jsx("div",{className:`text-5xl mb-4 bg-gradient-to-r ${c.color} bg-clip-text text-transparent dark:drop-shadow-[0_0_12px_rgba(147,51,234,0.4)]`,children:typeof d=="function"?l.jsx(d,{className:"w-8 h-8"}):d}),l.jsx("h3",{className:"text-2xl font-bold text-gray-800 dark:text-white mb-3 dark:bg-gradient-to-r dark:from-purple-200 dark:via-pink-200 dark:to-blue-200 dark:bg-clip-text dark:text-transparent",children:c.title}),l.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed flex-grow",children:c.description}),l.jsx(k.div,{className:"absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-purple-500 to-pink-500 transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300 dark:shadow-[0_0_10px_rgba(236,72,153,0.5)]"})]})]})]},c.title||u)})})]})]})},nW=({delay:e=0,duration:t=20,size:r=4,color:n="purple",initialX:a=0,initialY:i=0,xOffset:o=0})=>{const s={purple:"bg-purple-400/30",pink:"bg-pink-400/30",blue:"bg-blue-400/30",cyan:"bg-cyan-400/30"};return l.jsx(k.div,{className:`absolute ${s[n]} rounded-full blur-sm`,style:{width:`${r}px`,height:`${r}px`,left:`${a}%`,top:`${i}%`},animate:{y:[0,-30,0],x:[0,o,0],opacity:[.3,.6,.3],scale:[1,1.3,1]},transition:{duration:t,repeat:1/0,delay:e,ease:"easeInOut"}})},Bl=({children:e,className:t="",intensity:r=.3})=>{const n=m.useRef(null),[a,i]=m.useState({x:0,y:0}),o=c=>{if(!n.current)return;const u=n.current.getBoundingClientRect(),d=u.left+u.width/2,f=u.top+u.height/2,p=(c.clientX-d)/(u.width/2),h=(c.clientY-f)/(u.height/2);i({x:h*r,y:-p*r})},s=()=>{i({x:0,y:0})};return l.jsx(k.div,{ref:n,className:t,onMouseMove:o,onMouseLeave:s,animate:{rotateX:a.x,rotateY:a.y},transition:{type:"spring",stiffness:150,damping:30,mass:.5},style:{transformStyle:"preserve-3d",perspective:"1000px",willChange:"transform",backfaceVisibility:"hidden"},children:e})},aW=({link:e,idx:t})=>{const[r,n]=m.useState(!1),a=m.useRef(null),i=ap(a,{once:!0,margin:"-50px"});return l.jsx(k.div,{animate:i?{y:[0,-10,0]}:{},transition:{duration:3,repeat:1/0,ease:"easeInOut",delay:t*.2+.8},children:l.jsx(Bl,{intensity:.2,children:l.jsxs(k.a,{ref:a,href:e.url,target:"_blank",rel:"noopener noreferrer",onHoverStart:()=>n(!0),onHoverEnd:()=>n(!1),initial:{opacity:0,rotateY:-20,scale:.8},animate:i?{opacity:1,rotateY:0,scale:1}:{opacity:0},transition:{opacity:{duration:.6,delay:t*.1},rotateY:{duration:.6,delay:t*.1},scale:{duration:.6,delay:t*.1}},whileHover:{scale:1.1,y:-15,z:50,rotateY:5},className:`relative group bg-gradient-to-br ${e.color} p-6 rounded-2xl shadow-2xl overflow-hidden cursor-pointer min-h-[180px] flex flex-col justify-between`,style:{transformStyle:"preserve-3d"},children:[l.jsx(k.div,{className:`absolute inset-0 bg-gradient-to-br ${e.color} opacity-90`,animate:r?{opacity:[.9,1,.9],scale:[1,1.1,1]}:{opacity:[.7,.9,.7]},transition:{duration:2,repeat:1/0,ease:"easeInOut"}}),l.jsx(k.div,{className:"absolute inset-0 rounded-2xl",animate:{boxShadow:["0 0 20px rgba(255, 255, 255, 0.1)","0 0 40px rgba(255, 255, 255, 0.3)","0 0 20px rgba(255, 255, 255, 0.1)"]},transition:{duration:3,repeat:1/0,ease:"easeInOut"}}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent",initial:{x:"-100%"},animate:r?{x:"200%"}:{x:"-100%"},transition:{duration:1,repeat:r?1/0:0,repeatDelay:.5,ease:"linear"},style:{transform:"skewX(-20deg)"}}),l.jsxs("div",{className:"relative z-10",style:{transform:"translateZ(20px)"},children:[l.jsx("div",{className:"flex justify-center mb-3 relative h-16",children:l.jsxs(k.div,{className:"text-4xl relative z-10 flex items-center justify-center",animate:{rotate:[0,10,-10,0],scale:[1,1.1,1],y:[0,-5,0]},transition:{duration:3,repeat:1/0,ease:"easeInOut"},children:[l.jsx(k.div,{className:"absolute inset-0 flex items-center justify-center pointer-events-none",animate:{scale:[1,1.3,1],opacity:[.3,.6,.3]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:l.jsx("div",{className:"w-16 h-16 bg-white/20 rounded-full blur-xl"})}),l.jsx(Ue,{children:r&&l.jsx(l.Fragment,{children:[...Array(6)].map((o,s)=>l.jsx(k.div,{className:"absolute w-2 h-2 bg-white rounded-full pointer-events-none",initial:{opacity:0,scale:0},animate:{opacity:[0,1,0],scale:[0,1,0],x:`${Math.cos(s/6*Math.PI*2)*60}px`,y:`${Math.sin(s/6*Math.PI*2)*60}px`},exit:{opacity:0},transition:{duration:1,delay:s*.1,repeat:1/0}},s))})}),l.jsx("span",{className:"relative z-10",children:e.icon})]})}),l.jsx(k.h3,{className:"text-xl md:text-2xl font-bold text-white mb-2 text-center",animate:r?{scale:[1,1.05,1]}:{},transition:{duration:1.5,repeat:r?1/0:0},children:e.platform}),l.jsx(k.p,{className:"text-[10px] md:text-xs text-white/90 font-mono text-center px-1",style:{letterSpacing:"-0.3px",wordSpacing:"-1px"},animate:r?{x:[0,5,0]}:{},transition:{duration:2,repeat:r?1/0:0},children:e.url}),l.jsx(k.div,{className:"absolute bottom-4 right-4 text-white/80",animate:r?{x:[0,5,0],opacity:[.8,1,.8]}:{},transition:{duration:1,repeat:r?1/0:0},children:l.jsx(jo,{className:"w-5 h-5"})})]}),l.jsx(k.div,{className:`absolute inset-0 bg-gradient-to-br ${e.color} blur-2xl opacity-0`,animate:{opacity:r?[0,.6,0]:0,scale:r?[1,1.3,1]:1},transition:{duration:2,repeat:r?1/0:0,ease:"easeInOut"}})]})})})},iW=()=>{const e=Ht(),t=Oi();we(v=>v.page.sidebarMenu);const r=we(v=>v.page.darkMode),n=we(v=>v.admin.isAuthenticated);Vr();const[a,i]=m.useState({x:0,y:0}),[o,s]=m.useState([!1,!1,!1]);m.useState(null),m.useState(null),m.useEffect(()=>{const v=y=>{i({x:y.clientX/window.innerWidth*100,y:y.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",v,{passive:!0}),()=>window.removeEventListener("mousemove",v)},[]);const c=()=>{e("/login")},u=v=>{s(y=>y.map((b,w)=>w===v?!b:b))},d=[{text:"All in1 url : ",className:"text-blue-500 dark:text-blue-400 text-4xl font-bold"},{text:"Personalized",className:"text-4xl font-bold text-gray-900 dark:text-gray-200"},{text:"Social ",className:"text-4xl font-bold text-gray-900 dark:text-gray-200"},{text:"Profile ",className:"text-4xl font-bold text-gray-900 dark:text-gray-200"},{text:"Link ",className:"text-4xl font-bold text-gray-900 dark:text-gray-200"},{text:"Manager.",className:"text-4xl font-bold text-gray-900 dark:text-gray-200"}],f=["linkedin","github","leetcode","portfolio","instagram","codeforce"],p=[{img:"easy-to-remember.webp",title:"Personalized Smart Links",desc:"Generate easy-to-remember links for your social profiles using your username and platform names.",icon:Ge,gradient:"from-blue-500 to-cyan-500"},{img:$d,title:"All Links at One Place",desc:"Access all your profiles with a single hub link. Simply visit https://allin1url.in/yourname (without any platform name) to see all your links in one beautiful, organized page. Perfect for sharing in bios, resumes, and business cards.",icon:Ds,gradient:"from-violet-500 to-purple-500"},{img:"update.webp",title:"Centralized Link Management",desc:"Update your social profile links in one place, and the change reflects everywhere.",icon:xs,gradient:"from-green-500 to-emerald-500"},{img:"click.webp",title:"Real-Time Email Notifications",desc:"Get instant email notifications every time someone visits your links. Stay informed about who's checking out your profiles in real-time. Perfect for tracking engagement and knowing when potential clients or employers view your links.",icon:No,gradient:"from-cyan-500 to-blue-500"},{img:"click.webp",title:"Click Tracking",desc:"Keep track of how many times your social profile links are clicked.",icon:st,gradient:"from-orange-500 to-red-500"},{img:"easysetup.webp",title:"Easy to Setup",desc:"No complicated setup; just choose your username, add the platform, and you're ready to go!",icon:_s,gradient:"from-indigo-500 to-purple-500"},{img:$d,title:"Your Own Domain",desc:"After registering, you'll get your own personalized domain to manage all your links. Your domain will reflect your brand identity and make your links more professional and memorable. Perfect for building your online presence!",icon:Ic,gradient:"from-teal-500 to-cyan-500"},{img:"click.webp",title:"Advanced Analytics",desc:"Get comprehensive insights into every click with detailed analytics. Track where clicks originated from, the exact time of each click, geographic location, device type (mobile, tablet, desktop), browser type, referrer information, and much more. Understand your audience better with granular data about every interaction.",icon:st,gradient:"from-blue-500 to-cyan-500"}],h=[{title:"Custom Link Themes",desc:"Add custom themes or styles to your personalized links to match your branding or style preferences.",icon:H0,gradient:"from-purple-500 to-pink-500"},{title:"Link Expiration",desc:"Set expiration dates for temporary links, ensuring they are only accessible for a certain period.",icon:Jx,gradient:"from-orange-500 to-red-500"},{title:"Link Password Protection",desc:"Add a layer of security by allowing password protection on sensitive links.",icon:bi,gradient:"from-green-500 to-emerald-500"}],g={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},x={hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.6}}};return l.jsxs("div",{className:"min-h-screen w-full overflow-hidden relative",children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/20 rounded-full blur-3xl",animate:{x:a.x*.5-200,y:a.y*.5-200,scale:[1,1.2,1],opacity:[.2,.4,.2]},transition:{x:{type:"spring",stiffness:50,damping:20},y:{type:"spring",stiffness:50,damping:20},scale:{duration:4,repeat:1/0,ease:"easeInOut"},opacity:{duration:4,repeat:1/0,ease:"easeInOut"}}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/20 rounded-full blur-3xl",animate:{x:a.x*.3-200,y:a.y*.3-200,scale:[1,1.3,1],opacity:[.2,.35,.2]},transition:{x:{type:"spring",stiffness:50,damping:20},y:{type:"spring",stiffness:50,damping:20},scale:{duration:5,repeat:1/0,ease:"easeInOut",delay:.5},opacity:{duration:5,repeat:1/0,ease:"easeInOut",delay:.5}}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-blue-500/20 rounded-full blur-3xl",animate:{x:a.x*.7-200,y:a.y*.7-200,scale:[1,1.15,1],opacity:[.2,.3,.2]},transition:{x:{type:"spring",stiffness:50,damping:20},y:{type:"spring",stiffness:50,damping:20},scale:{duration:6,repeat:1/0,ease:"easeInOut",delay:1},opacity:{duration:6,repeat:1/0,ease:"easeInOut",delay:1}}}),[...Array(5)].map((v,y)=>l.jsx(k.div,{className:`absolute w-64 h-64 ${y%3===0?"bg-cyan-500/10":y%3===1?"bg-violet-500/10":"bg-rose-500/10"} rounded-full blur-3xl`,animate:{x:[0,Math.random()*200-100,0],y:[0,Math.random()*200-100,0],scale:[1,1.5,1],opacity:[.1,.3,.1]},transition:{duration:8+Math.random()*4,repeat:1/0,ease:"easeInOut",delay:y*.8},style:{left:`${20+y*15}%`,top:`${10+y*20}%`}},y)),l.jsx("div",{className:"absolute inset-0",children:[...Array(30)].map((v,y)=>l.jsx(nW,{delay:y*.3,duration:15+Math.random()*10,size:2+Math.random()*4,color:["purple","pink","blue","cyan"][y%4]},y))}),l.jsx(k.div,{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_110%)]",animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:1/0,ease:"easeInOut"}}),[...Array(3)].map((v,y)=>l.jsx(k.div,{className:"absolute inset-0 flex items-center justify-center",style:{background:`conic-gradient(from ${y*120}deg, transparent, ${y===0?"rgba(147, 51, 234, 0.1)":y===1?"rgba(236, 72, 153, 0.1)":"rgba(59, 130, 246, 0.1)"}, transparent)`,maskImage:"radial-gradient(circle, transparent 60%, black 100%)",WebkitMaskImage:"radial-gradient(circle, transparent 60%, black 100%)"},animate:{rotate:360},transition:{duration:20+y*5,repeat:1/0,ease:"linear"}},y)),[...Array(4)].map((v,y)=>l.jsx(k.div,{className:"absolute inset-0 flex items-center justify-center pointer-events-none",animate:{scale:[1,1.5+y*.3,1],opacity:[.1,.3,.1]},transition:{duration:4+y*.5,repeat:1/0,ease:"easeInOut",delay:y*.5},children:l.jsx("div",{className:`w-96 h-96 rounded-full border-2 ${y%4===0?"border-purple-500/30":y%4===1?"border-pink-500/30":y%4===2?"border-blue-500/30":"border-cyan-500/30"} blur-xl`,style:{boxShadow:`0 0 ${40+y*20}px ${y%4===0?"rgba(147, 51, 234, 0.3)":y%4===1?"rgba(236, 72, 153, 0.3)":y%4===2?"rgba(59, 130, 246, 0.3)":"rgba(6, 182, 212, 0.3)"}`}})},`glow-ring-${y}`)),l.jsx("div",{className:"absolute inset-0 opacity-20",style:{background:"linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.2), transparent)"}}),l.jsx("div",{className:"absolute inset-0 opacity-15",style:{background:"linear-gradient(180deg, transparent, rgba(236, 72, 153, 0.2), transparent)"}}),[...Array(6)].map((v,y)=>l.jsx(k.div,{className:"absolute rounded-full blur-3xl",style:{width:`${200+y*100}px`,height:`${200+y*100}px`,left:`${y*15%80}%`,top:`${y*20%80}%`,background:`radial-gradient(circle, ${y%3===0?"rgba(147, 51, 234, 0.2)":y%3===1?"rgba(236, 72, 153, 0.2)":"rgba(59, 130, 246, 0.2)"}, transparent)`},animate:{scale:[1,1.3,1],opacity:[.1,.4,.1],x:[0,Math.sin(y)*50,0],y:[0,Math.cos(y)*50,0]},transition:{duration:6+y*.5,repeat:1/0,ease:"easeInOut",delay:y*.3}},`radial-glow-${y}`)),l.jsx(k.div,{className:"absolute inset-0",style:{backgroundImage:` + linear-gradient(to right, rgba(147, 51, 234, 0.1) 1px, transparent 1px), + linear-gradient(to bottom, rgba(236, 72, 153, 0.1) 1px, transparent 1px) + `,backgroundSize:"50px 50px"},animate:{opacity:[.2,.5,.2]},transition:{duration:4,repeat:1/0,ease:"easeInOut"}}),[...Array(8)].map((v,y)=>l.jsx(k.div,{className:"absolute rounded-full blur-2xl",style:{width:"150px",height:"150px",left:`${y*12.5%100}%`,top:`${y*15%100}%`,background:`radial-gradient(circle, ${y%4===0?"rgba(147, 51, 234, 0.3)":y%4===1?"rgba(236, 72, 153, 0.3)":y%4===2?"rgba(59, 130, 246, 0.3)":"rgba(6, 182, 212, 0.3)"}, transparent)`},animate:{scale:[.8,1.5,.8],opacity:[.2,.6,.2],x:[0,Math.sin(y*.5)*30,0],y:[0,Math.cos(y*.5)*30,0]},transition:{duration:5+Math.random()*2,repeat:1/0,ease:"easeInOut",delay:y*.2}},`glow-spot-${y}`))]}),!n&&l.jsxs(k.div,{initial:{y:-100,opacity:0},animate:{y:0,opacity:1},transition:{duration:.6,type:"spring"},className:"relative z-50 w-full h-[70px] shadow-lg bg-white/95 dark:bg-gray-900/50 backdrop-blur-xl flex items-center justify-between border-b border-gray-200 dark:border-white/10 transition-colors duration-300 px-4 sm:px-6 md:px-10 lg:px-12",children:[l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-500/10 via-pink-500/10 to-blue-500/10 opacity-0",animate:{opacity:[0,.3,0]},transition:{duration:3,repeat:1/0,ease:"easeInOut"}}),l.jsxs(k.div,{className:"flex items-center gap-4 cursor-pointer relative z-10",onClick:()=>e("/"),whileHover:{scale:1.05,rotateY:5},style:{transformStyle:"preserve-3d"},children:[l.jsx(k.div,{animate:{rotateY:[0,360]},transition:{duration:20,repeat:1/0,ease:"linear"},style:{transformStyle:"preserve-3d"},className:"h-8 w-8 rounded-full overflow-hidden",children:l.jsx(k.img,{className:"h-8 w-8 rounded-full object-contain bg-white/10 dark:bg-gray-800/20 p-1 transition-all duration-300",src:$d,alt:"All in1 url Logo",onError:v=>{v.target.src="https://tailwindui.com/plus/img/logos/mark.svg?color=indigo&shade=500"},whileHover:{scale:1.2,rotateZ:15}})}),l.jsxs("span",{className:"text-xl md:text-2xl font-bold bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 bg-clip-text text-transparent relative",children:["All in1 url",l.jsx(k.span,{className:"absolute inset-0 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 bg-clip-text text-transparent blur-sm opacity-50",animate:{opacity:[.3,.7,.3]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:"All in1 url"})]})]}),l.jsxs("div",{className:"flex items-center gap-4 md:gap-6 relative z-10",children:[l.jsxs("div",{className:"hidden md:flex items-center gap-6",children:[l.jsxs(k.button,{onClick:()=>e("/"),className:"relative text-gray-700 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 font-medium transition-colors overflow-hidden group",whileHover:{scale:1.1,y:-2},whileTap:{scale:.95},children:[l.jsx("span",{className:"relative z-10",children:"Home"}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-500/20 to-pink-500/20",initial:{x:"-100%"},whileHover:{x:"100%"},transition:{duration:.5}})]}),l.jsxs(k.button,{onClick:()=>e("/login"),className:"relative text-gray-700 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 font-medium transition-colors overflow-hidden group",whileHover:{scale:1.1,y:-2},whileTap:{scale:.95},children:[l.jsx("span",{className:"relative z-10",children:"Login"}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-500/20 to-pink-500/20",initial:{x:"-100%"},whileHover:{x:"100%"},transition:{duration:.5}})]})]}),l.jsxs(k.button,{onClick:()=>t(b7()),whileHover:{scale:1.15,rotate:15},whileTap:{scale:.9},className:"relative p-2.5 rounded-xl bg-white/90 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700/50 text-gray-800 dark:text-gray-300 hover:bg-white dark:hover:bg-gray-700/50 transition-all duration-300 shadow-md hover:shadow-lg overflow-hidden group",title:r?"Switch to light mode":"Switch to dark mode",children:[l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-500/30 to-pink-500/30 opacity-0 group-hover:opacity-100",transition:{duration:.3}}),l.jsx(k.div,{className:"relative z-10",animate:{rotate:[0,360]},transition:{duration:20,repeat:1/0,ease:"linear"},children:r?l.jsx(v7,{className:"text-xl"}):l.jsx(y7,{className:"text-xl"})})]}),l.jsxs(k.button,{onClick:c,whileHover:{scale:1.1,y:-3},whileTap:{scale:.95},className:"relative bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 hover:from-purple-700 hover:via-pink-700 hover:to-blue-700 text-white font-semibold py-2.5 px-4 md:px-6 rounded-xl text-sm md:text-lg transition-all shadow-lg hover:shadow-2xl flex items-center gap-2 overflow-hidden group",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600"}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent",initial:{x:"-100%"},animate:{x:["-100%","200%"]},transition:{duration:2,repeat:1/0,repeatDelay:1,ease:"linear"},style:{transform:"skewX(-20deg)"}}),l.jsx("span",{className:"relative z-10 hidden sm:inline",children:"Get Started"}),l.jsx("span",{className:"relative z-10 sm:hidden",children:"Start"}),l.jsx(k.span,{className:"relative z-10",animate:{x:[0,5,0]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},children:l.jsx(jo,{})}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 blur-xl opacity-0 group-hover:opacity-50",transition:{duration:.3}})]})]})]}),l.jsx("div",{className:"relative z-10",children:l.jsxs(k.div,{variants:g,initial:"hidden",animate:"visible",className:"p-4 sm:p-6 md:p-10 lg:p-12",children:[l.jsxs(k.section,{variants:x,className:"mb-6 md:mb-8 text-center",children:[l.jsx("div",{className:"mb-4",children:l.jsx(M7,{words:d,className:"mb-4"})}),l.jsx(k.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.3,duration:.6},children:l.jsx(ZH,{className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl border border-white/20 dark:border-gray-700/50 mb-4 transition-colors duration-300",text:"Generate Links You'll Never Forget.",revealText:"Turn Usernames into Smart Links - Quick and Simple!"})})]}),l.jsx(k.section,{variants:x,className:"mb-6 md:mb-8",children:l.jsx(Bl,{intensity:.15,children:l.jsxs("div",{className:"relative bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-10 lg:p-12 overflow-hidden group",style:{willChange:"transform",transform:"translateZ(0)",backfaceVisibility:"hidden"},children:[l.jsx(k.div,{className:"absolute inset-0 rounded-3xl pointer-events-none z-0",animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:1/0,ease:"easeInOut"},style:{background:"radial-gradient(circle at 50% 50%, rgba(147, 51, 234, 0.25), rgba(236, 72, 153, 0.2), rgba(59, 130, 246, 0.2), transparent 70%)"}}),l.jsx(k.div,{className:"absolute top-0 left-0 w-40 h-40 rounded-full pointer-events-none blur-3xl z-0",animate:{opacity:[.3,.6,.3],scale:[1,1.2,1]},transition:{duration:4,repeat:1/0,ease:"easeInOut"},style:{background:"radial-gradient(circle, rgba(147, 51, 234, 0.5), transparent 70%)",transform:"translate(-50%, -50%)"}}),l.jsx(k.div,{className:"absolute bottom-0 right-0 w-40 h-40 rounded-full pointer-events-none blur-3xl z-0",animate:{opacity:[.3,.6,.3],scale:[1,1.2,1]},transition:{duration:4,repeat:1/0,ease:"easeInOut",delay:1},style:{background:"radial-gradient(circle, rgba(236, 72, 153, 0.5), transparent 70%)",transform:"translate(50%, 50%)"}}),l.jsx(k.div,{className:"absolute top-1/2 right-0 w-32 h-32 rounded-full pointer-events-none blur-2xl z-0",animate:{opacity:[.2,.5,.2],scale:[1,1.15,1]},transition:{duration:3.5,repeat:1/0,ease:"easeInOut",delay:.5},style:{background:"radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%)",transform:"translate(50%, -50%)"}}),l.jsx(k.div,{className:"absolute -inset-[2px] rounded-3xl pointer-events-none z-0",animate:{opacity:[.4,.7,.4]},transition:{duration:2.5,repeat:1/0,ease:"easeInOut"},style:{background:"linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(236, 72, 153, 0.35), rgba(59, 130, 246, 0.35), rgba(147, 51, 234, 0.4))",filter:"blur(10px)"}}),l.jsx(k.div,{className:"absolute inset-0 rounded-3xl pointer-events-none z-0",initial:{opacity:0},whileHover:{opacity:.3},transition:{duration:.3},style:{background:"radial-gradient(circle at center, rgba(147, 51, 234, 0.2), rgba(236, 72, 153, 0.15), transparent 70%)",filter:"blur(25px)"}}),l.jsx(k.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-6 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent relative z-10",transition:{opacity:{duration:.6,ease:"easeOut"},y:{duration:.6,ease:"easeOut"}},children:"Introduction"}),l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1,duration:.6,ease:"easeOut"},className:"relative z-10 space-y-5",style:{fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},children:[l.jsxs("p",{className:"text-base md:text-lg lg:text-[1.125rem] leading-relaxed md:leading-[1.85] text-gray-700 dark:text-gray-300 font-normal tracking-wide",children:["Welcome to"," ",l.jsx("span",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"All in1 url"}),", your ultimate partner for streamlined online presence and effortless link management. We offer innovative IT support and services that make your social media profiles, portfolios, and professional links easy to remember, manage, and share."]}),l.jsxs("p",{className:"text-base md:text-lg lg:text-[1.125rem] leading-relaxed md:leading-[1.85] text-gray-700 dark:text-gray-300 font-normal tracking-wide",children:["Whether you're sharing your Instagram, GitHub, LinkedIn, or any other platform, All in1 url allows you to generate a single, personalized URL that leads to a beautiful, customizable landing page featuring all your profiles. Simply visit"," ",l.jsx("span",{className:"font-medium text-purple-600 dark:text-purple-400",children:"https://allin1url.in/yourname"})," ","(without any platform name) to access your unified link hub."]}),l.jsx("p",{className:"text-base md:text-lg lg:text-[1.125rem] leading-relaxed md:leading-[1.85] text-gray-700 dark:text-gray-300 font-normal tracking-wide",children:"With real-time visitor notifications and detailed analytics, you can effortlessly track performance, monitor click rates, and gain valuable insights into your audience engagement. Enjoy the convenience of centralized updating—any changes you make are instantly reflected across all your platforms, eliminating the need for manual updates everywhere."}),l.jsx("p",{className:"text-base md:text-lg lg:text-[1.125rem] leading-relaxed md:leading-[1.85] text-gray-700 dark:text-gray-300 font-normal tracking-wide",children:"Experience the power of simplified link management and take control of your digital presence today."})]})]})})}),l.jsx(k.section,{variants:x,className:"mb-6 md:mb-8",children:l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},className:"relative",children:[l.jsx(k.h2,{initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},className:"text-3xl md:text-4xl lg:text-5xl font-bold text-center mb-8 md:mb-10 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",transition:{duration:.8,ease:"easeOut"},children:"Have You Ever Wondered How Link Has Been Personalized:"}),l.jsxs("div",{className:"relative min-h-[400px] md:min-h-[500px] flex items-center justify-center py-8",children:[l.jsx(k.div,{className:"absolute inset-0 flex items-center justify-center pointer-events-none",animate:{scale:[1,1.1,1],opacity:[.3,.5,.3]},transition:{duration:4,repeat:1/0,ease:"easeInOut"},children:l.jsx("div",{className:"w-full h-full max-w-4xl bg-gradient-to-r from-purple-500/10 via-pink-500/10 to-blue-500/10 rounded-3xl blur-3xl"})}),l.jsxs("div",{className:"relative z-10 w-full max-w-6xl mx-auto px-4",children:[l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6",children:[{platform:"LinkedIn",url:"https://allin1url.in/dpkrn/linkedin",color:"from-blue-500 to-cyan-500",icon:"💼"},{platform:"GitHub",url:"https://allin1url.in/dpkrn/github",color:"from-gray-600 to-gray-800",icon:"🐙"},{platform:"LeetCode",url:"https://allin1url.in/dpkrn/leetcode",color:"from-orange-500 to-yellow-500",icon:"💻"},{platform:"Portfolio",url:"https://allin1url.in/dpkrn/portfolio",color:"from-purple-500 to-pink-500",icon:"🎨"},{platform:"Instagram",url:"https://allin1url.in/dpkrn/instagram",color:"from-pink-500 to-rose-500",icon:"📸"},{platform:"Codeforces",url:"https://allin1url.in/dpkrn/codeforces",color:"from-red-500 to-orange-500",icon:"⚔️"}].map((v,y)=>l.jsx(aW,{link:v,idx:y},v.platform))}),l.jsx(k.div,{initial:{opacity:0,y:30,scale:.9},whileInView:{opacity:1,y:0,scale:1},viewport:{once:!0},transition:{delay:.8,duration:.6},className:"mt-8 md:mt-12 relative",children:l.jsx(Bl,{intensity:.1,children:l.jsxs(k.div,{className:"relative bg-gradient-to-br from-purple-900/40 via-pink-900/40 to-blue-900/40 dark:from-purple-950/60 dark:via-pink-950/60 dark:to-blue-950/60 backdrop-blur-xl rounded-2xl md:rounded-3xl shadow-2xl border border-purple-500/30 dark:border-purple-400/20 p-6 md:p-8 overflow-hidden group",whileHover:{scale:1.02,y:-5},transition:{duration:.3},children:[l.jsx("div",{className:"absolute inset-0 opacity-20 dark:opacity-30 pointer-events-none",children:[...Array(50)].map((v,y)=>l.jsx(k.div,{className:"absolute text-green-400 dark:text-green-300 font-mono text-xs md:text-sm",style:{left:`${y*7%100}%`,top:`${y*11%100}%`},animate:{y:[0,-100,0],opacity:[0,1,0]},transition:{duration:3+Math.random()*2,repeat:1/0,delay:Math.random()*2,ease:"linear"},children:String.fromCharCode(12448+Math.random()*96)},y))}),l.jsx(k.div,{className:"absolute -inset-[2px] rounded-2xl md:rounded-3xl pointer-events-none z-0",animate:{opacity:[.4,.8,.4]},transition:{duration:2.5,repeat:1/0,ease:"easeInOut"},style:{background:"linear-gradient(135deg, rgba(147, 51, 234, 0.5), rgba(236, 72, 153, 0.5), rgba(59, 130, 246, 0.5), rgba(147, 51, 234, 0.5))",filter:"blur(8px)"}}),[...Array(8)].map((v,y)=>l.jsx(k.div,{className:"absolute w-2 h-2 rounded-full bg-purple-400/40 dark:bg-purple-300/40",style:{left:`${20+y*10}%`,top:`${10+y%3*30}%`},animate:{y:[0,-20,0],x:[0,Math.sin(y)*10,0],scale:[1,1.5,1],opacity:[.3,.8,.3]},transition:{duration:2+y*.3,repeat:1/0,delay:y*.2,ease:"easeInOut"}},y)),l.jsxs("div",{className:"relative z-10 text-center",children:[l.jsxs(k.div,{className:"flex items-center justify-center gap-2 mb-4",animate:{scale:[1,1.1,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:[l.jsx(k.span,{className:"text-2xl md:text-3xl",animate:{rotate:[0,360]},transition:{duration:3,repeat:1/0,ease:"linear"},children:"✨"}),l.jsx(k.h3,{className:"text-xl md:text-2xl font-bold bg-gradient-to-r from-purple-300 via-pink-300 to-blue-300 dark:from-purple-200 dark:via-pink-200 dark:to-blue-200 bg-clip-text text-transparent",animate:{backgroundPosition:["0%","100%","0%"]},transition:{duration:3,repeat:1/0,ease:"linear"},style:{backgroundSize:"200% 100%"},children:"Only the platform name changes"}),l.jsx(k.span,{className:"text-2xl md:text-3xl",animate:{rotate:[360,0]},transition:{duration:3,repeat:1/0,ease:"linear"},children:"✨"})]}),l.jsx(k.p,{className:"text-base md:text-lg text-gray-200 dark:text-gray-300 font-medium",animate:{opacity:[.8,1,.8]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:"All else remains the same"}),l.jsx(k.div,{className:"absolute inset-0 rounded-2xl md:rounded-3xl pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"radial-gradient(circle at center, rgba(147, 51, 234, 0.3), rgba(236, 72, 153, 0.2), transparent 70%)",filter:"blur(20px)"}})]})]})})})]})]})]})}),l.jsx(k.section,{variants:x,className:"mb-12 md:mb-16",children:l.jsx(Bl,{intensity:.1,children:l.jsxs(k.div,{className:"relative bg-black dark:bg-black backdrop-blur-xl rounded-2xl md:rounded-3xl shadow-2xl border border-gray-900 dark:border-gray-800 p-6 md:p-8 lg:p-10 overflow-hidden group",whileHover:{scale:1.02,y:-5},transition:{duration:.3},children:[l.jsx("div",{className:"absolute inset-0 opacity-30 dark:opacity-40 pointer-events-none",children:[...Array(80)].map((v,y)=>l.jsx(k.div,{className:"absolute text-green-500 dark:text-green-400 font-mono text-xs md:text-sm font-bold",style:{left:`${y*5.7%100}%`,top:`${y*8.3%100}%`},animate:{y:[0,-150,0],opacity:[0,1,.8,0]},transition:{duration:4+Math.random()*3,repeat:1/0,delay:Math.random()*2,ease:"linear"},children:String.fromCharCode(12448+Math.floor(Math.random()*96))},y))}),l.jsx("div",{className:"absolute inset-0 opacity-20 dark:opacity-30 pointer-events-none",children:[...Array(30)].map((v,y)=>l.jsx(k.div,{className:"absolute w-px h-20 bg-gradient-to-b from-green-400 to-transparent",style:{left:`${y*7.3%100}%`,top:"-20%"},animate:{y:[0,(typeof window<"u"?window.innerHeight:800)+100],opacity:[0,.8,0]},transition:{duration:3+Math.random()*2,repeat:1/0,delay:Math.random()*3,ease:"linear"}},`rain-${y}`))}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-br from-purple-950/10 via-pink-950/10 to-blue-950/10 dark:from-purple-950/15 dark:via-pink-950/15 dark:to-blue-950/15",animate:{opacity:[.2,.4,.2]},transition:{duration:5,repeat:1/0,ease:"easeInOut"}}),l.jsx(k.div,{className:"absolute top-0 left-0 w-48 h-48 rounded-full pointer-events-none blur-3xl",animate:{opacity:[.1,.3,.1],scale:[1,1.15,1]},transition:{duration:4,repeat:1/0,ease:"easeInOut"},style:{background:"radial-gradient(circle, rgba(147, 51, 234, 0.3), transparent 70%)",transform:"translate(-50%, -50%)"}}),l.jsx(k.div,{className:"absolute bottom-0 right-0 w-48 h-48 rounded-full pointer-events-none blur-3xl",animate:{opacity:[.1,.3,.1],scale:[1,1.15,1]},transition:{duration:4,repeat:1/0,ease:"easeInOut",delay:2},style:{background:"radial-gradient(circle, rgba(236, 72, 153, 0.3), transparent 70%)",transform:"translate(50%, 50%)"}}),l.jsx(k.div,{className:"absolute -inset-[2px] rounded-2xl md:rounded-3xl pointer-events-none z-0",animate:{opacity:[.2,.5,.2]},transition:{duration:3,repeat:1/0,ease:"easeInOut"},style:{background:"linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(236, 72, 153, 0.3), rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.4))",filter:"blur(6px)"}}),l.jsx(k.div,{className:"absolute inset-0 rounded-2xl md:rounded-3xl pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"radial-gradient(circle at center, rgba(147, 51, 234, 0.15), rgba(236, 72, 153, 0.1), transparent 70%)",filter:"blur(20px)"}}),l.jsxs("div",{className:"relative z-10 space-y-4 md:space-y-6",children:[l.jsx(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"relative mx-auto w-full text-center",children:l.jsx("div",{className:"relative bg-clip-text text-transparent bg-no-repeat bg-gradient-to-r from-purple-400 via-violet-200 to-pink-500 dark:from-purple-300 dark:via-violet-100 dark:to-pink-400 py-2 md:py-4",children:l.jsx("span",{className:"uppercase text-sm md:text-base lg:text-xl font-bold block",children:"It will provide a special link for all your platforms."})})}),l.jsx(k.p,{initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.6,delay:.1},className:"text-base md:text-lg lg:text-2xl xl:text-3xl text-center",children:l.jsx("a",{href:"https://allin1url.in/dpkrn/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 dark:text-blue-300 underline font-mono hover:text-blue-300 dark:hover:text-blue-200 transition-colors break-all md:break-normal",children:"https://allin1url.in/dpkrn"})}),l.jsx(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2,duration:.6},className:"relative mx-auto w-full text-center",children:l.jsx("div",{className:"relative bg-clip-text text-transparent bg-no-repeat bg-gradient-to-r from-purple-400 via-violet-200 to-pink-500 dark:from-purple-300 dark:via-violet-100 dark:to-pink-400 py-2 md:py-4",children:l.jsx("span",{className:"uppercase text-sm md:text-base lg:text-xl font-bold block",children:"Change only the platform name to redirect to all profiles"})})}),l.jsx(k.div,{initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{delay:.3,duration:.6},className:"text-base md:text-lg lg:text-2xl xl:text-3xl text-center",children:l.jsxs("a",{href:"https://allin1url.in/dpkrn/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 dark:text-blue-300 underline font-mono hover:text-blue-300 dark:hover:text-blue-200 transition-colors break-all md:break-normal",children:["https://allin1url.in/dpkrn/",l.jsx(n1,{className:"text-blue-400 dark:text-blue-300",words:f})]})})]})]})})}),l.jsx(k.section,{variants:x,className:"mb-6 md:mb-8 text-center",children:l.jsxs(k.div,{initial:{opacity:0,y:30,rotateX:-15},whileInView:{opacity:1,y:0,rotateX:0},viewport:{once:!0},transition:{duration:.8,type:"spring"},className:"space-y-6",style:{transformStyle:"preserve-3d",perspective:"1000px"},children:[l.jsx(Bl,{intensity:.2,children:l.jsxs(k.button,{onClick:c,whileHover:{scale:1.1,y:-5,z:50},whileTap:{scale:.95},className:"relative bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 hover:from-purple-700 hover:via-pink-700 hover:to-blue-700 text-white font-bold py-4 px-8 rounded-xl text-lg md:text-xl transition-all shadow-lg hover:shadow-2xl flex items-center gap-3 mx-auto overflow-hidden group",style:{transformStyle:"preserve-3d"},children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600"}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/40 to-transparent",initial:{x:"-100%"},animate:{x:["-100%","200%"]},transition:{duration:2,repeat:1/0,repeatDelay:.5,ease:"linear"},style:{transform:"skewX(-20deg)"}}),l.jsx("span",{className:"relative z-10",children:"Get Started"}),l.jsx(k.span,{className:"relative z-10",animate:{rotate:[0,15,-15,0],y:[0,-3,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:l.jsx(Mr,{})}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 blur-2xl opacity-0 group-hover:opacity-60 -z-10",animate:{scale:[1,1.2,1],opacity:[0,.6,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"}}),l.jsx(k.div,{className:"absolute inset-0 pointer-events-none",initial:!1,whileHover:"hover",children:l.jsx(k.div,{variants:{hover:{transition:{staggerChildren:.1}}},children:[...Array(8)].map((v,y)=>l.jsx(k.div,{className:"absolute w-2 h-2 bg-white rounded-full",variants:{hover:{opacity:[0,1,0],scale:[0,1,0],x:Math.cos(y/8*Math.PI*2)*50,y:Math.sin(y/8*Math.PI*2)*50}},transition:{duration:1,delay:y*.1},style:{left:"50%",top:"50%"}},y))})})]})}),l.jsx(k.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-gray-600 dark:text-gray-500 text-sm md:text-base",animate:{opacity:[.7,1,.7]},transition:{opacity:{duration:2,repeat:1/0,ease:"easeInOut"},y:{delay:.2}},children:"Create an account and start managing your personalized links today!"})]})}),l.jsx(rW,{features:p,title:"Key Features",subtitle:"",layout:"list",className:"mb-12 md:mb-16"}),l.jsx(k.section,{variants:x,className:"mb-12 md:mb-16",children:l.jsxs(k.div,{className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-10 lg:p-12",whileHover:{scale:1.01},children:[l.jsx(k.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-4 md:mb-6 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"How It Works"}),l.jsxs(k.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},className:"text-base md:text-lg lg:text-xl leading-8 text-gray-700 dark:text-gray-300 mb-4 md:mb-6",children:["The core idea behind"," ",l.jsx("b",{className:"text-gray-900 dark:text-white",children:"All in1 url"})," is to simplify the management of social media links. Instead of sharing long, hard-to-remember URLs, you create a single, personalized URL that automatically redirects users to the correct platform. Access all your links at one place by visiting"," ",l.jsx("b",{className:"text-gray-900 dark:text-white",children:"https://allin1url.in/yourname"})," ","(without any platform name). Plus, get real-time email notifications every time someone visits your links!"]}),l.jsx("div",{className:"space-y-6",children:[{step:"1",title:"Create an Account",desc:"Sign up using your email and create an account on All in1 url.",icon:Mr},{step:"2",title:"Choose a Username",desc:"Pick a username that's easy to remember (e.g., dpkrn). Your link will follow this format: https://allin1url.in/your-username/instagram.",icon:Ge},{step:"3",title:"Verify Your Account",desc:"Complete email verification to activate your account.",icon:fr},{step:"4",title:"Create a New Link",desc:"Enter the platform name (e.g., Instagram, LinkedIn) in lowercase. Paste your profile URL in the 'Destination URL' field. Click 'Create Link' to generate your personalized link.",icon:_s},{step:"5",title:"Share the Link",desc:"Copy and share your smart link across various platforms. Share your hub link (https://allin1url.in/yourname) to let visitors see all your profiles in one place.",icon:xs},{step:"6",title:"Get Real-Time Notifications",desc:"Receive instant email notifications every time someone visits your links. Stay informed about engagement and track who's viewing your profiles in real-time.",icon:No}].map((v,y)=>{const b=v.icon;return l.jsxs(k.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:y*.1},className:"flex items-start gap-4 p-6 bg-white/5 dark:bg-gray-800/30 rounded-2xl border border-white/10 hover:border-white/20 transition-all group",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-purple-600 to-pink-600 p-4 rounded-xl flex-shrink-0",whileHover:{scale:1.1,rotate:5},children:l.jsx(b,{className:"text-2xl text-white"})}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("h4",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-2",children:[v.step,". ",v.title]}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed",children:v.desc})]})]},v.step)})}),l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.6},className:"mt-8 p-6 bg-white/5 dark:bg-gray-800/30 rounded-2xl border border-white/10",children:[l.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Example:"}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(k.a,{href:"https://allin1url.in/dpkrn/instagram",target:"_blank",rel:"noopener noreferrer",whileHover:{scale:1.02,x:5},className:"block text-blue-400 hover:text-blue-300 underline font-mono text-base md:text-lg",children:"Instagram: https://allin1url.in/dpkrn/instagram"}),l.jsx(k.a,{href:"https://allin1url.in/dpkrn/leetcode",target:"_blank",rel:"noopener noreferrer",whileHover:{scale:1.02,x:5},className:"block text-blue-400 hover:text-blue-300 underline font-mono text-base md:text-lg",children:"LeetCode: https://allin1url.in/dpkrn/leetcode"})]})]})]})}),l.jsx(k.section,{variants:x,className:"mb-12 md:mb-16",children:l.jsxs(k.div,{className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-10 lg:p-12",whileHover:{scale:1.01},children:[l.jsxs(k.div,{className:"flex items-center gap-4 mb-6",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-orange-500 to-red-500 p-4 rounded-xl",whileHover:{scale:1.1,rotate:5},children:l.jsx(st,{className:"text-3xl text-white"})}),l.jsx(k.h2,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-orange-400 to-red-400 bg-clip-text text-transparent",children:"Click Tracking"})]}),l.jsxs(k.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-base md:text-lg lg:text-xl leading-8 text-gray-800 dark:text-gray-300",children:["With"," ",l.jsx("b",{className:"text-gray-900 dark:text-white",children:"All in1 url"}),", you can track how many times each of your links has been clicked. This allows you to monitor the engagement on your social media profiles across different platforms. Access the analytics section from your dashboard to see detailed statistics about each link's performance."]})]})}),l.jsxs(k.section,{variants:x,className:"mb-12 md:mb-16",children:[l.jsx(k.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-4xl md:text-5xl lg:text-6xl font-extrabold mb-6 md:mb-8 text-center bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Future Enhancements"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8",children:h.map((v,y)=>{const b=v.icon;return l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:y*.1},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-8 relative overflow-hidden group",children:[l.jsx(k.div,{className:`absolute inset-0 bg-gradient-to-r ${v.gradient} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsxs("div",{className:"relative z-10",children:[l.jsx(k.div,{className:`bg-gradient-to-r ${v.gradient} p-4 rounded-xl w-fit mb-4`,whileHover:{scale:1.1,rotate:5},children:l.jsx(b,{className:"text-2xl text-white"})}),l.jsx("h3",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-3",children:v.title}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed",children:v.desc})]})]},v.title)})})]}),l.jsxs(k.section,{variants:x,className:"mb-12 md:mb-16",children:[l.jsx(k.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-4xl md:text-5xl lg:text-6xl font-extrabold mb-6 md:mb-8 text-center bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Use Cases"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-8",children:[{title:"Job Seekers",desc:"Create professional links for your resume, LinkedIn, portfolio, and GitHub. Share one memorable link with recruiters.",icon:Qx,gradient:"from-blue-500 to-cyan-500",examples:["Resume sharing","Interview preparation","Professional networking"]},{title:"Content Creators",desc:"Manage all your social media profiles from one place. Share your All in1 url link in bio and watch engagement grow.",icon:W0,gradient:"from-purple-500 to-pink-500",examples:["Instagram bio links","YouTube descriptions","TikTok profiles"]},{title:"Developers",desc:"Showcase your GitHub, portfolio, blog, and coding profiles. Perfect for developer portfolios and tech resumes.",icon:Tc,gradient:"from-green-500 to-emerald-500",examples:["Portfolio websites","GitHub profiles","Tech blogs"]},{title:"Students",desc:"Share academic profiles, LinkedIn, research papers, and project portfolios. Great for college applications and networking.",icon:e1,gradient:"from-orange-500 to-red-500",examples:["College applications","Academic networking","Project showcases"]},{title:"Businesses",desc:"Create branded links for your company's social media presence. Manage multiple team member profiles efficiently.",icon:Po,gradient:"from-indigo-500 to-purple-500",examples:["Team profiles","Brand consistency","Social media management"]},{title:"Freelancers",desc:"Consolidate your work samples, client testimonials, and contact information in one professional link.",icon:Mr,gradient:"from-pink-500 to-rose-500",examples:["Client proposals","Portfolio sharing","Service showcases"]}].map((v,y)=>{const b=v.icon;return l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:y*.1},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-8 relative overflow-hidden group",children:[l.jsx(k.div,{className:`absolute inset-0 bg-gradient-to-r ${v.gradient} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsxs("div",{className:"relative z-10",children:[l.jsx(k.div,{className:`bg-gradient-to-r ${v.gradient} p-4 rounded-xl w-fit mb-4`,whileHover:{scale:1.1,rotate:5},children:l.jsx(b,{className:"text-3xl text-white"})}),l.jsx("h3",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-3",children:v.title}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed mb-4",children:v.desc}),l.jsx("div",{className:"space-y-2",children:v.examples.map((w,j)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-700 dark:text-gray-400",children:[l.jsx(fr,{className:"text-green-600 dark:text-green-400 text-xs"}),l.jsx("span",{children:w})]},j))})]})]},v.title)})})]}),l.jsx(k.section,{variants:x,className:"mb-12 md:mb-16",children:l.jsxs(k.div,{className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-10 lg:p-12",whileHover:{scale:1.01},children:[l.jsxs(k.div,{className:"flex items-center gap-4 mb-4 md:mb-6",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-yellow-500 to-orange-500 p-4 rounded-xl",whileHover:{scale:1.1,rotate:5},children:l.jsx(h7,{className:"text-3xl text-white"})}),l.jsx(k.h2,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-yellow-400 to-orange-400 bg-clip-text text-transparent",children:"Best Practices"})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[{title:"Choose a Memorable Username",desc:"Pick a username that's easy to remember and spell. Avoid numbers and special characters when possible. Your username becomes part of your brand identity.",icon:lo,color:"text-green-400"},{title:"Keep Platform Names Consistent",desc:"Use lowercase and consistent naming (e.g., 'linkedin' not 'LinkedIn' or 'linked-in'). This makes your links predictable and easy to remember.",icon:lo,color:"text-green-400"},{title:"Update Links Regularly",desc:"Keep your destination URLs up to date. Since all your shared links automatically update, you only need to change them once in your dashboard.",icon:xs,color:"text-blue-400"},{title:"Use Analytics to Optimize",desc:"Monitor which links get the most clicks. Use this data to prioritize which platforms to feature prominently in your profile.",icon:st,color:"text-purple-400"},{title:"Test Your Links",desc:"Always test your links after creating or updating them. Make sure they redirect correctly to the intended destination.",icon:fr,color:"text-cyan-400"},{title:"Share Your Hub Link",desc:"Prominently feature your main hub link (username) in your email signature, business cards, and social media bios for maximum visibility.",icon:Mr,color:"text-pink-400"}].map((v,y)=>{const b=v.icon;return l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:y*.1},className:"flex items-start gap-4 p-6 bg-white/5 dark:bg-gray-800/30 rounded-2xl border border-white/10 hover:border-white/20 transition-all group",children:[l.jsx(k.div,{className:"flex-shrink-0 mt-1",whileHover:{scale:1.2,rotate:10},children:l.jsx(b,{className:`text-2xl ${v.color}`})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h4",{className:"text-lg md:text-xl font-bold text-gray-900 dark:text-white mb-2",children:v.title}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed",children:v.desc})]})]},v.title)})})]})}),l.jsxs(k.section,{variants:x,className:"mb-12 md:mb-16",children:[l.jsx(k.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-4xl md:text-5xl lg:text-6xl font-extrabold mb-6 md:mb-8 text-center bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Supported Platforms"}),l.jsxs(k.div,{className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-10",initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},children:[l.jsxs("p",{className:"text-lg md:text-xl text-gray-700 dark:text-gray-400 mb-4 md:mb-6 text-center",children:["All in1 url supports"," ",l.jsx("b",{className:"text-gray-900 dark:text-white",children:"any platform"})," ","you can think of! Just provide the destination URL and we'll create your personalized link."]}),l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4",children:["LinkedIn","GitHub","Instagram","Facebook","Twitter/X","YouTube","TikTok","Snapchat","Pinterest","Reddit","Discord","Telegram","WhatsApp","Medium","Dev.to","Behance","Dribbble","Figma","Portfolio","Blog","Website","Email","Resume","LeetCode","Codeforces","HackerRank","CodeChef","Stack Overflow","Quora","Tumblr"].map((v,y)=>l.jsx(k.div,{initial:{opacity:0,scale:0},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{delay:y*.03,type:"spring"},whileHover:{scale:1.1,y:-3},className:"bg-gradient-to-br from-purple-600/20 to-pink-600/20 backdrop-blur-sm rounded-xl p-4 text-center border border-purple-200/50 dark:border-white/10 hover:border-purple-300/80 dark:hover:border-white/30 transition-all cursor-pointer",children:l.jsx("p",{className:"text-sm md:text-base font-semibold text-gray-900 dark:text-white",children:v})},v))}),l.jsx(k.p,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{delay:.5},className:"text-center text-gray-600 dark:text-gray-500 mt-6 text-sm md:text-base",children:"And many more! If you can share a URL, we can create a personalized link for it."})]})]}),l.jsx(k.section,{variants:x,className:"mb-12 md:mb-16",children:l.jsxs(k.div,{className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-10 lg:p-12",whileHover:{scale:1.01},children:[l.jsxs(k.div,{className:"flex items-center gap-4 mb-4 md:mb-6",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-green-500 to-emerald-500 p-4 rounded-xl",whileHover:{scale:1.1,rotate:5},children:l.jsx(er,{className:"text-3xl text-white"})}),l.jsx(k.h2,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-green-400 to-emerald-400 bg-clip-text text-transparent",children:"Security & Privacy"})]}),l.jsx("div",{className:"space-y-6",children:[{title:"Secure Authentication",desc:"All user accounts are protected with secure password hashing. We use industry-standard encryption to keep your data safe.",icon:bi,gradient:"from-blue-500 to-cyan-500"},{title:"Privacy First",desc:"We respect your privacy. Your personal information and link data are stored securely and never shared with third parties without your consent.",icon:Lr,gradient:"from-purple-500 to-pink-500"},{title:"HTTPS Encryption",desc:"All connections to All in1 url are encrypted using HTTPS, ensuring your data is protected during transmission.",icon:er,gradient:"from-green-500 to-emerald-500"},{title:"Secure Server Infrastructure",desc:"Our servers are hosted on secure, reliable infrastructure with regular security updates and monitoring.",icon:Ic,gradient:"from-orange-500 to-red-500"}].map((v,y)=>{const b=v.icon;return l.jsxs(k.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:y*.1},className:"flex items-start gap-4 p-6 bg-white/5 dark:bg-gray-800/30 rounded-2xl border border-white/10 hover:border-white/20 transition-all group",children:[l.jsx(k.div,{className:`bg-gradient-to-r ${v.gradient} p-4 rounded-xl flex-shrink-0`,whileHover:{scale:1.1,rotate:5},children:l.jsx(b,{className:"text-2xl text-white"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h4",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-2",children:v.title}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed",children:v.desc})]})]},v.title)})})]})}),l.jsxs(k.section,{variants:x,className:"mb-12 md:mb-16",children:[l.jsx(k.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-4xl md:text-5xl lg:text-6xl font-extrabold mb-6 md:mb-8 text-center bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Troubleshooting"}),l.jsx("div",{className:"space-y-4",children:[{issue:"My link is not redirecting correctly",solution:"Double-check that your destination URL is correct and includes the full protocol (https://). Make sure the URL is accessible and not behind a login wall.",icon:F0,color:"from-red-500 to-orange-500"},{issue:"I forgot my password",solution:"Use the 'Forgot Password' link on the login page to reset your password. You'll receive an email with instructions to create a new password.",icon:zU,color:"from-blue-500 to-cyan-500"},{issue:"My username is already taken",solution:"Usernames must be unique. Try adding numbers or variations to your desired username. Remember, usernames cannot be changed once created.",icon:xa,color:"from-yellow-500 to-orange-500"},{issue:"I'm not receiving verification emails",solution:"Check your spam/junk folder. Make sure you entered the correct email address. If the issue persists, contact support for assistance.",icon:F0,color:"from-purple-500 to-pink-500"},{issue:"My click count seems incorrect",solution:"Click tracking may take a few moments to update. Refresh your dashboard. Note that clicks from the same IP within a short time may be filtered to prevent spam.",icon:st,color:"from-green-500 to-emerald-500"},{issue:"I want to delete my account",solution:"Contact our support team to request account deletion. We'll process your request and ensure all your data is permanently removed from our systems.",icon:W0,color:"from-indigo-500 to-purple-500"}].map((v,y)=>{const b=v.icon;return l.jsx(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:y*.1},whileHover:{scale:1.02},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-white/20 dark:border-gray-700/50 overflow-hidden group",children:l.jsx(k.div,{className:"p-6",children:l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx(k.div,{className:`bg-gradient-to-r ${v.color} p-3 rounded-xl flex-shrink-0`,whileHover:{scale:1.1,rotate:5},children:l.jsx(b,{className:"text-xl text-white"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h4",{className:"text-lg md:text-xl font-bold text-gray-900 dark:text-white mb-2",children:v.issue}),l.jsxs("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed",children:[l.jsxs("span",{className:"font-semibold text-green-600 dark:text-green-400",children:["Solution:"," "]}),v.solution]})]})]})})},y)})}),l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.6},className:"mt-8 p-6 bg-gradient-to-r from-purple-600/20 to-pink-600/20 backdrop-blur-sm rounded-2xl border border-purple-400/30 dark:border-purple-400/30 text-center",children:[l.jsx("p",{className:"text-lg md:text-xl text-gray-900 dark:text-white mb-2",children:"Still need help?"}),l.jsxs("p",{className:"text-gray-700 dark:text-gray-400",children:["Contact our support team at"," ",l.jsx("a",{href:"mailto:d.wizard.techno@gmail.com",className:"text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 underline",children:"d.wizard.techno@gmail.com"})," ","and we'll be happy to assist you!"]})]})]}),l.jsxs(k.section,{variants:x,className:"mb-12 md:mb-16",children:[l.jsx(k.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-4xl md:text-5xl lg:text-6xl font-extrabold mb-6 md:mb-8 text-center bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Frequently Asked Questions"}),l.jsx("div",{className:"space-y-4",children:[{q:"Can I change my username after creating an account?",a:"Unfortunately, usernames cannot be changed once they are set. Choose your username carefully!"},{q:"How do I track my link clicks?",a:"Click tracking is available through your dashboard. You can view the number of clicks for each link, and advanced analytics will be added soon."},{q:"Can I use custom platforms other than the popular ones (Instagram, LinkedIn, etc.)?",a:"Yes! You can add any platform as long as you provide the correct profile URL."}].map((v,y)=>l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:y*.1},whileHover:{scale:1.02},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-white/20 dark:border-gray-700/50 overflow-hidden cursor-pointer group",onClick:()=>u(y),children:[l.jsxs(k.div,{className:"p-6 flex justify-between items-center",whileHover:{backgroundColor:"rgba(255,255,255,0.05)"},children:[l.jsxs("p",{className:"font-semibold text-lg md:text-xl text-gray-900 dark:text-gray-200 flex-1",children:["Q: ",v.q]}),l.jsx(k.div,{animate:{rotate:o[y]?180:0},transition:{duration:.3},children:o[y]?l.jsx(TU,{className:"text-purple-600 dark:text-purple-400 text-xl"}):l.jsx(Oc,{className:"text-purple-600 dark:text-purple-400 text-xl"})})]}),l.jsx(Ue,{children:o[y]&&l.jsx(k.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},className:"overflow-hidden",children:l.jsxs(k.p,{initial:{y:-10},animate:{y:0},className:"px-6 pb-6 text-gray-700 dark:text-gray-400 text-base md:text-lg leading-relaxed",children:["A: ",v.a]})})})]},y))})]}),l.jsxs(k.section,{variants:x,className:"mb-12 md:mb-16",children:[l.jsx(k.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-4xl md:text-5xl lg:text-6xl font-extrabold mb-6 md:mb-8 text-center bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"What Our Users Say"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8",children:[{text:"All in1 url made sharing my profiles so much easier. The personalized links look great and are super easy to remember!",author:"Amit S."},{text:"I love the analytics and the ability to update all my links in one place. Highly recommended!",author:"Priya K."}].map((v,y)=>l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:y*.2},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-8 relative overflow-hidden group",children:[l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-600/10 to-pink-600/10 opacity-0 group-hover:opacity-100 transition-opacity"}),l.jsxs("div",{className:"relative z-10",children:[l.jsx("div",{className:"flex gap-2 mb-4",children:[...Array(5)].map((b,w)=>l.jsx(_c,{className:"text-yellow-400 text-lg"},w))}),l.jsxs("p",{className:"text-lg md:text-xl italic text-gray-700 dark:text-gray-300 mb-6 leading-relaxed",children:['"',v.text,'"']}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(k.img,{src:"profile.jpg",alt:v.author,className:"h-12 w-12 rounded-full object-cover border-2 border-purple-400",whileHover:{scale:1.1}}),l.jsx("span",{className:"font-semibold text-gray-900 dark:text-white text-lg",children:v.author})]})]})]},y))})]}),l.jsx(Mi,{})]})})]})};function oW(e){return X({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"},child:[]}]})(e)}function sW(e){return X({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"},child:[]}]})(e)}function lW(e){return X({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077"},child:[]}]})(e)}function cW(e){return X({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13.483 0a1.374 1.374 0 0 0-.961.438L7.116 6.226l-3.854 4.126a5.266 5.266 0 0 0-1.209 2.104 5.35 5.35 0 0 0-.125.513 5.527 5.527 0 0 0 .062 2.362 5.83 5.83 0 0 0 .349 1.017 5.938 5.938 0 0 0 1.271 1.818l4.277 4.193.039.038c2.248 2.165 5.852 2.133 8.063-.074l2.396-2.392c.54-.54.54-1.414.003-1.955a1.378 1.378 0 0 0-1.951-.003l-2.396 2.392a3.021 3.021 0 0 1-4.205.038l-.02-.019-4.276-4.193c-.652-.64-.972-1.469-.948-2.263a2.68 2.68 0 0 1 .066-.523 2.545 2.545 0 0 1 .619-1.164L9.13 8.114c1.058-1.134 3.204-1.27 4.43-.278l3.501 2.831c.593.48 1.461.387 1.94-.207a1.384 1.384 0 0 0-.207-1.943l-3.5-2.831c-.8-.647-1.766-1.045-2.774-1.202l2.015-2.158A1.384 1.384 0 0 0 13.483 0zm-2.866 12.815a1.38 1.38 0 0 0-1.38 1.382 1.38 1.38 0 0 0 1.38 1.382H20.79a1.38 1.38 0 0 0 1.38-1.382 1.38 1.38 0 0 0-1.38-1.382z"},child:[]}]})(e)}function uW(e){return X({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"},child:[]}]})(e)}function dW(e){return X({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"},child:[]}]})(e)}function fW(e){return X({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"},child:[]}]})(e)}const pW=({words:e=[],flipWords:t=[],description:r="",highlightText:n="",ctaText:a="Start with your username",ctaAction:i=null,platforms:o=[],showScrollIndicator:s=!0,className:c="",mousePosition:u={x:0,y:0},isAuthenticated:d=!1})=>{Ht();const f=m.useRef(null),{scrollYProgress:p}=t$(),h=O4(p,[0,.5],[1,0]),g=O4(p,[0,.5],[1,.8]),x=async A=>{let E=A;if(typeof A=="object"&&A!==null&&(E=y),!E||E.length<5){J.error("Please enter a valid username (min 5 characters)");return}if(!w){J.error("Username is not available. Please choose another one.");return}const _=new URLSearchParams({client_id:"82343726980-l5frel7ehhv36rcuqo4vu5adkf8vkanq.apps.googleusercontent.com",redirect_uri:"https://allin1url.in/auth/google",response_type:"code",scope:"openid email profile",access_type:"offline",prompt:"select_account",state:btoa(JSON.stringify({username:E,usertype:"onboarding"}))});window.location.href="https://accounts.google.com/o/oauth2/v2/auth?"+_.toString()},v=A=>{i?i():x(A||y)},[y,b]=Ne.useState(""),[w,j]=Ne.useState(!1),[N,S]=Ne.useState(!1),[P,C]=Ne.useState(!1),M=Ne.useRef(null),T=async A=>{if(A.length<5){j(!1);return}S(!0);try{const E=await be.post("/auth/checkavailablity",{username:A});E.status===209&&E.data.success&&j(!1),E.status===200&&E.data.success&&j(!0)}catch{j(!1)}finally{S(!1)}};return l.jsxs(k.section,{ref:f,style:{opacity:h,scale:g},className:`relative min-h-screen flex items-center justify-center overflow-hidden ${d?"":"pt-16"} ${c}`,children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-purple-50/60 via-pink-50/60 to-blue-50/60 dark:from-purple-500/20 dark:via-pink-500/20 dark:to-blue-500/20"}),l.jsx(k.div,{className:"absolute inset-0",animate:{backgroundPosition:[`${u.x}% ${u.y}%`,`${Math.min(u.x*1.1,100)}% ${Math.min(u.y*1.1,100)}%`]},transition:{duration:.5},style:{backgroundImage:`radial-gradient(circle at ${u.x}% ${u.y}%, rgba(147, 51, 234, 0.08), transparent 50%)`}})]}),l.jsx("div",{className:"relative z-10 container mx-auto px-4 sm:px-6 lg:px-8 py-12 sm:py-16 md:py-20",children:l.jsxs("div",{className:"text-center space-y-6 sm:space-y-7 md:space-y-8",children:[e.length>0&&l.jsx(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8},children:l.jsx(M7,{words:e,className:"mb-6"})}),t.length>0&&l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.1,delay:.1},className:"text-lg sm:text-xl md:text-2xl lg:text-3xl xl:text-4xl font-semibold text-gray-800 dark:text-gray-300 mb-3 sm:mb-4 px-4",children:["Create personalized links for your"," ",l.jsx("span",{className:"inline-block",children:l.jsx(n1,{words:t,duration:100,className:"text-xl sm:text-2xl md:text-3xl lg:text-4xl xl:text-5xl font-bold"})})]}),r&&l.jsxs(k.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"text-sm sm:text-base md:text-lg lg:text-xl text-gray-600 dark:text-gray-400 max-w-3xl mx-auto leading-relaxed px-4",children:[r,n&&l.jsxs(l.Fragment,{children:[l.jsx("br",{}),l.jsx("span",{className:"text-sm sm:text-base md:text-lg lg:text-xl font-semibold text-purple-600 dark:text-purple-400",children:n})]})]}),l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.7},className:"flex flex-col gap-4 justify-center items-center mt-10 group relative",tabIndex:0,onMouseEnter:()=>{y.length===0&&(C(!0),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>C(!1),2e3))},onMouseLeave:()=>{C(!1),M.current&&clearTimeout(M.current)},children:[P&&y.length===0&&l.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 z-20 transition-opacity duration-200",children:l.jsx("div",{className:"bg-purple-600 text-white text-xs sm:text-sm px-3 sm:px-4 py-1.5 sm:py-2 rounded-lg shadow-lg font-semibold whitespace-nowrap animate-fade-in",children:"Always choose easy and memorable username"})}),l.jsxs("div",{className:"flex flex-row flex-nowrap gap-1 sm:gap-2 items-center w-full max-w-full px-4 sm:px-0 justify-center",children:[l.jsx("span",{className:"text-xs sm:text-sm md:text-base lg:text-lg font-medium text-gray-700 dark:text-gray-200 whitespace-nowrap flex-shrink-0",children:"https://"}),l.jsx("div",{className:"relative flex-shrink-0 min-w-[80px] sm:min-w-[100px] md:min-w-[120px] w-auto sm:w-36 md:w-44 max-w-[120px] sm:max-w-none",children:l.jsx("input",{type:"text",value:y,onChange:A=>{const E=A.target.value.replace(/[^a-zA-Z0-9-_]/g,"");b(E),E.length>=5?T(E.toLowerCase()):j(!1)},placeholder:"username",className:"w-full px-2 sm:px-3 md:px-4 py-1.5 sm:py-2 md:py-2.5 rounded-lg sm:rounded-xl border border-gray-300 dark:border-gray-700 bg-transparent text-gray-900 dark:text-gray-100 shadow-sm focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-all duration-200 text-xs sm:text-sm md:text-base lg:text-lg font-semibold placeholder-gray-400 dark:placeholder-gray-500 hover:border-purple-400 dark:hover:border-purple-400",autoComplete:"off",spellCheck:"false"})}),l.jsx("span",{className:"text-xs sm:text-sm md:text-base lg:text-lg font-medium text-gray-700 dark:text-gray-200 whitespace-nowrap flex-shrink-0",children:".allin1url.in/"})]}),l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>v(y),disabled:y.length<5||!w||N,className:"group relative px-4 py-2.5 sm:px-6 sm:py-3 md:px-8 md:py-4 bg-gradient-to-r from-purple-600 to-pink-600 text-white font-bold text-sm sm:text-base md:text-lg rounded-full shadow-2xl hover:shadow-purple-500/50 transition-all duration-300 overflow-hidden w-full sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[l.jsxs("span",{className:"relative z-10 flex items-center justify-center gap-2",children:["Start with your username",l.jsx(jo,{className:"group-hover:translate-x-1 transition-transform"})]}),l.jsx(k.div,{className:"absolute inset-0 bg-gradient-to-r from-pink-600 to-purple-600",initial:{x:"-100%"},whileHover:{x:0},transition:{duration:.3}})]}),y.length>=5&&l.jsx("p",{className:`mt-2 text-xs sm:text-sm ml-1 transition-all duration-300 ${w?"text-green-400":"text-red-400"}`,children:w?"✓ Username is available":"✗ Username is not available"}),l.jsxs("p",{className:"text-xs sm:text-sm md:text-base text-gray-700 dark:text-gray-200 mt-2 px-4 text-center",children:["Get your own domain ",l.jsx("strong",{children:"FREE"})," to manage your links"]}),l.jsx("p",{className:"text-xs sm:text-sm text-purple-600 dark:text-purple-400 mt-1 font-semibold px-4 text-center",children:"That will reflect your brand identity ✨"})]}),o.length>0&&l.jsxs(k.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.8,delay:.9},className:"mt-16",children:[l.jsx("p",{className:"text-xs sm:text-sm md:text-base text-gray-600 dark:text-gray-400 mb-3 sm:mb-4 px-4",children:"Works with all platforms"}),l.jsx("div",{className:"flex flex-wrap justify-center gap-4 sm:gap-5 md:gap-6 px-4",children:o.map((A,E)=>l.jsx(k.div,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{delay:1+E*.1,type:"spring",stiffness:200},whileHover:{scale:1.2,rotate:5},className:`text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${A.color||"text-gray-600"} cursor-pointer hover:drop-shadow-lg transition-all`,children:A.icon},A.name||E))})]})]})}),s&&l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.2,repeat:1/0,repeatType:"reverse",duration:2},className:"absolute bottom-10 left-1/2 transform -translate-x-1/2",children:l.jsx(k.div,{animate:{y:[0,10,0]},transition:{duration:1.5,repeat:1/0},className:"w-6 h-10 border-2 border-purple-600 dark:border-purple-400 rounded-full flex justify-center",children:l.jsx(k.div,{animate:{y:[0,12,0]},transition:{duration:1.5,repeat:1/0},className:"w-1 h-3 bg-purple-600 dark:bg-purple-400 rounded-full mt-2"})})})]})},mW=({features:e=[],title:t="Powerful Features",subtitle:r="Everything you need to manage your social presence in one place",className:n="",sectionRef:a=null,layout:i="grid"})=>{const o=a||Ne.useRef(null),s=e.map(c=>({...c,description:c.description||c.desc||"",color:c.color||c.gradient||"from-purple-500 to-pink-500",icon:c.icon}));return l.jsxs("section",{ref:o,className:`py-20 bg-gradient-to-br from-blue-50/80 via-purple-50/80 to-pink-50/80 dark:bg-gradient-to-br dark:from-slate-900/60 dark:via-purple-950/40 dark:to-pink-950/40 backdrop-blur-sm relative overflow-hidden ${n}`,children:[l.jsxs("div",{className:"hidden dark:block absolute inset-0 overflow-hidden pointer-events-none",children:[l.jsx("div",{className:"absolute top-1/3 right-1/4 w-96 h-96 bg-pink-500/10 rounded-full blur-3xl"}),l.jsx("div",{className:"absolute bottom-1/3 left-1/4 w-96 h-96 bg-purple-500/10 rounded-full blur-3xl"})]}),l.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:[l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"text-center mb-16",children:[l.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-white mb-4 dark:bg-gradient-to-r dark:from-blue-300 dark:via-purple-300 dark:to-pink-300 dark:bg-clip-text dark:text-transparent",children:t}),r&&l.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-2xl mx-auto",children:r})]}),i==="list"?l.jsx("div",{className:"space-y-4 md:space-y-6",children:s.map((c,u)=>{const d=c.icon;return l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:c.delay||u*.1},whileHover:{y:-5,scale:1.01},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-8 relative overflow-hidden group",children:[l.jsx("div",{className:`hidden dark:block absolute inset-0 bg-gradient-to-r ${c.color} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsxs("div",{className:"relative z-10 flex items-start gap-4",children:[d&&l.jsx(k.div,{className:`bg-gradient-to-r ${c.color} p-4 rounded-xl flex-shrink-0`,whileHover:{scale:1.1,rotate:5},children:typeof d=="function"?l.jsx(d,{className:"text-2xl text-white"}):l.jsx("div",{className:"text-2xl text-white",children:d})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h3",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-3",children:c.title}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed",children:c.description})]})]})]},c.title||u)})}):l.jsx("div",{className:"grid sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8",children:s.map((c,u)=>{const d=c.icon;return l.jsxs(k.div,{initial:{opacity:0,y:50},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:c.delay||u*.1},whileHover:{y:-10,scale:1.02},className:"relative group",children:[l.jsx(k.div,{className:"absolute -inset-[2px] rounded-xl sm:rounded-2xl",animate:{boxShadow:["0 0 10px rgba(147, 51, 234, 0.5), 0 0 20px rgba(236, 72, 153, 0.3), 0 0 30px rgba(59, 130, 246, 0.2)","0 0 20px rgba(147, 51, 234, 0.8), 0 0 40px rgba(236, 72, 153, 0.6), 0 0 60px rgba(59, 130, 246, 0.4)","0 0 10px rgba(147, 51, 234, 0.5), 0 0 20px rgba(236, 72, 153, 0.3), 0 0 30px rgba(59, 130, 246, 0.2)"]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},style:{background:"linear-gradient(135deg, #9333ea, #ec4899, #3b82f6)"}}),l.jsxs("div",{className:"relative p-6 sm:p-8 rounded-xl sm:rounded-2xl bg-white/90 dark:bg-gradient-to-br dark:from-gray-800/80 dark:via-gray-900/80 dark:to-gray-800/80 backdrop-blur-xl border-2 border-transparent dark:shadow-[0_0_20px_rgba(147,51,234,0.15)] hover:border-purple-400 dark:hover:border-purple-400/60 dark:hover:shadow-[0_0_30px_rgba(147,51,234,0.25)] shadow-lg hover:shadow-2xl transition-all duration-300 overflow-hidden h-full flex flex-col",children:[l.jsx("div",{className:`hidden dark:block absolute inset-0 bg-gradient-to-br ${c.color} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsxs("div",{className:"relative z-10 flex flex-col h-full",children:[d&&l.jsx("div",{className:`text-5xl mb-4 bg-gradient-to-r ${c.color} bg-clip-text text-transparent dark:drop-shadow-[0_0_12px_rgba(147,51,234,0.4)]`,children:typeof d=="function"?l.jsx(d,{className:"w-8 h-8"}):d}),l.jsx("h3",{className:"text-2xl font-bold text-gray-800 dark:text-white mb-3 dark:bg-gradient-to-r dark:from-purple-200 dark:via-pink-200 dark:to-blue-200 dark:bg-clip-text dark:text-transparent",children:c.title}),l.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed flex-grow",children:c.description}),l.jsx(k.div,{className:"absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-purple-500 to-pink-500 transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300 dark:shadow-[0_0_10px_rgba(236,72,153,0.5)]"})]})]})]},c.title||u)})})]})]})},hW=({end:e,duration:t=2e3,suffix:r="",statsInView:n})=>{const[a,i]=Ne.useState(0),o=Ne.useRef(null),s=Ne.useRef(!0),c=Ne.useRef(!1);return Ne.useEffect(()=>{if(c.current&&(i(0),c.current=!1,o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)),!n)return;s.current=!0,c.current=!0;let u=null;const d=f=>{if(!s.current)return;u||(u=f);const p=Math.min((f-u)/t,1),h=1-Math.pow(1-p,4);s.current&&i(Math.floor(h*e)),p<1&&s.current?o.current=requestAnimationFrame(d):o.current=null};return o.current=requestAnimationFrame(d),()=>{s.current=!1,o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},[n,e,t]),l.jsxs("span",{children:[a,r]})},gW=({stats:e=[],title:t="Trusted by Thousands",subtitle:r="Join the community of professionals, creators, and developers",className:n="",sectionRef:a=null})=>{const i=a||m.useRef(null),o=ap(i,{once:!0,margin:"-100px"});return l.jsxs("section",{ref:i,className:`py-20 bg-gradient-to-br from-purple-50/80 via-pink-50/80 to-blue-50/80 dark:bg-gradient-to-br dark:from-purple-950/40 dark:via-slate-900/60 dark:to-blue-950/40 backdrop-blur-sm relative overflow-hidden ${n}`,children:[l.jsxs("div",{className:"hidden dark:block absolute inset-0 overflow-hidden pointer-events-none",children:[l.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-purple-500/10 rounded-full blur-3xl"}),l.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-blue-500/10 rounded-full blur-3xl"})]}),l.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:[l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"text-center mb-16",children:[l.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-white mb-4 dark:bg-gradient-to-r dark:from-purple-300 dark:via-pink-300 dark:to-blue-300 dark:bg-clip-text dark:text-transparent",children:t}),l.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 mb-[120px]",children:r})]}),l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 sm:gap-6 md:gap-8",children:e.map((s,c)=>l.jsxs(k.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:c*.1},whileHover:{scale:1.05,y:-5},className:"relative group p-[2px] rounded-xl sm:rounded-2xl",children:[l.jsx(k.div,{className:"absolute inset-0 rounded-xl sm:rounded-2xl",animate:{rotate:[0,360]},transition:{duration:3,repeat:1/0,ease:"linear"},style:{background:"conic-gradient(from 0deg, #9333ea, #ec4899, #3b82f6, #9333ea)"}}),l.jsx(k.div,{className:"absolute inset-0 rounded-xl sm:rounded-2xl",animate:{boxShadow:["0 0 15px rgba(147, 51, 234, 0.4), inset 0 0 15px rgba(147, 51, 234, 0.2)","0 0 25px rgba(236, 72, 153, 0.6), inset 0 0 25px rgba(236, 72, 153, 0.3)","0 0 15px rgba(59, 130, 246, 0.4), inset 0 0 15px rgba(59, 130, 246, 0.2)","0 0 15px rgba(147, 51, 234, 0.4), inset 0 0 15px rgba(147, 51, 234, 0.2)"]},transition:{duration:3,repeat:1/0,ease:"easeInOut"}}),l.jsxs("div",{className:"relative text-center p-4 sm:p-6 rounded-xl sm:rounded-2xl bg-white/90 dark:bg-gradient-to-br dark:from-gray-800/80 dark:via-gray-900/80 dark:to-gray-800/80 backdrop-blur-xl dark:shadow-[0_0_20px_rgba(147,51,234,0.15)] shadow-lg hover:shadow-xl dark:hover:shadow-[0_0_30px_rgba(147,51,234,0.25)] transition-all overflow-hidden",children:[l.jsx("div",{className:"hidden dark:block absolute inset-0 bg-gradient-to-br from-purple-500/5 via-transparent to-blue-500/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),l.jsxs("div",{className:"relative z-10",children:[l.jsx("div",{className:"text-3xl md:text-4xl mb-2 text-purple-600 dark:text-purple-400 flex justify-center dark:drop-shadow-[0_0_8px_rgba(147,51,234,0.5)]",children:s.icon}),l.jsx("div",{className:"text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-gray-800 dark:text-white mb-2 dark:bg-gradient-to-r dark:from-purple-200 dark:via-pink-200 dark:to-blue-200 dark:bg-clip-text dark:text-transparent",children:o?l.jsx(hW,{end:s.value,suffix:s.suffix,statsInView:o}):`0${s.suffix}`}),l.jsx("div",{className:"text-sm md:text-base text-gray-600 dark:text-gray-300 font-medium",children:s.label})]})]})]},s.label||c))})]})]})},yW=({title:e="Ready to Transform Your Links?",subtitle:t="Join thousands of professionals who trust All in1 url to manage their social presence",ctaText:r="Get Started Now",ctaAction:n=null,className:a=""})=>{const i=Ht(),o=()=>{n?n():i("/login")};return l.jsxs("section",{className:`py-20 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 relative overflow-hidden ${a}`,children:[l.jsx("div",{className:"absolute inset-0 bg-black/20"}),l.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:l.jsxs(k.div,{initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.6},className:"text-center",children:[l.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-white mb-4 sm:mb-6",children:e}),l.jsx("p",{className:"text-lg sm:text-xl md:text-2xl text-white/90 mb-6 sm:mb-10 max-w-2xl mx-auto px-4",children:t}),l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:o,className:"px-6 py-3 sm:px-10 sm:py-5 bg-white text-purple-600 font-bold text-base sm:text-lg md:text-xl rounded-full shadow-2xl hover:shadow-white/50 transition-all duration-300 flex items-center justify-center gap-3 mx-auto",children:[r,l.jsx(jo,{})]})]})})]})},vW=()=>{const[e,t]=m.useState(null),[r,n]=m.useState(!1),[a,i]=m.useState([200,180,180,180,180,180]),[o,s]=m.useState(null),c=m.useRef(0),u=m.useRef(0),d=[{name:"All in1 url",highlight:!0},{name:"Link Shorteners",highlight:!1},{name:"Linktree",highlight:!1},{name:"Bio.link",highlight:!1},{name:"Custom Domain",highlight:!1}],f=[{name:"Link Format",values:["username.domain/platform","bit.ly/xyz123","linktr.ee/username","bio.link/username","custom.com/username"],statuses:["good","bad","warning","warning","good"]},{name:"Profile Visit Email Notification",values:["Yes, customizable","Not available","Premium feature","Premium feature","Varies"],statuses:["good","bad","warning","warning","warning"]},{name:"Click Email Notification",values:["Yes, customizable","Not available","Premium feature","Premium feature","Varies"],statuses:["good","bad","warning","warning","warning"]},{name:"Platform Hub",values:["Single link for all profiles","Separate links","Yes","Yes","Varies"],statuses:["good","bad","good","good","warning"]},{name:"Link Privacy",values:["Public/Unlisted/Private","Not available","Limited","Limited","Varies"],statuses:["good","bad","warning","warning","warning"]},{name:"Link Password Protection",values:["Built-in","Not available","Premium feature","Premium feature","Varies"],statuses:["good","bad","warning","warning","warning"]}],p=[{name:"Memorability",values:["Human-readable, memorable","Random codes","Platform-dependent","Platform-dependent","Customizable"],statuses:["good","bad","warning","warning","good"]},{name:"Professionalism",values:["Branded, professional","Generic, unprofessional","Branded by platform","Branded by platform","Fully branded"],statuses:["good","bad","warning","warning","good"]},{name:"Expiration",values:["Never expires","Often expires","Usually permanent","Usually permanent","Permanent"],statuses:["good","bad","good","good","good"]},{name:"Centralized Management",values:["Update all links from one place","Must update each link","Yes","Yes","Varies"],statuses:["good","bad","good","good","warning"]},{name:"Analytics",values:["Comprehensive dashboard with device/browser/OS/referrer analytics","Limited or premium","Premium feature","Premium feature","Varies"],statuses:["good","warning","warning","warning","warning"]},{name:"Customization",values:["Username-based personalization","No customization","Limited","Limited","Full control"],statuses:["good","bad","warning","warning","good"]},{name:"Cost",values:["Free and open source","Often requires paid plans","Premium features locked","Premium features locked","Expensive"],statuses:["good","warning","warning","warning","bad"]},{name:"Transparency",values:["Open source, auditable","Closed source","Closed source","Closed source","Varies"],statuses:["good","bad","bad","bad","warning"]},{name:"No Vendor Lock-in",values:["Self-hostable","Vendor-dependent","Vendor-dependent","Vendor-dependent","Self-hostable"],statuses:["good","bad","bad","bad","good"]},{name:"Dark Mode",values:["Full support with proper text contrast","Varies","Limited","Limited","Varies"],statuses:["good","warning","warning","warning","warning"]},{name:"Mobile Responsive Design",values:["Fully optimized with responsive text sizing","Varies","Yes","Yes","Varies"],statuses:["good","warning","good","good","warning"]},{name:"Advanced Analytics",values:["Device/Browser/OS/Referrer analytics with multiple chart types","Basic click tracking","Premium feature","Premium feature","Varies"],statuses:["good","warning","warning","warning","warning"]},{name:"Security Features",values:["JWT auth, bcrypt, HTTPS, Helmet.js, password-protected links","Basic","Standard","Standard","Varies"],statuses:["good","warning","warning","warning","warning"]}],h=[...f,...p],g=m.useCallback(j=>{const N=j<768,S=j>=768&&j<1024,P=(I,B,V=!1)=>{const O=B?V?5:4.5:V?7.5:7,R=B?12:32,U=V?0:B?16:22,q=V?0:2;return Math.max(I.length*O+R+U+q,B?80:120)},C=h.reduce((I,B)=>B.name.length>I?B.name.length:I,0),M=d.map((I,B)=>{const V=h.reduce((O,R)=>{var q;const U=((q=R.values[B])==null?void 0:q.length)||0;return U>O?U:O},0);return Math.max(V,d[B].name.length)}),T=P(" ".repeat(C),N,!0),A=M.map((I,B)=>{const V=P(d[B].name,N,!0),O=P(" ".repeat(I),N,!1);return Math.max(V,O)});let E=1;N?E=.85:S?E=1:E=1.1;const _=N?90:S?140:160,L=N?85:S?130:150;return[Math.max(T*E,_),...A.map(I=>Math.max(I*E,L))]},[h,d]);m.useEffect(()=>{const j=()=>{const N=window.innerWidth,S=N<768;r!==S&&n(S);const P=g(N);JSON.stringify(a)!==JSON.stringify(P)&&i(P)};return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[g,r,a]);const x=(j,N=!1)=>{const S=N?"w-3 h-3":"w-4 h-4 sm:w-5 sm:h-5";switch(j){case"good":return l.jsx(lo,{className:`${S} text-green-500 flex-shrink-0`});case"bad":return l.jsx(xa,{className:`${S} text-red-500 flex-shrink-0`});case"warning":return l.jsx(_U,{className:`${S} text-amber-500 flex-shrink-0`});default:return null}},v=j=>{switch(j){case"good":return"bg-green-50 dark:bg-green-900/20";case"bad":return"bg-red-50 dark:bg-red-900/20";case"warning":return"bg-amber-50 dark:bg-amber-900/20";default:return"bg-gray-50 dark:bg-gray-800"}},y=(j,N)=>{r||(j.preventDefault(),s(N),c.current=j.clientX,u.current=a[N])},b=m.useCallback(j=>{if(o!==null){const N=j.clientX-c.current,S=Math.max(120,u.current+N);i(P=>{const C=[...P];return C[o]=S,C})}},[o]),w=m.useCallback(()=>{s(null)},[]);return m.useEffect(()=>{if(o!==null)return document.addEventListener("mousemove",b),document.addEventListener("mouseup",w),()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",w)}},[o,b,w]),l.jsx("div",{className:"w-full bg-gradient-to-br from-blue-50 via-white to-purple-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 py-4 px-3 sm:py-6 md:py-8 sm:px-4 md:px-6 lg:px-8",children:l.jsxs("div",{className:"w-full mx-auto",children:[l.jsxs("div",{className:"text-center mb-3 sm:mb-4 md:mb-6 lg:mb-8",children:[l.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent mb-2 sm:mb-3 px-2",children:"🆚 All in1 url vs. Competitors"}),l.jsx("p",{className:"text-sm sm:text-base md:text-lg text-gray-600 dark:text-gray-400 px-2",children:"Complete feature comparison at a glance"}),!r&&l.jsx("p",{className:"text-xs sm:text-sm text-gray-500 dark:text-gray-500 mt-2",children:"💡 Drag column edges to resize"})]}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg sm:rounded-xl shadow-xl sm:shadow-2xl overflow-x-auto",children:l.jsxs("div",{className:"inline-block min-w-full",children:[l.jsxs("div",{className:"flex border-b-2 border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{className:`bg-gray-50 dark:bg-gray-900 font-bold text-gray-700 dark:text-gray-300 flex-shrink-0 relative flex items-center ${r?"p-1.5 sm:p-2 text-[10px] sm:text-[11px]":"p-4 text-sm"}`,style:{width:`${a[0]}px`,minWidth:`${a[0]}px`,maxWidth:`${a[0]}px`,wordWrap:"break-word",overflowWrap:"break-word"},children:[l.jsx("span",{className:"whitespace-normal break-words word-break break-all",children:"Feature"}),!r&&l.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-blue-500 transition-colors group",onMouseDown:j=>y(j,0),children:l.jsx(M3,{className:"w-4 h-4 text-gray-400 group-hover:text-blue-500 absolute top-1/2 right-0 transform -translate-y-1/2 -translate-x-1/2"})})]}),d.map((j,N)=>l.jsxs("div",{className:`text-center font-bold transition-all duration-300 flex-shrink-0 relative flex items-center justify-center ${j.highlight?"bg-gradient-to-br from-blue-500 to-purple-500 text-white":"bg-gray-50 dark:bg-gray-900 text-gray-700 dark:text-gray-300"} ${r?"p-1.5 sm:p-2 text-[10px] sm:text-[11px]":"p-4 text-sm"}`,style:{width:`${a[N+1]}px`,minWidth:`${a[N+1]}px`,maxWidth:`${a[N+1]}px`,wordWrap:"break-word",overflowWrap:"break-word"},children:[l.jsx("span",{className:"whitespace-normal break-words word-break break-all text-center",children:j.name}),!r&&l.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-blue-500 transition-colors group",onMouseDown:S=>y(S,N+1),children:l.jsx(M3,{className:`w-4 h-4 ${j.highlight?"text-white/50 group-hover:text-white":"text-gray-400 group-hover:text-blue-500"} absolute top-1/2 right-0 transform -translate-y-1/2 -translate-x-1/2`})})]},N))]}),l.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:h.map((j,N)=>l.jsxs("div",{onMouseEnter:()=>!r&&t(N),onMouseLeave:()=>!r&&t(null),className:`flex transition-all duration-300 ${e===N&&!r?"bg-blue-50 dark:bg-blue-900/10 shadow-lg scale-[1.01]":""}`,children:[l.jsx("div",{className:`font-semibold text-gray-800 dark:text-gray-200 flex items-start border-r border-gray-200 dark:border-gray-700 flex-shrink-0 ${r?"p-1.5 sm:p-2 text-[10px] sm:text-[11px] leading-tight":"p-4 text-sm"}`,style:{width:`${a[0]}px`,minWidth:`${a[0]}px`,maxWidth:`${a[0]}px`,wordWrap:"break-word",overflowWrap:"break-word"},children:l.jsx("span",{className:"break-words whitespace-normal word-break break-all",children:j.name})}),j.values.map((S,P)=>l.jsx("div",{className:`transition-all duration-300 flex-shrink-0 flex items-start ${d[P].highlight?"bg-blue-50/50 dark:bg-blue-900/20 border-r-2 border-l-2 border-blue-200 dark:border-blue-700":""} ${v(j.statuses[P])} ${r?"p-1.5 sm:p-2":"p-4"}`,style:{width:`${a[P+1]}px`,minWidth:`${a[P+1]}px`,maxWidth:`${a[P+1]}px`,wordWrap:"break-word",overflowWrap:"break-word"},children:l.jsxs("div",{className:`flex items-start w-full ${r?"gap-1":"gap-1.5 sm:gap-2"}`,children:[l.jsx("div",{className:`flex-shrink-0 ${r?"mt-0":"mt-0.5"}`,children:x(j.statuses[P],r)}),l.jsx("span",{className:`text-gray-700 dark:text-gray-300 break-words whitespace-normal word-break break-all flex-1 ${r?"text-[10px] sm:text-[11px] leading-tight":"text-sm leading-relaxed"}`,children:S})]})},P))]},N))})]})}),l.jsxs("div",{className:"mt-3 sm:mt-4 md:mt-6 lg:mt-8 text-center p-4 sm:p-6 bg-gradient-to-r from-blue-500 to-purple-500 rounded-lg sm:rounded-xl shadow-lg transition-all duration-300 hover:shadow-2xl hover:scale-[1.01] sm:hover:scale-[1.02]",children:[l.jsx("h3",{className:"text-xl sm:text-2xl font-bold text-white mb-2",children:"Ready to get started?"}),l.jsx("p",{className:"text-sm sm:text-base text-blue-100 mb-3 sm:mb-4 px-2",children:"Join thousands using All in1 url for their professional links"}),l.jsx("button",{className:"px-6 sm:px-8 py-2.5 sm:py-3 bg-white text-blue-600 font-bold rounded-lg hover:bg-gray-100 transition-all duration-200 hover:scale-105 shadow-lg text-sm sm:text-base",children:"Get Started Free"})]})]})})},vh=({children:e,className:t="",intensity:r=.3})=>{const n=m.useRef(null),[a,i]=m.useState({x:0,y:0}),o=c=>{if(!n.current)return;const u=n.current.getBoundingClientRect(),d=u.left+u.width/2,f=u.top+u.height/2,p=(c.clientX-d)/(u.width/2),h=(c.clientY-f)/(u.height/2);i({x:h*r,y:-p*r})},s=()=>{i({x:0,y:0})};return l.jsx(k.div,{ref:n,className:t,onMouseMove:o,onMouseLeave:s,animate:{rotateX:a.x,rotateY:a.y},transition:{type:"spring",stiffness:150,damping:30,mass:.5},style:{transformStyle:"preserve-3d",perspective:"1000px",willChange:"transform",backfaceVisibility:"hidden"},children:e})},xW=()=>{const e=Ht();Vr();const t=we(g=>g.admin.isAuthenticated),[r,n]=m.useState({x:0,y:0}),a=m.useRef(null),i=m.useRef({x:0,y:0});m.useEffect(()=>{let g=null,x=0;const v=16,y=b=>{i.current={x:b.clientX/window.innerWidth*100,y:b.clientY/window.innerHeight*100};const w=Date.now();if(w-x{n({x:i.current.x,y:i.current.y}),g=null}));return}x=w,n({x:i.current.x,y:i.current.y})};return window.addEventListener("mousemove",y,{passive:!0}),()=>{window.removeEventListener("mousemove",y),g!==null&&(cancelAnimationFrame(g),g=null)}},[]);const o=[{text:"Transform",className:"text-5xl md:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 dark:from-purple-400 dark:via-pink-400 dark:to-blue-400"},{text:"Your",className:"text-5xl md:text-7xl font-extrabold text-gray-800 dark:text-gray-200"},{text:"Social",className:"text-5xl md:text-7xl font-extrabold text-gray-800 dark:text-gray-200"},{text:"Presence",className:"text-5xl md:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 dark:from-blue-400 dark:via-purple-400 dark:to-pink-400"}],s=["LinkedIn","GitHub","Instagram","Portfolio","YouTube","Twitter"],c=["linkedin","github","leetcode","portfolio","instagram","codeforce"],u=[{title:"Job Seekers",desc:"Create professional links for your resume, LinkedIn, portfolio, and GitHub. Share one memorable link with recruiters. Track which platforms recruiters visit most with detailed analytics including location, device, browser, and referrer insights to optimize your job search strategy.",icon:Qx,gradient:"from-blue-500 to-cyan-500",examples:["Resume sharing","Interview preparation","Professional networking"]},{title:"Content Creators",desc:"Manage all your social media profiles from one place. Share your All in1 url link in bio and watch engagement grow. Track which platforms drive the most traffic with comprehensive analytics including device, browser, OS, and referrer insights.",icon:W0,gradient:"from-purple-500 to-pink-500",examples:["Instagram bio links","YouTube descriptions","TikTok profiles"]},{title:"Developers",desc:"Showcase your GitHub, portfolio, blog, and coding profiles. Perfect for developer portfolios and tech resumes. Analyze click patterns with detailed analytics including hourly distribution, day-of-week analysis, and referrer tracking to optimize your professional presence.",icon:Tc,gradient:"from-green-500 to-emerald-500",examples:["Portfolio websites","GitHub profiles","Tech blogs"]},{title:"Students",desc:"Share academic profiles, LinkedIn, research papers, and project portfolios. Great for college applications and networking.",icon:e1,gradient:"from-orange-500 to-red-500",examples:["College applications","Academic networking","Project showcases"]},{title:"Businesses",desc:"Create branded links for your company's social media presence. Manage multiple team member profiles efficiently.",icon:Po,gradient:"from-indigo-500 to-purple-500",examples:["Team profiles","Brand consistency","Social media management"]},{title:"Freelancers",desc:"Consolidate your work samples, client testimonials, and contact information in one professional link.",icon:Mr,gradient:"from-pink-500 to-rose-500",examples:["Client proposals","Portfolio sharing","Service showcases"]}],d=[{step:"1",title:"Create an Account",desc:"Sign up using your email and create an account on All in1 url.",icon:Mr},{step:"2",title:"Choose a Username",desc:"Pick a username that's easy to remember (e.g., dpkrn). Your link will follow this format: https://your-username.allin1url.in/instagram.",icon:Ge},{step:"3",title:"Verify Your Account",desc:"Complete email verification to activate your account.",icon:fr},{step:"4",title:"Create a New Link",desc:"Enter the platform name (e.g., Instagram, LinkedIn) in lowercase. Paste your profile URL in the 'Destination URL' field. Click 'Create Link' to generate your personalized link.",icon:_s},{step:"5",title:"Share the Link",desc:"Copy and share your smart link across various platforms. Share your hub link (https://yourname.allin1url.in) to let visitors see all your profiles in one place.",icon:xs},{step:"6",title:"Get Real-Time Notifications",desc:"Receive instant email notifications every time someone visits your links. Customize notification preferences (link clicks, profile views, weekly reports) to stay informed about engagement in real-time.",icon:No},{step:"7",title:"Analyze with Advanced Analytics",desc:"Track clicks, profile visits, location, devices, browsers, operating systems, referrers, hourly patterns, and day-of-week analysis. Use multiple chart types with customizable time ranges to understand your audience and optimize your strategy.",icon:st}],f=[{name:"LinkedIn",icon:l.jsx(uW,{}),color:"text-blue-600"},{name:"GitHub",icon:l.jsx(sW,{}),color:"text-gray-800 dark:text-gray-200"},{name:"Instagram",icon:l.jsx(lW,{}),color:"text-pink-600"},{name:"Facebook",icon:l.jsx(oW,{}),color:"text-blue-700"},{name:"LeetCode",icon:l.jsx(cW,{}),color:"text-orange-600"},{name:"YouTube",icon:l.jsx(fW,{}),color:"text-red-600"},{name:"Twitter",icon:l.jsx(dW,{}),color:"text-blue-400"}],p=[{value:1e4,suffix:"+",label:"Active Users",icon:l.jsx(Po,{})},{value:5e4,suffix:"+",label:"Links Created",icon:l.jsx(Ge,{})},{value:1e6,suffix:"+",label:"Clicks Tracked",icon:l.jsx(st,{})},{value:99,suffix:"%",label:"Uptime",icon:l.jsx(Jx,{})}],h=[{icon:Ge,title:"Personalized Smart Links",description:"Generate easy-to-remember links for your social profiles using your username and platform names.",color:"from-blue-500 to-cyan-500",delay:.1},{icon:Ds,title:"All Links at One Place",description:"Access all your profiles with a single hub link. Visit your domain (without any platform name) to see all your links in one beautiful, organized page.",color:"from-violet-500 to-purple-500",delay:.2},{icon:xs,title:"Centralized Link Management",description:"Update your social profile links in one place, and the change reflects everywhere. No more hunting down old links across multiple platforms.",color:"from-green-500 to-emerald-500",delay:.3},{icon:No,title:"Real-Time Email Notifications",description:"Get instant email notifications every time someone visits your links. Customize notification preferences (link clicks, profile views, weekly reports) to stay informed about engagement in real-time.",color:"from-cyan-500 to-blue-500",delay:.4},{icon:Ic,title:"Your Own Domain",description:"After registering, you'll get your own personalized domain to manage all your links. Your domain will reflect your brand identity and make your links more professional and memorable.",color:"from-teal-500 to-cyan-500",delay:.5},{icon:st,title:"Advanced Analytics Dashboard",description:"Comprehensive analytics with detailed insights. Track clicks, profile visits, location (country-level), devices (Desktop/Mobile/Tablet), browsers (Chrome/Safari/Firefox/Edge), operating systems (Windows/macOS/Linux/iOS/Android), referrers (Direct/Search/Social/Internal/External), hourly patterns, day-of-week analysis, platform performance, and link-based metrics. Multiple chart types (Line, Bar, Area, Pie) with customizable time ranges (7d, 30d, 90d, 1y, all time). Summary cards with key metrics and full dark/light theme support.",color:"from-blue-500 to-cyan-500",delay:.6},{icon:_s,title:"Responsive & Mobile-Optimized",description:"Fully responsive design with adaptive text sizing that works perfectly on all devices. Mobile-optimized layouts with single-row URL inputs, touch-friendly interfaces, and seamless dark/light theme support across all screen sizes.",color:"from-purple-500 to-pink-500",delay:.7},{icon:bi,title:"Enterprise-Grade Security",description:"JWT-based authentication with bcrypt password hashing, HTTPS encryption, Helmet.js security headers, CORS protection, secure cookie-based sessions, and password-protected private links. Your data is encrypted in transit and at rest with comprehensive privacy controls and granular visibility settings.",color:"from-indigo-500 to-purple-500",delay:.8}];return l.jsxs("div",{className:"min-h-screen w-full overflow-hidden bg-gradient-to-br from-slate-50 via-blue-50 to-purple-50 dark:from-slate-900 dark:via-purple-900 dark:to-slate-900",children:[l.jsx(pW,{words:o,flipWords:s,description:"All in1 url transforms your social media presence with memorable, personalized URLs by providing your own FREE domain that will reflect your brand identity",highlightText:"One link to rule them all. Update once, reflect everywhere.",ctaText:"Get Started Free",secondaryCtaText:"Learn More",platforms:f,mousePosition:r,isAuthenticated:t}),l.jsx("section",{className:"py-8 sm:py-12 md:py-16 lg:py-20 px-4 sm:px-6 lg:px-8",children:l.jsxs("div",{className:"container mx-auto max-w-3xl",children:[l.jsx("h2",{className:"text-xl sm:text-2xl md:text-3xl lg:text-4xl xl:text-5xl font-bold text-center mb-3 sm:mb-4 md:mb-6 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent px-4",children:"Have You Ever Wondered How Link Has Been Personalized:"}),l.jsx(vh,{intensity:.15,children:l.jsxs("div",{className:"relative bg-gradient-to-br from-slate-800/95 via-slate-700/95 to-slate-800/95 dark:from-slate-900/95 dark:via-slate-800/95 dark:to-slate-900/95 backdrop-blur-xl rounded-xl md:rounded-2xl shadow-2xl border border-purple-500/20 dark:border-purple-400/20 p-4 md:p-5 lg:p-6 overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-500/10 via-pink-500/10 to-blue-500/10 opacity-40"}),[...Array(8)].map((g,x)=>l.jsx("div",{className:"absolute w-1 h-1 rounded-full bg-purple-400/40",style:{left:`${10+x*7}%`,top:`${15+x%4*25}%`}},x)),l.jsxs("div",{className:"relative z-10",children:[l.jsx("div",{className:"absolute top-0 right-0 px-2 sm:px-3",children:l.jsxs("span",{className:"text-xs sm:text-xs md:text-sm font-bold text-gray-600 dark:text-gray-400",children:["Example username: ",l.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:"dpkrn"})]})}),l.jsxs("div",{className:"mb-4 pb-3 border-b border-purple-500/30 dark:border-purple-400/30",children:[l.jsx("p",{className:"text-xs sm:text-xs md:text-sm text-gray-400 dark:text-gray-500 mb-1.5 font-semibold uppercase tracking-wider",children:"Base URL (Same for All):"}),l.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 flex-wrap",children:[l.jsxs("a",{href:"https://dpkrn.allin1url.in/",target:"_blank",rel:"noopener noreferrer",className:"text-xs sm:text-xs md:text-sm lg:text-base font-mono font-bold text-purple-300 dark:text-purple-200 bg-purple-500/20 dark:bg-purple-500/30 px-1.5 sm:px-2 py-0.5 sm:py-1 rounded-lg border border-purple-400/30 hover:bg-purple-500/30 dark:hover:bg-purple-500/40 hover:border-purple-400/50 transition-all duration-300 inline-block break-all",children:["https://",l.jsx("span",{className:"font-bold text-purple-200 dark:text-purple-100 bg-purple-400/20 dark:bg-purple-400/30 px-0.5 sm:px-1 rounded",children:"dpkrn"}),".allin1url.in/"]}),l.jsx("span",{className:"text-xs sm:text-xs md:text-sm text-gray-400 dark:text-gray-500 italic",children:"(accessible for all generated link at one place)"}),l.jsx("span",{className:"text-sm sm:text-base md:text-lg",children:"⬇️"})]})]}),l.jsx("div",{className:"space-y-1.5 md:space-y-2",children:[{platform:"LinkedIn",url:"https://dpkrn.allin1url.in/linkedin",color:"from-blue-500 to-cyan-500"},{platform:"GitHub",url:"https://dpkrn.allin1url.in/github",color:"from-gray-400 to-gray-600"},{platform:"LeetCode",url:"https://dpkrn.allin1url.in/leetcode",color:"from-orange-500 to-yellow-500"},{platform:"Portfolio",url:"https://dpkrn.allin1url.in/portfolio",color:"from-purple-500 to-pink-500"},{platform:"Instagram",url:"https://dpkrn.allin1url.in/instagram",color:"from-pink-500 to-rose-500"},{platform:"Facebook",url:"https://dpkrn.allin1url.in/facebook",color:"from-blue-600 to-blue-700"},{platform:"Codeforces",url:"https://dpkrn.allin1url.in/codeforces",color:"from-red-500 to-orange-500"}].map((g,x)=>l.jsxs("div",{className:"group relative",children:[l.jsx(k.div,{className:`absolute -inset-1 bg-gradient-to-r ${g.color} opacity-0 group-hover:opacity-20 blur-md rounded-lg transition-opacity duration-300`}),l.jsxs("div",{className:"relative flex items-center gap-2 p-2 bg-slate-700/50 dark:bg-slate-800/50 rounded-lg border border-slate-600/50 dark:border-slate-700/50 backdrop-blur-sm group-hover:border-purple-400/50 transition-all duration-300",children:[l.jsx(k.div,{className:"flex-shrink-0 w-16 sm:w-20 md:w-24",whileHover:{scale:1.1},children:l.jsxs("span",{className:"text-xs sm:text-xs md:text-sm font-semibold text-gray-300 dark:text-gray-400",children:[g.platform,":"]})}),l.jsxs("div",{className:"flex items-center font-mono flex-wrap gap-0.5 sm:gap-1",children:[l.jsxs("span",{className:"text-xs sm:text-xs md:text-sm lg:text-base text-gray-400 dark:text-gray-500 select-all break-all",children:["https://",l.jsx("span",{className:"font-bold text-purple-400 dark:text-purple-300 bg-purple-500/10 dark:bg-purple-500/20 px-0.5 sm:px-1 rounded",children:"dpkrn"}),".allin1url.in/"]}),l.jsx(k.a,{href:g.url,target:"_blank",rel:"noopener noreferrer",className:`text-xs sm:text-xs md:text-sm lg:text-base font-bold bg-gradient-to-r ${g.color} bg-clip-text text-transparent hover:scale-110 transition-transform duration-300 inline-block`,whileHover:{scale:1.15},whileTap:{scale:.95},children:g.platform.toLowerCase()})]}),l.jsx("div",{className:"ml-auto opacity-0 group-hover:opacity-100 transition-opacity",children:l.jsx("span",{className:"text-purple-400",children:"→"})})]})]},g.platform))}),l.jsx("div",{className:"mt-5 pt-4 border-t border-purple-500/30 dark:border-purple-400/30",children:l.jsx("div",{className:"flex flex-col items-center justify-center gap-2",children:l.jsxs("div",{className:"flex items-center justify-center gap-2",children:[l.jsx("span",{className:"text-lg",children:"✨"}),l.jsx("a",{href:"/login",onClick:g=>{g.preventDefault(),e("/login")},className:"text-center text-sm md:text-base text-purple-300 dark:text-purple-200 font-bold hover:text-purple-200 dark:hover:text-purple-100 transition-colors underline decoration-2 underline-offset-3 decoration-purple-400/50 hover:decoration-purple-400",children:"You can create your own links: click here to start"}),l.jsx("span",{className:"text-lg",children:"✨"})]})})})]})]})})]})}),l.jsx("section",{className:"py-8 sm:py-12 md:py-16 lg:py-20 px-4 sm:px-6 lg:px-8",children:l.jsx("div",{className:"container mx-auto",children:l.jsx(vh,{intensity:.1,children:l.jsx("div",{className:"relative bg-gradient-to-br from-purple-900/40 via-pink-900/40 to-blue-900/40 dark:from-purple-950/60 dark:via-pink-950/60 dark:to-blue-950/60 backdrop-blur-xl rounded-xl sm:rounded-2xl md:rounded-3xl shadow-2xl border border-purple-500/30 dark:border-purple-400/20 p-4 sm:p-5 md:p-6 lg:p-8 overflow-hidden",children:l.jsxs("div",{className:"relative z-10 text-center",children:[l.jsxs("div",{className:"flex items-center justify-center gap-2 mb-3 sm:mb-4",children:[l.jsx("span",{className:"text-2xl md:text-3xl",children:"✨"}),l.jsx("h3",{className:"text-xl md:text-2xl font-bold bg-gradient-to-r from-purple-300 via-pink-300 to-blue-300 dark:from-purple-200 dark:via-pink-200 dark:to-blue-200 bg-clip-text text-transparent",children:"Only the platform name changes"}),l.jsx("span",{className:"text-2xl md:text-3xl",children:"✨"})]}),l.jsx("p",{className:"text-base md:text-lg text-gray-200 dark:text-gray-300 font-medium",children:"All else remains the same"})]})})})})}),l.jsx("section",{className:"py-8 sm:py-12 md:py-16 lg:py-20 px-4 sm:px-6 lg:px-8 bg-black/5 dark:bg-black/20",children:l.jsx("div",{className:"container mx-auto",children:l.jsx(vh,{intensity:.1,children:l.jsx("div",{className:"relative bg-black dark:bg-black backdrop-blur-xl rounded-xl sm:rounded-2xl md:rounded-3xl shadow-2xl border border-gray-900 dark:border-gray-800 p-4 sm:p-5 md:p-6 lg:p-8 xl:p-10 overflow-hidden",children:l.jsxs("div",{className:"relative z-10 space-y-3 sm:space-y-4 md:space-y-5 lg:space-y-6",children:[l.jsx("div",{className:"text-center",children:l.jsx("div",{className:"relative bg-clip-text text-transparent bg-no-repeat bg-gradient-to-r from-purple-400 via-violet-200 to-pink-500 dark:from-purple-300 dark:via-violet-100 dark:to-pink-400 py-2 md:py-4",children:l.jsx("span",{className:"uppercase text-sm md:text-base lg:text-xl font-bold block",children:"It will provide a special link for all your platforms."})})}),l.jsx("p",{className:"text-base md:text-lg lg:text-2xl xl:text-3xl text-center",children:l.jsxs("a",{href:"https://dpkrn.allin1url.in/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 dark:text-blue-300 underline font-mono hover:text-blue-300 dark:hover:text-blue-200 transition-colors break-all md:break-normal",children:["https://",l.jsx("span",{className:"font-bold text-purple-400 dark:text-purple-300 bg-purple-500/10 dark:bg-purple-500/20 px-1 rounded",children:"dpkrn"}),".allin1url.in"]})}),l.jsx("div",{className:"text-center",children:l.jsx("div",{className:"relative bg-clip-text text-transparent bg-no-repeat bg-gradient-to-r from-purple-400 via-violet-200 to-pink-500 dark:from-purple-300 dark:via-violet-100 dark:to-pink-400 py-2 md:py-4",children:l.jsx("span",{className:"uppercase text-sm md:text-base lg:text-xl font-bold block",children:"Change only the platform name to redirect to all profiles"})})}),l.jsx("div",{className:"text-base md:text-lg lg:text-2xl xl:text-3xl text-center",children:l.jsxs("a",{href:"https://dpkrn.allin1url.in/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 dark:text-blue-300 underline font-mono hover:text-blue-300 dark:hover:text-blue-200 transition-colors break-all md:break-normal",children:["https://",l.jsx("span",{className:"font-bold text-purple-400 dark:text-purple-300 bg-purple-500/10 dark:bg-purple-500/20 px-1 rounded",children:"dpkrn"}),".allin1url.in/",l.jsx(n1,{duration:100,className:"text-blue-400 dark:text-blue-300",words:c})]})})]})})})})}),l.jsx("section",{className:"py-8 sm:py-12 md:py-16 lg:py-20 px-4 sm:px-6 lg:px-8",children:l.jsxs("div",{className:"container mx-auto",children:[l.jsx("h2",{className:"text-4xl md:text-5xl lg:text-6xl font-extrabold mb-4 sm:mb-5 md:mb-6 lg:mb-8 text-center bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Perfect for Everyone"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-5 md:gap-6 lg:gap-8",children:u.map((g,x)=>{const v=g.icon;return l.jsxs("div",{className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-8 relative overflow-hidden group",children:[l.jsx(k.div,{className:`absolute inset-0 bg-gradient-to-r ${g.gradient} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsxs("div",{className:"relative z-10",children:[l.jsx(k.div,{className:`bg-gradient-to-r ${g.gradient} p-3 sm:p-4 rounded-xl w-fit mb-3 sm:mb-4`,whileHover:{scale:1.1,rotate:5},children:l.jsx(v,{className:"text-2xl sm:text-3xl text-white"})}),l.jsx("h3",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-2 sm:mb-3",children:g.title}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed mb-3 sm:mb-4",children:g.desc}),l.jsx("div",{className:"space-y-2",children:g.examples.map((y,b)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-700 dark:text-gray-400",children:[l.jsx(fr,{className:"text-green-600 dark:text-green-400 text-xs"}),l.jsx("span",{children:y})]},b))})]})]},g.title)})})]})}),l.jsx(mW,{features:h,title:"Powerful Features",subtitle:"Everything you need to manage your social presence in one place",layout:"grid"}),l.jsx("section",{className:"pt-8 sm:pt-12 md:pt-16 lg:pt-20 pb-2 sm:pb-4 md:pb-6 lg:pb-8 px-4 sm:px-6 lg:px-8 bg-gradient-to-br from-blue-50/80 via-purple-50/80 to-pink-50/80 dark:from-slate-900/60 dark:via-purple-950/40 dark:to-pink-950/40",children:l.jsx(vW,{})}),l.jsx("section",{className:"pt-2 sm:pt-4 md:pt-6 lg:pt-8 pb-8 sm:pb-12 md:pb-16 lg:pb-20 px-4 sm:px-6 lg:px-8 bg-gradient-to-br from-blue-50/80 via-purple-50/80 to-pink-50/80 dark:from-slate-900/60 dark:via-purple-950/40 dark:to-pink-950/40",children:l.jsx("div",{className:"container mx-auto",children:l.jsxs("div",{className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-10 lg:p-12",children:[l.jsx("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-4 md:mb-6 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"How It Works"}),l.jsxs("p",{className:"text-base md:text-lg lg:text-xl leading-8 text-gray-700 dark:text-gray-300 mb-3 sm:mb-4 md:mb-6",children:["The core idea behind"," ",l.jsx("b",{className:"text-gray-900 dark:text-white",children:"All in1 url"})," is to simplify the management of social media links. Instead of sharing long, hard-to-remember URLs, you create a single, personalized URL that automatically redirects users to the correct platform. Access all your links at one place by visiting"," ",l.jsxs("b",{className:"text-gray-900 dark:text-white",children:["https://",l.jsx("span",{className:"font-bold text-purple-600 dark:text-purple-400",children:"yourname"}),".allin1url.in"]})," ","(without any platform name). Plus, get real-time email notifications every time someone visits your links! Analyze your audience with comprehensive analytics including device, browser, OS, referrer, and temporal patterns to optimize your strategy."]}),l.jsx("div",{className:"space-y-4 sm:space-y-5 md:space-y-6",children:d.map((g,x)=>{const v=g.icon;return l.jsxs("div",{className:"flex items-start gap-3 sm:gap-4 p-4 sm:p-5 md:p-6 bg-white/5 dark:bg-gray-800/30 rounded-xl sm:rounded-2xl border border-white/10 hover:border-white/20 transition-all group",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-purple-600 to-pink-600 p-3 sm:p-4 rounded-xl flex-shrink-0",whileHover:{scale:1.1,rotate:5},children:l.jsx(v,{className:"text-xl sm:text-2xl text-white"})}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("h4",{className:"text-lg sm:text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-1.5 sm:mb-2",children:[g.step,". ",g.title]}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400 leading-relaxed",children:g.desc})]})]},g.step)})}),l.jsxs("div",{className:"mt-4 sm:mt-6 md:mt-8 p-4 sm:p-5 md:p-6 bg-white/5 dark:bg-gray-800/30 rounded-xl sm:rounded-2xl border border-white/10",children:[l.jsx("p",{className:"text-base sm:text-lg font-semibold text-gray-900 dark:text-white mb-3 sm:mb-4",children:"Example:"}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("a",{href:"https://dpkrn.allin1url.in/instagram",target:"_blank",rel:"noopener noreferrer",className:"block text-blue-400 hover:text-blue-300 underline font-mono text-base md:text-lg",children:["Instagram: https://",l.jsx("span",{className:"font-bold text-purple-400 dark:text-purple-300 bg-purple-500/10 dark:bg-purple-500/20 px-1 rounded",children:"dpkrn"}),".allin1url.in/instagram"]}),l.jsxs("a",{href:"https://dpkrn.allin1url.in/leetcode",target:"_blank",rel:"noopener noreferrer",className:"block text-blue-400 hover:text-blue-300 underline font-mono text-base md:text-lg",children:["LeetCode: https://",l.jsx("span",{className:"font-bold text-purple-400 dark:text-purple-300 bg-purple-500/10 dark:bg-purple-500/20 px-1 rounded",children:"dpkrn"}),".allin1url.in/leetcode"]})]})]})]})})}),l.jsx(gW,{stats:p,title:"Trusted by Thousands",subtitle:"Join the community of professionals, creators, and developers",sectionRef:a}),l.jsx(yW,{title:"Ready to Transform Your Links?",subtitle:"Join thousands of professionals who trust All in1 url. Get your own domain FREE to manage your links and reflect your brand identity professionally.",ctaText:"Get Started Now"}),l.jsx(Mi,{})]})},bW=()=>{const[e,t]=m.useState(""),[r,n]=m.useState(""),[a,i]=m.useState(""),[o,s]=m.useState(""),[c,u]=m.useState("profile.png"),[d,f]=m.useState(!1),[p,h]=m.useState(!1),[g,x]=m.useState(!1),[v,y]=m.useState(!1),[b,w]=m.useState({x:0,y:0}),j=m.useRef(null),N=Ht(),{username:S}=we(I=>I.admin.user),P=we(I=>I.admin.links)||[];m.useEffect(()=>{const I=B=>{w({x:B.clientX/window.innerWidth*100,y:B.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",I,{passive:!0}),()=>window.removeEventListener("mousemove",I)},[]);const C=async()=>{var I,B;if(d)try{x(!0);const V=await be.post("/profile/update",{username:S,name:e,passion:r,location:a,bio:o},{withCredentials:!0});V.status===201&&V.data.success&&(J.success(V.data.msg),f(!1))}catch(V){const O=((B=(I=V.response)==null?void 0:I.data)==null?void 0:B.msg)||"Server internal error!";J.error(O)}finally{x(!1)}else f(!0)},M=m.useCallback(async()=>{var I,B;try{const V=await be.post("/profile/getprofileinfo",{username:S},{withCredentials:!0});if(V.status===200&&V.data.success){const{name:O,location:R,bio:U,passion:q,image:ee}=V.data.userinfo;t(O||""),i(R||""),s(U||""),n(q||""),u(ee||"profile.png")}}catch(V){const O=((B=(I=V.response)==null?void 0:I.data)==null?void 0:B.msg)||"Server error";J.error(O)}},[S]),T=()=>{f(!1),S&&M()},A=()=>{var I;(I=j.current)==null||I.click()},E=async I=>{var B,V;I.preventDefault();try{const O=I.target.files[0];if(O){if(!["image/jpeg","image/jpg","image/png","image/svg+xml","image/webp"].includes(O.type)){J.error("Please select a valid image file (JPG, PNG, SVG, or WEBP)");return}if(O.size>5*1024*1024){J.error("Image size should be less than 5MB");return}const U=new FileReader;U.readAsDataURL(O),U.onloadend=async()=>{var q,ee;y(!0);try{const oe=await be.post("/profile/updatepic",{username:S,image:U.result},{withCredentials:!0});oe.status===201&&oe.data.success?(u(oe.data.resImage),J.success("Image updated successfully!")):J.error("Something went wrong! Please try again.")}catch(oe){const D=((ee=(q=oe.response)==null?void 0:q.data)==null?void 0:ee.msg)||"Server error";J.error(D)}finally{y(!1)}},U.onerror=q=>{console.log("Image error:",q),J.error("Failed to read image file"),y(!1)}}}catch(O){const R=((V=(B=O.response)==null?void 0:B.data)==null?void 0:V.msg)||"Server error";J.error(R),y(!1)}};m.useEffect(()=>{S&&M()},[S,M]);const _={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},L={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5}}};return l.jsxs("div",{className:"w-full overflow-hidden relative min-h-screen","data-profile-page":!0,children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/20 rounded-full blur-3xl",animate:{x:b.x*.5-200,y:b.y*.5-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/20 rounded-full blur-3xl",animate:{x:b.x*.3-200,y:b.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-blue-500/20 rounded-full blur-3xl",animate:{x:b.x*.7-200,y:b.y*.7-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_110%)]"})]}),l.jsx("div",{className:"relative z-10 py-8 md:py-12 px-4 sm:px-6 md:px-10 lg:px-12",children:l.jsx(k.div,{variants:_,initial:"hidden",animate:"visible",className:"max-w-4xl mx-auto",children:l.jsxs(k.div,{variants:L,className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-10 lg:p-12",children:[l.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"flex items-center gap-4 mb-8",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-purple-600 to-pink-600 p-4 rounded-xl",whileHover:{scale:1.1,rotate:5},children:l.jsx(ia,{className:"text-3xl text-white"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 dark:from-purple-400 dark:via-pink-400 dark:to-blue-400 bg-clip-text text-transparent",children:"Profile Settings"}),l.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm md:text-base mt-1",children:"Manage your profile information and preferences"})]})]}),l.jsx(Ue,{children:d&&l.jsxs(k.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"bg-blue-100/80 dark:bg-blue-900/30 border border-blue-300/50 dark:border-blue-600/50 rounded-2xl p-4 flex items-center gap-3 mb-6",children:[l.jsx(fr,{className:"text-blue-600 dark:text-blue-400 text-xl flex-shrink-0"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-blue-700 dark:text-blue-200 font-semibold",children:"Edit Mode Active"}),l.jsx("p",{className:"text-blue-600/80 dark:text-blue-300/80 text-sm",children:"Make your changes and click Save when done"})]})]})}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[l.jsxs(k.div,{variants:L,className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsxs(k.div,{className:"relative group cursor-pointer",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:A,whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:300},children:[l.jsxs("div",{className:"relative rounded-full w-40 h-40 border-4 border-purple-500/30 dark:border-purple-400/30 overflow-hidden shadow-2xl",children:[l.jsx("img",{src:c,alt:"Profile",className:"rounded-full w-40 h-40 object-cover",onError:I=>{I.target.src="profile.png"}}),l.jsx(Ue,{children:p&&!v&&l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 flex items-center justify-center bg-black/60 backdrop-blur-sm rounded-full pointer-events-none",children:l.jsx(k.div,{initial:{scale:.8},animate:{scale:1},whileHover:{scale:1.2,rotate:5},children:l.jsx(EU,{className:"text-4xl text-white"})})})}),l.jsx(Ue,{children:v&&l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 flex items-center justify-center bg-black/60 backdrop-blur-sm rounded-full",children:l.jsxs("svg",{className:"animate-spin h-10 w-10 text-white",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})})]}),l.jsx("input",{type:"file",className:"hidden",onChange:E,name:"profile-image",accept:"image/jpeg,image/jpg,image/png,image/svg+xml,image/webp",ref:j})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-4 text-center",children:"Click on the image to change your profile picture"})]}),l.jsxs(k.div,{variants:L,className:"text-center p-4 bg-gradient-to-r from-purple-600/10 via-pink-600/10 to-blue-600/10 rounded-2xl border border-purple-400/20",children:[l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-1",children:"Username"}),l.jsxs("p",{className:"text-xl font-bold text-gray-800 dark:text-white",children:["@",S]})]})]}),l.jsxs(k.div,{variants:L,className:"space-y-6",children:[l.jsxs(k.div,{variants:L,className:"space-y-2",children:[l.jsxs("label",{className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 font-semibold text-lg",children:[l.jsx(ia,{className:"text-purple-600 dark:text-purple-400"}),"Full Name"]}),l.jsxs("div",{className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 group-focus-within:text-purple-600 dark:group-focus-within:text-purple-400 transition-colors z-10",children:l.jsx(ia,{className:"w-5 h-5"})}),l.jsx("input",{type:"text",placeholder:"Enter your full name",value:e,disabled:!d,onChange:I=>t(I.target.value),className:"w-full pl-12 pr-4 py-4 bg-white/90 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700 rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm disabled:opacity-50 disabled:cursor-not-allowed"})]})]}),l.jsxs(k.div,{variants:L,className:"space-y-2",children:[l.jsxs("label",{className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 font-semibold text-lg",children:[l.jsx(ci,{className:"text-blue-600 dark:text-blue-400"}),"Location"]}),l.jsxs("div",{className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 group-focus-within:text-blue-600 dark:group-focus-within:text-blue-400 transition-colors z-10",children:l.jsx(ci,{className:"w-5 h-5"})}),l.jsx("input",{type:"text",placeholder:"Enter your location",value:a,disabled:!d,onChange:I=>i(I.target.value),className:"w-full pl-12 pr-4 py-4 bg-white/90 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700 rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm disabled:opacity-50 disabled:cursor-not-allowed"})]})]}),l.jsxs(k.div,{variants:L,className:"space-y-2",children:[l.jsxs("label",{className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 font-semibold text-lg",children:[l.jsx(V0,{className:"text-pink-600 dark:text-pink-400"}),"Passion"]}),l.jsxs("div",{className:"relative group",children:[l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 group-focus-within:text-pink-600 dark:group-focus-within:text-pink-400 transition-colors z-10",children:l.jsx(V0,{className:"w-5 h-5"})}),l.jsx("input",{type:"text",placeholder:"What are you passionate about?",value:r,disabled:!d,onChange:I=>n(I.target.value),className:"w-full pl-12 pr-4 py-4 bg-white/90 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700 rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-pink-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm disabled:opacity-50 disabled:cursor-not-allowed"})]})]}),l.jsxs(k.div,{variants:L,className:"space-y-2",children:[l.jsxs("label",{className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 font-semibold text-lg",children:[l.jsx(Mc,{className:"text-indigo-600 dark:text-indigo-400"}),"Bio"]}),l.jsx("textarea",{placeholder:"Tell us about yourself...",value:o,disabled:!d,onChange:I=>s(I.target.value),rows:"4",className:"w-full px-4 py-4 bg-white/90 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700 rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all duration-300 backdrop-blur-sm disabled:opacity-50 disabled:cursor-not-allowed resize-none"})]})]})]}),l.jsxs(k.div,{variants:L,className:"flex flex-col sm:flex-row gap-4 pt-8 mt-8 border-t border-gray-200/50 dark:border-gray-700/50",children:[l.jsx(k.button,{type:"button",onClick:C,disabled:g,whileHover:{scale:g?1:1.05},whileTap:{scale:g?1:.95},className:`flex-1 py-4 px-8 bg-gradient-to-r ${d?"from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700":"from-purple-600 via-pink-600 to-blue-600 hover:from-purple-700 hover:via-pink-700 hover:to-blue-700"} text-white font-bold rounded-xl shadow-lg hover:shadow-2xl transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-3`,children:g?l.jsxs(l.Fragment,{children:[l.jsxs("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Saving..."]}):l.jsxs(l.Fragment,{children:[d?l.jsx(BU,{}):l.jsx(Mc,{}),d?"Save Changes":"Edit Profile"]})}),d&&l.jsxs(k.button,{type:"button",onClick:T,disabled:g,whileHover:{scale:g?1:1.05},whileTap:{scale:g?1:.95},className:"py-4 px-8 bg-gray-100 dark:bg-gray-800/50 hover:bg-gray-200 dark:hover:bg-gray-700/50 text-gray-700 dark:text-white font-bold rounded-xl border border-gray-300 dark:border-gray-700 transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[l.jsx(xa,{}),"Cancel"]}),!d&&l.jsxs(k.button,{type:"button",onClick:()=>N(`/profile/${S}`),whileHover:{scale:1.05},whileTap:{scale:.95},className:"py-4 px-8 bg-gradient-to-r from-blue-600 to-cyan-600 hover:from-blue-700 hover:to-cyan-700 text-white font-bold rounded-xl shadow-lg hover:shadow-2xl transition-all duration-300 flex items-center justify-center gap-2",title:"Preview how your profile looks to visitors",children:[l.jsx(Lr,{}),"Preview"]})]}),l.jsxs(k.div,{variants:L,className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6",children:[l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl shadow-xl border border-white/20 dark:border-gray-700/50 p-6 text-center",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-blue-500 to-cyan-500 p-4 rounded-xl w-fit mx-auto mb-4",whileHover:{scale:1.1,rotate:5},children:l.jsx(Ge,{className:"text-3xl text-white"})}),l.jsx("h3",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-2",children:P.length}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Total Links"})]}),l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl shadow-xl border border-white/20 dark:border-gray-700/50 p-6 text-center",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-purple-500 to-pink-500 p-4 rounded-xl w-fit mx-auto mb-4",whileHover:{scale:1.1,rotate:5},children:l.jsx(st,{className:"text-3xl text-white"})}),l.jsx("h3",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-2",children:P.reduce((I,B)=>I+(B.clicked||0),0)}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Total Clicks"})]}),l.jsxs(k.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2},whileHover:{scale:1.05,y:-5},className:"bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl shadow-xl border border-white/20 dark:border-gray-700/50 p-6 text-center",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-green-500 to-emerald-500 p-4 rounded-xl w-fit mx-auto mb-4",whileHover:{scale:1.1,rotate:5},children:l.jsx(Ds,{className:"text-3xl text-white"})}),l.jsx("h3",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-2",children:"Live"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Hub Page"})]})]}),l.jsx(k.div,{variants:L,className:"mt-8 bg-gradient-to-r from-purple-600/10 via-pink-600/10 to-blue-600/10 backdrop-blur-sm rounded-2xl border border-purple-400/30 dark:border-purple-600/30 p-6",children:l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-purple-600 to-pink-600 p-3 rounded-xl flex-shrink-0",whileHover:{scale:1.1,rotate:5},children:l.jsx(Lr,{className:"text-2xl text-white"})}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2 flex items-center gap-2",children:[l.jsx(Lr,{className:"text-purple-600 dark:text-purple-400"}),"Public Profile Feature"]}),l.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-3 leading-relaxed",children:"Your profile can be viewed by other users through the search feature. This allows visitors to discover your profile and see your public links when your profile is set to public."}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400",children:[l.jsx(er,{className:"text-gray-500"}),l.jsx("span",{children:"Profile visibility settings"})]})]})]})})]})})})]})},wW=()=>{var y,b,w,j,N,S,P;const{username:e}=WV(),t=Ht(),[r,n]=m.useState(!0),[a,i]=m.useState({x:0,y:0}),[o,s]=m.useState(null),[c,u]=m.useState([]),[d,f]=m.useState(null);m.useEffect(()=>{const C=document.createElement("style");return C.textContent=` + @keyframes edge-glow { + 0%, 100% { + box-shadow: + 0 0 5px rgba(147, 51, 234, 0.4), + 0 0 10px rgba(236, 72, 153, 0.3), + 0 0 15px rgba(59, 130, 246, 0.2), + inset 0 0 5px rgba(147, 51, 234, 0.2); + } + 50% { + box-shadow: + 0 0 15px rgba(147, 51, 234, 0.6), + 0 0 25px rgba(236, 72, 153, 0.5), + 0 0 35px rgba(59, 130, 246, 0.4), + inset 0 0 10px rgba(147, 51, 234, 0.3); + } + } + @keyframes edge-shimmer { + 0% { + background-position: -200% center; + } + 100% { + background-position: 200% center; + } + } + .edge-animated { + position: relative; + transition: all 0.3s ease; + } + .edge-animated::before { + content: ''; + position: absolute; + inset: -2px; + border-radius: inherit; + padding: 2px; + background: linear-gradient( + 90deg, + transparent, + rgba(147, 51, 234, 0.6), + rgba(236, 72, 153, 0.6), + rgba(59, 130, 246, 0.6), + rgba(147, 51, 234, 0.6), + transparent + ); + background-size: 200% 100%; + -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask-composite: exclude; + opacity: 0; + transition: opacity 0.3s ease; + pointer-events: none; + z-index: 0; + } + .edge-animated:hover { + animation: edge-glow 2s ease-in-out infinite; + } + .edge-animated:hover::before { + opacity: 1; + animation: edge-shimmer 2s linear infinite; + } + .dark .edge-animated:hover { + animation: edge-glow 2s ease-in-out infinite; + } + .dark .edge-animated::before { + background: linear-gradient( + 90deg, + transparent, + rgba(168, 85, 247, 0.7), + rgba(244, 114, 182, 0.7), + rgba(96, 165, 250, 0.7), + rgba(168, 85, 247, 0.7), + transparent + ); + background-size: 200% 100%; + } + .edge-animated-always { + animation: edge-glow 2s ease-in-out infinite; + } + .edge-animated-always::before { + opacity: 1; + animation: edge-shimmer 2s linear infinite; + } + .dark .edge-animated-always { + animation: edge-glow 2s ease-in-out infinite; + } + .dark .edge-animated-always::before { + background: linear-gradient( + 90deg, + transparent, + rgba(168, 85, 247, 0.7), + rgba(244, 114, 182, 0.7), + rgba(96, 165, 250, 0.7), + rgba(168, 85, 247, 0.7), + transparent + ); + background-size: 200% 100%; + } + .edge-animated > * { + position: relative; + z-index: 1; + } + `,document.head.appendChild(C),()=>{document.head.contains(C)&&document.head.removeChild(C)}},[]),m.useEffect(()=>{const C=M=>{i({x:M.clientX/window.innerWidth*100,y:M.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",C,{passive:!0}),()=>window.removeEventListener("mousemove",C)},[]),m.useEffect(()=>{e&&p()},[e]);const p=async()=>{var C,M,T,A;try{n(!0);const E=await be.post("/profile/getpublicprofile",{username:e},{withCredentials:!0});E.status===200&&E.data.success?(s(E.data.profile),u(E.data.links||[]),f(E.data.settings)):(J.error(E.data.message||"Profile not found or not public"),t("/home"))}catch(E){const _=((M=(C=E.response)==null?void 0:C.data)==null?void 0:M.message)||"Profile not found";((T=E.response)==null?void 0:T.status)===401?(J.error("Please login to view profiles"),t("/login")):((A=E.response)==null?void 0:A.status)===403?(J.error("Profile is private"),t("/home")):(J.error(_),t("/home"))}finally{n(!1)}},h=C=>{switch(C){case"public":return l.jsx(cr,{className:"text-sm"});case"unlisted":return l.jsx(So,{className:"text-sm"});case"private":return l.jsx(er,{className:"text-sm"});default:return l.jsx(cr,{className:"text-sm"})}},g=C=>{switch(C){case"public":return"from-green-500 to-emerald-500";case"unlisted":return"from-yellow-500 to-orange-500";case"private":return"from-gray-500 to-gray-600";default:return"from-green-500 to-emerald-500"}};if(r)return l.jsx("div",{className:"flex justify-center items-center h-screen bg-white dark:bg-gray-900",children:l.jsxs("div",{className:"relative flex justify-center items-center",children:[l.jsx("div",{className:"absolute animate-spin rounded-full h-32 w-32 border-t-4 border-b-4 border-purple-500 dark:border-purple-400"}),l.jsx("img",{src:"https://www.svgrepo.com/show/509001/avatar-thinking-9.svg",className:"rounded-full h-28 w-28",alt:"Loading"})]})});if(!o)return l.jsxs("div",{className:"flex flex-col justify-center items-center h-screen bg-white dark:bg-gray-900",children:[l.jsx(bi,{className:"text-6xl text-gray-400 dark:text-gray-600 mb-4"}),l.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:"Profile Protected"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"This profile is not available for public viewing."}),l.jsx(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>t("/"),className:"mt-6 px-6 py-3 bg-gradient-to-r from-purple-600 to-pink-600 text-white rounded-xl font-semibold",children:"Go Home"})]});const x={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},v={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5}}};return l.jsxs("div",{className:"w-full overflow-hidden relative min-h-screen dark:bg-gray-900","data-profile-preview":!0,children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/20 dark:bg-purple-500/10 rounded-full blur-3xl",animate:{x:a.x*.5-200,y:a.y*.5-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/20 dark:bg-pink-500/10 rounded-full blur-3xl",animate:{x:a.x*.3-200,y:a.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-blue-500/20 dark:bg-blue-500/10 rounded-full blur-3xl",animate:{x:a.x*.7-200,y:a.y*.7-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_110%)]"})]}),l.jsx("div",{className:"relative z-10 py-8 md:py-12 px-4 sm:px-6 md:px-10 lg:px-12",children:l.jsxs(k.div,{variants:x,initial:"hidden",animate:"visible",className:"max-w-4xl mx-auto",children:[l.jsxs(k.button,{variants:v,onClick:()=>t(-1),whileHover:{scale:1.05,x:-5},whileTap:{scale:.95},className:"mb-6 flex items-center gap-2 text-gray-700 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors",children:[l.jsx(m7,{}),l.jsx("span",{children:"Back"})]}),l.jsxs(k.div,{variants:v,className:"edge-animated edge-animated-always bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-6 md:p-10 lg:p-12 mb-8",children:[l.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-start gap-6 mb-8",children:[l.jsx(k.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15},className:"relative w-32 h-32 md:w-40 md:h-40 rounded-full",children:l.jsxs("div",{className:"w-full h-full rounded-full border-4 border-purple-500/30 dark:border-purple-400/30 overflow-hidden shadow-2xl relative",children:[l.jsx("img",{src:o.image||"profile.png",alt:o.name||e,className:"w-full h-full object-cover",style:{filter:((y=d==null?void 0:d.profile)==null?void 0:y.showProfileImage)===!1?"blur(6px)":"none",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",imageRendering:"auto"},onError:C=>{C.target.src="profile.png"}}),((b=d==null?void 0:d.profile)==null?void 0:b.showProfileImage)===!1&&l.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-full pointer-events-none",style:{background:"rgba(17, 24, 39, 0.2)",transform:"translateZ(0)"},children:l.jsx(er,{className:"text-2xl md:text-3xl text-gray-400 dark:text-gray-500"})})]})}),l.jsxs("div",{className:"flex-1 text-center md:text-left",children:[l.jsx(k.h1,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 dark:from-purple-400 dark:via-pink-400 dark:to-blue-400 bg-clip-text text-transparent mb-2",children:o.name||e}),l.jsxs("p",{className:"text-lg text-gray-700 dark:text-gray-400 mb-4",children:["@",e]}),((w=d==null?void 0:d.profile)==null?void 0:w.showLocation)!==!1&&o.location&&l.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-2 text-gray-700 dark:text-gray-300 mb-2",children:[l.jsx(ci,{className:"text-blue-600 dark:text-blue-400"}),l.jsx("span",{children:o.location})]}),((j=d==null?void 0:d.profile)==null?void 0:j.showPassion)!==!1&&o.passion&&l.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-2 text-gray-700 dark:text-gray-300 mb-2",children:[l.jsx(V0,{className:"text-pink-600 dark:text-pink-400"}),l.jsx("span",{children:o.passion})]}),((N=d==null?void 0:d.profile)==null?void 0:N.showBio)!==!1&&o.bio&&l.jsx("p",{className:"text-gray-700 dark:text-gray-300 mt-4 leading-relaxed",children:o.bio})]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-8 pt-8 border-t border-white/20 dark:border-gray-700/50",children:[((S=d==null?void 0:d.links)==null?void 0:S.showLinkCount)!==!1&&l.jsxs("div",{className:"edge-animated text-center p-4 bg-gradient-to-r from-purple-600/10 via-pink-600/10 to-blue-600/10 rounded-2xl border border-white/20 dark:border-purple-400/20",children:[l.jsx("div",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-1",children:c.length}),l.jsx("div",{className:"text-sm text-gray-700 dark:text-gray-400",children:"Links"})]}),((P=d==null?void 0:d.links)==null?void 0:P.showClickStats)!==!1&&l.jsxs("div",{className:"edge-animated text-center p-4 bg-gradient-to-r from-blue-600/10 to-cyan-600/10 rounded-2xl border border-white/20 dark:border-blue-400/20",children:[l.jsx("div",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-1",children:c.reduce((C,M)=>C+(M.clicked||0),0)}),l.jsx("div",{className:"text-sm text-gray-700 dark:text-gray-400",children:"Total Clicks"})]}),l.jsxs("div",{className:"edge-animated text-center p-4 bg-gradient-to-r from-green-600/10 to-emerald-600/10 rounded-2xl border border-white/20 dark:border-green-400/20",children:[l.jsx("div",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-1",children:"Live"}),l.jsx("div",{className:"text-sm text-gray-700 dark:text-gray-400",children:"Status"})]})]})]}),c.length>0?l.jsxs(k.div,{variants:v,className:"space-y-4",children:[l.jsxs("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-6 flex items-center gap-2",children:[l.jsx(Ge,{className:"text-purple-600 dark:text-purple-400"}),"Links"]}),c.map((C,M)=>l.jsx(k.a,{href:C.destination,target:"_blank",rel:"noopener noreferrer",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:M*.1},whileHover:{scale:1.02,y:-5},className:"edge-animated block bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-2xl shadow-xl border border-white/20 dark:border-gray-700/50 p-6 hover:shadow-2xl transition-all duration-300 group",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[l.jsx("div",{className:`bg-gradient-to-r ${g(C.visibility)} p-4 rounded-xl`,children:h(C.visibility)}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:C.source.toUpperCase()}),C.visibility==="unlisted"&&l.jsxs("span",{className:"px-2 py-0.5 text-xs font-semibold rounded-full bg-gradient-to-r from-yellow-500 to-orange-500 text-white dark:from-yellow-400 dark:to-orange-400 flex items-center gap-1",children:[l.jsx(So,{className:"text-xs"}),"Unlisted"]})]}),l.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-400 truncate",children:C.destination}),C.visibility==="unlisted"&&l.jsx("p",{className:"text-xs text-yellow-600 dark:text-yellow-400 mt-1 italic",children:"Not listed in link hub"}),l.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[l.jsx(co,{className:"text-xs text-gray-500 dark:text-gray-400"}),l.jsxs("span",{className:"text-xs font-semibold text-gray-700 dark:text-gray-400",children:[C.clicked||0," ",C.clicked===1?"click":"clicks"]})]})]})]}),l.jsx(Ls,{className:"text-gray-400 dark:text-gray-500 group-hover:text-purple-600 dark:group-hover:text-purple-400 transition-colors"})]})},C._id||M))]}):l.jsxs(k.div,{variants:v,className:"edge-animated bg-white/10 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-white/20 dark:border-gray-700/50 p-12 text-center",children:[l.jsx(Ge,{className:"text-6xl text-gray-400 dark:text-gray-600 mx-auto mb-4"}),l.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:"No Links Yet"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"This user hasn't added any public links yet."})]})]})})]})},kW=()=>{var q,ee,oe;const{username:e,_id:t}=we(D=>D.admin.user),[r,n]=m.useState(!1),[a,i]=m.useState({x:0,y:0}),[o,s]=m.useState({isPublic:!1,showInSearch:!1,allowProfileView:!1,showEmail:!1,showLocation:!0,showBio:!0,showPassion:!0,showProfileImage:!0}),[c,u]=m.useState({showLinkCount:!0,showClickStats:!1}),[d,f]=m.useState({allowSearch:!1,showInFeatured:!1,searchKeywords:[]}),[p,h]=m.useState({showAnalytics:!1,showLastUpdated:!1,requireAuth:!1}),[g,x]=m.useState({emailOnNewClick:!1,emailOnProfileView:!1,emailOnLinkHubView:!1,weeklyReport:!1}),[v,y]=m.useState("default"),[b,w]=m.useState([]),[j,N]=m.useState(!0),[S,P]=m.useState(!1),[C,M]=m.useState(""),[T,A]=m.useState(new Set);m.useEffect(()=>{const D=Z=>{i({x:Z.clientX/window.innerWidth*100,y:Z.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",D,{passive:!0}),()=>window.removeEventListener("mousemove",D)},[]);const E=[{template:"default",displayName:"Default",description:"Clean and simple default template"},{template:"minimal",displayName:"Minimal",description:"Minimalist design"},{template:"modern",displayName:"Modern",description:"Modern and sleek design"},{template:"dark",displayName:"Dark",description:"Dark theme template"},{template:"light",displayName:"Light",description:"Light theme template"},{template:"hacker",displayName:"Hacker",description:"Hacker-style template"},{template:"glass",displayName:"Glass",description:"Glassmorphism design"},{template:"neon",displayName:"Neon",description:"Neon glow effects"},{template:"gradient",displayName:"Gradient",description:"Gradient backgrounds"},{template:"cards",displayName:"Cards",description:"Card-based layout"},{template:"particles",displayName:"Particles",description:"Particle effects"},{template:"3d",displayName:"3D",description:"3D effects template"},{template:"retro",displayName:"Retro",description:"Retro style template"}],_=async()=>{try{N(!0);const D=await be.get("/project/templates");if(D.status===200&&D.data.success){const Z=(D.data.templates||[]).map(le=>({template:le.name||le.template,displayName:le.label||le.displayName||le.name||le.template,description:le.description||""}));w(Z.length>0?Z:E)}else w(E)}catch(D){console.error("Error fetching available templates:",D),w(E)}finally{N(!1)}};m.useEffect(()=>{L(),_()},[e]),m.useEffect(()=>{const D=Z=>{S&&!Z.target.closest(".template-dropdown-container")&&P(!1)};return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[S]);const L=async()=>{var D,Z;try{n(!0);const le=await be.post("/settings/get",{username:e},{withCredentials:!0});if(le.status===200&&le.data.success){const Q=le.data.settings;Q.template&&y(Q.template),Q.profile&&s(Q.profile),Q.links&&u(Q.links),Q.search&&f(Q.search),Q.privacy&&h(Q.privacy),Q.notifications&&x(Q.notifications)}else J.error(le.data.message||"Failed to load settings")}catch(le){console.error("Error loading settings:",le);const Q=((Z=(D=le.response)==null?void 0:D.data)==null?void 0:Z.message)||"Failed to load settings";J.error(Q)}finally{n(!1)}},I=async(D,Z,le)=>{var z,re;const Q=`${D}.${Z}`,H=["profile.showInSearch","profile.allowProfileView","profile.showEmail","search.allowSearch","search.showInFeatured"];if(!o.isPublic&&H.includes(Q))return console.log(`Skipping update for ${Q} - profile is private`),!0;A(ce=>new Set(ce).add(Q));try{const ce={username:e,category:D,field:Z,value:le},K=await be.post("/settings/update",ce,{withCredentials:!0});if(K.status===200&&K.data.success)J.success("Setting updated successfully!",{duration:2e3});else return J.error(K.data.message||"Failed to update setting"),!1}catch(ce){console.error("Error updating setting:",ce);const K=((re=(z=ce.response)==null?void 0:z.data)==null?void 0:re.message)||"Server Internal Error";return J.error(K),!1}finally{A(ce=>{const K=new Set(ce);return K.delete(Q),K})}return!0},B=async D=>{var Z,le;A(Q=>new Set(Q).add("template"));try{const Q={username:e,category:"template",field:"template",value:D},H=await be.post("/settings/update",Q,{withCredentials:!0});if(H.status===200&&H.data.success)y(D),J.success("Template updated successfully!",{duration:2e3});else return J.error(H.data.message||"Failed to update template"),!1}catch(Q){console.error("Error updating template:",Q);const H=((le=(Z=Q.response)==null?void 0:Z.data)==null?void 0:le.message)||"Server Internal Error";return J.error(H),!1}finally{A(Q=>{const H=new Set(Q);return H.delete("template"),H})}return!0},V=async()=>{const D=C.trim();if(!D)return;let Z;f(le=>le.searchKeywords.includes(D)?le:(Z=[...le.searchKeywords,D],M(""),{...le,searchKeywords:Z})),Z&&(await I("search","searchKeywords",Z)||f(Q=>({...Q,searchKeywords:Q.searchKeywords.filter(H=>H!==D)})))},O=async D=>{let Z;f(le=>(Z=le.searchKeywords.filter(Q=>Q!==D),{...le,searchKeywords:Z})),Z!==void 0&&(await I("search","searchKeywords",Z)||f(Q=>({...Q,searchKeywords:[...Q.searchKeywords,D]})))},R={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},U={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5}}};return l.jsxs("div",{className:"w-full overflow-hidden relative min-h-screen","data-settings-page":!0,children:[l.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[l.jsx(k.div,{className:"absolute w-96 h-96 bg-purple-500/20 rounded-full blur-3xl",animate:{x:a.x*.5-200,y:a.y*.5-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-pink-500/20 rounded-full blur-3xl",animate:{x:a.x*.3-200,y:a.y*.3-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx(k.div,{className:"absolute w-96 h-96 bg-blue-500/20 rounded-full blur-3xl",animate:{x:a.x*.7-200,y:a.y*.7-200},transition:{type:"spring",stiffness:50,damping:20}}),l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_110%)]"})]}),l.jsx("div",{className:"relative z-10 py-8 md:py-12 px-4 sm:px-6 md:px-10 lg:px-12",children:l.jsxs(k.div,{variants:R,initial:"hidden",animate:"visible",className:"max-w-5xl mx-auto",children:[l.jsx(k.div,{variants:U,className:"mb-8",children:l.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[l.jsx(k.div,{className:"bg-gradient-to-r from-purple-600 to-pink-600 p-4 rounded-xl",whileHover:{scale:1.1,rotate:5},children:l.jsx(bi,{className:"text-3xl text-white"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 dark:from-purple-400 dark:via-pink-400 dark:to-blue-400 bg-clip-text text-transparent",children:"Privacy & Settings"}),l.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm md:text-base mt-1",children:"Control your profile visibility and privacy preferences"})]})]})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs(k.div,{variants:U,className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8 relative z-10",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx(H0,{className:"text-2xl text-purple-600 dark:text-purple-400"}),l.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"LinkHub Template"})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:"Choose a template style for your public LinkHub profile page"}),l.jsxs("div",{className:"template-dropdown-container relative z-20",children:[l.jsx(k.button,{whileHover:T.has("template")||j?{}:{scale:1.01,y:-1,transition:{duration:.2}},whileTap:T.has("template")||j?{}:{scale:.99,transition:{duration:.1}},onClick:()=>!T.has("template")&&P(!S),disabled:T.has("template")||j,className:`group w-full flex items-center justify-between px-4 py-3 bg-white dark:bg-gray-800 border-2 ${v?"border-purple-600 dark:border-purple-400":"border-gray-300 dark:border-gray-600"} rounded-xl text-left transition-all duration-200 ${T.has("template")||j?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-purple-500 dark:hover:border-purple-500 hover:shadow-lg hover:shadow-purple-500/20 dark:hover:shadow-purple-400/20"}`,children:l.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[T.has("template")?l.jsx(vp,{className:"animate-spin text-purple-600 dark:text-purple-400 flex-shrink-0"}):l.jsx(k.div,{whileHover:{rotate:15,scale:1.1},transition:{duration:.2},children:l.jsx(H0,{className:"text-purple-600 dark:text-purple-400 flex-shrink-0 transition-colors group-hover:text-purple-700 dark:group-hover:text-purple-300"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-0.5 transition-colors group-hover:text-purple-600 dark:group-hover:text-purple-400",children:j?"Loading templates...":((q=b.find(D=>(D.template||D.name)===v))==null?void 0:q.displayName)||(v?v.charAt(0).toUpperCase()+v.slice(1):"Select a template")||"Select a template"}),v&&!j&&((ee=b.find(D=>(D.template||D.name)===v))==null?void 0:ee.description)&&l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 truncate transition-colors group-hover:text-gray-600 dark:group-hover:text-gray-300",children:(oe=b.find(D=>(D.template||D.name)===v))==null?void 0:oe.description})]}),l.jsx(k.div,{animate:{rotate:S?180:0},transition:{duration:.2},children:l.jsx(Oc,{className:"text-gray-400 dark:text-gray-500 flex-shrink-0 transition-colors group-hover:text-purple-600 dark:group-hover:text-purple-400"})})]})}),l.jsx(Ue,{children:S&&!j&&b.length>0&&l.jsx(k.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[60] w-full mt-2 bg-white dark:bg-gray-800 border-2 border-gray-200 dark:border-gray-700 rounded-xl shadow-2xl overflow-hidden",children:l.jsx("div",{className:"max-h-80 overflow-y-auto custom-scrollbar",children:b.map((D,Z)=>{const le=D.template||D.name||`template-${Z}`,Q=v===le;return l.jsx(k.button,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:Z*.02,duration:.2},whileHover:{x:4,backgroundColor:Q?"rgba(147, 51, 234, 0.15)":"rgba(147, 51, 234, 0.1)",transition:{duration:.2}},whileTap:{scale:.98},onClick:()=>{P(!1),le&&B(le)},className:`group/item w-full text-left px-4 py-3 transition-all duration-200 ${Q?"bg-purple-50 dark:bg-purple-900/20 border-l-4 border-purple-600 dark:border-purple-400":"hover:bg-gray-50 dark:hover:bg-gray-700/50 border-l-4 border-transparent hover:border-l-4 hover:border-purple-400 dark:hover:border-purple-500"}`,children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx(k.div,{className:`font-semibold mb-1 transition-colors ${Q?"text-purple-700 dark:text-purple-300":"text-gray-900 dark:text-white group-hover/item:text-purple-600 dark:group-hover/item:text-purple-400"}`,whileHover:{scale:1.02},transition:{duration:.2},children:D.displayName||D.label||(le?le.charAt(0).toUpperCase()+le.slice(1):"Template")}),D.description&&l.jsx("div",{className:`text-xs transition-colors ${Q?"text-purple-600 dark:text-purple-400":"text-gray-600 dark:text-gray-400 group-hover/item:text-gray-700 dark:group-hover/item:text-gray-300"}`,children:D.description})]}),Q&&l.jsx(k.div,{className:"w-5 h-5 rounded-full bg-purple-600 dark:bg-purple-400 flex items-center justify-center flex-shrink-0",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15},whileHover:{scale:1.1,rotate:90},children:l.jsx("div",{className:"w-2 h-2 rounded-full bg-white"})}),!Q&&l.jsx(k.div,{className:"w-5 h-5 rounded-full border-2 border-gray-300 dark:border-gray-600 flex items-center justify-center flex-shrink-0 opacity-0 group-hover/item:opacity-100 transition-opacity",whileHover:{scale:1.1,borderColor:"rgba(147, 51, 234, 0.5)"}})]})},le)})})})})]})]}),l.jsxs(k.div,{variants:U,className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx(ia,{className:"text-2xl text-purple-600 dark:text-purple-400"}),l.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Profile Visibility"})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx(vt,{label:"Make Profile Public",description:"Allow others to view your profile",value:o.isPublic,onChange:async D=>{s({...o,isPublic:D}),await I("profile","isPublic",D)||s({...o,isPublic:!D})},updating:T.has("profile.isPublic")}),l.jsx(vt,{label:"Show in Search Results",description:"Allow your profile to appear in search",value:o.showInSearch,onChange:async D=>{s({...o,showInSearch:D}),await I("profile","showInSearch",D)||s({...o,showInSearch:!D})},disabled:!o.isPublic,updating:T.has("profile.showInSearch")}),l.jsx(vt,{label:"Allow Profile View",description:"Let others view your full profile page",value:o.allowProfileView,onChange:async D=>{s({...o,allowProfileView:D}),await I("profile","allowProfileView",D)||s({...o,allowProfileView:!D})},disabled:!o.isPublic,updating:T.has("profile.allowProfileView")}),l.jsx(vt,{label:"Show Email",description:"Display email on public profile",value:o.showEmail,onChange:async D=>{s({...o,showEmail:D}),await I("profile","showEmail",D)||s({...o,showEmail:!D})},disabled:!o.isPublic,updating:T.has("profile.showEmail")}),l.jsx(vt,{label:"Show Location",description:"Display location on public profile",value:o.showLocation,onChange:async D=>{s({...o,showLocation:D}),await I("profile","showLocation",D)||s({...o,showLocation:!D})},updating:T.has("profile.showLocation")}),l.jsx(vt,{label:"Show Bio",description:"Display bio on public profile",value:o.showBio,onChange:async D=>{s({...o,showBio:D}),await I("profile","showBio",D)||s({...o,showBio:!D})},updating:T.has("profile.showBio")}),l.jsx(vt,{label:"Show Passion",description:"Display passion on public profile",value:o.showPassion,onChange:async D=>{s({...o,showPassion:D}),await I("profile","showPassion",D)||s({...o,showPassion:!D})},updating:T.has("profile.showPassion")}),l.jsx(vt,{label:"Show Profile Image",description:"Display profile picture on public profile",value:o.showProfileImage,onChange:async D=>{s({...o,showProfileImage:D}),await I("profile","showProfileImage",D)||s({...o,showProfileImage:!D})},updating:T.has("profile.showProfileImage")})]})]}),l.jsxs(k.div,{variants:U,className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx(Ge,{className:"text-2xl text-blue-600 dark:text-blue-400"}),l.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Link Display"})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx(vt,{label:"Show Link Count",description:"Display total number of links on public profile",value:c.showLinkCount,onChange:async D=>{u({...c,showLinkCount:D}),await I("links","showLinkCount",D)||u({...c,showLinkCount:!D})},updating:T.has("links.showLinkCount")}),l.jsx(vt,{label:"Show Click Statistics",description:"Display click statistics on public profile",value:c.showClickStats,onChange:async D=>{u({...c,showClickStats:D}),await I("links","showClickStats",D)||u({...c,showClickStats:!D})},updating:T.has("links.showClickStats")})]})]}),l.jsxs(k.div,{variants:U,className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx(nc,{className:"text-2xl text-green-600 dark:text-green-400"}),l.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Search & Discovery"})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx(vt,{label:"Allow Search",description:"Allow your profile to appear in search results",value:d.allowSearch,onChange:async D=>{f({...d,allowSearch:D}),await I("search","allowSearch",D)||f({...d,allowSearch:!D})},updating:T.has("search.allowSearch")}),l.jsx(vt,{label:"Show in Featured",description:"Allow your profile to appear in featured sections",value:d.showInFeatured,onChange:async D=>{f({...d,showInFeatured:D}),await I("search","showInFeatured",D)||f({...d,showInFeatured:!D})},disabled:!d.allowSearch,updating:T.has("search.showInFeatured")}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:"Search Keywords"}),l.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-3",children:"Add keywords to help others find your profile"}),l.jsxs("div",{className:"flex gap-2 mb-3",children:[l.jsx("input",{type:"text",value:C,onChange:D=>M(D.target.value),onKeyPress:D=>D.key==="Enter"&&V(),placeholder:"Add keyword...",className:"flex-1 px-4 py-2 bg-white/90 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700 rounded-xl text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-purple-500"}),l.jsx(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:V,className:"px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-xl transition-colors",children:"Add"})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:d.searchKeywords.map((D,Z)=>l.jsxs(k.span,{initial:{scale:0},animate:{scale:1},className:"px-3 py-1 bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300 rounded-full text-sm flex items-center gap-2",children:[D,l.jsx("button",{onClick:()=>O(D),className:"hover:text-purple-900 dark:hover:text-purple-100",children:"×"})]},Z))})]})]})]}),l.jsxs(k.div,{variants:U,className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx(er,{className:"text-2xl text-red-600 dark:text-red-400"}),l.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Privacy"})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx(vt,{label:"Show Analytics",description:"Display analytics data on public profile",value:p.showAnalytics,onChange:async D=>{h({...p,showAnalytics:D}),await I("privacy","showAnalytics",D)||h({...p,showAnalytics:!D})},updating:T.has("privacy.showAnalytics")}),l.jsx(vt,{label:"Show Last Updated",description:"Display last updated timestamp on public profile",value:p.showLastUpdated,onChange:async D=>{h({...p,showLastUpdated:D}),await I("privacy","showLastUpdated",D)||h({...p,showLastUpdated:!D})},updating:T.has("privacy.showLastUpdated")}),l.jsx(vt,{label:"Require Authentication",description:"Require users to be logged in to view your profile",value:p.requireAuth,onChange:async D=>{h({...p,requireAuth:D}),await I("privacy","requireAuth",D)||h({...p,requireAuth:!D})},updating:T.has("privacy.requireAuth")})]})]}),l.jsxs(k.div,{variants:U,className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx(Rd,{className:"text-2xl text-yellow-600 dark:text-yellow-400"}),l.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Notifications"})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx(vt,{label:"Email on New Click",description:"Receive email when a link receives a new click",value:g.emailOnNewClick,onChange:async D=>{x({...g,emailOnNewClick:D}),await I("notifications","emailOnNewClick",D)||x({...g,emailOnNewClick:!D})},updating:T.has("notifications.emailOnNewClick")}),l.jsx(vt,{label:"Email on Profile View",description:"Receive email when someone views your profile page (ProfilePreview)",value:g.emailOnProfileView,onChange:async D=>{x({...g,emailOnProfileView:D}),await I("notifications","emailOnProfileView",D)||x({...g,emailOnProfileView:!D})},updating:T.has("notifications.emailOnProfileView")}),l.jsx(vt,{label:"Email on LinkHub Visit",description:"Receive email when someone visits your LinkHub page (/:username)",value:g.emailOnLinkHubView,onChange:async D=>{x({...g,emailOnLinkHubView:D}),await I("notifications","emailOnLinkHubView",D)||x({...g,emailOnLinkHubView:!D})},updating:T.has("notifications.emailOnLinkHubView")}),l.jsx(vt,{label:"Weekly Report",description:"Receive weekly analytics report via email",value:g.weeklyReport,onChange:async D=>{x({...g,weeklyReport:D}),await I("notifications","weeklyReport",D)||x({...g,weeklyReport:!D})},updating:T.has("notifications.weeklyReport")})]})]})]})]})})]})},vt=({label:e,description:t,value:r,onChange:n,disabled:a=!1,updating:i=!1})=>l.jsxs("div",{className:"flex items-start justify-between p-4 bg-gray-50 dark:bg-gray-800/30 rounded-xl border border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("label",{className:"block text-sm font-semibold text-gray-900 dark:text-white mb-1",children:e}),l.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:t})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[i&&l.jsx(vp,{className:"animate-spin text-purple-600 dark:text-purple-400 text-sm"}),l.jsx(k.button,{whileTap:{scale:i||a?1:.95},onClick:()=>!a&&!i&&n(!r),disabled:a||i,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${r?"bg-purple-600":"bg-gray-300 dark:bg-gray-600"} ${a||i?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:l.jsx(k.span,{animate:{x:r?20:2},className:"inline-block h-4 w-4 transform rounded-full bg-white transition-transform"})})]})]}),jW=()=>{const e=Ht(),t={hidden:{opacity:0,y:40},visible:{opacity:1,y:0,transition:{duration:.6}}};return l.jsx(k.div,{initial:"hidden",animate:"visible",variants:t,className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-pink-200 via-sky-200 to-blue-300 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 transition-colors duration-300",children:l.jsxs("div",{className:"text-center px-4",children:[l.jsx(k.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.2,duration:.5},className:"mb-8",children:l.jsx("h1",{className:"text-9xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-purple-400 via-violet-200 to-pink-500 dark:from-purple-300 dark:via-violet-100 dark:to-pink-400",children:"404"})}),l.jsx(k.h2,{variants:t,className:"text-3xl md:text-4xl font-bold mb-4 text-gray-800 dark:text-white transition-colors duration-300",children:"Page Not Found"}),l.jsx(k.p,{variants:t,className:"text-lg md:text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-md mx-auto transition-colors duration-300",children:"Oops! The page you're looking for doesn't exist. It might have been moved or deleted."}),l.jsxs(k.div,{variants:t,className:"flex flex-col sm:flex-row gap-4 justify-center items-center",children:[l.jsx("button",{onClick:()=>e(-1),className:"bg-gray-600 hover:bg-gray-700 dark:bg-gray-700 dark:hover:bg-gray-600 text-white font-semibold py-3 px-6 rounded-md text-lg transition-colors duration-200",children:"Go Back"}),l.jsx("button",{onClick:()=>e("/"),className:"bg-blue-600 hover:bg-blue-700 dark:bg-blue-700 dark:hover:bg-blue-800 text-white font-semibold py-3 px-6 rounded-md text-lg transition-colors duration-200",children:"Go Home"})]}),l.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.8},className:"mt-12",children:l.jsx("img",{src:"/panda.png",alt:"404",className:"mx-auto h-48 w-48 opacity-50 dark:opacity-70 dark:brightness-90 transition-all duration-300",onError:r=>{r.target.style.display="none"}})})]})})},NW="/app/assets/profile-C8dbMkPw.png",SW=()=>{const e=Ht();Vr(),Oi(),we(f=>f.page.darkMode);const t=we(f=>f.admin.isAuthenticated),[r,n]=m.useState({x:50,y:50}),[a,i]=m.useState([]),[o,s]=m.useState(!1);m.useEffect(()=>{const f=document.createElement("style");return f.textContent=` + @keyframes edge-glow { + 0%, 100% { + box-shadow: + 0 0 5px rgba(147, 51, 234, 0.4), + 0 0 10px rgba(236, 72, 153, 0.3), + 0 0 15px rgba(59, 130, 246, 0.2), + inset 0 0 5px rgba(147, 51, 234, 0.2); + } + 50% { + box-shadow: + 0 0 15px rgba(147, 51, 234, 0.6), + 0 0 25px rgba(236, 72, 153, 0.5), + 0 0 35px rgba(59, 130, 246, 0.4), + inset 0 0 10px rgba(147, 51, 234, 0.3); + } + } + @keyframes edge-shimmer { + 0% { + background-position: -200% center; + } + 100% { + background-position: 200% center; + } + } + .edge-animated { + position: relative; + transition: all 0.3s ease; + } + .edge-animated::before { + content: ''; + position: absolute; + inset: -2px; + border-radius: inherit; + padding: 2px; + background: linear-gradient( + 90deg, + transparent, + rgba(147, 51, 234, 0.6), + rgba(236, 72, 153, 0.6), + rgba(59, 130, 246, 0.6), + rgba(147, 51, 234, 0.6), + transparent + ); + background-size: 200% 100%; + -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask-composite: exclude; + opacity: 0; + transition: opacity 0.3s ease; + pointer-events: none; + z-index: 0; + } + .edge-animated:hover { + animation: edge-glow 2s ease-in-out infinite; + } + .edge-animated:hover::before { + opacity: 1; + animation: edge-shimmer 2s linear infinite; + } + .dark .edge-animated:hover { + animation: edge-glow 2s ease-in-out infinite; + } + .edge-animated-always { + animation: edge-glow 2s ease-in-out infinite; + } + .edge-animated-always::before { + opacity: 1; + animation: edge-shimmer 2s linear infinite; + } + .dark .edge-animated-always { + animation: edge-glow 2s ease-in-out infinite; + } + .dark .edge-animated::before { + background: linear-gradient( + 90deg, + transparent, + rgba(168, 85, 247, 0.7), + rgba(244, 114, 182, 0.7), + rgba(96, 165, 250, 0.7), + rgba(168, 85, 247, 0.7), + transparent + ); + background-size: 200% 100%; + } + .edge-animated > * { + position: relative; + z-index: 1; + } + `,document.head.appendChild(f),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[]),m.useEffect(()=>{const f=p=>{n({x:p.clientX/window.innerWidth*100,y:p.clientY/window.innerHeight*100})};return window.addEventListener("mousemove",f,{passive:!0}),()=>window.removeEventListener("mousemove",f)},[]),m.useEffect(()=>{(async()=>{try{s(!0);const p=await pt.get("https://api.github.com/repos/DpkRn/LinkBridger/collaborators",{headers:{Accept:"application/vnd.github+json",Authorization:"Bearer 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","X-GitHub-Api-Version":"2022-11-28"}});i(p.data)}catch(p){console.error("Error fetching collaborators:",p)}finally{s(!1)}})()},[]);const c={hidden:{opacity:0,y:40},visible:{opacity:1,y:0,transition:{duration:.6}}},u={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.2}}},d=[{title:"Role: Backend Development",name:"Deepak Kumar",email:"d.wizard.techno@gmail.com",icon:l.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})})},{title:"Role: Frontend Development",name:"Deepak Kumar",email:"d.wizard.techno@gmail.com",icon:l.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})},{title:"Role: Network Architecture",name:"Deepak Kumar",email:"d.wizard.techno@gmail.com",icon:l.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}];return l.jsx("div",{className:"min-h-screen bg-gradient-to-br from-pink-200 via-sky-200 to-blue-300 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 transition-colors duration-300",children:l.jsx(k.div,{initial:"hidden",animate:"visible",variants:u,className:`py-8 sm:py-10 md:py-12 px-3 sm:px-4 md:px-6 ${t?"":"pt-20 sm:pt-24 md:pt-28"}`,children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsxs(k.div,{variants:c,className:"text-center mb-8 sm:mb-10 md:mb-12",children:[l.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-gray-800 dark:text-white mb-3 sm:mb-4 md:mb-6 transition-colors duration-300",children:"About Developer"}),l.jsx("div",{className:"w-20 sm:w-24 md:w-28 h-0.5 sm:h-1 bg-gradient-to-r from-purple-500 to-pink-500 mx-auto rounded-full"})]}),l.jsx(k.div,{variants:c,className:"edge-animated edge-animated-always bg-white/80 dark:bg-gray-800/80 backdrop-blur-lg rounded-xl sm:rounded-2xl shadow-2xl p-4 sm:p-6 md:p-8 lg:p-12 mb-8 sm:mb-10 md:mb-12 transition-colors duration-300",children:l.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-start gap-8",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsxs(k.div,{whileHover:{scale:1.05},transition:{type:"spring",stiffness:300},className:"relative",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-500 to-pink-500 rounded-full blur-lg opacity-50"}),l.jsx("img",{src:NW,alt:"Deepak Kumar",className:"relative w-32 h-32 sm:w-40 sm:h-40 md:w-48 md:h-48 lg:w-56 lg:h-56 rounded-full object-cover border-2 sm:border-3 md:border-4 border-white dark:border-gray-700 shadow-xl",onError:f=>{f.target.src="https://via.placeholder.com/224?text=DK"}})]})}),l.jsxs("div",{className:"flex-1 text-center md:text-left",children:[l.jsx(k.h2,{variants:c,className:"text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-gray-800 dark:text-white mb-3 sm:mb-4 md:mb-6 transition-colors duration-300",children:"Deepak Kumar"}),l.jsx(k.p,{variants:c,className:"text-sm sm:text-base md:text-lg lg:text-xl text-gray-600 dark:text-gray-300 mb-4 sm:mb-5 md:mb-6 leading-relaxed transition-colors duration-300 px-2 sm:px-0",children:"I created All in1 url to solve a real problem: managing multiple social media and professional links scattered across different platforms. Instead of sharing long, forgettable URLs, All in1 url lets you create memorable, personalized links that reflect your brand. With granular privacy controls, customizable notifications, and password protection, you have complete control over your digital presence. Plus, get a free custom domain to make your link truly yours and establish your unique online identity."}),l.jsxs(k.div,{variants:c,className:"flex flex-wrap justify-center md:justify-start gap-4",children:[l.jsx("a",{href:"https://github.com/DpkRn",target:"_blank",rel:"noopener noreferrer",className:"p-2 sm:p-2.5 md:p-3 bg-gray-100 dark:bg-gray-700 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors duration-200","aria-label":"GitHub",children:l.jsx("svg",{className:"w-5 h-5 sm:w-6 sm:h-6 md:w-7 md:h-7 text-gray-800 dark:text-white",fill:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})})}),l.jsx("a",{href:"https://www.linkedin.com/in/deepak-kumar-b3181a236/",target:"_blank",rel:"noopener noreferrer",className:"p-2 sm:p-2.5 md:p-3 bg-gray-100 dark:bg-gray-700 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors duration-200","aria-label":"LinkedIn",children:l.jsx("svg",{className:"w-5 h-5 sm:w-6 sm:h-6 md:w-7 md:h-7 text-gray-800 dark:text-white",fill:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}),l.jsx("a",{href:"https://deepak-aryan.vercel.app/",target:"_blank",rel:"noopener noreferrer",className:"p-2 sm:p-2.5 md:p-3 bg-gray-100 dark:bg-gray-700 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors duration-200","aria-label":"Portfolio",children:l.jsx("svg",{className:"w-5 h-5 sm:w-6 sm:h-6 md:w-7 md:h-7 text-gray-800 dark:text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})})]})]})]})}),l.jsxs(k.div,{variants:u,className:"mb-6 sm:mb-8 md:mb-10",children:[l.jsx(k.h2,{variants:c,className:"text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-center text-gray-800 dark:text-white mb-6 sm:mb-8 md:mb-10 transition-colors duration-300 px-4",children:"Developers & Contributors"}),l.jsx(k.div,{variants:u,className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-5 md:gap-6",children:d.map((f,p)=>l.jsxs(k.div,{variants:c,whileHover:{y:-5},className:"edge-animated bg-white/80 dark:bg-gray-800/80 backdrop-blur-lg rounded-lg sm:rounded-xl p-4 sm:p-5 md:p-6 shadow-lg hover:shadow-xl transition-all duration-300",children:[l.jsx("div",{className:"flex items-center justify-center w-12 h-12 sm:w-14 sm:h-14 md:w-16 md:h-16 bg-gradient-to-r from-purple-500 to-pink-500 rounded-full mb-3 sm:mb-4 mx-auto",children:l.jsx("div",{className:"text-white text-lg sm:text-xl md:text-2xl",children:f.icon})}),l.jsx("h3",{className:"text-base sm:text-lg md:text-xl lg:text-2xl font-semibold text-gray-800 dark:text-white mb-2 sm:mb-3 text-center transition-colors duration-300",children:f.title}),l.jsxs("div",{className:"mb-2 sm:mb-3 text-center",children:[l.jsx("p",{className:"text-sm sm:text-base md:text-lg lg:text-xl font-semibold text-gray-800 dark:text-white transition-colors duration-300",children:f.name}),l.jsx("a",{href:`mailto:${f.email}`,className:"text-xs sm:text-sm md:text-base text-blue-600 dark:text-blue-400 hover:underline transition-colors duration-200 break-all",children:f.email})]}),l.jsx("p",{className:"text-xs sm:text-sm md:text-base text-gray-600 dark:text-gray-300 text-center transition-colors duration-300 leading-relaxed",children:f.description})]},p))})]}),l.jsx(k.div,{variants:c,className:"text-center mt-6 sm:mt-8 md:mt-10",children:l.jsx("button",{onClick:()=>e(-1),className:"px-4 py-2 sm:px-5 sm:py-2.5 md:px-6 md:py-3 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-sm sm:text-base md:text-lg font-semibold rounded-lg hover:from-purple-600 hover:to-pink-600 transition-all duration-200 shadow-lg hover:shadow-xl",children:"Go Back"})}),a.length>0&&l.jsxs(k.div,{variants:c,className:"mt-16 pt-12 border-t border-gray-300 dark:border-gray-700",children:[l.jsx(k.h2,{variants:c,className:"text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold text-center text-gray-800 dark:text-white mb-6 sm:mb-8 md:mb-10 transition-colors duration-300 px-4",children:"GitHub Collaborators"}),l.jsxs(k.div,{variants:u,className:"bg-black rounded-xl p-4 sm:p-6 md:p-8 shadow-lg",children:[l.jsx("div",{className:"flex flex-wrap gap-3 sm:gap-4 md:gap-5 justify-center items-center",children:a.map(f=>l.jsxs(k.a,{href:f.html_url,target:"_blank",rel:"noopener noreferrer",variants:c,whileHover:{scale:1.05},className:"flex flex-col items-center gap-1.5 sm:gap-2 p-3 sm:p-4 hover:bg-gray-900 rounded-lg transition-colors duration-200",children:[l.jsx("img",{src:f.avatar_url,alt:f.login,className:"w-10 h-10 sm:w-12 sm:h-12 md:w-14 md:h-14 rounded-full border-2 border-gray-600"}),l.jsx("span",{className:"text-xs sm:text-sm md:text-base font-semibold text-white text-center",children:f.login})]},f.id))}),l.jsx("p",{className:"text-center text-xs sm:text-sm md:text-base text-gray-400 mt-4 sm:mt-5 md:mt-6 px-4",children:"These talented developers contribute to All in1 url on GitHub"})]})]})]})})})};var PW=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function a1(e){if(typeof e!="string")return!1;var t=PW;return t.includes(e)}var CW=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],EW=new Set(CW);function I7(e){return typeof e!="string"?!1:EW.has(e)}function _7(e){return typeof e=="string"&&e.startsWith("data-")}function pr(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(I7(r)||_7(r))&&(t[r]=e[r]);return t}function Co(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return pr(t)}return typeof e=="object"&&!Array.isArray(e)?pr(e):null}function nr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(I7(r)||_7(r)||a1(r))&&(t[r]=e[r]);return t}function AW(e){return e==null?null:m.isValidElement(e)?nr(e.props):typeof e=="object"&&!Array.isArray(e)?nr(e):null}var OW=["children","width","height","viewBox","className","style","title","desc"];function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:r,width:n,height:a,viewBox:i,className:o,style:s,title:c,desc:u}=e,d=TW(e,OW),f=i||{width:n,height:a,x:0,y:0},p=ve("recharts-surface",o);return m.createElement("svg",wy({},nr(d),{className:p,width:n,height:a,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),m.createElement("title",null,c),m.createElement("desc",null,u),r)}),IW=["children","className"];function ky(){return ky=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:r,className:n}=e,a=_W(e,IW),i=ve("recharts-layer",n);return m.createElement("g",ky({className:i},nr(a),{ref:t}),r)}),L7=m.createContext(null),DW=()=>m.useContext(L7);function _e(e){return function(){return e}}const D7=Math.cos,G0=Math.sin,jn=Math.sqrt,Y0=Math.PI,xp=2*Y0,jy=Math.PI,Ny=2*jy,Wi=1e-6,RW=Ny-Wi;function R7(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return R7;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;aWi)if(!(Math.abs(f*c-u*d)>Wi)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,g=a-s,x=c*c+u*u,v=h*h+g*g,y=Math.sqrt(x),b=Math.sqrt(p),w=i*Math.tan((jy-Math.acos((x+p-v)/(2*y*b)))/2),j=w/b,N=w/y;Math.abs(j-1)>Wi&&this._append`L${t+j*d},${r+j*f}`,this._append`A${i},${i},0,0,${+(f*h>d*g)},${this._x1=t+N*c},${this._y1=r+N*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),c=n*Math.sin(a),u=t+s,d=r+c,f=1^o,p=o?a-i:i-a;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Wi||Math.abs(this._y1-d)>Wi)&&this._append`L${u},${d}`,n&&(p<0&&(p=p%Ny+Ny),p>RW?this._append`A${n},${n},0,1,${f},${t-s},${r-c}A${n},${n},0,1,${f},${this._x1=u},${this._y1=d}`:p>Wi&&this._append`A${n},${n},0,${+(p>=jy)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function o1(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new zW(t)}function s1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $7(e){this._context=e}$7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function bp(e){return new $7(e)}function z7(e){return e[0]}function B7(e){return e[1]}function F7(e,t){var r=_e(!0),n=null,a=bp,i=null,o=o1(s);e=typeof e=="function"?e:e===void 0?z7:_e(e),t=typeof t=="function"?t:t===void 0?B7:_e(t);function s(c){var u,d=(c=s1(c)).length,f,p=!1,h;for(n==null&&(i=a(h=o())),u=0;u<=d;++u)!(u=h;--g)s.point(w[g],j[g]);s.lineEnd(),s.areaEnd()}y&&(w[p]=+e(v,p,f),j[p]=+t(v,p,f),s.point(n?+n(v,p,f):w[p],r?+r(v,p,f):j[p]))}if(b)return s=null,b+""||null}function d(){return F7().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:_e(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:_e(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:_e(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:_e(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:_e(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:_e(+f),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:_e(!!f),u):a},u.curve=function(f){return arguments.length?(o=f,i!=null&&(s=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=s=null:s=o(i=f),u):i},u}class V7{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function BW(e){return new V7(e,!0)}function FW(e){return new V7(e,!1)}const l1={draw(e,t){const r=jn(t/Y0);e.moveTo(r,0),e.arc(0,0,r,0,xp)}},VW={draw(e,t){const r=jn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},U7=jn(1/3),UW=U7*2,HW={draw(e,t){const r=jn(t/UW),n=r*U7;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},WW={draw(e,t){const r=jn(t),n=-r/2;e.rect(n,n,r,r)}},KW=.8908130915292852,H7=G0(Y0/10)/G0(7*Y0/10),GW=G0(xp/10)*H7,YW=-D7(xp/10)*H7,qW={draw(e,t){const r=jn(t*KW),n=GW*r,a=YW*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=xp*i/5,s=D7(o),c=G0(o);e.lineTo(c*r,-s*r),e.lineTo(s*n-c*a,c*n+s*a)}e.closePath()}},xh=jn(3),XW={draw(e,t){const r=-jn(t/(xh*3));e.moveTo(0,r*2),e.lineTo(-xh*r,-r),e.lineTo(xh*r,-r),e.closePath()}},Wr=-.5,Kr=jn(3)/2,Sy=1/jn(12),ZW=(Sy/2+1)*3,QW={draw(e,t){const r=jn(t/ZW),n=r/2,a=r*Sy,i=n,o=r*Sy+r,s=-i,c=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,c),e.lineTo(Wr*n-Kr*a,Kr*n+Wr*a),e.lineTo(Wr*i-Kr*o,Kr*i+Wr*o),e.lineTo(Wr*s-Kr*c,Kr*s+Wr*c),e.lineTo(Wr*n+Kr*a,Wr*a-Kr*n),e.lineTo(Wr*i+Kr*o,Wr*o-Kr*i),e.lineTo(Wr*s+Kr*c,Wr*c-Kr*s),e.closePath()}};function JW(e,t){let r=null,n=o1(a);e=typeof e=="function"?e:_e(e||l1),t=typeof t=="function"?t:_e(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:_e(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:_e(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function q0(){}function X0(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function W7(e){this._context=e}W7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X0(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eK(e){return new W7(e)}function K7(e){this._context=e}K7.prototype={areaStart:q0,areaEnd:q0,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:X0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function tK(e){return new K7(e)}function G7(e){this._context=e}G7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:X0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rK(e){return new G7(e)}function Y7(e){this._context=e}Y7.prototype={areaStart:q0,areaEnd:q0,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function nK(e){return new Y7(e)}function B3(e){return e<0?-1:1}function F3(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(B3(i)+B3(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function V3(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function bh(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function Z0(e){this._context=e}Z0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:bh(this,this._t0,V3(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,bh(this,V3(this,r=F3(this,e,t)),r);break;default:bh(this,this._t0,r=F3(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function q7(e){this._context=new X7(e)}(q7.prototype=Object.create(Z0.prototype)).point=function(e,t){Z0.prototype.point.call(this,t,e)};function X7(e){this._context=e}X7.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function aK(e){return new Z0(e)}function iK(e){return new q7(e)}function Z7(e){this._context=e}Z7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=U3(e),a=U3(t),i=0,o=1;o=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function sK(e){return new wp(e,.5)}function lK(e){return new wp(e,0)}function cK(e){return new wp(e,1)}function Eo(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r=0;)r[t]=t;return r}function uK(e,t){return e[t]}function dK(e){const t=[];return t.key=e,t}function fK(){var e=_e([]),t=Py,r=Eo,n=uK;function a(i){var o=Array.from(e.apply(this,arguments),dK),s,c=o.length,u=-1,d;for(const f of i)for(s=0,++u;s0){for(var r,n,a=0,i=e[0].length,o;a0){for(var r=0,n=e[t[0]],a,i=n.length;r0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n1&&arguments[1]!==void 0?arguments[1]:yK,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function at(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var s=r[o-1];return typeof s=="string"?a+s+i:s!==void 0?a+Ja(s)+i:a+i},"")}var Mt=e=>e===0?0:e>0?1:-1,on=e=>typeof e=="number"&&e!=+e,ba=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,te=e=>(typeof e=="number"||e instanceof Number)&&!on(e),zn=e=>te(e)||typeof e=="string",vK=0,Lc=e=>{var t=++vK;return"".concat(e||"").concat(t)},tr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!te(t)&&typeof t!="string")return n;var i;if(ba(t)){if(r==null)return n;var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return on(i)&&(i=n),a&&r!=null&&i>r&&(i=r),i},e9=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):Ao(n,t))===r)}var Ve=e=>e===null||typeof e>"u",au=e=>Ve(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function xK(e){return e!=null}function iu(){}var bK=["type","size","sizeType"];function Cy(){return Cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t="symbol".concat(au(e));return r9[t]||l1},EK=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*PK;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},AK=(e,t)=>{r9["symbol".concat(au(e))]=t},u1=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,a=NK(e,bK),i=W3(W3({},a),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var s=()=>{var p=CK(o),h=JW().type(p).size(EK(r,n,o)),g=h();if(g!==null)return g},{className:c,cx:u,cy:d}=i,f=nr(i);return te(u)&&te(d)&&te(r)?m.createElement("path",Cy({},f,{className:ve("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:s()})):null};u1.registerSymbol=AK;var n9=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,d1=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{a1(a)&&(n[a]=i=>r[a](r,i))}),n},OK=(e,t,r)=>n=>(e(t,r,n),null),ou=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var i=e[a];a1(a)&&typeof i=="function"&&(n||(n={}),n[a]=OK(i,t,r))}),n};function K3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function TK(e){for(var t=1;t(o[s]===void 0&&n[s]!==void 0&&(o[s]=n[s]),o),r);return i}function Q0(){return Q0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var p=d.formatter||a,h=ve({"recharts-legend-item":!0,["legend-item-".concat(f)]:!0,inactive:d.inactive});if(d.type==="none")return null;var g=d.inactive?i:d.color,x=p?p(d.value,d,f):d.value;return m.createElement("li",Q0({className:h,style:c,key:"legend-item-".concat(f)},ou(e,d,f)),m.createElement(i1,{width:r,height:r,viewBox:s,style:u,"aria-label":"".concat(x," legend icon")},m.createElement(BK,{data:d,iconType:o,inactiveColor:i})),m.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},x))})}var VK=e=>{var t=ct(e,zK),{payload:r,layout:n,align:a}=t;if(!r||!r.length)return null;var i={padding:0,margin:0,textAlign:n==="horizontal"?a:"left"};return m.createElement("ul",{className:"recharts-default-legend",style:i},m.createElement(FK,Q0({},t,{payload:r})))},a9={},i9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const a=new Map;for(let i=0;i=0}e.isLength=t})(s9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s9;function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Sp);var l9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(l9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sp,r=l9;function n(a){return r.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=n})(o9);var c9={},u9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kp;function r(n){return function(a){return t.get(a,n)}}e.property=r})(u9);var d9={},p1={},f9={},m1={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(m1);var h1={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(h1);var g1={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=t})(g1);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m1,r=h1,n=g1;function a(d,f,p){return typeof p!="function"?a(d,f,()=>{}):i(d,f,function h(g,x,v,y,b,w){const j=p(g,x,v,y,b,w);return j!==void 0?!!j:i(g,x,h,w)},new Map)}function i(d,f,p,h){if(f===d)return!0;switch(typeof f){case"object":return o(d,f,p,h);case"function":return Object.keys(f).length>0?i(d,{...f},p,h):n.eq(d,f);default:return t.isObject(d)?typeof f=="string"?f==="":!0:n.eq(d,f)}}function o(d,f,p,h){if(f==null)return!0;if(Array.isArray(f))return c(d,f,p,h);if(f instanceof Map)return s(d,f,p,h);if(f instanceof Set)return u(d,f,p,h);const g=Object.keys(f);if(d==null||r.isPrimitive(d))return g.length===0;if(g.length===0)return!0;if(h!=null&&h.has(f))return h.get(f)===d;h==null||h.set(f,d);try{for(let x=0;x{})}e.isMatch=r})(p1);var p9={},y1={},m9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(m9);var v1={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(v1);var x1={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",a="[object Boolean]",i="[object Arguments]",o="[object Symbol]",s="[object Date]",c="[object Map]",u="[object Set]",d="[object Array]",f="[object Function]",p="[object ArrayBuffer]",h="[object Object]",g="[object Error]",x="[object DataView]",v="[object Uint8Array]",y="[object Uint8ClampedArray]",b="[object Uint16Array]",w="[object Uint32Array]",j="[object BigUint64Array]",N="[object Int8Array]",S="[object Int16Array]",P="[object Int32Array]",C="[object BigInt64Array]",M="[object Float32Array]",T="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=p,e.arrayTag=d,e.bigInt64ArrayTag=C,e.bigUint64ArrayTag=j,e.booleanTag=a,e.dataViewTag=x,e.dateTag=s,e.errorTag=g,e.float32ArrayTag=M,e.float64ArrayTag=T,e.functionTag=f,e.int16ArrayTag=S,e.int32ArrayTag=P,e.int8ArrayTag=N,e.mapTag=c,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=u,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=b,e.uint32ArrayTag=w,e.uint8ArrayTag=v,e.uint8ClampedArrayTag=y})(x1);var h9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(h9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m9,r=v1,n=x1,a=h1,i=h9;function o(d,f){return s(d,void 0,d,new Map,f)}function s(d,f,p,h=new Map,g=void 0){const x=g==null?void 0:g(d,f,p,h);if(x!==void 0)return x;if(a.isPrimitive(d))return d;if(h.has(d))return h.get(d);if(Array.isArray(d)){const v=new Array(d.length);h.set(d,v);for(let y=0;yt.isMatch(i,a)}e.matches=n})(d9);var g9={},y9={},v9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=y1,r=x1;function n(a,i){return t.cloneDeepWith(a,(o,s,c,u)=>{const d=i==null?void 0:i(o,s,c,u);if(d!==void 0)return d;if(typeof a=="object")switch(Object.prototype.toString.call(a)){case r.numberTag:case r.stringTag:case r.booleanTag:{const f=new a.constructor(a==null?void 0:a.valueOf());return t.copyProperties(f,a),f}case r.argumentsTag:{const f={};return t.copyProperties(f,a),f.length=a.length,f[Symbol.iterator]=a[Symbol.iterator],f}default:return}})}e.cloneDeepWith=n})(v9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=v9;function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(y9);var x9={},b1={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,a=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ZK:XK;S9.useSyncExternalStore=Rs.useSyncExternalStore!==void 0?Rs.useSyncExternalStore:QK;N9.exports=S9;var JK=N9.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Pp=m,eG=JK;function tG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rG=typeof Object.is=="function"?Object.is:tG,nG=eG.useSyncExternalStore,aG=Pp.useRef,iG=Pp.useEffect,oG=Pp.useMemo,sG=Pp.useDebugValue;j9.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var i=aG(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=oG(function(){function c(h){if(!u){if(u=!0,d=h,h=n(h),a!==void 0&&o.hasValue){var g=o.value;if(a(g,h))return f=g}return f=h}if(g=f,rG(d,h))return g;var x=n(h);return a!==void 0&&a(g,x)?g:(d=h,f=x)}var u=!1,d,f,p=r===void 0?null:r;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,r,n,a]);var s=nG(e,i[0],i[1]);return iG(function(){o.hasValue=!0,o.value=s},[s]),sG(s),s};k9.exports=j9;var lG=k9.exports,w1=m.createContext(null),cG=e=>e,De=()=>{var e=m.useContext(w1);return e?e.store.dispatch:cG},zd=()=>{},uG=()=>zd,dG=(e,t)=>e===t;function ie(e){var t=m.useContext(w1);return lG.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:uG,t?t.store.getState:zd,t?t.store.getState:zd,t?e:zd,dG)}var P9={},C9={},E9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,a,i)=>{if(n!==a){const o=t(n),s=t(a);if(o===s&&o===0){if(na)return i==="desc"?-1:1}return i==="desc"?s-o:o-s}return 0};e.compareValues=r})(E9);var A9={},k1={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(k1);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=k1,r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||t.isSymbol(i)?!0:typeof i=="string"&&(n.test(i)||!r.test(i))||o!=null&&Object.hasOwn(o,i)}e.isKey=a})(A9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E9,r=A9,n=Np;function a(i,o,s,c){if(i==null)return[];s=c?void 0:s,Array.isArray(i)||(i=Object.values(i)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const u=(h,g)=>{let x=h;for(let v=0;vg==null||h==null?g:typeof h=="object"&&"key"in h?Object.hasOwn(g,h.key)?g[h.key]:u(g,h.path):typeof h=="function"?h(g):Array.isArray(h)?u(g,h):typeof g=="object"?g[h]:g,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||r.isKey(h)?h:{key:h,path:n.toPath(h)}));return i.map(h=>({original:h,criteria:f.map(g=>d(g,h))})).slice().sort((h,g)=>{for(let x=0;xh.original)}e.orderBy=a})(C9);var O9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const a=[],i=Math.floor(n),o=(s,c)=>{for(let u=0;u1&&n.isIterateeCall(i,o[0],o[1])?o=[]:s>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(i,r.flatten(o),["asc"])}e.sortBy=a})(P9);var fG=P9.sortBy;const Cp=Hn(fG);var T9=e=>e.legend.settings,pG=e=>e.legend.size,mG=e=>e.legend.payload,hG=$([mG,T9],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Cp(n,r):n});function gG(){return ie(hG)}var rd=1;function M9(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=m.useState({height:0,left:0,top:0,width:0}),n=m.useCallback(a=>{if(a!=null){var i=a.getBoundingClientRect(),o={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(o.height-t.height)>rd||Math.abs(o.left-t.left)>rd||Math.abs(o.top-t.top)>rd||Math.abs(o.width-t.width)>rd)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}var yG={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},I9=ar({name:"chartLayout",initialState:yG,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,i;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(i=t.payload.left)!==null&&i!==void 0?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:vG,setLayout:xG,setChartSize:bG,setScale:wG}=I9.actions,kG=I9.reducer;function _9(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Ie(e){return Number.isFinite(e)}function Bn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function q3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cs(e){for(var t=1;t{if(t&&r){var{width:n,height:a}=r,{align:i,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&i!=="center"&&te(e[i]))return cs(cs({},e),{},{[i]:e[i]+(n||0)});if((s==="horizontal"||s==="vertical"&&i==="center")&&o!=="middle"&&te(e[o]))return cs(cs({},e),{},{[o]:e[o]+(a||0)})}return e},Wn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",L9=(e,t,r,n)=>{if(n)return e.map(s=>s.coordinate);var a,i,o=e.map(s=>(s.coordinate===t&&(a=!0),s.coordinate===r&&(i=!0),s.coordinate));return a||o.push(t),i||o.push(r),o},D9=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:a,range:i,scale:o,realScaleType:s,isCategorical:c,categoricalDomain:u,tickCount:d,ticks:f,niceTicks:p,axisType:h}=e;if(!o)return null;var g=s==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,x=a==="category"&&o.bandwidth?o.bandwidth()/g:0;if(x=h==="angleAxis"&&i&&i.length>=2?Mt(i[0]-i[1])*2*x:x,f||p){var v=(f||p||[]).map((y,b)=>{var w=n?n.indexOf(y):y;return{coordinate:o(w)+x,value:y,offset:x,index:b}});return v.filter(y=>!on(y.coordinate))}return c&&u?u.map((y,b)=>({coordinate:o(y)+x,value:y,index:b,offset:x})):o.ticks&&!r&&d!=null?o.ticks(d).map((y,b)=>({coordinate:o(y)+x,value:y,offset:x,index:b})):o.domain().map((y,b)=>({coordinate:o(y)+x,value:n?n[y]:y,index:b,offset:x}))},X3=1e-4,CG=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),a=Math.min(n[0],n[1])-X3,i=Math.max(n[0],n[1])+X3,o=e(t[0]),s=e(t[r-1]);(oi||si)&&e.domain([t[0],t[r-1]])}},EG=(e,t)=>{if(!t||t.length!==2||!te(t[0])||!te(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),a=[e[0],e[1]];return(!te(e[0])||e[0]n)&&(a[1]=n),a[0]>n&&(a[0]=n),a[1]{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(u[0]=i,u[1]=i+p,i=d):(u[0]=o,u[1]=o+p,o=d)}}}},OG=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(c[0]=i,c[1]=i+u,i=c[1]):(c[0]=0,c[1]=0)}}}},TG={sign:AG,expand:pK,none:Eo,silhouette:mK,wiggle:hK,positive:OG},MG=(e,t,r)=>{var n,a=(n=TG[r])!==null&&n!==void 0?n:Eo,i=fK().keys(t).value((s,c)=>Number(Se(s,c,0))).order(Py).offset(a),o=i(e);return o.forEach((s,c)=>{s.forEach((u,d)=>{var f=Se(e[d],t[c],0);Array.isArray(f)&&f.length===2&&te(f[0])&&te(f[1])&&(u[0]=f[0],u[1]=f[1])})}),o};function R9(e){return e==null?void 0:String(e)}function J0(e){var{axis:t,ticks:r,bandSize:n,entry:a,index:i,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ve(a[t.dataKey])){var s=t9(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var c=Se(a,Ve(o)?t.dataKey:o);return Ve(c)?null:t.scale(c)}var Z3=e=>{var{axis:t,ticks:r,offset:n,bandSize:a,entry:i,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var s=Se(i,t.dataKey,t.scale.domain()[o]);return Ve(s)?null:t.scale(s)-a/2+n},IG=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return n<=0&&a>=0?0:a<0?a:n}return r[0]},_G=e=>{var t=e.flat(2).filter(te);return[Math.min(...t),Math.max(...t)]},LG=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],DG=(e,t,r)=>{if(e!=null)return LG(Object.keys(e).reduce((n,a)=>{var i=e[a];if(!i)return n;var{stackedData:o}=i,s=o.reduce((c,u)=>{var d=_9(u,t,r),f=_G(d);return!Ie(f[0])||!Ie(f[1])?c:[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},Q3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,J3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,wi=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=Cp(t,d=>d.coordinate),i=1/0,o=1,s=a.length;o{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},$G=(e,t)=>t==="centric"?e.angle:e.radius,Aa=e=>e.layout.width,Oa=e=>e.layout.height,zG=e=>e.layout.scale,$9=e=>e.layout.margin,Ep=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Ap=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),z9="data-recharts-item-index",B9="data-recharts-item-id",su=60;function t5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nd(e){for(var t=1;te.brush.height;function HG(e){var t=Ap(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:su;return r+a}return r},0)}function WG(e){var t=Ap(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:su;return r+a}return r},0)}function KG(e){var t=Ep(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function GG(e){var t=Ep(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var kt=$([Aa,Oa,$9,UG,HG,WG,KG,GG,T9,pG],(e,t,r,n,a,i,o,s,c,u)=>{var d={left:(r.left||0)+a,right:(r.right||0)+i},f={top:(r.top||0)+o,bottom:(r.bottom||0)+s},p=nd(nd({},f),d),h=p.bottom;p.bottom+=n,p=PG(p,c,u);var g=e-p.left-p.right,x=t-p.top-p.bottom;return nd(nd({brushBottom:h},p),{},{width:Math.max(g,0),height:Math.max(x,0)})}),YG=$(kt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),N1=$(Aa,Oa,(e,t)=>({x:0,y:0,width:e,height:t})),qG=m.createContext(null),Lt=()=>m.useContext(qG)!=null,Op=e=>e.brush,Tp=$([Op,kt,$9],(e,t,r)=>({height:e.height,x:te(e.x)?e.x:t.left,y:te(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:te(e.width)?e.width:t.width})),F9={},V9={},U9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:a,edges:i}={}){let o,s=null;const c=i!=null&&i.includes("leading"),u=i==null||i.includes("trailing"),d=()=>{s!==null&&(r.apply(o,s),o=void 0,s=null)},f=()=>{u&&d(),x()};let p=null;const h=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,f()},n)},g=()=>{p!==null&&(clearTimeout(p),p=null)},x=()=>{g(),o=void 0,s=null},v=()=>{d()},y=function(...b){if(a!=null&&a.aborted)return;o=this,s=b;const w=p==null;h(),c&&w&&d()};return y.schedule=h,y.cancel=x,y.flush=v,a==null||a.addEventListener("abort",x,{once:!0}),y}e.debounce=t})(U9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U9;function r(n,a=0,i={}){typeof i!="object"&&(i={});const{leading:o=!1,trailing:s=!0,maxWait:c}=i,u=Array(2);o&&(u[0]="leading"),s&&(u[1]="trailing");let d,f=null;const p=t.debounce(function(...x){d=n.apply(this,x),f=null},a,{edges:u}),h=function(...x){return c!=null&&(f===null&&(f=Date.now()),Date.now()-f>=c)?(d=n.apply(this,x),f=Date.now(),p.cancel(),p.schedule(),d):(p.apply(this,x),d)},g=()=>(p.flush(),d);return h.cancel=p.cancel,h.flush=g,h}e.debounce=r})(V9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=V9;function r(n,a=0,i={}){const{leading:o=!0,trailing:s=!0}=i;return t.debounce(n,a,{leading:o,maxWait:a,trailing:s})}e.throttle=r})(F9);var XG=F9.throttle;const ZG=Hn(XG);var ef=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;ia[o++]))}},H9=(e,t,r)=>{var{width:n="100%",height:a="100%",aspect:i,maxHeight:o}=r,s=ba(n)?e:Number(n),c=ba(a)?t:Number(a);return i&&i>0&&(s?c=s/i:c&&(s=c*i),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},QG={width:0,height:0,overflow:"visible"},JG={width:0,overflowX:"visible"},eY={height:0,overflowY:"visible"},tY={},rY=e=>{var{width:t,height:r}=e,n=ba(t),a=ba(r);return n&&a?QG:n?JG:a?eY:tY};function nY(e){var{width:t,height:r,aspect:n}=e,a=t,i=r;return a===void 0&&i===void 0?(a="100%",i="100%"):a===void 0?a=n&&n>0?void 0:"100%":i===void 0&&(i=n&&n>0?void 0:"100%"),{width:a,height:i}}function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t({width:r,height:n}),[r,n]);return sY(a)?m.createElement(W9.Provider,{value:a},t):null}var S1=()=>m.useContext(W9),lY=m.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:a,height:i,minWidth:o=0,minHeight:s,maxHeight:c,children:u,debounce:d=0,id:f,className:p,onResize:h,style:g={}}=e,x=m.useRef(null),v=m.useRef();v.current=h,m.useImperativeHandle(t,()=>x.current);var[y,b]=m.useState({containerWidth:n.width,containerHeight:n.height}),w=m.useCallback((C,M)=>{b(T=>{var A=Math.round(C),E=Math.round(M);return T.containerWidth===A&&T.containerHeight===E?T:{containerWidth:A,containerHeight:E}})},[]);m.useEffect(()=>{if(x.current==null||typeof ResizeObserver>"u")return iu;var C=E=>{var _,{width:L,height:I}=E[0].contentRect;w(L,I),(_=v.current)===null||_===void 0||_.call(v,L,I)};d>0&&(C=ZG(C,d,{trailing:!0,leading:!1}));var M=new ResizeObserver(C),{width:T,height:A}=x.current.getBoundingClientRect();return w(T,A),M.observe(x.current),()=>{M.disconnect()}},[w,d]);var{containerWidth:j,containerHeight:N}=y;ef(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:P}=H9(j,N,{width:a,height:i,aspect:r,maxHeight:c});return ef(S!=null&&S>0||P!=null&&P>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,S,P,a,i,o,s,r),m.createElement("div",{id:f?"".concat(f):void 0,className:ve("recharts-responsive-container",p),style:n5(n5({},g),{},{width:a,height:i,minWidth:o,minHeight:s,maxHeight:c}),ref:x},m.createElement("div",{style:rY({width:a,height:i})},m.createElement(K9,{width:S,height:P},u)))}),ad=m.forwardRef((e,t)=>{var r=S1();if(Bn(r.width)&&Bn(r.height))return e.children;var{width:n,height:a}=nY({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:o}=H9(void 0,void 0,{width:n,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return te(i)&&te(o)?m.createElement(K9,{width:i,height:o},e.children):m.createElement(lY,Ey({},e,{width:n,height:a,ref:t}))});function G9(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Mp=()=>{var e,t=Lt(),r=ie(YG),n=ie(Tp),a=(e=ie(Op))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},cY={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Y9=()=>{var e;return(e=ie(kt))!==null&&e!==void 0?e:cY},P1=()=>ie(Aa),C1=()=>ie(Oa),uY=()=>ie(e=>e.layout.margin),ge=e=>e.layout.layoutType,_i=()=>ie(ge),dY=()=>{var e=_i();if(e==="horizontal"||e==="vertical")return e},fY=()=>{var e=_i();return e!==void 0},Ip=e=>{var t=De(),r=Lt(),{width:n,height:a}=e,i=S1(),o=n,s=a;return i&&(o=i.width>0?i.width:n,s=i.height>0?i.height:a),m.useEffect(()=>{!r&&Bn(o)&&Bn(s)&&t(bG({width:o,height:s}))},[t,r,o,s]),null},pY={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},q9=ar({name:"legend",initialState:pY,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:He()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,a=xn(e).payload.indexOf(r);a>-1&&(e.payload[a]=n)},prepare:He()},removeLegendPayload:{reducer(e,t){var r=xn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:He()}}}),{setLegendSize:a5,setLegendSettings:mY,addLegendPayload:X9,replaceLegendPayload:Z9,removeLegendPayload:Q9}=q9.actions,hY=q9.reducer,gY=["contextPayload"];function Ay(){return Ay=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t(mY(e))},[t,e]),null}function PY(e){var t=De();return m.useEffect(()=>(t(a5(e)),()=>{t(a5({width:0,height:0}))}),[t,e]),null}function CY(e,t,r,n){return e==="vertical"&&te(t)?{height:t}:e==="horizontal"?{width:r||n}:null}var EY={align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function Fl(e){var t=ct(e,EY),r=gG(),n=DW(),a=uY(),{width:i,height:o,wrapperStyle:s,portal:c}=t,[u,d]=M9([r]),f=P1(),p=C1();if(f==null||p==null)return null;var h=f-((a==null?void 0:a.left)||0)-((a==null?void 0:a.right)||0),g=CY(t.layout,o,i,h),x=c?s:$s($s({position:"absolute",width:(g==null?void 0:g.width)||i||"auto",height:(g==null?void 0:g.height)||o||"auto"},NY(s,t,a,f,p,u)),s),v=c??n;if(v==null||r==null)return null;var y=m.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:d},m.createElement(SY,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!c&&m.createElement(PY,{width:u.width,height:u.height}),m.createElement(jY,Ay({},t,g,{margin:a,chartWidth:f,chartHeight:p,contextPayload:r})));return pi.createPortal(y,v)}Fl.displayName="Legend";function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:a={},payload:i,formatter:o,itemSorter:s,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:p=!1}=e,h=()=>{if(i&&i.length){var N={padding:0,margin:0},S=(s?Cp(i,s):i).map((P,C)=>{if(P.type==="none")return null;var M=P.formatter||o||MY,{value:T,name:A}=P,E=T,_=A;if(M){var L=M(T,A,P,C,i);if(Array.isArray(L))[E,_]=L;else if(L!=null)E=L;else return null}var I=kh({display:"block",paddingTop:4,paddingBottom:4,color:P.color||"#000"},n);return m.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(C),style:I},zn(_)?m.createElement("span",{className:"recharts-tooltip-item-name"},_):null,zn(_)?m.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,m.createElement("span",{className:"recharts-tooltip-item-value"},E),m.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return m.createElement("ul",{className:"recharts-tooltip-item-list",style:N},S)}return null},g=kh({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),x=kh({margin:0},a),v=!Ve(d),y=v?d:"",b=ve("recharts-default-tooltip",c),w=ve("recharts-tooltip-label",u);v&&f&&i!==void 0&&i!==null&&(y=f(d,i));var j=p?{role:"status","aria-live":"assertive"}:{};return m.createElement("div",Oy({className:b,style:g},j),m.createElement("p",{className:w,style:x},m.isValidElement(y)?y:"".concat(y)),h())},Nl="recharts-tooltip-wrapper",_Y={visibility:"hidden"};function LY(e){var{coordinate:t,translateX:r,translateY:n}=e;return ve(Nl,{["".concat(Nl,"-right")]:te(r)&&t&&te(t.x)&&r>=t.x,["".concat(Nl,"-left")]:te(r)&&t&&te(t.x)&&r=t.y,["".concat(Nl,"-top")]:te(n)&&t&&te(t.y)&&n0?a:0),f=r[n]+a;if(t[n])return o[n]?d:f;var p=c[n];if(p==null)return 0;if(o[n]){var h=d,g=p;return hv?Math.max(d,p):Math.max(f,p)}function DY(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function RY(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:a,reverseDirection:i,tooltipBox:o,useTranslate3d:s,viewBox:c}=e,u,d,f;return o.height>0&&o.width>0&&r?(d=s5({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),f=s5({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=DY({translateX:d,translateY:f,useTranslate3d:s})):u=_Y,{cssProperties:u,cssClasses:LY({translateX:d,translateY:f,coordinate:r})}}function l5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function id(e){for(var t=1;t{if(t.key==="Escape"){var r,n,a,i;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(a=(i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==null&&a!==void 0?a:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:a,children:i,coordinate:o,hasPayload:s,isAnimationActive:c,offset:u,position:d,reverseDirection:f,useTranslate3d:p,viewBox:h,wrapperStyle:g,lastBoundingBox:x,innerRef:v,hasPortalFromProps:y}=this.props,{cssClasses:b,cssProperties:w}=RY({allowEscapeViewBox:r,coordinate:o,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:{height:x.height,width:x.width},useTranslate3d:p,viewBox:h}),j=y?{}:id(id({transition:c&&t?"transform ".concat(n,"ms ").concat(a):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),N=id(id({},j),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},g);return m.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:N,ref:v},i)}}var J9=()=>{var e;return(e=ie(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function My(){return My=Object.assign?Object.assign.bind():function(e){for(var t=1;tIe(e.x)&&Ie(e.y),f5=e=>e.base!=null&&tf(e.base)&&tf(e),Sl=e=>e.x,Pl=e=>e.y,HY=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(au(e));return(r==="curveMonotone"||r==="curveBump")&&t?d5["".concat(r).concat(t==="vertical"?"Y":"X")]:d5[r]||bp},WY=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:a,connectNulls:i=!1}=e,o=HY(t,a),s=i?r.filter(tf):r,c;if(Array.isArray(n)){var u=r.map((h,g)=>u5(u5({},h),{},{base:n[g]}));a==="vertical"?c=td().y(Pl).x1(Sl).x0(h=>h.base.x):c=td().x(Sl).y1(Pl).y0(h=>h.base.y);var d=c.defined(f5).curve(o),f=i?u.filter(f5):u;return d(f)}a==="vertical"&&te(n)?c=td().y(Pl).x1(Sl).x0(n):te(n)?c=td().x(Sl).y1(Pl).y0(n):c=F7().x(Sl).y(Pl);var p=c.defined(tf).curve(o);return p(s)},ws=e=>{var{className:t,points:r,path:n,pathRef:a}=e,i=_i();if((!r||!r.length)&&!n)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||i,connectNulls:e.connectNulls},s=r&&r.length?WY(o):n;return m.createElement("path",My({},pr(e),d1(e),{className:ve("recharts-curve",t),d:s===null?void 0:s,ref:a}))},KY=["x","y","top","left","width","height","className"];function Iy(){return Iy=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(a,"v").concat(n,"M").concat(i,",").concat(t,"h").concat(r),eq=e=>{var{x:t=0,y:r=0,top:n=0,left:a=0,width:i=0,height:o=0,className:s}=e,c=ZY(e,KY),u=GY({x:t,y:r,top:n,left:a,width:i,height:o},c);return!te(t)||!te(r)||!te(i)||!te(o)||!te(n)||!te(a)?null:m.createElement("path",Iy({},nr(u),{className:ve("recharts-cross",s),d:JY(t,r,i,o,n,a)}))};function tq(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function m5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function h5(e){for(var t=1;te.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),eC=(e,t,r)=>e.map(n=>"".concat(iq(n)," ").concat(t,"ms ").concat(r)).join(","),oq=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(a=>n.includes(a))),Dc=(e,t)=>Object.keys(t).reduce((r,n)=>h5(h5({},r),{},{[n]:e(n,t[n])}),{});function g5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;te+(t-e)*r,_y=e=>{var{from:t,to:r}=e;return t!==r},tC=(e,t,r)=>{var n=Dc((a,i)=>{if(_y(i)){var[o,s]=e(i.from,i.to,i.velocity);return bt(bt({},i),{},{from:o,velocity:s})}return i},t);return r<1?Dc((a,i)=>_y(i)&&n[a]!=null?bt(bt({},i),{},{velocity:rf(i.velocity,n[a].velocity,r),from:rf(i.from,n[a].from,r)}):i,t):tC(e,n,r-1)};function uq(e,t,r,n,a,i){var o,s=n.reduce((p,h)=>bt(bt({},p),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),c=()=>Dc((p,h)=>h.from,s),u=()=>!Object.values(s).filter(_y).length,d=null,f=p=>{o||(o=p);var h=p-o,g=h/r.dt;s=tC(r,s,g),a(bt(bt(bt({},e),t),c())),o=p,u()||(d=i.setTimeout(f))};return()=>(d=i.setTimeout(f),()=>{var p;(p=d)===null||p===void 0||p()})}function dq(e,t,r,n,a,i,o){var s=null,c=a.reduce((f,p)=>{var h=e[p],g=t[p];return h==null||g==null?f:bt(bt({},f),{},{[p]:[h,g]})},{}),u,d=f=>{u||(u=f);var p=(f-u)/n,h=Dc((x,v)=>rf(...v,r(p)),c);if(i(bt(bt(bt({},e),t),h)),p<1)s=o.setTimeout(d);else{var g=Dc((x,v)=>rf(...v,r(1)),c);i(bt(bt(bt({},e),t),g))}};return()=>(s=o.setTimeout(d),()=>{var f;(f=s)===null||f===void 0||f()})}const fq=(e,t,r,n,a,i)=>{var o=oq(e,t);return r==null?()=>(a(bt(bt({},e),t)),()=>{}):r.isStepper===!0?uq(e,t,r,o,a,i):dq(e,t,r,n,o,a,i)};var nf=1e-4,rC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],nC=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),y5=(e,t)=>r=>{var n=rC(e,t);return nC(n,r)},pq=(e,t)=>r=>{var n=rC(e,t),a=[...n.map((i,o)=>i*o).slice(1),0];return nC(a,r)},mq=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(i=>parseFloat(i));return[a[0],a[1],a[2],a[3]]},hq=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var a=y5(e,r),i=y5(t,n),o=pq(e,r),s=u=>u>1?1:u<0?0:u,c=u=>{for(var d=u>1?1:u,f=d,p=0;p<8;++p){var h=a(f)-d,g=o(f);if(Math.abs(h-d)0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:a=17}=t,i=(o,s,c)=>{var u=-(o-s)*r,d=c*n,f=c+(u-d)*a/1e3,p=c*a/1e3+o;return Math.abs(p-s){if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return v5(e);case"spring":return yq();default:if(e.split("(")[0]==="cubic-bezier")return v5(e)}return typeof e=="function"?e:null};function xq(e){var t,r=()=>null,n=!1,a=null,i=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,[c,...u]=s;if(typeof c=="number"){a=e.setTimeout(i.bind(null,u),c);return}i(c),a=e.setTimeout(i.bind(null,u));return}typeof o=="string"&&(t=o,r(t)),typeof o=="object"&&(t=o,r(t)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,a&&(a(),a=null),i(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>e}}class bq{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,i=o=>{o-n>=r?t(o):typeof requestAnimationFrame=="function"&&(a=requestAnimationFrame(i))};return a=requestAnimationFrame(i),()=>{a!=null&&cancelAnimationFrame(a)}}}function wq(){return xq(new bq)}var kq=m.createContext(wq);function jq(e,t){var r=m.useContext(kq);return m.useMemo(()=>t??r(e),[e,t,r])}var Nq=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),lu={devToolsEnabled:!0,isSsr:Nq()},Sq={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},x5={t:0},jh={t:1};function Zs(e){var t=ct(e,Sq),{isActive:r,canBegin:n,duration:a,easing:i,begin:o,onAnimationEnd:s,onAnimationStart:c,children:u}=t,d=r==="auto"?!lu.isSsr:r,f=jq(t.animationId,t.animationManager),[p,h]=m.useState(d?x5:jh),g=m.useRef(null);return m.useEffect(()=>{d||h(jh)},[d]),m.useEffect(()=>{if(!d||!n)return iu;var x=fq(x5,jh,vq(i),a,h,f.getTimeoutController()),v=()=>{g.current=x()};return f.start([c,o,v,a,s]),()=>{f.stop(),g.current&&g.current(),s()}},[d,n,a,i,o,c,s,f]),u(p.t)}function Qs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=m.useRef(Lc(t)),n=m.useRef(e);return n.current!==e&&(r.current=Lc(t),n.current=e),r.current}var Pq=["radius"],Cq=["radius"],b5,w5,k5,j5,N5,S5,P5,C5,E5,A5;function O5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function T5(e){for(var t=1;t{var i=Ja(r),o=Ja(n),s=Math.min(Math.abs(i)/2,Math.abs(o)/2),c=o>=0?1:-1,u=i>=0?1:-1,d=o>=0&&i>=0||o<0&&i<0?1:0,f;if(s>0&&a instanceof Array){for(var p=[0,0,0,0],h=0,g=4;hs?s:a[h];f=at(b5||(b5=Pn(["M",",",""])),e,t+c*p[0]),p[0]>0&&(f+=at(w5||(w5=Pn(["A ",",",",0,0,",",",",",""])),p[0],p[0],d,e+u*p[0],t)),f+=at(k5||(k5=Pn(["L ",",",""])),e+r-u*p[1],t),p[1]>0&&(f+=at(j5||(j5=Pn(["A ",",",",0,0,",`, + `,",",""])),p[1],p[1],d,e+r,t+c*p[1])),f+=at(N5||(N5=Pn(["L ",",",""])),e+r,t+n-c*p[2]),p[2]>0&&(f+=at(S5||(S5=Pn(["A ",",",",0,0,",`, + `,",",""])),p[2],p[2],d,e+r-u*p[2],t+n)),f+=at(P5||(P5=Pn(["L ",",",""])),e+u*p[3],t+n),p[3]>0&&(f+=at(C5||(C5=Pn(["A ",",",",0,0,",`, + `,",",""])),p[3],p[3],d,e,t+n-c*p[3])),f+="Z"}else if(s>0&&a===+a&&a>0){var x=Math.min(s,a);f=at(E5||(E5=Pn(["M ",",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",","," Z"])),e,t+c*x,x,x,d,e+u*x,t,e+r-u*x,t,x,x,d,e+r,t+c*x,e+r,t+n-c*x,x,x,d,e+r-u*x,t+n,e+u*x,t+n,x,x,d,e,t+n-c*x)}else f=at(A5||(A5=Pn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return f},_5={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aC=e=>{var t=ct(e,_5),r=m.useRef(null),[n,a]=m.useState(-1);m.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var B=r.current.getTotalLength();B&&a(B)}catch{}},[]);var{x:i,y:o,width:s,height:c,radius:u,className:d}=t,{animationEasing:f,animationDuration:p,animationBegin:h,isAnimationActive:g,isUpdateAnimationActive:x}=t,v=m.useRef(s),y=m.useRef(c),b=m.useRef(i),w=m.useRef(o),j=m.useMemo(()=>({x:i,y:o,width:s,height:c,radius:u}),[i,o,s,c,u]),N=Qs(j,"rectangle-");if(i!==+i||o!==+o||s!==+s||c!==+c||s===0||c===0)return null;var S=ve("recharts-rectangle",d);if(!x){var P=nr(t),C=M5(P,Pq);return m.createElement("path",af({},C,{x:Ja(i),y:Ja(o),width:Ja(s),height:Ja(c),radius:typeof u=="number"?u:void 0,className:S,d:I5(i,o,s,c,u)}))}var M=v.current,T=y.current,A=b.current,E=w.current,_="0px ".concat(n===-1?1:n,"px"),L="".concat(n,"px 0px"),I=eC(["strokeDasharray"],p,typeof f=="string"?f:_5.animationEasing);return m.createElement(Zs,{animationId:N,key:N,canBegin:n>0,duration:p,easing:f,isActive:x,begin:h},B=>{var V=je(M,s,B),O=je(T,c,B),R=je(A,i,B),U=je(E,o,B);r.current&&(v.current=V,y.current=O,b.current=R,w.current=U);var q;g?B>0?q={transition:I,strokeDasharray:L}:q={strokeDasharray:_}:q={strokeDasharray:L};var ee=nr(t),oe=M5(ee,Cq);return m.createElement("path",af({},oe,{radius:typeof u=="number"?u:void 0,className:S,d:I5(R,U,V,O,u),ref:r,style:T5(T5({},q),t.style)}))})};function L5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function D5(e){for(var t=1;te*180/Math.PI,gt=(e,t,r,n)=>({x:e+Math.cos(-of*n)*r,y:t+Math.sin(-of*n)*r}),iC=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Dq=(e,t)=>{var{x:r,y:n}=e,{x:a,y:i}=t;return Math.sqrt((r-a)**2+(n-i)**2)},Rq=(e,t)=>{var{x:r,y:n}=e,{cx:a,cy:i}=t,o=Dq({x:r,y:n},{x:a,y:i});if(o<=0)return{radius:o,angle:0};var s=(r-a)/o,c=Math.acos(s);return n>i&&(c=2*Math.PI-c),{radius:o,angle:Lq(c),angleInRadian:c}},$q=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),a=Math.floor(r/360),i=Math.min(n,a);return{startAngle:t-i*360,endAngle:r-i*360}},zq=(e,t)=>{var{startAngle:r,endAngle:n}=t,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return e+o*360},Bq=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:a,angle:i}=Rq({x:r,y:n},t),{innerRadius:o,outerRadius:s}=t;if(as||a===0)return null;var{startAngle:c,endAngle:u}=$q(t),d=i,f;if(c<=u){for(;d>u;)d-=360;for(;d=c&&d<=u}else{for(;d>c;)d-=360;for(;d=u&&d<=c}return f?D5(D5({},t),{},{radius:a,angle:zq(d,t)}):null};function oC(e){var{cx:t,cy:r,radius:n,startAngle:a,endAngle:i}=e,o=gt(t,r,n,a),s=gt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}var R5,$5,z5,B5,F5,V5,U5;function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Mt(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},od=e=>{var{cx:t,cy:r,radius:n,angle:a,sign:i,isExternal:o,cornerRadius:s,cornerIsExternal:c}=e,u=s*(o?1:-1)+n,d=Math.asin(s/u)/of,f=c?a:a+i*d,p=gt(t,r,u,f),h=gt(t,r,n,f),g=c?a-i*d:a,x=gt(t,r,u*Math.cos(d*of),g);return{center:p,circleTangency:h,lineTangency:x,theta:d}},sC=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:i,endAngle:o}=e,s=Fq(i,o),c=i+s,u=gt(t,r,a,i),d=gt(t,r,a,c),f=at(R5||(R5=Qi(["M ",",",` + A `,",",`,0, + `,",",`, + `,",",` + `])),u.x,u.y,a,a,+(Math.abs(s)>180),+(i>c),d.x,d.y);if(n>0){var p=gt(t,r,n,i),h=gt(t,r,n,c);f+=at($5||($5=Qi(["L ",",",` + A `,",",`,0, + `,",",`, + `,","," Z"])),h.x,h.y,n,n,+(Math.abs(s)>180),+(i<=c),p.x,p.y)}else f+=at(z5||(z5=Qi(["L ",","," Z"])),t,r);return f},Vq=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:a,cornerRadius:i,forceCornerRadius:o,cornerIsExternal:s,startAngle:c,endAngle:u}=e,d=Mt(u-c),{circleTangency:f,lineTangency:p,theta:h}=od({cx:t,cy:r,radius:a,angle:c,sign:d,cornerRadius:i,cornerIsExternal:s}),{circleTangency:g,lineTangency:x,theta:v}=od({cx:t,cy:r,radius:a,angle:u,sign:-d,cornerRadius:i,cornerIsExternal:s}),y=s?Math.abs(c-u):Math.abs(c-u)-h-v;if(y<0)return o?at(B5||(B5=Qi(["M ",",",` + a`,",",",0,0,1,",`,0 + a`,",",",0,0,1,",`,0 + `])),p.x,p.y,i,i,i*2,i,i,-i*2):sC({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:c,endAngle:u});var b=at(F5||(F5=Qi(["M ",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",",` + `])),p.x,p.y,i,i,+(d<0),f.x,f.y,a,a,+(y>180),+(d<0),g.x,g.y,i,i,+(d<0),x.x,x.y);if(n>0){var{circleTangency:w,lineTangency:j,theta:N}=od({cx:t,cy:r,radius:n,angle:c,sign:d,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),{circleTangency:S,lineTangency:P,theta:C}=od({cx:t,cy:r,radius:n,angle:u,sign:-d,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),M=s?Math.abs(c-u):Math.abs(c-u)-N-C;if(M<0&&i===0)return"".concat(b,"L").concat(t,",").concat(r,"Z");b+=at(V5||(V5=Qi(["L",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",","Z"])),P.x,P.y,i,i,+(d<0),S.x,S.y,n,n,+(M>180),+(d>0),w.x,w.y,i,i,+(d<0),j.x,j.y)}else b+=at(U5||(U5=Qi(["L",",","Z"])),t,r);return b},Uq={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},lC=e=>{var t=ct(e,Uq),{cx:r,cy:n,innerRadius:a,outerRadius:i,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(i0&&Math.abs(u-d)<360?x=Vq({cx:r,cy:n,innerRadius:a,outerRadius:i,cornerRadius:Math.min(g,h/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:u,endAngle:d}):x=sC({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:d}),m.createElement("path",Ly({},nr(t),{className:p,d:x}))};function Hq(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(n9(t)){if(e==="centric"){var{cx:n,cy:a,innerRadius:i,outerRadius:o,angle:s}=t,c=gt(n,a,i,s),u=gt(n,a,o,s);return[{x:c.x,y:c.y},{x:u.x,y:u.y}]}return oC(t)}}var cC={},uC={},dC={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=k1;function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(dC);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dC;function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(uC);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=j1,r=uC;function n(a,i,o){o&&typeof o!="number"&&t.isIterateeCall(a,i,o)&&(i=o=void 0),a=r.toFinite(a),i===void 0?(i=a,a=0):i=r.toFinite(i),o=o===void 0?at?1:e>=t?0:NaN}function Kq(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function E1(e){let t,r,n;e.length!==2?(t=ui,r=(s,c)=>ui(e(s),c),n=(s,c)=>e(s)-c):(t=e===ui||e===Kq?e:Gq,r=e,n=e);function a(s,c,u=0,d=s.length){if(u>>1;r(s[f],c)<0?u=f+1:d=f}while(u>>1;r(s[f],c)<=0?u=f+1:d=f}while(uu&&n(s[f-1],c)>-n(s[f],c)?f-1:f}return{left:a,center:o,right:i}}function Gq(){return 0}function pC(e){return e===null?NaN:+e}function*Yq(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const qq=E1(ui),cu=qq.right;E1(pC).center;class H5 extends Map{constructor(t,r=Qq){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(W5(this,t))}has(t){return super.has(W5(this,t))}set(t,r){return super.set(Xq(this,t),r)}delete(t){return super.delete(Zq(this,t))}}function W5({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Xq({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Zq({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Qq(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Jq(e=ui){if(e===ui)return mC;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function mC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const eX=Math.sqrt(50),tX=Math.sqrt(10),rX=Math.sqrt(2);function sf(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=eX?10:i>=tX?5:i>=rX?2:1;let s,c,u;return a<0?(u=Math.pow(10,-a)/o,s=Math.round(e*u),c=Math.round(t*u),s/ut&&--c,u=-u):(u=Math.pow(10,a)*o,s=Math.round(e/u),c=Math.round(t/u),s*ut&&--c),c0))return[];if(e===t)return[e];const n=t=a))return[];const s=i-a+1,c=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function G5(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function hC(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?mC:Jq(a);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),h=Math.max(r,Math.floor(t-u*f/c+p)),g=Math.min(n,Math.floor(t+(c-u)*f/c+p));hC(e,t,h,g,a)}const i=e[t];let o=r,s=n;for(Cl(e,r,t),a(e[n],i)>0&&Cl(e,r,n);o0;)--s}a(e[r],i)===0?Cl(e,r,s):(++s,Cl(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Cl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function nX(e,t,r){if(e=Float64Array.from(Yq(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return G5(e);if(t>=1)return K5(e);var n,a=(n-1)*t,i=Math.floor(a),o=K5(hC(e,i).subarray(0,i+1)),s=G5(e.subarray(i+1));return o+(s-o)*(a-i)}}function aX(e,t,r=pC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function iX(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?sd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?sd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=lX.exec(e))?new xr(t[1],t[2],t[3],1):(t=cX.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uX.exec(e))?sd(t[1],t[2],t[3],t[4]):(t=dX.exec(e))?sd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fX.exec(e))?ek(t[1],t[2]/100,t[3]/100,1):(t=pX.exec(e))?ek(t[1],t[2]/100,t[3]/100,t[4]):Y5.hasOwnProperty(e)?Z5(Y5[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function Z5(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function sd(e,t,r,n){return n<=0&&(e=t=r=NaN),new xr(e,t,r,n)}function gX(e){return e instanceof uu||(e=zc(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function By(e,t,r,n){return arguments.length===1?gX(e):new xr(e,t,r,n??1)}function xr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}T1(xr,By,yC(uu,{brighter(e){return e=e==null?lf:Math.pow(lf,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rc:Math.pow(Rc,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(fo(this.r),fo(this.g),fo(this.b),cf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Q5,formatHex:Q5,formatHex8:yX,formatRgb:J5,toString:J5}));function Q5(){return`#${Ji(this.r)}${Ji(this.g)}${Ji(this.b)}`}function yX(){return`#${Ji(this.r)}${Ji(this.g)}${Ji(this.b)}${Ji((isNaN(this.opacity)?1:this.opacity)*255)}`}function J5(){const e=cf(this.opacity);return`${e===1?"rgb(":"rgba("}${fo(this.r)}, ${fo(this.g)}, ${fo(this.b)}${e===1?")":`, ${e})`}`}function cf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ji(e){return e=fo(e),(e<16?"0":"")+e.toString(16)}function ek(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new gn(e,t,r,n)}function vC(e){if(e instanceof gn)return new gn(e.h,e.s,e.l,e.opacity);if(e instanceof uu||(e=zc(e)),!e)return new gn;if(e instanceof gn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,c=(i+a)/2;return s?(t===i?o=(r-n)/s+(r0&&c<1?0:o,new gn(o,s,c,e.opacity)}function vX(e,t,r,n){return arguments.length===1?vC(e):new gn(e,t,r,n??1)}function gn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}T1(gn,vX,yC(uu,{brighter(e){return e=e==null?lf:Math.pow(lf,e),new gn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rc:Math.pow(Rc,e),new gn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new xr(Nh(e>=240?e-240:e+120,a,n),Nh(e,a,n),Nh(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new gn(tk(this.h),ld(this.s),ld(this.l),cf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=cf(this.opacity);return`${e===1?"hsl(":"hsla("}${tk(this.h)}, ${ld(this.s)*100}%, ${ld(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tk(e){return e=(e||0)%360,e<0?e+360:e}function ld(e){return Math.max(0,Math.min(1,e||0))}function Nh(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const M1=e=>()=>e;function xX(e,t){return function(r){return e+r*t}}function bX(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function wX(e){return(e=+e)==1?xC:function(t,r){return r-t?bX(t,r,e):M1(isNaN(t)?r:t)}}function xC(e,t){var r=t-e;return r?xX(e,r):M1(isNaN(e)?t:e)}const rk=function e(t){var r=wX(t);function n(a,i){var o=r((a=By(a)).r,(i=By(i)).r),s=r(a.g,i.g),c=r(a.b,i.b),u=xC(a.opacity,i.opacity);return function(d){return a.r=o(d),a.g=s(d),a.b=c(d),a.opacity=u(d),a+""}}return n.gamma=e,n}(1);function kX(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;ar&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,c.push({i:o,x:uf(n,a)})),r=Sh.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function IX(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a2?_X:IX,c=u=null,f}function f(p){return p==null||isNaN(p=+p)?i:(c||(c=s(e.map(n),t,r)))(n(o(p)))}return f.invert=function(p){return o(a((u||(u=s(t,e.map(n),uf)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,df),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),r=I1,d()},f.clamp=function(p){return arguments.length?(o=p?!0:ur,d()):o!==ur},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,h){return n=p,a=h,d()}}function _1(){return _p()(ur,ur)}function LX(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ff(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function zs(e){return e=ff(Math.abs(e)),e?e[1]:NaN}function DX(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],c=0;a>0&&s>0&&(c+s+1>n&&(s=Math.max(1,n-c)),i.push(r.substring(a-=s,a+s)),!((c+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function RX(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var $X=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bc(e){if(!(t=$X.exec(e)))throw new Error("invalid format: "+e);var t;return new L1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Bc.prototype=L1.prototype;function L1(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}L1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function zX(e){e:for(var t=e.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var bC;function BX(e,t){var r=ff(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(bC=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+ff(e,Math.max(0,t+i-1))[0]}function ak(e,t){var r=ff(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const ik={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:LX,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ak(e*100,t),r:ak,s:BX,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ok(e){return e}var sk=Array.prototype.map,lk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function FX(e){var t=e.grouping===void 0||e.thousands===void 0?ok:DX(sk.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?ok:RX(sk.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Bc(f);var p=f.fill,h=f.align,g=f.sign,x=f.symbol,v=f.zero,y=f.width,b=f.comma,w=f.precision,j=f.trim,N=f.type;N==="n"?(b=!0,N="g"):ik[N]||(w===void 0&&(w=12),j=!0,N="g"),(v||p==="0"&&h==="=")&&(v=!0,p="0",h="=");var S=x==="$"?r:x==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():"",P=x==="$"?n:/[%p]/.test(N)?o:"",C=ik[N],M=/[defgprs%]/.test(N);w=w===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function T(A){var E=S,_=P,L,I,B;if(N==="c")_=C(A)+_,A="";else{A=+A;var V=A<0||1/A<0;if(A=isNaN(A)?c:C(Math.abs(A),w),j&&(A=zX(A)),V&&+A==0&&g!=="+"&&(V=!1),E=(V?g==="("?g:s:g==="-"||g==="("?"":g)+E,_=(N==="s"?lk[8+bC/3]:"")+_+(V&&g==="("?")":""),M){for(L=-1,I=A.length;++LB||B>57){_=(B===46?a+A.slice(L+1):A.slice(L))+_,A=A.slice(0,L);break}}}b&&!v&&(A=t(A,1/0));var O=E.length+A.length+_.length,R=O>1)+E+A+_+R.slice(O);break;default:A=R+E+A+_;break}return i(A)}return T.toString=function(){return f+""},T}function d(f,p){var h=u((f=Bc(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(zs(p)/3)))*3,x=Math.pow(10,-g),v=lk[8+g/3];return function(y){return h(x*y)+v}}return{format:u,formatPrefix:d}}var cd,D1,wC;VX({thousands:",",grouping:[3],currency:["$",""]});function VX(e){return cd=FX(e),D1=cd.format,wC=cd.formatPrefix,cd}function UX(e){return Math.max(0,-zs(Math.abs(e)))}function HX(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(zs(t)/3)))*3-zs(Math.abs(e)))}function WX(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,zs(t)-zs(e))+1}function kC(e,t,r,n){var a=$y(e,t,r),i;switch(n=Bc(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=HX(a,o))&&(n.precision=i),wC(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=WX(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=UX(a))&&(n.precision=i-(n.type==="%")*2);break}}return D1(n)}function Li(e){var t=e.domain;return e.ticks=function(r){var n=t();return Dy(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return kC(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],c,u,d=10;for(s0;){if(u=Ry(o,s,r),u===c)return n[a]=o,n[i]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;c=u}return e},e}function jC(){var e=_1();return e.copy=function(){return du(e,jC())},ln.apply(e,arguments),Li(e)}function NC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,df),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return NC(e).unknown(t)},e=arguments.length?Array.from(e,df):[0,1],Li(r)}function SC(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return iMath.pow(e,t)}function XX(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dk(e){return(t,r)=>-e(-t,r)}function R1(e){const t=e(ck,uk),r=t.domain;let n=10,a,i;function o(){return a=XX(n),i=qX(n),r()[0]<0?(a=dk(a),i=dk(i),e(KX,GX)):e(ck,uk),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const c=r();let u=c[0],d=c[c.length-1];const f=d0){for(;p<=h;++p)for(g=1;gd)break;y.push(x)}}else for(;p<=h;++p)for(g=n-1;g>=1;--g)if(x=p>0?g/i(-p):g*i(p),!(xd)break;y.push(x)}y.length*2{if(s==null&&(s=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Bc(c)).precision==null&&(c.trim=!0),c=D1(c)),s===1/0)return c;const u=Math.max(1,n*s/t.ticks().length);return d=>{let f=d/i(Math.round(a(d)));return f*nr(SC(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function PC(){const e=R1(_p()).domain([1,10]);return e.copy=()=>du(e,PC()).base(e.base()),ln.apply(e,arguments),e}function fk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $1(e){var t=1,r=e(fk(t),pk(t));return r.constant=function(n){return arguments.length?e(fk(t=+n),pk(t)):t},Li(r)}function CC(){var e=$1(_p());return e.copy=function(){return du(e,CC()).constant(e.constant())},ln.apply(e,arguments)}function mk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ZX(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function QX(e){return e<0?-e*e:e*e}function z1(e){var t=e(ur,ur),r=1;function n(){return r===1?e(ur,ur):r===.5?e(ZX,QX):e(mk(r),mk(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Li(t)}function B1(){var e=z1(_p());return e.copy=function(){return du(e,B1()).exponent(e.exponent())},ln.apply(e,arguments),e}function JX(){return B1.apply(null,arguments).exponent(.5)}function hk(e){return Math.sign(e)*e*e}function eZ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function EC(){var e=_1(),t=[0,1],r=!1,n;function a(i){var o=eZ(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(hk(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,df)).map(hk)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return EC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ln.apply(a,arguments),Li(a)}function AC(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(c){return arguments.length&&(i=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return OC().domain([e,t]).range(a).unknown(i)},ln.apply(Li(o),arguments)}function TC(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[cu(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return TC().domain(e).range(t).unknown(r)},ln.apply(a,arguments)}const Ph=new Date,Ch=new Date;function jt(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const c=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i0))return c;let u;do c.push(u=new Date(+i)),t(i,s),e(i);while(ujt(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(Ph.setTime(+i),Ch.setTime(+o),e(Ph),e(Ch),Math.floor(r(Ph,Ch))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const pf=jt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);pf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?jt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):pf);pf.range;const oa=1e3,en=oa*60,sa=en*60,wa=sa*24,F1=wa*7,gk=wa*30,Eh=wa*365,eo=jt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*oa)},(e,t)=>(t-e)/oa,e=>e.getUTCSeconds());eo.range;const V1=jt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oa)},(e,t)=>{e.setTime(+e+t*en)},(e,t)=>(t-e)/en,e=>e.getMinutes());V1.range;const U1=jt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*en)},(e,t)=>(t-e)/en,e=>e.getUTCMinutes());U1.range;const H1=jt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oa-e.getMinutes()*en)},(e,t)=>{e.setTime(+e+t*sa)},(e,t)=>(t-e)/sa,e=>e.getHours());H1.range;const W1=jt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*sa)},(e,t)=>(t-e)/sa,e=>e.getUTCHours());W1.range;const fu=jt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*en)/wa,e=>e.getDate()-1);fu.range;const Lp=jt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wa,e=>e.getUTCDate()-1);Lp.range;const MC=jt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wa,e=>Math.floor(e/wa));MC.range;function Ro(e){return jt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*en)/F1)}const Dp=Ro(0),mf=Ro(1),tZ=Ro(2),rZ=Ro(3),Bs=Ro(4),nZ=Ro(5),aZ=Ro(6);Dp.range;mf.range;tZ.range;rZ.range;Bs.range;nZ.range;aZ.range;function $o(e){return jt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/F1)}const Rp=$o(0),hf=$o(1),iZ=$o(2),oZ=$o(3),Fs=$o(4),sZ=$o(5),lZ=$o(6);Rp.range;hf.range;iZ.range;oZ.range;Fs.range;sZ.range;lZ.range;const K1=jt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());K1.range;const G1=jt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());G1.range;const ka=jt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ka.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ka.range;const ja=jt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ja.range;function IC(e,t,r,n,a,i){const o=[[eo,1,oa],[eo,5,5*oa],[eo,15,15*oa],[eo,30,30*oa],[i,1,en],[i,5,5*en],[i,15,15*en],[i,30,30*en],[a,1,sa],[a,3,3*sa],[a,6,6*sa],[a,12,12*sa],[n,1,wa],[n,2,2*wa],[r,1,F1],[t,1,gk],[t,3,3*gk],[e,1,Eh]];function s(u,d,f){const p=dv).right(o,p);if(h===o.length)return e.every($y(u/Eh,d/Eh,f));if(h===0)return pf.every(Math.max($y(u,d,f),1));const[g,x]=o[p/o[h-1][2]53)return null;"w"in K||(K.w=1),"Z"in K?(Ae=Oh(El(K.y,0,1)),ir=Ae.getUTCDay(),Ae=ir>4||ir===0?hf.ceil(Ae):hf(Ae),Ae=Lp.offset(Ae,(K.V-1)*7),K.y=Ae.getUTCFullYear(),K.m=Ae.getUTCMonth(),K.d=Ae.getUTCDate()+(K.w+6)%7):(Ae=Ah(El(K.y,0,1)),ir=Ae.getDay(),Ae=ir>4||ir===0?mf.ceil(Ae):mf(Ae),Ae=fu.offset(Ae,(K.V-1)*7),K.y=Ae.getFullYear(),K.m=Ae.getMonth(),K.d=Ae.getDate()+(K.w+6)%7)}else("W"in K||"U"in K)&&("w"in K||(K.w="u"in K?K.u%7:"W"in K?1:0),ir="Z"in K?Oh(El(K.y,0,1)).getUTCDay():Ah(El(K.y,0,1)).getDay(),K.m=0,K.d="W"in K?(K.w+6)%7+K.W*7-(ir+5)%7:K.w+K.U*7-(ir+6)%7);return"Z"in K?(K.H+=K.Z/100|0,K.M+=K.Z%100,Oh(K)):Ah(K)}}function C(z,re,ce,K){for(var $t=0,Ae=re.length,ir=ce.length,or,Yn;$t=ir)return-1;if(or=re.charCodeAt($t++),or===37){if(or=re.charAt($t++),Yn=N[or in yk?re.charAt($t++):or],!Yn||(K=Yn(z,ce,K))<0)return-1}else if(or!=ce.charCodeAt(K++))return-1}return K}function M(z,re,ce){var K=u.exec(re.slice(ce));return K?(z.p=d.get(K[0].toLowerCase()),ce+K[0].length):-1}function T(z,re,ce){var K=h.exec(re.slice(ce));return K?(z.w=g.get(K[0].toLowerCase()),ce+K[0].length):-1}function A(z,re,ce){var K=f.exec(re.slice(ce));return K?(z.w=p.get(K[0].toLowerCase()),ce+K[0].length):-1}function E(z,re,ce){var K=y.exec(re.slice(ce));return K?(z.m=b.get(K[0].toLowerCase()),ce+K[0].length):-1}function _(z,re,ce){var K=x.exec(re.slice(ce));return K?(z.m=v.get(K[0].toLowerCase()),ce+K[0].length):-1}function L(z,re,ce){return C(z,t,re,ce)}function I(z,re,ce){return C(z,r,re,ce)}function B(z,re,ce){return C(z,n,re,ce)}function V(z){return o[z.getDay()]}function O(z){return i[z.getDay()]}function R(z){return c[z.getMonth()]}function U(z){return s[z.getMonth()]}function q(z){return a[+(z.getHours()>=12)]}function ee(z){return 1+~~(z.getMonth()/3)}function oe(z){return o[z.getUTCDay()]}function D(z){return i[z.getUTCDay()]}function Z(z){return c[z.getUTCMonth()]}function le(z){return s[z.getUTCMonth()]}function Q(z){return a[+(z.getUTCHours()>=12)]}function H(z){return 1+~~(z.getUTCMonth()/3)}return{format:function(z){var re=S(z+="",w);return re.toString=function(){return z},re},parse:function(z){var re=P(z+="",!1);return re.toString=function(){return z},re},utcFormat:function(z){var re=S(z+="",j);return re.toString=function(){return z},re},utcParse:function(z){var re=P(z+="",!0);return re.toString=function(){return z},re}}}var yk={"-":"",_:" ",0:"0"},Dt=/^\s*\d+/,mZ=/^%/,hZ=/[\\^$*+?|[\]().{}]/g;function ke(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i[t.toLowerCase(),r]))}function yZ(e,t,r){var n=Dt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function vZ(e,t,r){var n=Dt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function xZ(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function bZ(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function wZ(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function vk(e,t,r){var n=Dt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function xk(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function kZ(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function jZ(e,t,r){var n=Dt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function NZ(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function bk(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function SZ(e,t,r){var n=Dt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function wk(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function PZ(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function CZ(e,t,r){var n=Dt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function EZ(e,t,r){var n=Dt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function AZ(e,t,r){var n=Dt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function OZ(e,t,r){var n=mZ.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function TZ(e,t,r){var n=Dt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function MZ(e,t,r){var n=Dt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function kk(e,t){return ke(e.getDate(),t,2)}function IZ(e,t){return ke(e.getHours(),t,2)}function _Z(e,t){return ke(e.getHours()%12||12,t,2)}function LZ(e,t){return ke(1+fu.count(ka(e),e),t,3)}function _C(e,t){return ke(e.getMilliseconds(),t,3)}function DZ(e,t){return _C(e,t)+"000"}function RZ(e,t){return ke(e.getMonth()+1,t,2)}function $Z(e,t){return ke(e.getMinutes(),t,2)}function zZ(e,t){return ke(e.getSeconds(),t,2)}function BZ(e){var t=e.getDay();return t===0?7:t}function FZ(e,t){return ke(Dp.count(ka(e)-1,e),t,2)}function LC(e){var t=e.getDay();return t>=4||t===0?Bs(e):Bs.ceil(e)}function VZ(e,t){return e=LC(e),ke(Bs.count(ka(e),e)+(ka(e).getDay()===4),t,2)}function UZ(e){return e.getDay()}function HZ(e,t){return ke(mf.count(ka(e)-1,e),t,2)}function WZ(e,t){return ke(e.getFullYear()%100,t,2)}function KZ(e,t){return e=LC(e),ke(e.getFullYear()%100,t,2)}function GZ(e,t){return ke(e.getFullYear()%1e4,t,4)}function YZ(e,t){var r=e.getDay();return e=r>=4||r===0?Bs(e):Bs.ceil(e),ke(e.getFullYear()%1e4,t,4)}function qZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ke(t/60|0,"0",2)+ke(t%60,"0",2)}function jk(e,t){return ke(e.getUTCDate(),t,2)}function XZ(e,t){return ke(e.getUTCHours(),t,2)}function ZZ(e,t){return ke(e.getUTCHours()%12||12,t,2)}function QZ(e,t){return ke(1+Lp.count(ja(e),e),t,3)}function DC(e,t){return ke(e.getUTCMilliseconds(),t,3)}function JZ(e,t){return DC(e,t)+"000"}function eQ(e,t){return ke(e.getUTCMonth()+1,t,2)}function tQ(e,t){return ke(e.getUTCMinutes(),t,2)}function rQ(e,t){return ke(e.getUTCSeconds(),t,2)}function nQ(e){var t=e.getUTCDay();return t===0?7:t}function aQ(e,t){return ke(Rp.count(ja(e)-1,e),t,2)}function RC(e){var t=e.getUTCDay();return t>=4||t===0?Fs(e):Fs.ceil(e)}function iQ(e,t){return e=RC(e),ke(Fs.count(ja(e),e)+(ja(e).getUTCDay()===4),t,2)}function oQ(e){return e.getUTCDay()}function sQ(e,t){return ke(hf.count(ja(e)-1,e),t,2)}function lQ(e,t){return ke(e.getUTCFullYear()%100,t,2)}function cQ(e,t){return e=RC(e),ke(e.getUTCFullYear()%100,t,2)}function uQ(e,t){return ke(e.getUTCFullYear()%1e4,t,4)}function dQ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Fs(e):Fs.ceil(e),ke(e.getUTCFullYear()%1e4,t,4)}function fQ(){return"+0000"}function Nk(){return"%"}function Sk(e){return+e}function Pk(e){return Math.floor(+e/1e3)}var Fo,$C,zC;pQ({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function pQ(e){return Fo=pZ(e),$C=Fo.format,Fo.parse,zC=Fo.utcFormat,Fo.utcParse,Fo}function mQ(e){return new Date(e)}function hQ(e){return e instanceof Date?+e:+new Date(+e)}function Y1(e,t,r,n,a,i,o,s,c,u){var d=_1(),f=d.invert,p=d.domain,h=u(".%L"),g=u(":%S"),x=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),b=u("%b %d"),w=u("%B"),j=u("%Y");function N(S){return(c(S)t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>nX(e,i/n))},r.copy=function(){return UC(t).domain(e)},Ta.apply(r,arguments)}function zp(){var e=0,t=.5,r=1,n=1,a,i,o,s,c,u=ur,d,f=!1,p;function h(x){return isNaN(x=+x)?p:(x=.5+((x=+d(x))-i)*(n*xe.chartData,Bp=$([Ma],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Z1=(e,t,r,n)=>n?Bp(e):Ma(e),GC=(e,t,r)=>r?Bp(e):Ma(e);function ki(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Ie(t)&&Ie(r))return!0}return!1}function Ck(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function YC(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,a,i;if(Ie(r))a=r;else if(typeof r=="function")return;if(Ie(n))i=n;else if(typeof n=="function")return;var o=[a,i];if(ki(o))return o}}function bQ(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(ki(n))return Ck(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[a,i]=e,o,s;if(a==="auto")t!=null&&(o=Math.min(...t));else if(te(a))o=a;else if(typeof a=="function")try{t!=null&&(o=a(t==null?void 0:t[0]))}catch{}else if(typeof a=="string"&&Q3.test(a)){var c=Q3.exec(a);if(c==null||c[1]==null||t==null)o=void 0;else{var u=+c[1];o=t[0]-u}}else o=t==null?void 0:t[0];if(i==="auto")t!=null&&(s=Math.max(...t));else if(te(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t==null?void 0:t[1]))}catch{}else if(typeof i=="string"&&J3.test(i)){var d=J3.exec(i);if(d==null||d[1]==null||t==null)s=void 0;else{var f=+d[1];s=t[1]+f}}else s=t==null?void 0:t[1];var p=[o,s];if(ki(p))return t==null?p:Ck(p,t,r)}}}var el=1e9,wQ={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},J1,Ye=!0,sn="[DecimalError] ",po=sn+"Invalid argument: ",Q1=sn+"Exponent out of range: ",tl=Math.floor,Ki=Math.pow,kQ=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Er,At=1e7,Be=7,qC=9007199254740991,gf=tl(qC/Be),ae={};ae.absoluteValue=ae.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ae.comparedTo=ae.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=ne.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};ae.decimalPlaces=ae.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Be;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ae.dividedBy=ae.div=function(e){return da(this,new this.constructor(e))};ae.dividedToIntegerBy=ae.idiv=function(e){var t=this,r=t.constructor;return Me(da(t,new r(e),0,1),r.precision)};ae.equals=ae.eq=function(e){return!this.cmp(e)};ae.exponent=function(){return yt(this)};ae.greaterThan=ae.gt=function(e){return this.cmp(e)>0};ae.greaterThanOrEqualTo=ae.gte=function(e){return this.cmp(e)>=0};ae.isInteger=ae.isint=function(){return this.e>this.d.length-2};ae.isNegative=ae.isneg=function(){return this.s<0};ae.isPositive=ae.ispos=function(){return this.s>0};ae.isZero=function(){return this.s===0};ae.lessThan=ae.lt=function(e){return this.cmp(e)<0};ae.lessThanOrEqualTo=ae.lte=function(e){return this.cmp(e)<1};ae.logarithm=ae.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Er))throw Error(sn+"NaN");if(r.s<1)throw Error(sn+(r.s?"NaN":"-Infinity"));return r.eq(Er)?new n(0):(Ye=!1,t=da(Fc(r,i),Fc(e,i),i),Ye=!0,Me(t,a))};ae.minus=ae.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?QC(t,e):XC(t,(e.s=-e.s,e))};ae.modulo=ae.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(sn+"NaN");return r.s?(Ye=!1,t=da(r,e,0,1).times(e),Ye=!0,r.minus(t)):Me(new n(r),a)};ae.naturalExponential=ae.exp=function(){return ZC(this)};ae.naturalLogarithm=ae.ln=function(){return Fc(this)};ae.negated=ae.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ae.plus=ae.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?XC(t,e):QC(t,(e.s=-e.s,e))};ae.precision=ae.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(po+e);if(t=yt(a)+1,n=a.d.length-1,r=n*Be+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ae.squareRoot=ae.sqrt=function(){var e,t,r,n,a,i,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(sn+"NaN")}for(e=yt(s),Ye=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Tn(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=tl((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(a.toString()),r=c.precision,a=o=r+3;;)if(i=n,n=i.plus(da(s,i,o+2)).times(.5),Tn(i.d).slice(0,o)===(t=Tn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Me(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Ye=!0,Me(n,r)};ae.times=ae.mul=function(e){var t,r,n,a,i,o,s,c,u,d=this,f=d.constructor,p=d.d,h=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,c=p.length,u=h.length,c=0;){for(t=0,a=c+n;a>n;)s=i[a]+h[n]*p[a-n-1]+t,i[a--]=s%At|0,t=s/At|0;i[a]=(i[a]+t)%At|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Ye?Me(e,f.precision):e};ae.toDecimalPlaces=ae.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Fn(e,0,el),t===void 0?t=n.rounding:Fn(t,0,8),Me(r,e+yt(r)+1,t))};ae.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Oo(n,!0):(Fn(e,0,el),t===void 0?t=a.rounding:Fn(t,0,8),n=Me(new a(n),e+1,t),r=Oo(n,!0,e+1)),r};ae.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Oo(a):(Fn(e,0,el),t===void 0?t=i.rounding:Fn(t,0,8),n=Me(new i(a),e+yt(a)+1,t),r=Oo(n.abs(),!1,e+yt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};ae.toInteger=ae.toint=function(){var e=this,t=e.constructor;return Me(new t(e),yt(e)+1,t.rounding)};ae.toNumber=function(){return+this};ae.toPower=ae.pow=function(e){var t,r,n,a,i,o,s=this,c=s.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Er);if(s=new c(s),!s.s){if(e.s<1)throw Error(sn+"Infinity");return s}if(s.eq(Er))return s;if(n=c.precision,e.eq(Er))return Me(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=d<0?-d:d)<=qC){for(a=new c(Er),t=Math.ceil(n/Be+4),Ye=!1;r%2&&(a=a.times(s),Ak(a.d,t)),r=tl(r/2),r!==0;)s=s.times(s),Ak(s.d,t);return Ye=!0,e.s<0?new c(Er).div(a):Me(a,n)}}else if(i<0)throw Error(sn+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ye=!1,a=e.times(Fc(s,n+u)),Ye=!0,a=ZC(a),a.s=i,a};ae.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=yt(a),n=Oo(a,r<=i.toExpNeg||r>=i.toExpPos)):(Fn(e,1,el),t===void 0?t=i.rounding:Fn(t,0,8),a=Me(new i(a),e,t),r=yt(a),n=Oo(a,e<=r||r<=i.toExpNeg,e)),n};ae.toSignificantDigits=ae.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Fn(e,1,el),t===void 0?t=n.rounding:Fn(t,0,8)),Me(new n(r),e,t)};ae.toString=ae.valueOf=ae.val=ae.toJSON=ae[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=yt(e),r=e.constructor;return Oo(e,t<=r.toExpNeg||t>=r.toExpPos)};function XC(e,t){var r,n,a,i,o,s,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Ye?Me(t,f):t;if(c=e.d,u=t.d,o=e.e,a=t.e,c=c.slice(),i=o-a,i){for(i<0?(n=c,i=-i,s=u.length):(n=u,a=o,s=c.length),o=Math.ceil(f/Be),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=c.length,i=u.length,s-i<0&&(i=s,n=u,u=c,c=n),r=0;i;)r=(c[--i]=c[i]+u[i]+r)/At|0,c[i]%=At;for(r&&(c.unshift(r),++a),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=a,Ye?Me(t,f):t}function Fn(e,t,r){if(e!==~~e||er)throw Error(po+e)}function Tn(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;to?1:-1;else for(s=c=0;sa[s]?1:-1;break}return c}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]1;)n.shift()}return function(n,a,i,o){var s,c,u,d,f,p,h,g,x,v,y,b,w,j,N,S,P,C,M=n.constructor,T=n.s==a.s?1:-1,A=n.d,E=a.d;if(!n.s)return new M(n);if(!a.s)throw Error(sn+"Division by zero");for(c=n.e-a.e,P=E.length,N=A.length,h=new M(T),g=h.d=[],u=0;E[u]==(A[u]||0);)++u;if(E[u]>(A[u]||0)&&--c,i==null?b=i=M.precision:o?b=i+(yt(n)-yt(a))+1:b=i,b<0)return new M(0);if(b=b/Be+2|0,u=0,P==1)for(d=0,E=E[0],b++;(u1&&(E=e(E,d),A=e(A,d),P=E.length,N=A.length),j=P,x=A.slice(0,P),v=x.length;v=At/2&&++S;do d=0,s=t(E,x,P,v),s<0?(y=x[0],P!=v&&(y=y*At+(x[1]||0)),d=y/S|0,d>1?(d>=At&&(d=At-1),f=e(E,d),p=f.length,v=x.length,s=t(f,x,p,v),s==1&&(d--,r(f,P16)throw Error(Q1+yt(e));if(!e.s)return new d(Er);for(t==null?(Ye=!1,s=f):s=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Ki(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new d(Er),d.precision=s;;){if(a=Me(a.times(e),s),r=r.times(++c),o=i.plus(da(a,r,s)),Tn(o.d).slice(0,s)===Tn(i.d).slice(0,s)){for(;u--;)i=Me(i.times(i),s);return d.precision=f,t==null?(Ye=!0,Me(i,f)):i}i=o}}function yt(e){for(var t=e.e*Be,r=e.d[0];r>=10;r/=10)t++;return t}function Th(e,t,r){if(t>e.LN10.sd())throw Ye=!0,r&&(e.precision=r),Error(sn+"LN10 precision limit exceeded");return Me(new e(e.LN10),t)}function Ha(e){for(var t="";e--;)t+="0";return t}function Fc(e,t){var r,n,a,i,o,s,c,u,d,f=1,p=10,h=e,g=h.d,x=h.constructor,v=x.precision;if(h.s<1)throw Error(sn+(h.s?"NaN":"-Infinity"));if(h.eq(Er))return new x(0);if(t==null?(Ye=!1,u=v):u=t,h.eq(10))return t==null&&(Ye=!0),Th(x,u);if(u+=p,x.precision=u,r=Tn(g),n=r.charAt(0),i=yt(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Tn(h.d),n=r.charAt(0),f++;i=yt(h),n>1?(h=new x("0."+r),i++):h=new x(n+"."+r.slice(1))}else return c=Th(x,u+2,v).times(i+""),h=Fc(new x(n+"."+r.slice(1)),u-p).plus(c),x.precision=v,t==null?(Ye=!0,Me(h,v)):h;for(s=o=h=da(h.minus(Er),h.plus(Er),u),d=Me(h.times(h),u),a=3;;){if(o=Me(o.times(d),u),c=s.plus(da(o,new x(a),u)),Tn(c.d).slice(0,u)===Tn(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(Th(x,u+2,v).times(i+""))),s=da(s,new x(f),u),x.precision=v,t==null?(Ye=!0,Me(s,v)):s;s=c,a+=2}}function Ek(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=tl(r/Be),e.d=[],n=(r+1)%Be,r<0&&(n+=Be),ngf||e.e<-gf))throw Error(Q1+r)}else e.s=0,e.e=0,e.d=[0];return e}function Me(e,t,r){var n,a,i,o,s,c,u,d,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Be,a=t,u=f[d=0];else{if(d=Math.ceil((n+1)/Be),i=f.length,d>=i)return e;for(u=i=f[d],o=1;i>=10;i/=10)o++;n%=Be,a=n-Be+o}if(r!==void 0&&(i=Ki(10,o-a-1),s=u/i%10|0,c=t<0||f[d+1]!==void 0||u%i,c=r<4?(s||c)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||c||r==6&&(n>0?a>0?u/Ki(10,o-a):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(i=yt(e),f.length=1,t=t-i-1,f[0]=Ki(10,(Be-t%Be)%Be),e.e=tl(-t/Be)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,i=1,d--):(f.length=d+1,i=Ki(10,Be-n),f[d]=a>0?(u/Ki(10,o-a)%Ki(10,a)|0)*i:0),c)for(;;)if(d==0){(f[0]+=i)==At&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=At)break;f[d--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Ye&&(e.e>gf||e.e<-gf))throw Error(Q1+yt(e));return e}function QC(e,t){var r,n,a,i,o,s,c,u,d,f,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Ye?Me(t,h):t;if(c=e.d,f=t.d,n=t.e,u=e.e,c=c.slice(),o=u-n,o){for(d=o<0,d?(r=c,o=-o,s=f.length):(r=f,n=u,s=c.length),a=Math.max(Math.ceil(h/Be),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=c.length,s=f.length,d=a0;--a)c[s++]=0;for(a=f.length;a>o;){if(c[--a]0?i=i.charAt(0)+"."+i.slice(1)+Ha(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Ha(-a-1)+i,r&&(n=r-o)>0&&(i+=Ha(n))):a>=o?(i+=Ha(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+Ha(n))):((n=a+1)0&&(a+1===o&&(i+="."),i+=Ha(n))),e.s<0?"-"+i:i}function Ak(e,t){if(e.length>t)return e.length=t,!0}function JC(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(po+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Ek(o,i.toString())}else if(typeof i!="string")throw Error(po+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,kQ.test(i))Ek(o,i);else throw Error(po+i)}if(a.prototype=ae,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=JC,a.config=a.set=jQ,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(po+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(po+r+": "+n);return this}var J1=JC(wQ);Er=new J1(1);const Pe=J1;var NQ=e=>e,eE={"@@functional/placeholder":!0},tE=e=>e===eE,Ok=e=>function t(){return arguments.length===0||arguments.length===1&&tE(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},rE=(e,t)=>e===1?t:Ok(function(){for(var r=arguments.length,n=new Array(r),a=0;ao!==eE).length;return i>=e?t(...n):rE(e-i,Ok(function(){for(var o=arguments.length,s=new Array(o),c=0;ctE(d)?s.shift():d);return t(...u,...s)}))}),SQ=e=>rE(e.length,e),Uy=(e,t)=>{for(var r=[],n=e;nArray.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),CQ=function(){for(var t=arguments.length,r=new Array(t),n=0;nc(s),i(...arguments))}};function nE(e){var t;return e===0?t=1:t=Math.floor(new Pe(e).abs().log(10).toNumber())+1,t}function aE(e,t,r){for(var n=new Pe(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var iE=e=>{var[t,r]=e,[n,a]=[t,r];return t>r&&([n,a]=[r,t]),[n,a]},oE=(e,t,r)=>{if(e.lte(0))return new Pe(0);var n=nE(e.toNumber()),a=new Pe(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new Pe(Math.ceil(i.div(o).toNumber())).add(r).mul(o),c=s.mul(a);return t?new Pe(c.toNumber()):new Pe(Math.ceil(c.toNumber()))},EQ=(e,t,r)=>{var n=new Pe(1),a=new Pe(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Pe(10).pow(nE(e)-1),a=new Pe(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Pe(Math.floor(e)))}else e===0?a=new Pe(Math.floor((t-1)/2)):r||(a=new Pe(Math.floor(e)));var o=Math.floor((t-1)/2),s=CQ(PQ(c=>a.add(new Pe(c-o).mul(n)).toNumber()),Uy);return s(0,t)},sE=function(t,r,n,a){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Pe(0),tickMin:new Pe(0),tickMax:new Pe(0)};var o=oE(new Pe(r).sub(t).div(n-1),a,i),s;t<=0&&r>=0?s=new Pe(0):(s=new Pe(t).add(r).div(2),s=s.sub(new Pe(s).mod(o)));var c=Math.ceil(s.sub(t).div(o).toNumber()),u=Math.ceil(new Pe(r).sub(s).div(o).toNumber()),d=c+u+1;return d>n?sE(t,r,n,a,i+1):(d0?u+(n-d):u,c=r>0?c:c+(n-d)),{step:o,tickMin:s.sub(new Pe(c).mul(o)),tickMax:s.add(new Pe(u).mul(o))})},AQ=function(t){var[r,n]=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),[s,c]=iE([r,n]);if(s===-1/0||c===1/0){var u=c===1/0?[s,...Uy(0,a-1).map(()=>1/0)]:[...Uy(0,a-1).map(()=>-1/0),c];return r>n?u.reverse():u}if(s===c)return EQ(s,a,i);var{step:d,tickMin:f,tickMax:p}=sE(s,c,o,i,0),h=aE(f,p.add(new Pe(.1).mul(d)),d);return r>n?h.reverse():h},OQ=function(t,r){var[n,a]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,s]=iE([n,a]);if(o===-1/0||s===1/0)return[n,a];if(o===s)return[o];var c=Math.max(r,2),u=oE(new Pe(s).sub(o).div(c-1),i,0),d=[...aE(new Pe(o),new Pe(s),u),s];return i===!1&&(d=d.map(f=>Math.round(f))),n>a?d.reverse():d},lE=e=>e.rootProps.maxBarSize,TQ=e=>e.rootProps.barGap,cE=e=>e.rootProps.barCategoryGap,MQ=e=>e.rootProps.barSize,pu=e=>e.rootProps.stackOffset,uE=e=>e.rootProps.reverseStackOrder,eb=e=>e.options.chartName,tb=e=>e.rootProps.syncId,dE=e=>e.rootProps.syncMethod,rb=e=>e.options.eventEmitter,IQ=e=>e.rootProps.baseValue,Ze={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Jn={allowDecimals:!1,allowDuplicatedCategory:!0,angleAxisId:0,axisLine:!0,axisLineType:"polygon",cx:0,cy:0,orientation:"outer",reversed:!1,scale:"auto",tick:!0,tickLine:!0,tickSize:8,type:"category",zIndex:Ze.axis},Cr={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,label:!1,orientation:"right",radiusAxisId:0,reversed:!1,scale:"auto",stroke:"#ccc",tick:!0,tickCount:5,type:"number",zIndex:Ze.axis},Fp=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},_Q={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Jn.angleAxisId,includeHidden:!1,name:void 0,reversed:Jn.reversed,scale:Jn.scale,tick:Jn.tick,tickCount:void 0,ticks:void 0,type:Jn.type,unit:void 0},LQ={allowDataOverflow:Cr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Cr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Cr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Cr.scale,tick:Cr.tick,tickCount:Cr.tickCount,ticks:void 0,type:Cr.type,unit:void 0},DQ={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Jn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Jn.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Jn.scale,tick:Jn.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},RQ={allowDataOverflow:Cr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Cr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Cr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Cr.scale,tick:Cr.tick,tickCount:Cr.tickCount,ticks:void 0,type:"category",unit:void 0},nb=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?DQ:_Q,ab=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?RQ:LQ,Vp=e=>e.polarOptions,ib=$([Aa,Oa,kt],iC),fE=$([Vp,ib],(e,t)=>{if(e!=null)return tr(e.innerRadius,t,0)}),pE=$([Vp,ib],(e,t)=>{if(e!=null)return tr(e.outerRadius,t,t*.8)}),$Q=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},mE=$([Vp],$Q);$([nb,mE],Fp);var hE=$([ib,fE,pE],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});$([ab,hE],Fp);var gE=$([ge,Vp,fE,pE,Aa,Oa],(e,t,r,n,a,i)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:o,cy:s,startAngle:c,endAngle:u}=t;return{cx:tr(o,a,a/2),cy:tr(s,i,i/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:u,clockWise:!1}}}),qe=(e,t)=>t,mu=(e,t,r)=>r;function Up(e){return e==null?void 0:e.id}function yE(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:a,dataKey:i}=r,o=new Map;return e.forEach(s=>{var c,u=(c=s.data)!==null&&c!==void 0?c:n;if(!(u==null||u.length===0)){var d=Up(s);u.forEach((f,p)=>{var h=i==null||a?p:String(Se(f,i,null)),g=Se(f,s.dataKey,0),x;o.has(h)?x=o.get(h):x={},Object.assign(x,{[d]:g}),o.set(h,x)})}}),Array.from(o.values())}function Hp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Wp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Kp(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function zQ(e,t){if(e.length===t.length){for(var r=0;r{var t=ge(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},rl=e=>e.tooltip.settings.axisId;function Tk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yf(e){for(var t=1;te.cartesianAxis.xAxis[t],Ia=(e,t)=>{var r=vE(e,t);return r??Pt},Ct={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Hy,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:su},xE=(e,t)=>e.cartesianAxis.yAxis[t],_a=(e,t)=>{var r=xE(e,t);return r??Ct},UQ={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},ob=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??UQ},et=(e,t,r)=>{switch(t){case"xAxis":return Ia(e,r);case"yAxis":return _a(e,r);case"zAxis":return ob(e,r);case"angleAxis":return nb(e,r);case"radiusAxis":return ab(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},HQ=(e,t,r)=>{switch(t){case"xAxis":return Ia(e,r);case"yAxis":return _a(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},hu=(e,t,r)=>{switch(t){case"xAxis":return Ia(e,r);case"yAxis":return _a(e,r);case"angleAxis":return nb(e,r);case"radiusAxis":return ab(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},bE=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function sb(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var gu=e=>e.graphicalItems.cartesianItems,WQ=$([qe,mu],sb),lb=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),yu=$([gu,et,WQ],lb,{memoizeOptions:{resultEqualityCheck:Kp}}),wE=$([yu],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Hp)),kE=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),KQ=$([yu],kE),cb=e=>e.map(t=>t.data).filter(Boolean).flat(1),GQ=$([yu],cb,{memoizeOptions:{resultEqualityCheck:Kp}}),ub=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:a}=t;return e.length>0?e:r.slice(n,a+1)},db=$([GQ,Z1],ub),fb=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Se(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Se(a,n)}))):e.map(n=>({value:n})),Gp=$([db,et,yu],fb);function jE(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Bd(e){if(zn(e)||e instanceof Date){var t=Number(e);if(Ie(t))return t}}function Mk(e){if(Array.isArray(e)){var t=[Bd(e[0]),Bd(e[1])];return ki(t)?t:void 0}var r=Bd(e);if(r!=null)return[r,r]}function Na(e){return e.map(Bd).filter(xK)}function YQ(e,t,r){return!r||typeof t!="number"||on(t)?[]:r.length?Na(r.flatMap(n=>{var a=Se(e,n.dataKey),i,o;if(Array.isArray(a)?[i,o]=a:i=o=a,!(!Ie(i)||!Ie(o)))return[t-i,t+o]})):[]}var St=e=>{var t=Nt(e),r=rl(e);return hu(e,t,r)},vu=$([St],e=>e==null?void 0:e.dataKey),qQ=$([wE,Z1,St],yE),NE=(e,t,r,n)=>{var a={},i=t.reduce((o,s)=>{if(s.stackId==null)return o;var c=o[s.stackId];return c==null&&(c=[]),c.push(s),o[s.stackId]=c,o},a);return Object.fromEntries(Object.entries(i).map(o=>{var[s,c]=o,u=n?[...c].reverse():c,d=u.map(Up);return[s,{stackedData:MG(e,d,r),graphicalItems:u}]}))},vf=$([qQ,wE,pu,uE],NE),SE=(e,t,r,n)=>{var{dataStartIndex:a,dataEndIndex:i}=t;if(n==null&&r!=="zAxis"){var o=DG(e,a,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},XQ=$([et],e=>e.allowDataOverflow),pb=e=>{var t;if(e==null||!("domain"in e))return Hy;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Na(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Hy},mb=$([et],pb),hb=$([mb,XQ],YC),ZQ=$([vf,Ma,qe,hb],SE,{memoizeOptions:{resultEqualityCheck:Wp}}),Yp=e=>e.errorBars,QQ=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>jE(r,n)),xf=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var i,o;if(r.length>0&&e.forEach(s=>{r.forEach(c=>{var u,d,f=(u=n[c.id])===null||u===void 0?void 0:u.filter(y=>jE(a,y)),p=Se(s,(d=t.dataKey)!==null&&d!==void 0?d:c.dataKey),h=YQ(s,p,f);if(h.length>=2){var g=Math.min(...h),x=Math.max(...h);(i==null||go)&&(o=x)}var v=Mk(p);v!=null&&(i=i==null?v[0]:Math.min(i,v[0]),o=o==null?v[1]:Math.max(o,v[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(s=>{var c=Mk(Se(s,t.dataKey));c!=null&&(i=i==null?c[0]:Math.min(i,c[0]),o=o==null?c[1]:Math.max(o,c[1]))}),Ie(i)&&Ie(o))return[i,o]},JQ=$([db,et,KQ,Yp,qe],gb,{memoizeOptions:{resultEqualityCheck:Wp}});function eJ(e){var{value:t}=e;if(zn(t)||t instanceof Date)return t}var tJ=(e,t,r)=>{var n=e.map(eJ).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&e9(n))?fC(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},PE=e=>e.referenceElements.dots,nl=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),rJ=$([PE,qe,mu],nl),CE=e=>e.referenceElements.areas,nJ=$([CE,qe,mu],nl),EE=e=>e.referenceElements.lines,aJ=$([EE,qe,mu],nl),AE=(e,t)=>{if(e!=null){var r=Na(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},iJ=$(rJ,qe,AE),OE=(e,t)=>{if(e!=null){var r=Na(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},oJ=$([nJ,qe],OE);function sJ(e){var t;if(e.x!=null)return Na([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Na(r)}function lJ(e){var t;if(e.y!=null)return Na([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Na(r)}var TE=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?sJ(n):lJ(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},cJ=$([aJ,qe],TE),uJ=$(iJ,cJ,oJ,(e,t,r)=>xf(e,r,t)),yb=(e,t,r,n,a,i,o,s)=>{if(r!=null)return r;var c=o==="vertical"&&s==="xAxis"||o==="horizontal"&&s==="yAxis",u=c?xf(n,i,a):xf(i,a);return bQ(t,u,e.allowDataOverflow)},dJ=$([et,mb,hb,ZQ,JQ,uJ,ge,qe],yb,{memoizeOptions:{resultEqualityCheck:Wp}}),fJ=[0,1],vb=(e,t,r,n,a,i,o)=>{if(!((e==null||r==null||r.length===0)&&o===void 0)){var{dataKey:s,type:c}=e,u=Wn(t,i);if(u&&s==null){var d;return fC(0,(d=r==null?void 0:r.length)!==null&&d!==void 0?d:0)}return c==="category"?tJ(n,e,u):a==="expand"?fJ:o}},xb=$([et,ge,db,Gp,pu,qe,dJ],vb),ME=(e,t,r,n,a)=>{if(e!=null){var{scale:i,type:o}=e;if(i==="auto")return t==="radial"&&a==="radiusAxis"?"band":t==="radial"&&a==="angleAxis"?"linear":o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":o==="category"?"band":"linear";if(typeof i=="string"){var s="scale".concat(au(i));return s in Vl?s:"point"}}},al=$([et,ge,bE,eb,qe],ME);function pJ(e){if(e!=null){if(e in Vl)return Vl[e]();var t="scale".concat(au(e));if(t in Vl)return Vl[t]()}}function bb(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var a=pJ(t);if(a!=null){var i=a.domain(r).range(n);return CG(i),i}}}var wb=(e,t,r)=>{var n=pb(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&ki(e))return AQ(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&ki(e))return OQ(e,t.tickCount,t.allowDecimals)}},kb=$([xb,hu,al],wb),jb=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&ki(t)&&Array.isArray(r)&&r.length>0){var a=t[0],i=r[0],o=t[1],s=r[r.length-1];return[Math.min(a,i),Math.max(o,s)]}return t},mJ=$([et,xb,kb,qe],jb),hJ=$(Gp,et,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Na(e.map(f=>f.value))).sort((f,p)=>f-p),a=n[0],i=n[n.length-1];if(a==null||i==null)return 1/0;var o=i-a;if(o===0)return 1/0;for(var s=0;sa,(e,t,r,n,a)=>{if(!Ie(e))return 0;var i=t==="vertical"?n.height:n.width;if(a==="gap")return e*i/2;if(a==="no-gap"){var o=tr(r,e*i),s=e*i/2;return s-o-(s-o)/i*o}return 0}),gJ=(e,t,r)=>{var n=Ia(e,t);return n==null||typeof n.padding!="string"?0:IE(e,"xAxis",t,r,n.padding)},yJ=(e,t,r)=>{var n=_a(e,t);return n==null||typeof n.padding!="string"?0:IE(e,"yAxis",t,r,n.padding)},vJ=$(Ia,gJ,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:a}=e;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),xJ=$(_a,yJ,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:a}=e;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),bJ=$([kt,vJ,Tp,Op,(e,t,r)=>r],(e,t,r,n,a)=>{var{padding:i}=n;return a?[i.left,r.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),wJ=$([kt,ge,xJ,Tp,Op,(e,t,r)=>r],(e,t,r,n,a,i)=>{var{padding:o}=a;return i?[n.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),xu=(e,t,r,n)=>{var a;switch(t){case"xAxis":return bJ(e,r,n);case"yAxis":return wJ(e,r,n);case"zAxis":return(a=ob(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return mE(e);case"radiusAxis":return hE(e,r);default:return}},_E=$([et,xu],Fp),qp=$([et,al,mJ,_E],bb);$([yu,Yp,qe],QQ);function LE(e,t){return e.idt.id?1:0}var Xp=(e,t)=>t,Zp=(e,t,r)=>r,kJ=$(Ep,Xp,Zp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(LE)),jJ=$(Ap,Xp,Zp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(LE)),DE=(e,t)=>({width:e.width,height:t.height}),NJ=(e,t)=>{var r=typeof t.width=="number"?t.width:su;return{width:r,height:e.height}},RE=$(kt,Ia,DE),SJ=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},PJ=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},CJ=$(Oa,kt,kJ,Xp,Zp,(e,t,r,n,a)=>{var i={},o;return r.forEach(s=>{var c=DE(t,s);o==null&&(o=SJ(t,n,e));var u=n==="top"&&!a||n==="bottom"&&a;i[s.id]=o-Number(u)*c.height,o+=(u?-1:1)*c.height}),i}),EJ=$(Aa,kt,jJ,Xp,Zp,(e,t,r,n,a)=>{var i={},o;return r.forEach(s=>{var c=NJ(t,s);o==null&&(o=PJ(t,n,e));var u=n==="left"&&!a||n==="right"&&a;i[s.id]=o-Number(u)*c.width,o+=(u?-1:1)*c.width}),i}),AJ=(e,t)=>{var r=Ia(e,t);if(r!=null)return CJ(e,r.orientation,r.mirror)},OJ=$([kt,Ia,AJ,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),TJ=(e,t)=>{var r=_a(e,t);if(r!=null)return EJ(e,r.orientation,r.mirror)},MJ=$([kt,_a,TJ,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),$E=$(kt,_a,(e,t)=>{var r=typeof t.width=="number"?t.width:su;return{width:r,height:e.height}}),Ik=(e,t,r)=>{switch(t){case"xAxis":return RE(e,r).width;case"yAxis":return $E(e,r).height;default:return}},zE=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:a,type:i,dataKey:o}=r,s=Wn(e,n),c=t.map(u=>u.value);if(o&&s&&i==="category"&&a&&e9(c))return c}},Nb=$([ge,Gp,et,qe],zE),BE=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:a,scale:i}=r,o=Wn(e,n);if(o&&(a==="number"||i!=="auto"))return t.map(s=>s.value)}},Sb=$([ge,Gp,hu,qe],BE),_k=$([ge,HQ,al,qp,Nb,Sb,xu,kb,qe],(e,t,r,n,a,i,o,s,c)=>{if(t!=null){var u=Wn(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:i,duplicateDomain:a,isCategorical:u,niceTicks:s,range:o,realScaleType:r,scale:n}}}),IJ=(e,t,r,n,a,i,o,s,c)=>{if(!(t==null||n==null)){var u=Wn(e,c),{type:d,ticks:f,tickCount:p}=t,h=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,g=d==="category"&&n.bandwidth?n.bandwidth()/h:0;g=c==="angleAxis"&&i!=null&&i.length>=2?Mt(i[0]-i[1])*2*g:g;var x=f||a;if(x){var v=x.map((y,b)=>{var w=o?o.indexOf(y):y;return{index:b,coordinate:n(w)+g,value:y,offset:g}});return v.filter(y=>Ie(y.coordinate))}return u&&s?s.map((y,b)=>({coordinate:n(y)+g,value:y,index:b,offset:g})).filter(y=>Ie(y.coordinate)):n.ticks?n.ticks(p).map(y=>({coordinate:n(y)+g,value:y,offset:g})):n.domain().map((y,b)=>({coordinate:n(y)+g,value:o?o[y]:y,index:b,offset:g}))}},FE=$([ge,hu,al,qp,kb,xu,Nb,Sb,qe],IJ),_J=(e,t,r,n,a,i,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=Wn(e,o),{tickCount:c}=t,u=0;return u=o==="angleAxis"&&(n==null?void 0:n.length)>=2?Mt(n[0]-n[1])*2*u:u,s&&i?i.map((d,f)=>({coordinate:r(d)+u,value:d,index:f,offset:u})):r.ticks?r.ticks(c).map(d=>({coordinate:r(d)+u,value:d,offset:u})):r.domain().map((d,f)=>({coordinate:r(d)+u,value:a?a[d]:d,index:f,offset:u}))}},Vn=$([ge,hu,qp,xu,Nb,Sb,qe],_J),Un=$(et,qp,(e,t)=>{if(!(e==null||t==null))return yf(yf({},e),{},{scale:t})}),LJ=$([et,al,xb,_E],bb);$((e,t,r)=>ob(e,r),LJ,(e,t)=>{if(!(e==null||t==null))return yf(yf({},e),{},{scale:t})});var DJ=$([ge,Ep,Ap],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),VE=e=>e.options.defaultTooltipEventType,UE=e=>e.options.validateTooltipEventTypes;function HE(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Pb(e,t){var r=VE(e),n=UE(e);return HE(t,r,n)}function RJ(e){return ie(t=>Pb(t,e))}var WE=(e,t)=>{var r,n=Number(t);if(!(on(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},$J=e=>e.tooltip.settings,qa={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},zJ={itemInteraction:{click:qa,hover:qa},axisInteraction:{click:qa,hover:qa},keyboardInteraction:qa,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},KE=ar({name:"tooltip",initialState:zJ,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:He()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,a=xn(e).tooltipItemPayloads.indexOf(r);a>-1&&(e.tooltipItemPayloads[a]=n)},prepare:He()},removeTooltipEntrySettings:{reducer(e,t){var r=xn(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:He()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:BJ,replaceTooltipEntrySettings:FJ,removeTooltipEntrySettings:VJ,setTooltipSettingsState:UJ,setActiveMouseOverItemIndex:GE,mouseLeaveItem:HJ,mouseLeaveChart:YE,setActiveClickItemIndex:WJ,setMouseOverAxisIndex:qE,setMouseClickAxisIndex:KJ,setSyncInteraction:Wy,setKeyboardInteraction:Ky}=KE.actions,GJ=KE.reducer;function Lk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ud(e){for(var t=1;t{if(t==null)return qa;var a=ZJ(e,t,r);if(a==null)return qa;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var i=e.settings.active===!0;if(QJ(a)){if(i)return ud(ud({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return ud(ud({},qa),{},{coordinate:a.coordinate})};function JJ(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function eee(e,t){var r=JJ(e),n=t[0],a=t[1];if(r===void 0)return!1;var i=Math.min(n,a),o=Math.max(n,a);return r>=i&&r<=o}function tee(e,t,r){if(r==null||t==null)return!0;var n=Se(e,t);return n==null||!ki(r)?!0:eee(n,r)}var Cb=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var i=Number(a);if(!Ie(i))return a;var o=0,s=1/0;t.length>0&&(s=t.length-1);var c=Math.max(o,Math.min(i,s)),u=t[c];return u==null||tee(u,r,n)?String(c):null},ZE=(e,t,r,n,a,i,o,s)=>{if(!(i==null||s==null)){var c=o[0],u=c==null?void 0:s(c.positions,i);if(u!=null)return u;var d=a==null?void 0:a[Number(i)];if(d)switch(r){case"horizontal":return{x:d.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:d.coordinate}}}},QE=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,a==null&&n!=null){var i=e.tooltipItemPayloads[0];return i!=null?[i]:[]}return e.tooltipItemPayloads.filter(o=>{var s;return((s=o.settings)===null||s===void 0?void 0:s.graphicalItemId)===a})},bu=e=>e.options.tooltipPayloadSearcher,il=e=>e.tooltip;function Dk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rk(e){for(var t=1;t{if(!(t==null||i==null)){var{chartData:s,computedData:c,dataStartIndex:u,dataEndIndex:d}=r,f=[];return e.reduce((p,h)=>{var g,{dataDefinedOnItem:x,settings:v}=h,y=iee(x,s),b=Array.isArray(y)?_9(y,u,d):y,w=(g=v==null?void 0:v.dataKey)!==null&&g!==void 0?g:n,j=v==null?void 0:v.nameKey,N;if(n&&Array.isArray(b)&&!Array.isArray(b[0])&&o==="axis"?N=t9(b,n,a):N=i(b,t,c,j),Array.isArray(N))N.forEach(P=>{var C=Rk(Rk({},v),{},{name:P.name,unit:P.unit,color:void 0,fill:void 0});p.push(e5({tooltipEntrySettings:C,dataKey:P.dataKey,payload:P.payload,value:Se(P.payload,P.dataKey),name:P.name}))});else{var S;p.push(e5({tooltipEntrySettings:v,dataKey:w,payload:N,value:Se(N,w),name:(S=Se(N,j))!==null&&S!==void 0?S:v==null?void 0:v.name}))}return p},f)}},Eb=$([St,ge,bE,eb,Nt],ME),oee=$([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),see=$([Nt,rl],sb),ol=$([oee,St,see],lb,{memoizeOptions:{resultEqualityCheck:Kp}}),lee=$([ol],e=>e.filter(Hp)),cee=$([ol],cb,{memoizeOptions:{resultEqualityCheck:Kp}}),sl=$([cee,Ma],ub),uee=$([lee,Ma,St],yE),Ab=$([sl,St,ol],fb),eA=$([St],pb),dee=$([St],e=>e.allowDataOverflow),tA=$([eA,dee],YC),fee=$([ol],e=>e.filter(Hp)),pee=$([uee,fee,pu,uE],NE),mee=$([pee,Ma,Nt,tA],SE),hee=$([ol],kE),gee=$([sl,St,hee,Yp,Nt],gb,{memoizeOptions:{resultEqualityCheck:Wp}}),yee=$([PE,Nt,rl],nl),vee=$([yee,Nt],AE),xee=$([CE,Nt,rl],nl),bee=$([xee,Nt],OE),wee=$([EE,Nt,rl],nl),kee=$([wee,Nt],TE),jee=$([vee,kee,bee],xf),Nee=$([St,eA,tA,mee,gee,jee,ge,Nt],yb),wu=$([St,ge,sl,Ab,pu,Nt,Nee],vb),See=$([wu,St,Eb],wb),Pee=$([St,wu,See,Nt],jb),rA=e=>{var t=Nt(e),r=rl(e),n=!1;return xu(e,t,r,n)},nA=$([St,rA],Fp),aA=$([St,Eb,Pee,nA],bb),Cee=$([ge,Ab,St,Nt],zE),Eee=$([ge,Ab,St,Nt],BE),Aee=(e,t,r,n,a,i,o,s)=>{if(t){var{type:c}=t,u=Wn(e,s);if(n){var d=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=c==="category"&&n.bandwidth?n.bandwidth()/d:0;return f=s==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Mt(a[0]-a[1])*2*f:f,u&&o?o.map((p,h)=>({coordinate:n(p)+f,value:p,index:h,offset:f})):n.domain().map((p,h)=>({coordinate:n(p)+f,value:i?i[p]:p,index:h,offset:f}))}}},La=$([ge,St,Eb,aA,rA,Cee,Eee,Nt],Aee),Ob=$([VE,UE,$J],(e,t,r)=>HE(r.shared,e,t)),iA=e=>e.tooltip.settings.trigger,Tb=e=>e.tooltip.settings.defaultIndex,ku=$([il,Ob,iA,Tb],XE),ji=$([ku,sl,vu,wu],Cb),oA=$([La,ji],WE),Mb=$([ku],e=>{if(e)return e.dataKey}),Oee=$([ku],e=>{if(e)return e.graphicalItemId}),sA=$([il,Ob,iA,Tb],QE),Tee=$([Aa,Oa,ge,kt,La,Tb,sA,bu],ZE),Mee=$([ku,Tee],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Iee=$([ku],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),_ee=$([sA,ji,Ma,vu,oA,bu,Ob],JE),Lee=$([_ee],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function $k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zk(e){for(var t=1;tie(St),Bee=()=>{var e=zee(),t=ie(La),r=ie(aA);return wi(!e||!r?void 0:zk(zk({},e),{},{scale:r}),t)};function Bk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vo(e){for(var t=1;t{var a=t.find(i=>i&&i.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.chartY};if(e==="vertical")return{x:n.chartX,y:a.coordinate}}return{x:0,y:0}},Wee=(e,t,r,n)=>{var a=t.find(u=>u&&u.index===r);if(a){if(e==="centric"){var i=a.coordinate,{radius:o}=n;return Vo(Vo(Vo({},n),gt(n.cx,n.cy,o,i)),{},{angle:i,radius:o})}var s=a.coordinate,{angle:c}=n;return Vo(Vo(Vo({},n),gt(n.cx,n.cy,s,c)),{},{angle:c,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Kee(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var lA=(e,t,r,n,a)=>{var i,o=(i=t==null?void 0:t.length)!==null&&i!==void 0?i:0;if(o<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var s=0;s0?(c=r[s-1])===null||c===void 0?void 0:c.coordinate:(u=r[o-1])===null||u===void 0?void 0:u.coordinate,g=(d=r[s])===null||d===void 0?void 0:d.coordinate,x=s>=o-1?(f=r[0])===null||f===void 0?void 0:f.coordinate:(p=r[s+1])===null||p===void 0?void 0:p.coordinate,v=void 0;if(!(h==null||g==null||x==null))if(Mt(g-h)!==Mt(x-g)){var y=[];if(Mt(x-g)===Mt(a[1]-a[0])){v=x;var b=g+a[1]-a[0];y[0]=Math.min(b,(b+h)/2),y[1]=Math.max(b,(b+h)/2)}else{v=h;var w=x+a[1]-a[0];y[0]=Math.min(g,(w+g)/2),y[1]=Math.max(g,(w+g)/2)}var j=[Math.min(g,(v+g)/2),Math.max(g,(v+g)/2)];if(e>j[0]&&e<=j[1]||e>=y[0]&&e<=y[1]){var N;return(N=r[s])===null||N===void 0?void 0:N.index}}else{var S=Math.min(h,x),P=Math.max(h,x);if(e>(S+g)/2&&e<=(P+g)/2){var C;return(C=r[s])===null||C===void 0?void 0:C.index}}}else if(t)for(var M=0;M(T.coordinate+E.coordinate)/2||M>0&&M(T.coordinate+E.coordinate)/2&&e<=(T.coordinate+A.coordinate)/2)return T.index}}return-1},cA=()=>ie(eb),Ib=(e,t)=>t,uA=(e,t,r)=>r,_b=(e,t,r,n)=>n,Gee=$(La,e=>Cp(e,t=>t.coordinate)),Lb=$([il,Ib,uA,_b],XE),Db=$([Lb,sl,vu,wu],Cb),Yee=(e,t,r)=>{if(t!=null){var n=il(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},dA=$([il,Ib,uA,_b],QE),bf=$([Aa,Oa,ge,kt,La,_b,dA,bu],ZE),qee=$([Lb,bf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),fA=$([La,Db],WE),Xee=$([dA,Db,Ma,vu,fA,bu,Ib],JE),Zee=$([Lb,Db],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Qee=(e,t,r,n,a,i,o)=>{if(!(!e||!r||!n||!a)&&Kee(e,o)){var s=RG(e,t),c=lA(s,i,a,r,n),u=Hee(t,a,c,e);return{activeIndex:String(c),activeCoordinate:u}}},Jee=(e,t,r,n,a,i,o)=>{if(!(!e||!n||!a||!i||!r)){var s=Bq(e,r);if(s){var c=$G(s,t),u=lA(c,o,i,n,a),d=Wee(t,i,u,s);return{activeIndex:String(u),activeCoordinate:d}}}},ete=(e,t,r,n,a,i,o,s)=>{if(!(!e||!t||!n||!a||!i))return t==="horizontal"||t==="vertical"?Qee(e,t,n,a,i,o,s):Jee(e,t,r,n,a,i,o)},tte=$(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),rte=$(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Ze)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:zQ}});function Fk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vk(e){for(var t=1;tVk(Vk({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),ote)},lte=new Set(Object.values(Ze));function cte(e){return lte.has(e)}var pA=ar({name:"zIndex",initialState:ste,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:He()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!cte(r)&&delete e.zIndexMap[r])},prepare:He()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:a}=t.payload;e.zIndexMap[r]?a?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:a?void 0:n,panoramaElement:a?n:void 0}},prepare:He()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:He()}}}),{registerZIndexPortal:ute,unregisterZIndexPortal:dte,registerZIndexPortalElement:fte,unregisterZIndexPortalElement:pte}=pA.actions,mte=pA.reducer;function gr(e){var{zIndex:t,children:r}=e,n=fY(),a=n&&t!==void 0&&t!==0,i=Lt(),o=De();m.useLayoutEffect(()=>a?(o(ute({zIndex:t})),()=>{o(dte({zIndex:t}))}):iu,[o,t,a]);var s=ie(c=>tte(c,t,i));return a?s?pi.createPortal(r,s):null:r}function Gy(){return Gy=Object.assign?Object.assign.bind():function(e){for(var t=1;tm.useContext(mA),hA={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,f,p){if(typeof d!="function")throw new TypeError("The listener must be a function");var h=new a(d,f||c,p),g=r?r+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],h]:c._events[g].push(h):(c._events[g]=h,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},s.prototype.listeners=function(u){var d=r?r+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,h=f.length,g=new Array(h);p{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Ste=gA.reducer,{createEventEmitter:Pte}=gA.actions;function Cte(e){return e.tooltip.syncInteraction}var Ete={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},yA=ar({name:"chartData",initialState:Ete,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:Wk,setDataStartEndIndexes:Ate,setComputedData:Tce}=yA.actions,Ote=yA.reducer,Tte=["x","y"];function Kk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;tc.rootProps.className);m.useEffect(()=>{if(e==null)return iu;var c=(u,d,f)=>{if(t!==f&&e===u){if(n==="index"){var p;if(o&&d!==null&&d!==void 0&&(p=d.payload)!==null&&p!==void 0&&p.coordinate&&d.payload.sourceViewBox){var h=d.payload.coordinate,{x:g,y:x}=h,v=Lte(h,Tte),{x:y,y:b,width:w,height:j}=d.payload.sourceViewBox,N=Uo(Uo({},v),{},{x:o.x+(w?(g-y)/w:0)*o.width,y:o.y+(j?(x-b)/j:0)*o.height});r(Uo(Uo({},d),{},{payload:Uo(Uo({},d.payload),{},{coordinate:N})}))}else r(d);return}if(a!=null){var S;if(typeof n=="function"){var P={activeTooltipIndex:d.payload.index==null?void 0:Number(d.payload.index),isTooltipActive:d.payload.active,activeIndex:d.payload.index==null?void 0:Number(d.payload.index),activeLabel:d.payload.label,activeDataKey:d.payload.dataKey,activeCoordinate:d.payload.coordinate},C=n(a,P);S=a[C]}else n==="value"&&(S=a.find(B=>String(B.value)===d.payload.label));var{coordinate:M}=d.payload;if(S==null||d.payload.active===!1||M==null||o==null){r(Wy({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:T,y:A}=M,E=Math.min(T,o.x+o.width),_=Math.min(A,o.y+o.height),L={x:i==="horizontal"?S.coordinate:E,y:i==="horizontal"?_:S.coordinate},I=Wy({active:d.payload.active,coordinate:L,dataKey:d.payload.dataKey,index:String(S.index),label:d.payload.label,sourceViewBox:d.payload.sourceViewBox,graphicalItemId:d.payload.graphicalItemId});r(I)}}};return Vc.on(Yy,c),()=>{Vc.off(Yy,c)}},[s,r,t,e,n,a,i,o])}function $te(){var e=ie(tb),t=ie(rb),r=De();m.useEffect(()=>{if(e==null)return iu;var n=(a,i,o)=>{t!==o&&e===a&&r(Ate(i))};return Vc.on(Hk,n),()=>{Vc.off(Hk,n)}},[r,t,e])}function zte(){var e=De();m.useEffect(()=>{e(Pte())},[e]),Rte(),$te()}function Bte(e,t,r,n,a,i){var o=ie(h=>Yee(h,e,t)),s=ie(rb),c=ie(tb),u=ie(dE),d=ie(Cte),f=d==null?void 0:d.active,p=Mp();m.useEffect(()=>{if(!f&&c!=null&&s!=null){var h=Wy({active:i,coordinate:r,dataKey:o,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:p,graphicalItemId:void 0});Vc.emit(Yy,c,h,s)}},[f,r,o,a,n,s,c,u,i,p])}function Gk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yk(e){for(var t=1;t{P(UJ({shared:b,trigger:w,axisId:S,active:a,defaultIndex:C}))},[P,b,w,S,a,C]);var M=Mp(),T=J9(),A=RJ(b),{activeIndex:E,isActive:_}=(t=ie(Q=>Zee(Q,A,w,C)))!==null&&t!==void 0?t:{},L=ie(Q=>Xee(Q,A,w,C)),I=ie(Q=>fA(Q,A,w,C)),B=ie(Q=>qee(Q,A,w,C)),V=L,O=wte(),R=(r=a??_)!==null&&r!==void 0?r:!1,[U,q]=M9([V,R]),ee=A==="axis"?I:void 0;Bte(A,w,B,ee,E,R);var oe=N??O;if(oe==null||M==null||A==null)return null;var D=V??qk;R||(D=qk),u&&D.length&&(D=w9(D.filter(Q=>Q.value!=null&&(Q.hide!==!0||n.includeHidden)),p,Hte));var Z=D.length>0,le=m.createElement(BY,{allowEscapeViewBox:i,animationDuration:o,animationEasing:s,isAnimationActive:d,active:R,coordinate:B,hasPayload:Z,offset:f,position:h,reverseDirection:g,useTranslate3d:x,viewBox:M,wrapperStyle:v,lastBoundingBox:U,innerRef:q,hasPortalFromProps:!!N},Wte(c,Yk(Yk({},n),{},{payload:D,label:ee,active:R,activeIndex:E,coordinate:B,accessibilityLayer:T})));return m.createElement(m.Fragment,null,pi.createPortal(le,oe),R&&m.createElement(bte,{cursor:y,tooltipEventType:A,coordinate:B,payload:D,index:E}))}var ju=e=>null;ju.displayName="Cell";function Gte(e,t,r){return(t=Yte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yte(e){var t=qte(e,"string");return typeof t=="symbol"?t:t+""}function qte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Xte{constructor(t){Gte(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function Xk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zte(e){for(var t=1;t{try{var r=document.getElementById(Qk);r||(r=document.createElement("span"),r.setAttribute("id",Qk),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,rre,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},ac=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||lu.isSsr)return{width:0,height:0};if(!vA.enableCache)return Jk(t,r);var n=nre(t,r),a=Zk.get(n);if(a)return a;var i=Jk(t,r);return Zk.set(n,i),i},xA;function are(e,t,r){return(t=ire(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ire(e){var t=ore(e,"string");return typeof t=="symbol"?t:t+""}function ore(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var e6=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,t6=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sre=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,lre=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,cre={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ure=["cm","mm","pt","pc","in","Q","px"];function dre(e){return ure.includes(e)}var us="NaN";function fre(e,t){return e*cre[t]}class Ft{static parse(t){var r,[,n,a]=(r=lre.exec(t))!==null&&r!==void 0?r:[];return n==null?Ft.NaN:new Ft(parseFloat(n),a??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,on(t)&&(this.unit=""),r!==""&&!sre.test(r)&&(this.num=NaN,this.unit=""),dre(r)&&(this.num=fre(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Ft(NaN,""):new Ft(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Ft(NaN,""):new Ft(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ft(NaN,""):new Ft(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ft(NaN,""):new Ft(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return on(this.num)}}xA=Ft;are(Ft,"NaN",new xA(NaN,""));function bA(e){if(e==null||e.includes(us))return us;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,a,i]=(r=e6.exec(t))!==null&&r!==void 0?r:[],o=Ft.parse(n??""),s=Ft.parse(i??""),c=a==="*"?o.multiply(s):o.divide(s);if(c.isNaN())return us;t=t.replace(e6,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,[,d,f,p]=(u=t6.exec(t))!==null&&u!==void 0?u:[],h=Ft.parse(d??""),g=Ft.parse(p??""),x=f==="+"?h.add(g):h.subtract(g);if(x.isNaN())return us;t=t.replace(t6,x.toString())}return t}var r6=/\(([^()]*)\)/;function pre(e){for(var t=e,r;(r=r6.exec(t))!=null;){var[,n]=r;t=t.replace(r6,bA(n))}return t}function mre(e){var t=e.replace(/\s+/g,"");return t=pre(t),t=bA(t),t}function hre(e){try{return mre(e)}catch{return us}}function Mh(e){var t=hre(e.slice(5,-1));return t===us?"":t}var gre=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],yre=["dx","dy","angle","className","breakAll"];function qy(){return qy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:t,breakAll:r,style:n}=e;try{var a=[];Ve(t)||(r?a=t.toString().split(""):a=t.toString().split(wA));var i=a.map(s=>({word:s,width:ac(s,n).width})),o=r?0:ac(" ",n).width;return{wordsWithComputedWidth:i,spaceWidth:o}}catch{return null}};function xre(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var jA=(e,t,r,n)=>e.reduce((a,i)=>{var{word:o,width:s}=i,c=a[a.length-1];if(c&&s!=null&&(t==null||n||c.width+s+re.reduce((t,r)=>t.width>r.width?t:r),bre="…",a6=(e,t,r,n,a,i,o,s)=>{var c=e.slice(0,t),u=kA({breakAll:r,style:n,children:c+bre});if(!u)return[!1,[]];var d=jA(u.wordsWithComputedWidth,i,o,s),f=d.length>a||NA(d).width>Number(i);return[f,d]},wre=(e,t,r,n,a)=>{var{maxLines:i,children:o,style:s,breakAll:c}=e,u=te(i),d=String(o),f=jA(t,n,r,a);if(!u||a)return f;var p=f.length>i||NA(f).width>Number(n);if(!p)return f;for(var h=0,g=d.length-1,x=0,v;h<=g&&x<=d.length-1;){var y=Math.floor((h+g)/2),b=y-1,[w,j]=a6(d,b,c,s,i,n,r,a),[N]=a6(d,y,c,s,i,n,r,a);if(!w&&!N&&(h=y+1),w&&N&&(g=y-1),!w&&N){v=j;break}x++}return v||f},i6=e=>{var t=Ve(e)?[]:e.toString().split(wA);return[{words:t,width:void 0}]},kre=e=>{var{width:t,scaleToFit:r,children:n,style:a,breakAll:i,maxLines:o}=e;if((t||r)&&!lu.isSsr){var s,c,u=kA({breakAll:i,children:n,style:a});if(u){var{wordsWithComputedWidth:d,spaceWidth:f}=u;s=d,c=f}else return i6(n);return wre({breakAll:i,children:n,maxLines:o,style:a},s,c,t,!!r)}return i6(n)},SA="#808080",jre={angle:0,breakAll:!1,capHeight:"0.71em",fill:SA,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Jp=m.forwardRef((e,t)=>{var r=ct(e,jre),{x:n,y:a,lineHeight:i,capHeight:o,fill:s,scaleToFit:c,textAnchor:u,verticalAnchor:d}=r,f=n6(r,gre),p=m.useMemo(()=>kre({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:c,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,c,f.style,f.width]),{dx:h,dy:g,angle:x,className:v,breakAll:y}=f,b=n6(f,yre);if(!zn(n)||!zn(a)||p.length===0)return null;var w=Number(n)+(te(h)?h:0),j=Number(a)+(te(g)?g:0);if(!Ie(w)||!Ie(j))return null;var N;switch(d){case"start":N=Mh("calc(".concat(o,")"));break;case"middle":N=Mh("calc(".concat((p.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:N=Mh("calc(".concat(p.length-1," * -").concat(i,")"));break}var S=[];if(c){var P=p[0].width,{width:C}=f;S.push("scale(".concat(te(C)&&te(P)?C/P:1,")"))}return x&&S.push("rotate(".concat(x,", ").concat(w,", ").concat(j,")")),S.length&&(b.transform=S.join(" ")),m.createElement("text",qy({},nr(b),{ref:t,x:w,y:j,className:ve("recharts-text",v),textAnchor:u,fill:s.includes("url")?SA:s}),p.map((M,T)=>{var A=M.words.join(y?"":" ");return m.createElement("tspan",{x:w,dy:T===0?N:i,key:"".concat(A,"-").concat(T)},A)}))});Jp.displayName="Text";var Nre=["labelRef"],Sre=["content"];function o6(e,t){if(e==null)return{};var r,n,a=Pre(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n{var{x:t,y:r,upperWidth:n,lowerWidth:a,width:i,height:o,children:s}=e,c=m.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:i,height:o}),[t,r,n,a,i,o]);return m.createElement(PA.Provider,{value:c},s)},CA=()=>{var e=m.useContext(PA),t=Mp();return e||G9(t)},Tre=m.createContext(null),Mre=()=>{var e=m.useContext(Tre),t=ie(gE);return e||t},Ire=e=>{var{value:t,formatter:r}=e,n=Ve(e.children)?t:e.children;return typeof r=="function"?r(n):n},Rb=e=>e!=null&&typeof e=="function",_re=(e,t)=>{var r=Mt(t-e),n=Math.min(Math.abs(t-e),360);return r*n},Lre=(e,t,r,n,a)=>{var{offset:i,className:o}=e,{cx:s,cy:c,innerRadius:u,outerRadius:d,startAngle:f,endAngle:p,clockWise:h}=a,g=(u+d)/2,x=_re(f,p),v=x>=0?1:-1,y,b;switch(t){case"insideStart":y=f+v*i,b=h;break;case"insideEnd":y=p-v*i,b=!h;break;case"end":y=p+v*i,b=h;break;default:throw new Error("Unsupported position ".concat(t))}b=x<=0?b:!b;var w=gt(s,c,g,y),j=gt(s,c,g,y+(b?1:-1)*359),N="M".concat(w.x,",").concat(w.y,` + A`).concat(g,",").concat(g,",0,1,").concat(b?0:1,`, + `).concat(j.x,",").concat(j.y),S=Ve(e.id)?Lc("recharts-radial-line-"):e.id;return m.createElement("text",ea({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",o)}),m.createElement("defs",null,m.createElement("path",{id:S,d:N})),m.createElement("textPath",{xlinkHref:"#".concat(S)},r))},Dre=(e,t,r)=>{var{cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:s,endAngle:c}=e,u=(s+c)/2;if(r==="outside"){var{x:d,y:f}=gt(n,a,o+t,u);return{x:d,y:f,textAnchor:d>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var p=(i+o)/2,{x:h,y:g}=gt(n,a,p,u);return{x:h,y:g,textAnchor:"middle",verticalAnchor:"middle"}},Xy=e=>"cx"in e&&te(e.cx),Rre=(e,t)=>{var{parentViewBox:r,offset:n,position:a}=e,i;r!=null&&!Xy(r)&&(i=r);var{x:o,y:s,upperWidth:c,lowerWidth:u,height:d}=t,f=o,p=o+(c-u)/2,h=(f+p)/2,g=(c+u)/2,x=f+c/2,v=d>=0?1:-1,y=v*n,b=v>0?"end":"start",w=v>0?"start":"end",j=c>=0?1:-1,N=j*n,S=j>0?"end":"start",P=j>0?"start":"end";if(a==="top"){var C={x:f+c/2,y:s-y,textAnchor:"middle",verticalAnchor:b};return ut(ut({},C),i?{height:Math.max(s-i.y,0),width:c}:{})}if(a==="bottom"){var M={x:p+u/2,y:s+d+y,textAnchor:"middle",verticalAnchor:w};return ut(ut({},M),i?{height:Math.max(i.y+i.height-(s+d),0),width:u}:{})}if(a==="left"){var T={x:h-N,y:s+d/2,textAnchor:S,verticalAnchor:"middle"};return ut(ut({},T),i?{width:Math.max(T.x-i.x,0),height:d}:{})}if(a==="right"){var A={x:h+g+N,y:s+d/2,textAnchor:P,verticalAnchor:"middle"};return ut(ut({},A),i?{width:Math.max(i.x+i.width-A.x,0),height:d}:{})}var E=i?{width:g,height:d}:{};return a==="insideLeft"?ut({x:h+N,y:s+d/2,textAnchor:P,verticalAnchor:"middle"},E):a==="insideRight"?ut({x:h+g-N,y:s+d/2,textAnchor:S,verticalAnchor:"middle"},E):a==="insideTop"?ut({x:f+c/2,y:s+y,textAnchor:"middle",verticalAnchor:w},E):a==="insideBottom"?ut({x:p+u/2,y:s+d-y,textAnchor:"middle",verticalAnchor:b},E):a==="insideTopLeft"?ut({x:f+N,y:s+y,textAnchor:P,verticalAnchor:w},E):a==="insideTopRight"?ut({x:f+c-N,y:s+y,textAnchor:S,verticalAnchor:w},E):a==="insideBottomLeft"?ut({x:p+N,y:s+d-y,textAnchor:P,verticalAnchor:b},E):a==="insideBottomRight"?ut({x:p+u-N,y:s+d-y,textAnchor:S,verticalAnchor:b},E):a&&typeof a=="object"&&(te(a.x)||ba(a.x))&&(te(a.y)||ba(a.y))?ut({x:o+tr(a.x,g),y:s+tr(a.y,d),textAnchor:"end",verticalAnchor:"end"},E):ut({x,y:s+d/2,textAnchor:"middle",verticalAnchor:"middle"},E)},$re={angle:0,offset:5,zIndex:Ze.label,position:"middle",textBreakAll:!1};function Wa(e){var t=ct(e,$re),{viewBox:r,position:n,value:a,children:i,content:o,className:s="",textBreakAll:c,labelRef:u}=t,d=Mre(),f=CA(),p=n==="center"?f:d??f,h,g,x;if(r==null?h=p:Xy(r)?h=r:h=G9(r),!h||Ve(a)&&Ve(i)&&!m.isValidElement(o)&&typeof o!="function")return null;var v=ut(ut({},t),{},{viewBox:h});if(m.isValidElement(o)){var y=o6(v,Nre);return m.cloneElement(o,y)}if(typeof o=="function"){var b=o6(v,Sre);if(g=m.createElement(o,b),m.isValidElement(g))return g}else g=Ire(t);var w=nr(t);if(Xy(h)){if(n==="insideStart"||n==="insideEnd"||n==="end")return Lre(t,n,g,w,h);x=Dre(h,t.offset,t.position)}else x=Rre(t,h);return m.createElement(gr,{zIndex:t.zIndex},m.createElement(Jp,ea({ref:u,className:ve("recharts-label",s)},w,x,{textAnchor:xre(w.textAnchor)?w.textAnchor:x.textAnchor,breakAll:c}),g))}Wa.displayName="Label";var zre=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?m.createElement(Wa,ea({key:"label-implicit"},n)):zn(e)?m.createElement(Wa,ea({key:"label-implicit",value:e},n)):m.isValidElement(e)?e.type===Wa?m.cloneElement(e,ut({key:"label-implicit"},n)):m.createElement(Wa,ea({key:"label-implicit",content:e},n)):Rb(e)?m.createElement(Wa,ea({key:"label-implicit",content:e},n)):e&&typeof e=="object"?m.createElement(Wa,ea({},e,{key:"label-implicit"},n)):null};function Bre(e){var{label:t,labelRef:r}=e,n=CA();return zre(t,n,r)||null}var EA={},AA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(AA);var OA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(OA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AA,r=OA,n=Sp;function a(i){if(n.isArrayLike(i))return t.last(r.toArray(i))}e.last=a})(EA);var Fre=EA.last;const Vre=Hn(Fre);var Ure=["valueAccessor"],Hre=["dataKey","clockWise","id","textBreakAll","zIndex"];function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;tArray.isArray(e.value)?Vre(e.value):e.value,TA=m.createContext(void 0),$b=TA.Provider,MA=m.createContext(void 0),Gre=MA.Provider;function Yre(){return m.useContext(TA)}function qre(){return m.useContext(MA)}function Fd(e){var{valueAccessor:t=Kre}=e,r=l6(e,Ure),{dataKey:n,clockWise:a,id:i,textBreakAll:o,zIndex:s}=r,c=l6(r,Hre),u=Yre(),d=qre(),f=u||d;return!f||!f.length?null:m.createElement(gr,{zIndex:s??Ze.label},m.createElement(lt,{className:"recharts-label-list"},f.map((p,h)=>{var g,x=Ve(n)?t(p,h):Se(p&&p.payload,n),v=Ve(i)?{}:{id:"".concat(i,"-").concat(h)};return m.createElement(Wa,wf({key:"label-".concat(h)},nr(p),c,v,{fill:(g=r.fill)!==null&&g!==void 0?g:p.fill,parentViewBox:p.parentViewBox,value:x,textBreakAll:o,viewBox:p.viewBox,index:h,zIndex:0}))})))}Fd.displayName="LabelList";function em(e){var{label:t}=e;return t?t===!0?m.createElement(Fd,{key:"labelList-implicit"}):m.isValidElement(t)||Rb(t)?m.createElement(Fd,{key:"labelList-implicit",content:t}):typeof t=="object"?m.createElement(Fd,wf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Zy(){return Zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{cx:t,cy:r,r:n,className:a}=e,i=ve("recharts-dot",a);return te(t)&&te(r)&&te(n)?m.createElement("circle",Zy({},pr(e),d1(e),{className:i,cx:t,cy:r,r:n})):null},_A=e=>e.graphicalItems.polarItems,Xre=$([qe,mu],sb),tm=$([_A,et,Xre],lb),Zre=$([tm],cb),rm=$([Zre,Bp],ub),Qre=$([rm,et,tm],fb);$([rm,et,tm],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(a=>{var i,o=Se(n,(i=t.dataKey)!==null&&i!==void 0?i:a.dataKey);return{value:o,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Se(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]})));var c6=()=>{},Jre=$([rm,et,tm,Yp,qe],gb),ene=$([et,mb,hb,c6,Jre,c6,ge,qe],yb),LA=$([et,ge,rm,Qre,pu,qe,ene],vb),tne=$([LA,et,al],wb);$([et,LA,tne,qe],jb);var rne={radiusAxis:{},angleAxis:{}},nne=ar({name:"polarAxis",initialState:rne,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),ane=nne.reducer;function u6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function d6(e){for(var t=1;tt,zb=$([_A,lne],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),cne=[],Bb=(e,t,r)=>(r==null?void 0:r.length)===0?cne:r,DA=$([Bp,zb,Bb],(e,t,r)=>{var{chartData:n}=e;if(t!=null){var a;if((t==null?void 0:t.data)!=null&&t.data.length>0?a=t.data:a=n,(!a||!a.length)&&r!=null&&(a=r.map(i=>d6(d6({},t.presentationProps),i.props))),a!=null)return a}}),une=$([DA,zb,Bb],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,a)=>{var i,o=Se(n,t.nameKey,t.name),s;return r!=null&&(i=r[a])!==null&&i!==void 0&&(i=i.props)!==null&&i!==void 0&&i.fill?s=r[a].props.fill:typeof n=="object"&&n!=null&&"fill"in n?s=n.fill:s=t.fill,{value:Ii(o,t.dataKey),color:s,payload:n,type:t.legendType}})}),dne=$([DA,zb,Bb,kt],(e,t,r,n)=>{if(!(t==null||e==null))return mae({offset:n,pieSettings:t,displayedData:e,cells:r})}),RA={exports:{}},Ee={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rt=typeof Symbol=="function"&&Symbol.for,Fb=Rt?Symbol.for("react.element"):60103,Vb=Rt?Symbol.for("react.portal"):60106,nm=Rt?Symbol.for("react.fragment"):60107,am=Rt?Symbol.for("react.strict_mode"):60108,im=Rt?Symbol.for("react.profiler"):60114,om=Rt?Symbol.for("react.provider"):60109,sm=Rt?Symbol.for("react.context"):60110,Ub=Rt?Symbol.for("react.async_mode"):60111,lm=Rt?Symbol.for("react.concurrent_mode"):60111,cm=Rt?Symbol.for("react.forward_ref"):60112,um=Rt?Symbol.for("react.suspense"):60113,fne=Rt?Symbol.for("react.suspense_list"):60120,dm=Rt?Symbol.for("react.memo"):60115,fm=Rt?Symbol.for("react.lazy"):60116,pne=Rt?Symbol.for("react.block"):60121,mne=Rt?Symbol.for("react.fundamental"):60117,hne=Rt?Symbol.for("react.responder"):60118,gne=Rt?Symbol.for("react.scope"):60119;function Ur(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fb:switch(e=e.type,e){case Ub:case lm:case nm:case im:case am:case um:return e;default:switch(e=e&&e.$$typeof,e){case sm:case cm:case fm:case dm:case om:return e;default:return t}}case Vb:return t}}}function $A(e){return Ur(e)===lm}Ee.AsyncMode=Ub;Ee.ConcurrentMode=lm;Ee.ContextConsumer=sm;Ee.ContextProvider=om;Ee.Element=Fb;Ee.ForwardRef=cm;Ee.Fragment=nm;Ee.Lazy=fm;Ee.Memo=dm;Ee.Portal=Vb;Ee.Profiler=im;Ee.StrictMode=am;Ee.Suspense=um;Ee.isAsyncMode=function(e){return $A(e)||Ur(e)===Ub};Ee.isConcurrentMode=$A;Ee.isContextConsumer=function(e){return Ur(e)===sm};Ee.isContextProvider=function(e){return Ur(e)===om};Ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fb};Ee.isForwardRef=function(e){return Ur(e)===cm};Ee.isFragment=function(e){return Ur(e)===nm};Ee.isLazy=function(e){return Ur(e)===fm};Ee.isMemo=function(e){return Ur(e)===dm};Ee.isPortal=function(e){return Ur(e)===Vb};Ee.isProfiler=function(e){return Ur(e)===im};Ee.isStrictMode=function(e){return Ur(e)===am};Ee.isSuspense=function(e){return Ur(e)===um};Ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===nm||e===lm||e===im||e===am||e===um||e===fne||typeof e=="object"&&e!==null&&(e.$$typeof===fm||e.$$typeof===dm||e.$$typeof===om||e.$$typeof===sm||e.$$typeof===cm||e.$$typeof===mne||e.$$typeof===hne||e.$$typeof===gne||e.$$typeof===pne)};Ee.typeOf=Ur;RA.exports=Ee;var yne=RA.exports,f6=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",p6=null,Ih=null,zA=e=>{if(e===p6&&Array.isArray(Ih))return Ih;var t=[];return m.Children.forEach(e,r=>{Ve(r)||(yne.isFragment(r)?t=t.concat(zA(r.props.children)):t.push(r))}),Ih=t,p6=e,t};function Hb(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(a=>f6(a)):n=[f6(t)],zA(e).forEach(a=>{var i=Ao(a,"type.displayName")||Ao(a,"type.name");i&&n.indexOf(i)!==-1&&r.push(a)}),r}var Wb=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,BA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var a;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!((a=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&a.writable)?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(BA);var vne=BA.isPlainObject;const xne=Hn(vne);var m6,h6,g6,y6,v6;function x6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function b6(e){for(var t=1;t{var i=r-n,o;return o=at(m6||(m6=Tl(["M ",",",""])),e,t),o+=at(h6||(h6=Tl(["L ",",",""])),e+r,t),o+=at(g6||(g6=Tl(["L ",",",""])),e+r-i/2,t+a),o+=at(y6||(y6=Tl(["L ",",",""])),e+r-i/2-n,t+a),o+=at(v6||(v6=Tl(["L ",","," Z"])),e,t),o},jne={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Nne=e=>{var t=ct(e,jne),{x:r,y:n,upperWidth:a,lowerWidth:i,height:o,className:s}=t,{animationEasing:c,animationDuration:u,animationBegin:d,isUpdateAnimationActive:f}=t,p=m.useRef(null),[h,g]=m.useState(-1),x=m.useRef(a),v=m.useRef(i),y=m.useRef(o),b=m.useRef(r),w=m.useRef(n),j=Qs(e,"trapezoid-");if(m.useEffect(()=>{if(p.current&&p.current.getTotalLength)try{var L=p.current.getTotalLength();L&&g(L)}catch{}},[]),r!==+r||n!==+n||a!==+a||i!==+i||o!==+o||a===0&&i===0||o===0)return null;var N=ve("recharts-trapezoid",s);if(!f)return m.createElement("g",null,m.createElement("path",kf({},nr(t),{className:N,d:w6(r,n,a,i,o)})));var S=x.current,P=v.current,C=y.current,M=b.current,T=w.current,A="0px ".concat(h===-1?1:h,"px"),E="".concat(h,"px 0px"),_=eC(["strokeDasharray"],u,c);return m.createElement(Zs,{animationId:j,key:j,canBegin:h>0,duration:u,easing:c,isActive:f,begin:d},L=>{var I=je(S,a,L),B=je(P,i,L),V=je(C,o,L),O=je(M,r,L),R=je(T,n,L);p.current&&(x.current=I,v.current=B,y.current=V,b.current=O,w.current=R);var U=L>0?{transition:_,strokeDasharray:E}:{strokeDasharray:A};return m.createElement("path",kf({},nr(t),{className:N,d:w6(O,R,I,B,V),ref:p,style:b6(b6({},U),t.style)}))})},Sne=["option","shapeType","activeClassName"];function Pne(e,t){if(e==null)return{};var r,n,a=Cne(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n{var n=De();return(a,i)=>o=>{e==null||e(a,i,o),n(GE({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:r}))}},Yb=e=>{var t=De();return(r,n)=>a=>{e==null||e(r,n,a),t(HJ())}},qb=(e,t,r)=>{var n=De();return(a,i)=>o=>{e==null||e(a,i,o),n(WJ({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:r}))}};function pm(e){var{tooltipEntrySettings:t}=e,r=De(),n=Lt(),a=m.useRef(null);return m.useLayoutEffect(()=>{n||(a.current===null?r(BJ(t)):a.current!==t&&r(FJ({prev:a.current,next:t})),a.current=t)},[t,r,n]),m.useLayoutEffect(()=>()=>{a.current&&(r(VJ(a.current)),a.current=null)},[r]),null}function Xb(e){var{legendPayload:t}=e,r=De(),n=Lt(),a=m.useRef(null);return m.useLayoutEffect(()=>{n||(a.current===null?r(X9(t)):a.current!==t&&r(Z9({prev:a.current,next:t})),a.current=t)},[r,n,t]),m.useLayoutEffect(()=>()=>{a.current&&(r(Q9(a.current)),a.current=null)},[r]),null}function _ne(e){var{legendPayload:t}=e,r=De(),n=ie(ge),a=m.useRef(null);return m.useLayoutEffect(()=>{n!=="centric"&&n!=="radial"||(a.current===null?r(X9(t)):a.current!==t&&r(Z9({prev:a.current,next:t})),a.current=t)},[r,n,t]),m.useLayoutEffect(()=>()=>{a.current&&(r(Q9(a.current)),a.current=null)},[r]),null}var _h,Lne=()=>{var[e]=m.useState(()=>Lc("uid-"));return e},Dne=(_h=Wd.useId)!==null&&_h!==void 0?_h:Lne;function Rne(e,t){var r=Dne();return t||(e?"".concat(e,"-").concat(r):r)}var $ne=m.createContext(void 0),mm=e=>{var{id:t,type:r,children:n}=e,a=Rne("recharts-".concat(r),t);return m.createElement($ne.Provider,{value:a},n(a))},zne={cartesianItems:[],polarItems:[]},FA=ar({name:"graphicalItems",initialState:zne,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:He()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,a=xn(e).cartesianItems.indexOf(r);a>-1&&(e.cartesianItems[a]=n)},prepare:He()},removeCartesianGraphicalItem:{reducer(e,t){var r=xn(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:He()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:He()},removePolarGraphicalItem:{reducer(e,t){var r=xn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:He()}}}),{addCartesianGraphicalItem:Bne,replaceCartesianGraphicalItem:Fne,removeCartesianGraphicalItem:Vne,addPolarGraphicalItem:Une,removePolarGraphicalItem:Hne}=FA.actions,Wne=FA.reducer,Kne=e=>{var t=De(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(Bne(e)):r.current!==e&&t(Fne({prev:r.current,next:e})),r.current=e},[t,e]),m.useLayoutEffect(()=>()=>{r.current&&(t(Vne(r.current)),r.current=null)},[t]),null},Zb=m.memo(Kne);function Gne(e){var t=De();return m.useLayoutEffect(()=>(t(Une(e)),()=>{t(Hne(e))}),[t,e]),null}var Yne=["key"],qne=["onMouseEnter","onClick","onMouseLeave"],Xne=["id"],Zne=["id"];function N6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ot(e){for(var t=1;tHb(e.children,ju),[e.children]),r=ie(n=>une(n,e.id,t));return r==null?null:m.createElement(_ne,{legendPayload:r})}var nae=m.memo(e=>{var{dataKey:t,nameKey:r,sectors:n,stroke:a,strokeWidth:i,fill:o,name:s,hide:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:n.map(p=>p.tooltipPayload),positions:n.map(p=>p.tooltipPosition),settings:{stroke:a,strokeWidth:i,fill:o,dataKey:t,nameKey:r,name:Ii(s,t),hide:c,type:u,color:o,unit:"",graphicalItemId:d}};return m.createElement(pm,{tooltipEntrySettings:f})}),aae=(e,t)=>e>t?"start":etr(typeof t=="function"?t(e):t,r,r*.8),oae=(e,t,r)=>{var{top:n,left:a,width:i,height:o}=t,s=iC(i,o),c=a+tr(e.cx,i,i/2),u=n+tr(e.cy,o,o/2),d=tr(e.innerRadius,s,0),f=iae(r,e.outerRadius,s),p=e.maxRadius||Math.sqrt(i*i+o*o)/2;return{cx:c,cy:u,innerRadius:d,outerRadius:f,maxRadius:p}},sae=(e,t)=>{var r=Mt(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function lae(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var cae=(e,t)=>{if(m.isValidElement(e))return m.cloneElement(e,t);if(typeof e=="function")return e(t);var r=ve("recharts-pie-label-line",typeof e!="boolean"?e.className:""),n=hm(t,Yne);return m.createElement(ws,Ni({},n,{type:"linear",className:r}))},uae=(e,t,r)=>{if(m.isValidElement(e))return m.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),m.isValidElement(n)))return n;var a=ve("recharts-pie-label-text",lae(e));return m.createElement(Jp,Ni({},t,{alignmentBaseline:"middle",className:a}),n)};function dae(e){var{sectors:t,props:r,showLabels:n}=e,{label:a,labelLine:i,dataKey:o}=r;if(!n||!a||!t)return null;var s=pr(r),c=Co(a),u=Co(i),d=typeof a=="object"&&"offsetRadius"in a&&typeof a.offsetRadius=="number"&&a.offsetRadius||20,f=t.map((p,h)=>{var g=(p.startAngle+p.endAngle)/2,x=gt(p.cx,p.cy,p.outerRadius+d,g),v=ot(ot(ot(ot({},s),p),{},{stroke:"none"},c),{},{index:h,textAnchor:aae(x.x,p.cx)},x),y=ot(ot(ot(ot({},s),p),{},{fill:"none",stroke:p.fill},u),{},{index:h,points:[gt(p.cx,p.cy,p.outerRadius,g),x],key:"line"});return m.createElement(gr,{zIndex:Ze.label,key:"label-".concat(p.startAngle,"-").concat(p.endAngle,"-").concat(p.midAngle,"-").concat(h)},m.createElement(lt,null,i&&cae(i,y),uae(a,v,Se(p,o))))});return m.createElement(lt,{className:"recharts-pie-labels"},f)}function fae(e){var{sectors:t,props:r,showLabels:n}=e,{label:a}=r;return typeof a=="object"&&a!=null&&"position"in a?m.createElement(em,{label:a}):m.createElement(dae,{sectors:t,props:r,showLabels:n})}function pae(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:a,shape:i,id:o}=e,s=ie(ji),c=ie(Mb),u=ie(Oee),{onMouseEnter:d,onClick:f,onMouseLeave:p}=a,h=hm(a,qne),g=Gb(d,a.dataKey,o),x=Yb(p),v=qb(f,a.dataKey,o);return t==null||t.length===0?null:m.createElement(m.Fragment,null,t.map((y,b)=>{if((y==null?void 0:y.startAngle)===0&&(y==null?void 0:y.endAngle)===0&&t.length!==1)return null;var w=u==null||u===o,j=String(b)===s&&(c==null||a.dataKey===c)&&w,N=s?n:null,S=r&&j?r:N,P=ot(ot({},y),{},{stroke:y.stroke,tabIndex:-1,[z9]:b,[B9]:o});return m.createElement(lt,Ni({key:"sector-".concat(y==null?void 0:y.startAngle,"-").concat(y==null?void 0:y.endAngle,"-").concat(y.midAngle,"-").concat(b),tabIndex:-1,className:"recharts-pie-sector"},ou(h,y,b),{onMouseEnter:g(y,b),onMouseLeave:x(y,b),onClick:v(y,b)}),m.createElement(Kb,Ni({option:i??S,index:b,shapeType:"sector",isActive:j},P)))}))}function mae(e){var t,{pieSettings:r,displayedData:n,cells:a,offset:i}=e,{cornerRadius:o,startAngle:s,endAngle:c,dataKey:u,nameKey:d,tooltipType:f}=r,p=Math.abs(r.minAngle),h=sae(s,c),g=Math.abs(h),x=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,v=n.filter(S=>Se(S,u,0)!==0).length,y=(g>=360?v:v-1)*x,b=g-v*p-y,w=n.reduce((S,P)=>{var C=Se(P,u,0);return S+(te(C)?C:0)},0),j;if(w>0){var N;j=n.map((S,P)=>{var C=Se(S,u,0),M=Se(S,d,P),T=oae(r,i,S),A=(te(C)?C:0)/w,E,_=ot(ot({},S),a&&a[P]&&a[P].props);P?E=N.endAngle+Mt(h)*x*(C!==0?1:0):E=s;var L=E+Mt(h)*((C!==0?p:0)+A*b),I=(E+L)/2,B=(T.innerRadius+T.outerRadius)/2,V=[{name:M,value:C,payload:_,dataKey:u,type:f,graphicalItemId:r.id}],O=gt(T.cx,T.cy,B,I);return N=ot(ot(ot(ot({},r.presentationProps),{},{percent:A,cornerRadius:typeof o=="string"?parseFloat(o):o,name:M,tooltipPayload:V,midAngle:I,middleRadius:B,tooltipPosition:O},_),T),{},{value:C,dataKey:u,startAngle:E,endAngle:L,payload:_,paddingAngle:Mt(h)*x}),N})}return j}function hae(e){var{showLabels:t,sectors:r,children:n}=e,a=m.useMemo(()=>!t||!r?[]:r.map(i=>({value:i.value,payload:i.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:i.cx,cy:i.cy,innerRadius:i.innerRadius,outerRadius:i.outerRadius,startAngle:i.startAngle,endAngle:i.endAngle,clockWise:!1},fill:i.fill})),[r,t]);return m.createElement(Gre,{value:t?a:void 0},n)}function gae(e){var{props:t,previousSectorsRef:r,id:n}=e,{sectors:a,isAnimationActive:i,animationBegin:o,animationDuration:s,animationEasing:c,activeShape:u,inactiveShape:d,onAnimationStart:f,onAnimationEnd:p}=t,h=Qs(t,"recharts-pie-"),g=r.current,[x,v]=m.useState(!1),y=m.useCallback(()=>{typeof p=="function"&&p(),v(!1)},[p]),b=m.useCallback(()=>{typeof f=="function"&&f(),v(!0)},[f]);return m.createElement(hae,{showLabels:!x,sectors:a},m.createElement(Zs,{animationId:h,begin:o,duration:s,isActive:i,easing:c,onAnimationStart:b,onAnimationEnd:y,key:h},w=>{var j=[],N=a&&a[0],S=N==null?void 0:N.startAngle;return a==null||a.forEach((P,C)=>{var M=g&&g[C],T=C>0?Ao(P,"paddingAngle",0):0;if(M){var A=je(M.endAngle-M.startAngle,P.endAngle-P.startAngle,w),E=ot(ot({},P),{},{startAngle:S+T,endAngle:S+A+T});j.push(E),S=E.endAngle}else{var{endAngle:_,startAngle:L}=P,I=je(0,_-L,w),B=ot(ot({},P),{},{startAngle:S+T,endAngle:S+I+T});j.push(B),S=B.endAngle}}),r.current=j,m.createElement(lt,null,m.createElement(pae,{sectors:j,activeShape:u,inactiveShape:d,allOtherPieProps:t,shape:t.shape,id:n}))}),m.createElement(fae,{showLabels:!x,sectors:a,props:t}),t.children)}var yae={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Ze.area};function vae(e){var{id:t}=e,r=hm(e,Xne),{hide:n,className:a,rootTabIndex:i}=e,o=m.useMemo(()=>Hb(e.children,ju),[e.children]),s=ie(d=>dne(d,t,o)),c=m.useRef(null),u=ve("recharts-pie",a);return n||s==null?(c.current=null,m.createElement(lt,{tabIndex:i,className:u})):m.createElement(gr,{zIndex:e.zIndex},m.createElement(nae,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:s,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),m.createElement(lt,{tabIndex:i,className:u},m.createElement(gae,{props:ot(ot({},r),{},{sectors:s}),previousSectorsRef:c,id:t})))}function VA(e){var t=ct(e,yae),{id:r}=t,n=hm(t,Zne),a=pr(n);return m.createElement(mm,{id:r,type:"pie"},i=>m.createElement(m.Fragment,null,m.createElement(Gne,{type:"pie",id:i,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:a,maxRadius:t.maxRadius}),m.createElement(rae,Ni({},n,{id:i})),m.createElement(vae,Ni({},n,{id:i}))))}VA.displayName="Pie";var xae=["points"];function S6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lh(e){for(var t=1;t{var v,y,b=Lh(Lh(Lh({r:3},o),f),{},{index:x,cx:(v=g.x)!==null&&v!==void 0?v:void 0,cy:(y=g.y)!==null&&y!==void 0?y:void 0,dataKey:i,value:g.value,payload:g.payload,points:t});return m.createElement(Sae,{key:"dot-".concat(x),option:r,dotProps:b,className:a})}),h={};return s&&c!=null&&(h.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(c,")")),m.createElement(gr,{zIndex:u},m.createElement(lt,Nf({className:n},h),p))}function P6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function C6(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Bae=$([zae,Aa,Oa],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),gm=()=>ie(Bae),Fae=()=>ie(Lee);function E6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dh(e){for(var t=1;t{var{point:t,childIndex:r,mainColor:n,activeDot:a,dataKey:i,clipPath:o}=e;if(a===!1||t.x==null||t.y==null)return null;var s={index:r,dataKey:i,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=Dh(Dh(Dh({},s),Co(a)),d1(a)),u;return m.isValidElement(a)?u=m.cloneElement(a,c):typeof a=="function"?u=a(c):u=m.createElement(IA,c),m.createElement(lt,{className:"recharts-active-dot",clipPath:o},u)};function Qy(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:a,clipPath:i,zIndex:o=Ze.activeDot}=e,s=ie(ji),c=Fae();if(t==null||c==null)return null;var u=t.find(d=>c.includes(d.payload));return Ve(u)?null:m.createElement(gr,{zIndex:o},m.createElement(Wae,{point:u,childIndex:Number(s),mainColor:r,dataKey:a,activeDot:n,clipPath:i}))}var A6=(e,t,r)=>{var n=r??e;if(!Ve(n))return tr(n,t,0)},Kae=(e,t,r)=>{var n={},a=e.filter(Hp),i=e.filter(u=>u.stackId==null),o=a.reduce((u,d)=>(u[d.stackId]||(u[d.stackId]=[]),u[d.stackId].push(d),u),n),s=Object.entries(o).map(u=>{var[d,f]=u,p=f.map(g=>g.dataKey),h=A6(t,r,f[0].barSize);return{stackId:d,dataKeys:p,barSize:h}}),c=i.map(u=>{var d=[u.dataKey].filter(p=>p!=null),f=A6(t,r,u.barSize);return{stackId:void 0,dataKeys:d,barSize:f}});return[...s,...c]};function O6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pd(e){for(var t=1;ty+(b.barSize||0),0);f+=(i-1)*o,f>=r&&(f-=(i-1)*o,o=0),f>=r&&d>0&&(u=!0,d*=.9,f=i*d);var p=(r-f)/2>>0,h={offset:p-o,size:0};s=n.reduce((y,b)=>{var w,j={stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:h.offset+h.size+o,size:u?d:(w=b.barSize)!==null&&w!==void 0?w:0}},N=[...y,j];return h=N[N.length-1].position,N},c)}else{var g=tr(t,r,0,!0);r-2*g-(i-1)*o<=0&&(o=0);var x=(r-2*g-(i-1)*o)/i;x>1&&(x>>=0);var v=Ie(a)?Math.min(x,a):x;s=n.reduce((y,b,w)=>[...y,{stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:g+(x+o)*w+(x-v)/2,size:v}}],c)}return s}}var Zae=(e,t,r,n,a,i,o)=>{var s=Ve(o)?t:o,c=Xae(r,n,a!==i?a:i,e,s);return a!==i&&c!=null&&(c=c.map(u=>pd(pd({},u),{},{position:pd(pd({},u.position),{},{offset:u.position.offset-a/2})}))),c},Qae=(e,t)=>{var r=Up(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var a=e[n];if(a){var{stackedData:i}=a;if(i)return i.find(o=>o.key===r)}}}};function Jae(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Ie(e.zIndex)?e.zIndex:t}var KA=e=>{var{chartData:t}=e,r=De(),n=Lt();return m.useEffect(()=>n?()=>{}:(r(Wk(t)),()=>{r(Wk(void 0))}),[t,r,n]),null},T6={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},eie=ar({name:"brush",initialState:T6,reducers:{setBrushSettings(e,t){return t.payload==null?T6:t.payload}}}),tie=eie.reducer;function rie(e,t,r){return(t=nie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nie(e){var t=aie(e,"string");return typeof t=="symbol"?t:t+""}function aie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Qb{static create(t){return new Qb(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}case"end":{var i=this.bandwidth?this.bandwidth():0;return this.scale(t)+i}default:return this.scale(t)}if(r){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],a=r[r.length-1];return n<=a?t>=n&&t<=a:t>=a&&t<=n}}rie(Qb,"EPS",1e-4);function iie(e){return(e%180+180)%180}var oie=function(t){var{width:r,height:n}=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=iie(a),o=i*Math.PI/180,s=Math.atan(n/r),c=o>s&&o{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=xn(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=xn(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=xn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),cie=lie.reducer,uie=m.createContext(void 0),die=e=>{var{children:t}=e,[r]=m.useState("".concat(Lc("recharts"),"-clip")),n=gm();if(n==null)return null;var{x:a,y:i,width:o,height:s}=n;return m.createElement(uie.Provider,{value:r},m.createElement("defs",null,m.createElement("clipPath",{id:r},m.createElement("rect",{x:a,y:i,height:s,width:o}))),t)};function GA(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function mie(e,t){return GA(e,t+1)}function hie(e,t,r,n,a){for(var i=(n||[]).slice(),{start:o,end:s}=t,c=0,u=1,d=o,f=function(){var g=n==null?void 0:n[c];if(g===void 0)return{v:GA(n,u)};var x=c,v,y=()=>(v===void 0&&(v=r(g,x)),v),b=g.coordinate,w=c===0||Uc(e,b,y,d,s);w||(c=0,d=o,u+=1),w&&(d=b+e*(y()/2+a),c+=u)},p;u<=i.length;)if(p=f(),p)return p.v;return[]}function gie(e,t,r,n,a){var i=(n||[]).slice(),o=i.length;if(o===0)return[];for(var{start:s,end:c}=t,u=1;u<=o;u++){for(var d=(o-1)%u,f=s,p=!0,h=function(){var b=n[g],w=g,j,N=()=>(j===void 0&&(j=r(b,w)),j),S=b.coordinate,P=g===d||Uc(e,S,N,f,c);if(!P)return p=!1,1;P&&(f=S+e*(N()/2+a))},g=d;g(g===void 0&&(g=r(h,p)),g);if(p===o-1){var v=e*(h.coordinate+e*x()/2-c);i[p]=h=Zt(Zt({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate})}else i[p]=h=Zt(Zt({},h),{},{tickCoord:h.coordinate});if(h.tickCoord!=null){var y=Uc(e,h.tickCoord,x,s,c);y&&(c=h.tickCoord-e*(x()/2+a),i[p]=Zt(Zt({},h),{},{isShow:!0}))}},d=o-1;d>=0;d--)u(d);return i}function wie(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,{start:c,end:u}=t;if(i){var d=n[s-1],f=r(d,s-1),p=e*(d.coordinate+e*f/2-u);if(o[s-1]=d=Zt(Zt({},d),{},{tickCoord:p>0?d.coordinate-p*e:d.coordinate}),d.tickCoord!=null){var h=Uc(e,d.tickCoord,()=>f,c,u);h&&(u=d.tickCoord-e*(f/2+a),o[s-1]=Zt(Zt({},d),{},{isShow:!0}))}}for(var g=i?s-1:s,x=function(b){var w=o[b],j,N=()=>(j===void 0&&(j=r(w,b)),j);if(b===0){var S=e*(w.coordinate-e*N()/2-c);o[b]=w=Zt(Zt({},w),{},{tickCoord:S<0?w.coordinate-S*e:w.coordinate})}else o[b]=w=Zt(Zt({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var P=Uc(e,w.tickCoord,N,c,u);P&&(c=w.tickCoord+e*(N()/2+a),o[b]=Zt(Zt({},w),{},{isShow:!0}))}},v=0;v{var N=typeof u=="function"?u(w.value,j):w.value;return g==="width"?fie(ac(N,{fontSize:t,letterSpacing:r}),x,f):ac(N,{fontSize:t,letterSpacing:r})[g]},y=a.length>=2?Mt(a[1].coordinate-a[0].coordinate):1,b=pie(i,y,g);return c==="equidistantPreserveStart"?hie(y,b,v,a,o):c==="equidistantPreserveEnd"?gie(y,b,v,a,o):(c==="preserveStart"||c==="preserveStartEnd"?h=wie(y,b,v,a,o,c==="preserveStartEnd"):h=bie(y,b,v,a,o),h.filter(w=>w.isShow))}var kie=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:a=0,tickMargin:i=0}=e,o=0;if(t){Array.from(t).forEach(d=>{if(d){var f=d.getBoundingClientRect();f.width>o&&(o=f.width)}});var s=r?r.getBoundingClientRect().width:0,c=a+i,u=o+c+s+(r?n:0);return Math.round(u)}return 0},jie=["axisLine","width","height","className","hide","ticks","axisType"];function Nie(e,t){if(e==null)return{};var r,n,a=Sie(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n{var{ticks:r=[],tick:n,tickLine:a,stroke:i,tickFormatter:o,unit:s,padding:c,tickTextProps:u,orientation:d,mirror:f,x:p,y:h,width:g,height:x,tickSize:v,tickMargin:y,fontSize:b,letterSpacing:w,getTicksConfig:j,events:N,axisType:S}=e,P=Jb(mt(mt({},j),{},{ticks:r}),b,w),C=Tie(d,f),M=Mie(d,f),T=pr(j),A=Co(n),E={};typeof a=="object"&&(E=a);var _=mt(mt({},T),{},{fill:"none"},E),L=P.map(V=>mt({entry:V},Oie(V,p,h,g,x,d,v,f,y))),I=L.map(V=>{var{entry:O,line:R}=V;return m.createElement(lt,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(O.value,"-").concat(O.coordinate,"-").concat(O.tickCoord)},a&&m.createElement("line",To({},_,R,{className:ve("recharts-cartesian-axis-tick-line",Ao(a,"className"))})))}),B=L.map((V,O)=>{var{entry:R,tick:U}=V,q=mt(mt(mt(mt({textAnchor:C,verticalAnchor:M},T),{},{stroke:"none",fill:i},A),U),{},{index:O,payload:R,visibleTicksCount:P.length,tickFormatter:o,padding:c},u);return m.createElement(lt,To({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(R.value,"-").concat(R.coordinate,"-").concat(R.tickCoord)},ou(N,R,O)),n&&m.createElement(Iie,{option:n,tickProps:q,value:"".concat(typeof o=="function"?o(R.value,O):R.value).concat(s||"")}))});return m.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(S,"-ticks")},B.length>0&&m.createElement(gr,{zIndex:Ze.label},m.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(S,"-tick-labels"),ref:t},B)),I.length>0&&m.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(S,"-tick-lines")},I))}),Lie=m.forwardRef((e,t)=>{var{axisLine:r,width:n,height:a,className:i,hide:o,ticks:s,axisType:c}=e,u=Nie(e,jie),[d,f]=m.useState(""),[p,h]=m.useState(""),g=m.useRef(null);m.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var v;return kie({ticks:g.current,label:(v=e.labelRef)===null||v===void 0?void 0:v.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var x=m.useCallback(v=>{if(v){var y=v.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=y;var b=y[0];if(b){var w=window.getComputedStyle(b),j=w.fontSize,N=w.letterSpacing;(j!==d||N!==p)&&(f(j),h(N))}}},[d,p]);return o||n!=null&&n<=0||a!=null&&a<=0?null:m.createElement(gr,{zIndex:e.zIndex},m.createElement(lt,{className:ve("recharts-cartesian-axis",i)},m.createElement(Aie,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:pr(e)}),m.createElement(_ie,{ref:x,axisType:c,events:u,fontSize:d,getTicksConfig:e,height:e.height,letterSpacing:p,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y}),m.createElement(Ore,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},m.createElement(Bre,{label:e.label,labelRef:e.labelRef}),e.children)))}),e2=m.forwardRef((e,t)=>{var r=ct(e,fa);return m.createElement(Lie,To({},r,{ref:t}))});e2.displayName="CartesianAxis";var Die=["x1","y1","x2","y2","key"],Rie=["offset"],$ie=["xAxisId","yAxisId"],zie=["xAxisId","yAxisId"];function _6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jt(e){for(var t=1;t{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:a,width:i,height:o,ry:s}=e;return m.createElement("rect",{x:n,y:a,ry:s,width:i,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function YA(e){var{option:t,lineItemProps:r}=e,n;if(m.isValidElement(t))n=m.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,{x1:i,y1:o,x2:s,y2:c,key:u}=r,d=Sf(r,Die),f=(a=pr(d))!==null&&a!==void 0?a:{},p=Sf(f,Rie);n=m.createElement("line",to({},p,{x1:i,y1:o,x2:s,y2:c,fill:"none",key:u}))}return n}function Wie(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:a}=e;if(!n||!a||!a.length)return null;var i=Sf(e,$ie),o=a.map((s,c)=>{var u=Jt(Jt({},i),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(c),index:c});return m.createElement(YA,{key:"line-".concat(c),option:n,lineItemProps:u})});return m.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Kie(e){var{y:t,height:r,vertical:n=!0,verticalPoints:a}=e;if(!n||!a||!a.length)return null;var i=Sf(e,zie),o=a.map((s,c)=>{var u=Jt(Jt({},i),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(c),index:c});return m.createElement(YA,{option:n,lineItemProps:u,key:"line-".concat(c)})});return m.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function Gie(e){var{horizontalFill:t,fillOpacity:r,x:n,y:a,width:i,height:o,horizontalPoints:s,horizontal:c=!0}=e;if(!c||!t||!t.length||s==null)return null;var u=s.map(f=>Math.round(f+a-a)).sort((f,p)=>f-p);a!==u[0]&&u.unshift(0);var d=u.map((f,p)=>{var h=!u[p+1],g=h?a+o-f:u[p+1]-f;if(g<=0)return null;var x=p%t.length;return m.createElement("rect",{key:"react-".concat(p),y:f,x:n,height:g,width:i,stroke:"none",fill:t[x],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Yie(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:a,y:i,width:o,height:s,verticalPoints:c}=e;if(!t||!r||!r.length)return null;var u=c.map(f=>Math.round(f+a-a)).sort((f,p)=>f-p);a!==u[0]&&u.unshift(0);var d=u.map((f,p)=>{var h=!u[p+1],g=h?a+o-f:u[p+1]-f;if(g<=0)return null;var x=p%r.length;return m.createElement("rect",{key:"react-".concat(p),x:f,y:i,width:g,height:s,stroke:"none",fill:r[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var qie=(e,t)=>{var{xAxis:r,width:n,height:a,offset:i}=e;return L9(Jb(Jt(Jt(Jt({},fa),r),{},{ticks:D9(r),viewBox:{x:0,y:0,width:n,height:a}})),i.left,i.left+i.width,t)},Xie=(e,t)=>{var{yAxis:r,width:n,height:a,offset:i}=e;return L9(Jb(Jt(Jt(Jt({},fa),r),{},{ticks:D9(r),viewBox:{x:0,y:0,width:n,height:a}})),i.top,i.top+i.height,t)},Zie={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Ze.grid};function Vd(e){var t=P1(),r=C1(),n=Y9(),a=Jt(Jt({},ct(e,Zie)),{},{x:te(e.x)?e.x:n.left,y:te(e.y)?e.y:n.top,width:te(e.width)?e.width:n.width,height:te(e.height)?e.height:n.height}),{xAxisId:i,yAxisId:o,x:s,y:c,width:u,height:d,syncWithTicks:f,horizontalValues:p,verticalValues:h}=a,g=Lt(),x=ie(M=>_k(M,"xAxis",i,g)),v=ie(M=>_k(M,"yAxis",o,g));if(!Bn(u)||!Bn(d)||!te(s)||!te(c))return null;var y=a.verticalCoordinatesGenerator||qie,b=a.horizontalCoordinatesGenerator||Xie,{horizontalPoints:w,verticalPoints:j}=a;if((!w||!w.length)&&typeof b=="function"){var N=p&&p.length,S=b({yAxis:v?Jt(Jt({},v),{},{ticks:N?p:v.ticks}):void 0,width:t??u,height:r??d,offset:n},N?!0:f);ef(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof S,"]")),Array.isArray(S)&&(w=S)}if((!j||!j.length)&&typeof y=="function"){var P=h&&h.length,C=y({xAxis:x?Jt(Jt({},x),{},{ticks:P?h:x.ticks}):void 0,width:t??u,height:r??d,offset:n},P?!0:f);ef(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(j=C)}return m.createElement(gr,{zIndex:a.zIndex},m.createElement("g",{className:"recharts-cartesian-grid"},m.createElement(Hie,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),m.createElement(Gie,to({},a,{horizontalPoints:w})),m.createElement(Yie,to({},a,{verticalPoints:j})),m.createElement(Wie,to({},a,{offset:n,horizontalPoints:w,xAxis:x,yAxis:v})),m.createElement(Kie,to({},a,{offset:n,verticalPoints:j,xAxis:x,yAxis:v}))))}Vd.displayName="CartesianGrid";var Qie={},Jie=ar({name:"errorBars",initialState:Qie,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:a}=t.payload;e[r]&&(e[r]=e[r].map(i=>i.dataKey===n.dataKey&&i.direction===n.direction?a:i))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(a=>a.dataKey!==n.dataKey||a.direction!==n.direction))}}}),eoe=Jie.reducer,toe=["children"];function roe(e,t){if(e==null)return{};var r,n,a=noe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n({x:0,y:0,value:0}),errorBarOffset:0},ioe=m.createContext(aoe);function qA(e){var{children:t}=e,r=roe(e,toe);return m.createElement(ioe.Provider,{value:r},t)}function ym(e,t){var r,n,a=ie(u=>Ia(u,e)),i=ie(u=>_a(u,t)),o=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:Pt.allowDataOverflow,s=(n=i==null?void 0:i.allowDataOverflow)!==null&&n!==void 0?n:Ct.allowDataOverflow,c=o||s;return{needClip:c,needClipX:o,needClipY:s}}function t2(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,a=gm(),{needClipX:i,needClipY:o,needClip:s}=ym(t,r);if(!s||!a)return null;var{x:c,y:u,width:d,height:f}=a;return m.createElement("clipPath",{id:"clipPath-".concat(n)},m.createElement("rect",{x:i?c:c-d/2,y:o?u:u-f/2,width:i?d:d*2,height:o?f:f*2}))}var XA=(e,t,r,n)=>Un(e,"xAxis",t,n),ZA=(e,t,r,n)=>Vn(e,"xAxis",t,n),QA=(e,t,r,n)=>Un(e,"yAxis",r,n),JA=(e,t,r,n)=>Vn(e,"yAxis",r,n),ooe=$([ge,XA,QA,ZA,JA],(e,t,r,n,a)=>Wn(e,"xAxis")?wi(t,n,!1):wi(r,a,!1)),soe=(e,t,r,n,a)=>a;function loe(e){return e.type==="line"}var coe=$([gu,soe],(e,t)=>e.filter(loe).find(r=>r.id===t)),uoe=$([ge,XA,QA,ZA,JA,coe,ooe,Z1],(e,t,r,n,a,i,o,s)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=s;if(!(i==null||t==null||r==null||n==null||a==null||n.length===0||a.length===0||o==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:f,data:p}=i,h;if(p!=null&&p.length>0?h=p:h=c==null?void 0:c.slice(u,d+1),h!=null)return Moe({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataKey:f,bandSize:o,displayedData:h})}});function eO(e){var t=Co(e),r=3,n=2;if(t!=null){var{r:a,strokeWidth:i}=t,o=Number(a),s=Number(i);return(Number.isNaN(o)||o<0)&&(o=r),(Number.isNaN(s)||s<0)&&(s=n),{r:o,strokeWidth:s}}return{r,strokeWidth:n}}var doe=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function foe(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Nu(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(doe.has(n)){if(e[n]==null&&t[n]==null)continue;if(!pF(e[n],t[n]))return!1}else if(!foe(e[n],t[n]))return!1;return!0}var poe=["id"],moe=["type","layout","connectNulls","needClip","shape"],hoe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:r,stroke:n,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:n,value:Ii(r,t),payload:e}]},woe=m.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:a,fill:i,name:o,hide:s,unit:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:a,fill:i,dataKey:t,nameKey:void 0,name:Ii(o,t),hide:s,type:u,color:n,unit:c,graphicalItemId:d}};return m.createElement(pm,{tooltipEntrySettings:f})}),tO=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function koe(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],a=0;a{var n=r.reduce((f,p)=>f+p);if(!n)return tO(t,e);for(var a=Math.floor(e/n),i=e%n,o=t-e,s=[],c=0,u=0;ci){s=[...r.slice(0,c),i-u];break}var d=s.length%2===0?[0,o]:[o];return[...koe(r,a),...s,...d].map(f=>"".concat(f,"px")).join(", ")};function Noe(e){var{clipPathId:t,points:r,props:n}=e,{dot:a,dataKey:i,needClip:o}=n,s=r2(n,poe),c=pr(s);return m.createElement(UA,{points:r,dot:a,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:c,needClip:o,clipPathId:t})}function Soe(e){var{showLabels:t,children:r,points:n}=e,a=m.useMemo(()=>n==null?void 0:n.map(i=>{var o,s,c={x:(o=i.x)!==null&&o!==void 0?o:0,y:(s=i.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return En(En({},c),{},{value:i.value,payload:i.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[n]);return m.createElement($b,{value:t?a:void 0},r)}function D6(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:a,props:i}=e,{type:o,layout:s,connectNulls:c,needClip:u,shape:d}=i,f=r2(i,moe),p=En(En({},nr(f)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:s,connectNulls:c,strokeDasharray:a??i.strokeDasharray});return m.createElement(m.Fragment,null,(n==null?void 0:n.length)>1&&m.createElement(Kb,Hc({shapeType:"curve",option:d},p,{pathRef:r})),m.createElement(Noe,{points:n,clipPathId:t,props:i}))}function Poe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Coe(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:a,longestAnimatedLengthRef:i}=e,{points:o,strokeDasharray:s,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:f,animateNewValues:p,width:h,height:g,onAnimationEnd:x,onAnimationStart:v}=r,y=a.current,b=Qs(o,"recharts-line-"),w=m.useRef(b),[j,N]=m.useState(!1),S=!j,P=m.useCallback(()=>{typeof x=="function"&&x(),N(!1)},[x]),C=m.useCallback(()=>{typeof v=="function"&&v(),N(!0)},[v]),M=Poe(n.current),T=m.useRef(0);w.current!==b&&(T.current=i.current,w.current=b);var A=T.current;return m.createElement(Soe,{points:o,showLabels:S},r.children,m.createElement(Zs,{animationId:b,begin:u,duration:d,isActive:c,easing:f,onAnimationEnd:P,onAnimationStart:C,key:b},E=>{var _=je(A,M+A,E),L=Math.min(_,M),I;if(c)if(s){var B="".concat(s).split(/[,\s]+/gim).map(R=>parseFloat(R));I=joe(L,M,B)}else I=tO(M,L);else I=s==null?void 0:String(s);if(E>0&&M>0&&(a.current=o,i.current=Math.max(i.current,L)),y){var V=y.length/o.length,O=E===1?o:o.map((R,U)=>{var q=Math.floor(U*V);if(y[q]){var ee=y[q];return En(En({},R),{},{x:je(ee.x,R.x,E),y:je(ee.y,R.y,E)})}return p?En(En({},R),{},{x:je(h*2,R.x,E),y:je(g/2,R.y,E)}):En(En({},R),{},{x:R.x,y:R.y})});return a.current=O,m.createElement(D6,{props:r,points:O,clipPathId:t,pathRef:n,strokeDasharray:I})}return m.createElement(D6,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:I})}),m.createElement(em,{label:r.label}))}function Eoe(e){var{clipPathId:t,props:r}=e,n=m.useRef(null),a=m.useRef(0),i=m.useRef(null);return m.createElement(Coe,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:a,pathRef:i})}var Aoe=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:Se(e.payload,t)}};class Ooe extends m.Component{render(){var{hide:t,dot:r,points:n,className:a,xAxisId:i,yAxisId:o,top:s,left:c,width:u,height:d,id:f,needClip:p,zIndex:h}=this.props;if(t)return null;var g=ve("recharts-line",a),x=f,{r:v,strokeWidth:y}=eO(r),b=Wb(r),w=v*2+y,j=p?"url(#clipPath-".concat(b?"":"dots-").concat(x,")"):void 0;return m.createElement(gr,{zIndex:h},m.createElement(lt,{className:g},p&&m.createElement("defs",null,m.createElement(t2,{clipPathId:x,xAxisId:i,yAxisId:o}),!b&&m.createElement("clipPath",{id:"clipPath-dots-".concat(x)},m.createElement("rect",{x:c-w/2,y:s-w/2,width:u+w,height:d+w}))),m.createElement(qA,{xAxisId:i,yAxisId:o,data:n,dataPointFormatter:Aoe,errorBarOffset:0},m.createElement(Eoe,{props:this.props,clipPathId:x}))),m.createElement(Qy,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:j}))}}var rO={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Ze.line,type:"linear"};function Toe(e){var t=ct(e,rO),{activeDot:r,animateNewValues:n,animationBegin:a,animationDuration:i,animationEasing:o,connectNulls:s,dot:c,hide:u,isAnimationActive:d,label:f,legendType:p,xAxisId:h,yAxisId:g,id:x}=t,v=r2(t,hoe),{needClip:y}=ym(h,g),b=gm(),w=_i(),j=Lt(),N=ie(T=>uoe(T,h,g,j,x));if(w!=="horizontal"&&w!=="vertical"||N==null||b==null)return null;var{height:S,width:P,x:C,y:M}=b;return m.createElement(Ooe,Hc({},v,{id:x,connectNulls:s,dot:c,activeDot:r,animateNewValues:n,animationBegin:a,animationDuration:i,animationEasing:o,isAnimationActive:d,hide:u,label:f,legendType:p,xAxisId:h,yAxisId:g,points:N,layout:w,height:S,width:P,left:C,top:M,needClip:y}))}function Moe(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:a,yAxisTicks:i,dataKey:o,bandSize:s,displayedData:c}=e;return c.map((u,d)=>{var f=Se(u,o);if(t==="horizontal"){var p=J0({axis:r,ticks:a,bandSize:s,entry:u,index:d}),h=Ve(f)?null:n.scale(f);return{x:p,y:h,value:f,payload:u}}var g=Ve(f)?null:r.scale(f),x=J0({axis:n,ticks:i,bandSize:s,entry:u,index:d});return g==null||x==null?null:{x:g,y:x,value:f,payload:u}}).filter(Boolean)}function Ioe(e){var t=ct(e,rO),r=Lt();return m.createElement(mm,{id:t.id,type:"line"},n=>m.createElement(m.Fragment,null,m.createElement(Xb,{legendPayload:boe(t)}),m.createElement(woe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),m.createElement(Zb,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),m.createElement(Toe,Hc({},t,{id:n}))))}var nO=m.memo(Ioe,Nu);nO.displayName="Line";function Kn(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:HA}function Gn(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:HA}var aO=(e,t,r)=>Un(e,"xAxis",Kn(e,t),r),iO=(e,t,r)=>Vn(e,"xAxis",Kn(e,t),r),oO=(e,t,r)=>Un(e,"yAxis",Gn(e,t),r),sO=(e,t,r)=>Vn(e,"yAxis",Gn(e,t),r),_oe=$([ge,aO,oO,iO,sO],(e,t,r,n,a)=>Wn(e,"xAxis")?wi(t,n,!1):wi(r,a,!1)),Loe=(e,t)=>t,lO=$([gu,Loe],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),cO=e=>{var t=ge(e),r=Wn(t,"xAxis");return r?"yAxis":"xAxis"},Doe=(e,t)=>{var r=cO(e);return r==="yAxis"?Gn(e,t):Kn(e,t)},Roe=(e,t,r)=>vf(e,cO(e),Doe(e,t),r),$oe=$([lO,Roe],(e,t)=>{var r;if(!(e==null||t==null)){var{stackId:n}=e,a=Up(e);if(!(n==null||a==null)){var i=(r=t[n])===null||r===void 0?void 0:r.stackedData,o=i==null?void 0:i.find(s=>s.key===a);if(o!=null)return o.map(s=>[s[0],s[1]])}}}),zoe=$([ge,aO,oO,iO,sO,$oe,GC,_oe,lO,IQ],(e,t,r,n,a,i,o,s,c,u)=>{var{chartData:d,dataStartIndex:f,dataEndIndex:p}=o;if(!(c==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||s==null)){var{data:h}=c,g;if(h&&h.length>0?g=h:g=d==null?void 0:d.slice(f,p+1),g!=null)return ase({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:f,areaSettings:c,stackedData:i,displayedData:g,chartBaseValue:u,bandSize:s})}}),Boe=["id"],Foe=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function mo(){return mo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:r,stroke:n,fill:a,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:Pf(n,a),value:Ii(r,t),payload:e}]},Goe=m.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:a,fill:i,name:o,hide:s,unit:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:a,fill:i,dataKey:t,nameKey:void 0,name:Ii(o,t),hide:s,type:u,color:Pf(n,i),unit:c,graphicalItemId:d}};return m.createElement(pm,{tooltipEntrySettings:f})});function Yoe(e){var{clipPathId:t,points:r,props:n}=e,{needClip:a,dot:i,dataKey:o}=n,s=pr(n);return m.createElement(UA,{points:r,dot:i,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:o,baseProps:s,needClip:a,clipPathId:t})}function qoe(e){var{showLabels:t,children:r,points:n}=e,a=n.map(i=>{var o,s,c={x:(o=i.x)!==null&&o!==void 0?o:0,y:(s=i.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ds(ds({},c),{},{value:i.value,payload:i.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return m.createElement($b,{value:t?a:void 0},r)}function $6(e){var{points:t,baseLine:r,needClip:n,clipPathId:a,props:i}=e,{layout:o,type:s,stroke:c,connectNulls:u,isRange:d}=i,{id:f}=i,p=uO(i,Boe),h=pr(p),g=nr(p);return m.createElement(m.Fragment,null,(t==null?void 0:t.length)>1&&m.createElement(lt,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},m.createElement(ws,mo({},g,{id:f,points:t,connectNulls:u,type:s,baseLine:r,layout:o,stroke:"none",className:"recharts-area-area"})),c!=="none"&&m.createElement(ws,mo({},h,{className:"recharts-area-curve",layout:o,type:s,connectNulls:u,fill:"none",points:t})),c!=="none"&&d&&m.createElement(ws,mo({},h,{className:"recharts-area-curve",layout:o,type:s,connectNulls:u,fill:"none",points:r}))),m.createElement(Yoe,{points:t,props:p,clipPathId:a}))}function Xoe(e){var t,r,{alpha:n,baseLine:a,points:i,strokeWidth:o}=e,s=(t=i[0])===null||t===void 0?void 0:t.y,c=(r=i[i.length-1])===null||r===void 0?void 0:r.y;if(!Ie(s)||!Ie(c))return null;var u=n*Math.abs(s-c),d=Math.max(...i.map(f=>f.x||0));return te(a)?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(...a.map(f=>f.x||0),d)),te(d)?m.createElement("rect",{x:0,y:sf.y||0));return te(a)?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(...a.map(f=>f.y||0),d)),te(d)?m.createElement("rect",{x:s({points:o,baseLine:s}),[o,s]),x=Qs(g,"recharts-area-"),v=dY(),[y,b]=m.useState(!1),w=!y,j=m.useCallback(()=>{typeof h=="function"&&h(),b(!1)},[h]),N=m.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]);if(v==null)return null;var S=a.current,P=i.current;return m.createElement(qoe,{showLabels:w,points:o},n.children,m.createElement(Zs,{animationId:x,begin:u,duration:d,isActive:c,easing:f,onAnimationEnd:j,onAnimationStart:N,key:x},C=>{if(S){var M=S.length/o.length,T=C===1?o:o.map((E,_)=>{var L=Math.floor(_*M);if(S[L]){var I=S[L];return ds(ds({},E),{},{x:je(I.x,E.x,C),y:je(I.y,E.y,C)})}return E}),A;return te(s)?A=je(P,s,C):Ve(s)||on(s)?A=je(P,0,C):A=s.map((E,_)=>{var L=Math.floor(_*M);if(Array.isArray(P)&&P[L]){var I=P[L];return ds(ds({},E),{},{x:je(I.x,E.x,C),y:je(I.y,E.y,C)})}return E}),C>0&&(a.current=T,i.current=A),m.createElement($6,{points:T,baseLine:A,needClip:t,clipPathId:r,props:n})}return C>0&&(a.current=o,i.current=s),m.createElement(lt,null,c&&m.createElement("defs",null,m.createElement("clipPath",{id:"animationClipPath-".concat(r)},m.createElement(Qoe,{alpha:C,points:o,baseLine:s,layout:v,strokeWidth:n.strokeWidth}))),m.createElement(lt,{clipPath:"url(#animationClipPath-".concat(r,")")},m.createElement($6,{points:o,baseLine:s,needClip:t,clipPathId:r,props:n})))}),m.createElement(em,{label:n.label}))}function ese(e){var{needClip:t,clipPathId:r,props:n}=e,a=m.useRef(null),i=m.useRef();return m.createElement(Joe,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:i})}class tse extends m.PureComponent{render(){var{hide:t,dot:r,points:n,className:a,top:i,left:o,needClip:s,xAxisId:c,yAxisId:u,width:d,height:f,id:p,baseLine:h,zIndex:g}=this.props;if(t)return null;var x=ve("recharts-area",a),v=p,{r:y,strokeWidth:b}=eO(r),w=Wb(r),j=y*2+b,N=s?"url(#clipPath-".concat(w?"":"dots-").concat(v,")"):void 0;return m.createElement(gr,{zIndex:g},m.createElement(lt,{className:x},s&&m.createElement("defs",null,m.createElement(t2,{clipPathId:v,xAxisId:c,yAxisId:u}),!w&&m.createElement("clipPath",{id:"clipPath-dots-".concat(v)},m.createElement("rect",{x:o-j/2,y:i-j/2,width:d+j,height:f+j}))),m.createElement(ese,{needClip:s,clipPathId:v,props:this.props})),m.createElement(Qy,{points:n,mainColor:Pf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:N}),this.props.isRange&&Array.isArray(h)&&m.createElement(Qy,{points:h,mainColor:Pf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:N}))}}var dO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:Ze.area};function rse(e){var t,r=ct(e,dO),{activeDot:n,animationBegin:a,animationDuration:i,animationEasing:o,connectNulls:s,dot:c,fill:u,fillOpacity:d,hide:f,isAnimationActive:p,legendType:h,stroke:g,xAxisId:x,yAxisId:v}=r,y=uO(r,Foe),b=_i(),w=cA(),{needClip:j}=ym(x,v),N=Lt(),{points:S,isRange:P,baseLine:C}=(t=ie(L=>zoe(L,e.id,N)))!==null&&t!==void 0?t:{},M=gm();if(b!=="horizontal"&&b!=="vertical"||M==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:T,width:A,x:E,y:_}=M;return!S||!S.length?null:m.createElement(tse,mo({},y,{activeDot:n,animationBegin:a,animationDuration:i,animationEasing:o,baseLine:C,connectNulls:s,dot:c,fill:u,fillOpacity:d,height:T,hide:f,layout:b,isAnimationActive:p==="auto"?!lu.isSsr:p,isRange:P,legendType:h,needClip:j,points:S,stroke:g,width:A,left:E,top:_,xAxisId:x,yAxisId:v}))}var nse=(e,t,r,n,a)=>{var i=r??t;if(te(i))return i;var o=e==="horizontal"?a:n,s=o.scale.domain();if(o.type==="number"){var c=Math.max(s[0],s[1]),u=Math.min(s[0],s[1]);return i==="dataMin"?u:i==="dataMax"||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return i==="dataMin"?s[0]:i==="dataMax"?s[1]:s[0]};function ase(e){var{areaSettings:{connectNulls:t,baseValue:r,dataKey:n},stackedData:a,layout:i,chartBaseValue:o,xAxis:s,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:f,yAxisTicks:p,bandSize:h}=e,g=a&&a.length,x=nse(i,o,r,s,c),v=i==="horizontal",y=!1,b=u.map((j,N)=>{var S,P,C;if(g)C=a[d+N];else{var M=Se(j,n);Array.isArray(M)?(C=M,y=!0):C=[x,M]}var T=(S=(P=C)===null||P===void 0?void 0:P[1])!==null&&S!==void 0?S:null,A=T==null||g&&!t&&Se(j,n)==null;return v?{x:J0({axis:s,ticks:f,bandSize:h,entry:j,index:N}),y:A?null:c.scale(T),value:C,payload:j}:{x:A?null:s.scale(T),y:J0({axis:c,ticks:p,bandSize:h,entry:j,index:N}),value:C,payload:j}}),w;return g||y?w=b.map(j=>{var N=Array.isArray(j.value)?j.value[0]:null;return v?{x:j.x,y:N!=null&&j.y!=null?c.scale(N):null,payload:j.payload}:{x:N!=null?s.scale(N):null,y:j.y,payload:j.payload}}):w=v?c.scale(x):s.scale(x),{points:b,baseLine:w,isRange:y}}function ise(e){var t=ct(e,dO),r=Lt();return m.createElement(mm,{id:t.id,type:"area"},n=>m.createElement(m.Fragment,null,m.createElement(Xb,{legendPayload:Koe(t)}),m.createElement(Goe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),m.createElement(Zb,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:R9(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),m.createElement(rse,mo({},t,{id:n}))))}var fO=m.memo(ise,Nu);fO.displayName="Area";var ose="Invariant failed";function sse(e,t){throw new Error(ose)}function Jy(){return Jy=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0;return(n,a)=>{if(te(t))return t;var i=te(n)||Ve(n);return i?t(n,a):(i||sse(),r)}},cse=(e,t,r)=>r,use=(e,t)=>t,Su=$([gu,use],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),dse=$([Su],e=>e==null?void 0:e.maxBarSize),fse=(e,t,r,n)=>n,pse=$([ge,gu,Kn,Gn,cse],(e,t,r,n,a)=>t.filter(i=>e==="horizontal"?i.xAxisId===r:i.yAxisId===n).filter(i=>i.isPanorama===a).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),mse=(e,t,r)=>{var n=ge(e),a=Kn(e,t),i=Gn(e,t);if(!(a==null||i==null))return n==="horizontal"?vf(e,"yAxis",i,r):vf(e,"xAxis",a,r)},hse=(e,t)=>{var r=ge(e),n=Kn(e,t),a=Gn(e,t);if(!(n==null||a==null))return r==="horizontal"?Ik(e,"xAxis",n):Ik(e,"yAxis",a)},gse=$([pse,MQ,hse],Kae),yse=(e,t,r)=>{var n,a,i=Su(e,t);if(i!=null){var o=Kn(e,t),s=Gn(e,t);if(!(o==null||s==null)){var c=ge(e),u=lE(e),{maxBarSize:d}=i,f=Ve(d)?u:d,p,h;return c==="horizontal"?(p=Un(e,"xAxis",o,r),h=Vn(e,"xAxis",o,r)):(p=Un(e,"yAxis",s,r),h=Vn(e,"yAxis",s,r)),(n=(a=wi(p,h,!0))!==null&&a!==void 0?a:f)!==null&&n!==void 0?n:0}}},pO=(e,t,r)=>{var n=ge(e),a=Kn(e,t),i=Gn(e,t);if(!(a==null||i==null)){var o,s;return n==="horizontal"?(o=Un(e,"xAxis",a,r),s=Vn(e,"xAxis",a,r)):(o=Un(e,"yAxis",i,r),s=Vn(e,"yAxis",i,r)),wi(o,s)}},vse=$([gse,lE,TQ,cE,yse,pO,dse],Zae),xse=(e,t,r)=>{var n=Kn(e,t);if(n!=null)return Un(e,"xAxis",n,r)},bse=(e,t,r)=>{var n=Gn(e,t);if(n!=null)return Un(e,"yAxis",n,r)},wse=(e,t,r)=>{var n=Kn(e,t);if(n!=null)return Vn(e,"xAxis",n,r)},kse=(e,t,r)=>{var n=Gn(e,t);if(n!=null)return Vn(e,"yAxis",n,r)},jse=$([vse,Su],(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}}),Nse=$([mse,Su],Qae),Sse=$([kt,N1,xse,bse,wse,kse,jse,ge,GC,pO,Nse,Su,fse],(e,t,r,n,a,i,o,s,c,u,d,f,p)=>{var{chartData:h,dataStartIndex:g,dataEndIndex:x}=c;if(!(f==null||o==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||n==null||a==null||i==null||u==null)){var{data:v}=f,y;if(v!=null&&v.length>0?y=v:y=h==null?void 0:h.slice(g,x+1),y!=null)return ele({layout:s,barSettings:f,pos:o,parentViewBox:t,bandSize:u,xAxis:r,yAxis:n,xAxisTicks:a,yAxisTicks:i,stackedData:d,displayedData:y,offset:e,cells:p,dataStartIndex:g})}}),Pse=["index"];function ev(){return ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=m.useContext(mO);if(t!=null)return t.stackId;if(e!=null)return R9(e)},Ose=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),Tse=e=>{var t=m.useContext(mO);if(t!=null){var{stackId:r}=t;return"url(#".concat(Ose(r,e),")")}},Mse=e=>{var{index:t}=e,r=Cse(e,Pse),n=Tse(t);return m.createElement(lt,ev({className:"recharts-bar-stack-layer",clipPath:n},r))},Ise=["onMouseEnter","onMouseLeave","onClick"],_se=["value","background","tooltipPosition"],Lse=["id"],Dse=["onMouseEnter","onClick","onMouseLeave"];function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:r,fill:n,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:n,value:Ii(r,t),payload:e}]},Vse=m.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:a,name:i,hide:o,unit:s,tooltipType:c,id:u}=e,d={dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:a,dataKey:t,nameKey:void 0,name:Ii(i,t),hide:o,type:c,color:a,unit:s,graphicalItemId:u}};return m.createElement(pm,{tooltipEntrySettings:d})});function Use(e){var t=ie(ji),{data:r,dataKey:n,background:a,allOtherBarProps:i}=e,{onMouseEnter:o,onMouseLeave:s,onClick:c}=i,u=Ef(i,Ise),d=Gb(o,n,i.id),f=Yb(s),p=qb(c,n,i.id);if(!a||r==null)return null;var h=Co(a);return m.createElement(gr,{zIndex:Jae(a,Ze.barBackground)},r.map((g,x)=>{var{value:v,background:y,tooltipPosition:b}=g,w=Ef(g,_se);if(!y)return null;var j=d(g,x),N=f(g,x),S=p(g,x),P=lr(lr(lr(lr(lr({option:a,isActive:String(x)===t},w),{},{fill:"#eee"},y),h),ou(u,g,x)),{},{onMouseEnter:j,onMouseLeave:N,onClick:S,dataKey:n,index:x,className:"recharts-bar-background-rectangle"});return m.createElement(Cf,Sa({key:"background-bar-".concat(x)},P))}))}function Hse(e){var{showLabels:t,children:r,rects:n}=e,a=n==null?void 0:n.map(i=>{var o={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return lr(lr({},o),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:o,fill:i.fill})});return m.createElement($b,{value:t?a:void 0},r)}function Wse(e){var{shape:t,activeBar:r,baseProps:n,entry:a,index:i,dataKey:o}=e,s=ie(ji),c=ie(Mb),u=r&&String(i)===s&&(c==null||o===c),d=u?r:t;return u?m.createElement(gr,{zIndex:Ze.activeBar},m.createElement(Cf,Sa({},n,{name:String(n.name)},a,{isActive:u,option:d,index:i,dataKey:o}))):m.createElement(Cf,Sa({},n,{name:String(n.name)},a,{isActive:u,option:d,index:i,dataKey:o}))}function Kse(e){var{shape:t,baseProps:r,entry:n,index:a,dataKey:i}=e;return m.createElement(Cf,Sa({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:a,dataKey:i}))}function Gse(e){var t,{data:r,props:n}=e,a=(t=pr(n))!==null&&t!==void 0?t:{},{id:i}=a,o=Ef(a,Lse),{shape:s,dataKey:c,activeBar:u}=n,{onMouseEnter:d,onClick:f,onMouseLeave:p}=n,h=Ef(n,Dse),g=Gb(d,c,i),x=Yb(p),v=qb(f,c,i);return r?m.createElement(m.Fragment,null,r.map((y,b)=>m.createElement(Mse,Sa({index:b,key:"rectangle-".concat(y==null?void 0:y.x,"-").concat(y==null?void 0:y.y,"-").concat(y==null?void 0:y.value,"-").concat(b),className:"recharts-bar-rectangle"},ou(h,y,b),{onMouseEnter:g(y,b),onMouseLeave:x(y,b),onClick:v(y,b)}),u?m.createElement(Wse,{shape:s,activeBar:u,baseProps:o,entry:y,index:b,dataKey:c}):m.createElement(Kse,{shape:s,baseProps:o,entry:y,index:b,dataKey:c})))):null}function Yse(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:a,isAnimationActive:i,animationBegin:o,animationDuration:s,animationEasing:c,onAnimationEnd:u,onAnimationStart:d}=t,f=r.current,p=Qs(t,"recharts-bar-"),[h,g]=m.useState(!1),x=!h,v=m.useCallback(()=>{typeof u=="function"&&u(),g(!1)},[u]),y=m.useCallback(()=>{typeof d=="function"&&d(),g(!0)},[d]);return m.createElement(Hse,{showLabels:x,rects:n},m.createElement(Zs,{animationId:p,begin:o,duration:s,isActive:i,easing:c,onAnimationEnd:v,onAnimationStart:y,key:p},b=>{var w=b===1?n:n==null?void 0:n.map((j,N)=>{var S=f&&f[N];if(S)return lr(lr({},j),{},{x:je(S.x,j.x,b),y:je(S.y,j.y,b),width:je(S.width,j.width,b),height:je(S.height,j.height,b)});if(a==="horizontal"){var P=je(0,j.height,b),C=je(j.stackedBarStart,j.y,b);return lr(lr({},j),{},{y:C,height:P})}var M=je(0,j.width,b),T=je(j.stackedBarStart,j.x,b);return lr(lr({},j),{},{width:M,x:T})});return b>0&&(r.current=w??null),w==null?null:m.createElement(lt,null,m.createElement(Gse,{props:t,data:w}))}),m.createElement(em,{label:t.label}),t.children)}function qse(e){var t=m.useRef(null);return m.createElement(Yse,{previousRectanglesRef:t,props:e})}var hO=0,Xse=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Se(e,t)}};class Zse extends m.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:a,xAxisId:i,yAxisId:o,needClip:s,background:c,id:u}=this.props;if(t||r==null)return null;var d=ve("recharts-bar",a),f=u;return m.createElement(lt,{className:d,id:u},s&&m.createElement("defs",null,m.createElement(t2,{clipPathId:f,xAxisId:i,yAxisId:o})),m.createElement(lt,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},m.createElement(Use,{data:r,dataKey:n,background:c,allOtherBarProps:this.props}),m.createElement(qse,this.props)))}}var Qse={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:hO,xAxisId:0,yAxisId:0,zIndex:Ze.bar};function Jse(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:a,minPointSize:i,activeBar:o,animationBegin:s,animationDuration:c,animationEasing:u,isAnimationActive:d}=e,{needClip:f}=ym(t,r),p=_i(),h=Lt(),g=Hb(e.children,ju),x=ie(b=>Sse(b,e.id,h,g));if(p!=="vertical"&&p!=="horizontal")return null;var v,y=x==null?void 0:x[0];return y==null||y.height==null||y.width==null?v=0:v=p==="vertical"?y.height/2:y.width/2,m.createElement(qA,{xAxisId:t,yAxisId:r,data:x,dataPointFormatter:Xse,errorBarOffset:v},m.createElement(Zse,Sa({},e,{layout:p,needClip:f,data:x,xAxisId:t,yAxisId:r,hide:n,legendType:a,minPointSize:i,activeBar:o,animationBegin:s,animationDuration:c,animationEasing:u,isAnimationActive:d})))}function ele(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:a,bandSize:i,xAxis:o,yAxis:s,xAxisTicks:c,yAxisTicks:u,stackedData:d,displayedData:f,offset:p,cells:h,parentViewBox:g,dataStartIndex:x}=e,v=t==="horizontal"?s:o,y=d?v.scale.domain():null,b=IG({numericAxis:v}),w=v.scale(b);return f.map((j,N)=>{var S,P,C,M,T,A;if(d){var E=d[N+x];if(E==null)return null;S=EG(E,y)}else S=Se(j,r),Array.isArray(S)||(S=[b,S]);var _=lse(n,hO)(S[1],N);if(t==="horizontal"){var L,[I,B]=[s.scale(S[0]),s.scale(S[1])];P=Z3({axis:o,ticks:c,bandSize:i,offset:a.offset,entry:j,index:N}),C=(L=B??I)!==null&&L!==void 0?L:void 0,M=a.size;var V=I-B;if(T=on(V)?0:V,A={x:P,y:p.top,width:M,height:p.height},Math.abs(_)>0&&Math.abs(T)0&&Math.abs(M)m.createElement(m.Fragment,null,m.createElement(Xb,{legendPayload:Fse(t)}),m.createElement(Vse,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:a}),m.createElement(Zb,{type:"bar",id:a,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),m.createElement(gr,{zIndex:t.zIndex},m.createElement(Jse,Sa({},t,{id:a})))))}var gO=m.memo(tle,Nu);gO.displayName="Bar";var rle=["domain","range"],nle=["domain","range"];function B6(e,t){if(e==null)return{};var r,n,a=ale(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n{r.current===null?t(Tae(e)):r.current!==e&&t(Mae({prev:r.current,next:e})),r.current=e},[e,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(Iae(r.current)),r.current=null)},[t]),null}var cle=e=>{var{xAxisId:t,className:r}=e,n=ie(N1),a=Lt(),i="xAxis",o=ie(p=>FE(p,i,t,a)),s=ie(p=>RE(p,t)),c=ie(p=>OJ(p,t)),u=ie(p=>vE(p,t));if(s==null||c==null||u==null)return null;var d=V6(e,ile),f=V6(u,ole);return m.createElement(e2,tv({},d,f,{x:c.x,y:c.y,width:s.width,height:s.height,className:ve("recharts-".concat(i," ").concat(i),r),viewBox:n,ticks:o,axisType:i}))},ule={allowDataOverflow:Pt.allowDataOverflow,allowDecimals:Pt.allowDecimals,allowDuplicatedCategory:Pt.allowDuplicatedCategory,angle:Pt.angle,axisLine:fa.axisLine,height:Pt.height,hide:!1,includeHidden:Pt.includeHidden,interval:Pt.interval,minTickGap:Pt.minTickGap,mirror:Pt.mirror,orientation:Pt.orientation,padding:Pt.padding,reversed:Pt.reversed,scale:Pt.scale,tick:Pt.tick,tickCount:Pt.tickCount,tickLine:fa.tickLine,tickSize:fa.tickSize,type:Pt.type,xAxisId:0},dle=e=>{var t=ct(e,ule);return m.createElement(m.Fragment,null,m.createElement(lle,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),m.createElement(cle,t))},Ud=m.memo(dle,yO);Ud.displayName="XAxis";var fle=["dangerouslySetInnerHTML","ticks","scale"],ple=["id","scale"];function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current===null?t(_ae(e)):r.current!==e&&t(Lae({prev:r.current,next:e})),r.current=e},[e,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(Dae(r.current)),r.current=null)},[t]),null}var gle=e=>{var{yAxisId:t,className:r,width:n,label:a}=e,i=m.useRef(null),o=m.useRef(null),s=ie(N1),c=Lt(),u=De(),d="yAxis",f=ie(y=>$E(y,t)),p=ie(y=>MJ(y,t)),h=ie(y=>FE(y,d,t,c)),g=ie(y=>xE(y,t));if(m.useLayoutEffect(()=>{if(!(n!=="auto"||!f||Rb(a)||m.isValidElement(a)||g==null)){var y=i.current;if(y){var b=y.getCalculatedWidth();Math.round(f.width)!==Math.round(b)&&u(Rae({id:t,width:b}))}}},[h,f,u,a,t,n,g]),f==null||p==null||g==null)return null;var x=U6(e,fle),v=U6(g,ple);return m.createElement(e2,rv({},x,v,{ref:i,labelRef:o,x:p.x,y:p.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:f.width,height:f.height,className:ve("recharts-".concat(d," ").concat(d),r),viewBox:s,ticks:h,axisType:d}))},yle={allowDataOverflow:Ct.allowDataOverflow,allowDecimals:Ct.allowDecimals,allowDuplicatedCategory:Ct.allowDuplicatedCategory,angle:Ct.angle,axisLine:fa.axisLine,hide:!1,includeHidden:Ct.includeHidden,interval:Ct.interval,minTickGap:Ct.minTickGap,mirror:Ct.mirror,orientation:Ct.orientation,padding:Ct.padding,reversed:Ct.reversed,scale:Ct.scale,tick:Ct.tick,tickCount:Ct.tickCount,tickLine:fa.tickLine,tickSize:fa.tickSize,type:Ct.type,width:Ct.width,yAxisId:0},vle=e=>{var t=ct(e,yle);return m.createElement(m.Fragment,null,m.createElement(hle,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),m.createElement(gle,t))},Hd=m.memo(vle,yO);Hd.displayName="YAxis";var xle=(e,t)=>t,n2=$([xle,ge,gE,Nt,nA,La,Gee,kt],ete),a2=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},vO=an("mouseClick"),xO=nu();xO.startListening({actionCreator:vO,effect:(e,t)=>{var r=e.payload,n=n2(t.getState(),a2(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(KJ({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var nv=an("mouseMove"),bO=nu(),md=null;bO.startListening({actionCreator:nv,effect:(e,t)=>{var r=e.payload;md!==null&&cancelAnimationFrame(md);var n=a2(r);md=requestAnimationFrame(()=>{var a=t.getState(),i=Pb(a,a.tooltip.settings.shared);if(i==="axis"){var o=n2(a,n);(o==null?void 0:o.activeIndex)!=null?t.dispatch(qE({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(YE())}md=null})}});function ble(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var H6={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},wO=ar({name:"rootProps",initialState:H6,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:H6.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),wle=wO.reducer,{updateOptions:kle}=wO.actions,kO=ar({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:jle}=kO.actions,Nle=kO.reducer,jO=an("keyDown"),NO=an("focus"),i2=nu();i2.startListening({actionCreator:jO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:a}=r.tooltip,i=e.payload;if(!(i!=="ArrowRight"&&i!=="ArrowLeft"&&i!=="Enter")){var o=Cb(a,sl(r),vu(r),wu(r)),s=o==null?-1:Number(o);if(!(!Number.isFinite(s)||s<0)){var c=La(r);if(i==="Enter"){var u=bf(r,"axis","hover",String(a.index));t.dispatch(Ky({active:!a.active,activeIndex:a.index,activeCoordinate:u}));return}var d=DJ(r),f=d==="left-to-right"?1:-1,p=i==="ArrowRight"?1:-1,h=s+p*f;if(!(c==null||h>=c.length||h<0)){var g=bf(r,"axis","hover",String(h));t.dispatch(Ky({active:!0,activeIndex:h.toString(),activeCoordinate:g}))}}}}}});i2.startListening({actionCreator:NO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:a}=r.tooltip;if(!a.active&&a.index==null){var i="0",o=bf(r,"axis","hover",String(i));t.dispatch(Ky({active:!0,activeIndex:i,activeCoordinate:o}))}}}});var Gr=an("externalEvent"),SO=nu(),Rh=new Map;SO.startListening({actionCreator:Gr,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var a=n.type,i=Rh.get(a);i!==void 0&&cancelAnimationFrame(i);var o=requestAnimationFrame(()=>{try{var s=t.getState(),c={activeCoordinate:Mee(s),activeDataKey:Mb(s),activeIndex:ji(s),activeLabel:oA(s),activeTooltipIndex:ji(s),isTooltipActive:Iee(s)};r(c,n)}finally{Rh.delete(a)}});Rh.set(a,o)}}});var Sle=$([il],e=>e.tooltipItemPayloads),Ple=$([Sle,bu,(e,t)=>t,(e,t,r)=>r],(e,t,r,n)=>{var a=e.find(s=>s.settings.graphicalItemId===n);if(a!=null){var{positions:i}=a;if(i!=null){var o=t(i,r);return o}}}),PO=an("touchMove"),CO=nu();CO.startListening({actionCreator:PO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),a=Pb(n,n.tooltip.settings.shared);if(a==="axis"){var i=r.touches[0];if(i==null)return;var o=n2(n,a2({clientX:i.clientX,clientY:i.clientY,currentTarget:r.currentTarget}));(o==null?void 0:o.activeIndex)!=null&&t.dispatch(qE({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(a==="item"){var s,c=r.touches[0];if(document.elementFromPoint==null||c==null)return;var u=document.elementFromPoint(c.clientX,c.clientY);if(!u||!u.getAttribute)return;var d=u.getAttribute(z9),f=(s=u.getAttribute(B9))!==null&&s!==void 0?s:void 0,p=ol(n).find(x=>x.id===f);if(d==null||p==null||f==null)return;var{dataKey:h}=p,g=Ple(n,d,f);t.dispatch(GE({activeDataKey:h,activeIndex:d,activeCoordinate:g,activeGraphicalItemId:f}))}}}});var Cle=AP({brush:tie,cartesianAxis:$ae,chartData:Ote,errorBars:eoe,graphicalItems:Wne,layout:kG,legend:hY,options:Ste,polarAxis:ane,polarOptions:Nle,referenceElements:cie,rootProps:wle,tooltip:GJ,zIndex:mte}),Ele=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return HP({reducer:Cle,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([xO.middleware,bO.middleware,i2.middleware,SO.middleware,CO.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(UP({type:"raf"}))},devTools:{serialize:{replacer:ble},name:"recharts-".concat(r)}})};function EO(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,a=Lt(),i=m.useRef(null);if(a)return r;i.current==null&&(i.current=Ele(t,n));var o=w1;return m.createElement(PP,{context:o,store:i.current},r)}function Ale(e){var{layout:t,margin:r}=e,n=De(),a=Lt();return m.useEffect(()=>{a||(n(xG(t)),n(vG(r)))},[n,a,t,r]),null}var AO=m.memo(Ale,Nu);function OO(e){var t=De();return m.useEffect(()=>{t(kle(e))},[t,e]),null}function W6(e){var{zIndex:t,isPanorama:r}=e,n=m.useRef(null),a=De();return m.useLayoutEffect(()=>(n.current&&a(fte({zIndex:t,element:n.current,isPanorama:r})),()=>{a(pte({zIndex:t,isPanorama:r}))}),[a,t,r]),m.createElement("g",{tabIndex:-1,ref:n})}function K6(e){var{children:t,isPanorama:r}=e,n=ie(rte);if(!n||n.length===0)return t;var a=n.filter(o=>o<0),i=n.filter(o=>o>0);return m.createElement(m.Fragment,null,a.map(o=>m.createElement(W6,{key:o,zIndex:o,isPanorama:r})),t,i.map(o=>m.createElement(W6,{key:o,zIndex:o,isPanorama:r})))}var Ole=["children"];function Tle(e,t){if(e==null)return{};var r,n,a=Mle(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n{var r=P1(),n=C1(),a=J9();if(!Bn(r)||!Bn(n))return null;var{children:i,otherAttributes:o,title:s,desc:c}=e,u,d;return o!=null&&(typeof o.tabIndex=="number"?u=o.tabIndex:u=a?0:void 0,typeof o.role=="string"?d=o.role:d=a?"application":void 0),m.createElement(i1,Af({},o,{title:s,desc:c,role:d,tabIndex:u,width:r,height:n,style:Ile,ref:t}),i)}),Lle=e=>{var{children:t}=e,r=ie(Tp);if(!r)return null;var{width:n,height:a,y:i,x:o}=r;return m.createElement(i1,{width:n,height:a,x:o,y:i},t)},G6=m.forwardRef((e,t)=>{var{children:r}=e,n=Tle(e,Ole),a=Lt();return a?m.createElement(Lle,null,m.createElement(K6,{isPanorama:!0},r)):m.createElement(_le,Af({ref:t},n),m.createElement(K6,{isPanorama:!1},r))});function Dle(){var e=De(),[t,r]=m.useState(null),n=ie(zG);return m.useEffect(()=>{if(t!=null){var a=t.getBoundingClientRect(),i=a.width/t.offsetWidth;Ie(i)&&i!==n&&e(wG(i))}},[t,e,n]),r}function Y6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rle(e){for(var t=1;t(zte(),null);function Of(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Vle=m.forwardRef((e,t)=>{var r,n,a=m.useRef(null),[i,o]=m.useState({containerWidth:Of((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Of((n=e.style)===null||n===void 0?void 0:n.height)}),s=m.useCallback((u,d)=>{o(f=>{var p=Math.round(u),h=Math.round(d);return f.containerWidth===p&&f.containerHeight===h?f:{containerWidth:p,containerHeight:h}})},[]),c=m.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null&&typeof ResizeObserver<"u"){var{width:d,height:f}=u.getBoundingClientRect();s(d,f);var p=g=>{var{width:x,height:v}=g[0].contentRect;s(x,v)},h=new ResizeObserver(p);h.observe(u),a.current=h}},[t,s]);return m.useEffect(()=>()=>{var u=a.current;u!=null&&u.disconnect()},[s]),m.createElement(m.Fragment,null,m.createElement(Ip,{width:i.containerWidth,height:i.containerHeight}),m.createElement("div",Mo({ref:c},e)))}),Ule=m.forwardRef((e,t)=>{var{width:r,height:n}=e,[a,i]=m.useState({containerWidth:Of(r),containerHeight:Of(n)}),o=m.useCallback((c,u)=>{i(d=>{var f=Math.round(c),p=Math.round(u);return d.containerWidth===f&&d.containerHeight===p?d:{containerWidth:f,containerHeight:p}})},[]),s=m.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:u,height:d}=c.getBoundingClientRect();o(u,d)}},[t,o]);return m.createElement(m.Fragment,null,m.createElement(Ip,{width:a.containerWidth,height:a.containerHeight}),m.createElement("div",Mo({ref:s},e)))}),Hle=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return m.createElement(m.Fragment,null,m.createElement(Ip,{width:r,height:n}),m.createElement("div",Mo({ref:t},e)))}),Wle=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return ba(r)||ba(n)?m.createElement(Ule,Mo({},e,{ref:t})):m.createElement(Hle,Mo({},e,{ref:t}))});function Kle(e){return e===!0?Vle:Wle}var Gle=m.forwardRef((e,t)=>{var{children:r,className:n,height:a,onClick:i,onContextMenu:o,onDoubleClick:s,onMouseDown:c,onMouseEnter:u,onMouseLeave:d,onMouseMove:f,onMouseUp:p,onTouchEnd:h,onTouchMove:g,onTouchStart:x,style:v,width:y,responsive:b,dispatchTouchEvents:w=!0}=e,j=m.useRef(null),N=De(),[S,P]=m.useState(null),[C,M]=m.useState(null),T=Dle(),A=S1(),E=(A==null?void 0:A.width)>0?A.width:y,_=(A==null?void 0:A.height)>0?A.height:a,L=m.useCallback(z=>{T(z),typeof t=="function"&&t(z),P(z),M(z),z!=null&&(j.current=z)},[T,t,P,M]),I=m.useCallback(z=>{N(vO(z)),N(Gr({handler:i,reactEvent:z}))},[N,i]),B=m.useCallback(z=>{N(nv(z)),N(Gr({handler:u,reactEvent:z}))},[N,u]),V=m.useCallback(z=>{N(YE()),N(Gr({handler:d,reactEvent:z}))},[N,d]),O=m.useCallback(z=>{N(nv(z)),N(Gr({handler:f,reactEvent:z}))},[N,f]),R=m.useCallback(()=>{N(NO())},[N]),U=m.useCallback(z=>{N(jO(z.key))},[N]),q=m.useCallback(z=>{N(Gr({handler:o,reactEvent:z}))},[N,o]),ee=m.useCallback(z=>{N(Gr({handler:s,reactEvent:z}))},[N,s]),oe=m.useCallback(z=>{N(Gr({handler:c,reactEvent:z}))},[N,c]),D=m.useCallback(z=>{N(Gr({handler:p,reactEvent:z}))},[N,p]),Z=m.useCallback(z=>{N(Gr({handler:x,reactEvent:z}))},[N,x]),le=m.useCallback(z=>{w&&N(PO(z)),N(Gr({handler:g,reactEvent:z}))},[N,w,g]),Q=m.useCallback(z=>{N(Gr({handler:h,reactEvent:z}))},[N,h]),H=Kle(b);return m.createElement(mA.Provider,{value:S},m.createElement(L7.Provider,{value:C},m.createElement(H,{width:E??(v==null?void 0:v.width),height:_??(v==null?void 0:v.height),className:ve("recharts-wrapper",n),style:Rle({position:"relative",cursor:"default",width:E,height:_},v),onClick:I,onContextMenu:q,onDoubleClick:ee,onFocus:R,onKeyDown:U,onMouseDown:oe,onMouseEnter:B,onMouseLeave:V,onMouseMove:O,onMouseUp:D,onTouchEnd:Q,onTouchMove:le,onTouchStart:Z,ref:L},m.createElement(Fle,null),r)))}),Yle=["width","height","responsive","children","className","style","compact","title","desc"];function qle(e,t){if(e==null)return{};var r,n,a=Xle(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n{var{width:r,height:n,responsive:a,children:i,className:o,style:s,compact:c,title:u,desc:d}=e,f=qle(e,Yle),p=pr(f);return c?m.createElement(m.Fragment,null,m.createElement(Ip,{width:r,height:n}),m.createElement(G6,{otherAttributes:p,title:u,desc:d},i)):m.createElement(Gle,{className:o,style:s,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},m.createElement(G6,{otherAttributes:p,title:u,desc:d,ref:t},m.createElement(die,null,i)))});function av(){return av=Object.assign?Object.assign.bind():function(e){for(var t=1;tm.createElement(o2,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Jle,tooltipPayloadSearcher:Qp,categoricalChartProps:e,ref:t})),tce=["axis","item"],rce=m.forwardRef((e,t)=>m.createElement(o2,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:tce,tooltipPayloadSearcher:Qp,categoricalChartProps:e,ref:t}));function nce(e){var t=De();return m.useEffect(()=>{t(jle(e))},[t,e]),null}var ace=["layout"];function iv(){return iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=ct(e,pce);return m.createElement(lce,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:fce,tooltipPayloadSearcher:Qp,categoricalChartProps:r,ref:t})}),hce=["axis"],gce=m.forwardRef((e,t)=>m.createElement(o2,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:hce,tooltipPayloadSearcher:Qp,categoricalChartProps:e,ref:t}));const Z6=["#8b5cf6","#ec4899","#3b82f6","#10b981","#f59e0b","#ef4444","#06b6d4","#a855f7"],yce=[{value:"line",label:"Line Chart",icon:st},{value:"bar",label:"Bar Chart",icon:AU},{value:"area",label:"Area Chart",icon:st},{value:"pie",label:"Pie Chart",icon:OU}],vce=[{value:"7d",label:"Last 7 Days"},{value:"30d",label:"Last 30 Days"},{value:"90d",label:"Last 90 Days"},{value:"1y",label:"Last Year"},{value:"all",label:"All Time"}],xce=()=>{const e=Ht(),t=we(W=>{var Y;return(Y=W.admin.user)==null?void 0:Y.username}),r=we(W=>W.admin.links),n=we(W=>W.page.darkMode),[a,i]=m.useState(!0),[o,s]=m.useState("30d"),[c,u]=m.useState("clicks"),[d,f]=m.useState("line"),[p,h]=m.useState("date"),[g,x]=m.useState("count"),[v,y]=m.useState(350),[b,w]=m.useState([]),[j,N]=m.useState([]),[S,P]=m.useState([]),[C,M]=m.useState([]),[T,A]=m.useState([]),[E,_]=m.useState([]),[L,I]=m.useState([]),[B,V]=m.useState([]),[O,R]=m.useState([]),[U,q]=m.useState([]),[ee,oe]=m.useState([]),[D,Z]=m.useState([]),[le,Q]=m.useState(0),[H,z]=m.useState(0),[re,ce]=m.useState(0),[K,$t]=m.useState("");m.useEffect(()=>{Ae()},[t,o]),m.useEffect(()=>{const W=()=>{window.innerWidth<640?y(300):window.innerWidth<1024?y(350):y(400)};return W(),window.addEventListener("resize",W),()=>window.removeEventListener("resize",W)},[]),m.useEffect(()=>{},[c]);const Ae=async()=>{var W;if(!t){i(!1);return}i(!0);try{const Y=await be.post("/analytics/get",{username:t,timeRange:o},{withCredentials:!0});if(Y.status===200&&Y.data.success){const se=Y.data.analytics;w(se.profileVisits||[]),N(se.clickCounts||[]),P(se.locationData||[]),M(se.osData||[]),A(se.browserData||[]),_(se.deviceData||[]),I(se.referrerData||[]),V(se.referrerCategoryData||[]),R(se.platformData||[]),q(se.linkData||[]),oe(se.hourlyData||[]),Z(se.dayOfWeekData||[]);const de=(se.clickCounts||[]).reduce((Re,Wt)=>Re+(Wt.clicks||0),0),Oe=(se.profileVisits||[]).reduce((Re,Wt)=>Re+(Wt.visits||0),0);Q(de),z(Oe),ce((se.locationData||[]).length),$t(((W=(se.referrerData||[])[0])==null?void 0:W.name)||"Direct")}}catch(Y){console.error("Error fetching analytics:",Y),ir(),J.error("Using simulated data. Analytics API unavailable.")}finally{i(!1)}},ir=()=>{var s2,l2,c2;const W=or(o),Y=r.reduce((me,Gt)=>me+(Gt.clicked||0),0),se=W.map(me=>({date:me,visits:Math.floor(Math.random()*50)+10})),de=W.map(me=>({date:me,clicks:Math.floor(Math.random()*100)+20})),Oe=[{name:"United States",value:Math.floor(Y*.35)},{name:"India",value:Math.floor(Y*.25)},{name:"United Kingdom",value:Math.floor(Y*.15)},{name:"Canada",value:Math.floor(Y*.1)}],Re=[{name:"Windows",value:Math.floor(Y*.4)},{name:"macOS",value:Math.floor(Y*.25)},{name:"Linux",value:Math.floor(Y*.15)},{name:"iOS",value:Math.floor(Y*.12)},{name:"Android",value:Math.floor(Y*.08)}],Wt=[{name:"Chrome",value:Math.floor(Y*.5)},{name:"Safari",value:Math.floor(Y*.25)},{name:"Firefox",value:Math.floor(Y*.15)},{name:"Edge",value:Math.floor(Y*.1)}],cn=[{name:"Desktop",value:Math.floor(Y*.6)},{name:"Mobile",value:Math.floor(Y*.35)},{name:"Tablet",value:Math.floor(Y*.05)}],un=[{name:"Direct",value:Math.floor(Y*.4),category:"direct",clicks:Math.floor(Y*.4)},{name:"google.com",value:Math.floor(Y*.25),category:"search",clicks:Math.floor(Y*.25)},{name:"twitter.com",value:Math.floor(Y*.15),category:"social",clicks:Math.floor(Y*.15)},{name:"linkedin.com",value:Math.floor(Y*.1),category:"social",clicks:Math.floor(Y*.1)},{name:"facebook.com",value:Math.floor(Y*.1),category:"social",clicks:Math.floor(Y*.1)}],ll=[{name:"Direct",value:((s2=un.find(me=>me.category==="direct"))==null?void 0:s2.value)||0,clicks:((l2=un.find(me=>me.category==="direct"))==null?void 0:l2.clicks)||0},{name:"Search",value:un.filter(me=>me.category==="search").reduce((me,Gt)=>me+Gt.value,0),clicks:un.filter(me=>me.category==="search").reduce((me,Gt)=>me+Gt.clicks,0)},{name:"Social",value:un.filter(me=>me.category==="social").reduce((me,Gt)=>me+Gt.value,0),clicks:un.filter(me=>me.category==="social").reduce((me,Gt)=>me+Gt.clicks,0)}],tt=r.map(me=>({name:me.source,clicks:me.clicked||Math.floor(Math.random()*100)})),Kt=r.map(me=>({name:me.source,clicks:me.clicked||0,visits:Math.floor((me.clicked||0)*1.2)})),Te=Array.from({length:24},(me,Gt)=>({hour:`${Gt}:00`,clicks:Math.floor(Math.random()*50)})),Nn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"].map((me,Gt)=>({name:me,clicks:Math.floor(Math.random()*100),value:Math.floor(Math.random()*100)}));w(se),N(de),P(Oe),M(Re),A(Wt),_(cn),I(un),V(ll),R(tt),q(Kt),oe(Te),Z(Nn);const cl=de.reduce((me,Gt)=>me+(Gt.clicks||0),0),_O=se.reduce((me,Gt)=>me+(Gt.visits||0),0);Q(cl),z(_O),ce(Oe.length),$t(((c2=un[0])==null?void 0:c2.name)||"Direct")},or=W=>{const Y=[],se=new Date;let de=7;switch(W){case"7d":de=7;break;case"30d":de=30;break;case"90d":de=90;break;case"1y":de=365;break;case"all":de=365;break;default:de=30}for(let Oe=de-1;Oe>=0;Oe--){const Re=new Date(se);Re.setDate(Re.getDate()-Oe),Y.push(Re.toLocaleDateString("en-US",{month:"short",day:"numeric"}))}return Y},Yn=()=>{switch(c){case"profileVisits":return Array.isArray(b)?b:[];case"clicks":return Array.isArray(j)?j:[];case"location":return Array.isArray(S)?S:[];case"os":return Array.isArray(C)?C:[];case"browser":return Array.isArray(T)?T:[];case"device":return Array.isArray(E)?E:[];case"referrer":return Array.isArray(B)?B:[];case"referrerDetails":return Array.isArray(L)?L:[];case"hourly":return Array.isArray(ee)?ee:[];case"dayOfWeek":return Array.isArray(D)?D:[];case"platform":return Array.isArray(O)?O:[];case"link":return Array.isArray(U)?U:[];default:return Array.isArray(j)?j:[]}},Pu=()=>{const W=Yn();if(!W||!Array.isArray(W)||W.length===0)return l.jsx("div",{className:"flex items-center justify-center h-96 text-gray-500 dark:text-gray-400",children:l.jsxs("div",{className:"text-center",children:[l.jsx(st,{className:"text-6xl mx-auto mb-4 opacity-50 text-gray-400 dark:text-gray-500"}),l.jsx("p",{className:"text-xl text-gray-700 dark:text-gray-300",children:"No data available for the selected metric and time range"}),l.jsxs("p",{className:"text-sm mt-2 text-gray-500 dark:text-gray-400",children:["Metric: ",c]})]})});const Y=W.map(tt=>({...tt}));let se;const de=Y[0]||{};if(!de||typeof de!="object")return l.jsx("div",{className:"flex items-center justify-center h-96 text-gray-500 dark:text-gray-400",children:l.jsxs("div",{className:"text-center",children:[l.jsx(st,{className:"text-6xl mx-auto mb-4 opacity-50 text-gray-400 dark:text-gray-500"}),l.jsx("p",{className:"text-xl text-gray-700 dark:text-gray-300",children:"Invalid data format for the selected metric"})]})});const Oe=["profileVisits","clicks"],Re=["hourly"],Wt=["location","os","browser","device","referrer","referrerDetails","platform","link","dayOfWeek"];Re.includes(c)?se="hour":Wt.includes(c)?se="name":Oe.includes(c)?se=p==="date"?"date":de.name?"name":"date":se=de.date?"date":de.name?"name":de.hour?"hour":"date";let cn;const un={hourly:"clicks",dayOfWeek:"clicks",profileVisits:"visits",clicks:"clicks",os:"value",location:"value",browser:"value",device:"value",referrer:"value",referrerDetails:"value",platform:"clicks",link:"clicks"};if(un[c]?cn=un[c]:cn=de.value!==void 0?"value":de.clicks!==void 0?"clicks":de.visits!==void 0?"visits":"value",Y.length>0&&de&&typeof de=="object"){const tt=Object.keys(de);if(!de.hasOwnProperty(se)){const Kt=tt.find(Te=>c==="hourly"?Te==="hour":["location","os","browser","device","referrer","referrerDetails","platform","link","dayOfWeek"].includes(c)?Te==="name":["profileVisits","clicks"].includes(c)?Te==="date"||Te==="name":["name","date","hour"].includes(Te))||tt.find(Te=>["name","date","hour"].includes(Te))||tt[0]||"name";Kt!==se&&(se=Kt)}if(!de.hasOwnProperty(cn)){const Kt=tt.find(Te=>c==="profileVisits"?Te==="visits":["clicks","hourly","dayOfWeek","platform","link"].includes(c)?Te==="clicks":["location","os","browser","device"].includes(c)?Te==="value":["value","clicks","visits"].includes(Te))||tt.find(Te=>["value","clicks","visits"].includes(Te))||tt.find(Te=>typeof de[Te]=="number")||tt[1]||"value";Kt!==cn&&(cn=Kt)}}const ll={data:Y,margin:{top:5,right:30,left:20,bottom:5}};switch(d){case"line":return l.jsx(ad,{width:"100%",height:v,children:l.jsxs(ece,{...ll,children:[l.jsx(Vd,{strokeDasharray:"3 3",stroke:n?"#374151":"#e5e7eb"}),l.jsx(Ud,{dataKey:se,stroke:n?"#9ca3af":"#6b7280",tick:{fill:n?"#9ca3af":"#6b7280",fontSize:12},angle:c==="hourly"||Wt.includes(c)&&Y.length>5?-45:0,textAnchor:c==="hourly"||Wt.includes(c)&&Y.length>5?"end":"middle",height:c==="hourly"||Wt.includes(c)&&Y.length>5?80:30}),l.jsx(Hd,{stroke:n?"#9ca3af":"#6b7280",tick:{fill:n?"#9ca3af":"#6b7280",fontSize:12}}),l.jsx(fd,{contentStyle:{backgroundColor:n?"#1f2937":"#ffffff",border:`1px solid ${n?"#374151":"#e5e7eb"}`,borderRadius:"8px"},labelStyle:{color:n?"#f3f4f6":"#111827"}}),l.jsx(Fl,{}),l.jsx(nO,{type:"monotone",dataKey:cn,stroke:"#8b5cf6",strokeWidth:2,dot:{fill:"#8b5cf6",r:4},activeDot:{r:6}})]})});case"bar":return l.jsx(ad,{width:"100%",height:v,children:l.jsxs(rce,{...ll,children:[l.jsx(Vd,{strokeDasharray:"3 3",stroke:n?"#374151":"#e5e7eb"}),l.jsx(Ud,{dataKey:se,stroke:n?"#9ca3af":"#6b7280",tick:{fill:n?"#9ca3af":"#6b7280",fontSize:12},angle:c==="hourly"||Wt.includes(c)&&Y.length>5?-45:0,textAnchor:c==="hourly"||Wt.includes(c)&&Y.length>5?"end":"middle",height:c==="hourly"||Wt.includes(c)&&Y.length>5?80:30}),l.jsx(Hd,{stroke:n?"#9ca3af":"#6b7280",tick:{fill:n?"#9ca3af":"#6b7280",fontSize:12}}),l.jsx(fd,{contentStyle:{backgroundColor:n?"#1f2937":"#ffffff",border:`1px solid ${n?"#374151":"#e5e7eb"}`,borderRadius:"8px"},labelStyle:{color:n?"#f3f4f6":"#111827"}}),l.jsx(Fl,{}),l.jsx(gO,{dataKey:cn,fill:"#8b5cf6",radius:[8,8,0,0]})]})});case"area":return l.jsx(ad,{width:"100%",height:v,children:l.jsxs(gce,{...ll,children:[l.jsx("defs",{children:l.jsxs("linearGradient",{id:"colorGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"5%",stopColor:"#8b5cf6",stopOpacity:.8}),l.jsx("stop",{offset:"95%",stopColor:"#8b5cf6",stopOpacity:0})]})}),l.jsx(Vd,{strokeDasharray:"3 3",stroke:n?"#374151":"#e5e7eb"}),l.jsx(Ud,{dataKey:se,stroke:n?"#9ca3af":"#6b7280",tick:{fill:n?"#9ca3af":"#6b7280",fontSize:12},angle:c==="hourly"||Wt.includes(c)&&Y.length>5?-45:0,textAnchor:c==="hourly"||Wt.includes(c)&&Y.length>5?"end":"middle",height:c==="hourly"||Wt.includes(c)&&Y.length>5?80:30}),l.jsx(Hd,{stroke:n?"#9ca3af":"#6b7280",tick:{fill:n?"#9ca3af":"#6b7280",fontSize:12}}),l.jsx(fd,{contentStyle:{backgroundColor:n?"#1f2937":"#ffffff",border:`1px solid ${n?"#374151":"#e5e7eb"}`,borderRadius:"8px"},labelStyle:{color:n?"#f3f4f6":"#111827"}}),l.jsx(Fl,{}),l.jsx(fO,{type:"monotone",dataKey:cn,stroke:"#8b5cf6",fillOpacity:1,fill:"url(#colorGradient)"})]})});case"pie":return l.jsx(ad,{width:"100%",height:v,children:l.jsxs(mce,{children:[l.jsx(VA,{data:Y,cx:"50%",cy:"50%",labelLine:!1,label:tt=>{const Kt=tt.payload||tt,Te=(Kt[se]||Kt.name||tt.name||"Item").toString(),Nn=Te.length>15?Te.substring(0,12)+"...":Te,cl=tt.percent?(tt.percent*100).toFixed(0):"0";return`${Nn}: ${cl}%`},outerRadius:120,fill:"#8884d8",dataKey:cn,children:Y.map((tt,Kt)=>l.jsx(ju,{fill:Z6[Kt%Z6.length]},`cell-${Kt}`))}),l.jsx(fd,{contentStyle:{backgroundColor:n?"#1f2937":"#ffffff",border:`1px solid ${n?"#374151":"#e5e7eb"}`,borderRadius:"8px"},labelStyle:{color:n?"#f3f4f6":"#111827"},formatter:(tt,Kt,Te)=>{const Nn=Te.payload||{},cl=Nn[se]||Nn.name||Kt||"Value";return[tt,cl]}}),l.jsx(Fl,{formatter:(tt,Kt,Te)=>{const Nn=Y[Te];return Nn&&Nn[se]?Nn[se]:tt||`Item ${Te+1}`}})]})});default:return null}},IO=[{value:"profileVisits",label:"Profile Visits",icon:cr},{value:"clicks",label:"Click Counts",icon:st},{value:"location",label:"Location Based",icon:ci},{value:"os",label:"OS Based",icon:aa},{value:"browser",label:"Browser Based",icon:aa},{value:"device",label:"Device Based",icon:U0},{value:"referrer",label:"Referrer Categories",icon:cr},{value:"referrerDetails",label:"Referrer Sources",icon:cr},{value:"hourly",label:"Hourly Distribution",icon:wl},{value:"dayOfWeek",label:"Day of Week",icon:wl},{value:"platform",label:"Platform Based",icon:Ge},{value:"link",label:"Link Based",icon:Ge}];return t?l.jsx("div",{className:"w-full min-h-screen py-8 px-4 sm:px-6 md:px-10 lg:px-12",children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"mb-6 sm:mb-8",children:[l.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold mb-3 sm:mb-4 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",children:"Analytics Dashboard"}),l.jsx("p",{className:"text-sm sm:text-base md:text-lg text-gray-700 dark:text-gray-400",children:"Track and analyze your link performance with detailed insights"})]}),l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl sm:rounded-2xl shadow-xl border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6 mb-4 sm:mb-6",children:[l.jsxs("div",{className:`grid grid-cols-1 sm:grid-cols-2 ${["profileVisits","clicks"].includes(c)?"lg:grid-cols-4":"lg:grid-cols-3"} gap-3 sm:gap-4`,children:[l.jsxs("div",{children:[l.jsxs("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1 sm:mb-2",children:[l.jsx(wl,{className:"inline mr-1 sm:mr-2 text-xs sm:text-sm"}),"Time Range"]}),l.jsx("select",{value:o,onChange:W=>s(W.target.value),className:"w-full px-3 sm:px-4 py-1.5 sm:py-2 text-xs sm:text-sm bg-gray-100 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700/50 rounded-lg text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-purple-500",children:vce.map(W=>l.jsx("option",{value:W.value,children:W.label},W.value))})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1 sm:mb-2",children:"Metric"}),l.jsx("select",{value:c,onChange:W=>u(W.target.value),className:"w-full px-3 sm:px-4 py-1.5 sm:py-2 text-xs sm:text-sm bg-gray-100 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700/50 rounded-lg text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-purple-500",children:IO.map(W=>l.jsx("option",{value:W.value,children:W.label},W.value))})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1 sm:mb-2",children:"Graph Type"}),l.jsx("select",{value:d,onChange:W=>f(W.target.value),className:"w-full px-3 sm:px-4 py-1.5 sm:py-2 text-xs sm:text-sm bg-gray-100 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700/50 rounded-lg text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-purple-500",children:yce.map(W=>l.jsx("option",{value:W.value,children:W.label},W.value))})]}),["profileVisits","clicks"].includes(c)&&l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1 sm:mb-2",children:"X-Axis"}),l.jsxs("select",{value:p,onChange:W=>h(W.target.value),className:"w-full px-3 sm:px-4 py-1.5 sm:py-2 text-xs sm:text-sm bg-gray-100 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700/50 rounded-lg text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-purple-500",children:[l.jsx("option",{value:"date",children:"Date"}),l.jsx("option",{value:"name",children:"Name"})]})]})]}),l.jsxs("div",{className:"mt-3 sm:mt-4",children:[l.jsx("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 dark:text-gray-300 mb-1 sm:mb-2",children:"Y-Axis"}),l.jsxs("select",{value:g,onChange:W=>x(W.target.value),className:"w-full px-3 sm:px-4 py-1.5 sm:py-2 text-xs sm:text-sm bg-gray-100 dark:bg-gray-800/50 border border-gray-300 dark:border-gray-700/50 rounded-lg text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-purple-500",children:[l.jsx("option",{value:"count",children:"Count"}),l.jsx("option",{value:"value",children:"Value"}),l.jsx("option",{value:"percentage",children:"Percentage"})]})]})]}),l.jsx(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl sm:rounded-2xl shadow-xl border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:a?l.jsx("div",{className:"flex items-center justify-center h-96",children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-t-4 border-b-4 border-purple-500 mx-auto mb-4"}),l.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Loading analytics..."})]})}):Pu()},`chart-${c}-${d}-${o}-${g}`),l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-5 md:gap-6 mt-6",children:[l.jsx("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs sm:text-sm text-gray-600 dark:text-gray-400",children:"Total Clicks"}),l.jsx("p",{className:"text-2xl sm:text-3xl font-bold text-gray-900 dark:text-white mt-1 sm:mt-2",children:le.toLocaleString()})]}),l.jsx(st,{className:"text-3xl sm:text-4xl text-purple-500 flex-shrink-0"})]})}),l.jsx("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs sm:text-sm text-gray-600 dark:text-gray-400",children:"Profile Visits"}),l.jsx("p",{className:"text-2xl sm:text-3xl font-bold text-gray-900 dark:text-white mt-1 sm:mt-2",children:H.toLocaleString()})]}),l.jsx(cr,{className:"text-3xl sm:text-4xl text-pink-500 flex-shrink-0"})]})}),l.jsx("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs sm:text-sm text-gray-600 dark:text-gray-400",children:"Countries"}),l.jsx("p",{className:"text-2xl sm:text-3xl font-bold text-gray-900 dark:text-white mt-1 sm:mt-2",children:re})]}),l.jsx(ci,{className:"text-3xl sm:text-4xl text-blue-500 flex-shrink-0"})]})}),l.jsx("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs sm:text-sm text-gray-600 dark:text-gray-400",children:"Top Referrer"}),l.jsx("p",{className:"text-sm sm:text-base md:text-lg lg:text-xl font-bold text-gray-900 dark:text-white mt-1 sm:mt-2 truncate max-w-[120px] sm:max-w-none",children:K})]}),l.jsx(Ge,{className:"text-3xl sm:text-4xl text-green-500 flex-shrink-0"})]})})]}),l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"mt-6 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[l.jsxs("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:[l.jsxs("h2",{className:"text-xl sm:text-2xl md:text-3xl font-bold text-gray-900 dark:text-white mb-4 sm:mb-6 flex items-center gap-2",children:[l.jsx(cr,{className:"text-purple-500"}),l.jsx("span",{children:"Referrer Analytics"})]}),B&&B.length>0?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm sm:text-base font-semibold text-gray-700 dark:text-gray-300 mb-3",children:"By Category"}),l.jsx("div",{className:"space-y-2",children:[...B].sort((W,Y)=>(Y.value||Y.clicks||0)-(W.value||W.clicks||0)).map((W,Y)=>{const se=B.reduce((Oe,Re)=>Oe+(Re.value||Re.clicks||0),0),de=se>0?((W.value||W.clicks||0)/se*100).toFixed(1):0;return l.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/30 rounded-lg p-3 border border-gray-200 dark:border-gray-700/30",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"text-sm sm:text-base font-medium text-gray-800 dark:text-gray-200 capitalize",children:W.name}),l.jsxs("span",{className:"text-sm sm:text-base font-bold text-purple-600 dark:text-purple-400",children:[W.value||W.clicks||0," (",de,"%)"]})]}),l.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700/50 rounded-full h-2 overflow-hidden",children:l.jsx("div",{className:"h-full bg-gradient-to-r from-purple-500 to-pink-500 transition-all duration-500",style:{width:`${de}%`}})})]},Y)})})]}),L&&L.length>0&&l.jsxs("div",{className:"mt-6",children:[l.jsx("h3",{className:"text-sm sm:text-base font-semibold text-gray-700 dark:text-gray-300 mb-3",children:"Top Referrer Sources"}),l.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:[...L].sort((W,Y)=>(Y.value||Y.clicks||0)-(W.value||W.clicks||0)).slice(0,10).map((W,Y)=>l.jsxs("div",{className:"flex items-center justify-between p-2 sm:p-3 bg-gray-100 dark:bg-gray-800/20 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-800/40 transition-colors border border-gray-200 dark:border-gray-700/30",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-xs sm:text-sm font-medium text-gray-900 dark:text-gray-200 truncate",children:W.name}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-500 capitalize",children:W.category})]}),l.jsx("span",{className:"text-xs sm:text-sm font-bold text-purple-600 dark:text-purple-400 ml-3 flex-shrink-0",children:W.value||W.clicks||0})]},Y))})]})]}):l.jsx("p",{className:"text-sm sm:text-base text-gray-500 dark:text-gray-400 text-center py-8",children:"No referrer data available"})]}),l.jsxs("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:[l.jsxs("h2",{className:"text-xl sm:text-2xl md:text-3xl font-bold text-gray-900 dark:text-white mb-4 sm:mb-6 flex items-center gap-2",children:[l.jsx(aa,{className:"text-blue-500"}),l.jsx("span",{children:"Device & Browser"})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6",children:[E&&E.length>0&&l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm sm:text-base font-semibold text-gray-700 dark:text-gray-300 mb-3",children:"Device Types"}),l.jsx("div",{className:"space-y-2",children:[...E].sort((W,Y)=>(Y.value||0)-(W.value||0)).slice(0,5).map((W,Y)=>{const se=E.reduce((Oe,Re)=>Oe+(Re.value||0),0),de=se>0?((W.value||0)/se*100).toFixed(1):0;return l.jsxs("div",{className:"flex items-center justify-between text-xs sm:text-sm",children:[l.jsx("span",{className:"text-gray-700 dark:text-gray-400",children:W.name}),l.jsxs("span",{className:"font-bold text-blue-600 dark:text-blue-400",children:[W.value||0," (",de,"%)"]})]},Y)})})]}),T&&T.length>0&&l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm sm:text-base font-semibold text-gray-700 dark:text-gray-300 mb-3",children:"Top Browsers"}),l.jsx("div",{className:"space-y-2",children:[...T].sort((W,Y)=>(Y.value||0)-(W.value||0)).slice(0,5).map((W,Y)=>{const se=T.reduce((Oe,Re)=>Oe+(Re.value||0),0),de=se>0?((W.value||0)/se*100).toFixed(1):0;return l.jsxs("div",{className:"flex items-center justify-between text-xs sm:text-sm",children:[l.jsx("span",{className:"text-gray-700 dark:text-gray-400",children:W.name}),l.jsxs("span",{className:"font-bold text-blue-600 dark:text-blue-400",children:[W.value||0," (",de,"%)"]})]},Y)})})]})]}),C&&C.length>0&&l.jsxs("div",{className:"mt-4 sm:mt-6",children:[l.jsx("h3",{className:"text-sm sm:text-base font-semibold text-gray-700 dark:text-gray-300 mb-3",children:"Operating Systems"}),l.jsx("div",{className:"space-y-2",children:[...C].sort((W,Y)=>(Y.value||0)-(W.value||0)).slice(0,5).map((W,Y)=>{const se=C.reduce((Oe,Re)=>Oe+(Re.value||0),0),de=se>0?((W.value||0)/se*100).toFixed(1):0;return l.jsxs("div",{className:"bg-gray-100 dark:bg-gray-800/20 rounded-lg p-2 sm:p-3 border border-gray-200 dark:border-gray-700/30",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("span",{className:"text-xs sm:text-sm font-medium text-gray-900 dark:text-gray-200",children:W.name}),l.jsxs("span",{className:"text-xs sm:text-sm font-bold text-blue-600 dark:text-blue-400",children:[W.value||0," (",de,"%)"]})]}),l.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700/50 rounded-full h-1.5 overflow-hidden",children:l.jsx("div",{className:"h-full bg-gradient-to-r from-blue-500 to-cyan-500 transition-all duration-500",style:{width:`${de}%`}})})]},Y)})})]})]})]}),S&&S.length>0&&l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"mt-6 bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:[l.jsxs("h2",{className:"text-xl sm:text-2xl md:text-3xl font-bold text-gray-900 dark:text-white mb-4 sm:mb-6 flex items-center gap-2",children:[l.jsx(ci,{className:"text-green-500"}),l.jsx("span",{children:"Geographic Distribution"})]}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[...S].sort((W,Y)=>(Y.value||0)-(W.value||0)).map((W,Y)=>{const se=S.reduce((Oe,Re)=>Oe+(Re.value||0),0),de=se>0?((W.value||0)/se*100).toFixed(1):0;return l.jsxs("div",{className:"bg-gray-100 dark:bg-gray-800/20 rounded-lg p-3 sm:p-4 hover:bg-gray-200 dark:hover:bg-gray-800/40 transition-colors border border-gray-200 dark:border-gray-700/30",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"text-sm sm:text-base font-medium text-gray-900 dark:text-gray-200",children:W.name}),l.jsx("span",{className:"text-sm sm:text-base font-bold text-green-600 dark:text-green-400",children:W.value||0})]}),l.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700/50 rounded-full h-2 overflow-hidden",children:l.jsx("div",{className:"h-full bg-gradient-to-r from-green-500 to-emerald-500 transition-all duration-500",style:{width:`${de}%`}})}),l.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-500 mt-1",children:[de,"% of total"]})]},Y)})})]}),(ee.length>0||D.length>0)&&l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"mt-6 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[ee.length>0&&l.jsxs("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:[l.jsxs("h2",{className:"text-lg sm:text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[l.jsx(wl,{className:"text-purple-500"}),l.jsx("span",{children:"Peak Hours"})]}),l.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:ee.map((W,Y)=>{const se=Math.max(...ee.map(Oe=>Oe.clicks||0)),de=se>0?((W.clicks||0)/se*100).toFixed(0):0;return l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-xs sm:text-sm text-gray-600 dark:text-gray-500 w-16 flex-shrink-0",children:W.hour}),l.jsx("div",{className:"flex-1 bg-gray-200 dark:bg-gray-700/50 rounded-full h-4 sm:h-5 overflow-hidden relative",children:l.jsx("div",{className:"h-full bg-gradient-to-r from-purple-500 to-pink-500 transition-all duration-500 flex items-center justify-end pr-2",style:{width:`${de}%`},children:W.clicks>0&&l.jsx("span",{className:"text-xs font-bold text-white",children:W.clicks})})})]},Y)})})]}),D.length>0&&l.jsxs("div",{className:"bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6",children:[l.jsxs("h2",{className:"text-lg sm:text-xl md:text-2xl font-bold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[l.jsx(wl,{className:"text-blue-500"}),l.jsx("span",{children:"Day of Week"})]}),l.jsx("div",{className:"space-y-2",children:D.map((W,Y)=>{const se=Math.max(...D.map(Oe=>Oe.clicks||Oe.value||0)),de=se>0?((W.clicks||W.value||0)/se*100).toFixed(0):0;return l.jsxs("div",{className:"bg-gray-100 dark:bg-gray-800/20 rounded-lg p-3 border border-gray-200 dark:border-gray-700/30",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"text-sm sm:text-base font-medium text-gray-900 dark:text-gray-200",children:W.name}),l.jsx("span",{className:"text-sm sm:text-base font-bold text-blue-600 dark:text-blue-400",children:W.clicks||W.value||0})]}),l.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700/50 rounded-full h-2 overflow-hidden",children:l.jsx("div",{className:"h-full bg-gradient-to-r from-blue-500 to-cyan-500 transition-all duration-500",style:{width:`${de}%`}})})]},Y)})})]})]}),O&&O.length>0&&l.jsxs(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"mt-6 bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-xl shadow-lg border border-gray-200 dark:border-gray-700/50 p-4 sm:p-5 md:p-6 overflow-x-auto",children:[l.jsxs("h2",{className:"text-xl sm:text-2xl md:text-3xl font-bold text-gray-900 dark:text-white mb-4 sm:mb-6 flex items-center gap-2",children:[l.jsx(Ge,{className:"text-pink-500"}),l.jsx("span",{children:"Platform Performance"})]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-left",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-gray-300 dark:border-gray-600",children:[l.jsx("th",{className:"text-xs sm:text-sm font-semibold text-gray-700 dark:text-gray-400 py-2 sm:py-3 px-2 sm:px-4",children:"Platform"}),l.jsx("th",{className:"text-xs sm:text-sm font-semibold text-gray-700 dark:text-gray-400 py-2 sm:py-3 px-2 sm:px-4 text-right",children:"Clicks"}),l.jsx("th",{className:"text-xs sm:text-sm font-semibold text-gray-700 dark:text-gray-400 py-2 sm:py-3 px-2 sm:px-4 text-right",children:"Percentage"}),l.jsx("th",{className:"text-xs sm:text-sm font-semibold text-gray-700 dark:text-gray-400 py-2 sm:py-3 px-2 sm:px-4 text-right hidden sm:table-cell",children:"Bar"})]})}),l.jsx("tbody",{children:[...O].sort((W,Y)=>(Y.clicks||Y.value||0)-(W.clicks||W.value||0)).map((W,Y)=>{const se=O.reduce((Oe,Re)=>Oe+(Re.clicks||Re.value||0),0),de=se>0?((W.clicks||W.value||0)/se*100).toFixed(1):0;return l.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700/30 hover:bg-gray-100 dark:hover:bg-gray-800/20 transition-colors",children:[l.jsx("td",{className:"text-xs sm:text-sm font-medium text-gray-900 dark:text-gray-200 py-2 sm:py-3 px-2 sm:px-4 capitalize",children:W.name}),l.jsx("td",{className:"text-xs sm:text-sm font-bold text-purple-600 dark:text-purple-400 py-2 sm:py-3 px-2 sm:px-4 text-right",children:(W.clicks||W.value||0).toLocaleString()}),l.jsxs("td",{className:"text-xs sm:text-sm text-gray-600 dark:text-gray-500 py-2 sm:py-3 px-2 sm:px-4 text-right",children:[de,"%"]}),l.jsx("td",{className:"py-2 sm:py-3 px-2 sm:px-4 text-right hidden sm:table-cell",children:l.jsx("div",{className:"w-24 sm:w-32 bg-gray-200 dark:bg-gray-700/50 rounded-full h-2 overflow-hidden ml-auto",children:l.jsx("div",{className:"h-full bg-gradient-to-r from-purple-500 to-pink-500 transition-all duration-500",style:{width:`${de}%`}})})})]},Y)})})]})})]}),l.jsx(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.7},className:"mt-6 text-center",children:l.jsxs(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>e("/click-details"),className:"inline-flex items-center gap-2 sm:gap-3 px-4 sm:px-6 py-2.5 sm:py-3 bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 hover:from-purple-700 hover:via-pink-700 hover:to-blue-700 text-white text-sm sm:text-base md:text-lg font-semibold rounded-xl shadow-lg hover:shadow-xl transition-all duration-300",children:[l.jsx(HU,{className:"text-lg sm:text-xl"}),l.jsx("span",{children:"View Detailed Click Information"}),l.jsx(Ls,{className:"text-sm sm:text-base"})]})})]})}):l.jsx("div",{className:"w-full min-h-screen py-8 px-4 sm:px-6 md:px-10 lg:px-12 flex items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx(st,{className:"text-6xl text-gray-400 dark:text-gray-500 mx-auto mb-4"}),l.jsx("p",{className:"text-xl text-gray-700 dark:text-gray-300",children:"Please log in to view analytics"})]})})},bce=()=>{const e=[{icon:Ge,title:"Personalized Smart Links",description:"Create memorable, branded links using your username and platform name. Instead of random codes like 'bit.ly/xyz123', get clean URLs like 'yourname.allin1url.in/linkedin' that reflect your brand identity. Get your own domain FREE to manage all your links professionally.",gradient:"from-purple-500 to-pink-500",color:"from-blue-500 to-cyan-500"},{icon:_s,title:"Link Customization",description:"Fully customize your links with any platform name. Add GitHub, LinkedIn, Portfolio, Instagram, Facebook, LeetCode, Codeforces, or any custom platform. Your links follow a clear, memorable pattern.",gradient:"from-blue-500 to-cyan-500",color:"from-purple-500 to-pink-500"},{icon:st,title:"Click Analytics & Tracking",description:"Track clicks on all your links with detailed analytics. See which platforms get the most engagement, understand your audience, and optimize your networking strategy with real-time statistics.",gradient:"from-green-500 to-emerald-500",color:"from-yellow-500 to-orange-500"},{icon:xs,title:"Centralized Link Management",description:"Update destination URLs once, and all your shared links automatically redirect to the new URL. No more hunting down old links across resumes, business cards, and email signatures.",gradient:"from-orange-500 to-red-500",color:"from-purple-500 to-pink-500"},{icon:H0,title:"Single Hub Link",description:"Share one link (allin1url.in/yourname) that acts as a beautiful landing page for all your social profiles. Visitors can browse and choose which platform to visit, creating a professional digital business card.",gradient:"from-pink-500 to-rose-500",color:"from-blue-500 to-cyan-500"},{icon:bi,title:"Link Privacy Controls",description:"Three-tier visibility system: Public (visible everywhere), Unlisted (visible in profile only), and Private (password-protected). Control who can access your links with granular privacy settings.",gradient:"from-indigo-500 to-purple-500",color:"from-green-500 to-emerald-500"},{icon:Po,title:"User Search & Discovery",description:"Search for other users in real-time and view their public profiles. Discover professionals, creators, and developers. Control your own discoverability with search visibility settings.",gradient:"from-cyan-500 to-blue-500",color:"from-pink-500 to-rose-500"},{icon:er,title:"Password Protection",description:"Secure your private links with password protection. Set passwords for sensitive links, and users will be prompted to enter the password before accessing the destination URL.",gradient:"from-red-500 to-orange-500",color:"from-indigo-500 to-purple-500"},{icon:Lr,title:"Profile Privacy Settings",description:"Granular control over what information is visible in your public profile. Toggle visibility of email, location, bio, passion, profile image, link count, and click statistics independently.",gradient:"from-yellow-500 to-orange-500",color:"from-cyan-500 to-blue-500"},{icon:Ic,title:"Your Own Domain",description:"After registering, you'll get your own personalized domain to manage all your links. Your domain will reflect your brand identity and make your links more professional and memorable. Perfect for building your online presence!",gradient:"from-teal-500 to-cyan-500",color:"from-teal-500 to-cyan-500"},{icon:st,title:"Advanced Analytics",description:"Get comprehensive insights into every click with detailed analytics. Track where clicks originated from, the exact time of each click, geographic location, device type (mobile, tablet, desktop), browser type, referrer information, and much more. Understand your audience better with granular data about every interaction.",gradient:"from-blue-500 to-cyan-500",color:"from-blue-500 to-cyan-500"}];return l.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-100 via-lime-100 to-slate-100 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:[l.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 md:pt-28 pb-12 md:pb-20",children:[l.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12 md:mb-16",children:[l.jsx(k.h1,{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-4 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.2},children:"Features"}),l.jsx(k.p,{className:"text-lg md:text-xl text-gray-600 dark:text-gray-400 max-w-3xl mx-auto",initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.4},children:"Discover what All in1 url can do for you. Powerful features designed to transform your social media presence."})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-8",children:e.map((t,r)=>{const n=t.icon;return l.jsxs(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:r*.1},whileHover:{scale:1.02,y:-5},className:"relative bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8 overflow-hidden group",children:[l.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${t.gradient} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsx("div",{className:"relative z-10 mb-4",children:l.jsx("div",{className:`inline-flex p-3 rounded-xl bg-gradient-to-r ${t.color} text-white`,children:l.jsx(n,{className:"w-6 h-6"})})}),l.jsxs("div",{className:"relative z-10",children:[l.jsx("h3",{className:"text-xl md:text-2xl font-bold mb-3 text-gray-900 dark:text-white",children:t.title}),l.jsx("p",{className:"text-sm md:text-base text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})]},t.title)})})]}),l.jsx(Mi,{})]})},wce=()=>{const e=[{icon:_c,title:"Memorable & Professional Links",description:"Transform long, complex URLs into clean, branded links. Instead of 'linkedin.com/in/john-doe-software-engineer-123456789', get 'johndoe.allin1url.in/linkedin' that's easy to remember and share. Get your own domain FREE that will reflect your brand identity.",example:`Before: https://www.linkedin.com/in/john-doe-software-engineer-123456789/ +After: https://johndoe.allin1url.in/linkedin`,gradient:"from-purple-500 to-pink-500"},{icon:Qx,title:"For Professionals",benefits:["Build your brand with consistent, memorable links","Get your own domain FREE to reflect your brand identity","Professional appearance on resumes and business cards","Time-saving centralized link management","Analytics to understand engagement","Credibility through transparent, readable URLs","SEO-friendly descriptive URLs"],gradient:"from-blue-500 to-cyan-500"},{icon:W0,title:"For Content Creators",benefits:["Easy sharing with one simple link format","Get your own domain FREE to manage all your links","Audience insights through click tracking","Flexibility to add any platform","Customization to match your brand identity","Cross-platform promotion with hub link","Engagement tracking to focus content strategy"],gradient:"from-green-500 to-emerald-500"},{icon:Tc,title:"For Developers",benefits:["Open source - full access to source code","Modern stack (React, Node.js, MongoDB)","Well documented with comprehensive examples","Active development and regular updates","Learning resource with best practices","Growing community of developers"],gradient:"from-orange-500 to-red-500"},{icon:e1,title:"For Students & Job Seekers",benefits:["Professional links that stand out on resumes","Get your own domain FREE to build your brand identity","Easy management - update once, changes everywhere","Analytics to see which platforms recruiters visit","Free forever - no subscription fees","Privacy control - no third-party tracking"],gradient:"from-pink-500 to-rose-500"},{icon:Jx,title:"Centralized Link Management",description:"Imagine you've shared your LinkedIn link in 10+ places. If your account gets banned or you change usernames, update the destination URL once in All in1 url, and all your shared links automatically redirect to the new URL.",example:"Update once → All links update automatically",gradient:"from-indigo-500 to-purple-500"},{icon:fr,title:"No Expiration - Links Work Forever",description:"Unlike many link shorteners that expire links or require premium subscriptions, All in1 url links work forever. As long as you maintain your account, your links remain active with no expiration dates.",gradient:"from-cyan-500 to-blue-500"},{icon:DU,title:"Platform Flexibility",description:"Not limited to popular platforms! Add any platform you use: Social Media (LinkedIn, Instagram, Facebook, Twitter), Professional (GitHub, Portfolio, Resume), Coding Platforms (LeetCode, Codeforces), Creative (Behance, Dribbble), or any custom platform with a URL.",gradient:"from-yellow-500 to-orange-500"}];return l.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-100 via-lime-100 to-slate-100 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:[l.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 md:pt-28 pb-12 md:pb-20",children:[l.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12 md:mb-16",children:[l.jsx(k.h1,{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-4 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.2},children:"Benefits"}),l.jsx(k.p,{className:"text-lg md:text-xl text-gray-600 dark:text-gray-400 max-w-3xl mx-auto",initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.4},children:"Discover the advantages of using All in1 url for your social media presence"})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8",children:e.map((t,r)=>{const n=t.icon;return l.jsxs(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:r*.1},whileHover:{scale:1.02,y:-5},className:"relative bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8 overflow-hidden group",children:[l.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${t.gradient} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsx("div",{className:"relative z-10 mb-4",children:l.jsx("div",{className:`inline-flex p-3 rounded-xl bg-gradient-to-r ${t.gradient} text-white`,children:l.jsx(n,{className:"w-6 h-6"})})}),l.jsxs("div",{className:"relative z-10",children:[l.jsx("h3",{className:"text-xl md:text-2xl font-bold mb-3 text-gray-900 dark:text-white",children:t.title}),t.description&&l.jsx("p",{className:"text-sm md:text-base text-gray-600 dark:text-gray-400 leading-relaxed mb-3",children:t.description}),t.example&&l.jsx("div",{className:"mt-4 p-3 bg-gray-100 dark:bg-gray-700/50 rounded-lg",children:l.jsx("p",{className:"text-xs md:text-sm font-mono text-gray-700 dark:text-gray-300 whitespace-pre-line",children:t.example})}),t.benefits&&l.jsx("ul",{className:"mt-4 space-y-2",children:t.benefits.map((a,i)=>l.jsxs("li",{className:"flex items-start gap-2 text-sm md:text-base text-gray-600 dark:text-gray-400",children:[l.jsx(fr,{className:"w-4 h-4 mt-1 text-green-500 flex-shrink-0"}),l.jsx("span",{children:a})]},i))})]})]},t.title)})})]}),l.jsx(Mi,{})]})},kce=()=>{const e=[{icon:er,title:"Link Privacy Controls",description:"Control who can access your links with three visibility levels:",levels:[{name:"Public Links",description:"Fully visible and accessible everywhere",features:["Visible in link hub (/username)","Visible in profile preview","Visible in user search results","Accessible via direct URL","No password required"],color:"from-green-500 to-emerald-500"},{name:"Unlisted Links",description:"Hidden from hub but visible in profile preview",features:["NOT visible in link hub","Visible in profile preview","Accessible via direct URL","No password required","Perfect for 100+ links without cluttering hub"],color:"from-yellow-500 to-orange-500"},{name:"Private Links",description:"Completely hidden - require password to access",features:["NOT visible in profile preview","NOT visible in link hub","NOT visible in search results","Only accessible via direct URL with password","Secure password verification with bcrypt"],color:"from-red-500 to-pink-500"}]},{icon:RU,title:"Password Protection",description:"Secure your sensitive links with password protection. When someone visits a private link, they see a password prompt page. After successful verification, users are automatically redirected to the destination URL.",features:["Secure password verification with bcrypt hashing","Direct redirection after successful verification","Secure encoding (Base64) for username and source","User-friendly error messages for incorrect passwords","Click tracking still works for private links"],gradient:"from-purple-500 to-pink-500"},{icon:So,title:"Profile Privacy Settings",description:"Granular control over what information is visible in your public profile. Each setting can be toggled independently:",settings:["Profile visibility (public/private)","Search visibility (enable/disable)","Email address visibility","Location visibility","Bio visibility","Passion visibility","Profile image visibility","Link count display","Click statistics display"],gradient:"from-blue-500 to-cyan-500"},{icon:YU,title:"Hide Your Profile",description:"Make your profile completely private. When set to private:",features:["Profile only accessible if you share the direct link","Not visible in user search results","All content respects privacy settings","You can still preview your own profile","Full control over discoverability"],gradient:"from-indigo-500 to-purple-500"},{icon:bi,title:"Security Features",description:"All in1 url implements industry-standard security measures:",features:["JWT Authentication - Secure token-based authentication","Password Hashing - Bcrypt encryption for passwords","HTTPS Encryption - All data transmitted securely","Cookie-based Sessions - Secure session management","Helmet.js Protection - Security headers to prevent attacks","CORS Configuration - Controlled cross-origin access","Input Validation - Client and server-side validation","SQL Injection Prevention - Using parameterized queries"],gradient:"from-green-500 to-emerald-500"},{icon:Ic,title:"Privacy First",description:"Your data is yours",features:["No Tracking Scripts - No Google Analytics or third-party trackers","No Data Selling - Your data is yours","Open Source - Transparent code you can audit","User Control - You control your data and links","Secure Storage - All data stored securely"],gradient:"from-orange-500 to-red-500"}];return l.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-100 via-lime-100 to-slate-100 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:[l.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 md:pt-28 pb-12 md:pb-20",children:[l.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12 md:mb-16",children:[l.jsx(k.h1,{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-4 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.2},children:"Security & Privacy"}),l.jsx(k.p,{className:"text-lg md:text-xl text-gray-600 dark:text-gray-400 max-w-3xl mx-auto",initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.4},children:"Learn how to protect your links, secure your profile, and maintain your privacy. Get your own domain FREE to manage everything professionally and reflect your brand identity securely."})]}),l.jsx("div",{className:"space-y-8 md:space-y-12",children:e.map((t,r)=>{const n=t.icon;return l.jsxs(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:r*.1},className:"relative bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8 overflow-hidden",children:[l.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[l.jsx("div",{className:`inline-flex p-3 rounded-xl bg-gradient-to-r ${t.gradient||"from-purple-500 to-pink-500"} text-white`,children:l.jsx(n,{className:"w-6 h-6"})}),l.jsx("h3",{className:"text-2xl md:text-3xl font-bold text-gray-900 dark:text-white",children:t.title})]}),l.jsx("p",{className:"text-base md:text-lg text-gray-600 dark:text-gray-400 mb-6",children:t.description}),t.levels&&l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-6",children:t.levels.map((a,i)=>l.jsxs(k.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4,delay:r*.1+i*.1},className:`p-4 rounded-xl bg-gradient-to-br ${a.color} bg-opacity-10 border border-gray-200 dark:border-gray-700`,children:[l.jsx("h4",{className:"font-bold text-lg mb-2 text-gray-900 dark:text-white",children:a.name}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:a.description}),l.jsx("ul",{className:"space-y-1.5",children:a.features.map((o,s)=>l.jsxs("li",{className:"flex items-start gap-2 text-xs md:text-sm text-gray-700 dark:text-gray-300",children:[l.jsx(fr,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),l.jsx("span",{children:o})]},s))})]},a.name))}),t.features&&l.jsx("ul",{className:"space-y-2",children:t.features.map((a,i)=>l.jsxs("li",{className:"flex items-start gap-2 text-sm md:text-base text-gray-600 dark:text-gray-400",children:[l.jsx(fr,{className:"w-4 h-4 mt-1 text-green-500 flex-shrink-0"}),l.jsx("span",{children:a})]},i))}),t.settings&&l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:t.settings.map((a,i)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm md:text-base text-gray-600 dark:text-gray-400",children:[l.jsx(fr,{className:"w-4 h-4 text-green-500 flex-shrink-0"}),l.jsx("span",{children:a})]},i))})]},t.title)})})]}),l.jsx(Mi,{})]})},jce=()=>{const e=[{icon:GU,title:"1. Register",description:"Create your account to get started",details:["Visit the signup page","Enter your email address","Choose a short, memorable username (this becomes your FREE domain like username.allin1url.in)","Get your own domain FREE to reflect your brand identity","Create a strong password","Click 'Sign Up' to create your account"],gradient:"from-purple-500 to-pink-500"},{icon:No,title:"2. Verify Your Email",description:"Verify your email address to activate your account",details:["Check your email inbox for verification code","Enter the OTP (One-Time Password) sent to your email","Click 'Verify' to complete email verification","Your account will be activated after verification"],gradient:"from-blue-500 to-cyan-500"},{icon:FU,title:"3. Login",description:"Sign in to access your dashboard",details:["Enter your username or email","Enter your password","Click 'Sign In' to access your account","You'll be redirected to your dashboard"],gradient:"from-green-500 to-emerald-500"},{icon:Ge,title:"4. Generate Links",description:"Create personalized links for your platforms using your own domain",details:["Go to the 'Links' page from navigation","Click 'Add New Link' or 'Create Bridge'","Enter platform name (e.g., 'LinkedIn', 'GitHub', 'Portfolio')","Enter the destination URL (the actual link to your profile)","Get your own domain FREE to manage all your links professionally","Click 'Create' to generate your personalized link","Your professional link will be: allin1url.in/yourusername/platformname"],gradient:"from-orange-500 to-red-500"},{icon:er,title:"5. Secure Links",description:"Set privacy and visibility for your links",details:["Click the lock icon on any link card","Choose visibility level:"," • Public: Visible everywhere (hub, profile, search)"," • Unlisted: Visible in profile only, not in hub"," • Private: Hidden everywhere, password-protected","For private links, set a password when prompted","Save your settings"],gradient:"from-pink-500 to-rose-500"},{icon:I3,title:"6. Share LinkHub",description:"Share your main hub link that reflects your brand identity",details:["Your professional hub link is: yourusername.allin1url.in","Get your own domain FREE to manage all your links professionally","This link acts as a beautiful landing page for all your profiles","Share it on:"," • Business cards"," • Email signatures"," • Resumes"," • Social media bios"," • Portfolio websites","Visitors can browse and choose which platform to visit"],gradient:"from-indigo-500 to-purple-500"},{icon:I3,title:"7. Share Particular Links",description:"Share individual platform links when needed",details:["Each platform has its own link: allin1url.in/yourusername/platformname","Share specific links when you want to direct someone to a particular profile","Examples:"," • Share LinkedIn link in job applications"," • Share GitHub link in developer communities"," • Share Portfolio link in client proposals","All links automatically redirect to your current destination URL"],gradient:"from-cyan-500 to-blue-500"}];return l.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-100 via-lime-100 to-slate-100 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:[l.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 md:pt-28 pb-12 md:pb-20",children:[l.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12 md:mb-16",children:[l.jsx(k.h1,{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-4 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.2},children:"How to Use"}),l.jsx(k.p,{className:"text-lg md:text-xl text-gray-600 dark:text-gray-400 max-w-3xl mx-auto",initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.4},children:"Step-by-step guide to get started with All in1 url"})]}),l.jsx("div",{className:"max-w-4xl mx-auto space-y-6 md:space-y-8",children:e.map((t,r)=>{const n=t.icon;return l.jsxs(k.div,{initial:{opacity:0,x:r%2===0?-50:50},animate:{opacity:1,x:0},transition:{duration:.6,delay:r*.1},whileHover:{scale:1.02},className:"relative bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8 overflow-hidden group",children:[l.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${t.gradient} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsxs("div",{className:"relative z-10 flex items-start gap-4 md:gap-6",children:[l.jsx("div",{className:`flex-shrink-0 inline-flex p-4 rounded-xl bg-gradient-to-r ${t.gradient} text-white`,children:l.jsx(n,{className:"w-6 h-6 md:w-8 md:h-8"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h3",{className:"text-xl md:text-2xl font-bold mb-2 text-gray-900 dark:text-white",children:t.title}),l.jsx("p",{className:"text-base md:text-lg text-gray-600 dark:text-gray-400 mb-4",children:t.description}),l.jsx("ul",{className:"space-y-2",children:t.details.map((a,i)=>l.jsxs(k.li,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.4,delay:r*.1+i*.05},className:"flex items-start gap-2 text-sm md:text-base text-gray-700 dark:text-gray-300",children:[l.jsx(fr,{className:"w-4 h-4 mt-1 text-green-500 flex-shrink-0"}),l.jsx("span",{className:a.startsWith(" •")?"ml-4":"",children:a})]},i))})]})]}),r{const e=[{platform:"All in1 url",features:["Human-readable, memorable links","Never expires","Centralized management","Built-in analytics","Free and open source","Link privacy controls","Password protection","User search","Granular privacy settings","Customizable email notifications"],color:"from-purple-500 to-pink-500",icon:_c},{platform:"Link Shorteners (bit.ly, tinyurl)",features:["Random codes","Often expires","Must update each link","Limited or premium analytics","Often requires paid plans","No privacy controls","No password protection","No user search","No privacy settings","No notifications"],color:"from-gray-400 to-gray-600",icon:xa},{platform:"Linktree",features:["Platform-dependent branding","Usually permanent","Centralized management","Premium analytics","Premium features locked","Limited privacy controls","Premium password protection","Limited search","Limited privacy settings","Premium notifications"],color:"from-green-400 to-green-600",icon:lo},{platform:"Bio.link",features:["Platform-dependent branding","Usually permanent","Centralized management","Premium analytics","Premium features locked","Limited privacy controls","Premium password protection","Limited search","Limited privacy settings","Premium notifications"],color:"from-blue-400 to-blue-600",icon:lo}],t=[{icon:_c,title:"Brand Identity",description:"Your links become part of your brand identity, not generic shortened URLs. When someone sees 'yourname.allin1url.in/linkedin', they immediately know it's your link and can easily remember the pattern for other platforms.",gradient:"from-purple-500 to-pink-500"},{icon:Po,title:"User Trust",description:"Transparent, readable URLs build more trust than mysterious short codes. Users can see where the link will take them before clicking, reducing phishing concerns.",gradient:"from-blue-500 to-cyan-500"},{icon:Tc,title:"SEO Friendly",description:"Descriptive URLs are better for search engines (better indexing), social media previews (richer link previews), email clients (clear link text), and screen readers (better accessibility).",gradient:"from-green-500 to-emerald-500"},{icon:er,title:"No Vendor Lock-in",description:"Open source means you can self-host if needed, you're not dependent on a single service, you can customize to your needs, and the community can improve and maintain it.",gradient:"from-orange-500 to-red-500"},{icon:Po,title:"Community Driven",description:"Built by developers, for developers: active community support, regular updates and improvements, open to contributions, and transparent development process.",gradient:"from-pink-500 to-rose-500"},{icon:IU,title:"Cost Effective",description:"All in1 url is free forever and open source. Compare to Linktree Pro ($6-24/month), Bio.link Pro ($3-9/month), or Custom Domain Services ($10-50+/month + setup fees).",gradient:"from-indigo-500 to-purple-500"},{icon:er,title:"Privacy First",description:"No tracking scripts, no third-party analytics, no data selling, open source (auditable), and user-controlled data.",gradient:"from-cyan-500 to-blue-500"},{icon:Tc,title:"Flexibility",description:"Add any platform (not limited to predefined list), custom platform names, full control over link structure, and no restrictions on number of links.",gradient:"from-yellow-500 to-orange-500"}];return l.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-100 via-lime-100 to-slate-100 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:[l.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 md:pt-28 pb-12 md:pb-20",children:[l.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12 md:mb-16",children:[l.jsx(k.h1,{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-4 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.2},children:"How It's Different"}),l.jsx(k.p,{className:"text-lg md:text-xl text-gray-600 dark:text-gray-400 max-w-3xl mx-auto",initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.4},children:"See how All in1 url compares to other platforms and why it's superior"})]}),l.jsx(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"mb-16 overflow-x-auto",children:l.jsx("div",{className:"min-w-full inline-block",children:l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 md:gap-6",children:e.map((r,n)=>{const a=r.icon;return l.jsxs(k.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4,delay:n*.1},className:`relative bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-4 md:p-6 overflow-hidden ${n===0?"ring-2 ring-purple-500":""}`,children:[l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx("div",{className:`inline-flex p-2 rounded-lg bg-gradient-to-r ${r.color} text-white`,children:l.jsx(a,{className:"w-4 h-4"})}),l.jsx("h3",{className:"text-sm md:text-base font-bold text-gray-900 dark:text-white",children:r.platform})]}),l.jsx("ul",{className:"space-y-2",children:r.features.map((i,o)=>l.jsxs("li",{className:"flex items-start gap-2 text-xs md:text-sm text-gray-600 dark:text-gray-400",children:[n===0?l.jsx(lo,{className:"w-3 h-3 mt-0.5 text-green-500 flex-shrink-0"}):l.jsx("span",{className:"w-3 h-3 mt-0.5 flex-shrink-0",children:"•"}),l.jsx("span",{children:i})]},o))})]},r.platform)})})})}),l.jsxs(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-8 md:mb-12 text-gray-900 dark:text-white",children:"Why All in1 url is Superior"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8",children:t.map((r,n)=>{const a=r.icon;return l.jsxs(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:n*.1},whileHover:{scale:1.02,y:-5},className:"relative bg-white/80 dark:bg-gray-800/80 backdrop-blur-xl rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-6 md:p-8 overflow-hidden group",children:[l.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${r.gradient} opacity-0 group-hover:opacity-10 transition-opacity duration-300`}),l.jsx("div",{className:"relative z-10 mb-4",children:l.jsx("div",{className:`inline-flex p-3 rounded-xl bg-gradient-to-r ${r.gradient} text-white`,children:l.jsx(a,{className:"w-6 h-6"})})}),l.jsxs("div",{className:"relative z-10",children:[l.jsx("h3",{className:"text-xl md:text-2xl font-bold mb-3 text-gray-900 dark:text-white",children:r.title}),l.jsx("p",{className:"text-sm md:text-base text-gray-600 dark:text-gray-400 leading-relaxed",children:r.description})]})]},r.title)})})]})]}),l.jsx(Mi,{})]})},Sce=()=>{const{username:e}=we(_=>_.admin.user),t=we(_=>_.page.darkMode),[r,n]=m.useState([]),[a,i]=m.useState([]),[o,s]=m.useState(!0),[c,u]=m.useState(""),[d,f]=m.useState("all"),[p,h]=m.useState(!1),[g,x]=m.useState(null),[v,y]=m.useState(""),[b,w]=m.useState(""),j=[...new Set(r.map(_=>_.linkId))].map(_=>{const L=r.find(I=>I.linkId===_);return{id:_,title:L.linkSource||"Unknown Link",shortUrl:`/${L.linkSource||"unknown"}`}}),N=r.length,S=new Set(r.map(_=>{var L;return(L=_.location)==null?void 0:L.ipAddress}).filter(_=>_)).size,P=r.reduce((_,L)=>{var I;return(I=L.location)!=null&&I.country&&(_[L.location.country]=(_[L.location.country]||0)+1),_},{}),C=Object.keys(P).sort((_,L)=>P[L]-P[_])[0]||"N/A",M=async()=>{try{s(!0);const _=await be.post("/analytics/click-details-v1",{username:e});if(_.data.success){const L=_.data.data;n(L),i(L)}}catch(_){console.error("Error fetching click details:",_)}finally{s(!1)}},T=async _=>{try{await be.post("/analytics/mark-read",{clickId:_}),n(L=>L.map(I=>I._id===_?{...I,seen:!0}:I)),i(L=>L.map(I=>I._id===_?{...I,seen:!0}:I))}catch(L){console.error("Error marking notification as read:",L)}};m.useEffect(()=>{e&&M()},[e]),m.useEffect(()=>{let _=r;d!=="all"&&(_=_.filter(L=>L.linkId===d)),c&&(_=_.filter(L=>L.linkSource.toLowerCase().includes(c.toLowerCase())||L.location.city.toLowerCase().includes(c.toLowerCase())||L.location.country.toLowerCase().includes(c.toLowerCase())||L.device.type.toLowerCase().includes(c.toLowerCase())||L.browser.name.toLowerCase().includes(c.toLowerCase())||L.os.name.toLowerCase().includes(c.toLowerCase()))),(v||b)&&(_=_.filter(L=>{const I=new Date(L.clickDate),B=v?new Date(v):null,V=b?new Date(b):null;return V&&V.setHours(23,59,59,999),!(B&&IV)})),i(_)},[d,c,v,b,r]);const A=_=>{switch(_){case"mobile":return l.jsx(U0,{className:"w-4 h-4"});case"desktop":return l.jsx(aa,{className:"w-4 h-4"});case"tablet":return l.jsx(WU,{className:"w-4 h-4"});default:return l.jsx(aa,{className:"w-4 h-4"})}},E=_=>{const L=new Date,I=new Date(_),B=L-I,V=Math.floor(B/6e4),O=Math.floor(B/36e5),R=Math.floor(B/864e5);return V<1?"Just now":V<60?`${V}m ago`:O<24?`${O}h ago`:R<7?`${R}d ago`:I.toLocaleDateString("en-IN",{month:"short",day:"numeric"})};return o?l.jsx("div",{className:`min-h-screen flex items-center justify-center p-8 ${t?"bg-gray-900":"bg-gray-50"}`,children:l.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[l.jsx("div",{className:"w-12 h-12 border-4 border-purple-500/30 border-t-purple-500 rounded-full animate-spin"}),l.jsx("p",{className:`text-gray-400 ${t?"":"text-gray-600"}`,children:"Loading click details..."})]})}):l.jsx("div",{className:`min-h-screen ${t?"bg-gray-800 text-white":"bg-gray-100 text-gray-900"}`,children:l.jsxs("div",{className:"max-w-7xl mx-auto p-6",children:[l.jsxs("div",{className:`backdrop-blur-sm rounded-xl shadow-xl p-6 mb-6 border ${t?"bg-gray-800/50 border-gray-700/50":"bg-white border-gray-200"}`,children:[l.jsx("div",{className:"flex items-center justify-between mb-6",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-3 bg-gradient-to-r from-purple-500/20 to-pink-500/20 rounded-xl border border-purple-500/30",children:l.jsx(co,{className:"w-6 h-6 text-purple-400"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold bg-gradient-to-r from-purple-400 to-pink-400 bg-clip-text text-transparent",children:"Click Analytics"}),l.jsx("p",{className:"text-sm text-gray-400",children:"Detailed view of all link clicks"})]})]})}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4",children:[l.jsxs("div",{className:`p-2 rounded-lg border ${t?"bg-gray-700/30 border-gray-600/50":"bg-gray-100 border-gray-300"}`,children:[l.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[l.jsx(st,{className:"w-4 h-4 text-purple-400"}),l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Total Clicks"})]}),l.jsx("p",{className:`text-xl font-bold ${t?"text-white":"text-gray-900"}`,children:N})]}),l.jsxs("div",{className:`p-2 rounded-lg border ${t?"bg-gray-700/30 border-gray-600/50":"bg-gray-100 border-gray-300"}`,children:[l.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[l.jsx(Po,{className:"w-4 h-4 text-pink-400"}),l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Unique Visitors"})]}),l.jsx("p",{className:`text-xl font-bold ${t?"text-white":"text-gray-900"}`,children:S})]}),l.jsxs("div",{className:`p-2 rounded-lg border ${t?"bg-gray-700/30 border-gray-600/50":"bg-gray-100 border-gray-300"}`,children:[l.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[l.jsx(cr,{className:"w-4 h-4 text-cyan-400"}),l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Top Country"})]}),l.jsx("p",{className:`text-xl font-bold ${t?"text-white":"text-gray-900"}`,children:C})]})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[l.jsxs("div",{className:"flex-1 relative",children:[l.jsx(nc,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 ${t?"text-gray-400":"text-gray-500"}`}),l.jsx("input",{type:"text",placeholder:"Search by link, location, device, browser...",value:c,onChange:_=>u(_.target.value),className:`w-full pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 placeholder-gray-400 ${t?"bg-gray-700/50 border-gray-600 text-white":"bg-white border-gray-300 text-gray-900"}`}),c&&l.jsx("button",{onClick:()=>u(""),className:`absolute right-3 top-1/2 transform -translate-y-1/2 hover:text-white ${t?"text-gray-400":"text-gray-500"}`,children:l.jsx(xa,{className:"w-5 h-5"})})]}),l.jsxs("button",{onClick:()=>h(!p),className:`px-4 py-2 border rounded-lg transition-colors flex items-center gap-2 ${t?"bg-gray-700/50 border-gray-600 hover:bg-gray-700 text-white":"bg-white border-gray-300 hover:bg-gray-100 text-gray-900"}`,children:[l.jsx(LU,{className:"w-4 h-4"}),"Filter by Link",l.jsx(Oc,{className:`w-4 h-4 transition-transform ${p?"rotate-180":""}`})]})]}),p&&l.jsxs("div",{className:`mt-4 p-4 rounded-lg border ${t?"bg-gray-700/30 border-gray-600/50":"bg-gray-100 border-gray-300"}`,children:[l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsxs("button",{onClick:()=>f("all"),className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${d==="all"?"bg-gradient-to-r from-purple-500 to-pink-500 text-white shadow-lg shadow-purple-500/50":t?"bg-gray-700/50 text-gray-300 hover:bg-gray-700 border border-gray-600":"bg-white text-gray-700 hover:bg-gray-200 border border-gray-300"}`,children:["All Links (",r.length,")"]}),j.map(_=>l.jsxs("button",{onClick:()=>f(_.id),className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${d===_.id?"bg-gradient-to-r from-purple-500 to-pink-500 text-white shadow-lg shadow-purple-500/50":t?"bg-gray-700/50 text-gray-300 hover:bg-gray-700 border border-gray-600":"bg-white text-gray-700 hover:bg-gray-200 border border-gray-300"}`,children:[_.title," (",r.filter(L=>L.linkId===_.id).length,")"]},_.id))]}),l.jsxs("div",{className:"mt-4 grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:`block text-sm mb-2 ${t?"text-gray-400":"text-gray-600"}`,children:"Start Date"}),l.jsx("input",{type:"date",value:v,onChange:_=>y(_.target.value),className:`w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 ${t?"bg-gray-700/50 border-gray-600 text-white":"bg-white border-gray-300 text-gray-900"}`})]}),l.jsxs("div",{children:[l.jsx("label",{className:`block text-sm mb-2 ${t?"text-gray-400":"text-gray-600"}`,children:"End Date"}),l.jsx("input",{type:"date",value:b,onChange:_=>w(_.target.value),className:`w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 ${t?"bg-gray-700/50 border-gray-600 text-white":"bg-white border-gray-300 text-gray-900"}`})]})]}),(d!=="all"||c||v||b)&&l.jsx("div",{className:"mt-4 flex justify-end",children:l.jsx("button",{onClick:()=>{f("all"),u(""),y(""),w("")},className:`px-4 py-2 rounded-lg transition-colors text-sm ${t?"bg-gray-600 hover:bg-gray-500 text-white":"bg-gray-500 hover:bg-gray-600 text-white"}`,children:"Clear All Filters"})})]})]}),l.jsx("div",{className:"mb-4",children:l.jsxs("p",{className:`text-sm ${t?"text-gray-400":"text-gray-600"}`,children:["Showing ",a.length," of ",r.length," clicks"]})}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsx("div",{className:"max-h-[800px] overflow-y-auto space-y-3 pr-2 scrollbar-thin scrollbar-thumb-gray-600 scrollbar-track-gray-800",children:a.length===0?l.jsxs("div",{className:`backdrop-blur-sm rounded-xl shadow-xl p-12 text-center border ${t?"bg-gray-800/50 border-gray-700/50":"bg-white border-gray-200"}`,children:[l.jsx(co,{className:`w-16 h-16 mx-auto mb-4 ${t?"text-gray-600":"text-gray-400"}`}),l.jsx("h3",{className:`text-lg font-semibold mb-2 ${t?"text-white":"text-gray-900"}`,children:"No clicks found"}),l.jsx("p",{className:`text-gray-400 ${t?"":"text-gray-600"}`,children:"Try adjusting your filters or search query"})]}):a.map(_=>l.jsx("div",{onClick:()=>{x(_),_.seen||T(_._id)},className:`p-4 rounded-xl cursor-pointer transition-all duration-200 ${(g==null?void 0:g._id)===_._id?"bg-gradient-to-r from-purple-500/20 to-pink-500/20 border-2 border-purple-500/50 shadow-lg shadow-purple-500/20":t?"bg-gray-800/50 hover:bg-gray-800/70 border border-gray-700/50":"bg-white hover:bg-gray-50 border border-gray-200"}`,children:l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-lg bg-gradient-to-r from-purple-500/20 to-pink-500/20 flex items-center justify-center border border-purple-500/30",children:A(_.device.type)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[l.jsxs("div",{children:[l.jsxs("h3",{className:`font-semibold text-sm mb-1 flex items-center gap-2 ${t?"text-white":"text-gray-900"}`,children:[_.linkSource||"Unknown Link",!_.seen&&l.jsx("span",{className:"px-2 py-0.5 rounded-full bg-purple-500/20 text-purple-300 text-xs border border-purple-400/30",children:"New"})]}),l.jsxs("p",{className:`text-xs flex items-center gap-1 ${t?"text-gray-400":"text-gray-600"}`,children:[l.jsx(Ge,{className:"w-3 h-3"}),_.linkDestination||"linkhub"]})]}),l.jsx("span",{className:`text-xs whitespace-nowrap ${t?"text-gray-500":"text-gray-600"}`,children:E(_.clickDate)})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[l.jsxs("div",{className:`flex items-center gap-1 ${t?"text-gray-400":"text-gray-600"}`,children:[l.jsx(ci,{className:"w-3 h-3"}),l.jsxs("span",{children:[_.location.city,", ",_.location.country]})]}),l.jsxs("div",{className:`flex items-center gap-1 ${t?"text-gray-400":"text-gray-600"}`,children:[l.jsx(aa,{className:"w-3 h-3"}),l.jsxs("span",{children:[_.device.type," • ",_.os.name]})]}),l.jsxs("div",{className:`flex items-center gap-1 ${t?"text-gray-400":"text-gray-600"}`,children:[l.jsx(T3,{className:"w-3 h-3"}),l.jsx("span",{children:_.browser.name})]}),l.jsxs("div",{className:`flex items-center gap-1 ${t?"text-gray-400":"text-gray-600"}`,children:[l.jsx(cr,{className:"w-3 h-3"}),l.jsx("span",{className:"truncate",children:_.referrer&&_.referrer!=="direct"?(()=>{try{return new URL(_.referrer).hostname}catch{return _.referrer}})():"Direct"})]})]})]})]})},_._id))})}),l.jsx("div",{className:"lg:col-span-1",children:g?l.jsxs("div",{className:`backdrop-blur-sm rounded-xl shadow-xl p-6 border sticky top-6 ${t?"bg-gray-800/50 border-gray-700/50":"bg-white border-gray-200"}`,children:[l.jsxs("h2",{className:`text-lg font-bold mb-4 flex items-center gap-2 ${t?"text-white":"text-gray-900"}`,children:[l.jsx(Lr,{className:"w-5 h-5 text-purple-400"}),"Click Details"]}),l.jsxs("div",{className:`mb-6 p-4 rounded-lg border ${t?"bg-gray-700/30 border-gray-600/50":"bg-gray-100 border-gray-300"}`,children:[l.jsx("h3",{className:`text-sm font-semibold mb-2 ${t?"text-gray-300":"text-gray-700"}`,children:"Link"}),l.jsx("p",{className:`font-medium mb-1 ${t?"text-white":"text-gray-900"}`,children:g.linkSource||"Unknown Link"}),l.jsx("p",{className:`text-xs mb-2 ${t?"text-gray-400":"text-gray-600"}`,children:g.linkDestination||"linkhub"}),l.jsxs("a",{href:g.linkDestination||"#",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-purple-400 hover:text-purple-300 flex items-center gap-1",children:["View destination",l.jsx(Ls,{className:"w-3 h-3"})]})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:`text-sm font-semibold mb-3 ${t?"text-gray-300":"text-gray-700"}`,children:"Timestamp"}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Date"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.clickedTime.date})]}),l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Time"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.clickedTime.time})]}),l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Timezone"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.clickedTime.timezone})]})]})]}),l.jsxs("div",{className:"mb-6",children:[l.jsxs("h3",{className:`text-sm font-semibold mb-3 flex items-center gap-2 ${t?"text-gray-300":"text-gray-700"}`,children:[l.jsx(ci,{className:"w-4 h-4 text-purple-400"}),"Location"]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Country"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.location.country})]}),l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"City"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.location.city})]}),l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Region"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.location.region})]}),l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"IP Address"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.location.ipAddress})]})]})]}),l.jsxs("div",{className:"mb-6",children:[l.jsxs("h3",{className:`text-sm font-semibold mb-3 flex items-center gap-2 ${t?"text-gray-300":"text-gray-700"}`,children:[A(g.device.type),l.jsx("span",{className:"text-purple-400",children:"Device"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Type"}),l.jsx("span",{className:`text-xs font-medium capitalize ${t?"text-white":"text-gray-900"}`,children:g.device.type})]}),g.device.brand&&l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Brand"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.device.brand})]}),g.device.model&&l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Model"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.device.model})]})]})]}),l.jsxs("div",{className:"mb-6",children:[l.jsxs("h3",{className:`text-sm font-semibold mb-3 flex items-center gap-2 ${t?"text-gray-300":"text-gray-700"}`,children:[l.jsx(aa,{className:"w-4 h-4 text-purple-400"}),"Operating System"]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Name"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.os.name})]}),l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Version"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.os.version})]})]})]}),l.jsxs("div",{className:"mb-6",children:[l.jsxs("h3",{className:`text-sm font-semibold mb-3 flex items-center gap-2 ${t?"text-gray-300":"text-gray-700"}`,children:[l.jsx(T3,{className:"w-4 h-4 text-purple-400"}),"Browser"]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Name"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.browser.name})]}),l.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-gray-700/30":"bg-gray-100"}`,children:[l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Version"}),l.jsx("span",{className:`text-xs font-medium ${t?"text-white":"text-gray-900"}`,children:g.browser.version})]})]})]}),l.jsxs("div",{className:"mb-6",children:[l.jsxs("h3",{className:`text-sm font-semibold mb-3 flex items-center gap-2 ${t?"text-gray-300":"text-gray-700"}`,children:[l.jsx(cr,{className:"w-4 h-4 text-purple-400"}),"Referrer"]}),l.jsx("div",{className:`p-3 rounded-lg border ${t?"bg-gray-700/30 border-gray-600/50":"bg-gray-100 border-gray-300"}`,children:g.referrer&&g.referrer!=="direct"?(()=>{try{return new URL(g.referrer),l.jsxs("a",{href:g.referrer,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-purple-400 hover:text-purple-300 break-all flex items-center gap-1",children:[g.referrer,l.jsx(Ls,{className:"w-3 h-3 flex-shrink-0"})]})}catch{return l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:g.referrer})}})():l.jsx("span",{className:`text-xs ${t?"text-gray-400":"text-gray-600"}`,children:"Direct Traffic"})})]}),l.jsxs("div",{children:[l.jsx("h3",{className:`text-sm font-semibold mb-3 ${t?"text-gray-300":"text-gray-700"}`,children:"User Agent"}),l.jsx("div",{className:`p-3 rounded-lg border ${t?"bg-gray-700/30 border-gray-600/50":"bg-gray-100 border-gray-300"}`,children:l.jsx("p",{className:`text-xs break-all font-mono ${t?"text-gray-400":"text-gray-600"}`,children:g.userAgent})})]})]}):l.jsxs("div",{className:`backdrop-blur-sm rounded-xl shadow-xl p-12 text-center border sticky top-6 ${t?"bg-gray-800/50 border-gray-700/50":"bg-white border-gray-200"}`,children:[l.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-r from-purple-500/20 to-pink-500/20 flex items-center justify-center border border-purple-500/30",children:l.jsx(co,{className:"w-8 h-8 text-purple-400"})}),l.jsx("h3",{className:`text-lg font-semibold mb-2 ${t?"text-white":"text-gray-900"}`,children:"Select a click"}),l.jsx("p",{className:`text-sm ${t?"text-gray-400":"text-gray-600"}`,children:"Choose a click from the list to view its complete details"})]})})]})]})})};function Pce(){const e=Vr(),t=Oi(),[r,n]=m.useState(!0),a=we(h=>h.admin.isAuthenticated),i=we(h=>h.admin.user),o=we(h=>h.page.darkMode),s=m.useRef(!1),c=({children:h})=>a===!0?h:l.jsx(my,{to:"/login"}),u=({children:h})=>a===!1?h:l.jsx(my,{to:"/home"});if(m.useEffect(()=>{o?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[o]),m.useEffect(()=>{if(s.current)return;const h=async()=>{var x,v,y;try{const b=await be.post("/auth/verify",{},{withCredentials:!0});b.status===200&&b.data.success&&(console.log("User verified!"),t(L0(b.data.user)),t(D0(!0)))}catch(b){console.error(b);const w=((v=(x=b.response)==null?void 0:x.data)==null?void 0:v.message)||"Server Internal Error";t(L0(null)),t(D0(!1)),((y=b.response)==null?void 0:y.status)!==401&&J.error(w)}finally{n(!1),s.current=!0}},g=async x=>{var v,y,b;try{const w=await be.post("/source/getallsource",{username:x},{withCredentials:!0});w.status===200&&w.data.success&&t(xi(w.data.sources))}catch(w){console.log(w);const j=((y=(v=w.response)==null?void 0:v.data)==null?void 0:y.message)||"Server Internal Error";((b=w.response)==null?void 0:b.status)!==401&&J.error(j)}finally{n(!1),s.current=!0}};(async()=>i?await g(i.username):await h())()},[]),r)return l.jsx("div",{className:"flex justify-center items-center h-screen bg-white dark:bg-gray-900",children:l.jsxs("div",{className:"relative flex justify-center items-center",children:[l.jsx("div",{className:"absolute animate-spin rounded-full h-32 w-32 border-t-4 border-b-4 border-purple-500 dark:border-purple-400"}),l.jsx("img",{src:"https://www.svgrepo.com/show/509001/avatar-thinking-9.svg",className:"rounded-full h-28 w-28"})]})});const d=["/","/verify","/verified","/reset_password","/about-developer"],f=e.pathname.startsWith("/docs")||e.pathname==="/doc",p=d.includes(e.pathname)||f;return l.jsxs("div",{className:"pb-1 min-h-screen bg-gradient-to-r from-slate-100 via-lime-100 to-slate-100 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 overflow-hidden transition-colors duration-300",children:[a&&e.pathname!=="/"||!a&&p&&e.pathname!=="/login"?l.jsx(HH,{}):null,l.jsxs(iU,{children:[l.jsx(rt,{path:"/doc",element:l.jsx(iW,{})}),l.jsx(rt,{path:"/docs/features",element:l.jsx(bce,{})}),l.jsx(rt,{path:"/docs/benefits",element:l.jsx(wce,{})}),l.jsx(rt,{path:"/docs/security",element:l.jsx(kce,{})}),l.jsx(rt,{path:"/docs/how-to-use",element:l.jsx(jce,{})}),l.jsx(rt,{path:"/docs/different",element:l.jsx(Nce,{})}),l.jsx(rt,{path:"/login",element:l.jsx(u,{children:l.jsx(qU,{})})}),l.jsx(rt,{path:"/verify",element:l.jsx(VH,{})}),l.jsx(rt,{path:"/links",element:l.jsx(c,{children:l.jsx(C7,{})})}),l.jsx(rt,{path:"/preview",element:l.jsx(c,{children:l.jsx(zH,{})})}),l.jsx(rt,{path:"/",element:l.jsx(u,{children:l.jsx(xW,{})})}),l.jsx(rt,{path:"/profile",element:l.jsx(c,{children:l.jsx(bW,{})})}),l.jsx(rt,{path:"/profile/:username",element:l.jsx(c,{children:l.jsx(wW,{})})}),l.jsx(rt,{path:"/settings",element:l.jsx(c,{children:l.jsx(kW,{})})}),l.jsx(rt,{path:"/home",element:l.jsx(c,{children:l.jsx(FH,{})})}),l.jsx(rt,{path:"/analytics",element:l.jsx(c,{children:l.jsx(xce,{})})}),l.jsx(rt,{path:"/click-details",element:l.jsx(c,{children:l.jsx(Sce,{})})}),l.jsx(rt,{path:"/verified",element:l.jsx(WH,{})}),l.jsx(rt,{path:"/reset_password",element:l.jsx(XH,{})}),l.jsx(rt,{path:"/about-developer",element:l.jsx(SW,{})}),l.jsx(rt,{path:"*",element:l.jsx(jW,{})})]})]})}const Cce=HP({reducer:{admin:gV,page:tH}});uN(document.getElementById("root")).render(l.jsx(m.StrictMode,{children:l.jsx(PP,{store:Cce,children:l.jsxs(fU,{basename:"/app",children:[l.jsx(Pce,{}),l.jsx(yz,{})]})})})); diff --git a/frontend/dist/assets/logo-jUAiJw4s.png b/frontend/dist/assets/logo-jUAiJw4s.png new file mode 100644 index 0000000..a5c9a2d Binary files /dev/null and b/frontend/dist/assets/logo-jUAiJw4s.png differ diff --git a/frontend/dist/assets/profile-C8dbMkPw.png b/frontend/dist/assets/profile-C8dbMkPw.png new file mode 100644 index 0000000..0307703 Binary files /dev/null and b/frontend/dist/assets/profile-C8dbMkPw.png differ diff --git a/frontend/dist/click.webp b/frontend/dist/click.webp new file mode 100644 index 0000000..fbaf38b Binary files /dev/null and b/frontend/dist/click.webp differ diff --git a/frontend/dist/description.txt b/frontend/dist/description.txt new file mode 100644 index 0000000..dadac9b --- /dev/null +++ b/frontend/dist/description.txt @@ -0,0 +1,14 @@ +if i have to talk about only one project then i ll choose the project All in1 url. there is reason to choose that its complete my own idea and obviously its around of unique. some idea has been taken from link tree. +so lets talk about the working of project and what basically it does. + +the person who is having many social profiles and also there are many hard or long http links they can use this project like influencer, it sector person because they all have contain many type of links like github, linkdin, portfolio, instagram, facebook, and some coding profile like leetcode, codeforces etc. + +there are for major benifit of this project. + +Personalized Smart Links: they can create simple and easy links. actually while creating it follows clear pattern that makes it easy to remeber . ex. server.com/dpkrn/github + +Centralized Link Management: it works as centralized link. how lets talk. lets take a scenerio where you have given your linkdin profile link at 10 places and somehow you have deleted your account or account has been banned. then you will have to update on all the 10th places one by one by your new linkdin account. even there may be chances that you dont remember the places where you have given. but if you are using this application then you have to edit only on my plateform all places automatically get edited. + +Click Tracking: you can also track you visited profile which profile visited how many times. + +and final things its very easy to set up. just one this have to remember keep your username short and easy. because your customized link will be made of your username and plateform. \ No newline at end of file diff --git a/frontend/dist/easy-to-remember.webp b/frontend/dist/easy-to-remember.webp new file mode 100644 index 0000000..c927ed7 Binary files /dev/null and b/frontend/dist/easy-to-remember.webp differ diff --git a/frontend/dist/easysetup.webp b/frontend/dist/easysetup.webp new file mode 100644 index 0000000..3f8a2f0 Binary files /dev/null and b/frontend/dist/easysetup.webp differ diff --git a/frontend/dist/index.html b/frontend/dist/index.html new file mode 100644 index 0000000..60ecf39 --- /dev/null +++ b/frontend/dist/index.html @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + All in1 url - Free Link in Bio Tool | Custom URL Shortener for Social Media + + + + +

+ + diff --git a/frontend/dist/logo.png b/frontend/dist/logo.png new file mode 100644 index 0000000..769ae74 Binary files /dev/null and b/frontend/dist/logo.png differ diff --git a/frontend/dist/panda.png b/frontend/dist/panda.png new file mode 100644 index 0000000..ddc1981 Binary files /dev/null and b/frontend/dist/panda.png differ diff --git a/frontend/dist/profile.jpg b/frontend/dist/profile.jpg new file mode 100644 index 0000000..2144dd9 Binary files /dev/null and b/frontend/dist/profile.jpg differ diff --git a/frontend/dist/robots.txt b/frontend/dist/robots.txt new file mode 100644 index 0000000..a6609ff --- /dev/null +++ b/frontend/dist/robots.txt @@ -0,0 +1,8 @@ +User-agent: Googlebot +Disallow: /nogooglebot/ + +User-agent: * +Allow: / + +# Sitemap (app is under /app/) +Sitemap: https://allin1url.in/app/sitemap.xml \ No newline at end of file diff --git a/frontend/dist/sitemap.xml b/frontend/dist/sitemap.xml new file mode 100644 index 0000000..8d3f5e8 --- /dev/null +++ b/frontend/dist/sitemap.xml @@ -0,0 +1,45 @@ + + + + https://allin1url.in/app/ + 2025-01-29 + weekly + 1.0 + + + https://allin1url.in/app/login + 2025-01-29 + monthly + 0.9 + + + https://allin1url.in/app/doc + 2025-01-29 + monthly + 0.8 + + + https://allin1url.in/app/docs/features + 2025-01-29 + monthly + 0.7 + + + https://allin1url.in/app/docs/benefits + 2025-01-29 + monthly + 0.7 + + + https://allin1url.in/app/docs/how-to-use + 2025-01-29 + monthly + 0.7 + + + https://allin1url.in/app/about-developer + 2025-01-29 + monthly + 0.6 + + diff --git a/frontend/dist/update.webp b/frontend/dist/update.webp new file mode 100644 index 0000000..f53aab2 Binary files /dev/null and b/frontend/dist/update.webp differ diff --git a/frontend/dist/vite.svg b/frontend/dist/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/frontend/dist/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/docs/PAGES.md b/frontend/docs/PAGES.md new file mode 100644 index 0000000..3d29a86 --- /dev/null +++ b/frontend/docs/PAGES.md @@ -0,0 +1,487 @@ +# Frontend Pages Documentation + +This document provides comprehensive information about all pages in the All in1 url frontend application. + +## Table of Contents + +- [Overview](#overview) +- [Page Components](#page-components) +- [Routing](#routing) +- [Design Patterns](#design-patterns) +- [Light & Dark Mode](#light--dark-mode) + +## Overview + +The All in1 url frontend is built with React 18 and uses React Router for navigation. All pages follow consistent design patterns with: +- Animated backgrounds with gradient orbs +- Glassmorphism effects +- Smooth animations using Framer Motion +- Full light and dark mode support +- Responsive design for all screen sizes + +## Page Components + +### 1. HomePage (`/components/pages/HomePage.jsx`) + +**Route**: `/` (public, redirects to `/home` if authenticated) + +**Purpose**: Landing page for unauthenticated users + +**Features**: +- Hero section with call-to-action +- Feature highlights +- Sign up / Login options +- Responsive design +- Animated background + +**Access**: Public (no authentication required) + +--- + +### 2. DashBoard (`/components/DashBoard.jsx`) + +**Route**: `/home` (private, requires authentication) + +**Purpose**: Main dashboard combining multiple components + +**Components Included**: +- Content component (hero section) +- CreateBridge component (link creation form) +- LinkPage component (list of all links) +- Footer component + +**Features**: +- Single-page dashboard experience +- All link management in one place +- Responsive layout + +**Access**: Private (authentication required) + +--- + +### 3. CreateBridge (`/components/pages/CreateBridge.jsx`) + +**Route**: Accessed via `/home` or direct navigation + +**Purpose**: Create and edit personalized links + +**Features**: +- Create new links with platform name and destination URL +- Edit existing links +- Platform change warning modal +- Link preview after creation +- Copy to clipboard functionality +- Form validation +- Loading states +- Full light and dark mode support + +**Key Functionality**: +- **Create Mode**: Add new link with platform and destination +- **Edit Mode**: Modify existing link (shows warning if platform changes) +- **Link Preview**: Shows generated personalized link +- **Copy Button**: Copies link to clipboard (fixed: now has `type="button"`) + +**Form Fields**: +- Platform Name (text input, lowercase) +- Destination URL (URL input) + +**API Endpoints Used**: +- `POST /source/addnewsource` - Create new link +- `POST /source/editlink` - Update existing link + +--- + +### 4. LinkPage (`/components/pages/LinkPage.jsx`) + +**Route**: `/links` (private, requires authentication) + +**Purpose**: Display and manage all user links + +**Features**: +- List of all user links +- Hub link display (main profile link) +- Copy hub link to clipboard +- Create new bridge button +- Stats summary cards (Total Links, Total Clicks, Hub Page) +- Empty state with call-to-action +- Responsive grid layout +- Animated background + +**Components Used**: +- Linkcard component for each link + +**Stats Cards**: +- **Total Links**: Count of all user links +- **Total Clicks**: Sum of clicks across all links +- **Hub Page**: Status indicator (Live) + +**API Endpoints Used**: +- `POST /source/getallsource` - Fetch all user links + +--- + +### 5. Profile (`/components/pages/Profile.jsx`) + +**Route**: `/profile` (private, requires authentication) + +**Purpose**: User profile management and editing + +**Features**: +- Profile picture upload with hover effects +- Edit profile information (name, location, passion, bio) +- Username display +- Stats cards (Total Links, Total Clicks, Hub Page) +- Public profile information section +- Preview button to see public view +- Full light and dark mode support + +**Form Fields**: +- Full Name (text input) +- Location (text input) +- Passion (text input) +- Bio (textarea) + +**Profile Picture**: +- Click to upload new image +- Hover overlay with camera icon +- Loading spinner during upload +- Image validation (type and size) + +**Edit Mode**: +- Toggle between view and edit mode +- Save/Cancel buttons +- Form validation +- Loading states + +**Preview Button**: +- Navigates to `/profile/{username}` to see public view +- Only visible when not in edit mode + +**API Endpoints Used**: +- `POST /profile/getprofileinfo` - Get profile data +- `POST /profile/update` - Update profile information +- `POST /profile/updatepic` - Update profile picture + +--- + +### 6. ProfilePreview (`/components/pages/ProfilePreview.jsx`) + +**Route**: `/profile/:username` (public, no authentication required) + +**Purpose**: Public profile view for visitors + +**Features**: +- Displays profile information based on visibility settings +- Shows only public links (filters out unlisted/private) +- Respects all privacy settings +- Stats display (if enabled in settings) +- Back button for navigation +- Responsive design +- Full light and dark mode support + +**Visibility Controls**: +- Profile image (if `showProfileImage` is true) +- Location (if `showLocation` is true) +- Passion (if `showPassion` is true) +- Bio (if `showBio` is true) +- Link count (if `showLinkCount` is true) +- Click stats (if `showClickStats` is true) + +**Link Display**: +- Only shows links with `visibility: 'public'` +- Links are clickable and open in new tab +- Shows platform name and destination URL +- Visual indicators for link visibility + +**States**: +- **Loading**: Shows spinner while fetching data +- **Protected**: Shows "Profile Protected" message if profile is not public +- **Empty Links**: Shows message if no public links exist + +**API Endpoints Used**: +- `POST /profile/getpublicprofile` - Get public profile data with settings + +--- + +### 7. Settings (`/components/pages/Settings.jsx`) + +**Route**: `/settings` (private, requires authentication) + +**Purpose**: Manage privacy and visibility settings + +**Features**: +- Profile visibility controls +- Link display settings +- Search & discovery settings +- Privacy settings +- Notification settings +- Keyword management for search +- Save settings functionality +- Full light and dark mode support + +**Settings Sections**: + +1. **Profile Visibility**: + - Make Profile Public + - Show in Search Results + - Allow Profile View + - Show Email + - Show Location + - Show Bio + - Show Passion + - Show Profile Image + +2. **Link Display**: + - Show Link Count + - Show Click Statistics + +3. **Search & Discovery**: + - Allow Search + - Show in Featured + - Search Keywords (add/remove) + +4. **Privacy**: + - Show Analytics + - Show Last Updated + - Require Authentication + +5. **Notifications**: + - Email on New Click + - Email on Profile View + - Weekly Report + +**API Endpoints Used**: +- `POST /settings/get` - Get user settings +- `POST /settings/update` - Update user settings + +--- + +### 8. Documentation (`/components/Documentation.jsx`) + +**Route**: `/doc` (public) + +**Purpose**: Application documentation and guides + +**Features**: +- Comprehensive documentation +- Interactive cards and animations +- Feature explanations +- Usage examples +- Responsive design + +**Access**: Public (no authentication required) + +--- + +### 9. AboutDeveloper (`/components/pages/AboutDeveloper.jsx`) + +**Route**: `/about-developer` (public) + +**Purpose**: Information about the developer + +**Features**: +- Developer information +- Social links +- Project information +- Responsive design + +**Access**: Public (no authentication required) + +--- + +### 10. NotFound (`/components/pages/NotFound.jsx`) + +**Route**: `*` (catch-all for 404 errors) + +**Purpose**: 404 error page + +**Features**: +- User-friendly error message +- Navigation options +- Responsive design + +**Access**: Public + +--- + +## Routing + +Routes are defined in `/src/App.jsx`: + +```javascript + + } /> + }/> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + +``` + +### Route Types + +- **Public Routes**: Accessible without authentication + - `/`, `/doc`, `/about-developer`, `/profile/:username`, `/verify`, `/verified`, `/reset_password` + +- **Private Routes**: Require authentication + - `/home`, `/links`, `/profile`, `/settings` + +- **Auth Routes**: Redirect authenticated users + - `/`, `/login` + +--- + +## Design Patterns + +### Common Patterns Across Pages + +1. **Animated Background**: + ```javascript + // Gradient orbs that follow mouse movement + + ``` + +2. **Glassmorphism Cards**: + ```javascript + className="bg-white/80 dark:bg-gray-900/50 backdrop-blur-xl rounded-3xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50" + ``` + +3. **Framer Motion Animations**: + ```javascript + const containerVariants = { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { staggerChildren: 0.1 } + } + }; + ``` + +4. **Loading States**: + - Spinner animations + - Disabled buttons during loading + - Loading text indicators + +5. **Error Handling**: + - Toast notifications for errors + - User-friendly error messages + - Graceful fallbacks + +--- + +## Light & Dark Mode + +All pages support both light and dark modes using Tailwind's `dark:` prefix. + +### Color Scheme + +**Light Mode**: +- Background: `bg-white`, `bg-gray-50` +- Text: `text-gray-900`, `text-gray-700` +- Cards: `bg-white/80`, `bg-white/90` +- Borders: `border-gray-200`, `border-gray-300` + +**Dark Mode**: +- Background: `dark:bg-gray-900`, `dark:bg-gray-800` +- Text: `dark:text-white`, `dark:text-gray-300` +- Cards: `dark:bg-gray-900/50`, `dark:bg-gray-800/50` +- Borders: `dark:border-gray-700`, `dark:border-gray-600` + +### Implementation + +Dark mode is managed via Redux (`store.page.darkMode`) and applied using: +- Tailwind's `dark:` variant +- System preference detection +- Manual toggle in navigation bar +- Persistent storage (localStorage) + +### Best Practices + +1. **Always provide dark mode variants** for all UI elements +2. **Test in both modes** during development +3. **Use semantic colors** (e.g., `text-gray-900 dark:text-white`) +4. **Maintain contrast ratios** for accessibility +5. **Use opacity for overlays** that work in both modes + +--- + +## Component Dependencies + +### Shared Components + +- **Linkcard** (`/components/linkcard/Linkcard.jsx`): Displays individual link cards +- **Nav** (`/components/navbar/Nav.jsx`): Navigation bar with search +- **Footer** (`/components/footer/Footer.jsx`): Site footer +- **Notification** (`/components/notification/Notification.jsx`): Notification system + +### Redux State + +- **userSlice**: User data, links, authentication state +- **pageSlice**: Dark mode, edit link data, sidebar menu + +### API Utilities + +- **api.js** (`/utils/api.js`): Axios instance with base URL and credentials + +--- + +## Responsive Design + +All pages are fully responsive with breakpoints: +- **Mobile**: `< 640px` (sm) +- **Tablet**: `640px - 1024px` (md) +- **Desktop**: `> 1024px` (lg) + +### Mobile Optimizations + +- Search: Icon button on mobile, expands to input +- Navigation: Collapsible menu on mobile +- Forms: Stacked layout on mobile +- Cards: Full width on mobile +- Buttons: Full width or stacked on mobile + +--- + +## Performance Considerations + +1. **Lazy Loading**: Components loaded on demand +2. **Code Splitting**: Route-based code splitting +3. **Image Optimization**: Proper image formats and sizes +4. **Animation Performance**: GPU-accelerated animations +5. **Debouncing**: Search queries debounced (300ms) + +--- + +## Accessibility + +- Semantic HTML elements +- ARIA labels where needed +- Keyboard navigation support +- Focus management +- Color contrast compliance +- Screen reader support + +--- + +## Notes + +- All pages use consistent design language +- Animations enhance UX without being distracting +- Error states are handled gracefully +- Loading states provide user feedback +- Forms have real-time validation +- Toast notifications for user actions diff --git a/frontend/docs/README.md b/frontend/docs/README.md new file mode 100644 index 0000000..268d4c3 --- /dev/null +++ b/frontend/docs/README.md @@ -0,0 +1,59 @@ +# Frontend Documentation + +This directory contains documentation for the All in1 url frontend application. + +## Documentation Files + +- **[PAGES.md](./PAGES.md)** - Comprehensive documentation about all page components, routing, and design patterns +- **[SECTIONS_AND_PAGES.md](./SECTIONS_AND_PAGES.md)** - Detailed documentation about section components, their parameters, and page-by-page structure + +## Quick Reference + +### Page Routes + +| Route | Component | Access | Description | +|-------|-----------|--------|-------------| +| `/` | HomePage | Public | Landing page | +| `/home` | DashBoard | Private | Main dashboard | +| `/links` | LinkPage | Private | All links management | +| `/profile` | Profile | Private | User profile editing | +| `/profile/:username` | ProfilePreview | Public | Public profile view | +| `/settings` | Settings | Private | Privacy & settings | +| `/doc` | Documentation | Public | App documentation | +| `/about-developer` | AboutDeveloper | Public | Developer info | +| `*` | NotFound | Public | 404 page | + +### Key Features + +- **Search**: User search in navigation (responsive: icon on mobile) +- **Profile Management**: Edit profile with preview option +- **Link Management**: Create, edit, delete links with visibility controls +- **Settings**: Comprehensive privacy and visibility controls +- **Dark Mode**: Full support across all pages +- **Responsive**: Mobile-first design + +### Design System + +- **Colors**: Purple, Pink, Blue gradients +- **Effects**: Glassmorphism, backdrop blur +- **Animations**: Framer Motion +- **Icons**: React Icons (Fa, Md) +- **Styling**: Tailwind CSS + +## Development + +### Adding New Pages + +1. Create component in `/components/pages/` +2. Add route in `/src/App.jsx` +3. Update navigation if needed +4. Ensure light/dark mode support +5. Add to this documentation + +### Best Practices + +- Always support light and dark modes +- Use consistent design patterns +- Add loading and error states +- Implement responsive design +- Follow accessibility guidelines diff --git a/frontend/docs/SECTIONS_AND_PAGES.md b/frontend/docs/SECTIONS_AND_PAGES.md new file mode 100644 index 0000000..a6c90d6 --- /dev/null +++ b/frontend/docs/SECTIONS_AND_PAGES.md @@ -0,0 +1,591 @@ +# Sections and Pages Documentation + +This document provides comprehensive information about the page structure, section components, and how they are organized in the All in1 url frontend application. + +## Table of Contents + +1. [Overview](#overview) +2. [Section Components](#section-components) +3. [Page Structure](#page-structure) +4. [Page-by-Page Documentation](#page-by-page-documentation) +5. [Section Parameters Reference](#section-parameters-reference) + +--- + +## Overview + +The frontend is organized with a modular structure where each page has its own folder containing: +- The main page component (e.g., `HomePage.jsx`) +- A `sections/` subfolder containing page-specific section components +- An `index.js` file for easy imports + +### Directory Structure + +``` +frontend/src/components/pages/ +├── HomePage/ +│ ├── HomePage.jsx +│ └── sections/ +│ ├── HeroSection.jsx +│ ├── FeaturesSection.jsx +│ ├── StatisticsSection.jsx +│ ├── BenefitsSection.jsx +│ ├── CTASection.jsx +│ └── index.js +├── Documentation/ +│ ├── Documentation.jsx +│ └── sections/ +│ ├── FeaturesSection.jsx +│ └── index.js +└── [Other pages...] +``` + +--- + +## Section Components + +### 1. HeroSection + +**Location:** `pages/HomePage/sections/HeroSection.jsx` + +**Purpose:** The main hero/landing section with animated background, typewriter effect, and call-to-action buttons. + +**Parameters:** + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| `words` | Array | `[]` | Array of word objects for TypewriterEffect. Each object: `{text: string, className: string}` | +| `flipWords` | Array | `[]` | Array of strings for FlipWords animation (e.g., `["LinkedIn", "GitHub"]`) | +| `description` | String | `""` | Main description text displayed below the heading | +| `highlightText` | String | `""` | Highlighted text shown below description (purple gradient) | +| `ctaText` | String | `"Get Started Free"` | Primary CTA button text | +| `ctaAction` | Function | `null` | Custom function for primary CTA. If null, navigates to `/login` | +| `secondaryCtaText` | String | `"Learn More"` | Secondary CTA button text (optional) | +| `secondaryCtaAction` | Function | `null` | Custom function for secondary CTA. If null, navigates to `/doc` | +| `platforms` | Array | `[]` | Array of platform objects: `{name: string, icon: JSX, color: string}` | +| `showScrollIndicator` | Boolean | `true` | Whether to show the animated scroll indicator | +| `className` | String | `""` | Additional CSS classes | +| `mousePosition` | Object | `{x: 0, y: 0}` | Mouse position for interactive background (percentage: 0-100) | +| `isAuthenticated` | Boolean | `false` | Whether user is authenticated (affects padding) | + +**Example Usage:** +```jsx +, color: "text-blue-600" } + ]} + mousePosition={mousePosition} + isAuthenticated={isAuthenticated} +/> +``` + +--- + +### 2. StatisticsSection + +**Location:** `pages/HomePage/sections/StatisticsSection.jsx` + +**Purpose:** Displays animated statistics with rotating gradient borders and animated counters. + +**Parameters:** + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| `stats` | Array | `[]` | Array of stat objects: `{value: number, suffix: string, label: string, icon: JSX}` | +| `title` | String | `"Trusted by Thousands"` | Main heading text | +| `subtitle` | String | `"Join the community..."` | Subtitle text below heading | +| `className` | String | `""` | Additional CSS classes | +| `sectionRef` | Ref | `null` | React ref for scroll tracking (optional) | + +**Example Usage:** +```jsx + }, + { value: 50000, suffix: "+", label: "Links Created", icon: } + ]} + title="Trusted by Thousands" + subtitle="Join the community of professionals" + sectionRef={statsRef} +/> +``` + +**Features:** +- Animated counters that count up when section comes into view +- Rotating gradient borders with glow effects +- Responsive grid layout (2 columns on mobile, 4 on desktop) +- Dark mode support with gradient text effects + +--- + +### 3. FeaturesSection + +**Location:** `pages/HomePage/sections/FeaturesSection.jsx` and `pages/Documentation/sections/FeaturesSection.jsx` + +**Purpose:** Displays feature cards in either grid or list layout with animated borders and hover effects. + +**Parameters:** + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| `features` | Array | `[]` | Array of feature objects (see Feature Object below) | +| `title` | String | `"Powerful Features"` | Main heading text | +| `subtitle` | String | `"Everything you need..."` | Subtitle text (optional, can be empty string) | +| `className` | String | `""` | Additional CSS classes | +| `sectionRef` | Ref | `null` | React ref for scroll tracking | +| `layout` | String | `"grid"` | Layout type: `"grid"` or `"list"` | + +**Feature Object Structure:** +```javascript +{ + icon: JSX | Component, // Icon component or JSX element + title: string, // Feature title + description: string, // Feature description (or use 'desc') + desc: string, // Alternative to 'description' + color: string, // Tailwind gradient classes (e.g., "from-blue-500 to-cyan-500") + gradient: string, // Alternative to 'color' + delay: number // Animation delay (optional, for grid layout) +} +``` + +**Example Usage (Grid Layout):** +```jsx +, + title: "Personalized Links", + description: "Create memorable URLs...", + color: "from-blue-500 to-cyan-500", + delay: 0.1 + } + ]} + title="Powerful Features" + subtitle="Everything you need to manage your social presence" + layout="grid" +/> +``` + +**Example Usage (List Layout):** +```jsx + +``` + +**Features:** +- Supports both grid (3 columns) and list (vertical) layouts +- Animated pulsing glow borders +- Handles both React component icons and JSX icon elements +- Normalizes `description`/`desc` and `color`/`gradient` automatically +- Dark mode support with gradient overlays + +--- + +### 4. BenefitsSection + +**Location:** `pages/HomePage/sections/BenefitsSection.jsx` + +**Purpose:** Displays benefit cards with gradient backgrounds and checkmark lists. + +**Parameters:** + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| `benefits` | Array | `[]` | Array of benefit objects (see Benefit Object below) | +| `title` | String | `"Perfect for Everyone"` | Main heading text | +| `subtitle` | String | `"Whether you're a professional..."` | Subtitle text | +| `className` | String | `""` | Additional CSS classes | +| `sectionRef` | Ref | `null` | React ref for scroll tracking | + +**Benefit Object Structure:** +```javascript +{ + title: string, // Benefit category title + points: string[], // Array of benefit points (displayed with checkmarks) + icon: JSX, // Icon element + gradient: string // Tailwind gradient classes (e.g., "from-blue-600 to-cyan-600") +} +``` + +**Example Usage:** +```jsx +, + gradient: "from-blue-600 to-cyan-600" + } + ]} + title="Perfect for Everyone" + subtitle="Whether you're a professional, creator, or developer" + sectionRef={benefitsRef} +/> +``` + +**Features:** +- Gradient background cards with animated checkmarks +- Responsive grid (1 column mobile, 2 tablet, 3 desktop) +- Staggered animations on scroll +- White text on gradient backgrounds + +--- + +### 5. CTASection (Call-to-Action Section) + +**Location:** `pages/HomePage/sections/CTASection.jsx` + +**Purpose:** A prominent call-to-action section with gradient background and centered CTA button. Used to encourage users to take action (sign up, get started, etc.). + +**Parameters:** + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| `title` | String | `"Ready to Transform Your Links?"` | Main heading text (large, white) | +| `subtitle` | String | `"Join thousands of professionals..."` | Subtitle text (white with opacity) | +| `ctaText` | String | `"Get Started Now"` | Button text | +| `ctaAction` | Function | `null` | Custom click handler. If null, navigates to `/login` | +| `className` | String | `""` | Additional CSS classes | + +**Example Usage:** +```jsx + +``` + +**With Custom Action:** +```jsx + { + // Custom logic + navigate('/signup'); + }} +/> +``` + +**Features:** +- Purple-pink-blue gradient background +- Large, bold white text +- Prominent white button with hover effects +- Fully responsive typography +- Animated entrance on scroll + +--- + +## Page Structure + +### How Sections Are Organized + +Each page follows this pattern: + +1. **Page Folder:** `pages/[PageName]/` +2. **Main Component:** `[PageName].jsx` +3. **Sections Folder:** `sections/` containing page-specific section components +4. **Index File:** `sections/index.js` for easy imports + +### Import Pattern + +```jsx +// In HomePage.jsx +import { + HeroSection, + FeaturesSection, + StatisticsSection, + BenefitsSection, + CTASection +} from './sections'; +``` + +--- + +## Page-by-Page Documentation + +### 1. HomePage + +**Location:** `pages/HomePage/HomePage.jsx` + +**Route:** `/` (public, requires non-authentication) + +**Sections Used:** +1. **HeroSection** - Main landing section +2. **StatisticsSection** - Animated statistics +3. **FeaturesSection** - Feature cards (grid layout) +4. **BenefitsSection** - Benefit cards for different user types +5. **CTASection** - Final call-to-action + +**Data Structures:** + +```javascript +// Words for typewriter effect +const words = [ + { + text: "Transform", + className: "text-5xl md:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600" + }, + // ... more words +]; + +// Flip words for animation +const flipWords = ["LinkedIn", "GitHub", "Instagram", "Portfolio", "YouTube", "Twitter"]; + +// Features array +const features = [ + { + icon: , + title: "Personalized Links", + description: "Create memorable URLs...", + color: "from-blue-500 to-cyan-500", + delay: 0.1 + }, + // ... more features +]; + +// Benefits array +const benefits = [ + { + title: "For Professionals", + points: ["Point 1", "Point 2"], + icon: , + gradient: "from-blue-600 to-cyan-600" + }, + // ... more benefits +]; + +// Statistics array +const stats = [ + { value: 10000, suffix: "+", label: "Active Users", icon: }, + // ... more stats +]; + +// Platforms array +const platforms = [ + { name: "LinkedIn", icon: , color: "text-blue-600" }, + // ... more platforms +]; +``` + +**Special Features:** +- Navigation bar (only when not authenticated) +- Mouse position tracking for interactive background +- Dark mode toggle in navigation +- Scroll indicators + +--- + +### 2. Documentation + +**Location:** `pages/Documentation/Documentation.jsx` + +**Route:** `/doc` (public) + +**Sections Used:** +1. **FeaturesSection** - Key features (list layout) + +**Data Structures:** + +```javascript +// Features array (for Documentation page) +const features = [ + { + img: "easy-to-remember.webp", // Image path (not used in FeaturesSection) + title: "Personalized Smart Links", + desc: "Generate easy-to-remember links...", + icon: FaLink, // Component reference + gradient: "from-blue-500 to-cyan-500" + }, + // ... more features +]; +``` + +**Special Features:** +- Uses FeaturesSection with `layout="list"` for vertical feature display +- Contains many custom sections (Introduction, How It Works, etc.) that are not yet componentized +- Animated background with particles +- 3D card effects with magnetic hover + +**Note:** This page has many hardcoded sections that could be extracted into reusable components in the future. + +--- + +## Section Parameters Reference + +### Quick Reference Table + +| Section | Required Props | Optional Props | Layout Options | +|---------|---------------|----------------|----------------| +| **HeroSection** | `words`, `flipWords` | `description`, `highlightText`, `ctaText`, `platforms`, `mousePosition`, `isAuthenticated` | N/A | +| **StatisticsSection** | `stats` | `title`, `subtitle`, `sectionRef` | N/A | +| **FeaturesSection** | `features` | `title`, `subtitle`, `layout`, `sectionRef` | `"grid"` or `"list"` | +| **BenefitsSection** | `benefits` | `title`, `subtitle`, `sectionRef` | N/A | +| **CTASection** | None | `title`, `subtitle`, `ctaText`, `ctaAction` | N/A | + +--- + +## Best Practices + +### 1. Creating New Sections + +When creating a new section component: + +1. Place it in the appropriate page's `sections/` folder +2. Export it from `sections/index.js` +3. Accept props with sensible defaults +4. Support both light and dark modes +5. Make it responsive +6. Use Framer Motion for animations +7. Document all props in JSDoc comments + +### 2. Interchanging Content + +To interchange content between pages: + +1. **Same Section, Different Data:** + ```jsx + // In HomePage.jsx + + + // In Documentation.jsx + + ``` + +2. **Reusing Sections:** + - Copy the section component to the target page's `sections/` folder + - Or create a shared sections folder if truly reusable + - Update imports accordingly + +3. **Customizing Sections:** + - All sections accept `className` prop for additional styling + - Most accept custom action handlers + - Use props to customize titles, subtitles, and content + +### 3. Data Format Compatibility + +**FeaturesSection** automatically normalizes: +- `description` or `desc` → always use `description` internally +- `color` or `gradient` → always use `color` internally +- Component icons or JSX icons → handles both + +This allows easy data interchange between pages. + +--- + +## Section Component Details + +### CTASection Explained + +**What is CTASection?** + +CTASection (Call-to-Action Section) is a reusable component designed to prompt users to take a specific action, typically at the end of a page or after presenting key information. It features: + +- **Gradient Background:** Purple-pink-blue gradient that stands out +- **Large Typography:** Bold, attention-grabbing text +- **Prominent Button:** White button with arrow icon +- **Responsive Design:** Adapts to all screen sizes +- **Animation:** Smooth entrance animation when scrolled into view + +**When to Use:** +- End of landing pages +- After feature presentations +- Before closing a page +- To encourage sign-ups or conversions + +**Customization:** +- Change title and subtitle text +- Customize button text +- Add custom click handlers +- Add additional CSS classes + +--- + +## Migration Guide + +If you need to move sections between pages: + +1. **Copy the section file** to the target page's `sections/` folder +2. **Update import paths** in the section component (e.g., `../ui/` → `../../ui/`) +3. **Update the page component** to import from the new location +4. **Update `sections/index.js`** to export the section +5. **Test all functionality** including animations and interactions + +--- + +## Future Enhancements + +Potential sections that could be extracted: + +- **HowItWorksSection** - Step-by-step process display +- **TestimonialsSection** - User testimonials carousel +- **FAQSection** - Accordion-style FAQ +- **PlatformSection** - Platform icons showcase +- **PricingSection** - Pricing tiers (if applicable) + +--- + +## Troubleshooting + +### Common Issues + +1. **Import Path Errors:** + - Check relative path depth (count `../` needed) + - Verify file exists at target location + - Check `sections/index.js` exports + +2. **Section Not Rendering:** + - Verify props are passed correctly + - Check data array structure matches expected format + - Ensure icons are valid React components or JSX + +3. **Styling Issues:** + - Check dark mode classes are applied + - Verify Tailwind classes are correct + - Ensure responsive breakpoints are set + +4. **Animation Not Working:** + - Check Framer Motion is imported + - Verify `viewport={{ once: true }}` for scroll animations + - Ensure refs are passed correctly for scroll tracking + +--- + +## Summary + +The section-based architecture provides: + +✅ **Modularity** - Each section is self-contained +✅ **Reusability** - Sections can be used across pages +✅ **Maintainability** - Easy to update and modify +✅ **Flexibility** - Props allow customization +✅ **Consistency** - Shared design patterns +✅ **Scalability** - Easy to add new sections + +This structure makes it easy to interchange content between pages while maintaining clean, organized code. + diff --git a/frontend/index.html b/frontend/index.html index f1849a8..46d71a9 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,10 +1,80 @@ - + - LinkBridger + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + All in1 url - Free Link in Bio Tool | Custom URL Shortener for Social Media
diff --git a/frontend/nginx.conf b/frontend/nginx.conf new file mode 100644 index 0000000..985e0ca --- /dev/null +++ b/frontend/nginx.conf @@ -0,0 +1,22 @@ +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + + # Handle /app base path (since Vite is built with base: "/app") + # Strip /app prefix and serve from root + location /app { + rewrite ^/app(.*)$ $1 break; + try_files $uri $uri/ /index.html; + } + + # Handle root requests (shouldn't happen, but just in case) + location = / { + return 301 /app/; + } + + # Default fallback + location / { + try_files $uri $uri/ /index.html; + } +} diff --git a/frontend/package-lock.json b/frontend/package-lock.json index fbc39aa..f3445d4 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,11 +1,11 @@ { - "name": "LinkBridger", + "name": "All in1 url", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "LinkBridger", + "name": "All in1 url", "version": "0.0.0", "dependencies": { "@reduxjs/toolkit": "^2.2.8", @@ -19,6 +19,7 @@ "react-redux": "^9.1.2", "react-router-dom": "^6.27.0", "react-transition-group": "^4.4.5", + "recharts": "^3.6.0", "tailwind-merge": "^2.5.4" }, "devDependencies": { @@ -1294,6 +1295,69 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.7.tgz", + "integrity": "sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -1910,6 +1974,127 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", @@ -1978,6 +2163,12 @@ } } }, + "node_modules/decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==", + "license": "MIT" + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -2235,6 +2426,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-toolkit": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.43.0.tgz", + "integrity": "sha512-SKCT8AsWvYzBBuUqMk4NPwFlSdqLpJwmy6AP322ERn8W2YLIB6JBXnwMI2Qsh2gfphT3q7EKAxKb23cvFHFwKA==", + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks" + ] + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", @@ -2573,6 +2774,12 @@ "node": ">=0.10.0" } }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3118,6 +3325,15 @@ "node": ">= 0.4" } }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/is-array-buffer": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", @@ -4444,6 +4660,36 @@ "node": ">=8.10.0" } }, + "node_modules/recharts": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-3.6.0.tgz", + "integrity": "sha512-L5bjxvQRAe26RlToBAziKUB7whaGKEwD3znoM6fz3DrTowCIC/FnJYnuq1GEzB8Zv2kdTfaxQfi5GoH0tBinyg==", + "license": "MIT", + "workspaces": [ + "www" + ], + "dependencies": { + "@reduxjs/toolkit": "1.x.x || 2.x.x", + "clsx": "^2.1.1", + "decimal.js-light": "^2.5.1", + "es-toolkit": "^1.39.3", + "eventemitter3": "^5.0.1", + "immer": "^10.1.1", + "react-redux": "8.x.x || 9.x.x", + "reselect": "5.1.1", + "tiny-invariant": "^1.3.3", + "use-sync-external-store": "^1.2.2", + "victory-vendor": "^37.0.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/redux": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", @@ -5073,6 +5319,12 @@ "node": ">=0.8" } }, + "node_modules/tiny-invariant": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "license": "MIT" + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -5258,6 +5510,28 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/victory-vendor": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz", + "integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==", + "license": "MIT AND ISC", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, "node_modules/vite": { "version": "5.4.8", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", diff --git a/frontend/package.json b/frontend/package.json index cd9ad64..db7b022 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,8 +1,8 @@ { - "name": "LinkBridger", + "name": "All in1 url", "private": true, "version": "0.0.0", - "description": "LinkBridger, a tool designed to make your social media links easier to remember and manage. Whether you're sharing your Instagram, GitHub, or LinkedIn profile, LinkBridger allows you to generate personalized URLs that are simple and customizable. It also tracks how often your links are clicked and allows centralized updating, so any changes you make will reflect across all platforms instantly.", + "description": "All in1 url, a tool designed to make your social media links easier to remember and manage. Whether you're sharing your Instagram, GitHub, or LinkedIn profile, All in1 url allows you to generate personalized URLs that are simple and customizable. It also tracks how often your links are clicked and allows centralized updating, so any changes you make will reflect across all platforms instantly.", "author": "Dwizard", "type": "module", "scripts": { @@ -23,6 +23,7 @@ "react-redux": "^9.1.2", "react-router-dom": "^6.27.0", "react-transition-group": "^4.4.5", + "recharts": "^3.6.0", "tailwind-merge": "^2.5.4" }, "devDependencies": { diff --git a/frontend/public/description.txt b/frontend/public/description.txt index cb4f803..dadac9b 100644 --- a/frontend/public/description.txt +++ b/frontend/public/description.txt @@ -1,4 +1,4 @@ -if i have to talk about only one project then i ll choose the project linkBridger. there is reason to choose that its complete my own idea and obviously its around of unique. some idea has been taken from link tree. +if i have to talk about only one project then i ll choose the project All in1 url. there is reason to choose that its complete my own idea and obviously its around of unique. some idea has been taken from link tree. so lets talk about the working of project and what basically it does. the person who is having many social profiles and also there are many hard or long http links they can use this project like influencer, it sector person because they all have contain many type of links like github, linkdin, portfolio, instagram, facebook, and some coding profile like leetcode, codeforces etc. diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt new file mode 100644 index 0000000..a6609ff --- /dev/null +++ b/frontend/public/robots.txt @@ -0,0 +1,8 @@ +User-agent: Googlebot +Disallow: /nogooglebot/ + +User-agent: * +Allow: / + +# Sitemap (app is under /app/) +Sitemap: https://allin1url.in/app/sitemap.xml \ No newline at end of file diff --git a/frontend/public/sitemap.xml b/frontend/public/sitemap.xml new file mode 100644 index 0000000..8d3f5e8 --- /dev/null +++ b/frontend/public/sitemap.xml @@ -0,0 +1,45 @@ + + + + https://allin1url.in/app/ + 2025-01-29 + weekly + 1.0 + + + https://allin1url.in/app/login + 2025-01-29 + monthly + 0.9 + + + https://allin1url.in/app/doc + 2025-01-29 + monthly + 0.8 + + + https://allin1url.in/app/docs/features + 2025-01-29 + monthly + 0.7 + + + https://allin1url.in/app/docs/benefits + 2025-01-29 + monthly + 0.7 + + + https://allin1url.in/app/docs/how-to-use + 2025-01-29 + monthly + 0.7 + + + https://allin1url.in/app/about-developer + 2025-01-29 + monthly + 0.6 + + diff --git a/frontend/src/App.css b/frontend/src/App.css index 4354741..6283316 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -11,24 +11,28 @@ input { font-family: "Poppins", sans-serif; } -.container { +/* Scoped to AuthPage only - use .auth-container class */ +.auth-container, +.container.auth-container { position: relative; - width: 100vw; - min-width: 100vw; + width: 100vw; + min-width: 100vw; /* background-color: #fff; */ min-height: 100vh; overflow: hidden; + isolation: isolate; /* Create new stacking context */ } -.forms-container { +.auth-container .forms-container { position: absolute; width: 100%; height: 100%; top: 0; left: 0; + z-index: 1; } -.signin-signup { +.auth-container .signin-signup { position: absolute; top: 50%; transform: translate(-50%, -50%); @@ -40,7 +44,7 @@ input { z-index: 5; } -form { +.auth-container form { display: flex; align-items: center; justify-content: center; @@ -52,27 +56,27 @@ form { grid-row: 1 / 2; } -form.sign-up-form { +.auth-container form.sign-up-form { opacity: 0; z-index: 1; } -form.sign-in-form { +.auth-container form.sign-in-form { z-index: 2; } -.title { +.auth-container .title { font-size: 2.2rem; color: #444; margin-bottom: 10px; transition: color 0.3s ease; } -.dark .title { +.dark .auth-container .title { color: #ffffff; } -.input-field { +.auth-container .input-field { max-width: 380px; width: 100%; background-color: #ffffff; @@ -86,11 +90,11 @@ form.sign-in-form { transition: background-color 0.3s ease; } -.dark .input-field { +.dark .auth-container .input-field { background-color: #374151; } -.input-field i { +.auth-container .input-field i { text-align: center; line-height: 55px; color: #acacac; @@ -98,11 +102,11 @@ form.sign-in-form { font-size: 1.1rem; } -.dark .input-field i { +.dark .auth-container .input-field i { color: #9ca3af; } -.input-field input { +.auth-container .input-field input { background: none; outline: none; border: none; @@ -113,31 +117,31 @@ form.sign-in-form { transition: color 0.3s ease; } -.dark .input-field input { +.dark .auth-container .input-field input { color: #f3f4f6; } -.input-field input::placeholder { +.auth-container .input-field input::placeholder { color: #aaa; font-weight: 500; transition: color 0.3s ease; } -.dark .input-field input::placeholder { +.dark .auth-container .input-field input::placeholder { color: #9ca3af; } -.social-text { +.auth-container .social-text { padding: 0.7rem 0; font-size: 1rem; } -.social-media { +.auth-container .social-media { display: flex; justify-content: center; } -.social-icon { +.auth-container .social-icon { height: 46px; width: 46px; display: flex; @@ -152,12 +156,12 @@ form.sign-in-form { transition: 0.3s; } -.social-icon:hover { +.auth-container .social-icon:hover { color: #4481eb; border-color: #4481eb; } -.btn { +.auth-container .btn { width: 150px; background-color: #5995fd; border: none; @@ -172,10 +176,10 @@ form.sign-in-form { transition: 0.5s; } -.btn:hover { +.auth-container .btn:hover { background-color: #4d84e2; } -.panels-container { +.auth-container .panels-container { position: absolute; height: 100%; width: 100%; @@ -183,9 +187,10 @@ form.sign-in-form { left: 0; display: grid; grid-template-columns: repeat(2, 1fr); + z-index: 1; } -.container:before { +.auth-container:before { content: ""; position: absolute; height: 2000px; @@ -199,13 +204,13 @@ form.sign-in-form { z-index: 6; } -.image { +.auth-container .image { width: 100%; transition: transform 1.1s ease-in-out; transition-delay: 0.4s; } -.panel { +.auth-container .panel { display: flex; flex-direction: column; align-items: flex-end; @@ -214,34 +219,34 @@ form.sign-in-form { z-index: 6; } -.left-panel { +.auth-container .left-panel { pointer-events: all; padding: 3rem 17% 2rem 12%; } -.right-panel { +.auth-container .right-panel { pointer-events: none; padding: 3rem 12% 2rem 17%; } -.panel .content { +.auth-container .panel .content { color: #fff; transition: transform 0.9s ease-in-out; transition-delay: 0.6s; } -.panel h3 { +.auth-container .panel h3 { font-weight: 600; line-height: 1; font-size: 1.5rem; } -.panel p { +.auth-container .panel p { font-size: 0.95rem; padding: 0.7rem 0; } -.btn.transparent { +.auth-container .btn.transparent { margin: 0; background: none; border: 2px solid #fff; @@ -251,73 +256,73 @@ form.sign-in-form { font-size: 0.8rem; } -.right-panel .image, -.right-panel .content { +.auth-container .right-panel .image, +.auth-container .right-panel .content { transform: translateX(800px); } /* ANIMATION */ -.container.sign-up-mode:before { +.auth-container.sign-up-mode:before { transform: translate(100%, -50%); right: 52%; } -.container.sign-up-mode .left-panel .image, -.container.sign-up-mode .left-panel .content { +.auth-container.sign-up-mode .left-panel .image, +.auth-container.sign-up-mode .left-panel .content { transform: translateX(-800px); } -.container.sign-up-mode .signin-signup { +.auth-container.sign-up-mode .signin-signup { left: 25%; } -.container.sign-up-mode form.sign-up-form { +.auth-container.sign-up-mode form.sign-up-form { opacity: 1; z-index: 2; } -.container.sign-up-mode form.sign-in-form { +.auth-container.sign-up-mode form.sign-in-form { opacity: 0; z-index: 1; } -.container.sign-up-mode .right-panel .image, -.container.sign-up-mode .right-panel .content { +.auth-container.sign-up-mode .right-panel .image, +.auth-container.sign-up-mode .right-panel .content { transform: translateX(0%); } -.container.sign-up-mode .left-panel { +.auth-container.sign-up-mode .left-panel { pointer-events: none; } -.container.sign-up-mode .right-panel { +.auth-container.sign-up-mode .right-panel { pointer-events: all; } @media (max-width: 870px) { - .container { + .auth-container { min-height: 800px; height: 100vh; } - .signin-signup { + .auth-container .signin-signup { width: 100%; top: 95%; transform: translate(-50%, -100%); transition: 1s 0.8s ease-in-out; } - .signin-signup, - .container.sign-up-mode .signin-signup { + .auth-container .signin-signup, + .auth-container.sign-up-mode .signin-signup { left: 50%; } - .panels-container { + .auth-container .panels-container { grid-template-columns: 1fr; grid-template-rows: 1fr 2fr 1fr; } - .panel { + .auth-container .panel { flex-direction: row; justify-content: space-around; align-items: center; @@ -325,42 +330,42 @@ form.sign-in-form { grid-column: 1 / 2; } - .right-panel { + .auth-container .right-panel { grid-row: 3 / 4; } - .left-panel { + .auth-container .left-panel { grid-row: 1 / 2; } - .image { + .auth-container .image { width: 200px; transition: transform 0.9s ease-in-out; transition-delay: 0.6s; } - .panel .content { + .auth-container .panel .content { padding-right: 15%; transition: transform 0.9s ease-in-out; transition-delay: 0.8s; } - .panel h3 { + .auth-container .panel h3 { font-size: 1.2rem; } - .panel p { + .auth-container .panel p { font-size: 0.7rem; padding: 0.5rem 0; } - .btn.transparent { + .auth-container .btn.transparent { width: 110px; height: 35px; font-size: 0.7rem; } - .container:before { + .auth-container:before { width: 1500px; height: 1500px; transform: translateX(-50%); @@ -371,54 +376,54 @@ form.sign-in-form { transition: 2s ease-in-out; } - .container.sign-up-mode:before { + .auth-container.sign-up-mode:before { transform: translate(-50%, 100%); bottom: 32%; right: initial; } - .container.sign-up-mode .left-panel .image, - .container.sign-up-mode .left-panel .content { + .auth-container.sign-up-mode .left-panel .image, + .auth-container.sign-up-mode .left-panel .content { transform: translateY(-300px); } - .container.sign-up-mode .right-panel .image, - .container.sign-up-mode .right-panel .content { + .auth-container.sign-up-mode .right-panel .image, + .auth-container.sign-up-mode .right-panel .content { transform: translateY(0px); } - .right-panel .image, - .right-panel .content { + .auth-container .right-panel .image, + .auth-container .right-panel .content { transform: translateY(300px); } - .container.sign-up-mode .signin-signup { + .auth-container.sign-up-mode .signin-signup { top: 5%; transform: translate(-50%, 0); } } @media (max-width: 570px) { - form { + .auth-container form { padding: 0 1.5rem; } - .image { + .auth-container .image { display: none; } - .panel .content { + .auth-container .panel .content { padding: 0.5rem 1rem; } - .container { + .auth-container { padding: 1.5rem; } - .container:before { + .auth-container:before { bottom: 72%; left: 50%; } - .container.sign-up-mode:before { + .auth-container.sign-up-mode:before { bottom: 28%; left: 50%; } diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 25e4cbd..86cf4a8 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -1,7 +1,7 @@ import { useEffect, useState, useRef } from 'react' import "./App.css" import AuthPage from './components/AuthPage' -import { Routes, Route, Navigate } from 'react-router-dom' +import { Routes, Route, Navigate, useLocation } from 'react-router-dom' import DashBoard from './components/DashBoard' import { useDispatch, useSelector } from 'react-redux' import api from './utils/api' @@ -11,13 +11,27 @@ import VerificationPage from './components/VerificationPage' import Nav from './components/navbar/Nav' import VerifiedPage from './components/VerifiedPage' import PasswordReset from './components/PasswordReset' -import Documentation from './components/Documentation' +import Documentation from './components/pages/Documentation/Documentation' +import HomePage from './components/pages/HomePage/HomePage' import LinkPage from './components/pages/LinkPage' import ProfilePage from './components/pages/Profile' +import ProfilePreview from './components/pages/ProfilePreview' +import Settings from './components/pages/Settings' import NotFound from './components/pages/NotFound' import AboutDeveloper from './components/pages/AboutDeveloper' +import Analytics from './components/pages/Analytics' +import LinkClickDetails from './components/pages/LinkClickDetails' +import TemplatePreview from './components/preview/TemplatePreview' +import Features from './components/pages/docs/Features' +import Benefits from './components/pages/docs/Benefits' +import Security from './components/pages/docs/Security' +import HowToUse from './components/pages/docs/HowToUse' +import Different from './components/pages/docs/Different' +import AuthPageV1 from './components/AuthPageV1' +import LinkClickDetailsV1 from './components/pages/LinkClickDetailsV1' function App() { + const location = useLocation(); const dispatch = useDispatch(); const [isLoading, setLoading] = useState(true); const isAuthenticated = useSelector(store => store.admin.isAuthenticated); @@ -113,18 +127,34 @@ function App() {
; + // Determine if current route is public (non-authenticated) + const publicRoutes = ['/', '/verify', '/verified', '/reset_password', '/about-developer']; + const isDocRoute = location.pathname.startsWith('/docs') || location.pathname === '/doc'; + const isPublicRoute = publicRoutes.includes(location.pathname) || isDocRoute; + return (
- {isAuthenticated &&