Spaces:
Paused
Paused
Upload 15 files
Browse files- .gitattributes +1 -0
- README.md +137 -12
- db.js +120 -0
- db.js.old +95 -0
- mailService.js +52 -0
- otpService.js +80 -0
- package-lock.json +2513 -0
- package.json +43 -0
- public/admin.html +528 -0
- public/favicon.svg +17 -0
- public/index.html +1072 -0
- public/logo.png +3 -0
- public/server-logs.html +542 -0
- public/status.html +637 -0
- public/styles.css +587 -0
- server.js +969 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
public/logo.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,12 +1,137 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SLD GC Portal
|
| 2 |
+
|
| 3 |
+
A modern, secure, and user-friendly gift card management system that allows users to convert their gift cards to cash through a streamlined process.
|
| 4 |
+
|
| 5 |
+
## 🌟 Features
|
| 6 |
+
|
| 7 |
+
- **Secure Authentication**
|
| 8 |
+
- Email-based login/registration
|
| 9 |
+
- OTP verification system
|
| 10 |
+
- Session management
|
| 11 |
+
|
| 12 |
+
- **Gift Card Management**
|
| 13 |
+
- Support for multiple gift card types:
|
| 14 |
+
- Roblox (100, 400, 1000)
|
| 15 |
+
- Overwatch (200, 500, 1000)
|
| 16 |
+
- Amazon (50, 100, 500)
|
| 17 |
+
- Video proof upload system
|
| 18 |
+
- Real-time status tracking
|
| 19 |
+
|
| 20 |
+
- **Payment Options**
|
| 21 |
+
- UPI transfers
|
| 22 |
+
- Paytm integration
|
| 23 |
+
- Crypto transfer support
|
| 24 |
+
|
| 25 |
+
- **Admin Dashboard**
|
| 26 |
+
- Real-time submission monitoring
|
| 27 |
+
- Status management
|
| 28 |
+
- User communication system
|
| 29 |
+
- Video proof verification
|
| 30 |
+
|
| 31 |
+
- **Modern UI/UX**
|
| 32 |
+
- Responsive design
|
| 33 |
+
- Dark theme with glass morphism
|
| 34 |
+
- Animated transitions
|
| 35 |
+
- Interactive elements
|
| 36 |
+
|
| 37 |
+
## 🚀 Getting Started
|
| 38 |
+
|
| 39 |
+
### Prerequisites
|
| 40 |
+
|
| 41 |
+
- Node.js (v14 or higher)
|
| 42 |
+
- npm or yarn
|
| 43 |
+
- Modern web browser
|
| 44 |
+
|
| 45 |
+
### Installation
|
| 46 |
+
|
| 47 |
+
1. Clone the repository:
|
| 48 |
+
```bash
|
| 49 |
+
git clone https://github.com/yourusername/sld-gc-portal.git
|
| 50 |
+
cd sld-gc-portal
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
2. Install dependencies:
|
| 54 |
+
```bash
|
| 55 |
+
npm install
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
3. Set up environment variables:
|
| 59 |
+
```bash
|
| 60 |
+
cp .env.example .env
|
| 61 |
+
```
|
| 62 |
+
Edit `.env` with your configuration.
|
| 63 |
+
|
| 64 |
+
4. Start the development server:
|
| 65 |
+
```bash
|
| 66 |
+
npm run dev
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## 📁 Project Structure
|
| 70 |
+
|
| 71 |
+
```
|
| 72 |
+
sld-gc-portal/
|
| 73 |
+
├── public/
|
| 74 |
+
│ ├── index.html # Main application page
|
| 75 |
+
│ ├── status.html # Status tracking page
|
| 76 |
+
│ └── admin.html # Admin dashboard
|
| 77 |
+
├── src/
|
| 78 |
+
│ ├── api/ # API endpoints
|
| 79 |
+
│ ├── config/ # Configuration files
|
| 80 |
+
│ ├── models/ # Database models
|
| 81 |
+
│ └── utils/ # Utility functions
|
| 82 |
+
├── .env # Environment variables
|
| 83 |
+
└── package.json # Project dependencies
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## 🔒 Security Features
|
| 87 |
+
|
| 88 |
+
- OTP-based authentication
|
| 89 |
+
- Secure session management
|
| 90 |
+
- File upload validation
|
| 91 |
+
- Input sanitization
|
| 92 |
+
- XSS protection
|
| 93 |
+
- CSRF protection
|
| 94 |
+
|
| 95 |
+
## 💻 Technology Stack
|
| 96 |
+
|
| 97 |
+
- **Frontend**
|
| 98 |
+
- HTML5
|
| 99 |
+
- Tailwind CSS
|
| 100 |
+
- JavaScript (ES6+)
|
| 101 |
+
- Font Awesome icons
|
| 102 |
+
|
| 103 |
+
- **Backend**
|
| 104 |
+
- Node.js
|
| 105 |
+
- Express.js
|
| 106 |
+
- MongoDB
|
| 107 |
+
|
| 108 |
+
- **Services**
|
| 109 |
+
- File2Link for video uploads
|
| 110 |
+
- Email service for OTP
|
| 111 |
+
- Payment gateway integration
|
| 112 |
+
|
| 113 |
+
## 🤝 Contributing
|
| 114 |
+
|
| 115 |
+
1. Fork the repository
|
| 116 |
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
| 117 |
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
| 118 |
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
| 119 |
+
5. Open a Pull Request
|
| 120 |
+
|
| 121 |
+
## 📝 License
|
| 122 |
+
|
| 123 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
| 124 |
+
|
| 125 |
+
## 👥 Team
|
| 126 |
+
|
| 127 |
+
- **Shirt Less Digital** - *Initial work* - [YouTube Channel](https://www.youtube.com/@shirtlessdigital)
|
| 128 |
+
|
| 129 |
+
## 🙏 Acknowledgments
|
| 130 |
+
|
| 131 |
+
- Thanks to all contributors
|
| 132 |
+
- Inspired by the need for a secure gift card management system
|
| 133 |
+
- Built with modern web technologies
|
| 134 |
+
|
| 135 |
+
## 📞 Support
|
| 136 |
+
|
| 137 |
+
For support, email contact@shirtlessdigital.com or visit our [YouTube Channel](https://www.youtube.com/@shirtlessdigital)
|
db.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { Pool } = require('pg');
|
| 2 |
+
|
| 3 |
+
// Database connection configuration
|
| 4 |
+
const mainDbConfig = {
|
| 5 |
+
connectionString: 'postgresql://gc_owner:npg_Lh9UmqVT7nGb@ep-wandering-flower-a1b4axgc-pooler.ap-southeast-1.aws.neon.tech/gc?sslmode=require'
|
| 6 |
+
};
|
| 7 |
+
|
| 8 |
+
let mainPool = null;
|
| 9 |
+
|
| 10 |
+
function getPool() {
|
| 11 |
+
if (!mainPool) {
|
| 12 |
+
mainPool = new Pool(mainDbConfig);
|
| 13 |
+
}
|
| 14 |
+
return mainPool;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
async function initializeDatabase() {
|
| 18 |
+
const pool = getPool();
|
| 19 |
+
try {
|
| 20 |
+
// Drop tables in correct order to handle foreign key constraints
|
| 21 |
+
//await pool.query('DROP TABLE IF EXISTS messages CASCADE');
|
| 22 |
+
//await pool.query('DROP TABLE IF EXISTS submissions CASCADE');
|
| 23 |
+
//await pool.query('DROP TABLE IF EXISTS otps CASCADE');
|
| 24 |
+
//await pool.query('DROP TABLE IF EXISTS users CASCADE');
|
| 25 |
+
|
| 26 |
+
// Create users table
|
| 27 |
+
await pool.query(`
|
| 28 |
+
CREATE TABLE IF NOT EXISTS users (
|
| 29 |
+
id SERIAL PRIMARY KEY,
|
| 30 |
+
name VARCHAR(255) NOT NULL,
|
| 31 |
+
email VARCHAR(255) UNIQUE NOT NULL,
|
| 32 |
+
password VARCHAR(255) NOT NULL,
|
| 33 |
+
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
| 34 |
+
)
|
| 35 |
+
`);
|
| 36 |
+
|
| 37 |
+
// Create OTP table
|
| 38 |
+
await pool.query(`
|
| 39 |
+
CREATE TABLE IF NOT EXISTS otps (
|
| 40 |
+
id SERIAL PRIMARY KEY,
|
| 41 |
+
email VARCHAR(255) NOT NULL,
|
| 42 |
+
otp VARCHAR(6) NOT NULL,
|
| 43 |
+
type VARCHAR(20) NOT NULL,
|
| 44 |
+
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
| 45 |
+
expires_at TIMESTAMP NOT NULL,
|
| 46 |
+
verified BOOLEAN DEFAULT FALSE,
|
| 47 |
+
is_used BOOLEAN DEFAULT FALSE
|
| 48 |
+
)
|
| 49 |
+
`);
|
| 50 |
+
|
| 51 |
+
// Create submissions table
|
| 52 |
+
await pool.query(`
|
| 53 |
+
CREATE TABLE IF NOT EXISTS submissions (
|
| 54 |
+
id SERIAL PRIMARY KEY,
|
| 55 |
+
user_id INTEGER REFERENCES users(id),
|
| 56 |
+
ticket_user_name VARCHAR(255) NOT NULL,
|
| 57 |
+
gc_code VARCHAR(255) NOT NULL,
|
| 58 |
+
gc_phone VARCHAR(255) NOT NULL,
|
| 59 |
+
ticket_number VARCHAR(255) NOT NULL,
|
| 60 |
+
upi_id VARCHAR(255) NOT NULL,
|
| 61 |
+
amount DECIMAL(10,2) NOT NULL,
|
| 62 |
+
proof_video_url TEXT NOT NULL,
|
| 63 |
+
status VARCHAR(50) NOT NULL DEFAULT 'pending',
|
| 64 |
+
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
| 65 |
+
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
| 66 |
+
)
|
| 67 |
+
`);
|
| 68 |
+
|
| 69 |
+
// Add status constraint
|
| 70 |
+
await pool.query(`
|
| 71 |
+
ALTER TABLE submissions
|
| 72 |
+
DROP CONSTRAINT IF EXISTS submissions_status_check;
|
| 73 |
+
|
| 74 |
+
ALTER TABLE submissions
|
| 75 |
+
ADD CONSTRAINT submissions_status_check
|
| 76 |
+
CHECK (status IN ('pending', 'approved', 'rejected', 'paid', 'closed'));
|
| 77 |
+
`);
|
| 78 |
+
|
| 79 |
+
// Create messages table
|
| 80 |
+
await pool.query(`
|
| 81 |
+
CREATE TABLE IF NOT EXISTS messages (
|
| 82 |
+
id SERIAL PRIMARY KEY,
|
| 83 |
+
user_id INTEGER REFERENCES users(id),
|
| 84 |
+
content TEXT NOT NULL,
|
| 85 |
+
sender VARCHAR(50) NOT NULL,
|
| 86 |
+
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
| 87 |
+
)
|
| 88 |
+
`);
|
| 89 |
+
|
| 90 |
+
// Add indexes for better chat performance
|
| 91 |
+
await pool.query(`
|
| 92 |
+
CREATE INDEX IF NOT EXISTS idx_messages_user_id ON messages(user_id);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS idx_messages_created_at ON messages(created_at);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS idx_messages_user_created ON messages(user_id, created_at);
|
| 95 |
+
`);
|
| 96 |
+
|
| 97 |
+
console.log('Database tables initialized successfully');
|
| 98 |
+
} catch (error) {
|
| 99 |
+
console.error('Error initializing database:', error);
|
| 100 |
+
throw error;
|
| 101 |
+
}
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
async function closePool() {
|
| 105 |
+
if (mainPool) {
|
| 106 |
+
await mainPool.end();
|
| 107 |
+
mainPool = null;
|
| 108 |
+
}
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
module.exports = {
|
| 112 |
+
getPool,
|
| 113 |
+
initializeDatabase,
|
| 114 |
+
closePool
|
| 115 |
+
};
|
| 116 |
+
|
| 117 |
+
// If this file is run directly, initialize the database
|
| 118 |
+
if (require.main === module) {
|
| 119 |
+
initializeDatabase();
|
| 120 |
+
}
|
db.js.old
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { Pool } = require('pg');
|
| 2 |
+
|
| 3 |
+
// Database connection configuration
|
| 4 |
+
const mainDbConfig = {
|
| 5 |
+
connectionString: 'postgresql://cd_owner:npg_HvkFi0YfQT9u@ep-muddy-river-a1za2spe-pooler.ap-southeast-1.aws.neon.tech/cd?sslmode=require'
|
| 6 |
+
};
|
| 7 |
+
|
| 8 |
+
// Create database pool
|
| 9 |
+
const mainPool = new Pool(mainDbConfig);
|
| 10 |
+
|
| 11 |
+
async function initializeDatabase() {
|
| 12 |
+
try {
|
| 13 |
+
// Drop tables in correct order to handle foreign key constraints
|
| 14 |
+
await mainPool.query('DROP TABLE IF EXISTS messages CASCADE');
|
| 15 |
+
await mainPool.query('DROP TABLE IF EXISTS submissions CASCADE');
|
| 16 |
+
await mainPool.query('DROP TABLE IF EXISTS users CASCADE');
|
| 17 |
+
await mainPool.query('DROP TABLE IF EXISTS otps CASCADE');
|
| 18 |
+
|
| 19 |
+
// Create users table
|
| 20 |
+
await mainPool.query(`
|
| 21 |
+
CREATE TABLE IF NOT EXISTS users (
|
| 22 |
+
id SERIAL PRIMARY KEY,
|
| 23 |
+
email VARCHAR(255) UNIQUE NOT NULL,
|
| 24 |
+
password VARCHAR(255) NOT NULL,
|
| 25 |
+
name VARCHAR(255) NOT NULL,
|
| 26 |
+
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
| 27 |
+
)
|
| 28 |
+
`);
|
| 29 |
+
|
| 30 |
+
// Create OTP table
|
| 31 |
+
await mainPool.query(`
|
| 32 |
+
CREATE TABLE IF NOT EXISTS otps (
|
| 33 |
+
id SERIAL PRIMARY KEY,
|
| 34 |
+
email VARCHAR(255) NOT NULL,
|
| 35 |
+
otp VARCHAR(6) NOT NULL,
|
| 36 |
+
is_used BOOLEAN DEFAULT FALSE,
|
| 37 |
+
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
| 38 |
+
expires_at TIMESTAMP WITH TIME ZONE NOT NULL
|
| 39 |
+
)
|
| 40 |
+
`);
|
| 41 |
+
|
| 42 |
+
// Create submissions table
|
| 43 |
+
await mainPool.query(`
|
| 44 |
+
CREATE TABLE IF NOT EXISTS submissions (
|
| 45 |
+
id SERIAL PRIMARY KEY,
|
| 46 |
+
user_id INTEGER REFERENCES users(id),
|
| 47 |
+
ticket_user_name VARCHAR(255) NOT NULL,
|
| 48 |
+
ticket_number VARCHAR(255) NOT NULL,
|
| 49 |
+
gc_name VARCHAR(255) NOT NULL,
|
| 50 |
+
gc_code VARCHAR(255) NOT NULL,
|
| 51 |
+
upi_id VARCHAR(255) NOT NULL,
|
| 52 |
+
amount DECIMAL(10,2) NOT NULL,
|
| 53 |
+
proof_video_url TEXT NOT NULL,
|
| 54 |
+
status VARCHAR(50) DEFAULT 'pending' CHECK (status IN ('pending', 'approved', 'rejected', 'paid', 'closed')),
|
| 55 |
+
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
| 56 |
+
)
|
| 57 |
+
`);
|
| 58 |
+
|
| 59 |
+
// Create messages table
|
| 60 |
+
await mainPool.query(`
|
| 61 |
+
CREATE TABLE IF NOT EXISTS messages (
|
| 62 |
+
id SERIAL PRIMARY KEY,
|
| 63 |
+
submission_id INTEGER REFERENCES submissions(id),
|
| 64 |
+
sender_type VARCHAR(50) CHECK (sender_type IN ('user', 'admin')),
|
| 65 |
+
message TEXT NOT NULL,
|
| 66 |
+
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
| 67 |
+
)
|
| 68 |
+
`);
|
| 69 |
+
|
| 70 |
+
console.log('Database tables initialized successfully');
|
| 71 |
+
} catch (error) {
|
| 72 |
+
console.error('Error initializing database:', error);
|
| 73 |
+
throw error;
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
// Test database connection
|
| 78 |
+
mainPool.query('SELECT NOW()', (err, res) => {
|
| 79 |
+
if (err) {
|
| 80 |
+
console.error('Error connecting to database:', err);
|
| 81 |
+
} else {
|
| 82 |
+
console.log('Connected to main database');
|
| 83 |
+
initializeDatabase();
|
| 84 |
+
}
|
| 85 |
+
});
|
| 86 |
+
|
| 87 |
+
module.exports = {
|
| 88 |
+
mainPool,
|
| 89 |
+
initializeDatabase
|
| 90 |
+
};
|
| 91 |
+
|
| 92 |
+
// If this file is run directly, initialize the database
|
| 93 |
+
if (require.main === module) {
|
| 94 |
+
initializeDatabase();
|
| 95 |
+
}
|
mailService.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const nodemailer = require('nodemailer');
|
| 2 |
+
|
| 3 |
+
// Create reusable transporter object using Gmail SMTP
|
| 4 |
+
const transporter = nodemailer.createTransport({
|
| 5 |
+
service: 'gmail',
|
| 6 |
+
auth: {
|
| 7 |
+
user: 'veltrix620@gmail.com',
|
| 8 |
+
pass: 'tdkdumjozzfszxkj' // Gmail app password
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Generates a 6-digit numeric OTP
|
| 14 |
+
* @returns {string} 6-digit OTP
|
| 15 |
+
*/
|
| 16 |
+
const generateOtp = () => {
|
| 17 |
+
return Math.floor(100000 + Math.random() * 900000).toString();
|
| 18 |
+
};
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* Sends OTP email to the specified email address
|
| 22 |
+
* @param {string} email - Recipient email address
|
| 23 |
+
* @param {string} otp - 6-digit OTP
|
| 24 |
+
* @returns {Promise} - Nodemailer send promise
|
| 25 |
+
*/
|
| 26 |
+
const sendOtpEmail = async (email, otp) => {
|
| 27 |
+
const mailOptions = {
|
| 28 |
+
from: 'veltrix620@gmail.com',
|
| 29 |
+
to: email,
|
| 30 |
+
subject: 'Your OTP for Seller Panel',
|
| 31 |
+
html: `
|
| 32 |
+
<div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;">
|
| 33 |
+
<h2 style="color: #333; text-align: center;">Your OTP for Seller Panel</h2>
|
| 34 |
+
<p style="color: #666; font-size: 16px;">Your One-Time Password (OTP) is:</p>
|
| 35 |
+
<div style="background-color: #f5f5f5; padding: 15px; text-align: center; font-size: 24px; letter-spacing: 5px; margin: 20px 0; border-radius: 5px;">
|
| 36 |
+
<strong>${otp}</strong>
|
| 37 |
+
</div>
|
| 38 |
+
<p style="color: #666; font-size: 14px;">This OTP is valid for 1 hour. Please do not share this OTP with anyone.</p>
|
| 39 |
+
<p style="color: #666; font-size: 14px;">If you didn't request this OTP, please ignore this email.</p>
|
| 40 |
+
<hr style="border: none; border-top: 1px solid #e0e0e0; margin: 20px 0;">
|
| 41 |
+
<p style="color: #999; font-size: 12px; text-align: center;">This is an automated message, please do not reply.</p>
|
| 42 |
+
</div>
|
| 43 |
+
`
|
| 44 |
+
};
|
| 45 |
+
|
| 46 |
+
return transporter.sendMail(mailOptions);
|
| 47 |
+
};
|
| 48 |
+
|
| 49 |
+
module.exports = {
|
| 50 |
+
generateOtp,
|
| 51 |
+
sendOtpEmail
|
| 52 |
+
};
|
otpService.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const axios = require('axios');
|
| 2 |
+
|
| 3 |
+
const OTP_API_BASE_URL = 'https://mail-steel.vercel.app';
|
| 4 |
+
|
| 5 |
+
class OtpService {
|
| 6 |
+
constructor() {
|
| 7 |
+
this.axios = axios.create({
|
| 8 |
+
baseURL: OTP_API_BASE_URL,
|
| 9 |
+
timeout: 10000
|
| 10 |
+
});
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
// Send OTP to user email
|
| 14 |
+
async sendUserOtp(email) {
|
| 15 |
+
try {
|
| 16 |
+
const response = await this.axios.post('/send-otp', { email });
|
| 17 |
+
return response.data;
|
| 18 |
+
} catch (error) {
|
| 19 |
+
console.error('Error sending user OTP:', error.response?.data || error.message);
|
| 20 |
+
throw new Error(error.response?.data?.error || 'Failed to send OTP');
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
// Verify user OTP
|
| 25 |
+
async verifyUserOtp(email, otp) {
|
| 26 |
+
try {
|
| 27 |
+
const response = await this.axios.post('/verify-otp', { email, otp });
|
| 28 |
+
return response.data;
|
| 29 |
+
} catch (error) {
|
| 30 |
+
console.error('Error verifying user OTP:', error.response?.data || error.message);
|
| 31 |
+
throw new Error(error.response?.data?.error || 'Failed to verify OTP');
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
// Send OTP to admin email
|
| 36 |
+
async sendAdminOtp() {
|
| 37 |
+
try {
|
| 38 |
+
const response = await this.axios.post('/admin/send-otp');
|
| 39 |
+
return response.data;
|
| 40 |
+
} catch (error) {
|
| 41 |
+
console.error('Error sending admin OTP:', error.response?.data || error.message);
|
| 42 |
+
throw new Error(error.response?.data?.error || 'Failed to send admin OTP');
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
// Verify admin OTP
|
| 47 |
+
async verifyAdminOtp(otp) {
|
| 48 |
+
try {
|
| 49 |
+
const response = await this.axios.post('/admin/verify-otp', { otp });
|
| 50 |
+
return response.data;
|
| 51 |
+
} catch (error) {
|
| 52 |
+
console.error('Error verifying admin OTP:', error.response?.data || error.message);
|
| 53 |
+
throw new Error(error.response?.data?.error || 'Failed to verify admin OTP');
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
// Check OTP status
|
| 58 |
+
async checkOtpStatus() {
|
| 59 |
+
try {
|
| 60 |
+
const response = await this.axios.get('/otp-status');
|
| 61 |
+
return response.data;
|
| 62 |
+
} catch (error) {
|
| 63 |
+
console.error('Error checking OTP status:', error.response?.data || error.message);
|
| 64 |
+
throw new Error(error.response?.data?.error || 'Failed to check OTP status');
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
// Check API health
|
| 69 |
+
async checkHealth() {
|
| 70 |
+
try {
|
| 71 |
+
const response = await this.axios.get('/health');
|
| 72 |
+
return response.data;
|
| 73 |
+
} catch (error) {
|
| 74 |
+
console.error('Error checking API health:', error.response?.data || error.message);
|
| 75 |
+
throw new Error(error.response?.data?.error || 'Failed to check API health');
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
module.exports = new OtpService();
|
package-lock.json
ADDED
|
@@ -0,0 +1,2513 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "sld-gc-portal",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"lockfileVersion": 3,
|
| 5 |
+
"requires": true,
|
| 6 |
+
"packages": {
|
| 7 |
+
"": {
|
| 8 |
+
"name": "sld-gc-portal",
|
| 9 |
+
"version": "1.0.0",
|
| 10 |
+
"license": "MIT",
|
| 11 |
+
"dependencies": {
|
| 12 |
+
"aws-sdk": "^2.1450.0",
|
| 13 |
+
"axios": "^1.5.0",
|
| 14 |
+
"bcrypt": "^6.0.0",
|
| 15 |
+
"bcryptjs": "^2.4.3",
|
| 16 |
+
"compression": "^1.7.4",
|
| 17 |
+
"cors": "^2.8.5",
|
| 18 |
+
"dotenv": "^16.3.1",
|
| 19 |
+
"express": "^4.18.2",
|
| 20 |
+
"helmet": "^7.0.0",
|
| 21 |
+
"jsonwebtoken": "^9.0.2",
|
| 22 |
+
"morgan": "^1.10.0",
|
| 23 |
+
"multer": "^1.4.5-lts.1",
|
| 24 |
+
"nodemailer": "^6.9.5",
|
| 25 |
+
"pg": "^8.16.0",
|
| 26 |
+
"socket.io": "^4.8.1"
|
| 27 |
+
},
|
| 28 |
+
"devDependencies": {
|
| 29 |
+
"nodemon": "^3.0.1"
|
| 30 |
+
},
|
| 31 |
+
"engines": {
|
| 32 |
+
"node": ">=14.0.0"
|
| 33 |
+
}
|
| 34 |
+
},
|
| 35 |
+
"node_modules/@socket.io/component-emitter": {
|
| 36 |
+
"version": "3.1.2",
|
| 37 |
+
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
|
| 38 |
+
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==",
|
| 39 |
+
"license": "MIT"
|
| 40 |
+
},
|
| 41 |
+
"node_modules/@types/cors": {
|
| 42 |
+
"version": "2.8.19",
|
| 43 |
+
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz",
|
| 44 |
+
"integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==",
|
| 45 |
+
"license": "MIT",
|
| 46 |
+
"dependencies": {
|
| 47 |
+
"@types/node": "*"
|
| 48 |
+
}
|
| 49 |
+
},
|
| 50 |
+
"node_modules/@types/node": {
|
| 51 |
+
"version": "10.17.60",
|
| 52 |
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
|
| 53 |
+
"integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
|
| 54 |
+
"license": "MIT"
|
| 55 |
+
},
|
| 56 |
+
"node_modules/accepts": {
|
| 57 |
+
"version": "1.3.8",
|
| 58 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
| 59 |
+
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
| 60 |
+
"license": "MIT",
|
| 61 |
+
"dependencies": {
|
| 62 |
+
"mime-types": "~2.1.34",
|
| 63 |
+
"negotiator": "0.6.3"
|
| 64 |
+
},
|
| 65 |
+
"engines": {
|
| 66 |
+
"node": ">= 0.6"
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
"node_modules/anymatch": {
|
| 70 |
+
"version": "3.1.3",
|
| 71 |
+
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
| 72 |
+
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
| 73 |
+
"dev": true,
|
| 74 |
+
"license": "ISC",
|
| 75 |
+
"dependencies": {
|
| 76 |
+
"normalize-path": "^3.0.0",
|
| 77 |
+
"picomatch": "^2.0.4"
|
| 78 |
+
},
|
| 79 |
+
"engines": {
|
| 80 |
+
"node": ">= 8"
|
| 81 |
+
}
|
| 82 |
+
},
|
| 83 |
+
"node_modules/append-field": {
|
| 84 |
+
"version": "1.0.0",
|
| 85 |
+
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
|
| 86 |
+
"integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==",
|
| 87 |
+
"license": "MIT"
|
| 88 |
+
},
|
| 89 |
+
"node_modules/array-flatten": {
|
| 90 |
+
"version": "1.1.1",
|
| 91 |
+
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
| 92 |
+
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
|
| 93 |
+
"license": "MIT"
|
| 94 |
+
},
|
| 95 |
+
"node_modules/asynckit": {
|
| 96 |
+
"version": "0.4.0",
|
| 97 |
+
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
| 98 |
+
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
| 99 |
+
"license": "MIT"
|
| 100 |
+
},
|
| 101 |
+
"node_modules/available-typed-arrays": {
|
| 102 |
+
"version": "1.0.7",
|
| 103 |
+
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
|
| 104 |
+
"integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
|
| 105 |
+
"license": "MIT",
|
| 106 |
+
"dependencies": {
|
| 107 |
+
"possible-typed-array-names": "^1.0.0"
|
| 108 |
+
},
|
| 109 |
+
"engines": {
|
| 110 |
+
"node": ">= 0.4"
|
| 111 |
+
},
|
| 112 |
+
"funding": {
|
| 113 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 114 |
+
}
|
| 115 |
+
},
|
| 116 |
+
"node_modules/aws-sdk": {
|
| 117 |
+
"version": "2.1692.0",
|
| 118 |
+
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1692.0.tgz",
|
| 119 |
+
"integrity": "sha512-x511uiJ/57FIsbgUe5csJ13k3uzu25uWQE+XqfBis/sB0SFoiElJWXRkgEAUh0U6n40eT3ay5Ue4oPkRMu1LYw==",
|
| 120 |
+
"hasInstallScript": true,
|
| 121 |
+
"license": "Apache-2.0",
|
| 122 |
+
"dependencies": {
|
| 123 |
+
"buffer": "4.9.2",
|
| 124 |
+
"events": "1.1.1",
|
| 125 |
+
"ieee754": "1.1.13",
|
| 126 |
+
"jmespath": "0.16.0",
|
| 127 |
+
"querystring": "0.2.0",
|
| 128 |
+
"sax": "1.2.1",
|
| 129 |
+
"url": "0.10.3",
|
| 130 |
+
"util": "^0.12.4",
|
| 131 |
+
"uuid": "8.0.0",
|
| 132 |
+
"xml2js": "0.6.2"
|
| 133 |
+
},
|
| 134 |
+
"engines": {
|
| 135 |
+
"node": ">= 10.0.0"
|
| 136 |
+
}
|
| 137 |
+
},
|
| 138 |
+
"node_modules/aws-sdk/node_modules/uuid": {
|
| 139 |
+
"version": "8.0.0",
|
| 140 |
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz",
|
| 141 |
+
"integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==",
|
| 142 |
+
"license": "MIT",
|
| 143 |
+
"bin": {
|
| 144 |
+
"uuid": "dist/bin/uuid"
|
| 145 |
+
}
|
| 146 |
+
},
|
| 147 |
+
"node_modules/axios": {
|
| 148 |
+
"version": "1.9.0",
|
| 149 |
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
|
| 150 |
+
"integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
|
| 151 |
+
"license": "MIT",
|
| 152 |
+
"dependencies": {
|
| 153 |
+
"follow-redirects": "^1.15.6",
|
| 154 |
+
"form-data": "^4.0.0",
|
| 155 |
+
"proxy-from-env": "^1.1.0"
|
| 156 |
+
}
|
| 157 |
+
},
|
| 158 |
+
"node_modules/balanced-match": {
|
| 159 |
+
"version": "1.0.2",
|
| 160 |
+
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
| 161 |
+
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
| 162 |
+
"dev": true,
|
| 163 |
+
"license": "MIT"
|
| 164 |
+
},
|
| 165 |
+
"node_modules/base64-js": {
|
| 166 |
+
"version": "1.5.1",
|
| 167 |
+
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
| 168 |
+
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
| 169 |
+
"funding": [
|
| 170 |
+
{
|
| 171 |
+
"type": "github",
|
| 172 |
+
"url": "https://github.com/sponsors/feross"
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "patreon",
|
| 176 |
+
"url": "https://www.patreon.com/feross"
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"type": "consulting",
|
| 180 |
+
"url": "https://feross.org/support"
|
| 181 |
+
}
|
| 182 |
+
],
|
| 183 |
+
"license": "MIT"
|
| 184 |
+
},
|
| 185 |
+
"node_modules/base64id": {
|
| 186 |
+
"version": "2.0.0",
|
| 187 |
+
"resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
|
| 188 |
+
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
|
| 189 |
+
"license": "MIT",
|
| 190 |
+
"engines": {
|
| 191 |
+
"node": "^4.5.0 || >= 5.9"
|
| 192 |
+
}
|
| 193 |
+
},
|
| 194 |
+
"node_modules/basic-auth": {
|
| 195 |
+
"version": "2.0.1",
|
| 196 |
+
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
|
| 197 |
+
"integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
|
| 198 |
+
"license": "MIT",
|
| 199 |
+
"dependencies": {
|
| 200 |
+
"safe-buffer": "5.1.2"
|
| 201 |
+
},
|
| 202 |
+
"engines": {
|
| 203 |
+
"node": ">= 0.8"
|
| 204 |
+
}
|
| 205 |
+
},
|
| 206 |
+
"node_modules/basic-auth/node_modules/safe-buffer": {
|
| 207 |
+
"version": "5.1.2",
|
| 208 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
| 209 |
+
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
| 210 |
+
"license": "MIT"
|
| 211 |
+
},
|
| 212 |
+
"node_modules/bcrypt": {
|
| 213 |
+
"version": "6.0.0",
|
| 214 |
+
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-6.0.0.tgz",
|
| 215 |
+
"integrity": "sha512-cU8v/EGSrnH+HnxV2z0J7/blxH8gq7Xh2JFT6Aroax7UohdmiJJlxApMxtKfuI7z68NvvVcmR78k2LbT6efhRg==",
|
| 216 |
+
"hasInstallScript": true,
|
| 217 |
+
"license": "MIT",
|
| 218 |
+
"dependencies": {
|
| 219 |
+
"node-addon-api": "^8.3.0",
|
| 220 |
+
"node-gyp-build": "^4.8.4"
|
| 221 |
+
},
|
| 222 |
+
"engines": {
|
| 223 |
+
"node": ">= 18"
|
| 224 |
+
}
|
| 225 |
+
},
|
| 226 |
+
"node_modules/bcryptjs": {
|
| 227 |
+
"version": "2.4.3",
|
| 228 |
+
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
|
| 229 |
+
"integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==",
|
| 230 |
+
"license": "MIT"
|
| 231 |
+
},
|
| 232 |
+
"node_modules/binary-extensions": {
|
| 233 |
+
"version": "2.3.0",
|
| 234 |
+
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
| 235 |
+
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
| 236 |
+
"dev": true,
|
| 237 |
+
"license": "MIT",
|
| 238 |
+
"engines": {
|
| 239 |
+
"node": ">=8"
|
| 240 |
+
},
|
| 241 |
+
"funding": {
|
| 242 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 243 |
+
}
|
| 244 |
+
},
|
| 245 |
+
"node_modules/body-parser": {
|
| 246 |
+
"version": "1.20.3",
|
| 247 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
| 248 |
+
"integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
|
| 249 |
+
"license": "MIT",
|
| 250 |
+
"dependencies": {
|
| 251 |
+
"bytes": "3.1.2",
|
| 252 |
+
"content-type": "~1.0.5",
|
| 253 |
+
"debug": "2.6.9",
|
| 254 |
+
"depd": "2.0.0",
|
| 255 |
+
"destroy": "1.2.0",
|
| 256 |
+
"http-errors": "2.0.0",
|
| 257 |
+
"iconv-lite": "0.4.24",
|
| 258 |
+
"on-finished": "2.4.1",
|
| 259 |
+
"qs": "6.13.0",
|
| 260 |
+
"raw-body": "2.5.2",
|
| 261 |
+
"type-is": "~1.6.18",
|
| 262 |
+
"unpipe": "1.0.0"
|
| 263 |
+
},
|
| 264 |
+
"engines": {
|
| 265 |
+
"node": ">= 0.8",
|
| 266 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
| 267 |
+
}
|
| 268 |
+
},
|
| 269 |
+
"node_modules/brace-expansion": {
|
| 270 |
+
"version": "1.1.11",
|
| 271 |
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
| 272 |
+
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
| 273 |
+
"dev": true,
|
| 274 |
+
"license": "MIT",
|
| 275 |
+
"dependencies": {
|
| 276 |
+
"balanced-match": "^1.0.0",
|
| 277 |
+
"concat-map": "0.0.1"
|
| 278 |
+
}
|
| 279 |
+
},
|
| 280 |
+
"node_modules/braces": {
|
| 281 |
+
"version": "3.0.3",
|
| 282 |
+
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
| 283 |
+
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
| 284 |
+
"dev": true,
|
| 285 |
+
"license": "MIT",
|
| 286 |
+
"dependencies": {
|
| 287 |
+
"fill-range": "^7.1.1"
|
| 288 |
+
},
|
| 289 |
+
"engines": {
|
| 290 |
+
"node": ">=8"
|
| 291 |
+
}
|
| 292 |
+
},
|
| 293 |
+
"node_modules/buffer": {
|
| 294 |
+
"version": "4.9.2",
|
| 295 |
+
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
|
| 296 |
+
"integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
|
| 297 |
+
"license": "MIT",
|
| 298 |
+
"dependencies": {
|
| 299 |
+
"base64-js": "^1.0.2",
|
| 300 |
+
"ieee754": "^1.1.4",
|
| 301 |
+
"isarray": "^1.0.0"
|
| 302 |
+
}
|
| 303 |
+
},
|
| 304 |
+
"node_modules/buffer-equal-constant-time": {
|
| 305 |
+
"version": "1.0.1",
|
| 306 |
+
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
|
| 307 |
+
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
|
| 308 |
+
"license": "BSD-3-Clause"
|
| 309 |
+
},
|
| 310 |
+
"node_modules/buffer-from": {
|
| 311 |
+
"version": "1.1.2",
|
| 312 |
+
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
| 313 |
+
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
|
| 314 |
+
"license": "MIT"
|
| 315 |
+
},
|
| 316 |
+
"node_modules/busboy": {
|
| 317 |
+
"version": "1.6.0",
|
| 318 |
+
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
|
| 319 |
+
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
|
| 320 |
+
"dependencies": {
|
| 321 |
+
"streamsearch": "^1.1.0"
|
| 322 |
+
},
|
| 323 |
+
"engines": {
|
| 324 |
+
"node": ">=10.16.0"
|
| 325 |
+
}
|
| 326 |
+
},
|
| 327 |
+
"node_modules/bytes": {
|
| 328 |
+
"version": "3.1.2",
|
| 329 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
| 330 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
| 331 |
+
"license": "MIT",
|
| 332 |
+
"engines": {
|
| 333 |
+
"node": ">= 0.8"
|
| 334 |
+
}
|
| 335 |
+
},
|
| 336 |
+
"node_modules/call-bind": {
|
| 337 |
+
"version": "1.0.8",
|
| 338 |
+
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
|
| 339 |
+
"integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
|
| 340 |
+
"license": "MIT",
|
| 341 |
+
"dependencies": {
|
| 342 |
+
"call-bind-apply-helpers": "^1.0.0",
|
| 343 |
+
"es-define-property": "^1.0.0",
|
| 344 |
+
"get-intrinsic": "^1.2.4",
|
| 345 |
+
"set-function-length": "^1.2.2"
|
| 346 |
+
},
|
| 347 |
+
"engines": {
|
| 348 |
+
"node": ">= 0.4"
|
| 349 |
+
},
|
| 350 |
+
"funding": {
|
| 351 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 352 |
+
}
|
| 353 |
+
},
|
| 354 |
+
"node_modules/call-bind-apply-helpers": {
|
| 355 |
+
"version": "1.0.2",
|
| 356 |
+
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
| 357 |
+
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
| 358 |
+
"license": "MIT",
|
| 359 |
+
"dependencies": {
|
| 360 |
+
"es-errors": "^1.3.0",
|
| 361 |
+
"function-bind": "^1.1.2"
|
| 362 |
+
},
|
| 363 |
+
"engines": {
|
| 364 |
+
"node": ">= 0.4"
|
| 365 |
+
}
|
| 366 |
+
},
|
| 367 |
+
"node_modules/call-bound": {
|
| 368 |
+
"version": "1.0.4",
|
| 369 |
+
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
| 370 |
+
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
| 371 |
+
"license": "MIT",
|
| 372 |
+
"dependencies": {
|
| 373 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 374 |
+
"get-intrinsic": "^1.3.0"
|
| 375 |
+
},
|
| 376 |
+
"engines": {
|
| 377 |
+
"node": ">= 0.4"
|
| 378 |
+
},
|
| 379 |
+
"funding": {
|
| 380 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 381 |
+
}
|
| 382 |
+
},
|
| 383 |
+
"node_modules/chokidar": {
|
| 384 |
+
"version": "3.6.0",
|
| 385 |
+
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
| 386 |
+
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
| 387 |
+
"dev": true,
|
| 388 |
+
"license": "MIT",
|
| 389 |
+
"dependencies": {
|
| 390 |
+
"anymatch": "~3.1.2",
|
| 391 |
+
"braces": "~3.0.2",
|
| 392 |
+
"glob-parent": "~5.1.2",
|
| 393 |
+
"is-binary-path": "~2.1.0",
|
| 394 |
+
"is-glob": "~4.0.1",
|
| 395 |
+
"normalize-path": "~3.0.0",
|
| 396 |
+
"readdirp": "~3.6.0"
|
| 397 |
+
},
|
| 398 |
+
"engines": {
|
| 399 |
+
"node": ">= 8.10.0"
|
| 400 |
+
},
|
| 401 |
+
"funding": {
|
| 402 |
+
"url": "https://paulmillr.com/funding/"
|
| 403 |
+
},
|
| 404 |
+
"optionalDependencies": {
|
| 405 |
+
"fsevents": "~2.3.2"
|
| 406 |
+
}
|
| 407 |
+
},
|
| 408 |
+
"node_modules/combined-stream": {
|
| 409 |
+
"version": "1.0.8",
|
| 410 |
+
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
| 411 |
+
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
| 412 |
+
"license": "MIT",
|
| 413 |
+
"dependencies": {
|
| 414 |
+
"delayed-stream": "~1.0.0"
|
| 415 |
+
},
|
| 416 |
+
"engines": {
|
| 417 |
+
"node": ">= 0.8"
|
| 418 |
+
}
|
| 419 |
+
},
|
| 420 |
+
"node_modules/compressible": {
|
| 421 |
+
"version": "2.0.18",
|
| 422 |
+
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
|
| 423 |
+
"integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
|
| 424 |
+
"license": "MIT",
|
| 425 |
+
"dependencies": {
|
| 426 |
+
"mime-db": ">= 1.43.0 < 2"
|
| 427 |
+
},
|
| 428 |
+
"engines": {
|
| 429 |
+
"node": ">= 0.6"
|
| 430 |
+
}
|
| 431 |
+
},
|
| 432 |
+
"node_modules/compression": {
|
| 433 |
+
"version": "1.8.0",
|
| 434 |
+
"resolved": "https://registry.npmjs.org/compression/-/compression-1.8.0.tgz",
|
| 435 |
+
"integrity": "sha512-k6WLKfunuqCYD3t6AsuPGvQWaKwuLLh2/xHNcX4qE+vIfDNXpSqnrhwA7O53R7WVQUnt8dVAIW+YHr7xTgOgGA==",
|
| 436 |
+
"license": "MIT",
|
| 437 |
+
"dependencies": {
|
| 438 |
+
"bytes": "3.1.2",
|
| 439 |
+
"compressible": "~2.0.18",
|
| 440 |
+
"debug": "2.6.9",
|
| 441 |
+
"negotiator": "~0.6.4",
|
| 442 |
+
"on-headers": "~1.0.2",
|
| 443 |
+
"safe-buffer": "5.2.1",
|
| 444 |
+
"vary": "~1.1.2"
|
| 445 |
+
},
|
| 446 |
+
"engines": {
|
| 447 |
+
"node": ">= 0.8.0"
|
| 448 |
+
}
|
| 449 |
+
},
|
| 450 |
+
"node_modules/compression/node_modules/negotiator": {
|
| 451 |
+
"version": "0.6.4",
|
| 452 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
|
| 453 |
+
"integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
|
| 454 |
+
"license": "MIT",
|
| 455 |
+
"engines": {
|
| 456 |
+
"node": ">= 0.6"
|
| 457 |
+
}
|
| 458 |
+
},
|
| 459 |
+
"node_modules/concat-map": {
|
| 460 |
+
"version": "0.0.1",
|
| 461 |
+
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
| 462 |
+
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
| 463 |
+
"dev": true,
|
| 464 |
+
"license": "MIT"
|
| 465 |
+
},
|
| 466 |
+
"node_modules/content-disposition": {
|
| 467 |
+
"version": "0.5.4",
|
| 468 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
| 469 |
+
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
| 470 |
+
"license": "MIT",
|
| 471 |
+
"dependencies": {
|
| 472 |
+
"safe-buffer": "5.2.1"
|
| 473 |
+
},
|
| 474 |
+
"engines": {
|
| 475 |
+
"node": ">= 0.6"
|
| 476 |
+
}
|
| 477 |
+
},
|
| 478 |
+
"node_modules/content-type": {
|
| 479 |
+
"version": "1.0.5",
|
| 480 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
| 481 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
| 482 |
+
"license": "MIT",
|
| 483 |
+
"engines": {
|
| 484 |
+
"node": ">= 0.6"
|
| 485 |
+
}
|
| 486 |
+
},
|
| 487 |
+
"node_modules/cookie": {
|
| 488 |
+
"version": "0.7.1",
|
| 489 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
|
| 490 |
+
"integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
|
| 491 |
+
"license": "MIT",
|
| 492 |
+
"engines": {
|
| 493 |
+
"node": ">= 0.6"
|
| 494 |
+
}
|
| 495 |
+
},
|
| 496 |
+
"node_modules/cookie-signature": {
|
| 497 |
+
"version": "1.0.6",
|
| 498 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
| 499 |
+
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
| 500 |
+
"license": "MIT"
|
| 501 |
+
},
|
| 502 |
+
"node_modules/core-util-is": {
|
| 503 |
+
"version": "1.0.3",
|
| 504 |
+
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
| 505 |
+
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
|
| 506 |
+
"license": "MIT"
|
| 507 |
+
},
|
| 508 |
+
"node_modules/cors": {
|
| 509 |
+
"version": "2.8.5",
|
| 510 |
+
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
|
| 511 |
+
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
| 512 |
+
"license": "MIT",
|
| 513 |
+
"dependencies": {
|
| 514 |
+
"object-assign": "^4",
|
| 515 |
+
"vary": "^1"
|
| 516 |
+
},
|
| 517 |
+
"engines": {
|
| 518 |
+
"node": ">= 0.10"
|
| 519 |
+
}
|
| 520 |
+
},
|
| 521 |
+
"node_modules/debug": {
|
| 522 |
+
"version": "2.6.9",
|
| 523 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
| 524 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
| 525 |
+
"license": "MIT",
|
| 526 |
+
"dependencies": {
|
| 527 |
+
"ms": "2.0.0"
|
| 528 |
+
}
|
| 529 |
+
},
|
| 530 |
+
"node_modules/define-data-property": {
|
| 531 |
+
"version": "1.1.4",
|
| 532 |
+
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
| 533 |
+
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
| 534 |
+
"license": "MIT",
|
| 535 |
+
"dependencies": {
|
| 536 |
+
"es-define-property": "^1.0.0",
|
| 537 |
+
"es-errors": "^1.3.0",
|
| 538 |
+
"gopd": "^1.0.1"
|
| 539 |
+
},
|
| 540 |
+
"engines": {
|
| 541 |
+
"node": ">= 0.4"
|
| 542 |
+
},
|
| 543 |
+
"funding": {
|
| 544 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 545 |
+
}
|
| 546 |
+
},
|
| 547 |
+
"node_modules/delayed-stream": {
|
| 548 |
+
"version": "1.0.0",
|
| 549 |
+
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
| 550 |
+
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
| 551 |
+
"license": "MIT",
|
| 552 |
+
"engines": {
|
| 553 |
+
"node": ">=0.4.0"
|
| 554 |
+
}
|
| 555 |
+
},
|
| 556 |
+
"node_modules/depd": {
|
| 557 |
+
"version": "2.0.0",
|
| 558 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
| 559 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
| 560 |
+
"license": "MIT",
|
| 561 |
+
"engines": {
|
| 562 |
+
"node": ">= 0.8"
|
| 563 |
+
}
|
| 564 |
+
},
|
| 565 |
+
"node_modules/destroy": {
|
| 566 |
+
"version": "1.2.0",
|
| 567 |
+
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
| 568 |
+
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
| 569 |
+
"license": "MIT",
|
| 570 |
+
"engines": {
|
| 571 |
+
"node": ">= 0.8",
|
| 572 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
| 573 |
+
}
|
| 574 |
+
},
|
| 575 |
+
"node_modules/dotenv": {
|
| 576 |
+
"version": "16.5.0",
|
| 577 |
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz",
|
| 578 |
+
"integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==",
|
| 579 |
+
"license": "BSD-2-Clause",
|
| 580 |
+
"engines": {
|
| 581 |
+
"node": ">=12"
|
| 582 |
+
},
|
| 583 |
+
"funding": {
|
| 584 |
+
"url": "https://dotenvx.com"
|
| 585 |
+
}
|
| 586 |
+
},
|
| 587 |
+
"node_modules/dunder-proto": {
|
| 588 |
+
"version": "1.0.1",
|
| 589 |
+
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
| 590 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
| 591 |
+
"license": "MIT",
|
| 592 |
+
"dependencies": {
|
| 593 |
+
"call-bind-apply-helpers": "^1.0.1",
|
| 594 |
+
"es-errors": "^1.3.0",
|
| 595 |
+
"gopd": "^1.2.0"
|
| 596 |
+
},
|
| 597 |
+
"engines": {
|
| 598 |
+
"node": ">= 0.4"
|
| 599 |
+
}
|
| 600 |
+
},
|
| 601 |
+
"node_modules/ecdsa-sig-formatter": {
|
| 602 |
+
"version": "1.0.11",
|
| 603 |
+
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
|
| 604 |
+
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
|
| 605 |
+
"license": "Apache-2.0",
|
| 606 |
+
"dependencies": {
|
| 607 |
+
"safe-buffer": "^5.0.1"
|
| 608 |
+
}
|
| 609 |
+
},
|
| 610 |
+
"node_modules/ee-first": {
|
| 611 |
+
"version": "1.1.1",
|
| 612 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
| 613 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
| 614 |
+
"license": "MIT"
|
| 615 |
+
},
|
| 616 |
+
"node_modules/encodeurl": {
|
| 617 |
+
"version": "2.0.0",
|
| 618 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
| 619 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
| 620 |
+
"license": "MIT",
|
| 621 |
+
"engines": {
|
| 622 |
+
"node": ">= 0.8"
|
| 623 |
+
}
|
| 624 |
+
},
|
| 625 |
+
"node_modules/engine.io": {
|
| 626 |
+
"version": "6.6.4",
|
| 627 |
+
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.4.tgz",
|
| 628 |
+
"integrity": "sha512-ZCkIjSYNDyGn0R6ewHDtXgns/Zre/NT6Agvq1/WobF7JXgFff4SeDroKiCO3fNJreU9YG429Sc81o4w5ok/W5g==",
|
| 629 |
+
"license": "MIT",
|
| 630 |
+
"dependencies": {
|
| 631 |
+
"@types/cors": "^2.8.12",
|
| 632 |
+
"@types/node": ">=10.0.0",
|
| 633 |
+
"accepts": "~1.3.4",
|
| 634 |
+
"base64id": "2.0.0",
|
| 635 |
+
"cookie": "~0.7.2",
|
| 636 |
+
"cors": "~2.8.5",
|
| 637 |
+
"debug": "~4.3.1",
|
| 638 |
+
"engine.io-parser": "~5.2.1",
|
| 639 |
+
"ws": "~8.17.1"
|
| 640 |
+
},
|
| 641 |
+
"engines": {
|
| 642 |
+
"node": ">=10.2.0"
|
| 643 |
+
}
|
| 644 |
+
},
|
| 645 |
+
"node_modules/engine.io-parser": {
|
| 646 |
+
"version": "5.2.3",
|
| 647 |
+
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
|
| 648 |
+
"integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
|
| 649 |
+
"license": "MIT",
|
| 650 |
+
"engines": {
|
| 651 |
+
"node": ">=10.0.0"
|
| 652 |
+
}
|
| 653 |
+
},
|
| 654 |
+
"node_modules/engine.io/node_modules/cookie": {
|
| 655 |
+
"version": "0.7.2",
|
| 656 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
|
| 657 |
+
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
|
| 658 |
+
"license": "MIT",
|
| 659 |
+
"engines": {
|
| 660 |
+
"node": ">= 0.6"
|
| 661 |
+
}
|
| 662 |
+
},
|
| 663 |
+
"node_modules/engine.io/node_modules/debug": {
|
| 664 |
+
"version": "4.3.7",
|
| 665 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
| 666 |
+
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
| 667 |
+
"license": "MIT",
|
| 668 |
+
"dependencies": {
|
| 669 |
+
"ms": "^2.1.3"
|
| 670 |
+
},
|
| 671 |
+
"engines": {
|
| 672 |
+
"node": ">=6.0"
|
| 673 |
+
},
|
| 674 |
+
"peerDependenciesMeta": {
|
| 675 |
+
"supports-color": {
|
| 676 |
+
"optional": true
|
| 677 |
+
}
|
| 678 |
+
}
|
| 679 |
+
},
|
| 680 |
+
"node_modules/engine.io/node_modules/ms": {
|
| 681 |
+
"version": "2.1.3",
|
| 682 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 683 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 684 |
+
"license": "MIT"
|
| 685 |
+
},
|
| 686 |
+
"node_modules/es-define-property": {
|
| 687 |
+
"version": "1.0.1",
|
| 688 |
+
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
| 689 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
| 690 |
+
"license": "MIT",
|
| 691 |
+
"engines": {
|
| 692 |
+
"node": ">= 0.4"
|
| 693 |
+
}
|
| 694 |
+
},
|
| 695 |
+
"node_modules/es-errors": {
|
| 696 |
+
"version": "1.3.0",
|
| 697 |
+
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
| 698 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
| 699 |
+
"license": "MIT",
|
| 700 |
+
"engines": {
|
| 701 |
+
"node": ">= 0.4"
|
| 702 |
+
}
|
| 703 |
+
},
|
| 704 |
+
"node_modules/es-object-atoms": {
|
| 705 |
+
"version": "1.1.1",
|
| 706 |
+
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
| 707 |
+
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
| 708 |
+
"license": "MIT",
|
| 709 |
+
"dependencies": {
|
| 710 |
+
"es-errors": "^1.3.0"
|
| 711 |
+
},
|
| 712 |
+
"engines": {
|
| 713 |
+
"node": ">= 0.4"
|
| 714 |
+
}
|
| 715 |
+
},
|
| 716 |
+
"node_modules/es-set-tostringtag": {
|
| 717 |
+
"version": "2.1.0",
|
| 718 |
+
"resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
|
| 719 |
+
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
|
| 720 |
+
"license": "MIT",
|
| 721 |
+
"dependencies": {
|
| 722 |
+
"es-errors": "^1.3.0",
|
| 723 |
+
"get-intrinsic": "^1.2.6",
|
| 724 |
+
"has-tostringtag": "^1.0.2",
|
| 725 |
+
"hasown": "^2.0.2"
|
| 726 |
+
},
|
| 727 |
+
"engines": {
|
| 728 |
+
"node": ">= 0.4"
|
| 729 |
+
}
|
| 730 |
+
},
|
| 731 |
+
"node_modules/escape-html": {
|
| 732 |
+
"version": "1.0.3",
|
| 733 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
| 734 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
| 735 |
+
"license": "MIT"
|
| 736 |
+
},
|
| 737 |
+
"node_modules/etag": {
|
| 738 |
+
"version": "1.8.1",
|
| 739 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
| 740 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
| 741 |
+
"license": "MIT",
|
| 742 |
+
"engines": {
|
| 743 |
+
"node": ">= 0.6"
|
| 744 |
+
}
|
| 745 |
+
},
|
| 746 |
+
"node_modules/events": {
|
| 747 |
+
"version": "1.1.1",
|
| 748 |
+
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
| 749 |
+
"integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==",
|
| 750 |
+
"license": "MIT",
|
| 751 |
+
"engines": {
|
| 752 |
+
"node": ">=0.4.x"
|
| 753 |
+
}
|
| 754 |
+
},
|
| 755 |
+
"node_modules/express": {
|
| 756 |
+
"version": "4.21.2",
|
| 757 |
+
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
| 758 |
+
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
| 759 |
+
"license": "MIT",
|
| 760 |
+
"dependencies": {
|
| 761 |
+
"accepts": "~1.3.8",
|
| 762 |
+
"array-flatten": "1.1.1",
|
| 763 |
+
"body-parser": "1.20.3",
|
| 764 |
+
"content-disposition": "0.5.4",
|
| 765 |
+
"content-type": "~1.0.4",
|
| 766 |
+
"cookie": "0.7.1",
|
| 767 |
+
"cookie-signature": "1.0.6",
|
| 768 |
+
"debug": "2.6.9",
|
| 769 |
+
"depd": "2.0.0",
|
| 770 |
+
"encodeurl": "~2.0.0",
|
| 771 |
+
"escape-html": "~1.0.3",
|
| 772 |
+
"etag": "~1.8.1",
|
| 773 |
+
"finalhandler": "1.3.1",
|
| 774 |
+
"fresh": "0.5.2",
|
| 775 |
+
"http-errors": "2.0.0",
|
| 776 |
+
"merge-descriptors": "1.0.3",
|
| 777 |
+
"methods": "~1.1.2",
|
| 778 |
+
"on-finished": "2.4.1",
|
| 779 |
+
"parseurl": "~1.3.3",
|
| 780 |
+
"path-to-regexp": "0.1.12",
|
| 781 |
+
"proxy-addr": "~2.0.7",
|
| 782 |
+
"qs": "6.13.0",
|
| 783 |
+
"range-parser": "~1.2.1",
|
| 784 |
+
"safe-buffer": "5.2.1",
|
| 785 |
+
"send": "0.19.0",
|
| 786 |
+
"serve-static": "1.16.2",
|
| 787 |
+
"setprototypeof": "1.2.0",
|
| 788 |
+
"statuses": "2.0.1",
|
| 789 |
+
"type-is": "~1.6.18",
|
| 790 |
+
"utils-merge": "1.0.1",
|
| 791 |
+
"vary": "~1.1.2"
|
| 792 |
+
},
|
| 793 |
+
"engines": {
|
| 794 |
+
"node": ">= 0.10.0"
|
| 795 |
+
},
|
| 796 |
+
"funding": {
|
| 797 |
+
"type": "opencollective",
|
| 798 |
+
"url": "https://opencollective.com/express"
|
| 799 |
+
}
|
| 800 |
+
},
|
| 801 |
+
"node_modules/fill-range": {
|
| 802 |
+
"version": "7.1.1",
|
| 803 |
+
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
| 804 |
+
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
| 805 |
+
"dev": true,
|
| 806 |
+
"license": "MIT",
|
| 807 |
+
"dependencies": {
|
| 808 |
+
"to-regex-range": "^5.0.1"
|
| 809 |
+
},
|
| 810 |
+
"engines": {
|
| 811 |
+
"node": ">=8"
|
| 812 |
+
}
|
| 813 |
+
},
|
| 814 |
+
"node_modules/finalhandler": {
|
| 815 |
+
"version": "1.3.1",
|
| 816 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
|
| 817 |
+
"integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
|
| 818 |
+
"license": "MIT",
|
| 819 |
+
"dependencies": {
|
| 820 |
+
"debug": "2.6.9",
|
| 821 |
+
"encodeurl": "~2.0.0",
|
| 822 |
+
"escape-html": "~1.0.3",
|
| 823 |
+
"on-finished": "2.4.1",
|
| 824 |
+
"parseurl": "~1.3.3",
|
| 825 |
+
"statuses": "2.0.1",
|
| 826 |
+
"unpipe": "~1.0.0"
|
| 827 |
+
},
|
| 828 |
+
"engines": {
|
| 829 |
+
"node": ">= 0.8"
|
| 830 |
+
}
|
| 831 |
+
},
|
| 832 |
+
"node_modules/follow-redirects": {
|
| 833 |
+
"version": "1.15.9",
|
| 834 |
+
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
|
| 835 |
+
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
|
| 836 |
+
"funding": [
|
| 837 |
+
{
|
| 838 |
+
"type": "individual",
|
| 839 |
+
"url": "https://github.com/sponsors/RubenVerborgh"
|
| 840 |
+
}
|
| 841 |
+
],
|
| 842 |
+
"license": "MIT",
|
| 843 |
+
"engines": {
|
| 844 |
+
"node": ">=4.0"
|
| 845 |
+
},
|
| 846 |
+
"peerDependenciesMeta": {
|
| 847 |
+
"debug": {
|
| 848 |
+
"optional": true
|
| 849 |
+
}
|
| 850 |
+
}
|
| 851 |
+
},
|
| 852 |
+
"node_modules/for-each": {
|
| 853 |
+
"version": "0.3.5",
|
| 854 |
+
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
|
| 855 |
+
"integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
|
| 856 |
+
"license": "MIT",
|
| 857 |
+
"dependencies": {
|
| 858 |
+
"is-callable": "^1.2.7"
|
| 859 |
+
},
|
| 860 |
+
"engines": {
|
| 861 |
+
"node": ">= 0.4"
|
| 862 |
+
},
|
| 863 |
+
"funding": {
|
| 864 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 865 |
+
}
|
| 866 |
+
},
|
| 867 |
+
"node_modules/form-data": {
|
| 868 |
+
"version": "4.0.3",
|
| 869 |
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz",
|
| 870 |
+
"integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==",
|
| 871 |
+
"license": "MIT",
|
| 872 |
+
"dependencies": {
|
| 873 |
+
"asynckit": "^0.4.0",
|
| 874 |
+
"combined-stream": "^1.0.8",
|
| 875 |
+
"es-set-tostringtag": "^2.1.0",
|
| 876 |
+
"hasown": "^2.0.2",
|
| 877 |
+
"mime-types": "^2.1.12"
|
| 878 |
+
},
|
| 879 |
+
"engines": {
|
| 880 |
+
"node": ">= 6"
|
| 881 |
+
}
|
| 882 |
+
},
|
| 883 |
+
"node_modules/forwarded": {
|
| 884 |
+
"version": "0.2.0",
|
| 885 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
| 886 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
| 887 |
+
"license": "MIT",
|
| 888 |
+
"engines": {
|
| 889 |
+
"node": ">= 0.6"
|
| 890 |
+
}
|
| 891 |
+
},
|
| 892 |
+
"node_modules/fresh": {
|
| 893 |
+
"version": "0.5.2",
|
| 894 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
| 895 |
+
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
| 896 |
+
"license": "MIT",
|
| 897 |
+
"engines": {
|
| 898 |
+
"node": ">= 0.6"
|
| 899 |
+
}
|
| 900 |
+
},
|
| 901 |
+
"node_modules/fsevents": {
|
| 902 |
+
"version": "2.3.3",
|
| 903 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
| 904 |
+
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
| 905 |
+
"dev": true,
|
| 906 |
+
"hasInstallScript": true,
|
| 907 |
+
"license": "MIT",
|
| 908 |
+
"optional": true,
|
| 909 |
+
"os": [
|
| 910 |
+
"darwin"
|
| 911 |
+
],
|
| 912 |
+
"engines": {
|
| 913 |
+
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
| 914 |
+
}
|
| 915 |
+
},
|
| 916 |
+
"node_modules/function-bind": {
|
| 917 |
+
"version": "1.1.2",
|
| 918 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
| 919 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
| 920 |
+
"license": "MIT",
|
| 921 |
+
"funding": {
|
| 922 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 923 |
+
}
|
| 924 |
+
},
|
| 925 |
+
"node_modules/get-intrinsic": {
|
| 926 |
+
"version": "1.3.0",
|
| 927 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
| 928 |
+
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
| 929 |
+
"license": "MIT",
|
| 930 |
+
"dependencies": {
|
| 931 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 932 |
+
"es-define-property": "^1.0.1",
|
| 933 |
+
"es-errors": "^1.3.0",
|
| 934 |
+
"es-object-atoms": "^1.1.1",
|
| 935 |
+
"function-bind": "^1.1.2",
|
| 936 |
+
"get-proto": "^1.0.1",
|
| 937 |
+
"gopd": "^1.2.0",
|
| 938 |
+
"has-symbols": "^1.1.0",
|
| 939 |
+
"hasown": "^2.0.2",
|
| 940 |
+
"math-intrinsics": "^1.1.0"
|
| 941 |
+
},
|
| 942 |
+
"engines": {
|
| 943 |
+
"node": ">= 0.4"
|
| 944 |
+
},
|
| 945 |
+
"funding": {
|
| 946 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 947 |
+
}
|
| 948 |
+
},
|
| 949 |
+
"node_modules/get-proto": {
|
| 950 |
+
"version": "1.0.1",
|
| 951 |
+
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
| 952 |
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
| 953 |
+
"license": "MIT",
|
| 954 |
+
"dependencies": {
|
| 955 |
+
"dunder-proto": "^1.0.1",
|
| 956 |
+
"es-object-atoms": "^1.0.0"
|
| 957 |
+
},
|
| 958 |
+
"engines": {
|
| 959 |
+
"node": ">= 0.4"
|
| 960 |
+
}
|
| 961 |
+
},
|
| 962 |
+
"node_modules/glob-parent": {
|
| 963 |
+
"version": "5.1.2",
|
| 964 |
+
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
| 965 |
+
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
| 966 |
+
"dev": true,
|
| 967 |
+
"license": "ISC",
|
| 968 |
+
"dependencies": {
|
| 969 |
+
"is-glob": "^4.0.1"
|
| 970 |
+
},
|
| 971 |
+
"engines": {
|
| 972 |
+
"node": ">= 6"
|
| 973 |
+
}
|
| 974 |
+
},
|
| 975 |
+
"node_modules/gopd": {
|
| 976 |
+
"version": "1.2.0",
|
| 977 |
+
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
| 978 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
| 979 |
+
"license": "MIT",
|
| 980 |
+
"engines": {
|
| 981 |
+
"node": ">= 0.4"
|
| 982 |
+
},
|
| 983 |
+
"funding": {
|
| 984 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 985 |
+
}
|
| 986 |
+
},
|
| 987 |
+
"node_modules/has-flag": {
|
| 988 |
+
"version": "3.0.0",
|
| 989 |
+
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
| 990 |
+
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
|
| 991 |
+
"dev": true,
|
| 992 |
+
"license": "MIT",
|
| 993 |
+
"engines": {
|
| 994 |
+
"node": ">=4"
|
| 995 |
+
}
|
| 996 |
+
},
|
| 997 |
+
"node_modules/has-property-descriptors": {
|
| 998 |
+
"version": "1.0.2",
|
| 999 |
+
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
| 1000 |
+
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
| 1001 |
+
"license": "MIT",
|
| 1002 |
+
"dependencies": {
|
| 1003 |
+
"es-define-property": "^1.0.0"
|
| 1004 |
+
},
|
| 1005 |
+
"funding": {
|
| 1006 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1007 |
+
}
|
| 1008 |
+
},
|
| 1009 |
+
"node_modules/has-symbols": {
|
| 1010 |
+
"version": "1.1.0",
|
| 1011 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
| 1012 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
| 1013 |
+
"license": "MIT",
|
| 1014 |
+
"engines": {
|
| 1015 |
+
"node": ">= 0.4"
|
| 1016 |
+
},
|
| 1017 |
+
"funding": {
|
| 1018 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1019 |
+
}
|
| 1020 |
+
},
|
| 1021 |
+
"node_modules/has-tostringtag": {
|
| 1022 |
+
"version": "1.0.2",
|
| 1023 |
+
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
| 1024 |
+
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
| 1025 |
+
"license": "MIT",
|
| 1026 |
+
"dependencies": {
|
| 1027 |
+
"has-symbols": "^1.0.3"
|
| 1028 |
+
},
|
| 1029 |
+
"engines": {
|
| 1030 |
+
"node": ">= 0.4"
|
| 1031 |
+
},
|
| 1032 |
+
"funding": {
|
| 1033 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1034 |
+
}
|
| 1035 |
+
},
|
| 1036 |
+
"node_modules/hasown": {
|
| 1037 |
+
"version": "2.0.2",
|
| 1038 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
| 1039 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
| 1040 |
+
"license": "MIT",
|
| 1041 |
+
"dependencies": {
|
| 1042 |
+
"function-bind": "^1.1.2"
|
| 1043 |
+
},
|
| 1044 |
+
"engines": {
|
| 1045 |
+
"node": ">= 0.4"
|
| 1046 |
+
}
|
| 1047 |
+
},
|
| 1048 |
+
"node_modules/helmet": {
|
| 1049 |
+
"version": "7.2.0",
|
| 1050 |
+
"resolved": "https://registry.npmjs.org/helmet/-/helmet-7.2.0.tgz",
|
| 1051 |
+
"integrity": "sha512-ZRiwvN089JfMXokizgqEPXsl2Guk094yExfoDXR0cBYWxtBbaSww/w+vT4WEJsBW2iTUi1GgZ6swmoug3Oy4Xw==",
|
| 1052 |
+
"license": "MIT",
|
| 1053 |
+
"engines": {
|
| 1054 |
+
"node": ">=16.0.0"
|
| 1055 |
+
}
|
| 1056 |
+
},
|
| 1057 |
+
"node_modules/http-errors": {
|
| 1058 |
+
"version": "2.0.0",
|
| 1059 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
| 1060 |
+
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
| 1061 |
+
"license": "MIT",
|
| 1062 |
+
"dependencies": {
|
| 1063 |
+
"depd": "2.0.0",
|
| 1064 |
+
"inherits": "2.0.4",
|
| 1065 |
+
"setprototypeof": "1.2.0",
|
| 1066 |
+
"statuses": "2.0.1",
|
| 1067 |
+
"toidentifier": "1.0.1"
|
| 1068 |
+
},
|
| 1069 |
+
"engines": {
|
| 1070 |
+
"node": ">= 0.8"
|
| 1071 |
+
}
|
| 1072 |
+
},
|
| 1073 |
+
"node_modules/iconv-lite": {
|
| 1074 |
+
"version": "0.4.24",
|
| 1075 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
| 1076 |
+
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
| 1077 |
+
"license": "MIT",
|
| 1078 |
+
"dependencies": {
|
| 1079 |
+
"safer-buffer": ">= 2.1.2 < 3"
|
| 1080 |
+
},
|
| 1081 |
+
"engines": {
|
| 1082 |
+
"node": ">=0.10.0"
|
| 1083 |
+
}
|
| 1084 |
+
},
|
| 1085 |
+
"node_modules/ieee754": {
|
| 1086 |
+
"version": "1.1.13",
|
| 1087 |
+
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
|
| 1088 |
+
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
|
| 1089 |
+
"license": "BSD-3-Clause"
|
| 1090 |
+
},
|
| 1091 |
+
"node_modules/ignore-by-default": {
|
| 1092 |
+
"version": "1.0.1",
|
| 1093 |
+
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
|
| 1094 |
+
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
|
| 1095 |
+
"dev": true,
|
| 1096 |
+
"license": "ISC"
|
| 1097 |
+
},
|
| 1098 |
+
"node_modules/inherits": {
|
| 1099 |
+
"version": "2.0.4",
|
| 1100 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
| 1101 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
| 1102 |
+
"license": "ISC"
|
| 1103 |
+
},
|
| 1104 |
+
"node_modules/ipaddr.js": {
|
| 1105 |
+
"version": "1.9.1",
|
| 1106 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
| 1107 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
| 1108 |
+
"license": "MIT",
|
| 1109 |
+
"engines": {
|
| 1110 |
+
"node": ">= 0.10"
|
| 1111 |
+
}
|
| 1112 |
+
},
|
| 1113 |
+
"node_modules/is-arguments": {
|
| 1114 |
+
"version": "1.2.0",
|
| 1115 |
+
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz",
|
| 1116 |
+
"integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
|
| 1117 |
+
"license": "MIT",
|
| 1118 |
+
"dependencies": {
|
| 1119 |
+
"call-bound": "^1.0.2",
|
| 1120 |
+
"has-tostringtag": "^1.0.2"
|
| 1121 |
+
},
|
| 1122 |
+
"engines": {
|
| 1123 |
+
"node": ">= 0.4"
|
| 1124 |
+
},
|
| 1125 |
+
"funding": {
|
| 1126 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1127 |
+
}
|
| 1128 |
+
},
|
| 1129 |
+
"node_modules/is-binary-path": {
|
| 1130 |
+
"version": "2.1.0",
|
| 1131 |
+
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
| 1132 |
+
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
| 1133 |
+
"dev": true,
|
| 1134 |
+
"license": "MIT",
|
| 1135 |
+
"dependencies": {
|
| 1136 |
+
"binary-extensions": "^2.0.0"
|
| 1137 |
+
},
|
| 1138 |
+
"engines": {
|
| 1139 |
+
"node": ">=8"
|
| 1140 |
+
}
|
| 1141 |
+
},
|
| 1142 |
+
"node_modules/is-callable": {
|
| 1143 |
+
"version": "1.2.7",
|
| 1144 |
+
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
|
| 1145 |
+
"integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
|
| 1146 |
+
"license": "MIT",
|
| 1147 |
+
"engines": {
|
| 1148 |
+
"node": ">= 0.4"
|
| 1149 |
+
},
|
| 1150 |
+
"funding": {
|
| 1151 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1152 |
+
}
|
| 1153 |
+
},
|
| 1154 |
+
"node_modules/is-extglob": {
|
| 1155 |
+
"version": "2.1.1",
|
| 1156 |
+
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
| 1157 |
+
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
| 1158 |
+
"dev": true,
|
| 1159 |
+
"license": "MIT",
|
| 1160 |
+
"engines": {
|
| 1161 |
+
"node": ">=0.10.0"
|
| 1162 |
+
}
|
| 1163 |
+
},
|
| 1164 |
+
"node_modules/is-generator-function": {
|
| 1165 |
+
"version": "1.1.0",
|
| 1166 |
+
"resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz",
|
| 1167 |
+
"integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==",
|
| 1168 |
+
"license": "MIT",
|
| 1169 |
+
"dependencies": {
|
| 1170 |
+
"call-bound": "^1.0.3",
|
| 1171 |
+
"get-proto": "^1.0.0",
|
| 1172 |
+
"has-tostringtag": "^1.0.2",
|
| 1173 |
+
"safe-regex-test": "^1.1.0"
|
| 1174 |
+
},
|
| 1175 |
+
"engines": {
|
| 1176 |
+
"node": ">= 0.4"
|
| 1177 |
+
},
|
| 1178 |
+
"funding": {
|
| 1179 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1180 |
+
}
|
| 1181 |
+
},
|
| 1182 |
+
"node_modules/is-glob": {
|
| 1183 |
+
"version": "4.0.3",
|
| 1184 |
+
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
| 1185 |
+
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
| 1186 |
+
"dev": true,
|
| 1187 |
+
"license": "MIT",
|
| 1188 |
+
"dependencies": {
|
| 1189 |
+
"is-extglob": "^2.1.1"
|
| 1190 |
+
},
|
| 1191 |
+
"engines": {
|
| 1192 |
+
"node": ">=0.10.0"
|
| 1193 |
+
}
|
| 1194 |
+
},
|
| 1195 |
+
"node_modules/is-number": {
|
| 1196 |
+
"version": "7.0.0",
|
| 1197 |
+
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
| 1198 |
+
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
| 1199 |
+
"dev": true,
|
| 1200 |
+
"license": "MIT",
|
| 1201 |
+
"engines": {
|
| 1202 |
+
"node": ">=0.12.0"
|
| 1203 |
+
}
|
| 1204 |
+
},
|
| 1205 |
+
"node_modules/is-regex": {
|
| 1206 |
+
"version": "1.2.1",
|
| 1207 |
+
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
|
| 1208 |
+
"integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==",
|
| 1209 |
+
"license": "MIT",
|
| 1210 |
+
"dependencies": {
|
| 1211 |
+
"call-bound": "^1.0.2",
|
| 1212 |
+
"gopd": "^1.2.0",
|
| 1213 |
+
"has-tostringtag": "^1.0.2",
|
| 1214 |
+
"hasown": "^2.0.2"
|
| 1215 |
+
},
|
| 1216 |
+
"engines": {
|
| 1217 |
+
"node": ">= 0.4"
|
| 1218 |
+
},
|
| 1219 |
+
"funding": {
|
| 1220 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1221 |
+
}
|
| 1222 |
+
},
|
| 1223 |
+
"node_modules/is-typed-array": {
|
| 1224 |
+
"version": "1.1.15",
|
| 1225 |
+
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
|
| 1226 |
+
"integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
|
| 1227 |
+
"license": "MIT",
|
| 1228 |
+
"dependencies": {
|
| 1229 |
+
"which-typed-array": "^1.1.16"
|
| 1230 |
+
},
|
| 1231 |
+
"engines": {
|
| 1232 |
+
"node": ">= 0.4"
|
| 1233 |
+
},
|
| 1234 |
+
"funding": {
|
| 1235 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1236 |
+
}
|
| 1237 |
+
},
|
| 1238 |
+
"node_modules/isarray": {
|
| 1239 |
+
"version": "1.0.0",
|
| 1240 |
+
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
| 1241 |
+
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
|
| 1242 |
+
"license": "MIT"
|
| 1243 |
+
},
|
| 1244 |
+
"node_modules/jmespath": {
|
| 1245 |
+
"version": "0.16.0",
|
| 1246 |
+
"resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz",
|
| 1247 |
+
"integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==",
|
| 1248 |
+
"license": "Apache-2.0",
|
| 1249 |
+
"engines": {
|
| 1250 |
+
"node": ">= 0.6.0"
|
| 1251 |
+
}
|
| 1252 |
+
},
|
| 1253 |
+
"node_modules/jsonwebtoken": {
|
| 1254 |
+
"version": "9.0.2",
|
| 1255 |
+
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
|
| 1256 |
+
"integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
|
| 1257 |
+
"license": "MIT",
|
| 1258 |
+
"dependencies": {
|
| 1259 |
+
"jws": "^3.2.2",
|
| 1260 |
+
"lodash.includes": "^4.3.0",
|
| 1261 |
+
"lodash.isboolean": "^3.0.3",
|
| 1262 |
+
"lodash.isinteger": "^4.0.4",
|
| 1263 |
+
"lodash.isnumber": "^3.0.3",
|
| 1264 |
+
"lodash.isplainobject": "^4.0.6",
|
| 1265 |
+
"lodash.isstring": "^4.0.1",
|
| 1266 |
+
"lodash.once": "^4.0.0",
|
| 1267 |
+
"ms": "^2.1.1",
|
| 1268 |
+
"semver": "^7.5.4"
|
| 1269 |
+
},
|
| 1270 |
+
"engines": {
|
| 1271 |
+
"node": ">=12",
|
| 1272 |
+
"npm": ">=6"
|
| 1273 |
+
}
|
| 1274 |
+
},
|
| 1275 |
+
"node_modules/jsonwebtoken/node_modules/ms": {
|
| 1276 |
+
"version": "2.1.3",
|
| 1277 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 1278 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 1279 |
+
"license": "MIT"
|
| 1280 |
+
},
|
| 1281 |
+
"node_modules/jwa": {
|
| 1282 |
+
"version": "1.4.2",
|
| 1283 |
+
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz",
|
| 1284 |
+
"integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==",
|
| 1285 |
+
"license": "MIT",
|
| 1286 |
+
"dependencies": {
|
| 1287 |
+
"buffer-equal-constant-time": "^1.0.1",
|
| 1288 |
+
"ecdsa-sig-formatter": "1.0.11",
|
| 1289 |
+
"safe-buffer": "^5.0.1"
|
| 1290 |
+
}
|
| 1291 |
+
},
|
| 1292 |
+
"node_modules/jws": {
|
| 1293 |
+
"version": "3.2.2",
|
| 1294 |
+
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
|
| 1295 |
+
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
|
| 1296 |
+
"license": "MIT",
|
| 1297 |
+
"dependencies": {
|
| 1298 |
+
"jwa": "^1.4.1",
|
| 1299 |
+
"safe-buffer": "^5.0.1"
|
| 1300 |
+
}
|
| 1301 |
+
},
|
| 1302 |
+
"node_modules/lodash.includes": {
|
| 1303 |
+
"version": "4.3.0",
|
| 1304 |
+
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
|
| 1305 |
+
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==",
|
| 1306 |
+
"license": "MIT"
|
| 1307 |
+
},
|
| 1308 |
+
"node_modules/lodash.isboolean": {
|
| 1309 |
+
"version": "3.0.3",
|
| 1310 |
+
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
|
| 1311 |
+
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==",
|
| 1312 |
+
"license": "MIT"
|
| 1313 |
+
},
|
| 1314 |
+
"node_modules/lodash.isinteger": {
|
| 1315 |
+
"version": "4.0.4",
|
| 1316 |
+
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
|
| 1317 |
+
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==",
|
| 1318 |
+
"license": "MIT"
|
| 1319 |
+
},
|
| 1320 |
+
"node_modules/lodash.isnumber": {
|
| 1321 |
+
"version": "3.0.3",
|
| 1322 |
+
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
|
| 1323 |
+
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==",
|
| 1324 |
+
"license": "MIT"
|
| 1325 |
+
},
|
| 1326 |
+
"node_modules/lodash.isplainobject": {
|
| 1327 |
+
"version": "4.0.6",
|
| 1328 |
+
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
| 1329 |
+
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
|
| 1330 |
+
"license": "MIT"
|
| 1331 |
+
},
|
| 1332 |
+
"node_modules/lodash.isstring": {
|
| 1333 |
+
"version": "4.0.1",
|
| 1334 |
+
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
|
| 1335 |
+
"integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
|
| 1336 |
+
"license": "MIT"
|
| 1337 |
+
},
|
| 1338 |
+
"node_modules/lodash.once": {
|
| 1339 |
+
"version": "4.1.1",
|
| 1340 |
+
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
|
| 1341 |
+
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
|
| 1342 |
+
"license": "MIT"
|
| 1343 |
+
},
|
| 1344 |
+
"node_modules/math-intrinsics": {
|
| 1345 |
+
"version": "1.1.0",
|
| 1346 |
+
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
| 1347 |
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
| 1348 |
+
"license": "MIT",
|
| 1349 |
+
"engines": {
|
| 1350 |
+
"node": ">= 0.4"
|
| 1351 |
+
}
|
| 1352 |
+
},
|
| 1353 |
+
"node_modules/media-typer": {
|
| 1354 |
+
"version": "0.3.0",
|
| 1355 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
| 1356 |
+
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
| 1357 |
+
"license": "MIT",
|
| 1358 |
+
"engines": {
|
| 1359 |
+
"node": ">= 0.6"
|
| 1360 |
+
}
|
| 1361 |
+
},
|
| 1362 |
+
"node_modules/merge-descriptors": {
|
| 1363 |
+
"version": "1.0.3",
|
| 1364 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
| 1365 |
+
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
|
| 1366 |
+
"license": "MIT",
|
| 1367 |
+
"funding": {
|
| 1368 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 1369 |
+
}
|
| 1370 |
+
},
|
| 1371 |
+
"node_modules/methods": {
|
| 1372 |
+
"version": "1.1.2",
|
| 1373 |
+
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
| 1374 |
+
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
| 1375 |
+
"license": "MIT",
|
| 1376 |
+
"engines": {
|
| 1377 |
+
"node": ">= 0.6"
|
| 1378 |
+
}
|
| 1379 |
+
},
|
| 1380 |
+
"node_modules/mime": {
|
| 1381 |
+
"version": "1.6.0",
|
| 1382 |
+
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
| 1383 |
+
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
| 1384 |
+
"license": "MIT",
|
| 1385 |
+
"bin": {
|
| 1386 |
+
"mime": "cli.js"
|
| 1387 |
+
},
|
| 1388 |
+
"engines": {
|
| 1389 |
+
"node": ">=4"
|
| 1390 |
+
}
|
| 1391 |
+
},
|
| 1392 |
+
"node_modules/mime-db": {
|
| 1393 |
+
"version": "1.52.0",
|
| 1394 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
| 1395 |
+
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
| 1396 |
+
"license": "MIT",
|
| 1397 |
+
"engines": {
|
| 1398 |
+
"node": ">= 0.6"
|
| 1399 |
+
}
|
| 1400 |
+
},
|
| 1401 |
+
"node_modules/mime-types": {
|
| 1402 |
+
"version": "2.1.35",
|
| 1403 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
| 1404 |
+
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
| 1405 |
+
"license": "MIT",
|
| 1406 |
+
"dependencies": {
|
| 1407 |
+
"mime-db": "1.52.0"
|
| 1408 |
+
},
|
| 1409 |
+
"engines": {
|
| 1410 |
+
"node": ">= 0.6"
|
| 1411 |
+
}
|
| 1412 |
+
},
|
| 1413 |
+
"node_modules/minimatch": {
|
| 1414 |
+
"version": "3.1.2",
|
| 1415 |
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
| 1416 |
+
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
| 1417 |
+
"dev": true,
|
| 1418 |
+
"license": "ISC",
|
| 1419 |
+
"dependencies": {
|
| 1420 |
+
"brace-expansion": "^1.1.7"
|
| 1421 |
+
},
|
| 1422 |
+
"engines": {
|
| 1423 |
+
"node": "*"
|
| 1424 |
+
}
|
| 1425 |
+
},
|
| 1426 |
+
"node_modules/minimist": {
|
| 1427 |
+
"version": "1.2.8",
|
| 1428 |
+
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
| 1429 |
+
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
| 1430 |
+
"license": "MIT",
|
| 1431 |
+
"funding": {
|
| 1432 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1433 |
+
}
|
| 1434 |
+
},
|
| 1435 |
+
"node_modules/morgan": {
|
| 1436 |
+
"version": "1.10.0",
|
| 1437 |
+
"resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz",
|
| 1438 |
+
"integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==",
|
| 1439 |
+
"license": "MIT",
|
| 1440 |
+
"dependencies": {
|
| 1441 |
+
"basic-auth": "~2.0.1",
|
| 1442 |
+
"debug": "2.6.9",
|
| 1443 |
+
"depd": "~2.0.0",
|
| 1444 |
+
"on-finished": "~2.3.0",
|
| 1445 |
+
"on-headers": "~1.0.2"
|
| 1446 |
+
},
|
| 1447 |
+
"engines": {
|
| 1448 |
+
"node": ">= 0.8.0"
|
| 1449 |
+
}
|
| 1450 |
+
},
|
| 1451 |
+
"node_modules/morgan/node_modules/on-finished": {
|
| 1452 |
+
"version": "2.3.0",
|
| 1453 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
| 1454 |
+
"integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
|
| 1455 |
+
"license": "MIT",
|
| 1456 |
+
"dependencies": {
|
| 1457 |
+
"ee-first": "1.1.1"
|
| 1458 |
+
},
|
| 1459 |
+
"engines": {
|
| 1460 |
+
"node": ">= 0.8"
|
| 1461 |
+
}
|
| 1462 |
+
},
|
| 1463 |
+
"node_modules/ms": {
|
| 1464 |
+
"version": "2.0.0",
|
| 1465 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
| 1466 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
| 1467 |
+
"license": "MIT"
|
| 1468 |
+
},
|
| 1469 |
+
"node_modules/multer": {
|
| 1470 |
+
"version": "1.4.5-lts.2",
|
| 1471 |
+
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.2.tgz",
|
| 1472 |
+
"integrity": "sha512-VzGiVigcG9zUAoCNU+xShztrlr1auZOlurXynNvO9GiWD1/mTBbUljOKY+qMeazBqXgRnjzeEgJI/wyjJUHg9A==",
|
| 1473 |
+
"deprecated": "Multer 1.x is impacted by a number of vulnerabilities, which have been patched in 2.x. You should upgrade to the latest 2.x version.",
|
| 1474 |
+
"license": "MIT",
|
| 1475 |
+
"dependencies": {
|
| 1476 |
+
"append-field": "^1.0.0",
|
| 1477 |
+
"busboy": "^1.0.0",
|
| 1478 |
+
"concat-stream": "^1.5.2",
|
| 1479 |
+
"mkdirp": "^0.5.4",
|
| 1480 |
+
"object-assign": "^4.1.1",
|
| 1481 |
+
"type-is": "^1.6.4",
|
| 1482 |
+
"xtend": "^4.0.0"
|
| 1483 |
+
},
|
| 1484 |
+
"engines": {
|
| 1485 |
+
"node": ">= 6.0.0"
|
| 1486 |
+
}
|
| 1487 |
+
},
|
| 1488 |
+
"node_modules/multer/node_modules/concat-stream": {
|
| 1489 |
+
"version": "1.6.2",
|
| 1490 |
+
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
|
| 1491 |
+
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
|
| 1492 |
+
"engines": [
|
| 1493 |
+
"node >= 0.8"
|
| 1494 |
+
],
|
| 1495 |
+
"license": "MIT",
|
| 1496 |
+
"dependencies": {
|
| 1497 |
+
"buffer-from": "^1.0.0",
|
| 1498 |
+
"inherits": "^2.0.3",
|
| 1499 |
+
"readable-stream": "^2.2.2",
|
| 1500 |
+
"typedarray": "^0.0.6"
|
| 1501 |
+
}
|
| 1502 |
+
},
|
| 1503 |
+
"node_modules/multer/node_modules/mkdirp": {
|
| 1504 |
+
"version": "0.5.6",
|
| 1505 |
+
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
|
| 1506 |
+
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
|
| 1507 |
+
"license": "MIT",
|
| 1508 |
+
"dependencies": {
|
| 1509 |
+
"minimist": "^1.2.6"
|
| 1510 |
+
},
|
| 1511 |
+
"bin": {
|
| 1512 |
+
"mkdirp": "bin/cmd.js"
|
| 1513 |
+
}
|
| 1514 |
+
},
|
| 1515 |
+
"node_modules/multer/node_modules/readable-stream": {
|
| 1516 |
+
"version": "2.3.8",
|
| 1517 |
+
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
|
| 1518 |
+
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
|
| 1519 |
+
"license": "MIT",
|
| 1520 |
+
"dependencies": {
|
| 1521 |
+
"core-util-is": "~1.0.0",
|
| 1522 |
+
"inherits": "~2.0.3",
|
| 1523 |
+
"isarray": "~1.0.0",
|
| 1524 |
+
"process-nextick-args": "~2.0.0",
|
| 1525 |
+
"safe-buffer": "~5.1.1",
|
| 1526 |
+
"string_decoder": "~1.1.1",
|
| 1527 |
+
"util-deprecate": "~1.0.1"
|
| 1528 |
+
}
|
| 1529 |
+
},
|
| 1530 |
+
"node_modules/multer/node_modules/safe-buffer": {
|
| 1531 |
+
"version": "5.1.2",
|
| 1532 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
| 1533 |
+
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
| 1534 |
+
"license": "MIT"
|
| 1535 |
+
},
|
| 1536 |
+
"node_modules/multer/node_modules/string_decoder": {
|
| 1537 |
+
"version": "1.1.1",
|
| 1538 |
+
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
| 1539 |
+
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
| 1540 |
+
"license": "MIT",
|
| 1541 |
+
"dependencies": {
|
| 1542 |
+
"safe-buffer": "~5.1.0"
|
| 1543 |
+
}
|
| 1544 |
+
},
|
| 1545 |
+
"node_modules/negotiator": {
|
| 1546 |
+
"version": "0.6.3",
|
| 1547 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
| 1548 |
+
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
| 1549 |
+
"license": "MIT",
|
| 1550 |
+
"engines": {
|
| 1551 |
+
"node": ">= 0.6"
|
| 1552 |
+
}
|
| 1553 |
+
},
|
| 1554 |
+
"node_modules/node-addon-api": {
|
| 1555 |
+
"version": "8.4.0",
|
| 1556 |
+
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.4.0.tgz",
|
| 1557 |
+
"integrity": "sha512-D9DI/gXHvVmjHS08SVch0Em8G5S1P+QWtU31appcKT/8wFSPRcdHadIFSAntdMMVM5zz+/DL+bL/gz3UDppqtg==",
|
| 1558 |
+
"license": "MIT",
|
| 1559 |
+
"engines": {
|
| 1560 |
+
"node": "^18 || ^20 || >= 21"
|
| 1561 |
+
}
|
| 1562 |
+
},
|
| 1563 |
+
"node_modules/node-gyp-build": {
|
| 1564 |
+
"version": "4.8.4",
|
| 1565 |
+
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz",
|
| 1566 |
+
"integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==",
|
| 1567 |
+
"license": "MIT",
|
| 1568 |
+
"bin": {
|
| 1569 |
+
"node-gyp-build": "bin.js",
|
| 1570 |
+
"node-gyp-build-optional": "optional.js",
|
| 1571 |
+
"node-gyp-build-test": "build-test.js"
|
| 1572 |
+
}
|
| 1573 |
+
},
|
| 1574 |
+
"node_modules/nodemailer": {
|
| 1575 |
+
"version": "6.10.1",
|
| 1576 |
+
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.10.1.tgz",
|
| 1577 |
+
"integrity": "sha512-Z+iLaBGVaSjbIzQ4pX6XV41HrooLsQ10ZWPUehGmuantvzWoDVBnmsdUcOIDM1t+yPor5pDhVlDESgOMEGxhHA==",
|
| 1578 |
+
"license": "MIT-0",
|
| 1579 |
+
"engines": {
|
| 1580 |
+
"node": ">=6.0.0"
|
| 1581 |
+
}
|
| 1582 |
+
},
|
| 1583 |
+
"node_modules/nodemon": {
|
| 1584 |
+
"version": "3.1.10",
|
| 1585 |
+
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.10.tgz",
|
| 1586 |
+
"integrity": "sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==",
|
| 1587 |
+
"dev": true,
|
| 1588 |
+
"license": "MIT",
|
| 1589 |
+
"dependencies": {
|
| 1590 |
+
"chokidar": "^3.5.2",
|
| 1591 |
+
"debug": "^4",
|
| 1592 |
+
"ignore-by-default": "^1.0.1",
|
| 1593 |
+
"minimatch": "^3.1.2",
|
| 1594 |
+
"pstree.remy": "^1.1.8",
|
| 1595 |
+
"semver": "^7.5.3",
|
| 1596 |
+
"simple-update-notifier": "^2.0.0",
|
| 1597 |
+
"supports-color": "^5.5.0",
|
| 1598 |
+
"touch": "^3.1.0",
|
| 1599 |
+
"undefsafe": "^2.0.5"
|
| 1600 |
+
},
|
| 1601 |
+
"bin": {
|
| 1602 |
+
"nodemon": "bin/nodemon.js"
|
| 1603 |
+
},
|
| 1604 |
+
"engines": {
|
| 1605 |
+
"node": ">=10"
|
| 1606 |
+
},
|
| 1607 |
+
"funding": {
|
| 1608 |
+
"type": "opencollective",
|
| 1609 |
+
"url": "https://opencollective.com/nodemon"
|
| 1610 |
+
}
|
| 1611 |
+
},
|
| 1612 |
+
"node_modules/nodemon/node_modules/debug": {
|
| 1613 |
+
"version": "4.4.1",
|
| 1614 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
|
| 1615 |
+
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
|
| 1616 |
+
"dev": true,
|
| 1617 |
+
"license": "MIT",
|
| 1618 |
+
"dependencies": {
|
| 1619 |
+
"ms": "^2.1.3"
|
| 1620 |
+
},
|
| 1621 |
+
"engines": {
|
| 1622 |
+
"node": ">=6.0"
|
| 1623 |
+
},
|
| 1624 |
+
"peerDependenciesMeta": {
|
| 1625 |
+
"supports-color": {
|
| 1626 |
+
"optional": true
|
| 1627 |
+
}
|
| 1628 |
+
}
|
| 1629 |
+
},
|
| 1630 |
+
"node_modules/nodemon/node_modules/ms": {
|
| 1631 |
+
"version": "2.1.3",
|
| 1632 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 1633 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 1634 |
+
"dev": true,
|
| 1635 |
+
"license": "MIT"
|
| 1636 |
+
},
|
| 1637 |
+
"node_modules/normalize-path": {
|
| 1638 |
+
"version": "3.0.0",
|
| 1639 |
+
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
| 1640 |
+
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
| 1641 |
+
"dev": true,
|
| 1642 |
+
"license": "MIT",
|
| 1643 |
+
"engines": {
|
| 1644 |
+
"node": ">=0.10.0"
|
| 1645 |
+
}
|
| 1646 |
+
},
|
| 1647 |
+
"node_modules/object-assign": {
|
| 1648 |
+
"version": "4.1.1",
|
| 1649 |
+
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
| 1650 |
+
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
| 1651 |
+
"license": "MIT",
|
| 1652 |
+
"engines": {
|
| 1653 |
+
"node": ">=0.10.0"
|
| 1654 |
+
}
|
| 1655 |
+
},
|
| 1656 |
+
"node_modules/object-inspect": {
|
| 1657 |
+
"version": "1.13.4",
|
| 1658 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
| 1659 |
+
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
| 1660 |
+
"license": "MIT",
|
| 1661 |
+
"engines": {
|
| 1662 |
+
"node": ">= 0.4"
|
| 1663 |
+
},
|
| 1664 |
+
"funding": {
|
| 1665 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1666 |
+
}
|
| 1667 |
+
},
|
| 1668 |
+
"node_modules/on-finished": {
|
| 1669 |
+
"version": "2.4.1",
|
| 1670 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
| 1671 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
| 1672 |
+
"license": "MIT",
|
| 1673 |
+
"dependencies": {
|
| 1674 |
+
"ee-first": "1.1.1"
|
| 1675 |
+
},
|
| 1676 |
+
"engines": {
|
| 1677 |
+
"node": ">= 0.8"
|
| 1678 |
+
}
|
| 1679 |
+
},
|
| 1680 |
+
"node_modules/on-headers": {
|
| 1681 |
+
"version": "1.0.2",
|
| 1682 |
+
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
|
| 1683 |
+
"integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
|
| 1684 |
+
"license": "MIT",
|
| 1685 |
+
"engines": {
|
| 1686 |
+
"node": ">= 0.8"
|
| 1687 |
+
}
|
| 1688 |
+
},
|
| 1689 |
+
"node_modules/parseurl": {
|
| 1690 |
+
"version": "1.3.3",
|
| 1691 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
| 1692 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
| 1693 |
+
"license": "MIT",
|
| 1694 |
+
"engines": {
|
| 1695 |
+
"node": ">= 0.8"
|
| 1696 |
+
}
|
| 1697 |
+
},
|
| 1698 |
+
"node_modules/path-to-regexp": {
|
| 1699 |
+
"version": "0.1.12",
|
| 1700 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
| 1701 |
+
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
|
| 1702 |
+
"license": "MIT"
|
| 1703 |
+
},
|
| 1704 |
+
"node_modules/pg": {
|
| 1705 |
+
"version": "8.16.0",
|
| 1706 |
+
"resolved": "https://registry.npmjs.org/pg/-/pg-8.16.0.tgz",
|
| 1707 |
+
"integrity": "sha512-7SKfdvP8CTNXjMUzfcVTaI+TDzBEeaUnVwiVGZQD1Hh33Kpev7liQba9uLd4CfN8r9mCVsD0JIpq03+Unpz+kg==",
|
| 1708 |
+
"license": "MIT",
|
| 1709 |
+
"dependencies": {
|
| 1710 |
+
"pg-connection-string": "^2.9.0",
|
| 1711 |
+
"pg-pool": "^3.10.0",
|
| 1712 |
+
"pg-protocol": "^1.10.0",
|
| 1713 |
+
"pg-types": "2.2.0",
|
| 1714 |
+
"pgpass": "1.0.5"
|
| 1715 |
+
},
|
| 1716 |
+
"engines": {
|
| 1717 |
+
"node": ">= 8.0.0"
|
| 1718 |
+
},
|
| 1719 |
+
"optionalDependencies": {
|
| 1720 |
+
"pg-cloudflare": "^1.2.5"
|
| 1721 |
+
},
|
| 1722 |
+
"peerDependencies": {
|
| 1723 |
+
"pg-native": ">=3.0.1"
|
| 1724 |
+
},
|
| 1725 |
+
"peerDependenciesMeta": {
|
| 1726 |
+
"pg-native": {
|
| 1727 |
+
"optional": true
|
| 1728 |
+
}
|
| 1729 |
+
}
|
| 1730 |
+
},
|
| 1731 |
+
"node_modules/pg-cloudflare": {
|
| 1732 |
+
"version": "1.2.5",
|
| 1733 |
+
"resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.2.5.tgz",
|
| 1734 |
+
"integrity": "sha512-OOX22Vt0vOSRrdoUPKJ8Wi2OpE/o/h9T8X1s4qSkCedbNah9ei2W2765be8iMVxQUsvgT7zIAT2eIa9fs5+vtg==",
|
| 1735 |
+
"license": "MIT",
|
| 1736 |
+
"optional": true
|
| 1737 |
+
},
|
| 1738 |
+
"node_modules/pg-connection-string": {
|
| 1739 |
+
"version": "2.9.0",
|
| 1740 |
+
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.9.0.tgz",
|
| 1741 |
+
"integrity": "sha512-P2DEBKuvh5RClafLngkAuGe9OUlFV7ebu8w1kmaaOgPcpJd1RIFh7otETfI6hAR8YupOLFTY7nuvvIn7PLciUQ==",
|
| 1742 |
+
"license": "MIT"
|
| 1743 |
+
},
|
| 1744 |
+
"node_modules/pg-int8": {
|
| 1745 |
+
"version": "1.0.1",
|
| 1746 |
+
"resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",
|
| 1747 |
+
"integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
|
| 1748 |
+
"license": "ISC",
|
| 1749 |
+
"engines": {
|
| 1750 |
+
"node": ">=4.0.0"
|
| 1751 |
+
}
|
| 1752 |
+
},
|
| 1753 |
+
"node_modules/pg-pool": {
|
| 1754 |
+
"version": "3.10.0",
|
| 1755 |
+
"resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.10.0.tgz",
|
| 1756 |
+
"integrity": "sha512-DzZ26On4sQ0KmqnO34muPcmKbhrjmyiO4lCCR0VwEd7MjmiKf5NTg/6+apUEu0NF7ESa37CGzFxH513CoUmWnA==",
|
| 1757 |
+
"license": "MIT",
|
| 1758 |
+
"peerDependencies": {
|
| 1759 |
+
"pg": ">=8.0"
|
| 1760 |
+
}
|
| 1761 |
+
},
|
| 1762 |
+
"node_modules/pg-protocol": {
|
| 1763 |
+
"version": "1.10.0",
|
| 1764 |
+
"resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.10.0.tgz",
|
| 1765 |
+
"integrity": "sha512-IpdytjudNuLv8nhlHs/UrVBhU0e78J0oIS/0AVdTbWxSOkFUVdsHC/NrorO6nXsQNDTT1kzDSOMJubBQviX18Q==",
|
| 1766 |
+
"license": "MIT"
|
| 1767 |
+
},
|
| 1768 |
+
"node_modules/pg-types": {
|
| 1769 |
+
"version": "2.2.0",
|
| 1770 |
+
"resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz",
|
| 1771 |
+
"integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",
|
| 1772 |
+
"license": "MIT",
|
| 1773 |
+
"dependencies": {
|
| 1774 |
+
"pg-int8": "1.0.1",
|
| 1775 |
+
"postgres-array": "~2.0.0",
|
| 1776 |
+
"postgres-bytea": "~1.0.0",
|
| 1777 |
+
"postgres-date": "~1.0.4",
|
| 1778 |
+
"postgres-interval": "^1.1.0"
|
| 1779 |
+
},
|
| 1780 |
+
"engines": {
|
| 1781 |
+
"node": ">=4"
|
| 1782 |
+
}
|
| 1783 |
+
},
|
| 1784 |
+
"node_modules/pgpass": {
|
| 1785 |
+
"version": "1.0.5",
|
| 1786 |
+
"resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz",
|
| 1787 |
+
"integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",
|
| 1788 |
+
"license": "MIT",
|
| 1789 |
+
"dependencies": {
|
| 1790 |
+
"split2": "^4.1.0"
|
| 1791 |
+
}
|
| 1792 |
+
},
|
| 1793 |
+
"node_modules/picomatch": {
|
| 1794 |
+
"version": "2.3.1",
|
| 1795 |
+
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
| 1796 |
+
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
| 1797 |
+
"dev": true,
|
| 1798 |
+
"license": "MIT",
|
| 1799 |
+
"engines": {
|
| 1800 |
+
"node": ">=8.6"
|
| 1801 |
+
},
|
| 1802 |
+
"funding": {
|
| 1803 |
+
"url": "https://github.com/sponsors/jonschlinkert"
|
| 1804 |
+
}
|
| 1805 |
+
},
|
| 1806 |
+
"node_modules/possible-typed-array-names": {
|
| 1807 |
+
"version": "1.1.0",
|
| 1808 |
+
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
|
| 1809 |
+
"integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
|
| 1810 |
+
"license": "MIT",
|
| 1811 |
+
"engines": {
|
| 1812 |
+
"node": ">= 0.4"
|
| 1813 |
+
}
|
| 1814 |
+
},
|
| 1815 |
+
"node_modules/postgres-array": {
|
| 1816 |
+
"version": "2.0.0",
|
| 1817 |
+
"resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz",
|
| 1818 |
+
"integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",
|
| 1819 |
+
"license": "MIT",
|
| 1820 |
+
"engines": {
|
| 1821 |
+
"node": ">=4"
|
| 1822 |
+
}
|
| 1823 |
+
},
|
| 1824 |
+
"node_modules/postgres-bytea": {
|
| 1825 |
+
"version": "1.0.0",
|
| 1826 |
+
"resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz",
|
| 1827 |
+
"integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==",
|
| 1828 |
+
"license": "MIT",
|
| 1829 |
+
"engines": {
|
| 1830 |
+
"node": ">=0.10.0"
|
| 1831 |
+
}
|
| 1832 |
+
},
|
| 1833 |
+
"node_modules/postgres-date": {
|
| 1834 |
+
"version": "1.0.7",
|
| 1835 |
+
"resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz",
|
| 1836 |
+
"integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",
|
| 1837 |
+
"license": "MIT",
|
| 1838 |
+
"engines": {
|
| 1839 |
+
"node": ">=0.10.0"
|
| 1840 |
+
}
|
| 1841 |
+
},
|
| 1842 |
+
"node_modules/postgres-interval": {
|
| 1843 |
+
"version": "1.2.0",
|
| 1844 |
+
"resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz",
|
| 1845 |
+
"integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",
|
| 1846 |
+
"license": "MIT",
|
| 1847 |
+
"dependencies": {
|
| 1848 |
+
"xtend": "^4.0.0"
|
| 1849 |
+
},
|
| 1850 |
+
"engines": {
|
| 1851 |
+
"node": ">=0.10.0"
|
| 1852 |
+
}
|
| 1853 |
+
},
|
| 1854 |
+
"node_modules/process-nextick-args": {
|
| 1855 |
+
"version": "2.0.1",
|
| 1856 |
+
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
| 1857 |
+
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
|
| 1858 |
+
"license": "MIT"
|
| 1859 |
+
},
|
| 1860 |
+
"node_modules/proxy-addr": {
|
| 1861 |
+
"version": "2.0.7",
|
| 1862 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
| 1863 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
| 1864 |
+
"license": "MIT",
|
| 1865 |
+
"dependencies": {
|
| 1866 |
+
"forwarded": "0.2.0",
|
| 1867 |
+
"ipaddr.js": "1.9.1"
|
| 1868 |
+
},
|
| 1869 |
+
"engines": {
|
| 1870 |
+
"node": ">= 0.10"
|
| 1871 |
+
}
|
| 1872 |
+
},
|
| 1873 |
+
"node_modules/proxy-from-env": {
|
| 1874 |
+
"version": "1.1.0",
|
| 1875 |
+
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
| 1876 |
+
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
| 1877 |
+
"license": "MIT"
|
| 1878 |
+
},
|
| 1879 |
+
"node_modules/pstree.remy": {
|
| 1880 |
+
"version": "1.1.8",
|
| 1881 |
+
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
|
| 1882 |
+
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
|
| 1883 |
+
"dev": true,
|
| 1884 |
+
"license": "MIT"
|
| 1885 |
+
},
|
| 1886 |
+
"node_modules/punycode": {
|
| 1887 |
+
"version": "1.3.2",
|
| 1888 |
+
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
|
| 1889 |
+
"integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==",
|
| 1890 |
+
"license": "MIT"
|
| 1891 |
+
},
|
| 1892 |
+
"node_modules/qs": {
|
| 1893 |
+
"version": "6.13.0",
|
| 1894 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
| 1895 |
+
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
| 1896 |
+
"license": "BSD-3-Clause",
|
| 1897 |
+
"dependencies": {
|
| 1898 |
+
"side-channel": "^1.0.6"
|
| 1899 |
+
},
|
| 1900 |
+
"engines": {
|
| 1901 |
+
"node": ">=0.6"
|
| 1902 |
+
},
|
| 1903 |
+
"funding": {
|
| 1904 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1905 |
+
}
|
| 1906 |
+
},
|
| 1907 |
+
"node_modules/querystring": {
|
| 1908 |
+
"version": "0.2.0",
|
| 1909 |
+
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
|
| 1910 |
+
"integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==",
|
| 1911 |
+
"deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
|
| 1912 |
+
"engines": {
|
| 1913 |
+
"node": ">=0.4.x"
|
| 1914 |
+
}
|
| 1915 |
+
},
|
| 1916 |
+
"node_modules/range-parser": {
|
| 1917 |
+
"version": "1.2.1",
|
| 1918 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
| 1919 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
| 1920 |
+
"license": "MIT",
|
| 1921 |
+
"engines": {
|
| 1922 |
+
"node": ">= 0.6"
|
| 1923 |
+
}
|
| 1924 |
+
},
|
| 1925 |
+
"node_modules/raw-body": {
|
| 1926 |
+
"version": "2.5.2",
|
| 1927 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
| 1928 |
+
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
| 1929 |
+
"license": "MIT",
|
| 1930 |
+
"dependencies": {
|
| 1931 |
+
"bytes": "3.1.2",
|
| 1932 |
+
"http-errors": "2.0.0",
|
| 1933 |
+
"iconv-lite": "0.4.24",
|
| 1934 |
+
"unpipe": "1.0.0"
|
| 1935 |
+
},
|
| 1936 |
+
"engines": {
|
| 1937 |
+
"node": ">= 0.8"
|
| 1938 |
+
}
|
| 1939 |
+
},
|
| 1940 |
+
"node_modules/readdirp": {
|
| 1941 |
+
"version": "3.6.0",
|
| 1942 |
+
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
| 1943 |
+
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
| 1944 |
+
"dev": true,
|
| 1945 |
+
"license": "MIT",
|
| 1946 |
+
"dependencies": {
|
| 1947 |
+
"picomatch": "^2.2.1"
|
| 1948 |
+
},
|
| 1949 |
+
"engines": {
|
| 1950 |
+
"node": ">=8.10.0"
|
| 1951 |
+
}
|
| 1952 |
+
},
|
| 1953 |
+
"node_modules/safe-buffer": {
|
| 1954 |
+
"version": "5.2.1",
|
| 1955 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
| 1956 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
| 1957 |
+
"funding": [
|
| 1958 |
+
{
|
| 1959 |
+
"type": "github",
|
| 1960 |
+
"url": "https://github.com/sponsors/feross"
|
| 1961 |
+
},
|
| 1962 |
+
{
|
| 1963 |
+
"type": "patreon",
|
| 1964 |
+
"url": "https://www.patreon.com/feross"
|
| 1965 |
+
},
|
| 1966 |
+
{
|
| 1967 |
+
"type": "consulting",
|
| 1968 |
+
"url": "https://feross.org/support"
|
| 1969 |
+
}
|
| 1970 |
+
],
|
| 1971 |
+
"license": "MIT"
|
| 1972 |
+
},
|
| 1973 |
+
"node_modules/safe-regex-test": {
|
| 1974 |
+
"version": "1.1.0",
|
| 1975 |
+
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz",
|
| 1976 |
+
"integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==",
|
| 1977 |
+
"license": "MIT",
|
| 1978 |
+
"dependencies": {
|
| 1979 |
+
"call-bound": "^1.0.2",
|
| 1980 |
+
"es-errors": "^1.3.0",
|
| 1981 |
+
"is-regex": "^1.2.1"
|
| 1982 |
+
},
|
| 1983 |
+
"engines": {
|
| 1984 |
+
"node": ">= 0.4"
|
| 1985 |
+
},
|
| 1986 |
+
"funding": {
|
| 1987 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1988 |
+
}
|
| 1989 |
+
},
|
| 1990 |
+
"node_modules/safer-buffer": {
|
| 1991 |
+
"version": "2.1.2",
|
| 1992 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
| 1993 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
| 1994 |
+
"license": "MIT"
|
| 1995 |
+
},
|
| 1996 |
+
"node_modules/sax": {
|
| 1997 |
+
"version": "1.2.1",
|
| 1998 |
+
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
|
| 1999 |
+
"integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==",
|
| 2000 |
+
"license": "ISC"
|
| 2001 |
+
},
|
| 2002 |
+
"node_modules/semver": {
|
| 2003 |
+
"version": "7.7.2",
|
| 2004 |
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
| 2005 |
+
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
| 2006 |
+
"license": "ISC",
|
| 2007 |
+
"bin": {
|
| 2008 |
+
"semver": "bin/semver.js"
|
| 2009 |
+
},
|
| 2010 |
+
"engines": {
|
| 2011 |
+
"node": ">=10"
|
| 2012 |
+
}
|
| 2013 |
+
},
|
| 2014 |
+
"node_modules/send": {
|
| 2015 |
+
"version": "0.19.0",
|
| 2016 |
+
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
| 2017 |
+
"integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
|
| 2018 |
+
"license": "MIT",
|
| 2019 |
+
"dependencies": {
|
| 2020 |
+
"debug": "2.6.9",
|
| 2021 |
+
"depd": "2.0.0",
|
| 2022 |
+
"destroy": "1.2.0",
|
| 2023 |
+
"encodeurl": "~1.0.2",
|
| 2024 |
+
"escape-html": "~1.0.3",
|
| 2025 |
+
"etag": "~1.8.1",
|
| 2026 |
+
"fresh": "0.5.2",
|
| 2027 |
+
"http-errors": "2.0.0",
|
| 2028 |
+
"mime": "1.6.0",
|
| 2029 |
+
"ms": "2.1.3",
|
| 2030 |
+
"on-finished": "2.4.1",
|
| 2031 |
+
"range-parser": "~1.2.1",
|
| 2032 |
+
"statuses": "2.0.1"
|
| 2033 |
+
},
|
| 2034 |
+
"engines": {
|
| 2035 |
+
"node": ">= 0.8.0"
|
| 2036 |
+
}
|
| 2037 |
+
},
|
| 2038 |
+
"node_modules/send/node_modules/encodeurl": {
|
| 2039 |
+
"version": "1.0.2",
|
| 2040 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
| 2041 |
+
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
| 2042 |
+
"license": "MIT",
|
| 2043 |
+
"engines": {
|
| 2044 |
+
"node": ">= 0.8"
|
| 2045 |
+
}
|
| 2046 |
+
},
|
| 2047 |
+
"node_modules/send/node_modules/ms": {
|
| 2048 |
+
"version": "2.1.3",
|
| 2049 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 2050 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 2051 |
+
"license": "MIT"
|
| 2052 |
+
},
|
| 2053 |
+
"node_modules/serve-static": {
|
| 2054 |
+
"version": "1.16.2",
|
| 2055 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
|
| 2056 |
+
"integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
|
| 2057 |
+
"license": "MIT",
|
| 2058 |
+
"dependencies": {
|
| 2059 |
+
"encodeurl": "~2.0.0",
|
| 2060 |
+
"escape-html": "~1.0.3",
|
| 2061 |
+
"parseurl": "~1.3.3",
|
| 2062 |
+
"send": "0.19.0"
|
| 2063 |
+
},
|
| 2064 |
+
"engines": {
|
| 2065 |
+
"node": ">= 0.8.0"
|
| 2066 |
+
}
|
| 2067 |
+
},
|
| 2068 |
+
"node_modules/set-function-length": {
|
| 2069 |
+
"version": "1.2.2",
|
| 2070 |
+
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
| 2071 |
+
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
| 2072 |
+
"license": "MIT",
|
| 2073 |
+
"dependencies": {
|
| 2074 |
+
"define-data-property": "^1.1.4",
|
| 2075 |
+
"es-errors": "^1.3.0",
|
| 2076 |
+
"function-bind": "^1.1.2",
|
| 2077 |
+
"get-intrinsic": "^1.2.4",
|
| 2078 |
+
"gopd": "^1.0.1",
|
| 2079 |
+
"has-property-descriptors": "^1.0.2"
|
| 2080 |
+
},
|
| 2081 |
+
"engines": {
|
| 2082 |
+
"node": ">= 0.4"
|
| 2083 |
+
}
|
| 2084 |
+
},
|
| 2085 |
+
"node_modules/setprototypeof": {
|
| 2086 |
+
"version": "1.2.0",
|
| 2087 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
| 2088 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
| 2089 |
+
"license": "ISC"
|
| 2090 |
+
},
|
| 2091 |
+
"node_modules/side-channel": {
|
| 2092 |
+
"version": "1.1.0",
|
| 2093 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
| 2094 |
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
| 2095 |
+
"license": "MIT",
|
| 2096 |
+
"dependencies": {
|
| 2097 |
+
"es-errors": "^1.3.0",
|
| 2098 |
+
"object-inspect": "^1.13.3",
|
| 2099 |
+
"side-channel-list": "^1.0.0",
|
| 2100 |
+
"side-channel-map": "^1.0.1",
|
| 2101 |
+
"side-channel-weakmap": "^1.0.2"
|
| 2102 |
+
},
|
| 2103 |
+
"engines": {
|
| 2104 |
+
"node": ">= 0.4"
|
| 2105 |
+
},
|
| 2106 |
+
"funding": {
|
| 2107 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 2108 |
+
}
|
| 2109 |
+
},
|
| 2110 |
+
"node_modules/side-channel-list": {
|
| 2111 |
+
"version": "1.0.0",
|
| 2112 |
+
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
| 2113 |
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
| 2114 |
+
"license": "MIT",
|
| 2115 |
+
"dependencies": {
|
| 2116 |
+
"es-errors": "^1.3.0",
|
| 2117 |
+
"object-inspect": "^1.13.3"
|
| 2118 |
+
},
|
| 2119 |
+
"engines": {
|
| 2120 |
+
"node": ">= 0.4"
|
| 2121 |
+
},
|
| 2122 |
+
"funding": {
|
| 2123 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 2124 |
+
}
|
| 2125 |
+
},
|
| 2126 |
+
"node_modules/side-channel-map": {
|
| 2127 |
+
"version": "1.0.1",
|
| 2128 |
+
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
| 2129 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
| 2130 |
+
"license": "MIT",
|
| 2131 |
+
"dependencies": {
|
| 2132 |
+
"call-bound": "^1.0.2",
|
| 2133 |
+
"es-errors": "^1.3.0",
|
| 2134 |
+
"get-intrinsic": "^1.2.5",
|
| 2135 |
+
"object-inspect": "^1.13.3"
|
| 2136 |
+
},
|
| 2137 |
+
"engines": {
|
| 2138 |
+
"node": ">= 0.4"
|
| 2139 |
+
},
|
| 2140 |
+
"funding": {
|
| 2141 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 2142 |
+
}
|
| 2143 |
+
},
|
| 2144 |
+
"node_modules/side-channel-weakmap": {
|
| 2145 |
+
"version": "1.0.2",
|
| 2146 |
+
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
| 2147 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
| 2148 |
+
"license": "MIT",
|
| 2149 |
+
"dependencies": {
|
| 2150 |
+
"call-bound": "^1.0.2",
|
| 2151 |
+
"es-errors": "^1.3.0",
|
| 2152 |
+
"get-intrinsic": "^1.2.5",
|
| 2153 |
+
"object-inspect": "^1.13.3",
|
| 2154 |
+
"side-channel-map": "^1.0.1"
|
| 2155 |
+
},
|
| 2156 |
+
"engines": {
|
| 2157 |
+
"node": ">= 0.4"
|
| 2158 |
+
},
|
| 2159 |
+
"funding": {
|
| 2160 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 2161 |
+
}
|
| 2162 |
+
},
|
| 2163 |
+
"node_modules/simple-update-notifier": {
|
| 2164 |
+
"version": "2.0.0",
|
| 2165 |
+
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
|
| 2166 |
+
"integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
|
| 2167 |
+
"dev": true,
|
| 2168 |
+
"license": "MIT",
|
| 2169 |
+
"dependencies": {
|
| 2170 |
+
"semver": "^7.5.3"
|
| 2171 |
+
},
|
| 2172 |
+
"engines": {
|
| 2173 |
+
"node": ">=10"
|
| 2174 |
+
}
|
| 2175 |
+
},
|
| 2176 |
+
"node_modules/socket.io": {
|
| 2177 |
+
"version": "4.8.1",
|
| 2178 |
+
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz",
|
| 2179 |
+
"integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==",
|
| 2180 |
+
"license": "MIT",
|
| 2181 |
+
"dependencies": {
|
| 2182 |
+
"accepts": "~1.3.4",
|
| 2183 |
+
"base64id": "~2.0.0",
|
| 2184 |
+
"cors": "~2.8.5",
|
| 2185 |
+
"debug": "~4.3.2",
|
| 2186 |
+
"engine.io": "~6.6.0",
|
| 2187 |
+
"socket.io-adapter": "~2.5.2",
|
| 2188 |
+
"socket.io-parser": "~4.2.4"
|
| 2189 |
+
},
|
| 2190 |
+
"engines": {
|
| 2191 |
+
"node": ">=10.2.0"
|
| 2192 |
+
}
|
| 2193 |
+
},
|
| 2194 |
+
"node_modules/socket.io-adapter": {
|
| 2195 |
+
"version": "2.5.5",
|
| 2196 |
+
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz",
|
| 2197 |
+
"integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==",
|
| 2198 |
+
"license": "MIT",
|
| 2199 |
+
"dependencies": {
|
| 2200 |
+
"debug": "~4.3.4",
|
| 2201 |
+
"ws": "~8.17.1"
|
| 2202 |
+
}
|
| 2203 |
+
},
|
| 2204 |
+
"node_modules/socket.io-adapter/node_modules/debug": {
|
| 2205 |
+
"version": "4.3.7",
|
| 2206 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
| 2207 |
+
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
| 2208 |
+
"license": "MIT",
|
| 2209 |
+
"dependencies": {
|
| 2210 |
+
"ms": "^2.1.3"
|
| 2211 |
+
},
|
| 2212 |
+
"engines": {
|
| 2213 |
+
"node": ">=6.0"
|
| 2214 |
+
},
|
| 2215 |
+
"peerDependenciesMeta": {
|
| 2216 |
+
"supports-color": {
|
| 2217 |
+
"optional": true
|
| 2218 |
+
}
|
| 2219 |
+
}
|
| 2220 |
+
},
|
| 2221 |
+
"node_modules/socket.io-adapter/node_modules/ms": {
|
| 2222 |
+
"version": "2.1.3",
|
| 2223 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 2224 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 2225 |
+
"license": "MIT"
|
| 2226 |
+
},
|
| 2227 |
+
"node_modules/socket.io-parser": {
|
| 2228 |
+
"version": "4.2.4",
|
| 2229 |
+
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
|
| 2230 |
+
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
| 2231 |
+
"license": "MIT",
|
| 2232 |
+
"dependencies": {
|
| 2233 |
+
"@socket.io/component-emitter": "~3.1.0",
|
| 2234 |
+
"debug": "~4.3.1"
|
| 2235 |
+
},
|
| 2236 |
+
"engines": {
|
| 2237 |
+
"node": ">=10.0.0"
|
| 2238 |
+
}
|
| 2239 |
+
},
|
| 2240 |
+
"node_modules/socket.io-parser/node_modules/debug": {
|
| 2241 |
+
"version": "4.3.7",
|
| 2242 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
| 2243 |
+
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
| 2244 |
+
"license": "MIT",
|
| 2245 |
+
"dependencies": {
|
| 2246 |
+
"ms": "^2.1.3"
|
| 2247 |
+
},
|
| 2248 |
+
"engines": {
|
| 2249 |
+
"node": ">=6.0"
|
| 2250 |
+
},
|
| 2251 |
+
"peerDependenciesMeta": {
|
| 2252 |
+
"supports-color": {
|
| 2253 |
+
"optional": true
|
| 2254 |
+
}
|
| 2255 |
+
}
|
| 2256 |
+
},
|
| 2257 |
+
"node_modules/socket.io-parser/node_modules/ms": {
|
| 2258 |
+
"version": "2.1.3",
|
| 2259 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 2260 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 2261 |
+
"license": "MIT"
|
| 2262 |
+
},
|
| 2263 |
+
"node_modules/socket.io/node_modules/debug": {
|
| 2264 |
+
"version": "4.3.7",
|
| 2265 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
| 2266 |
+
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
| 2267 |
+
"license": "MIT",
|
| 2268 |
+
"dependencies": {
|
| 2269 |
+
"ms": "^2.1.3"
|
| 2270 |
+
},
|
| 2271 |
+
"engines": {
|
| 2272 |
+
"node": ">=6.0"
|
| 2273 |
+
},
|
| 2274 |
+
"peerDependenciesMeta": {
|
| 2275 |
+
"supports-color": {
|
| 2276 |
+
"optional": true
|
| 2277 |
+
}
|
| 2278 |
+
}
|
| 2279 |
+
},
|
| 2280 |
+
"node_modules/socket.io/node_modules/ms": {
|
| 2281 |
+
"version": "2.1.3",
|
| 2282 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 2283 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 2284 |
+
"license": "MIT"
|
| 2285 |
+
},
|
| 2286 |
+
"node_modules/split2": {
|
| 2287 |
+
"version": "4.2.0",
|
| 2288 |
+
"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
|
| 2289 |
+
"integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
|
| 2290 |
+
"license": "ISC",
|
| 2291 |
+
"engines": {
|
| 2292 |
+
"node": ">= 10.x"
|
| 2293 |
+
}
|
| 2294 |
+
},
|
| 2295 |
+
"node_modules/statuses": {
|
| 2296 |
+
"version": "2.0.1",
|
| 2297 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
| 2298 |
+
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
| 2299 |
+
"license": "MIT",
|
| 2300 |
+
"engines": {
|
| 2301 |
+
"node": ">= 0.8"
|
| 2302 |
+
}
|
| 2303 |
+
},
|
| 2304 |
+
"node_modules/streamsearch": {
|
| 2305 |
+
"version": "1.1.0",
|
| 2306 |
+
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
| 2307 |
+
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
|
| 2308 |
+
"engines": {
|
| 2309 |
+
"node": ">=10.0.0"
|
| 2310 |
+
}
|
| 2311 |
+
},
|
| 2312 |
+
"node_modules/supports-color": {
|
| 2313 |
+
"version": "5.5.0",
|
| 2314 |
+
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
| 2315 |
+
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
| 2316 |
+
"dev": true,
|
| 2317 |
+
"license": "MIT",
|
| 2318 |
+
"dependencies": {
|
| 2319 |
+
"has-flag": "^3.0.0"
|
| 2320 |
+
},
|
| 2321 |
+
"engines": {
|
| 2322 |
+
"node": ">=4"
|
| 2323 |
+
}
|
| 2324 |
+
},
|
| 2325 |
+
"node_modules/to-regex-range": {
|
| 2326 |
+
"version": "5.0.1",
|
| 2327 |
+
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
| 2328 |
+
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
| 2329 |
+
"dev": true,
|
| 2330 |
+
"license": "MIT",
|
| 2331 |
+
"dependencies": {
|
| 2332 |
+
"is-number": "^7.0.0"
|
| 2333 |
+
},
|
| 2334 |
+
"engines": {
|
| 2335 |
+
"node": ">=8.0"
|
| 2336 |
+
}
|
| 2337 |
+
},
|
| 2338 |
+
"node_modules/toidentifier": {
|
| 2339 |
+
"version": "1.0.1",
|
| 2340 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
| 2341 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
| 2342 |
+
"license": "MIT",
|
| 2343 |
+
"engines": {
|
| 2344 |
+
"node": ">=0.6"
|
| 2345 |
+
}
|
| 2346 |
+
},
|
| 2347 |
+
"node_modules/touch": {
|
| 2348 |
+
"version": "3.1.1",
|
| 2349 |
+
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
|
| 2350 |
+
"integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
|
| 2351 |
+
"dev": true,
|
| 2352 |
+
"license": "ISC",
|
| 2353 |
+
"bin": {
|
| 2354 |
+
"nodetouch": "bin/nodetouch.js"
|
| 2355 |
+
}
|
| 2356 |
+
},
|
| 2357 |
+
"node_modules/type-is": {
|
| 2358 |
+
"version": "1.6.18",
|
| 2359 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
| 2360 |
+
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
| 2361 |
+
"license": "MIT",
|
| 2362 |
+
"dependencies": {
|
| 2363 |
+
"media-typer": "0.3.0",
|
| 2364 |
+
"mime-types": "~2.1.24"
|
| 2365 |
+
},
|
| 2366 |
+
"engines": {
|
| 2367 |
+
"node": ">= 0.6"
|
| 2368 |
+
}
|
| 2369 |
+
},
|
| 2370 |
+
"node_modules/typedarray": {
|
| 2371 |
+
"version": "0.0.6",
|
| 2372 |
+
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
| 2373 |
+
"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
|
| 2374 |
+
"license": "MIT"
|
| 2375 |
+
},
|
| 2376 |
+
"node_modules/undefsafe": {
|
| 2377 |
+
"version": "2.0.5",
|
| 2378 |
+
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
|
| 2379 |
+
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
|
| 2380 |
+
"dev": true,
|
| 2381 |
+
"license": "MIT"
|
| 2382 |
+
},
|
| 2383 |
+
"node_modules/unpipe": {
|
| 2384 |
+
"version": "1.0.0",
|
| 2385 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
| 2386 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
| 2387 |
+
"license": "MIT",
|
| 2388 |
+
"engines": {
|
| 2389 |
+
"node": ">= 0.8"
|
| 2390 |
+
}
|
| 2391 |
+
},
|
| 2392 |
+
"node_modules/url": {
|
| 2393 |
+
"version": "0.10.3",
|
| 2394 |
+
"resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
|
| 2395 |
+
"integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==",
|
| 2396 |
+
"license": "MIT",
|
| 2397 |
+
"dependencies": {
|
| 2398 |
+
"punycode": "1.3.2",
|
| 2399 |
+
"querystring": "0.2.0"
|
| 2400 |
+
}
|
| 2401 |
+
},
|
| 2402 |
+
"node_modules/util": {
|
| 2403 |
+
"version": "0.12.5",
|
| 2404 |
+
"resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",
|
| 2405 |
+
"integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==",
|
| 2406 |
+
"license": "MIT",
|
| 2407 |
+
"dependencies": {
|
| 2408 |
+
"inherits": "^2.0.3",
|
| 2409 |
+
"is-arguments": "^1.0.4",
|
| 2410 |
+
"is-generator-function": "^1.0.7",
|
| 2411 |
+
"is-typed-array": "^1.1.3",
|
| 2412 |
+
"which-typed-array": "^1.1.2"
|
| 2413 |
+
}
|
| 2414 |
+
},
|
| 2415 |
+
"node_modules/util-deprecate": {
|
| 2416 |
+
"version": "1.0.2",
|
| 2417 |
+
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
| 2418 |
+
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
| 2419 |
+
"license": "MIT"
|
| 2420 |
+
},
|
| 2421 |
+
"node_modules/utils-merge": {
|
| 2422 |
+
"version": "1.0.1",
|
| 2423 |
+
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
| 2424 |
+
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
| 2425 |
+
"license": "MIT",
|
| 2426 |
+
"engines": {
|
| 2427 |
+
"node": ">= 0.4.0"
|
| 2428 |
+
}
|
| 2429 |
+
},
|
| 2430 |
+
"node_modules/vary": {
|
| 2431 |
+
"version": "1.1.2",
|
| 2432 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
| 2433 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
| 2434 |
+
"license": "MIT",
|
| 2435 |
+
"engines": {
|
| 2436 |
+
"node": ">= 0.8"
|
| 2437 |
+
}
|
| 2438 |
+
},
|
| 2439 |
+
"node_modules/which-typed-array": {
|
| 2440 |
+
"version": "1.1.19",
|
| 2441 |
+
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz",
|
| 2442 |
+
"integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==",
|
| 2443 |
+
"license": "MIT",
|
| 2444 |
+
"dependencies": {
|
| 2445 |
+
"available-typed-arrays": "^1.0.7",
|
| 2446 |
+
"call-bind": "^1.0.8",
|
| 2447 |
+
"call-bound": "^1.0.4",
|
| 2448 |
+
"for-each": "^0.3.5",
|
| 2449 |
+
"get-proto": "^1.0.1",
|
| 2450 |
+
"gopd": "^1.2.0",
|
| 2451 |
+
"has-tostringtag": "^1.0.2"
|
| 2452 |
+
},
|
| 2453 |
+
"engines": {
|
| 2454 |
+
"node": ">= 0.4"
|
| 2455 |
+
},
|
| 2456 |
+
"funding": {
|
| 2457 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 2458 |
+
}
|
| 2459 |
+
},
|
| 2460 |
+
"node_modules/ws": {
|
| 2461 |
+
"version": "8.17.1",
|
| 2462 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
| 2463 |
+
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
| 2464 |
+
"license": "MIT",
|
| 2465 |
+
"engines": {
|
| 2466 |
+
"node": ">=10.0.0"
|
| 2467 |
+
},
|
| 2468 |
+
"peerDependencies": {
|
| 2469 |
+
"bufferutil": "^4.0.1",
|
| 2470 |
+
"utf-8-validate": ">=5.0.2"
|
| 2471 |
+
},
|
| 2472 |
+
"peerDependenciesMeta": {
|
| 2473 |
+
"bufferutil": {
|
| 2474 |
+
"optional": true
|
| 2475 |
+
},
|
| 2476 |
+
"utf-8-validate": {
|
| 2477 |
+
"optional": true
|
| 2478 |
+
}
|
| 2479 |
+
}
|
| 2480 |
+
},
|
| 2481 |
+
"node_modules/xml2js": {
|
| 2482 |
+
"version": "0.6.2",
|
| 2483 |
+
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz",
|
| 2484 |
+
"integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==",
|
| 2485 |
+
"license": "MIT",
|
| 2486 |
+
"dependencies": {
|
| 2487 |
+
"sax": ">=0.6.0",
|
| 2488 |
+
"xmlbuilder": "~11.0.0"
|
| 2489 |
+
},
|
| 2490 |
+
"engines": {
|
| 2491 |
+
"node": ">=4.0.0"
|
| 2492 |
+
}
|
| 2493 |
+
},
|
| 2494 |
+
"node_modules/xmlbuilder": {
|
| 2495 |
+
"version": "11.0.1",
|
| 2496 |
+
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
|
| 2497 |
+
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
|
| 2498 |
+
"license": "MIT",
|
| 2499 |
+
"engines": {
|
| 2500 |
+
"node": ">=4.0"
|
| 2501 |
+
}
|
| 2502 |
+
},
|
| 2503 |
+
"node_modules/xtend": {
|
| 2504 |
+
"version": "4.0.2",
|
| 2505 |
+
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
| 2506 |
+
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
| 2507 |
+
"license": "MIT",
|
| 2508 |
+
"engines": {
|
| 2509 |
+
"node": ">=0.4"
|
| 2510 |
+
}
|
| 2511 |
+
}
|
| 2512 |
+
}
|
| 2513 |
+
}
|
package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "sld-gc-portal",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"description": "SLD Gift Card Portal with real-time server monitoring",
|
| 5 |
+
"main": "server.js",
|
| 6 |
+
"scripts": {
|
| 7 |
+
"start": "node server.js",
|
| 8 |
+
"dev": "nodemon server.js",
|
| 9 |
+
"test": "echo \"Error: no test specified\" && exit 1"
|
| 10 |
+
},
|
| 11 |
+
"keywords": [
|
| 12 |
+
"gift-card",
|
| 13 |
+
"portal",
|
| 14 |
+
"socket.io",
|
| 15 |
+
"real-time",
|
| 16 |
+
"monitoring"
|
| 17 |
+
],
|
| 18 |
+
"author": "SLD Team",
|
| 19 |
+
"license": "MIT",
|
| 20 |
+
"dependencies": {
|
| 21 |
+
"aws-sdk": "^2.1450.0",
|
| 22 |
+
"axios": "^1.5.0",
|
| 23 |
+
"bcrypt": "^6.0.0",
|
| 24 |
+
"bcryptjs": "^2.4.3",
|
| 25 |
+
"compression": "^1.7.4",
|
| 26 |
+
"cors": "^2.8.5",
|
| 27 |
+
"dotenv": "^16.3.1",
|
| 28 |
+
"express": "^4.18.2",
|
| 29 |
+
"helmet": "^7.0.0",
|
| 30 |
+
"jsonwebtoken": "^9.0.2",
|
| 31 |
+
"morgan": "^1.10.0",
|
| 32 |
+
"multer": "^1.4.5-lts.1",
|
| 33 |
+
"nodemailer": "^6.9.5",
|
| 34 |
+
"pg": "^8.16.0",
|
| 35 |
+
"socket.io": "^4.8.1"
|
| 36 |
+
},
|
| 37 |
+
"devDependencies": {
|
| 38 |
+
"nodemon": "^3.0.1"
|
| 39 |
+
},
|
| 40 |
+
"engines": {
|
| 41 |
+
"node": ">=14.0.0"
|
| 42 |
+
}
|
| 43 |
+
}
|
public/admin.html
ADDED
|
@@ -0,0 +1,528 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Admin - SLD GC Portal</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
:root {
|
| 11 |
+
--apple-blue: #007AFF;
|
| 12 |
+
--apple-gray: #1C1C1E;
|
| 13 |
+
--apple-light: #F2F2F7;
|
| 14 |
+
--apple-dark: #000000;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
body {
|
| 18 |
+
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
|
| 19 |
+
-webkit-font-smoothing: antialiased;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.glass {
|
| 23 |
+
background: rgba(255, 255, 255, 0.08);
|
| 24 |
+
backdrop-filter: blur(20px);
|
| 25 |
+
-webkit-backdrop-filter: blur(20px);
|
| 26 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.apple-btn {
|
| 30 |
+
background: var(--apple-blue);
|
| 31 |
+
border-radius: 12px;
|
| 32 |
+
transition: all 0.2s ease;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.apple-btn:hover { transform: scale(0.98); }
|
| 36 |
+
|
| 37 |
+
.apple-input {
|
| 38 |
+
background: rgba(255, 255, 255, 0.1);
|
| 39 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 40 |
+
border-radius: 12px;
|
| 41 |
+
transition: all 0.3s ease;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.apple-input:focus {
|
| 45 |
+
border-color: var(--apple-blue);
|
| 46 |
+
box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.apple-card {
|
| 50 |
+
background: rgba(255, 255, 255, 0.05);
|
| 51 |
+
border-radius: 16px;
|
| 52 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 53 |
+
transition: all 0.3s ease;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.apple-card:hover { transform: translateY(-2px); }
|
| 57 |
+
|
| 58 |
+
.loading { animation: spin 1s linear infinite; }
|
| 59 |
+
@keyframes spin { to { transform: rotate(360deg); } }
|
| 60 |
+
|
| 61 |
+
.fade-in { animation: fadeIn 0.5s ease-in-out; }
|
| 62 |
+
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
| 63 |
+
</style>
|
| 64 |
+
</head>
|
| 65 |
+
<body class="bg-black text-white min-h-screen">
|
| 66 |
+
<!-- Auth Section -->
|
| 67 |
+
<div id="authSection" class="min-h-screen bg-gradient-to-br from-black via-gray-900 to-blue-900 flex items-center justify-center p-4">
|
| 68 |
+
<div class="glass p-8 rounded-3xl max-w-md w-full fade-in">
|
| 69 |
+
<div class="text-center mb-8">
|
| 70 |
+
<div class="w-20 h-20 glass rounded-2xl flex items-center justify-center mx-auto mb-6">
|
| 71 |
+
<i class="fas fa-shield-alt text-3xl text-blue-400"></i>
|
| 72 |
+
</div>
|
| 73 |
+
<h1 class="text-3xl font-bold mb-2">Admin Portal</h1>
|
| 74 |
+
<p class="text-gray-400">Secure access required</p>
|
| 75 |
+
</div>
|
| 76 |
+
<div class="space-y-4">
|
| 77 |
+
<button onclick="sendOTP()" class="w-full apple-btn text-white py-3 px-6 font-medium">
|
| 78 |
+
<i class="fas fa-paper-plane mr-2"></i>Send OTP
|
| 79 |
+
</button>
|
| 80 |
+
<div id="otpSection" class="hidden space-y-4">
|
| 81 |
+
<input type="text" id="otpInput" placeholder="Enter 6-digit OTP" class="w-full apple-input text-white p-3">
|
| 82 |
+
<button onclick="verifyOTP()" class="w-full apple-btn text-white py-3 px-6 font-medium">
|
| 83 |
+
<i class="fas fa-check-circle mr-2"></i>Verify OTP
|
| 84 |
+
</button>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
|
| 90 |
+
<!-- Dashboard -->
|
| 91 |
+
<div id="dashboard" class="hidden min-h-screen bg-black">
|
| 92 |
+
<!-- Header -->
|
| 93 |
+
<header class="glass sticky top-0 z-50 border-b border-gray-800">
|
| 94 |
+
<div class="max-w-7xl mx-auto px-4 py-4">
|
| 95 |
+
<div class="flex justify-between items-center">
|
| 96 |
+
<div class="flex items-center space-x-4">
|
| 97 |
+
<div class="w-10 h-10 bg-blue-600 rounded-xl flex items-center justify-center">
|
| 98 |
+
<i class="fas fa-tachometer-alt text-white"></i>
|
| 99 |
+
</div>
|
| 100 |
+
<div>
|
| 101 |
+
<h1 class="text-xl font-bold">Admin Dashboard</h1>
|
| 102 |
+
<p class="text-sm text-gray-400">Manage submissions</p>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
<button onclick="logout()" class="apple-btn bg-red-500 text-white px-4 py-2">
|
| 106 |
+
<i class="fas fa-sign-out-alt mr-2"></i>Logout
|
| 107 |
+
</button>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
</header>
|
| 111 |
+
|
| 112 |
+
<main class="max-w-7xl mx-auto p-4 pb-20">
|
| 113 |
+
<!-- Stats -->
|
| 114 |
+
<div class="grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
|
| 115 |
+
<div class="apple-card p-4">
|
| 116 |
+
<div class="flex items-center justify-between">
|
| 117 |
+
<div>
|
| 118 |
+
<p class="text-gray-400 text-sm">Total</p>
|
| 119 |
+
<p id="totalCount" class="text-2xl font-bold">0</p>
|
| 120 |
+
</div>
|
| 121 |
+
<i class="fas fa-file-alt text-blue-400 text-xl"></i>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
<div class="apple-card p-4">
|
| 125 |
+
<div class="flex items-center justify-between">
|
| 126 |
+
<div>
|
| 127 |
+
<p class="text-gray-400 text-sm">Pending</p>
|
| 128 |
+
<p id="pendingCount" class="text-2xl font-bold text-yellow-400">0</p>
|
| 129 |
+
</div>
|
| 130 |
+
<i class="fas fa-clock text-yellow-400 text-xl"></i>
|
| 131 |
+
</div>
|
| 132 |
+
</div>
|
| 133 |
+
<div class="apple-card p-4">
|
| 134 |
+
<div class="flex items-center justify-between">
|
| 135 |
+
<div>
|
| 136 |
+
<p class="text-gray-400 text-sm">Approved</p>
|
| 137 |
+
<p id="approvedCount" class="text-2xl font-bold text-green-400">0</p>
|
| 138 |
+
</div>
|
| 139 |
+
<i class="fas fa-check-circle text-green-400 text-xl"></i>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
<div class="apple-card p-4">
|
| 143 |
+
<div class="flex items-center justify-between">
|
| 144 |
+
<div>
|
| 145 |
+
<p class="text-gray-400 text-sm">Paid</p>
|
| 146 |
+
<p id="paidCount" class="text-2xl font-bold text-blue-400">0</p>
|
| 147 |
+
</div>
|
| 148 |
+
<i class="fas fa-money-bill-wave text-blue-400 text-xl"></i>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<!-- Submissions -->
|
| 154 |
+
<div class="glass rounded-2xl overflow-hidden">
|
| 155 |
+
<div class="p-6 border-b border-gray-800">
|
| 156 |
+
<h2 class="text-xl font-bold">Recent Submissions</h2>
|
| 157 |
+
</div>
|
| 158 |
+
<div id="submissionsList" class="divide-y divide-gray-800"></div>
|
| 159 |
+
</div>
|
| 160 |
+
</main>
|
| 161 |
+
</div>
|
| 162 |
+
|
| 163 |
+
<!-- Video Modal -->
|
| 164 |
+
<div id="videoModal" class="fixed inset-0 bg-black bg-opacity-80 hidden flex items-center justify-center p-4 z-50">
|
| 165 |
+
<div class="glass rounded-2xl max-w-4xl w-full max-h-[90vh] overflow-hidden">
|
| 166 |
+
<div class="flex justify-between items-center p-4 border-b border-gray-800">
|
| 167 |
+
<h3 class="text-lg font-bold">Video Proof</h3>
|
| 168 |
+
<button onclick="closeVideo()" class="w-8 h-8 bg-red-500 rounded-lg flex items-center justify-center">
|
| 169 |
+
<i class="fas fa-times text-sm"></i>
|
| 170 |
+
</button>
|
| 171 |
+
</div>
|
| 172 |
+
<div class="p-4">
|
| 173 |
+
<video id="modalVideo" controls class="w-full rounded-xl"></video>
|
| 174 |
+
</div>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
<!-- Chat Modal -->
|
| 179 |
+
<div id="chatModal" class="fixed inset-0 bg-black bg-opacity-80 hidden flex items-center justify-center p-4 z-50">
|
| 180 |
+
<div class="glass rounded-2xl max-w-2xl w-full max-h-[90vh] flex flex-col">
|
| 181 |
+
<div class="flex justify-between items-center p-4 border-b border-gray-800">
|
| 182 |
+
<div>
|
| 183 |
+
<h3 class="text-lg font-bold">Chat</h3>
|
| 184 |
+
<p class="text-sm text-gray-400" id="chatEmail"></p>
|
| 185 |
+
</div>
|
| 186 |
+
<button onclick="closeChat()" class="w-8 h-8 bg-red-500 rounded-lg flex items-center justify-center">
|
| 187 |
+
<i class="fas fa-times text-sm"></i>
|
| 188 |
+
</button>
|
| 189 |
+
</div>
|
| 190 |
+
<div id="chatMessages" class="flex-1 overflow-y-auto p-4 space-y-3 max-h-80"></div>
|
| 191 |
+
<form id="chatForm" class="p-4 border-t border-gray-800">
|
| 192 |
+
<div class="flex space-x-3">
|
| 193 |
+
<input type="text" id="messageInput" placeholder="Type message..." class="flex-1 apple-input text-white p-3">
|
| 194 |
+
<button type="submit" class="apple-btn text-white px-4 py-3">
|
| 195 |
+
<i class="fas fa-paper-plane"></i>
|
| 196 |
+
</button>
|
| 197 |
+
</div>
|
| 198 |
+
</form>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
<script>
|
| 203 |
+
let currentUserId = null;
|
| 204 |
+
let socket = null;
|
| 205 |
+
|
| 206 |
+
// Initialize Socket.IO connection for admin
|
| 207 |
+
function initializeAdminSocket() {
|
| 208 |
+
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
| 209 |
+
const host = window.location.host;
|
| 210 |
+
|
| 211 |
+
socket = io(`${protocol}//${host}`, {
|
| 212 |
+
transports: ['websocket', 'polling']
|
| 213 |
+
});
|
| 214 |
+
|
| 215 |
+
socket.on('connect', () => {
|
| 216 |
+
console.log('Admin connected to chat server');
|
| 217 |
+
});
|
| 218 |
+
|
| 219 |
+
socket.on('new-message', (data) => {
|
| 220 |
+
// Add message to current chat if it's the active user
|
| 221 |
+
if (data.message.user_id === currentUserId) {
|
| 222 |
+
addMessageToAdminChat(data.message);
|
| 223 |
+
}
|
| 224 |
+
});
|
| 225 |
+
|
| 226 |
+
socket.on('disconnect', () => {
|
| 227 |
+
console.log('Admin disconnected from chat server');
|
| 228 |
+
});
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
// Add message to admin chat without reloading
|
| 232 |
+
function addMessageToAdminChat(message) {
|
| 233 |
+
const container = document.getElementById('chatMessages');
|
| 234 |
+
if (!container) return;
|
| 235 |
+
|
| 236 |
+
const div = document.createElement('div');
|
| 237 |
+
div.className = `flex ${message.sender === 'admin' ? 'justify-end' : 'justify-start'}`;
|
| 238 |
+
div.innerHTML = `
|
| 239 |
+
<div class="max-w-xs px-4 py-2 rounded-2xl ${message.sender === 'admin' ? 'bg-blue-600' : 'bg-gray-700'}">
|
| 240 |
+
<p class="text-sm">${message.content}</p>
|
| 241 |
+
<p class="text-xs opacity-70 mt-1">${new Date(message.created_at).toLocaleString()}</p>
|
| 242 |
+
</div>
|
| 243 |
+
`;
|
| 244 |
+
container.appendChild(div);
|
| 245 |
+
container.scrollTop = container.scrollHeight;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
// Initialize socket when page loads
|
| 249 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 250 |
+
initializeAdminSocket();
|
| 251 |
+
});
|
| 252 |
+
|
| 253 |
+
// Auth Functions
|
| 254 |
+
async function sendOTP() {
|
| 255 |
+
try {
|
| 256 |
+
const response = await fetch('https://mail-steel.vercel.app/admin/send-otp', {
|
| 257 |
+
method: 'POST',
|
| 258 |
+
headers: { 'Content-Type': 'application/json' }
|
| 259 |
+
});
|
| 260 |
+
const data = await response.json();
|
| 261 |
+
if (data.success) {
|
| 262 |
+
document.getElementById('otpSection').classList.remove('hidden');
|
| 263 |
+
showNotification('OTP sent successfully', 'success');
|
| 264 |
+
} else {
|
| 265 |
+
showNotification(data.error || 'Failed to send OTP', 'error');
|
| 266 |
+
}
|
| 267 |
+
} catch (error) {
|
| 268 |
+
showNotification('Failed to send OTP', 'error');
|
| 269 |
+
}
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
async function verifyOTP() {
|
| 273 |
+
const otp = document.getElementById('otpInput').value;
|
| 274 |
+
if (!otp) return showNotification('Please enter OTP', 'warning');
|
| 275 |
+
|
| 276 |
+
try {
|
| 277 |
+
const response = await fetch('https://mail-steel.vercel.app/admin/verify-otp', {
|
| 278 |
+
method: 'POST',
|
| 279 |
+
headers: { 'Content-Type': 'application/json' },
|
| 280 |
+
body: JSON.stringify({ otp })
|
| 281 |
+
});
|
| 282 |
+
const data = await response.json();
|
| 283 |
+
if (data.success) {
|
| 284 |
+
sessionStorage.setItem('adminToken', otp);
|
| 285 |
+
document.getElementById('authSection').classList.add('hidden');
|
| 286 |
+
document.getElementById('dashboard').classList.remove('hidden');
|
| 287 |
+
loadSubmissions();
|
| 288 |
+
showNotification('Login successful', 'success');
|
| 289 |
+
} else {
|
| 290 |
+
showNotification(data.error || 'Invalid OTP', 'error');
|
| 291 |
+
}
|
| 292 |
+
} catch (error) {
|
| 293 |
+
showNotification('Failed to verify OTP', 'error');
|
| 294 |
+
}
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
function logout() {
|
| 298 |
+
sessionStorage.removeItem('adminToken');
|
| 299 |
+
location.reload();
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
// Dashboard Functions
|
| 303 |
+
async function loadSubmissions() {
|
| 304 |
+
try {
|
| 305 |
+
const response = await fetch('/api/admin/submissions');
|
| 306 |
+
const data = await response.json();
|
| 307 |
+
if (!data.success) throw new Error(data.error);
|
| 308 |
+
|
| 309 |
+
const submissions = data.submissions;
|
| 310 |
+
updateStats(submissions);
|
| 311 |
+
renderSubmissions(submissions);
|
| 312 |
+
} catch (error) {
|
| 313 |
+
document.getElementById('submissionsList').innerHTML = '<div class="p-6 text-center text-red-400">Error loading submissions</div>';
|
| 314 |
+
}
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
function updateStats(submissions) {
|
| 318 |
+
document.getElementById('totalCount').textContent = submissions.length;
|
| 319 |
+
document.getElementById('pendingCount').textContent = submissions.filter(s => s.status === 'pending').length;
|
| 320 |
+
document.getElementById('approvedCount').textContent = submissions.filter(s => s.status === 'approved').length;
|
| 321 |
+
document.getElementById('paidCount').textContent = submissions.filter(s => s.status === 'paid').length;
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
function renderSubmissions(submissions) {
|
| 325 |
+
document.getElementById('submissionsList').innerHTML = submissions.map(s => `
|
| 326 |
+
<div class="p-4 hover:bg-gray-900 transition-colors">
|
| 327 |
+
<div class="flex flex-col space-y-3">
|
| 328 |
+
<div class="flex justify-between items-start">
|
| 329 |
+
<div>
|
| 330 |
+
<h3 class="font-bold text-lg">${s.ticket_user_name}</h3>
|
| 331 |
+
<p class="text-gray-400 text-sm">ID: ${s.id}</p>
|
| 332 |
+
</div>
|
| 333 |
+
<span class="px-3 py-1 rounded-full text-xs font-medium ${getStatusClass(s.status)}">${s.status}</span>
|
| 334 |
+
</div>
|
| 335 |
+
|
| 336 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-3">
|
| 337 |
+
<div class="bg-gray-800 p-3 rounded-lg">
|
| 338 |
+
<h4 class="font-medium text-gray-300 mb-2">Card Details</h4>
|
| 339 |
+
<div class="space-y-1 text-sm text-gray-400">
|
| 340 |
+
<p><i class="fas fa-ticket-alt w-4"></i> ${s.ticket_number}</p>
|
| 341 |
+
<p><i class="fas fa-credit-card w-4"></i> ${s.gc_code}</p>
|
| 342 |
+
<p><i class="fas fa-phone w-4"></i> ${s.gc_phone}</p>
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
+
|
| 346 |
+
<div class="bg-gray-800 p-3 rounded-lg">
|
| 347 |
+
<h4 class="font-medium text-gray-300 mb-2">Payment</h4>
|
| 348 |
+
<div class="space-y-1 text-sm text-gray-400">
|
| 349 |
+
<p><i class="fas fa-rupee-sign w-4"></i> ₹${s.amount}</p>
|
| 350 |
+
<p><i class="fas fa-wallet w-4"></i> ${s.upi_id}</p>
|
| 351 |
+
</div>
|
| 352 |
+
</div>
|
| 353 |
+
|
| 354 |
+
<div class="bg-gray-800 p-3 rounded-lg">
|
| 355 |
+
<h4 class="font-medium text-gray-300 mb-2">User</h4>
|
| 356 |
+
<div class="space-y-1 text-sm text-gray-400">
|
| 357 |
+
<p><i class="fas fa-user w-4"></i> ${s.user_email}</p>
|
| 358 |
+
<p><i class="fas fa-calendar w-4"></i> ${new Date(s.created_at).toLocaleDateString()}</p>
|
| 359 |
+
</div>
|
| 360 |
+
</div>
|
| 361 |
+
</div>
|
| 362 |
+
|
| 363 |
+
<div class="flex flex-wrap gap-2 pt-2">
|
| 364 |
+
<button onclick="showVideo('${s.proof_video_url}')" class="px-3 py-2 bg-blue-600 rounded-lg text-sm">
|
| 365 |
+
<i class="fas fa-video mr-1"></i>Video
|
| 366 |
+
</button>
|
| 367 |
+
<button onclick="openChat('${s.user_id}', '${s.user_email}')" class="px-3 py-2 bg-green-600 rounded-lg text-sm">
|
| 368 |
+
<i class="fas fa-comments mr-1"></i>Chat
|
| 369 |
+
</button>
|
| 370 |
+
${getActionButtons(s)}
|
| 371 |
+
</div>
|
| 372 |
+
</div>
|
| 373 |
+
</div>
|
| 374 |
+
`).join('');
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
function getStatusClass(status) {
|
| 378 |
+
const classes = {
|
| 379 |
+
pending: 'bg-yellow-100 text-yellow-800',
|
| 380 |
+
approved: 'bg-green-100 text-green-800',
|
| 381 |
+
rejected: 'bg-red-100 text-red-800',
|
| 382 |
+
paid: 'bg-blue-100 text-blue-800',
|
| 383 |
+
closed: 'bg-gray-100 text-gray-800'
|
| 384 |
+
};
|
| 385 |
+
return classes[status] || classes.closed;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
function getActionButtons(s) {
|
| 389 |
+
const buttons = {
|
| 390 |
+
pending: `<button onclick="updateStatus('${s.id}', 'approved')" class="px-3 py-2 bg-green-600 rounded-lg text-sm">Approve</button>
|
| 391 |
+
<button onclick="updateStatus('${s.id}', 'rejected')" class="px-3 py-2 bg-red-600 rounded-lg text-sm">Reject</button>`,
|
| 392 |
+
approved: `<button onclick="updateStatus('${s.id}', 'paid')" class="px-3 py-2 bg-blue-600 rounded-lg text-sm">Mark Paid</button>`,
|
| 393 |
+
paid: `<button onclick="updateStatus('${s.id}', 'closed')" class="px-3 py-2 bg-gray-600 rounded-lg text-sm">Close</button>`
|
| 394 |
+
};
|
| 395 |
+
return buttons[s.status] || '';
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
async function updateStatus(id, status) {
|
| 399 |
+
if (!confirm(`Mark as ${status}?`)) return;
|
| 400 |
+
|
| 401 |
+
try {
|
| 402 |
+
const response = await fetch(`/api/admin/submissions/${id}/status`, {
|
| 403 |
+
method: 'POST',
|
| 404 |
+
headers: { 'Content-Type': 'application/json' },
|
| 405 |
+
body: JSON.stringify({ status })
|
| 406 |
+
});
|
| 407 |
+
const data = await response.json();
|
| 408 |
+
if (data.success) {
|
| 409 |
+
showNotification(`Status updated to ${status}`, 'success');
|
| 410 |
+
loadSubmissions();
|
| 411 |
+
} else {
|
| 412 |
+
throw new Error(data.error);
|
| 413 |
+
}
|
| 414 |
+
} catch (error) {
|
| 415 |
+
showNotification('Failed to update status', 'error');
|
| 416 |
+
}
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
// Modal Functions
|
| 420 |
+
function showVideo(url) {
|
| 421 |
+
document.getElementById('modalVideo').src = url;
|
| 422 |
+
document.getElementById('videoModal').classList.remove('hidden');
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
function closeVideo() {
|
| 426 |
+
document.getElementById('modalVideo').src = '';
|
| 427 |
+
document.getElementById('videoModal').classList.add('hidden');
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
function openChat(userId, email) {
|
| 431 |
+
currentUserId = userId;
|
| 432 |
+
document.getElementById('chatEmail').textContent = email;
|
| 433 |
+
document.getElementById('chatModal').classList.remove('hidden');
|
| 434 |
+
loadMessages();
|
| 435 |
+
|
| 436 |
+
// Join admin chat room
|
| 437 |
+
if (socket) {
|
| 438 |
+
socket.emit('join-chat', { userId, userEmail: 'admin' });
|
| 439 |
+
}
|
| 440 |
+
}
|
| 441 |
+
|
| 442 |
+
function closeChat() {
|
| 443 |
+
// Leave chat room
|
| 444 |
+
if (socket && currentUserId) {
|
| 445 |
+
socket.emit('leave-chat', { userId: currentUserId });
|
| 446 |
+
}
|
| 447 |
+
document.getElementById('chatModal').classList.add('hidden');
|
| 448 |
+
currentUserId = null;
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
async function loadMessages() {
|
| 452 |
+
if (!currentUserId) return;
|
| 453 |
+
|
| 454 |
+
try {
|
| 455 |
+
const response = await fetch(`/api/admin/messages/${currentUserId}?limit=50`);
|
| 456 |
+
const data = await response.json();
|
| 457 |
+
if (data.success) {
|
| 458 |
+
document.getElementById('chatMessages').innerHTML = data.messages.map(m => `
|
| 459 |
+
<div class="flex ${m.sender === 'admin' ? 'justify-end' : 'justify-start'}">
|
| 460 |
+
<div class="max-w-xs px-4 py-2 rounded-2xl ${m.sender === 'admin' ? 'bg-blue-600' : 'bg-gray-700'}">
|
| 461 |
+
<p class="text-sm">${m.content}</p>
|
| 462 |
+
<p class="text-xs opacity-70 mt-1">${new Date(m.created_at).toLocaleString()}</p>
|
| 463 |
+
</div>
|
| 464 |
+
</div>
|
| 465 |
+
`).join('');
|
| 466 |
+
document.getElementById('chatMessages').scrollTop = document.getElementById('chatMessages').scrollHeight;
|
| 467 |
+
}
|
| 468 |
+
} catch (error) {
|
| 469 |
+
document.getElementById('chatMessages').innerHTML = '<div class="text-center text-red-400">Error loading messages</div>';
|
| 470 |
+
}
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
document.getElementById('chatForm').addEventListener('submit', async (e) => {
|
| 474 |
+
e.preventDefault();
|
| 475 |
+
const message = document.getElementById('messageInput').value.trim();
|
| 476 |
+
if (!message || !currentUserId) return;
|
| 477 |
+
|
| 478 |
+
try {
|
| 479 |
+
const response = await fetch('/api/admin/messages', {
|
| 480 |
+
method: 'POST',
|
| 481 |
+
headers: { 'Content-Type': 'application/json' },
|
| 482 |
+
body: JSON.stringify({ userId: currentUserId, content: message })
|
| 483 |
+
});
|
| 484 |
+
const data = await response.json();
|
| 485 |
+
if (data.success) {
|
| 486 |
+
document.getElementById('messageInput').value = '';
|
| 487 |
+
// Message will be added via Socket.IO event
|
| 488 |
+
}
|
| 489 |
+
} catch (error) {
|
| 490 |
+
showNotification('Failed to send message', 'error');
|
| 491 |
+
}
|
| 492 |
+
});
|
| 493 |
+
|
| 494 |
+
// Utility Functions
|
| 495 |
+
function showNotification(message, type = 'info') {
|
| 496 |
+
const colors = {
|
| 497 |
+
success: 'bg-green-500',
|
| 498 |
+
error: 'bg-red-500',
|
| 499 |
+
warning: 'bg-yellow-500',
|
| 500 |
+
info: 'bg-blue-500'
|
| 501 |
+
};
|
| 502 |
+
|
| 503 |
+
const notification = document.createElement('div');
|
| 504 |
+
notification.className = `fixed top-4 right-4 ${colors[type]} text-white p-4 rounded-xl z-50 transform transition-all duration-300 translate-x-full`;
|
| 505 |
+
notification.innerHTML = `<div class="flex items-center space-x-2">
|
| 506 |
+
<i class="fas fa-${type === 'success' ? 'check-circle' : type === 'error' ? 'exclamation-circle' : 'info-circle'}"></i>
|
| 507 |
+
<span>${message}</span>
|
| 508 |
+
</div>`;
|
| 509 |
+
|
| 510 |
+
document.body.appendChild(notification);
|
| 511 |
+
setTimeout(() => notification.classList.remove('translate-x-full'), 100);
|
| 512 |
+
setTimeout(() => {
|
| 513 |
+
notification.classList.add('translate-x-full');
|
| 514 |
+
setTimeout(() => document.body.removeChild(notification), 300);
|
| 515 |
+
}, 3000);
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
// Initialize
|
| 519 |
+
window.onload = function() {
|
| 520 |
+
if (sessionStorage.getItem('adminToken')) {
|
| 521 |
+
document.getElementById('authSection').classList.add('hidden');
|
| 522 |
+
document.getElementById('dashboard').classList.remove('hidden');
|
| 523 |
+
loadSubmissions();
|
| 524 |
+
}
|
| 525 |
+
};
|
| 526 |
+
</script>
|
| 527 |
+
</body>
|
| 528 |
+
</html>
|
public/favicon.svg
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GCX (Gift Card Exchange)</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
theme: {
|
| 12 |
+
extend: {
|
| 13 |
+
colors: {
|
| 14 |
+
'apple-gray': '#1d1d1f',
|
| 15 |
+
'apple-blue': '#0071e3',
|
| 16 |
+
'apple-light': '#f5f5f7',
|
| 17 |
+
'apple-dark': '#1d1d1f',
|
| 18 |
+
},
|
| 19 |
+
animation: {
|
| 20 |
+
'fade-in': 'fadeIn 0.5s ease-in-out',
|
| 21 |
+
'slide-up': 'slideUp 0.3s ease-out',
|
| 22 |
+
'pulse-slow': 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
| 23 |
+
},
|
| 24 |
+
keyframes: {
|
| 25 |
+
fadeIn: {
|
| 26 |
+
'0%': { opacity: '0' },
|
| 27 |
+
'100%': { opacity: '1' }
|
| 28 |
+
},
|
| 29 |
+
slideUp: {
|
| 30 |
+
'0%': { transform: 'translateY(10px)', opacity: '0' },
|
| 31 |
+
'100%': { transform: 'translateY(0)', opacity: '1' }
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
</script>
|
| 38 |
+
<style>
|
| 39 |
+
:root {
|
| 40 |
+
--apple-blue: #0071e3;
|
| 41 |
+
--apple-gray: #1d1d1f;
|
| 42 |
+
--apple-light: #f5f5f7;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
body {
|
| 46 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
| 47 |
+
-webkit-font-smoothing: antialiased;
|
| 48 |
+
-moz-osx-font-smoothing: grayscale;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.gradient-bg {
|
| 52 |
+
background: linear-gradient(135deg, #000000 0%, #1d1d1f 100%);
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.glass-effect {
|
| 56 |
+
background: rgba(255, 255, 255, 0.08);
|
| 57 |
+
backdrop-filter: blur(20px);
|
| 58 |
+
-webkit-backdrop-filter: blur(20px);
|
| 59 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 60 |
+
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.card-shadow {
|
| 64 |
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.btn-primary {
|
| 68 |
+
background: var(--apple-blue);
|
| 69 |
+
transition: all 0.3s ease;
|
| 70 |
+
border-radius: 980px;
|
| 71 |
+
font-weight: 500;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.btn-primary:hover {
|
| 75 |
+
transform: translateY(-1px);
|
| 76 |
+
box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.form-input {
|
| 80 |
+
background: rgba(255, 255, 255, 0.05) !important;
|
| 81 |
+
border-radius: 12px;
|
| 82 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 83 |
+
transition: all 0.3s ease;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.form-input:focus {
|
| 87 |
+
border-color: var(--apple-blue);
|
| 88 |
+
box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.feature-card {
|
| 92 |
+
transition: all 0.3s ease;
|
| 93 |
+
border-radius: 20px;
|
| 94 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.feature-card:hover {
|
| 98 |
+
transform: translateY(-4px);
|
| 99 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.status-badge {
|
| 103 |
+
border-radius: 980px;
|
| 104 |
+
font-size: 0.75rem;
|
| 105 |
+
font-weight: 500;
|
| 106 |
+
padding: 0.25rem 1rem;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.loading-spinner {
|
| 110 |
+
width: 20px;
|
| 111 |
+
height: 20px;
|
| 112 |
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
| 113 |
+
border-top: 2px solid #ffffff;
|
| 114 |
+
border-radius: 50%;
|
| 115 |
+
animation: spin 1s linear infinite;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
@keyframes spin {
|
| 119 |
+
to { transform: rotate(360deg); }
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.modal-backdrop {
|
| 123 |
+
backdrop-filter: blur(10px);
|
| 124 |
+
-webkit-backdrop-filter: blur(10px);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.nav-link {
|
| 128 |
+
position: relative;
|
| 129 |
+
transition: all 0.3s ease;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
.nav-link::after {
|
| 133 |
+
content: '';
|
| 134 |
+
position: absolute;
|
| 135 |
+
bottom: -2px;
|
| 136 |
+
left: 0;
|
| 137 |
+
width: 0;
|
| 138 |
+
height: 2px;
|
| 139 |
+
background: var(--apple-blue);
|
| 140 |
+
transition: width 0.3s ease;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.nav-link:hover::after {
|
| 144 |
+
width: 100%;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.apple-button {
|
| 148 |
+
background: var(--apple-blue);
|
| 149 |
+
color: white;
|
| 150 |
+
border-radius: 980px;
|
| 151 |
+
padding: 0.75rem 1.5rem;
|
| 152 |
+
font-weight: 500;
|
| 153 |
+
transition: all 0.3s ease;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
.apple-button:hover {
|
| 157 |
+
transform: translateY(-1px);
|
| 158 |
+
box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.apple-input {
|
| 162 |
+
background: rgba(255, 255, 255, 0.05);
|
| 163 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 164 |
+
border-radius: 12px;
|
| 165 |
+
padding: 0.75rem 1rem;
|
| 166 |
+
color: white;
|
| 167 |
+
transition: all 0.3s ease;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.apple-input:focus {
|
| 171 |
+
border-color: var(--apple-blue);
|
| 172 |
+
box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
.apple-select {
|
| 176 |
+
appearance: none;
|
| 177 |
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
|
| 178 |
+
background-repeat: no-repeat;
|
| 179 |
+
background-position: right 1rem center;
|
| 180 |
+
background-size: 1.5em;
|
| 181 |
+
padding-right: 2.5rem;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
.apple-card {
|
| 185 |
+
background: rgba(255, 255, 255, 0.05);
|
| 186 |
+
border-radius: 20px;
|
| 187 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 188 |
+
transition: all 0.3s ease;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
.apple-card:hover {
|
| 192 |
+
transform: translateY(-4px);
|
| 193 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
.apple-header {
|
| 197 |
+
background: rgba(0, 0, 0, 0.8);
|
| 198 |
+
backdrop-filter: blur(20px);
|
| 199 |
+
-webkit-backdrop-filter: blur(20px);
|
| 200 |
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
.apple-footer {
|
| 204 |
+
background: rgba(0, 0, 0, 0.8);
|
| 205 |
+
backdrop-filter: blur(20px);
|
| 206 |
+
-webkit-backdrop-filter: blur(20px);
|
| 207 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
/* Splash fade-out animation */
|
| 211 |
+
#splashScreen.fade-out {
|
| 212 |
+
opacity: 0;
|
| 213 |
+
pointer-events: none;
|
| 214 |
+
transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1);
|
| 215 |
+
}
|
| 216 |
+
.main-content.fade-in {
|
| 217 |
+
display: block !important;
|
| 218 |
+
animation: fadeInMain 0.8s cubic-bezier(0.4,0,0.2,1);
|
| 219 |
+
}
|
| 220 |
+
@keyframes fadeInMain {
|
| 221 |
+
from { opacity: 0; transform: scale(0.98); }
|
| 222 |
+
to { opacity: 1; transform: scale(1); }
|
| 223 |
+
}
|
| 224 |
+
/* Splash logo slow zoom in/out */
|
| 225 |
+
.splash-zoom {
|
| 226 |
+
animation: splashZoom 6s ease-in-out infinite alternate;
|
| 227 |
+
}
|
| 228 |
+
@keyframes splashZoom {
|
| 229 |
+
0% { transform: scale(1); }
|
| 230 |
+
100% { transform: scale(1.5); }
|
| 231 |
+
}
|
| 232 |
+
</style>
|
| 233 |
+
</head>
|
| 234 |
+
<body class="min-h-screen bg-black text-white">
|
| 235 |
+
<!-- Splash Screen -->
|
| 236 |
+
<div id="splashScreen" class="fixed inset-0 flex items-center justify-center bg-black z-50 transition-opacity duration-700">
|
| 237 |
+
<img src="logo.png" alt="Logo" class="w-64 h-64 object-contain cursor-pointer splash-zoom" id="splashLogo">
|
| 238 |
+
</div>
|
| 239 |
+
|
| 240 |
+
<!-- Background Pattern -->
|
| 241 |
+
<div class="absolute inset-0 bg-black opacity-10 main-content hidden"></div>
|
| 242 |
+
<div class="absolute inset-0 main-content hidden" style="background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 0%, transparent 50%);"></div>
|
| 243 |
+
|
| 244 |
+
<div class="relative z-10 min-h-screen main-content hidden">
|
| 245 |
+
<!-- Auth Section -->
|
| 246 |
+
<div id="authSection" class="w-full max-w-md mx-auto py-12 animate-fade-in">
|
| 247 |
+
<div class="glass-effect rounded-2xl card-shadow p-8 space-y-8 hover-glow">
|
| 248 |
+
<!-- Logo/Header -->
|
| 249 |
+
<div class="text-center">
|
| 250 |
+
<div class="w-20 h-20 bg-white bg-opacity-10 rounded-full flex items-center justify-center mx-auto mb-4 glow">
|
| 251 |
+
<svg class="w-10 h-10 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 252 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1"></path>
|
| 253 |
+
</svg>
|
| 254 |
+
</div>
|
| 255 |
+
<h1 class="text-4xl font-bold text-white mb-2">GCX (Gift Card Exchange)</h1>
|
| 256 |
+
<p class="text-white text-opacity-70 text-lg">Secure gift card management system</p>
|
| 257 |
+
</div>
|
| 258 |
+
|
| 259 |
+
<!-- Login Form -->
|
| 260 |
+
<div id="loginSection">
|
| 261 |
+
<h2 class="text-2xl font-semibold text-white mb-6 text-center">Welcome Back</h2>
|
| 262 |
+
<form id="loginForm" class="space-y-6">
|
| 263 |
+
<div class="space-y-2">
|
| 264 |
+
<label for="loginEmail" class="block text-sm font-medium text-white text-opacity-90">Email Address</label>
|
| 265 |
+
<input type="email" id="loginEmail" name="email" required
|
| 266 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 267 |
+
</div>
|
| 268 |
+
<div class="space-y-2">
|
| 269 |
+
<label for="loginPassword" class="block text-sm font-medium text-white text-opacity-90">Password</label>
|
| 270 |
+
<input type="password" id="loginPassword" name="password" required
|
| 271 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 272 |
+
</div>
|
| 273 |
+
<button type="submit" id="loginButton"
|
| 274 |
+
class="w-full btn-primary text-white py-3 px-6 rounded-xl font-semibold flex items-center justify-center space-x-2 disabled:opacity-50">
|
| 275 |
+
<span>Sign In</span>
|
| 276 |
+
</button>
|
| 277 |
+
</form>
|
| 278 |
+
<div class="mt-6 text-center">
|
| 279 |
+
<span class="text-white text-opacity-70">Don't have an account? </span>
|
| 280 |
+
<button id="showRegisterBtn" class="text-white font-semibold hover:text-opacity-80 transition-colors">
|
| 281 |
+
Create Account
|
| 282 |
+
</button>
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
<!-- Register Form -->
|
| 287 |
+
<div id="registerSection" class="hidden">
|
| 288 |
+
<h2 class="text-2xl font-semibold text-white mb-6 text-center">Create Account</h2>
|
| 289 |
+
<form id="registerForm" class="space-y-6">
|
| 290 |
+
<div class="space-y-2">
|
| 291 |
+
<label for="registerName" class="block text-sm font-medium text-white text-opacity-90">Full Name</label>
|
| 292 |
+
<input type="text" id="registerName" name="name" required
|
| 293 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 294 |
+
</div>
|
| 295 |
+
<div class="space-y-2">
|
| 296 |
+
<label for="registerEmail" class="block text-sm font-medium text-white text-opacity-90">Email Address</label>
|
| 297 |
+
<input type="email" id="registerEmail" name="email" required
|
| 298 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 299 |
+
</div>
|
| 300 |
+
<div class="space-y-2">
|
| 301 |
+
<label for="registerPassword" class="block text-sm font-medium text-white text-opacity-90">Password</label>
|
| 302 |
+
<input type="password" id="registerPassword" name="password" required
|
| 303 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 304 |
+
</div>
|
| 305 |
+
<div class="space-y-2">
|
| 306 |
+
<label for="confirmPassword" class="block text-sm font-medium text-white text-opacity-90">Confirm Password</label>
|
| 307 |
+
<input type="password" id="confirmPassword" name="confirmPassword" required
|
| 308 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 309 |
+
</div>
|
| 310 |
+
<button type="submit" id="registerButton"
|
| 311 |
+
class="w-full btn-secondary text-white py-3 px-6 rounded-xl font-semibold flex items-center justify-center space-x-2 disabled:opacity-50">
|
| 312 |
+
<span>Create Account</span>
|
| 313 |
+
</button>
|
| 314 |
+
</form>
|
| 315 |
+
<div class="mt-6 text-center">
|
| 316 |
+
<span class="text-white text-opacity-70">Already have an account? </span>
|
| 317 |
+
<button id="showLoginBtn" class="text-white font-semibold hover:text-opacity-80 transition-colors">
|
| 318 |
+
Sign In
|
| 319 |
+
</button>
|
| 320 |
+
</div>
|
| 321 |
+
</div>
|
| 322 |
+
</div>
|
| 323 |
+
</div>
|
| 324 |
+
|
| 325 |
+
<!-- OTP Section -->
|
| 326 |
+
<div id="otpSection" class="w-full max-w-md mx-auto py-12 animate-fade-in hidden">
|
| 327 |
+
<div class="glass-effect rounded-2xl card-shadow p-8 space-y-8">
|
| 328 |
+
<div class="text-center">
|
| 329 |
+
<div class="w-16 h-16 bg-white bg-opacity-20 rounded-full flex items-center justify-center mx-auto mb-4">
|
| 330 |
+
<svg class="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 331 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
|
| 332 |
+
</svg>
|
| 333 |
+
</div>
|
| 334 |
+
<h2 class="text-2xl font-semibold text-white mb-2">Verify Your Email</h2>
|
| 335 |
+
<p class="text-white text-opacity-70">We've sent a 6-digit code to your email address</p>
|
| 336 |
+
</div>
|
| 337 |
+
|
| 338 |
+
<form id="otpForm" class="space-y-6">
|
| 339 |
+
<div class="space-y-2">
|
| 340 |
+
<label for="otp" class="block text-sm font-medium text-white text-opacity-90">Verification Code</label>
|
| 341 |
+
<input type="text" id="otp" name="otp" required maxlength="6"
|
| 342 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent text-center text-2xl tracking-widest"
|
| 343 |
+
placeholder="000000">
|
| 344 |
+
</div>
|
| 345 |
+
<button type="submit" id="verifyOtpButton"
|
| 346 |
+
class="w-full btn-primary text-white py-3 px-6 rounded-xl font-semibold flex items-center justify-center space-x-2 disabled:opacity-50">
|
| 347 |
+
<span>Verify Code</span>
|
| 348 |
+
</button>
|
| 349 |
+
<button type="button" id="resendOtpButton"
|
| 350 |
+
class="w-full bg-white bg-opacity-10 text-white py-3 px-6 rounded-xl font-semibold hover:bg-opacity-20 transition-all disabled:opacity-50">
|
| 351 |
+
Resend Code
|
| 352 |
+
</button>
|
| 353 |
+
</form>
|
| 354 |
+
</div>
|
| 355 |
+
</div>
|
| 356 |
+
|
| 357 |
+
<!-- Home Page Section -->
|
| 358 |
+
<div id="homeSection" class="w-full animate-fade-in hidden">
|
| 359 |
+
<div class="glass-effect min-h-screen">
|
| 360 |
+
<!-- Header with Logout -->
|
| 361 |
+
<div class="flex justify-between items-center p-6 border-b border-white border-opacity-10">
|
| 362 |
+
<h1 class="text-3xl font-bold text-white">GCX (Gift Card Exchange)</h1>
|
| 363 |
+
<button id="homeLogoutButton"
|
| 364 |
+
class="btn-danger text-white px-4 py-2 rounded-lg font-medium flex items-center space-x-2">
|
| 365 |
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 366 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path>
|
| 367 |
+
</svg>
|
| 368 |
+
<span>Logout</span>
|
| 369 |
+
</button>
|
| 370 |
+
</div>
|
| 371 |
+
|
| 372 |
+
<div class="max-w-7xl mx-auto px-6 py-8">
|
| 373 |
+
<!-- Welcome Section -->
|
| 374 |
+
<div class="text-center mb-12">
|
| 375 |
+
<h2 class="text-4xl font-bold text-white mb-4">Welcome to GCX (Gift Card Exchange)</h2>
|
| 376 |
+
<p class="text-white text-opacity-90 text-xl">Your One-Stop Portal for Converting Gift Cards to Real Cash & Unlocking Digital Reward Secrets.</p>
|
| 377 |
+
</div>
|
| 378 |
+
|
| 379 |
+
<!-- Gift Card Conversion Section -->
|
| 380 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-8 mb-12 feature-card">
|
| 381 |
+
<h3 class="text-3xl font-bold text-white mb-6">💳 Convert Gift Cards to Cash</h3>
|
| 382 |
+
<p class="text-white text-opacity-90 mb-8 text-lg">Got useless gift cards lying around? We make it super simple to turn them into actual money. No shady middlemen. No delays. Just fast payouts.</p>
|
| 383 |
+
|
| 384 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-8">
|
| 385 |
+
<div class="space-y-4">
|
| 386 |
+
<div class="flex items-center text-white bg-white bg-opacity-5 p-4 rounded-xl">
|
| 387 |
+
<svg class="w-6 h-6 mr-3 text-indigo-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 388 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
| 389 |
+
</svg>
|
| 390 |
+
<span class="text-lg">100% safe & verified</span>
|
| 391 |
+
</div>
|
| 392 |
+
<div class="flex items-center text-white bg-white bg-opacity-5 p-4 rounded-xl">
|
| 393 |
+
<svg class="w-6 h-6 mr-3 text-indigo-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 394 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
| 395 |
+
</svg>
|
| 396 |
+
<span class="text-lg">Support for Roblox, Overwatch, and Amazon</span>
|
| 397 |
+
</div>
|
| 398 |
+
</div>
|
| 399 |
+
<div class="space-y-4">
|
| 400 |
+
<div class="flex items-center text-white bg-white bg-opacity-5 p-4 rounded-xl">
|
| 401 |
+
<svg class="w-6 h-6 mr-3 text-indigo-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 402 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
| 403 |
+
</svg>
|
| 404 |
+
<span class="text-lg">UPI, Paytm & crypto transfer options available</span>
|
| 405 |
+
</div>
|
| 406 |
+
<div class="flex items-center text-white bg-white bg-opacity-5 p-4 rounded-xl">
|
| 407 |
+
<svg class="w-6 h-6 mr-3 text-indigo-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 408 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
| 409 |
+
</svg>
|
| 410 |
+
<span class="text-lg">AI Powered verification system</span>
|
| 411 |
+
</div>
|
| 412 |
+
</div>
|
| 413 |
+
</div>
|
| 414 |
+
|
| 415 |
+
<button id="submitGiftCardBtn" class="w-full btn-primary text-white py-4 px-8 rounded-xl font-semibold text-lg flex items-center justify-center space-x-3 hover-glow">
|
| 416 |
+
<span>💸 Start Selling Your Gift Card</span>
|
| 417 |
+
</button>
|
| 418 |
+
</div>
|
| 419 |
+
|
| 420 |
+
<!-- YouTube Tips Section -->
|
| 421 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-8 mb-12">
|
| 422 |
+
<h3 class="text-2xl font-bold text-white mb-6">🎯 Latest Tips from YouTube</h3>
|
| 423 |
+
<p class="text-white text-opacity-90 mb-6">Powered by <a href="https://www.youtube.com/@shirtlessdigital" class="text-white font-semibold hover:text-opacity-80">@ShirtLessDigital</a>, we bring you top tricks on how to <strong>maximize Microsoft Rewards, qualify more surveys</strong>, and <strong>stay updated on VPN workarounds</strong> to boost your digital earnings.</p>
|
| 424 |
+
|
| 425 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
| 426 |
+
<div class="bg-white bg-opacity-5 rounded-xl p-6">
|
| 427 |
+
<h4 class="text-xl font-bold text-white mb-4">🎥 Trick To Qualify Most Surveys</h4>
|
| 428 |
+
<ul class="space-y-2 text-white text-opacity-90">
|
| 429 |
+
<li>• Update your profile regularly</li>
|
| 430 |
+
<li>• Use desktop mode for better matching</li>
|
| 431 |
+
<li>• Enable all categories for more availability</li>
|
| 432 |
+
</ul>
|
| 433 |
+
<p class="text-white text-opacity-70 mt-4 italic">Quick win: Try these today and watch your earnings grow.</p>
|
| 434 |
+
</div>
|
| 435 |
+
<div class="bg-white bg-opacity-5 rounded-xl p-6">
|
| 436 |
+
<h4 class="text-xl font-bold text-white mb-4">🎥 Microsoft Rewards VPN Update</h4>
|
| 437 |
+
<ul class="space-y-2 text-white text-opacity-90">
|
| 438 |
+
<li>• New rules affecting point tracking</li>
|
| 439 |
+
<li>• Best VPN setup guide (country/server)</li>
|
| 440 |
+
<li>• How to avoid flagging your account</li>
|
| 441 |
+
</ul>
|
| 442 |
+
<p class="text-white text-opacity-70 mt-4 italic">Stay ahead of Microsoft's latest policy tweaks.</p>
|
| 443 |
+
</div>
|
| 444 |
+
</div>
|
| 445 |
+
</div>
|
| 446 |
+
|
| 447 |
+
<!-- How It Works Section -->
|
| 448 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-8 mb-12">
|
| 449 |
+
<h3 class="text-3xl font-bold text-white mb-8">⚙️ How It Works</h3>
|
| 450 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
| 451 |
+
<div class="text-center feature-card p-6 rounded-xl">
|
| 452 |
+
<div class="w-20 h-20 bg-white bg-opacity-10 rounded-full flex items-center justify-center mx-auto mb-4 glow">
|
| 453 |
+
<span class="text-3xl">1</span>
|
| 454 |
+
</div>
|
| 455 |
+
<h4 class="text-2xl font-bold text-white mb-3">Submit Gift Card Details</h4>
|
| 456 |
+
<p class="text-white text-opacity-90 text-lg">Choose your card type and value, upload proof video</p>
|
| 457 |
+
</div>
|
| 458 |
+
<div class="text-center feature-card p-6 rounded-xl">
|
| 459 |
+
<div class="w-20 h-20 bg-white bg-opacity-10 rounded-full flex items-center justify-center mx-auto mb-4 glow">
|
| 460 |
+
<span class="text-3xl">2</span>
|
| 461 |
+
</div>
|
| 462 |
+
<h4 class="text-2xl font-bold text-white mb-3">Verification</h4>
|
| 463 |
+
<p class="text-white text-opacity-90 text-lg">AI Powered system checks and validates your card</p>
|
| 464 |
+
</div>
|
| 465 |
+
<div class="text-center feature-card p-6 rounded-xl">
|
| 466 |
+
<div class="w-20 h-20 bg-white bg-opacity-10 rounded-full flex items-center justify-center mx-auto mb-4 glow">
|
| 467 |
+
<span class="text-3xl">3</span>
|
| 468 |
+
</div>
|
| 469 |
+
<h4 class="text-2xl font-bold text-white mb-3">Get Paid</h4>
|
| 470 |
+
<p class="text-white text-opacity-90 text-lg">Choose from UPI, Paytm, or crypto transfer</p>
|
| 471 |
+
</div>
|
| 472 |
+
</div>
|
| 473 |
+
</div>
|
| 474 |
+
|
| 475 |
+
<!-- Trusted By Section -->
|
| 476 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-8 mb-12 feature-card">
|
| 477 |
+
<h3 class="text-3xl font-bold text-white mb-6">📲 Trusted By 100+ Users</h3>
|
| 478 |
+
<div class="bg-white bg-opacity-5 rounded-xl p-8">
|
| 479 |
+
<p class="text-white text-opacity-90 italic text-lg">"SLD GC Portal helped me not only cash out my card but also taught me how to earn more with daily reward hacks. 10/10!"</p>
|
| 480 |
+
<p class="text-white font-semibold mt-4 text-lg">– Ravi, Lucknow</p>
|
| 481 |
+
</div>
|
| 482 |
+
</div>
|
| 483 |
+
|
| 484 |
+
<!-- FAQ Section -->
|
| 485 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-8 feature-card">
|
| 486 |
+
<h3 class="text-3xl font-bold text-white mb-8">🧾 Frequently Asked Questions</h3>
|
| 487 |
+
<div class="space-y-8">
|
| 488 |
+
<div class="bg-white bg-opacity-5 p-6 rounded-xl">
|
| 489 |
+
<h4 class="text-2xl font-bold text-white mb-3">Which gift cards do you support?</h4>
|
| 490 |
+
<p class="text-white text-opacity-90 text-lg">Amazon, Overwatch, and Roblox.</p>
|
| 491 |
+
</div>
|
| 492 |
+
<div class="bg-white bg-opacity-5 p-6 rounded-xl">
|
| 493 |
+
<h4 class="text-2xl font-bold text-white mb-3">How do I prove my card is real?</h4>
|
| 494 |
+
<p class="text-white text-opacity-90 text-lg">Record a short video showing the card redemption, and upload it during the submission process.</p>
|
| 495 |
+
</div>
|
| 496 |
+
<div class="bg-white bg-opacity-5 p-6 rounded-xl">
|
| 497 |
+
<h4 class="text-2xl font-bold text-white mb-3">Is this legit?</h4>
|
| 498 |
+
<p class="text-white text-opacity-90 text-lg">100%. We verify every transaction and offer real-time support.</p>
|
| 499 |
+
</div>
|
| 500 |
+
</div>
|
| 501 |
+
</div>
|
| 502 |
+
|
| 503 |
+
<!-- Footer -->
|
| 504 |
+
<div class="text-center text-white text-opacity-70 mt-12 pb-8">
|
| 505 |
+
<p>© 2025 GCX (Gift Card Exchange). All rights reserved.</p>
|
| 506 |
+
<div class="mt-4 space-x-4">
|
| 507 |
+
<a href="https://www.youtube.com/@shirtlessdigital" class="hover:text-opacity-100">YouTube</a>
|
| 508 |
+
<a href="mailto:contact@shirtlessdigital.com" class="hover:text-opacity-100">Email</a>
|
| 509 |
+
</div>
|
| 510 |
+
</div>
|
| 511 |
+
</div>
|
| 512 |
+
</div>
|
| 513 |
+
</div>
|
| 514 |
+
|
| 515 |
+
<!-- Gift Card Form Section -->
|
| 516 |
+
<div id="giftCardSection" class="w-full animate-fade-in hidden">
|
| 517 |
+
<div class="glass-effect min-h-screen">
|
| 518 |
+
<!-- Header -->
|
| 519 |
+
<div class="flex justify-between items-center p-6 border-b border-white border-opacity-10">
|
| 520 |
+
<div>
|
| 521 |
+
<h2 class="text-2xl font-bold text-white">Submit Gift Card</h2>
|
| 522 |
+
<p class="text-white text-opacity-70 mt-1">Fill in the details below to submit your gift card</p>
|
| 523 |
+
</div>
|
| 524 |
+
<button id="logoutButton"
|
| 525 |
+
class="btn-danger text-white px-4 py-2 rounded-lg font-medium flex items-center space-x-2">
|
| 526 |
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 527 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path>
|
| 528 |
+
</svg>
|
| 529 |
+
<span>Logout</span>
|
| 530 |
+
</button>
|
| 531 |
+
</div>
|
| 532 |
+
|
| 533 |
+
<div class="max-w-4xl mx-auto px-6 py-8">
|
| 534 |
+
<!-- Status Message -->
|
| 535 |
+
<div id="uploadStatus" class="hidden status-message"></div>
|
| 536 |
+
|
| 537 |
+
<form id="giftCardForm" class="space-y-8">
|
| 538 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 539 |
+
<div class="space-y-2">
|
| 540 |
+
<label for="ticket_user_name" class="block text-sm font-medium text-white text-opacity-90">Ticket User Name</label>
|
| 541 |
+
<input type="text" id="ticket_user_name" name="ticket_user_name" required
|
| 542 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 543 |
+
</div>
|
| 544 |
+
<div class="space-y-2">
|
| 545 |
+
<label for="ticket_number" class="block text-sm font-medium text-white text-opacity-90">Ticket Number</label>
|
| 546 |
+
<input type="text" id="ticket_number" name="ticket_number" required
|
| 547 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 548 |
+
</div>
|
| 549 |
+
<div class="space-y-2">
|
| 550 |
+
<label for="gc_code" class="block text-sm font-medium text-white text-opacity-90">Gift Card Code</label>
|
| 551 |
+
<input type="text" id="gc_code" name="gc_code" required
|
| 552 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 553 |
+
</div>
|
| 554 |
+
<div class="space-y-2">
|
| 555 |
+
<label for="card_name" class="block text-sm font-medium text-white text-opacity-90">Card Name</label>
|
| 556 |
+
<select id="card_name" name="card_name" required
|
| 557 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 558 |
+
<option value="">Select Card</option>
|
| 559 |
+
<option value="roblox">Roblox</option>
|
| 560 |
+
<option value="overwatch">Overwatch</option>
|
| 561 |
+
<option value="amazon">Amazon</option>
|
| 562 |
+
</select>
|
| 563 |
+
</div>
|
| 564 |
+
<div class="space-y-2">
|
| 565 |
+
<label for="gc_phone" class="block text-sm font-medium text-white text-opacity-90">Gift Card Phone</label>
|
| 566 |
+
<input type="text" id="gc_phone" name="gc_phone" required
|
| 567 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 568 |
+
</div>
|
| 569 |
+
<div class="space-y-2">
|
| 570 |
+
<label for="upi_id" class="block text-sm font-medium text-white text-opacity-90">UPI ID</label>
|
| 571 |
+
<input type="text" id="upi_id" name="upi_id" required
|
| 572 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent"
|
| 573 |
+
placeholder="example@upi">
|
| 574 |
+
</div>
|
| 575 |
+
<div class="space-y-2">
|
| 576 |
+
<label for="amount" class="block text-sm font-medium text-white text-opacity-90">Amount</label>
|
| 577 |
+
<select id="amount" name="amount" required
|
| 578 |
+
class="form-input w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white placeholder-white placeholder-opacity-50 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30 focus:border-transparent">
|
| 579 |
+
<option value="">Select Amount</option>
|
| 580 |
+
</select>
|
| 581 |
+
</div>
|
| 582 |
+
</div>
|
| 583 |
+
|
| 584 |
+
<div class="space-y-2">
|
| 585 |
+
<label for="proof_video" class="block text-sm font-medium text-white text-opacity-90">Proof Video</label>
|
| 586 |
+
<div class="relative">
|
| 587 |
+
<input type="file" id="proof_video" name="proof_video" accept="video/*" required
|
| 588 |
+
class="w-full px-4 py-3 bg-white bg-opacity-10 border border-white border-opacity-20 rounded-xl text-white file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-white file:bg-opacity-20 file:text-white hover:file:bg-opacity-30 focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-30">
|
| 589 |
+
</div>
|
| 590 |
+
<p class="text-white text-opacity-50 text-sm">Maximum file size: 100MB. Supported formats: MP4, AVI, MOV</p>
|
| 591 |
+
</div>
|
| 592 |
+
|
| 593 |
+
<button type="submit" id="submitButton"
|
| 594 |
+
class="w-full btn-primary text-white py-4 px-8 rounded-xl font-semibold text-lg flex items-center justify-center space-x-3 disabled:opacity-50">
|
| 595 |
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 596 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"></path>
|
| 597 |
+
</svg>
|
| 598 |
+
<span>Submit Gift Card</span>
|
| 599 |
+
</button>
|
| 600 |
+
</form>
|
| 601 |
+
</div>
|
| 602 |
+
</div>
|
| 603 |
+
</div>
|
| 604 |
+
|
| 605 |
+
<!-- Dashboard -->
|
| 606 |
+
<div id="dashboard" class="w-full animate-fade-in hidden">
|
| 607 |
+
<div class="glass-effect min-h-screen">
|
| 608 |
+
<!-- Header -->
|
| 609 |
+
<div class="flex justify-between items-center p-6 border-b border-white border-opacity-10">
|
| 610 |
+
<div>
|
| 611 |
+
<h1 class="text-3xl font-bold text-white">Dashboard</h1>
|
| 612 |
+
<p class="text-white text-opacity-70 mt-1">Welcome back, <span id="userName" class="font-semibold">User</span></p>
|
| 613 |
+
<p class="text-white text-opacity-50 text-sm" id="userEmail"></p>
|
| 614 |
+
</div>
|
| 615 |
+
<button onclick="logout()" class="btn-danger text-white px-6 py-3 rounded-xl font-semibold flex items-center space-x-2">
|
| 616 |
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 617 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path>
|
| 618 |
+
</svg>
|
| 619 |
+
<span>Logout</span>
|
| 620 |
+
</button>
|
| 621 |
+
</div>
|
| 622 |
+
|
| 623 |
+
<div class="max-w-7xl mx-auto px-6 py-8">
|
| 624 |
+
<!-- Submissions List -->
|
| 625 |
+
<div id="submissionsList" class="space-y-4">
|
| 626 |
+
<div class="text-center text-white text-opacity-70 py-12">
|
| 627 |
+
<svg class="w-16 h-16 mx-auto mb-4 text-white text-opacity-30" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 628 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
| 629 |
+
</svg>
|
| 630 |
+
<p class="text-lg">PLEASE LOGOUT AND LOGIN AGAIN</p>
|
| 631 |
+
<p class="text-sm">YOU CANNOT SUBMIT GIFT CARDS WITHOUT LOGIN</p>
|
| 632 |
+
</div>
|
| 633 |
+
</div>
|
| 634 |
+
</div>
|
| 635 |
+
</div>
|
| 636 |
+
</div>
|
| 637 |
+
</div>
|
| 638 |
+
|
| 639 |
+
<script>
|
| 640 |
+
// Clear any existing session data on page load
|
| 641 |
+
localStorage.clear();
|
| 642 |
+
sessionStorage.clear();
|
| 643 |
+
|
| 644 |
+
// DOM Elements
|
| 645 |
+
const authSection = document.getElementById('authSection');
|
| 646 |
+
const otpSection = document.getElementById('otpSection');
|
| 647 |
+
const homeSection = document.getElementById('homeSection');
|
| 648 |
+
const giftCardSection = document.getElementById('giftCardSection');
|
| 649 |
+
const loginForm = document.getElementById('loginForm');
|
| 650 |
+
const registerForm = document.getElementById('registerForm');
|
| 651 |
+
const otpForm = document.getElementById('otpForm');
|
| 652 |
+
const giftCardForm = document.getElementById('giftCardForm');
|
| 653 |
+
const submitGiftCardBtn = document.getElementById('submitGiftCardBtn');
|
| 654 |
+
const homeLogoutButton = document.getElementById('homeLogoutButton');
|
| 655 |
+
|
| 656 |
+
// Show loading state
|
| 657 |
+
function setLoading(buttonId, isLoading) {
|
| 658 |
+
const button = document.getElementById(buttonId);
|
| 659 |
+
if (isLoading) {
|
| 660 |
+
button.disabled = true;
|
| 661 |
+
button.innerHTML = `
|
| 662 |
+
<div class="loading-spinner"></div>
|
| 663 |
+
<span>Processing...</span>
|
| 664 |
+
`;
|
| 665 |
+
} else {
|
| 666 |
+
button.disabled = false;
|
| 667 |
+
button.innerHTML = button.getAttribute('data-original-text') || 'Submit';
|
| 668 |
+
}
|
| 669 |
+
}
|
| 670 |
+
|
| 671 |
+
// Show error message
|
| 672 |
+
function showError(message) {
|
| 673 |
+
const statusDiv = document.getElementById('uploadStatus');
|
| 674 |
+
statusDiv.className = 'status-message bg-red-500 bg-opacity-20 text-white p-4 rounded-xl';
|
| 675 |
+
statusDiv.textContent = message;
|
| 676 |
+
statusDiv.classList.remove('hidden');
|
| 677 |
+
setTimeout(() => {
|
| 678 |
+
statusDiv.classList.add('hidden');
|
| 679 |
+
}, 5000);
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
// Show success message
|
| 683 |
+
function showSuccess(message) {
|
| 684 |
+
const statusDiv = document.getElementById('uploadStatus');
|
| 685 |
+
statusDiv.className = 'status-message bg-green-500 bg-opacity-20 text-white p-4 rounded-xl';
|
| 686 |
+
statusDiv.textContent = message;
|
| 687 |
+
statusDiv.classList.remove('hidden');
|
| 688 |
+
setTimeout(() => {
|
| 689 |
+
statusDiv.classList.add('hidden');
|
| 690 |
+
}, 5000);
|
| 691 |
+
}
|
| 692 |
+
|
| 693 |
+
// Handle login form submission
|
| 694 |
+
loginForm.addEventListener('submit', async function(event) {
|
| 695 |
+
event.preventDefault();
|
| 696 |
+
setLoading('loginButton', true);
|
| 697 |
+
|
| 698 |
+
try {
|
| 699 |
+
const email = document.getElementById('loginEmail').value;
|
| 700 |
+
const password = document.getElementById('loginPassword').value;
|
| 701 |
+
|
| 702 |
+
const response = await fetch('/api/login', {
|
| 703 |
+
method: 'POST',
|
| 704 |
+
headers: {
|
| 705 |
+
'Content-Type': 'application/json'
|
| 706 |
+
},
|
| 707 |
+
body: JSON.stringify({ email, password })
|
| 708 |
+
});
|
| 709 |
+
|
| 710 |
+
const result = await response.json();
|
| 711 |
+
if (result.success) {
|
| 712 |
+
// Store user data from response
|
| 713 |
+
sessionStorage.setItem('userId', result.user.id);
|
| 714 |
+
sessionStorage.setItem('userEmail', result.user.email);
|
| 715 |
+
sessionStorage.setItem('userName', result.user.name);
|
| 716 |
+
|
| 717 |
+
// Send OTP
|
| 718 |
+
const otpResponse = await fetch('/api/send-otp', {
|
| 719 |
+
method: 'POST',
|
| 720 |
+
headers: {
|
| 721 |
+
'Content-Type': 'application/json'
|
| 722 |
+
},
|
| 723 |
+
body: JSON.stringify({ email, type: 'user' })
|
| 724 |
+
});
|
| 725 |
+
|
| 726 |
+
const otpResult = await otpResponse.json();
|
| 727 |
+
if (otpResult.success) {
|
| 728 |
+
showSuccess('OTP sent to your email!');
|
| 729 |
+
authSection.classList.add('hidden');
|
| 730 |
+
otpSection.classList.remove('hidden');
|
| 731 |
+
} else {
|
| 732 |
+
showError(otpResult.error || 'Failed to send OTP');
|
| 733 |
+
}
|
| 734 |
+
} else {
|
| 735 |
+
showError(result.error || 'Login failed');
|
| 736 |
+
}
|
| 737 |
+
} catch (error) {
|
| 738 |
+
showError('Login failed: ' + error.message);
|
| 739 |
+
} finally {
|
| 740 |
+
setLoading('loginButton', false);
|
| 741 |
+
}
|
| 742 |
+
});
|
| 743 |
+
|
| 744 |
+
// Handle register form submission
|
| 745 |
+
registerForm.addEventListener('submit', async function(event) {
|
| 746 |
+
event.preventDefault();
|
| 747 |
+
setLoading('registerButton', true);
|
| 748 |
+
|
| 749 |
+
const name = document.getElementById('registerName').value.trim();
|
| 750 |
+
const email = document.getElementById('registerEmail').value.trim();
|
| 751 |
+
const password = document.getElementById('registerPassword').value;
|
| 752 |
+
const confirmPassword = document.getElementById('confirmPassword').value;
|
| 753 |
+
|
| 754 |
+
if (!name || !email || !password || !confirmPassword) {
|
| 755 |
+
showError('Please fill in all fields');
|
| 756 |
+
setLoading('registerButton', false);
|
| 757 |
+
return;
|
| 758 |
+
}
|
| 759 |
+
|
| 760 |
+
if (password !== confirmPassword) {
|
| 761 |
+
showError('Passwords do not match');
|
| 762 |
+
setLoading('registerButton', false);
|
| 763 |
+
return;
|
| 764 |
+
}
|
| 765 |
+
|
| 766 |
+
try {
|
| 767 |
+
const response = await fetch('/api/register', {
|
| 768 |
+
method: 'POST',
|
| 769 |
+
headers: {
|
| 770 |
+
'Content-Type': 'application/json'
|
| 771 |
+
},
|
| 772 |
+
body: JSON.stringify({ name, email, password })
|
| 773 |
+
});
|
| 774 |
+
|
| 775 |
+
const result = await response.json();
|
| 776 |
+
if (result.success) {
|
| 777 |
+
showSuccess('Account created successfully! Please login.');
|
| 778 |
+
// Switch back to login form
|
| 779 |
+
document.getElementById('registerSection').classList.add('hidden');
|
| 780 |
+
document.getElementById('loginSection').classList.remove('hidden');
|
| 781 |
+
// Clear register form
|
| 782 |
+
document.getElementById('registerForm').reset();
|
| 783 |
+
} else {
|
| 784 |
+
showError(result.error || 'Registration failed');
|
| 785 |
+
}
|
| 786 |
+
} catch (error) {
|
| 787 |
+
showError('Registration failed: ' + error.message);
|
| 788 |
+
} finally {
|
| 789 |
+
setLoading('registerButton', false);
|
| 790 |
+
}
|
| 791 |
+
});
|
| 792 |
+
|
| 793 |
+
// Handle OTP form submission
|
| 794 |
+
otpForm.addEventListener('submit', async function(event) {
|
| 795 |
+
event.preventDefault();
|
| 796 |
+
setLoading('verifyOtpButton', true);
|
| 797 |
+
|
| 798 |
+
try {
|
| 799 |
+
const otp = document.getElementById('otp').value;
|
| 800 |
+
const email = sessionStorage.getItem('userEmail');
|
| 801 |
+
|
| 802 |
+
const response = await fetch('/api/verify-otp', {
|
| 803 |
+
method: 'POST',
|
| 804 |
+
headers: {
|
| 805 |
+
'Content-Type': 'application/json'
|
| 806 |
+
},
|
| 807 |
+
body: JSON.stringify({ email, otp, type: 'user' })
|
| 808 |
+
});
|
| 809 |
+
|
| 810 |
+
const result = await response.json();
|
| 811 |
+
if (result.success) {
|
| 812 |
+
// Store OTP token for future requests
|
| 813 |
+
sessionStorage.setItem('otpToken', otp);
|
| 814 |
+
showSuccess('OTP verified successfully!');
|
| 815 |
+
otpSection.classList.add('hidden');
|
| 816 |
+
homeSection.classList.remove('hidden');
|
| 817 |
+
} else {
|
| 818 |
+
showError(result.error || 'Invalid OTP');
|
| 819 |
+
}
|
| 820 |
+
} catch (error) {
|
| 821 |
+
showError('Failed to verify OTP: ' + error.message);
|
| 822 |
+
} finally {
|
| 823 |
+
setLoading('verifyOtpButton', false);
|
| 824 |
+
}
|
| 825 |
+
});
|
| 826 |
+
|
| 827 |
+
// Handle resend OTP
|
| 828 |
+
document.getElementById('resendOtpButton').addEventListener('click', async function() {
|
| 829 |
+
setLoading('resendOtpButton', true);
|
| 830 |
+
const email = sessionStorage.getItem('userEmail');
|
| 831 |
+
|
| 832 |
+
try {
|
| 833 |
+
const response = await fetch('/api/send-otp', {
|
| 834 |
+
method: 'POST',
|
| 835 |
+
headers: {
|
| 836 |
+
'Content-Type': 'application/json'
|
| 837 |
+
},
|
| 838 |
+
body: JSON.stringify({ email, type: 'user' })
|
| 839 |
+
});
|
| 840 |
+
|
| 841 |
+
const result = await response.json();
|
| 842 |
+
if (result.success) {
|
| 843 |
+
showSuccess('OTP resent successfully!');
|
| 844 |
+
} else {
|
| 845 |
+
showError(result.error || 'Failed to resend OTP');
|
| 846 |
+
}
|
| 847 |
+
} catch (error) {
|
| 848 |
+
showError('Failed to resend OTP: ' + error.message);
|
| 849 |
+
} finally {
|
| 850 |
+
setLoading('resendOtpButton', false);
|
| 851 |
+
}
|
| 852 |
+
});
|
| 853 |
+
|
| 854 |
+
// Handle gift card form submission
|
| 855 |
+
giftCardForm.addEventListener('submit', async function(event) {
|
| 856 |
+
event.preventDefault();
|
| 857 |
+
setLoading('submitButton', true);
|
| 858 |
+
|
| 859 |
+
try {
|
| 860 |
+
// First upload the video to file2link
|
| 861 |
+
const videoFile = document.getElementById('proof_video').files[0];
|
| 862 |
+
if (!videoFile) {
|
| 863 |
+
showError('Please select a video file');
|
| 864 |
+
setLoading('submitButton', false);
|
| 865 |
+
return;
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
// Create form data for video upload
|
| 869 |
+
const videoFormData = new FormData();
|
| 870 |
+
videoFormData.append('file', videoFile);
|
| 871 |
+
|
| 872 |
+
// Upload video to file2link
|
| 873 |
+
const uploadResponse = await fetch('https://shashwatidrnpo-inv.hf.space/upload', {
|
| 874 |
+
method: 'POST',
|
| 875 |
+
body: videoFormData
|
| 876 |
+
});
|
| 877 |
+
|
| 878 |
+
const uploadResult = await uploadResponse.json();
|
| 879 |
+
if (!uploadResult.success) {
|
| 880 |
+
showError('Failed to upload video: ' + uploadResult.error);
|
| 881 |
+
setLoading('submitButton', false);
|
| 882 |
+
return;
|
| 883 |
+
}
|
| 884 |
+
|
| 885 |
+
// Get user data from session storage
|
| 886 |
+
const userId = sessionStorage.getItem('userId');
|
| 887 |
+
const userEmail = sessionStorage.getItem('userEmail');
|
| 888 |
+
const otpToken = sessionStorage.getItem('otpToken');
|
| 889 |
+
|
| 890 |
+
if (!userId || !userEmail || !otpToken) {
|
| 891 |
+
showError('Please login again to submit gift card');
|
| 892 |
+
setLoading('submitButton', false);
|
| 893 |
+
return;
|
| 894 |
+
}
|
| 895 |
+
|
| 896 |
+
// Create request body with all form fields
|
| 897 |
+
const requestBody = {
|
| 898 |
+
ticket_user_name: document.getElementById('ticket_user_name').value,
|
| 899 |
+
ticket_number: document.getElementById('ticket_number').value,
|
| 900 |
+
gc_code: document.getElementById('gc_code').value,
|
| 901 |
+
gc_phone: document.getElementById('gc_phone').value,
|
| 902 |
+
upi_id: document.getElementById('upi_id').value,
|
| 903 |
+
amount: document.getElementById('amount').value,
|
| 904 |
+
proof_video_url: uploadResult.access_url
|
| 905 |
+
};
|
| 906 |
+
|
| 907 |
+
console.log('Submitting gift card with data:', requestBody); // Debug log
|
| 908 |
+
|
| 909 |
+
const response = await fetch('/api/gift-cards', {
|
| 910 |
+
method: 'POST',
|
| 911 |
+
headers: {
|
| 912 |
+
'Content-Type': 'application/json',
|
| 913 |
+
'x-otp-token': otpToken,
|
| 914 |
+
'x-user-email': userEmail,
|
| 915 |
+
'x-user-id': userId
|
| 916 |
+
},
|
| 917 |
+
body: JSON.stringify(requestBody)
|
| 918 |
+
});
|
| 919 |
+
|
| 920 |
+
const result = await response.json();
|
| 921 |
+
if (result.success) {
|
| 922 |
+
showSuccess('Gift card submitted successfully!');
|
| 923 |
+
giftCardForm.reset();
|
| 924 |
+
// Switch back to home page
|
| 925 |
+
giftCardSection.classList.add('hidden');
|
| 926 |
+
homeSection.classList.remove('hidden');
|
| 927 |
+
} else {
|
| 928 |
+
showError(result.error || 'Failed to submit gift card');
|
| 929 |
+
}
|
| 930 |
+
} catch (error) {
|
| 931 |
+
showError('Failed to submit gift card: ' + error.message);
|
| 932 |
+
} finally {
|
| 933 |
+
setLoading('submitButton', false);
|
| 934 |
+
}
|
| 935 |
+
});
|
| 936 |
+
|
| 937 |
+
// Handle submit gift card button click
|
| 938 |
+
submitGiftCardBtn.addEventListener('click', function() {
|
| 939 |
+
homeSection.classList.add('hidden');
|
| 940 |
+
giftCardSection.classList.remove('hidden');
|
| 941 |
+
});
|
| 942 |
+
|
| 943 |
+
// Handle logout
|
| 944 |
+
function logout() {
|
| 945 |
+
// Clear session data
|
| 946 |
+
sessionStorage.clear();
|
| 947 |
+
// Show auth section
|
| 948 |
+
homeSection.classList.add('hidden');
|
| 949 |
+
giftCardSection.classList.add('hidden');
|
| 950 |
+
authSection.classList.remove('hidden');
|
| 951 |
+
// Reset forms
|
| 952 |
+
loginForm.reset();
|
| 953 |
+
registerForm.reset();
|
| 954 |
+
otpForm.reset();
|
| 955 |
+
giftCardForm.reset();
|
| 956 |
+
}
|
| 957 |
+
|
| 958 |
+
// Add logout handlers
|
| 959 |
+
homeLogoutButton.addEventListener('click', logout);
|
| 960 |
+
document.getElementById('logoutButton').addEventListener('click', logout);
|
| 961 |
+
|
| 962 |
+
// Toggle between login and register forms
|
| 963 |
+
document.getElementById('showRegisterBtn').addEventListener('click', function() {
|
| 964 |
+
document.getElementById('loginSection').classList.add('hidden');
|
| 965 |
+
document.getElementById('registerSection').classList.remove('hidden');
|
| 966 |
+
});
|
| 967 |
+
|
| 968 |
+
document.getElementById('showLoginBtn').addEventListener('click', function() {
|
| 969 |
+
document.getElementById('registerSection').classList.add('hidden');
|
| 970 |
+
document.getElementById('loginSection').classList.remove('hidden');
|
| 971 |
+
});
|
| 972 |
+
|
| 973 |
+
// Check if already logged in on page load
|
| 974 |
+
window.onload = function() {
|
| 975 |
+
const storedUser = localStorage.getItem('user');
|
| 976 |
+
if (storedUser) {
|
| 977 |
+
const user = JSON.parse(storedUser);
|
| 978 |
+
window.currentUser = user; // Set window.currentUser if you use it
|
| 979 |
+
sessionStorage.setItem('userId', user.id);
|
| 980 |
+
sessionStorage.setItem('userEmail', user.email);
|
| 981 |
+
showDashboard();
|
| 982 |
+
}
|
| 983 |
+
}
|
| 984 |
+
|
| 985 |
+
// Add smooth transitions and animations
|
| 986 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 987 |
+
// Add fade-in animation to main container
|
| 988 |
+
const container = document.querySelector('.container');
|
| 989 |
+
if (container) {
|
| 990 |
+
container.classList.add('animate-fade-in');
|
| 991 |
+
}
|
| 992 |
+
|
| 993 |
+
// Add focus effects to inputs
|
| 994 |
+
const inputs = document.querySelectorAll('input');
|
| 995 |
+
inputs.forEach(input => {
|
| 996 |
+
input.addEventListener('focus', function() {
|
| 997 |
+
this.parentElement.classList.add('transform', 'scale-105');
|
| 998 |
+
});
|
| 999 |
+
|
| 1000 |
+
input.addEventListener('blur', function() {
|
| 1001 |
+
this.parentElement.classList.remove('transform', 'scale-105');
|
| 1002 |
+
});
|
| 1003 |
+
});
|
| 1004 |
+
});
|
| 1005 |
+
|
| 1006 |
+
// Add card amount options based on selection
|
| 1007 |
+
document.getElementById('card_name').addEventListener('change', function(e) {
|
| 1008 |
+
const amountSelect = document.getElementById('amount');
|
| 1009 |
+
amountSelect.innerHTML = '<option value="">Select Amount</option>';
|
| 1010 |
+
|
| 1011 |
+
const amounts = {
|
| 1012 |
+
'roblox': ['100', '400', '1000'],
|
| 1013 |
+
'overwatch': ['200', '500', '1000'],
|
| 1014 |
+
'amazon': ['50', '100', '500']
|
| 1015 |
+
};
|
| 1016 |
+
|
| 1017 |
+
const selectedCard = e.target.value;
|
| 1018 |
+
if (selectedCard && amounts[selectedCard]) {
|
| 1019 |
+
amounts[selectedCard].forEach(amount => {
|
| 1020 |
+
const option = document.createElement('option');
|
| 1021 |
+
option.value = amount;
|
| 1022 |
+
option.textContent = amount;
|
| 1023 |
+
amountSelect.appendChild(option);
|
| 1024 |
+
});
|
| 1025 |
+
}
|
| 1026 |
+
});
|
| 1027 |
+
|
| 1028 |
+
// Add real-time validation for UPI ID
|
| 1029 |
+
document.getElementById('upi_id').addEventListener('input', function(e) {
|
| 1030 |
+
const value = e.target.value;
|
| 1031 |
+
const upiRegex = /^[a-zA-Z0-9.\-_]+@[a-zA-Z0-9.\-_]+$/;
|
| 1032 |
+
|
| 1033 |
+
if (value && !upiRegex.test(value)) {
|
| 1034 |
+
e.target.style.borderColor = 'rgba(239, 68, 68, 0.5)';
|
| 1035 |
+
} else {
|
| 1036 |
+
e.target.style.borderColor = 'rgba(255, 255, 255, 0.2)';
|
| 1037 |
+
}
|
| 1038 |
+
});
|
| 1039 |
+
|
| 1040 |
+
// Add OTP input formatting
|
| 1041 |
+
document.getElementById('otp').addEventListener('input', function(e) {
|
| 1042 |
+
// Only allow numbers
|
| 1043 |
+
e.target.value = e.target.value.replace(/[^0-9]/g, '');
|
| 1044 |
+
|
| 1045 |
+
// Limit to 6 digits
|
| 1046 |
+
if (e.target.value.length > 6) {
|
| 1047 |
+
e.target.value = e.target.value.slice(0, 6);
|
| 1048 |
+
}
|
| 1049 |
+
});
|
| 1050 |
+
|
| 1051 |
+
// Splash screen logic
|
| 1052 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 1053 |
+
const splash = document.getElementById('splashScreen');
|
| 1054 |
+
const logo = document.getElementById('splashLogo');
|
| 1055 |
+
const mainContent = document.querySelectorAll('.main-content');
|
| 1056 |
+
// Hide scroll while splash is visible
|
| 1057 |
+
document.body.style.overflow = 'hidden';
|
| 1058 |
+
logo.addEventListener('click', function() {
|
| 1059 |
+
splash.classList.add('fade-out');
|
| 1060 |
+
setTimeout(() => {
|
| 1061 |
+
splash.style.display = 'none';
|
| 1062 |
+
mainContent.forEach(el => {
|
| 1063 |
+
el.classList.remove('hidden');
|
| 1064 |
+
el.classList.add('fade-in');
|
| 1065 |
+
});
|
| 1066 |
+
document.body.style.overflow = '';
|
| 1067 |
+
}, 700);
|
| 1068 |
+
});
|
| 1069 |
+
});
|
| 1070 |
+
</script>
|
| 1071 |
+
</body>
|
| 1072 |
+
</html>
|
public/logo.png
ADDED
|
Git LFS Details
|
public/server-logs.html
ADDED
|
@@ -0,0 +1,542 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Server Logs - SLD GC Portal</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| 9 |
+
<script src="https://cdn.socket.io/4.7.2/socket.io.min.js"></script>
|
| 10 |
+
<style>
|
| 11 |
+
body {
|
| 12 |
+
font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
| 13 |
+
background: #0a0a0a;
|
| 14 |
+
color: #00ff00;
|
| 15 |
+
margin: 0;
|
| 16 |
+
padding: 0;
|
| 17 |
+
overflow: hidden;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
.terminal {
|
| 21 |
+
background: #000000;
|
| 22 |
+
border: 1px solid #333;
|
| 23 |
+
border-radius: 8px;
|
| 24 |
+
box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.terminal-header {
|
| 28 |
+
background: #1a1a1a;
|
| 29 |
+
border-bottom: 1px solid #333;
|
| 30 |
+
padding: 8px 16px;
|
| 31 |
+
display: flex;
|
| 32 |
+
justify-content: space-between;
|
| 33 |
+
align-items: center;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.terminal-buttons {
|
| 37 |
+
display: flex;
|
| 38 |
+
gap: 8px;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.terminal-button {
|
| 42 |
+
width: 12px;
|
| 43 |
+
height: 12px;
|
| 44 |
+
border-radius: 50%;
|
| 45 |
+
border: none;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.terminal-button.close { background: #ff5f56; }
|
| 49 |
+
.terminal-button.minimize { background: #ffbd2e; }
|
| 50 |
+
.terminal-button.maximize { background: #27ca3f; }
|
| 51 |
+
|
| 52 |
+
.terminal-title {
|
| 53 |
+
color: #ccc;
|
| 54 |
+
font-size: 14px;
|
| 55 |
+
font-weight: 500;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.terminal-body {
|
| 59 |
+
padding: 16px;
|
| 60 |
+
height: calc(100vh - 120px);
|
| 61 |
+
overflow-y: auto;
|
| 62 |
+
background: #000000;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.log-line {
|
| 66 |
+
margin: 2px 0;
|
| 67 |
+
padding: 2px 0;
|
| 68 |
+
font-size: 13px;
|
| 69 |
+
line-height: 1.4;
|
| 70 |
+
word-wrap: break-word;
|
| 71 |
+
white-space: pre-wrap;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.log-timestamp {
|
| 75 |
+
color: #666;
|
| 76 |
+
margin-right: 8px;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.log-type {
|
| 80 |
+
display: inline-block;
|
| 81 |
+
padding: 1px 6px;
|
| 82 |
+
border-radius: 3px;
|
| 83 |
+
font-size: 11px;
|
| 84 |
+
font-weight: bold;
|
| 85 |
+
margin-right: 8px;
|
| 86 |
+
text-transform: uppercase;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.log-type.error { background: #ff0000; color: #000; }
|
| 90 |
+
.log-type.warning { background: #ffaa00; color: #000; }
|
| 91 |
+
.log-type.info { background: #0088ff; color: #fff; }
|
| 92 |
+
.log-type.success { background: #00ff00; color: #000; }
|
| 93 |
+
.log-type.request { background: #aa00ff; color: #fff; }
|
| 94 |
+
.log-type.response { background: #0088aa; color: #fff; }
|
| 95 |
+
|
| 96 |
+
.log-message {
|
| 97 |
+
color: #00ff00;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
.log-details {
|
| 101 |
+
color: #888;
|
| 102 |
+
margin-left: 20px;
|
| 103 |
+
font-size: 12px;
|
| 104 |
+
border-left: 2px solid #333;
|
| 105 |
+
padding-left: 8px;
|
| 106 |
+
margin-top: 4px;
|
| 107 |
+
margin-bottom: 8px;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.status-bar {
|
| 111 |
+
background: #1a1a1a;
|
| 112 |
+
border-top: 1px solid #333;
|
| 113 |
+
padding: 8px 16px;
|
| 114 |
+
display: flex;
|
| 115 |
+
justify-content: space-between;
|
| 116 |
+
align-items: center;
|
| 117 |
+
font-size: 12px;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.status-item {
|
| 121 |
+
display: flex;
|
| 122 |
+
align-items: center;
|
| 123 |
+
gap: 8px;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
.status-indicator {
|
| 127 |
+
width: 8px;
|
| 128 |
+
height: 8px;
|
| 129 |
+
border-radius: 50%;
|
| 130 |
+
animation: pulse 2s infinite;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.status-indicator.connected { background: #00ff00; }
|
| 134 |
+
.status-indicator.disconnected { background: #ff0000; }
|
| 135 |
+
.status-indicator.connecting { background: #ffaa00; }
|
| 136 |
+
|
| 137 |
+
@keyframes pulse {
|
| 138 |
+
0% { opacity: 1; }
|
| 139 |
+
50% { opacity: 0.5; }
|
| 140 |
+
100% { opacity: 1; }
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.command-input {
|
| 144 |
+
background: transparent;
|
| 145 |
+
border: none;
|
| 146 |
+
color: #00ff00;
|
| 147 |
+
font-family: inherit;
|
| 148 |
+
font-size: 13px;
|
| 149 |
+
outline: none;
|
| 150 |
+
width: 100%;
|
| 151 |
+
padding: 4px 0;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.command-prompt {
|
| 155 |
+
color: #00ff00;
|
| 156 |
+
margin-right: 8px;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.controls {
|
| 160 |
+
position: fixed;
|
| 161 |
+
top: 10px;
|
| 162 |
+
right: 10px;
|
| 163 |
+
display: flex;
|
| 164 |
+
gap: 8px;
|
| 165 |
+
z-index: 1000;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.control-btn {
|
| 169 |
+
background: #1a1a1a;
|
| 170 |
+
border: 1px solid #333;
|
| 171 |
+
color: #00ff00;
|
| 172 |
+
padding: 6px 12px;
|
| 173 |
+
border-radius: 4px;
|
| 174 |
+
font-size: 12px;
|
| 175 |
+
cursor: pointer;
|
| 176 |
+
transition: all 0.2s;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
.control-btn:hover {
|
| 180 |
+
background: #333;
|
| 181 |
+
border-color: #00ff00;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
.control-btn.active {
|
| 185 |
+
background: #00ff00;
|
| 186 |
+
color: #000;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.cursor {
|
| 190 |
+
display: inline-block;
|
| 191 |
+
width: 8px;
|
| 192 |
+
height: 16px;
|
| 193 |
+
background: #00ff00;
|
| 194 |
+
animation: blink 1s infinite;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
@keyframes blink {
|
| 198 |
+
0%, 50% { opacity: 1; }
|
| 199 |
+
51%, 100% { opacity: 0; }
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
.scrollbar {
|
| 203 |
+
scrollbar-width: thin;
|
| 204 |
+
scrollbar-color: #333 #000;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
.scrollbar::-webkit-scrollbar {
|
| 208 |
+
width: 8px;
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
.scrollbar::-webkit-scrollbar-track {
|
| 212 |
+
background: #000;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
.scrollbar::-webkit-scrollbar-thumb {
|
| 216 |
+
background: #333;
|
| 217 |
+
border-radius: 4px;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
.scrollbar::-webkit-scrollbar-thumb:hover {
|
| 221 |
+
background: #555;
|
| 222 |
+
}
|
| 223 |
+
</style>
|
| 224 |
+
</head>
|
| 225 |
+
<body>
|
| 226 |
+
<!-- Controls -->
|
| 227 |
+
<div class="controls">
|
| 228 |
+
<button class="control-btn" onclick="clearLogs()" title="Clear logs">
|
| 229 |
+
<i class="fas fa-trash"></i> Clear
|
| 230 |
+
</button>
|
| 231 |
+
<button class="control-btn" onclick="exportLogs()" title="Export logs">
|
| 232 |
+
<i class="fas fa-download"></i> Export
|
| 233 |
+
</button>
|
| 234 |
+
<button class="control-btn" id="autoScrollBtn" onclick="toggleAutoScroll()" title="Auto-scroll">
|
| 235 |
+
<i class="fas fa-arrow-down"></i> Auto
|
| 236 |
+
</button>
|
| 237 |
+
<button class="control-btn" onclick="toggleFilters()" title="Toggle filters">
|
| 238 |
+
<i class="fas fa-filter"></i> Filters
|
| 239 |
+
</button>
|
| 240 |
+
</div>
|
| 241 |
+
|
| 242 |
+
<!-- Terminal -->
|
| 243 |
+
<div class="terminal" style="height: 100vh;">
|
| 244 |
+
<!-- Terminal Header -->
|
| 245 |
+
<div class="terminal-header">
|
| 246 |
+
<div class="terminal-buttons">
|
| 247 |
+
<button class="terminal-button close"></button>
|
| 248 |
+
<button class="terminal-button minimize"></button>
|
| 249 |
+
<button class="terminal-button maximize"></button>
|
| 250 |
+
</div>
|
| 251 |
+
<div class="terminal-title">SLD GC Portal - Server Logs</div>
|
| 252 |
+
<div class="status-item">
|
| 253 |
+
<div class="status-indicator connecting" id="connectionIndicator"></div>
|
| 254 |
+
<span id="connectionStatus">Connecting...</span>
|
| 255 |
+
</div>
|
| 256 |
+
</div>
|
| 257 |
+
|
| 258 |
+
<!-- Terminal Body -->
|
| 259 |
+
<div class="terminal-body scrollbar" id="terminalBody">
|
| 260 |
+
<div class="log-line">
|
| 261 |
+
<span class="log-timestamp">[<span id="currentTime"></span>]</span>
|
| 262 |
+
<span class="log-message">Initializing server logs terminal...</span>
|
| 263 |
+
</div>
|
| 264 |
+
<div class="log-line">
|
| 265 |
+
<span class="log-timestamp">[<span id="currentTime2"></span>]</span>
|
| 266 |
+
<span class="log-message">Waiting for server connection...</span>
|
| 267 |
+
</div>
|
| 268 |
+
</div>
|
| 269 |
+
|
| 270 |
+
<!-- Status Bar -->
|
| 271 |
+
<div class="status-bar">
|
| 272 |
+
<div class="status-item">
|
| 273 |
+
<span>Total: <span id="totalLogs" class="text-blue-400">0</span></span>
|
| 274 |
+
<span>Errors: <span id="errorLogs" class="text-red-400">0</span></span>
|
| 275 |
+
<span>Requests: <span id="requestLogs" class="text-purple-400">0</span></span>
|
| 276 |
+
<span>Responses: <span id="responseLogs" class="text-cyan-400">0</span></span>
|
| 277 |
+
</div>
|
| 278 |
+
<div class="status-item">
|
| 279 |
+
<span>Auto-scroll: <span id="autoScrollStatus" class="text-green-400">ON</span></span>
|
| 280 |
+
<span>Filters: <span id="filterStatus" class="text-yellow-400">ALL</span></span>
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<script>
|
| 286 |
+
let socket;
|
| 287 |
+
let logs = [];
|
| 288 |
+
let autoScroll = true;
|
| 289 |
+
let filters = {
|
| 290 |
+
error: true,
|
| 291 |
+
warning: true,
|
| 292 |
+
info: true,
|
| 293 |
+
success: true,
|
| 294 |
+
request: true,
|
| 295 |
+
response: true
|
| 296 |
+
};
|
| 297 |
+
|
| 298 |
+
// Update current time
|
| 299 |
+
function updateTime() {
|
| 300 |
+
const now = new Date();
|
| 301 |
+
const timeString = now.toLocaleTimeString();
|
| 302 |
+
document.getElementById('currentTime').textContent = timeString;
|
| 303 |
+
document.getElementById('currentTime2').textContent = timeString;
|
| 304 |
+
}
|
| 305 |
+
setInterval(updateTime, 1000);
|
| 306 |
+
updateTime();
|
| 307 |
+
|
| 308 |
+
// Initialize Socket.IO connection
|
| 309 |
+
function initializeSocket() {
|
| 310 |
+
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
| 311 |
+
const host = window.location.host;
|
| 312 |
+
|
| 313 |
+
socket = io(`${protocol}//${host}`, {
|
| 314 |
+
transports: ['websocket', 'polling']
|
| 315 |
+
});
|
| 316 |
+
|
| 317 |
+
socket.on('connect', () => {
|
| 318 |
+
updateConnectionStatus('Connected', 'connected');
|
| 319 |
+
addLog('info', 'Connected to server logs', { socketId: socket.id });
|
| 320 |
+
});
|
| 321 |
+
|
| 322 |
+
socket.on('disconnect', () => {
|
| 323 |
+
updateConnectionStatus('Disconnected', 'disconnected');
|
| 324 |
+
addLog('warning', 'Disconnected from server logs');
|
| 325 |
+
});
|
| 326 |
+
|
| 327 |
+
socket.on('server-log', (logData) => {
|
| 328 |
+
addLog(logData.type, logData.message, logData.details);
|
| 329 |
+
});
|
| 330 |
+
|
| 331 |
+
socket.on('error', (error) => {
|
| 332 |
+
updateConnectionStatus('Error', 'disconnected');
|
| 333 |
+
addLog('error', 'Socket connection error', { error: error.message });
|
| 334 |
+
});
|
| 335 |
+
|
| 336 |
+
setTimeout(() => {
|
| 337 |
+
if (!socket.connected) {
|
| 338 |
+
updateConnectionStatus('Connection Failed', 'disconnected');
|
| 339 |
+
addLog('error', 'Failed to connect to server logs');
|
| 340 |
+
}
|
| 341 |
+
}, 5000);
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
function updateConnectionStatus(status, indicatorClass) {
|
| 345 |
+
const statusElement = document.getElementById('connectionStatus');
|
| 346 |
+
const indicator = document.getElementById('connectionIndicator');
|
| 347 |
+
|
| 348 |
+
if (statusElement) statusElement.textContent = status;
|
| 349 |
+
if (indicator) {
|
| 350 |
+
indicator.className = `status-indicator ${indicatorClass}`;
|
| 351 |
+
}
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
function addLog(type, message, details = {}) {
|
| 355 |
+
const timestamp = new Date().toLocaleTimeString();
|
| 356 |
+
const log = {
|
| 357 |
+
id: Date.now() + Math.random(),
|
| 358 |
+
timestamp: timestamp,
|
| 359 |
+
type: type,
|
| 360 |
+
message: message,
|
| 361 |
+
details: details
|
| 362 |
+
};
|
| 363 |
+
|
| 364 |
+
logs.unshift(log);
|
| 365 |
+
updateStats();
|
| 366 |
+
|
| 367 |
+
if (shouldShowLog(log)) {
|
| 368 |
+
displayLog(log);
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
if (logs.length > 1000) {
|
| 372 |
+
logs = logs.slice(0, 1000);
|
| 373 |
+
}
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
function shouldShowLog(log) {
|
| 377 |
+
return filters[log.type] || false;
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
function displayLog(log) {
|
| 381 |
+
const terminalBody = document.getElementById('terminalBody');
|
| 382 |
+
if (!terminalBody) return;
|
| 383 |
+
|
| 384 |
+
const logElement = document.createElement('div');
|
| 385 |
+
logElement.className = 'log-line';
|
| 386 |
+
|
| 387 |
+
let logHtml = `<span class="log-timestamp">[${log.timestamp}]</span>`;
|
| 388 |
+
logHtml += `<span class="log-type ${log.type}">${log.type}</span>`;
|
| 389 |
+
logHtml += `<span class="log-message">${log.message}</span>`;
|
| 390 |
+
|
| 391 |
+
if (log.details && Object.keys(log.details).length > 0) {
|
| 392 |
+
logHtml += `<div class="log-details">${JSON.stringify(log.details, null, 2)}</div>`;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
logElement.innerHTML = logHtml;
|
| 396 |
+
terminalBody.appendChild(logElement);
|
| 397 |
+
|
| 398 |
+
if (autoScroll) {
|
| 399 |
+
terminalBody.scrollTop = terminalBody.scrollHeight;
|
| 400 |
+
}
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
function updateStats() {
|
| 404 |
+
const stats = {
|
| 405 |
+
total: logs.length,
|
| 406 |
+
error: logs.filter(log => log.type === 'error').length,
|
| 407 |
+
warning: logs.filter(log => log.type === 'warning').length,
|
| 408 |
+
info: logs.filter(log => log.type === 'info').length,
|
| 409 |
+
success: logs.filter(log => log.type === 'success').length,
|
| 410 |
+
request: logs.filter(log => log.type === 'request').length,
|
| 411 |
+
response: logs.filter(log => log.type === 'response').length
|
| 412 |
+
};
|
| 413 |
+
|
| 414 |
+
const elements = {
|
| 415 |
+
totalLogs: document.getElementById('totalLogs'),
|
| 416 |
+
errorLogs: document.getElementById('errorLogs'),
|
| 417 |
+
requestLogs: document.getElementById('requestLogs'),
|
| 418 |
+
responseLogs: document.getElementById('responseLogs')
|
| 419 |
+
};
|
| 420 |
+
|
| 421 |
+
if (elements.totalLogs) elements.totalLogs.textContent = stats.total;
|
| 422 |
+
if (elements.errorLogs) elements.errorLogs.textContent = stats.error;
|
| 423 |
+
if (elements.requestLogs) elements.requestLogs.textContent = stats.request;
|
| 424 |
+
if (elements.responseLogs) elements.responseLogs.textContent = stats.response;
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
function clearLogs() {
|
| 428 |
+
if (confirm('Clear all logs?')) {
|
| 429 |
+
logs = [];
|
| 430 |
+
const terminalBody = document.getElementById('terminalBody');
|
| 431 |
+
if (terminalBody) {
|
| 432 |
+
terminalBody.innerHTML = `
|
| 433 |
+
<div class="log-line">
|
| 434 |
+
<span class="log-timestamp">[${new Date().toLocaleTimeString()}]</span>
|
| 435 |
+
<span class="log-message">Logs cleared</span>
|
| 436 |
+
</div>
|
| 437 |
+
`;
|
| 438 |
+
}
|
| 439 |
+
updateStats();
|
| 440 |
+
}
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
function exportLogs() {
|
| 444 |
+
const logData = logs.map(log => ({
|
| 445 |
+
timestamp: log.timestamp,
|
| 446 |
+
type: log.type,
|
| 447 |
+
message: log.message,
|
| 448 |
+
details: log.details
|
| 449 |
+
}));
|
| 450 |
+
|
| 451 |
+
const blob = new Blob([JSON.stringify(logData, null, 2)], { type: 'application/json' });
|
| 452 |
+
const url = URL.createObjectURL(blob);
|
| 453 |
+
const a = document.createElement('a');
|
| 454 |
+
a.href = url;
|
| 455 |
+
a.download = `server-logs-${new Date().toISOString().split('T')[0]}.json`;
|
| 456 |
+
document.body.appendChild(a);
|
| 457 |
+
a.click();
|
| 458 |
+
document.body.removeChild(a);
|
| 459 |
+
URL.revokeObjectURL(url);
|
| 460 |
+
}
|
| 461 |
+
|
| 462 |
+
function toggleAutoScroll() {
|
| 463 |
+
autoScroll = !autoScroll;
|
| 464 |
+
const btn = document.getElementById('autoScrollBtn');
|
| 465 |
+
const status = document.getElementById('autoScrollStatus');
|
| 466 |
+
|
| 467 |
+
if (btn && status) {
|
| 468 |
+
if (autoScroll) {
|
| 469 |
+
btn.classList.add('active');
|
| 470 |
+
status.textContent = 'ON';
|
| 471 |
+
status.className = 'text-green-400';
|
| 472 |
+
} else {
|
| 473 |
+
btn.classList.remove('active');
|
| 474 |
+
status.textContent = 'OFF';
|
| 475 |
+
status.className = 'text-red-400';
|
| 476 |
+
}
|
| 477 |
+
}
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
function toggleFilters() {
|
| 481 |
+
const filterStatus = document.getElementById('filterStatus');
|
| 482 |
+
const activeFilters = Object.values(filters).filter(Boolean).length;
|
| 483 |
+
|
| 484 |
+
if (filterStatus) {
|
| 485 |
+
if (activeFilters === 6) {
|
| 486 |
+
filterStatus.textContent = 'ERRORS';
|
| 487 |
+
filterStatus.className = 'text-red-400';
|
| 488 |
+
filters = { error: true, warning: false, info: false, success: false, request: false, response: false };
|
| 489 |
+
} else if (activeFilters === 1 && filters.error) {
|
| 490 |
+
filterStatus.textContent = 'REQUESTS';
|
| 491 |
+
filterStatus.className = 'text-purple-400';
|
| 492 |
+
filters = { error: false, warning: false, info: false, success: false, request: true, response: false };
|
| 493 |
+
} else if (activeFilters === 1 && filters.request) {
|
| 494 |
+
filterStatus.textContent = 'ALL';
|
| 495 |
+
filterStatus.className = 'text-yellow-400';
|
| 496 |
+
filters = { error: true, warning: true, info: true, success: true, request: true, response: true };
|
| 497 |
+
}
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
// Refresh display
|
| 501 |
+
const terminalBody = document.getElementById('terminalBody');
|
| 502 |
+
if (terminalBody) {
|
| 503 |
+
terminalBody.innerHTML = '';
|
| 504 |
+
logs.filter(shouldShowLog).forEach(log => displayLog(log));
|
| 505 |
+
}
|
| 506 |
+
}
|
| 507 |
+
|
| 508 |
+
// Initialize
|
| 509 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 510 |
+
initializeSocket();
|
| 511 |
+
|
| 512 |
+
setTimeout(() => {
|
| 513 |
+
addLog('info', 'Terminal ready - monitoring server activity');
|
| 514 |
+
}, 1000);
|
| 515 |
+
});
|
| 516 |
+
|
| 517 |
+
// Keyboard shortcuts
|
| 518 |
+
document.addEventListener('keydown', function(e) {
|
| 519 |
+
if (e.ctrlKey || e.metaKey) {
|
| 520 |
+
switch(e.key) {
|
| 521 |
+
case 'l':
|
| 522 |
+
e.preventDefault();
|
| 523 |
+
clearLogs();
|
| 524 |
+
break;
|
| 525 |
+
case 'e':
|
| 526 |
+
e.preventDefault();
|
| 527 |
+
exportLogs();
|
| 528 |
+
break;
|
| 529 |
+
case 'a':
|
| 530 |
+
e.preventDefault();
|
| 531 |
+
toggleAutoScroll();
|
| 532 |
+
break;
|
| 533 |
+
case 'f':
|
| 534 |
+
e.preventDefault();
|
| 535 |
+
toggleFilters();
|
| 536 |
+
break;
|
| 537 |
+
}
|
| 538 |
+
}
|
| 539 |
+
});
|
| 540 |
+
</script>
|
| 541 |
+
</body>
|
| 542 |
+
</html>
|
public/status.html
ADDED
|
@@ -0,0 +1,637 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GCX (Gift Card Exchange) - Track Status</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
| 9 |
+
<style>
|
| 10 |
+
:root { --apple-blue: #0071e3; --apple-gray: #1d1d1f; }
|
| 11 |
+
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
|
| 12 |
+
.gradient-bg { background: linear-gradient(135deg, #000000 0%, #1d1d1f 100%); }
|
| 13 |
+
.glass-effect { background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37); }
|
| 14 |
+
.apple-button { background: var(--apple-blue); border-radius: 980px; font-weight: 500; transition: all 0.3s ease; }
|
| 15 |
+
.apple-button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3); }
|
| 16 |
+
.apple-input { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; transition: all 0.3s ease; }
|
| 17 |
+
.apple-input:focus { border-color: var(--apple-blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1); }
|
| 18 |
+
.apple-card { background: rgba(255, 255, 255, 0.05); border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.3s ease; }
|
| 19 |
+
.apple-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); }
|
| 20 |
+
.status-approved { background: #34d399; } .status-rejected { background: #f87171; } .status-pending { background: #fbbf24; }
|
| 21 |
+
.modal-backdrop { backdrop-filter: blur(10px); }
|
| 22 |
+
@keyframes spin { to { transform: rotate(360deg); } }
|
| 23 |
+
.loading { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top: 2px solid white; border-radius: 50%; animation: spin 1s linear infinite; }
|
| 24 |
+
@media (max-width: 768px) { .chat-container { width: 100vw; height: 100vh; bottom: 0; right: 0; border-radius: 0; } }
|
| 25 |
+
</style>
|
| 26 |
+
</head>
|
| 27 |
+
<body class="min-h-screen gradient-bg text-white">
|
| 28 |
+
<!-- Header -->
|
| 29 |
+
<header class="w-full glass-effect card-shadow p-6 flex flex-col sm:flex-row items-center justify-between mb-8">
|
| 30 |
+
<div class="flex items-center space-x-4">
|
| 31 |
+
<img src="logo.png" alt="GCX Logo" class="w-14 h-14 rounded-full bg-white bg-opacity-10 p-2">
|
| 32 |
+
<div>
|
| 33 |
+
<h1 class="text-3xl font-bold text-white">GCX (Gift Card Exchange)</h1>
|
| 34 |
+
<p class="text-white text-opacity-70 text-lg">Track your gift card status</p>
|
| 35 |
+
</div>
|
| 36 |
+
</div>
|
| 37 |
+
<a href="/" class="apple-button text-white px-6 py-3 mt-4 sm:mt-0 font-semibold flex items-center space-x-2">
|
| 38 |
+
<i class="fas fa-arrow-left"></i>
|
| 39 |
+
<span>Back to Home</span>
|
| 40 |
+
</a>
|
| 41 |
+
</header>
|
| 42 |
+
|
| 43 |
+
<!-- Loading Modal -->
|
| 44 |
+
<div id="loadingModal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden">
|
| 45 |
+
<div class="glass-effect rounded-3xl p-8 text-center">
|
| 46 |
+
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-white mx-auto mb-4"></div>
|
| 47 |
+
<p id="loadingMessage" class="text-white text-lg">Processing...</p>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<!-- Main Menu Content -->
|
| 52 |
+
<div id="mainMenuContent" class="min-h-screen flex items-center justify-center p-4">
|
| 53 |
+
<div class="w-full max-w-4xl">
|
| 54 |
+
<!-- Header -->
|
| 55 |
+
<div class="text-center mb-12">
|
| 56 |
+
<div class="w-24 h-24 mx-auto mb-6 bg-white bg-opacity-10 rounded-3xl flex items-center justify-center">
|
| 57 |
+
<i class="fas fa-gift text-4xl text-white"></i>
|
| 58 |
+
</div>
|
| 59 |
+
<h1 class="text-5xl font-bold mb-4">GCX</h1>
|
| 60 |
+
<p class="text-2xl text-white text-opacity-80 mb-2">Gift Card Exchange</p>
|
| 61 |
+
<p class="text-white text-opacity-60">Track your gift card status</p>
|
| 62 |
+
</div>
|
| 63 |
+
|
| 64 |
+
<!-- Track Status Button -->
|
| 65 |
+
<div class="text-center mb-12">
|
| 66 |
+
<button id="trackStatusBtn" class="apple-button text-white py-4 px-8 text-xl font-semibold focus:outline-none">
|
| 67 |
+
<i class="fas fa-search mr-3"></i>
|
| 68 |
+
Track Status
|
| 69 |
+
</button>
|
| 70 |
+
</div>
|
| 71 |
+
|
| 72 |
+
<!-- Features Section -->
|
| 73 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-12">
|
| 74 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-6 feature-card">
|
| 75 |
+
<div class="w-16 h-16 bg-white bg-opacity-20 rounded-2xl flex items-center justify-center mb-4">
|
| 76 |
+
<i class="fas fa-shield-alt text-2xl text-white"></i>
|
| 77 |
+
</div>
|
| 78 |
+
<h3 class="text-xl font-bold text-white mb-3">Secure Tracking</h3>
|
| 79 |
+
<p class="text-white text-opacity-80">Real-time status updates with secure authentication</p>
|
| 80 |
+
</div>
|
| 81 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-6 feature-card">
|
| 82 |
+
<div class="w-16 h-16 bg-white bg-opacity-20 rounded-2xl flex items-center justify-center mb-4">
|
| 83 |
+
<i class="fas fa-comments text-2xl text-white"></i>
|
| 84 |
+
</div>
|
| 85 |
+
<h3 class="text-xl font-bold text-white mb-3">Live Support</h3>
|
| 86 |
+
<p class="text-white text-opacity-80">Chat directly with our support team</p>
|
| 87 |
+
</div>
|
| 88 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-6 feature-card">
|
| 89 |
+
<div class="w-16 h-16 bg-white bg-opacity-20 rounded-2xl flex items-center justify-center mb-4">
|
| 90 |
+
<i class="fas fa-history text-2xl text-white"></i>
|
| 91 |
+
</div>
|
| 92 |
+
<h3 class="text-xl font-bold text-white mb-3">Transaction History</h3>
|
| 93 |
+
<p class="text-white text-opacity-80">Complete history of all your submissions</p>
|
| 94 |
+
</div>
|
| 95 |
+
</div>
|
| 96 |
+
|
| 97 |
+
<!-- FAQ Section -->
|
| 98 |
+
<div class="bg-white bg-opacity-10 rounded-xl p-8 feature-card">
|
| 99 |
+
<h3 class="text-3xl font-bold text-white mb-8">🧾 Frequently Asked Questions</h3>
|
| 100 |
+
<div class="space-y-8">
|
| 101 |
+
<div class="bg-white bg-opacity-5 p-6 rounded-xl">
|
| 102 |
+
<h4 class="text-2xl font-bold text-white mb-3">Which gift cards do you support?</h4>
|
| 103 |
+
<p class="text-white text-opacity-90 text-lg">Amazon, Overwatch, and Roblox.</p>
|
| 104 |
+
</div>
|
| 105 |
+
<div class="bg-white bg-opacity-5 p-6 rounded-xl">
|
| 106 |
+
<h4 class="text-2xl font-bold text-white mb-3">How do I prove my card is real?</h4>
|
| 107 |
+
<p class="text-white text-opacity-90 text-lg">Record a short video showing the card redemption, and upload it during the submission process.</p>
|
| 108 |
+
</div>
|
| 109 |
+
<div class="bg-white bg-opacity-5 p-6 rounded-xl">
|
| 110 |
+
<h4 class="text-2xl font-bold text-white mb-3">Is this legit?</h4>
|
| 111 |
+
<p class="text-white text-opacity-90 text-lg">100%. We verify every transaction and offer real-time support.</p>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
</div>
|
| 115 |
+
<!-- Footer -->
|
| 116 |
+
<div class="text-center text-white text-opacity-70 mt-12 pb-8">
|
| 117 |
+
<p>© 2025 GCX (Gift Card Exchange). All rights reserved.</p>
|
| 118 |
+
<div class="mt-4 space-x-4">
|
| 119 |
+
<a href="https://www.youtube.com/@shirtlessdigital" class="hover:text-opacity-100">YouTube</a>
|
| 120 |
+
<a href="mailto:contact@shirtlessdigital.com" class="hover:text-opacity-100">Email</a>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
</div>
|
| 125 |
+
|
| 126 |
+
<!-- Auth Section -->
|
| 127 |
+
<div id="authSection" class="min-h-screen flex items-center justify-center p-4 hidden">
|
| 128 |
+
<div class="w-full max-w-md">
|
| 129 |
+
<div class="text-center mb-8">
|
| 130 |
+
<div class="w-20 h-20 mx-auto mb-6 bg-white bg-opacity-10 rounded-3xl flex items-center justify-center">
|
| 131 |
+
<i class="fas fa-gift text-3xl text-white"></i>
|
| 132 |
+
</div>
|
| 133 |
+
<h1 class="text-4xl font-bold mb-2">GCX Portal</h1>
|
| 134 |
+
<p class="text-white text-opacity-70">Track your gift card status</p>
|
| 135 |
+
</div>
|
| 136 |
+
<div class="glass-effect rounded-3xl p-8">
|
| 137 |
+
<!-- Error Display Area -->
|
| 138 |
+
<div id="loginError" class="mb-6 p-4 bg-red-500 bg-opacity-20 border border-red-500 border-opacity-30 rounded-xl hidden">
|
| 139 |
+
<p id="loginErrorMessage" class="text-red-300 text-center"></p>
|
| 140 |
+
</div>
|
| 141 |
+
|
| 142 |
+
<div class="space-y-6">
|
| 143 |
+
<div>
|
| 144 |
+
<label class="block text-sm font-medium text-white text-opacity-90 mb-3">Email Address</label>
|
| 145 |
+
<input type="email" id="email" placeholder="Enter your email" class="apple-input w-full px-4 py-4 text-white placeholder-gray-400 focus:outline-none" onblur="validateEmail()">
|
| 146 |
+
<p id="emailError" class="text-red-400 text-sm mt-1 hidden">Please enter a valid email address</p>
|
| 147 |
+
</div>
|
| 148 |
+
<div>
|
| 149 |
+
<label class="block text-sm font-medium text-white text-opacity-90 mb-3">Password</label>
|
| 150 |
+
<input type="password" id="password" placeholder="Enter your password" class="apple-input w-full px-4 py-4 text-white placeholder-gray-400 focus:outline-none">
|
| 151 |
+
</div>
|
| 152 |
+
<button id="loginBtn" onclick="sendOtp()" class="apple-button w-full text-white py-4 px-6 font-semibold focus:outline-none">
|
| 153 |
+
<span class="button-text">Continue</span>
|
| 154 |
+
<span class="button-loading hidden">
|
| 155 |
+
<i class="fas fa-spinner fa-spin mr-2"></i>
|
| 156 |
+
Processing...
|
| 157 |
+
</span>
|
| 158 |
+
</button>
|
| 159 |
+
</div>
|
| 160 |
+
</div>
|
| 161 |
+
</div>
|
| 162 |
+
</div>
|
| 163 |
+
|
| 164 |
+
<!-- OTP Section -->
|
| 165 |
+
<div id="otpSection" class="min-h-screen flex items-center justify-center p-4 hidden">
|
| 166 |
+
<div class="w-full max-w-md">
|
| 167 |
+
<div class="text-center mb-8">
|
| 168 |
+
<div class="w-20 h-20 mx-auto mb-6 bg-white bg-opacity-10 rounded-3xl flex items-center justify-center">
|
| 169 |
+
<i class="fas fa-shield-alt text-3xl text-white"></i>
|
| 170 |
+
</div>
|
| 171 |
+
<h2 class="text-3xl font-bold mb-2">Verify Your Email</h2>
|
| 172 |
+
<p class="text-white text-opacity-70">Enter the verification code sent to your email</p>
|
| 173 |
+
</div>
|
| 174 |
+
<div class="glass-effect rounded-3xl p-8">
|
| 175 |
+
<div class="space-y-6">
|
| 176 |
+
<div>
|
| 177 |
+
<label class="block text-sm font-medium text-white text-opacity-90 mb-3">Verification Code</label>
|
| 178 |
+
<input type="text" id="otp" maxlength="6" placeholder="Enter 6-digit code" class="apple-input w-full px-4 py-4 text-white text-center text-2xl tracking-widest focus:outline-none">
|
| 179 |
+
</div>
|
| 180 |
+
<button id="verifyBtn" onclick="verifyOtp()" class="apple-button w-full text-white py-4 px-6 font-semibold focus:outline-none">
|
| 181 |
+
<span class="button-text">Verify & Continue</span>
|
| 182 |
+
<span class="button-loading hidden">
|
| 183 |
+
<i class="fas fa-spinner fa-spin mr-2"></i>
|
| 184 |
+
Processing...
|
| 185 |
+
</span>
|
| 186 |
+
</button>
|
| 187 |
+
</div>
|
| 188 |
+
</div>
|
| 189 |
+
</div>
|
| 190 |
+
</div>
|
| 191 |
+
|
| 192 |
+
<!-- Status Section -->
|
| 193 |
+
<div id="statusSection" class="min-h-screen p-4 hidden">
|
| 194 |
+
<div class="max-w-6xl mx-auto">
|
| 195 |
+
<!-- Header -->
|
| 196 |
+
<div class="glass-effect rounded-3xl p-6 mb-6">
|
| 197 |
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
| 198 |
+
<div>
|
| 199 |
+
<h1 class="text-2xl sm:text-3xl font-bold" id="welcomeText">Welcome back!</h1>
|
| 200 |
+
<p class="text-white text-opacity-70">Track your gift card submissions</p>
|
| 201 |
+
</div>
|
| 202 |
+
<div class="flex flex-col sm:flex-row gap-3 w-full sm:w-auto">
|
| 203 |
+
<button onclick="toggleChat()" class="apple-button text-white px-6 py-3 flex items-center justify-center space-x-2">
|
| 204 |
+
<i class="fas fa-comments"></i>
|
| 205 |
+
<span>Chat</span>
|
| 206 |
+
</button>
|
| 207 |
+
<button onclick="logout()" class="bg-red-500 hover:bg-red-600 text-white px-6 py-3 rounded-full transition-all flex items-center justify-center space-x-2">
|
| 208 |
+
<i class="fas fa-sign-out-alt"></i>
|
| 209 |
+
<span>Logout</span>
|
| 210 |
+
</button>
|
| 211 |
+
</div>
|
| 212 |
+
</div>
|
| 213 |
+
</div>
|
| 214 |
+
<!-- Submissions List -->
|
| 215 |
+
<div id="submissionsList" class="space-y-4"></div>
|
| 216 |
+
</div>
|
| 217 |
+
</div>
|
| 218 |
+
|
| 219 |
+
<!-- Chat Section -->
|
| 220 |
+
<div id="chatSection" class="fixed bottom-4 right-4 w-96 max-w-full glass-effect rounded-3xl hidden chat-container">
|
| 221 |
+
<div class="flex justify-between items-center p-6 border-b border-white border-opacity-20">
|
| 222 |
+
<h3 class="font-semibold text-lg">Admin Support</h3>
|
| 223 |
+
<button onclick="toggleChat()" class="text-white hover:text-opacity-70 w-8 h-8 flex items-center justify-center">
|
| 224 |
+
<i class="fas fa-times"></i>
|
| 225 |
+
</button>
|
| 226 |
+
</div>
|
| 227 |
+
<div id="chatMessages" class="h-80 overflow-y-auto p-4 space-y-4"></div>
|
| 228 |
+
<div class="p-4 border-t border-white border-opacity-20">
|
| 229 |
+
<div class="flex gap-3">
|
| 230 |
+
<input type="text" id="messageInput" placeholder="Type message..." class="apple-input flex-1 px-4 py-3 text-white placeholder-gray-400 text-sm focus:outline-none">
|
| 231 |
+
<button onclick="sendMessage()" class="apple-button text-white px-4 py-3">
|
| 232 |
+
<i class="fas fa-paper-plane"></i>
|
| 233 |
+
</button>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
</div>
|
| 237 |
+
|
| 238 |
+
<!-- Video Modal -->
|
| 239 |
+
<div id="videoModal" class="fixed inset-0 bg-black bg-opacity-75 modal-backdrop hidden flex items-center justify-center z-50 p-4">
|
| 240 |
+
<div class="glass-effect rounded-3xl p-4 max-w-4xl w-full">
|
| 241 |
+
<div class="relative">
|
| 242 |
+
<button onclick="closeVideoModal()" class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full w-10 h-10 flex items-center justify-center hover:bg-red-600 transition-all">
|
| 243 |
+
<i class="fas fa-times"></i>
|
| 244 |
+
</button>
|
| 245 |
+
<video id="modalVideo" class="w-full rounded-2xl" controls></video>
|
| 246 |
+
</div>
|
| 247 |
+
</div>
|
| 248 |
+
</div>
|
| 249 |
+
|
| 250 |
+
<script>
|
| 251 |
+
let userId = null, userEmail = null, currentOtp = null, userName = null, chatInterval = null;
|
| 252 |
+
let socket = null;
|
| 253 |
+
|
| 254 |
+
window.onload = () => clearSession();
|
| 255 |
+
|
| 256 |
+
// Initialize Socket.IO connection
|
| 257 |
+
function initializeSocket() {
|
| 258 |
+
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
| 259 |
+
const host = window.location.host;
|
| 260 |
+
|
| 261 |
+
socket = io(`${protocol}//${host}`, {
|
| 262 |
+
transports: ['websocket', 'polling']
|
| 263 |
+
});
|
| 264 |
+
|
| 265 |
+
socket.on('connect', () => {
|
| 266 |
+
console.log('Connected to chat server');
|
| 267 |
+
});
|
| 268 |
+
|
| 269 |
+
socket.on('new-message', (data) => {
|
| 270 |
+
// Only add message if it's for current user
|
| 271 |
+
if (data.message.user_id === userId) {
|
| 272 |
+
addMessageToChat(data.message);
|
| 273 |
+
}
|
| 274 |
+
});
|
| 275 |
+
|
| 276 |
+
socket.on('disconnect', () => {
|
| 277 |
+
console.log('Disconnected from chat server');
|
| 278 |
+
});
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
// Add message to chat without reloading all messages
|
| 282 |
+
function addMessageToChat(message) {
|
| 283 |
+
const container = document.getElementById('chatMessages');
|
| 284 |
+
if (!container) return;
|
| 285 |
+
|
| 286 |
+
const div = document.createElement('div');
|
| 287 |
+
div.className = `flex ${message.sender === 'user' ? 'justify-end' : 'justify-start'}`;
|
| 288 |
+
div.innerHTML = `
|
| 289 |
+
<div class="max-w-[80%] ${message.sender === 'user' ? 'bg-blue-500' : 'bg-white bg-opacity-20'} rounded-2xl px-4 py-3">
|
| 290 |
+
<p class="text-white text-sm">${message.content}</p>
|
| 291 |
+
<p class="text-white text-opacity-60 text-xs mt-1">${new Date(message.created_at).toLocaleTimeString()}</p>
|
| 292 |
+
</div>
|
| 293 |
+
`;
|
| 294 |
+
container.appendChild(div);
|
| 295 |
+
container.scrollTop = container.scrollHeight;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
// Loading state management
|
| 299 |
+
function setLoading(buttonId, isLoading, message = 'Processing...') {
|
| 300 |
+
const button = document.getElementById(buttonId);
|
| 301 |
+
const buttonText = button.querySelector('.button-text');
|
| 302 |
+
const buttonLoading = button.querySelector('.button-loading');
|
| 303 |
+
|
| 304 |
+
if (isLoading) {
|
| 305 |
+
button.disabled = true;
|
| 306 |
+
buttonText.classList.add('hidden');
|
| 307 |
+
buttonLoading.classList.remove('hidden');
|
| 308 |
+
} else {
|
| 309 |
+
button.disabled = false;
|
| 310 |
+
buttonText.classList.remove('hidden');
|
| 311 |
+
buttonLoading.classList.add('hidden');
|
| 312 |
+
}
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
// Loading modal management
|
| 316 |
+
function showLoadingModal(message = 'Processing...') {
|
| 317 |
+
document.getElementById('loadingMessage').textContent = message;
|
| 318 |
+
document.getElementById('loadingModal').classList.remove('hidden');
|
| 319 |
+
console.log('Loading modal shown:', message);
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
function hideLoadingModal() {
|
| 323 |
+
document.getElementById('loadingModal').classList.add('hidden');
|
| 324 |
+
console.log('Loading modal hidden');
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
// Error display management
|
| 328 |
+
function showLoginError(message) {
|
| 329 |
+
const errorDiv = document.getElementById('loginError');
|
| 330 |
+
const errorMessage = document.getElementById('loginErrorMessage');
|
| 331 |
+
errorMessage.textContent = message;
|
| 332 |
+
errorDiv.classList.remove('hidden');
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
function hideLoginError() {
|
| 336 |
+
document.getElementById('loginError').classList.add('hidden');
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
// Email validation
|
| 340 |
+
function validateEmail() {
|
| 341 |
+
const email = document.getElementById('email').value;
|
| 342 |
+
const emailError = document.getElementById('emailError');
|
| 343 |
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
| 344 |
+
|
| 345 |
+
if (email && !emailRegex.test(email)) {
|
| 346 |
+
emailError.classList.remove('hidden');
|
| 347 |
+
return false;
|
| 348 |
+
} else {
|
| 349 |
+
emailError.classList.add('hidden');
|
| 350 |
+
return true;
|
| 351 |
+
}
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
function clearSession() {
|
| 355 |
+
userId = userEmail = currentOtp = userName = null;
|
| 356 |
+
document.getElementById('authSection').classList.add('hidden');
|
| 357 |
+
document.getElementById('statusSection').classList.add('hidden');
|
| 358 |
+
document.getElementById('otpSection').classList.add('hidden');
|
| 359 |
+
document.getElementById('submissionsList').innerHTML = '';
|
| 360 |
+
hideLoadingModal();
|
| 361 |
+
hideLoginError();
|
| 362 |
+
if (chatInterval) {
|
| 363 |
+
clearInterval(chatInterval);
|
| 364 |
+
chatInterval = null;
|
| 365 |
+
}
|
| 366 |
+
if (socket) {
|
| 367 |
+
socket.disconnect();
|
| 368 |
+
socket = null;
|
| 369 |
+
}
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
function logout() { clearSession(); }
|
| 373 |
+
|
| 374 |
+
async function sendOtp() {
|
| 375 |
+
const email = document.getElementById('email').value;
|
| 376 |
+
const password = document.getElementById('password').value;
|
| 377 |
+
|
| 378 |
+
// Validation
|
| 379 |
+
if (!email || !password) {
|
| 380 |
+
showLoginError('Please enter both email and password');
|
| 381 |
+
return;
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
if (!validateEmail()) {
|
| 385 |
+
showLoginError('Please enter a valid email address');
|
| 386 |
+
return;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
hideLoginError();
|
| 390 |
+
setLoading('loginBtn', true);
|
| 391 |
+
showLoadingModal('Sending verification code...');
|
| 392 |
+
|
| 393 |
+
try {
|
| 394 |
+
const loginResponse = await fetch('/api/login', {
|
| 395 |
+
method: 'POST',
|
| 396 |
+
headers: { 'Content-Type': 'application/json' },
|
| 397 |
+
body: JSON.stringify({ email, password })
|
| 398 |
+
});
|
| 399 |
+
const loginData = await loginResponse.json();
|
| 400 |
+
|
| 401 |
+
if (!loginData.success) {
|
| 402 |
+
hideLoadingModal();
|
| 403 |
+
setLoading('loginBtn', false);
|
| 404 |
+
showLoginError(loginData.error || 'Invalid email or password');
|
| 405 |
+
return;
|
| 406 |
+
}
|
| 407 |
+
|
| 408 |
+
userId = loginData.user.id;
|
| 409 |
+
userEmail = email;
|
| 410 |
+
userName = loginData.user.name;
|
| 411 |
+
|
| 412 |
+
const otpResponse = await fetch('/api/send-otp', {
|
| 413 |
+
method: 'POST',
|
| 414 |
+
headers: { 'Content-Type': 'application/json' },
|
| 415 |
+
body: JSON.stringify({ email, type: 'login' })
|
| 416 |
+
});
|
| 417 |
+
const otpData = await otpResponse.json();
|
| 418 |
+
|
| 419 |
+
hideLoadingModal();
|
| 420 |
+
setLoading('loginBtn', false);
|
| 421 |
+
|
| 422 |
+
if (otpData.success) {
|
| 423 |
+
document.getElementById('authSection').classList.add('hidden');
|
| 424 |
+
document.getElementById('otpSection').classList.remove('hidden');
|
| 425 |
+
document.getElementById('otp').focus();
|
| 426 |
+
initializeUserSession(loginData.user, otpData.otp);
|
| 427 |
+
} else {
|
| 428 |
+
showLoginError(otpData.error || 'Failed to send OTP');
|
| 429 |
+
}
|
| 430 |
+
} catch (error) {
|
| 431 |
+
console.error('Error:', error);
|
| 432 |
+
hideLoadingModal();
|
| 433 |
+
setLoading('loginBtn', false);
|
| 434 |
+
showLoginError('Failed to send OTP. Please try again.');
|
| 435 |
+
}
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
async function verifyOtp() {
|
| 439 |
+
const otp = document.getElementById('otp').value;
|
| 440 |
+
if (!otp) {
|
| 441 |
+
alert('Please enter the OTP');
|
| 442 |
+
return;
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
setLoading('verifyBtn', true);
|
| 446 |
+
showLoadingModal('Verifying code...');
|
| 447 |
+
|
| 448 |
+
try {
|
| 449 |
+
const response = await fetch('/api/verify-otp', {
|
| 450 |
+
method: 'POST',
|
| 451 |
+
headers: { 'Content-Type': 'application/json' },
|
| 452 |
+
body: JSON.stringify({ email: userEmail, otp, type: 'login' })
|
| 453 |
+
});
|
| 454 |
+
const data = await response.json();
|
| 455 |
+
|
| 456 |
+
hideLoadingModal();
|
| 457 |
+
setLoading('verifyBtn', false);
|
| 458 |
+
|
| 459 |
+
if (data.success) {
|
| 460 |
+
currentOtp = otp;
|
| 461 |
+
document.getElementById('otpSection').classList.add('hidden');
|
| 462 |
+
document.getElementById('statusSection').classList.remove('hidden');
|
| 463 |
+
document.getElementById('welcomeText').textContent = `Welcome back, ${userName}!`;
|
| 464 |
+
loadSubmissions();
|
| 465 |
+
} else {
|
| 466 |
+
alert(data.error || 'OTP verification failed');
|
| 467 |
+
}
|
| 468 |
+
} catch (error) {
|
| 469 |
+
console.error('Error:', error);
|
| 470 |
+
hideLoadingModal();
|
| 471 |
+
setLoading('verifyBtn', false);
|
| 472 |
+
alert('Failed to verify OTP. Please try again.');
|
| 473 |
+
}
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
async function loadSubmissions() {
|
| 477 |
+
if (!userId || !userEmail || !currentOtp) return clearSession();
|
| 478 |
+
|
| 479 |
+
try {
|
| 480 |
+
const response = await fetch(`/api/user-submissions/${userId}`, {
|
| 481 |
+
headers: { 'x-otp-token': currentOtp, 'x-user-email': userEmail }
|
| 482 |
+
});
|
| 483 |
+
const data = await response.json();
|
| 484 |
+
if (!data.success) throw new Error(data.error || 'Failed to load submissions');
|
| 485 |
+
|
| 486 |
+
const list = document.getElementById('submissionsList');
|
| 487 |
+
list.innerHTML = data.submissions.length === 0 ? `
|
| 488 |
+
<div class="text-center py-16 apple-card">
|
| 489 |
+
<i class="fas fa-inbox text-4xl text-white text-opacity-50 mb-4"></i>
|
| 490 |
+
<p class="text-white text-opacity-80 text-lg">No submissions found</p>
|
| 491 |
+
<p class="text-white text-opacity-60">Your gift cards will appear here</p>
|
| 492 |
+
</div>
|
| 493 |
+
` : '';
|
| 494 |
+
|
| 495 |
+
data.submissions.forEach(submission => {
|
| 496 |
+
const statusColors = { approved: 'status-approved', rejected: 'status-rejected', pending: 'status-pending' };
|
| 497 |
+
const card = document.createElement('div');
|
| 498 |
+
card.className = 'apple-card p-6';
|
| 499 |
+
card.innerHTML = `
|
| 500 |
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center mb-4 gap-2">
|
| 501 |
+
<span class="text-white text-opacity-70 text-sm">${new Date(submission.created_at).toLocaleDateString()}</span>
|
| 502 |
+
<span class="px-4 py-2 text-xs font-semibold rounded-full text-white ${statusColors[submission.status] || 'bg-gray-500'}">
|
| 503 |
+
${submission.status.toUpperCase()}
|
| 504 |
+
</span>
|
| 505 |
+
</div>
|
| 506 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 text-white">
|
| 507 |
+
<p><span class="text-opacity-70 text-white">UID:</span> ${submission.id}</p>
|
| 508 |
+
<p><span class="text-opacity-70 text-white">Card:</span> ${submission.ticket_user_name}</p>
|
| 509 |
+
<p><span class="text-opacity-70 text-white">Ticket:</span> ${submission.ticket_number}</p>
|
| 510 |
+
<p><span class="text-opacity-70 text-white">Amount:</span> ₹${submission.amount}</p>
|
| 511 |
+
</div>
|
| 512 |
+
${submission.proof_video_url ? `
|
| 513 |
+
<button onclick="showVideoModal('${submission.proof_video_url}')" class="mt-4 text-blue-400 hover:text-blue-300 text-sm font-medium transition-all">
|
| 514 |
+
<i class="fas fa-play-circle mr-2"></i>View Proof Video
|
| 515 |
+
</button>
|
| 516 |
+
` : ''}
|
| 517 |
+
`;
|
| 518 |
+
list.appendChild(card);
|
| 519 |
+
});
|
| 520 |
+
} catch (error) {
|
| 521 |
+
console.error('Error:', error);
|
| 522 |
+
alert('Failed to load submissions. Please try again.');
|
| 523 |
+
clearSession();
|
| 524 |
+
}
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
function showVideoModal(url) {
|
| 528 |
+
document.getElementById('modalVideo').src = url;
|
| 529 |
+
document.getElementById('videoModal').classList.remove('hidden');
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
function closeVideoModal() {
|
| 533 |
+
const video = document.getElementById('modalVideo');
|
| 534 |
+
video.pause();
|
| 535 |
+
video.src = '';
|
| 536 |
+
document.getElementById('videoModal').classList.add('hidden');
|
| 537 |
+
}
|
| 538 |
+
|
| 539 |
+
function toggleChat() {
|
| 540 |
+
const chat = document.getElementById('chatSection');
|
| 541 |
+
if (chat.classList.contains('hidden')) {
|
| 542 |
+
chat.classList.remove('hidden');
|
| 543 |
+
loadMessages();
|
| 544 |
+
// Join chat room for real-time updates
|
| 545 |
+
if (socket && userId && userEmail) {
|
| 546 |
+
socket.emit('join-chat', { userId, userEmail });
|
| 547 |
+
}
|
| 548 |
+
} else {
|
| 549 |
+
chat.classList.add('hidden');
|
| 550 |
+
// Leave chat room
|
| 551 |
+
if (socket && userId) {
|
| 552 |
+
socket.emit('leave-chat', { userId });
|
| 553 |
+
}
|
| 554 |
+
}
|
| 555 |
+
}
|
| 556 |
+
|
| 557 |
+
async function loadMessages() {
|
| 558 |
+
if (!userId || !userEmail || !currentOtp) return;
|
| 559 |
+
try {
|
| 560 |
+
const response = await fetch(`/api/messages/${userId}?limit=50`, {
|
| 561 |
+
headers: { 'x-otp-token': currentOtp, 'x-user-email': userEmail }
|
| 562 |
+
});
|
| 563 |
+
const data = await response.json();
|
| 564 |
+
if (!data.success) throw new Error(data.error);
|
| 565 |
+
|
| 566 |
+
const container = document.getElementById('chatMessages');
|
| 567 |
+
container.innerHTML = '';
|
| 568 |
+
data.messages.forEach(msg => {
|
| 569 |
+
const div = document.createElement('div');
|
| 570 |
+
div.className = `flex ${msg.sender === 'user' ? 'justify-end' : 'justify-start'}`;
|
| 571 |
+
div.innerHTML = `
|
| 572 |
+
<div class="max-w-[80%] ${msg.sender === 'user' ? 'bg-blue-500' : 'bg-white bg-opacity-20'} rounded-2xl px-4 py-3">
|
| 573 |
+
<p class="text-white text-sm">${msg.content}</p>
|
| 574 |
+
<p class="text-white text-opacity-60 text-xs mt-1">${new Date(msg.created_at).toLocaleTimeString()}</p>
|
| 575 |
+
</div>
|
| 576 |
+
`;
|
| 577 |
+
container.appendChild(div);
|
| 578 |
+
});
|
| 579 |
+
container.scrollTop = container.scrollHeight;
|
| 580 |
+
} catch (error) {
|
| 581 |
+
console.error('Error loading messages:', error);
|
| 582 |
+
}
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
async function sendMessage() {
|
| 586 |
+
const input = document.getElementById('messageInput');
|
| 587 |
+
const content = input.value.trim();
|
| 588 |
+
if (!content || !userId) return;
|
| 589 |
+
|
| 590 |
+
try {
|
| 591 |
+
const response = await fetch('/api/messages', {
|
| 592 |
+
method: 'POST',
|
| 593 |
+
headers: { 'Content-Type': 'application/json', 'x-otp-token': currentOtp, 'x-user-email': userEmail },
|
| 594 |
+
body: JSON.stringify({ userId, content, sender: 'user' })
|
| 595 |
+
});
|
| 596 |
+
const data = await response.json();
|
| 597 |
+
if (data.success) {
|
| 598 |
+
input.value = '';
|
| 599 |
+
// Message will be added via Socket.IO event
|
| 600 |
+
} else throw new Error(data.error);
|
| 601 |
+
} catch (error) {
|
| 602 |
+
console.error('Error:', error);
|
| 603 |
+
alert('Failed to send message');
|
| 604 |
+
}
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
// Event listeners
|
| 608 |
+
document.getElementById('messageInput')?.addEventListener('keypress', e => {
|
| 609 |
+
if (e.key === 'Enter') sendMessage();
|
| 610 |
+
});
|
| 611 |
+
|
| 612 |
+
document.getElementById('videoModal').addEventListener('click', e => {
|
| 613 |
+
if (e.target === document.getElementById('videoModal')) closeVideoModal();
|
| 614 |
+
});
|
| 615 |
+
|
| 616 |
+
// Ensure login menu is hidden by default
|
| 617 |
+
document.getElementById('authSection').classList.add('hidden');
|
| 618 |
+
// Bind the Track Status button to show login menu
|
| 619 |
+
document.getElementById('trackStatusBtn').addEventListener('click', function() {
|
| 620 |
+
document.getElementById('mainMenuContent').classList.add('hidden');
|
| 621 |
+
document.getElementById('authSection').classList.remove('hidden');
|
| 622 |
+
document.getElementById('email').focus();
|
| 623 |
+
});
|
| 624 |
+
|
| 625 |
+
// Initialize socket when user logs in
|
| 626 |
+
function initializeUserSession(userData, otp) {
|
| 627 |
+
userId = userData.id;
|
| 628 |
+
userEmail = userData.email;
|
| 629 |
+
userName = userData.name;
|
| 630 |
+
currentOtp = otp;
|
| 631 |
+
|
| 632 |
+
//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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Modern CSS Reset */
|
| 2 |
+
*, *::before, *::after {
|
| 3 |
+
box-sizing: border-box;
|
| 4 |
+
margin: 0;
|
| 5 |
+
padding: 0;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
:root {
|
| 9 |
+
--primary-color: #4F46E5;
|
| 10 |
+
--primary-hover: #4338CA;
|
| 11 |
+
--success-color: #10B981;
|
| 12 |
+
--danger-color: #EF4444;
|
| 13 |
+
--warning-color: #F59E0B;
|
| 14 |
+
--text-primary: #1F2937;
|
| 15 |
+
--text-secondary: #6B7280;
|
| 16 |
+
--bg-primary: #F9FAFB;
|
| 17 |
+
--bg-secondary: #FFFFFF;
|
| 18 |
+
--border-color: #E5E7EB;
|
| 19 |
+
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
| 20 |
+
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
|
| 21 |
+
--radius-sm: 0.375rem;
|
| 22 |
+
--radius-md: 0.5rem;
|
| 23 |
+
--radius-lg: 0.75rem;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
body {
|
| 27 |
+
font-family: 'Inter', sans-serif;
|
| 28 |
+
line-height: 1.5;
|
| 29 |
+
color: var(--text-primary);
|
| 30 |
+
background-color: var(--bg-primary);
|
| 31 |
+
min-height: 100vh;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.container {
|
| 35 |
+
max-width: 1200px;
|
| 36 |
+
margin: 0 auto;
|
| 37 |
+
padding: 2rem;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/* Auth Section */
|
| 41 |
+
.auth-section {
|
| 42 |
+
max-width: 400px;
|
| 43 |
+
margin: 2rem auto;
|
| 44 |
+
padding: 2rem;
|
| 45 |
+
background: var(--bg-secondary);
|
| 46 |
+
border-radius: var(--radius-lg);
|
| 47 |
+
box-shadow: var(--shadow-md);
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.form-group {
|
| 51 |
+
margin-bottom: 2rem;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.form-group h2 {
|
| 55 |
+
color: var(--text-primary);
|
| 56 |
+
font-size: 1.5rem;
|
| 57 |
+
margin-bottom: 1.5rem;
|
| 58 |
+
font-weight: 600;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
input {
|
| 62 |
+
width: 100%;
|
| 63 |
+
padding: 0.75rem 1rem;
|
| 64 |
+
margin-bottom: 1rem;
|
| 65 |
+
border: 1px solid var(--border-color);
|
| 66 |
+
border-radius: var(--radius-sm);
|
| 67 |
+
font-size: 1rem;
|
| 68 |
+
transition: all 0.2s ease;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
input:focus {
|
| 72 |
+
outline: none;
|
| 73 |
+
border-color: var(--primary-color);
|
| 74 |
+
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
/* Buttons */
|
| 78 |
+
button,
|
| 79 |
+
.btn {
|
| 80 |
+
display: inline-flex;
|
| 81 |
+
align-items: center;
|
| 82 |
+
justify-content: center;
|
| 83 |
+
padding: 0.75rem 1.5rem;
|
| 84 |
+
background-color: var(--primary-color);
|
| 85 |
+
color: white;
|
| 86 |
+
border: none;
|
| 87 |
+
border-radius: var(--radius-sm);
|
| 88 |
+
font-size: 1rem;
|
| 89 |
+
font-weight: 500;
|
| 90 |
+
cursor: pointer;
|
| 91 |
+
transition: all 0.2s ease;
|
| 92 |
+
width: 100%;
|
| 93 |
+
gap: 0.5rem;
|
| 94 |
+
text-decoration: none; /* Ensure no underline if used on links */
|
| 95 |
+
-webkit-appearance: none; /* Remove default browser styling */
|
| 96 |
+
-moz-appearance: none;
|
| 97 |
+
appearance: none;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
button:hover,
|
| 101 |
+
.btn:hover {
|
| 102 |
+
background-color: var(--primary-hover);
|
| 103 |
+
transform: translateY(-1px);
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
button:active,
|
| 107 |
+
.btn:active {
|
| 108 |
+
transform: translateY(0);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.btn i {
|
| 112 |
+
font-size: 1.1rem;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
/* Dashboard */
|
| 116 |
+
.dashboard-header {
|
| 117 |
+
display: flex;
|
| 118 |
+
justify-content: space-between;
|
| 119 |
+
align-items: center;
|
| 120 |
+
margin-bottom: 2rem;
|
| 121 |
+
padding-bottom: 1rem;
|
| 122 |
+
border-bottom: 1px solid var(--border-color);
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
.dashboard-header h2 {
|
| 126 |
+
font-size: 1.75rem;
|
| 127 |
+
font-weight: 600;
|
| 128 |
+
color: var(--text-primary);
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
/* Stats Container */
|
| 132 |
+
.stats-container {
|
| 133 |
+
display: grid;
|
| 134 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 135 |
+
gap: 1.5rem;
|
| 136 |
+
margin-bottom: 2rem;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.stat-card {
|
| 140 |
+
background: var(--bg-secondary);
|
| 141 |
+
padding: 1.5rem;
|
| 142 |
+
border-radius: var(--radius-md);
|
| 143 |
+
box-shadow: var(--shadow-sm);
|
| 144 |
+
transition: transform 0.2s ease;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.stat-card:hover {
|
| 148 |
+
transform: translateY(-2px);
|
| 149 |
+
box-shadow: var(--shadow-md);
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
.stat-card h3 {
|
| 153 |
+
color: var(--text-secondary);
|
| 154 |
+
font-size: 0.875rem;
|
| 155 |
+
font-weight: 500;
|
| 156 |
+
margin-bottom: 0.5rem;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.stat-card p {
|
| 160 |
+
color: var(--text-primary);
|
| 161 |
+
font-size: 1.5rem;
|
| 162 |
+
font-weight: 600;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
/* Submissions Grid */
|
| 166 |
+
.submissions-grid {
|
| 167 |
+
display: grid;
|
| 168 |
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
| 169 |
+
gap: 1.5rem;
|
| 170 |
+
margin-top: 1.5rem;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.submission-card {
|
| 174 |
+
background: var(--bg-secondary);
|
| 175 |
+
border-radius: var(--radius-md);
|
| 176 |
+
padding: 1.5rem;
|
| 177 |
+
box-shadow: var(--shadow-sm);
|
| 178 |
+
transition: all 0.2s ease;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
.submission-card:hover {
|
| 182 |
+
transform: translateY(-2px);
|
| 183 |
+
box-shadow: var(--shadow-md);
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
.submission-header {
|
| 187 |
+
display: flex;
|
| 188 |
+
justify-content: space-between;
|
| 189 |
+
align-items: center;
|
| 190 |
+
margin-bottom: 1rem;
|
| 191 |
+
padding-bottom: 0.5rem;
|
| 192 |
+
border-bottom: 1px solid var(--border-color);
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
.submission-id {
|
| 196 |
+
font-weight: 600;
|
| 197 |
+
color: var(--text-primary);
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
.submission-status {
|
| 201 |
+
padding: 0.25rem 0.75rem;
|
| 202 |
+
border-radius: 9999px;
|
| 203 |
+
font-size: 0.875rem;
|
| 204 |
+
font-weight: 500;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
.status-pending {
|
| 208 |
+
background-color: #FEF3C7;
|
| 209 |
+
color: #92400E;
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
.status-approved {
|
| 213 |
+
background-color: #D1FAE5;
|
| 214 |
+
color: #065F46;
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
.status-paid {
|
| 218 |
+
background-color: #DBEAFE;
|
| 219 |
+
color: #1E40AF;
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
.status-rejected {
|
| 223 |
+
background-color: #FEE2E2;
|
| 224 |
+
color: #991B1B;
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
.submission-details {
|
| 228 |
+
margin-bottom: 1rem;
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
.detail-row {
|
| 232 |
+
display: flex;
|
| 233 |
+
justify-content: space-between;
|
| 234 |
+
margin-bottom: 0.5rem;
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
.detail-label {
|
| 238 |
+
color: var(--text-secondary);
|
| 239 |
+
font-size: 0.875rem;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.detail-value {
|
| 243 |
+
font-weight: 500;
|
| 244 |
+
color: var(--text-primary);
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
.submission-actions {
|
| 248 |
+
display: flex;
|
| 249 |
+
gap: 0.5rem;
|
| 250 |
+
flex-wrap: wrap;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
.action-btn {
|
| 254 |
+
padding: 0.5rem 1rem;
|
| 255 |
+
border-radius: var(--radius-sm);
|
| 256 |
+
font-size: 0.875rem;
|
| 257 |
+
font-weight: 500;
|
| 258 |
+
cursor: pointer;
|
| 259 |
+
transition: all 0.2s ease;
|
| 260 |
+
border: none;
|
| 261 |
+
display: inline-flex;
|
| 262 |
+
align-items: center;
|
| 263 |
+
gap: 0.25rem;
|
| 264 |
+
-webkit-appearance: none; /* Remove default browser styling */
|
| 265 |
+
-moz-appearance: none;
|
| 266 |
+
appearance: none;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.action-btn:hover {
|
| 270 |
+
transform: translateY(-1px);
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
.action-btn:active {
|
| 274 |
+
transform: translateY(0);
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
.view-btn {
|
| 278 |
+
background-color: #E0E7FF;
|
| 279 |
+
color: var(--primary-color);
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
.view-btn:hover {
|
| 283 |
+
background-color: #C7D2FE;
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
.approve-btn {
|
| 287 |
+
background-color: var(--success-color);
|
| 288 |
+
color: white;
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
.approve-btn:hover {
|
| 292 |
+
background-color: #059669;
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
.reject-btn {
|
| 296 |
+
background-color: var(--danger-color);
|
| 297 |
+
color: white;
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
.reject-btn:hover {
|
| 301 |
+
background-color: #DC2626;
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
.pay-btn {
|
| 305 |
+
background-color: var(--primary-color);
|
| 306 |
+
color: white;
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
.pay-btn:hover {
|
| 310 |
+
background-color: var(--primary-hover);
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
/* Modals */
|
| 314 |
+
.modal {
|
| 315 |
+
display: none;
|
| 316 |
+
position: fixed;
|
| 317 |
+
top: 0;
|
| 318 |
+
left: 0;
|
| 319 |
+
width: 100%;
|
| 320 |
+
height: 100%;
|
| 321 |
+
background-color: rgba(0, 0, 0, 0.5);
|
| 322 |
+
z-index: 1000;
|
| 323 |
+
opacity: 0;
|
| 324 |
+
transition: opacity 0.3s ease;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
.modal.show {
|
| 328 |
+
opacity: 1;
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
.modal-content {
|
| 332 |
+
position: relative;
|
| 333 |
+
background-color: var(--bg-secondary);
|
| 334 |
+
margin: 2rem auto;
|
| 335 |
+
padding: 2rem;
|
| 336 |
+
border-radius: var(--radius-lg);
|
| 337 |
+
max-width: 600px;
|
| 338 |
+
width: 90%;
|
| 339 |
+
transform: translateY(-20px);
|
| 340 |
+
transition: transform 0.3s ease;
|
| 341 |
+
}
|
| 342 |
+
|
| 343 |
+
.modal.show .modal-content {
|
| 344 |
+
transform: translateY(0);
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
/* Chat Modal */
|
| 348 |
+
.chat-modal-content {
|
| 349 |
+
display: flex;
|
| 350 |
+
flex-direction: column;
|
| 351 |
+
height: 80vh;
|
| 352 |
+
max-height: 600px;
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
.chat-header {
|
| 356 |
+
padding-bottom: 1rem;
|
| 357 |
+
margin-bottom: 1rem;
|
| 358 |
+
border-bottom: 1px solid var(--border-color);
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
.chat-messages {
|
| 362 |
+
flex: 1;
|
| 363 |
+
overflow-y: auto;
|
| 364 |
+
padding: 1rem;
|
| 365 |
+
background-color: #F3F4F6;
|
| 366 |
+
border-radius: var(--radius-sm);
|
| 367 |
+
margin-bottom: 1rem;
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
.message {
|
| 371 |
+
margin-bottom: 0.75rem;
|
| 372 |
+
padding: 0.75rem 1rem;
|
| 373 |
+
border-radius: var(--radius-sm);
|
| 374 |
+
max-width: 80%;
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
.message.user {
|
| 378 |
+
background-color: #E0E7FF;
|
| 379 |
+
color: var(--primary-color);
|
| 380 |
+
margin-left: auto;
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
.message.admin {
|
| 384 |
+
background-color: var(--bg-secondary);
|
| 385 |
+
color: var(--text-primary);
|
| 386 |
+
margin-right: auto;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
.chat-form {
|
| 390 |
+
display: flex;
|
| 391 |
+
gap: 0.5rem;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
.chat-form input {
|
| 395 |
+
flex: 1;
|
| 396 |
+
margin-bottom: 0;
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
/* Loading Overlay */
|
| 400 |
+
.loading-overlay {
|
| 401 |
+
position: fixed;
|
| 402 |
+
top: 0;
|
| 403 |
+
left: 0;
|
| 404 |
+
width: 100%;
|
| 405 |
+
height: 100%;
|
| 406 |
+
background-color: rgba(255, 255, 255, 0.9);
|
| 407 |
+
display: flex;
|
| 408 |
+
justify-content: center;
|
| 409 |
+
align-items: center;
|
| 410 |
+
z-index: 2000;
|
| 411 |
+
opacity: 0;
|
| 412 |
+
visibility: hidden;
|
| 413 |
+
transition: all 0.3s ease;
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
.loading-overlay.show {
|
| 417 |
+
opacity: 1;
|
| 418 |
+
visibility: visible;
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
.loading-content {
|
| 422 |
+
text-align: center;
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
.loading-spinner {
|
| 426 |
+
width: 40px;
|
| 427 |
+
height: 40px;
|
| 428 |
+
border: 3px solid var(--border-color);
|
| 429 |
+
border-top-color: var(--primary-color);
|
| 430 |
+
border-radius: 50%;
|
| 431 |
+
animation: spin 1s linear infinite;
|
| 432 |
+
margin: 0 auto 1rem;
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
.loading-text {
|
| 436 |
+
color: var(--text-primary);
|
| 437 |
+
font-weight: 500;
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
@keyframes spin {
|
| 441 |
+
to {
|
| 442 |
+
transform: rotate(360deg);
|
| 443 |
+
}
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
/* Confirmation Modal */
|
| 447 |
+
.confirmation-modal {
|
| 448 |
+
display: none;
|
| 449 |
+
position: fixed;
|
| 450 |
+
top: 0;
|
| 451 |
+
left: 0;
|
| 452 |
+
width: 100%;
|
| 453 |
+
height: 100%;
|
| 454 |
+
background-color: rgba(0, 0, 0, 0.5);
|
| 455 |
+
z-index: 1000;
|
| 456 |
+
opacity: 0;
|
| 457 |
+
transition: opacity 0.3s ease;
|
| 458 |
+
}
|
| 459 |
+
|
| 460 |
+
.confirmation-modal.show {
|
| 461 |
+
opacity: 1;
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
.confirmation-content {
|
| 465 |
+
position: relative;
|
| 466 |
+
background-color: var(--bg-secondary);
|
| 467 |
+
margin: 2rem auto;
|
| 468 |
+
padding: 2rem;
|
| 469 |
+
border-radius: var(--radius-lg);
|
| 470 |
+
max-width: 500px;
|
| 471 |
+
width: 90%;
|
| 472 |
+
transform: translateY(-20px);
|
| 473 |
+
transition: transform 0.3s ease;
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
.confirmation-modal.show .confirmation-content {
|
| 477 |
+
transform: translateY(0);
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
.confirmation-title {
|
| 481 |
+
font-size: 1.25rem;
|
| 482 |
+
font-weight: 600;
|
| 483 |
+
margin-bottom: 1rem;
|
| 484 |
+
color: var(--text-primary);
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
.confirmation-message {
|
| 488 |
+
color: var(--text-secondary);
|
| 489 |
+
margin-bottom: 1.5rem;
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
.confirmation-actions {
|
| 493 |
+
display: flex;
|
| 494 |
+
justify-content: flex-end;
|
| 495 |
+
gap: 1rem;
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
.cancel-btn {
|
| 499 |
+
padding: 0.75rem 1.5rem;
|
| 500 |
+
background-color: #F3F4F6;
|
| 501 |
+
color: var(--text-primary);
|
| 502 |
+
border: none;
|
| 503 |
+
border-radius: var(--radius-sm);
|
| 504 |
+
font-size: 1rem;
|
| 505 |
+
font-weight: 500;
|
| 506 |
+
cursor: pointer;
|
| 507 |
+
transition: all 0.2s ease;
|
| 508 |
+
-webkit-appearance: none; /* Remove default browser styling */
|
| 509 |
+
-moz-appearance: none;
|
| 510 |
+
appearance: none;
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
.cancel-btn:hover {
|
| 514 |
+
background-color: #E5E7EB;
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
.confirm-btn {
|
| 518 |
+
padding: 0.75rem 1.5rem;
|
| 519 |
+
background-color: var(--danger-color);
|
| 520 |
+
color: white;
|
| 521 |
+
border: none;
|
| 522 |
+
border-radius: var(--radius-sm);
|
| 523 |
+
font-size: 1rem;
|
| 524 |
+
font-weight: 500;
|
| 525 |
+
cursor: pointer;
|
| 526 |
+
transition: all 0.2s ease;
|
| 527 |
+
-webkit-appearance: none; /* Remove default browser styling */
|
| 528 |
+
-moz-appearance: none;
|
| 529 |
+
appearance: none;
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
.confirm-btn:hover {
|
| 533 |
+
background-color: #DC2626;
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
/* Admin Dashboard Specific Styles */
|
| 537 |
+
.header-actions .logout-btn,
|
| 538 |
+
.header-actions .refresh-btn,
|
| 539 |
+
.header-actions .reset-btn {
|
| 540 |
+
width: auto; /* Override width: 100% from .btn */
|
| 541 |
+
padding: 0.5rem 1rem; /* Adjust padding for smaller buttons */
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
/* Responsive Design */
|
| 545 |
+
@media (max-width: 768px) {
|
| 546 |
+
.container {
|
| 547 |
+
padding: 1rem;
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
.stats-container {
|
| 551 |
+
grid-template-columns: repeat(2, 1fr);
|
| 552 |
+
}
|
| 553 |
+
|
| 554 |
+
.submissions-grid {
|
| 555 |
+
grid-template-columns: 1fr;
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
.dashboard-header {
|
| 559 |
+
flex-direction: column;
|
| 560 |
+
gap: 1rem;
|
| 561 |
+
align-items: flex-start;
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
.header-actions {
|
| 565 |
+
display: flex;
|
| 566 |
+
gap: 0.5rem;
|
| 567 |
+
width: 100%;
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
+
.header-actions button {
|
| 571 |
+
flex: 1;
|
| 572 |
+
}
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
@media (max-width: 480px) {
|
| 576 |
+
.stats-container {
|
| 577 |
+
grid-template-columns: 1fr;
|
| 578 |
+
}
|
| 579 |
+
|
| 580 |
+
.submission-actions {
|
| 581 |
+
flex-direction: column;
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
.action-btn {
|
| 585 |
+
width: 100%;
|
| 586 |
+
}
|
| 587 |
+
}
|
server.js
ADDED
|
@@ -0,0 +1,969 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
require('dotenv').config();
|
| 2 |
+
const express = require('express');
|
| 3 |
+
const cors = require('cors');
|
| 4 |
+
const path = require('path');
|
| 5 |
+
const bcrypt = require('bcrypt');
|
| 6 |
+
const multer = require('multer');
|
| 7 |
+
const { generateOtp, sendOtpEmail } = require('./mailService');
|
| 8 |
+
const { getPool, initializeDatabase, closePool } = require('./db');
|
| 9 |
+
const otpService = require('./otpService');
|
| 10 |
+
const axios = require('axios');
|
| 11 |
+
const http = require('http');
|
| 12 |
+
const socketIo = require('socket.io');
|
| 13 |
+
const fs = require('fs');
|
| 14 |
+
|
| 15 |
+
const app = express();
|
| 16 |
+
const server = http.createServer(app);
|
| 17 |
+
const io = socketIo(server, {
|
| 18 |
+
cors: {
|
| 19 |
+
origin: "*",
|
| 20 |
+
methods: ["GET", "POST"]
|
| 21 |
+
}
|
| 22 |
+
});
|
| 23 |
+
const port = process.env.PORT || 3000;
|
| 24 |
+
|
| 25 |
+
// Initialize database and start server
|
| 26 |
+
(async () => {
|
| 27 |
+
try {
|
| 28 |
+
await initializeDatabase();
|
| 29 |
+
console.log('Database initialized successfully.');
|
| 30 |
+
|
| 31 |
+
// Test database connection
|
| 32 |
+
const pool = getPool();
|
| 33 |
+
const client = await pool.connect();
|
| 34 |
+
client.release();
|
| 35 |
+
console.log('Connected to main database');
|
| 36 |
+
|
| 37 |
+
server.listen(port, () => {
|
| 38 |
+
console.log(`Server running on port ${port}`);
|
| 39 |
+
});
|
| 40 |
+
} catch (err) {
|
| 41 |
+
console.error('Failed to initialize database or start server:', err);
|
| 42 |
+
process.exit(1);
|
| 43 |
+
}
|
| 44 |
+
})();
|
| 45 |
+
|
| 46 |
+
// Middleware
|
| 47 |
+
app.use(cors());
|
| 48 |
+
app.use(express.json());
|
| 49 |
+
app.use(express.static('public'));
|
| 50 |
+
|
| 51 |
+
// Store logs in memory (in production, use a database)
|
| 52 |
+
let serverLogs = [];
|
| 53 |
+
|
| 54 |
+
// Message cache for better performance
|
| 55 |
+
let messageCache = new Map(); // userId -> { messages: [], lastUpdated: timestamp }
|
| 56 |
+
const CACHE_TTL = 30000; // 30 seconds
|
| 57 |
+
|
| 58 |
+
// Cache management functions
|
| 59 |
+
function getCachedMessages(userId) {
|
| 60 |
+
const cached = messageCache.get(userId);
|
| 61 |
+
if (cached && (Date.now() - cached.lastUpdated) < CACHE_TTL) {
|
| 62 |
+
return cached.messages;
|
| 63 |
+
}
|
| 64 |
+
return null;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
function setCachedMessages(userId, messages) {
|
| 68 |
+
messageCache.set(userId, {
|
| 69 |
+
messages: messages,
|
| 70 |
+
lastUpdated: Date.now()
|
| 71 |
+
});
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
function invalidateUserCache(userId) {
|
| 75 |
+
messageCache.delete(userId);
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
// Logging middleware
|
| 79 |
+
function logRequest(req, res, next) {
|
| 80 |
+
const start = Date.now();
|
| 81 |
+
|
| 82 |
+
// Log incoming request
|
| 83 |
+
const requestLog = {
|
| 84 |
+
type: 'request',
|
| 85 |
+
message: `${req.method} ${req.path}`,
|
| 86 |
+
details: {
|
| 87 |
+
method: req.method,
|
| 88 |
+
path: req.path,
|
| 89 |
+
headers: req.headers,
|
| 90 |
+
body: req.body,
|
| 91 |
+
timestamp: new Date().toISOString(),
|
| 92 |
+
ip: req.ip || req.connection.remoteAddress
|
| 93 |
+
},
|
| 94 |
+
source: 'middleware'
|
| 95 |
+
};
|
| 96 |
+
|
| 97 |
+
emitLog(requestLog);
|
| 98 |
+
|
| 99 |
+
// Override res.end to log response
|
| 100 |
+
const originalEnd = res.end;
|
| 101 |
+
res.end = function(chunk, encoding) {
|
| 102 |
+
const duration = Date.now() - start;
|
| 103 |
+
|
| 104 |
+
const responseLog = {
|
| 105 |
+
type: 'response',
|
| 106 |
+
message: `${req.method} ${req.path} - ${res.statusCode} (${duration}ms)`,
|
| 107 |
+
details: {
|
| 108 |
+
statusCode: res.statusCode,
|
| 109 |
+
duration: duration,
|
| 110 |
+
headers: res.getHeaders(),
|
| 111 |
+
timestamp: new Date().toISOString()
|
| 112 |
+
},
|
| 113 |
+
source: 'middleware'
|
| 114 |
+
};
|
| 115 |
+
|
| 116 |
+
emitLog(responseLog);
|
| 117 |
+
originalEnd.call(this, chunk, encoding);
|
| 118 |
+
};
|
| 119 |
+
|
| 120 |
+
next();
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
// Apply logging middleware
|
| 124 |
+
app.use(logRequest);
|
| 125 |
+
|
| 126 |
+
// Emit log to all connected clients
|
| 127 |
+
function emitLog(logData) {
|
| 128 |
+
serverLogs.unshift(logData);
|
| 129 |
+
|
| 130 |
+
// Keep only last 1000 logs
|
| 131 |
+
if (serverLogs.length > 1000) {
|
| 132 |
+
serverLogs = serverLogs.slice(0, 1000);
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
io.emit('server-log', logData);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
// Manual logging function
|
| 139 |
+
function log(level, message, details = {}) {
|
| 140 |
+
const logData = {
|
| 141 |
+
type: level,
|
| 142 |
+
message: message,
|
| 143 |
+
details: {
|
| 144 |
+
...details,
|
| 145 |
+
timestamp: new Date().toISOString()
|
| 146 |
+
},
|
| 147 |
+
source: 'server'
|
| 148 |
+
};
|
| 149 |
+
|
| 150 |
+
emitLog(logData);
|
| 151 |
+
|
| 152 |
+
// Also log to console
|
| 153 |
+
console.log(`[${level.toUpperCase()}] ${message}`, details);
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
// OTP Authentication middleware
|
| 157 |
+
const requireOtpAuth = async (req, res, next) => {
|
| 158 |
+
const otp = req.headers['x-otp-token'];
|
| 159 |
+
const email = req.headers['x-user-email'];
|
| 160 |
+
|
| 161 |
+
if (!otp || !email) {
|
| 162 |
+
return res.status(401).json({ error: 'Missing OTP or email headers' });
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
try {
|
| 166 |
+
const pool = getPool();
|
| 167 |
+
const result = await pool.query(
|
| 168 |
+
'SELECT * FROM otps WHERE email = $1 AND otp = $2 AND verified = true AND expires_at > NOW()',
|
| 169 |
+
[email, otp]
|
| 170 |
+
);
|
| 171 |
+
|
| 172 |
+
if (result.rows.length === 0) {
|
| 173 |
+
return res.status(401).json({ error: 'Invalid or expired OTP' });
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
req.user = { email };
|
| 177 |
+
next();
|
| 178 |
+
} catch (err) {
|
| 179 |
+
console.error('OTP verification error:', err);
|
| 180 |
+
res.status(500).json({ error: 'Internal server error' });
|
| 181 |
+
}
|
| 182 |
+
};
|
| 183 |
+
|
| 184 |
+
// Admin OTP Authentication middleware
|
| 185 |
+
const requireAdminOtpAuth = async (req, res, next) => {
|
| 186 |
+
try {
|
| 187 |
+
const otp = req.headers['x-otp-token'];
|
| 188 |
+
const email = req.headers['x-user-email'];
|
| 189 |
+
|
| 190 |
+
if (!otp || !email) {
|
| 191 |
+
return res.status(401).json({
|
| 192 |
+
success: false,
|
| 193 |
+
error: 'Missing authentication headers'
|
| 194 |
+
});
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
const pool = getPool();
|
| 198 |
+
// Verify OTP
|
| 199 |
+
const result = await pool.query(
|
| 200 |
+
'SELECT * FROM otps WHERE email = $1 AND otp = $2 AND is_used = false AND expires_at > NOW()',
|
| 201 |
+
[email, otp]
|
| 202 |
+
);
|
| 203 |
+
|
| 204 |
+
if (result.rows.length === 0) {
|
| 205 |
+
return res.status(401).json({
|
| 206 |
+
success: false,
|
| 207 |
+
error: 'Invalid or expired OTP'
|
| 208 |
+
});
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
// Mark OTP as used
|
| 212 |
+
await pool.query(
|
| 213 |
+
'UPDATE otps SET is_used = true WHERE email = $1 AND otp = $2',
|
| 214 |
+
[email, otp]
|
| 215 |
+
);
|
| 216 |
+
|
| 217 |
+
next();
|
| 218 |
+
} catch (error) {
|
| 219 |
+
console.error('Admin auth error:', error);
|
| 220 |
+
res.status(500).json({
|
| 221 |
+
success: false,
|
| 222 |
+
error: 'Authentication error'
|
| 223 |
+
});
|
| 224 |
+
}
|
| 225 |
+
};
|
| 226 |
+
|
| 227 |
+
// Middleware to check OTP authentication
|
| 228 |
+
async function checkOtpAuth(req, res, next) {
|
| 229 |
+
const otp = req.headers['x-otp-token'];
|
| 230 |
+
const email = req.headers['x-user-email'];
|
| 231 |
+
|
| 232 |
+
if (!otp || !email) {
|
| 233 |
+
return res.status(401).json({ success: false, error: 'OTP token and email are required' });
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
try {
|
| 237 |
+
const result = await otpService.verifyUserOtp(email, otp);
|
| 238 |
+
if (!result.success) {
|
| 239 |
+
return res.status(401).json({ success: false, error: 'Invalid OTP' });
|
| 240 |
+
}
|
| 241 |
+
next();
|
| 242 |
+
} catch (error) {
|
| 243 |
+
res.status(401).json({ success: false, error: error.message });
|
| 244 |
+
}
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
// Middleware to check admin OTP authentication
|
| 248 |
+
async function checkAdminOtpAuth(req, res, next) {
|
| 249 |
+
const otp = req.headers['x-otp-token'];
|
| 250 |
+
|
| 251 |
+
if (!otp) {
|
| 252 |
+
return res.status(401).json({ success: false, error: 'OTP token required' });
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
try {
|
| 256 |
+
const response = await fetch('https://mail-steel.vercel.app/admin/verify-otp', {
|
| 257 |
+
method: 'POST',
|
| 258 |
+
headers: {
|
| 259 |
+
'Content-Type': 'application/json'
|
| 260 |
+
},
|
| 261 |
+
body: JSON.stringify({ otp })
|
| 262 |
+
});
|
| 263 |
+
|
| 264 |
+
const data = await response.json();
|
| 265 |
+
if (!data.success) {
|
| 266 |
+
return res.status(401).json({ success: false, error: 'Invalid OTP' });
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
next();
|
| 270 |
+
} catch (error) {
|
| 271 |
+
console.error('Admin OTP verification failed:', error);
|
| 272 |
+
res.status(500).json({ success: false, error: 'Failed to verify admin OTP' });
|
| 273 |
+
}
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
// Routes
|
| 277 |
+
app.get('/', (req, res) => {
|
| 278 |
+
log('info', 'Homepage accessed', {
|
| 279 |
+
path: req.path,
|
| 280 |
+
userAgent: req.get('User-Agent'),
|
| 281 |
+
ip: req.ip
|
| 282 |
+
});
|
| 283 |
+
res.sendFile(path.join(__dirname, 'public', 'index.html'));
|
| 284 |
+
});
|
| 285 |
+
|
| 286 |
+
app.get('/status', (req, res) => {
|
| 287 |
+
log('info', 'Status page accessed', {
|
| 288 |
+
path: req.path,
|
| 289 |
+
userAgent: req.get('User-Agent'),
|
| 290 |
+
ip: req.ip
|
| 291 |
+
});
|
| 292 |
+
res.sendFile(path.join(__dirname, 'public', 'status.html'));
|
| 293 |
+
});
|
| 294 |
+
|
| 295 |
+
app.get('/admin', (req, res) => {
|
| 296 |
+
log('info', 'Admin page accessed', {
|
| 297 |
+
path: req.path,
|
| 298 |
+
userAgent: req.get('User-Agent'),
|
| 299 |
+
ip: req.ip
|
| 300 |
+
});
|
| 301 |
+
res.sendFile(path.join(__dirname, 'public', 'admin.html'));
|
| 302 |
+
});
|
| 303 |
+
|
| 304 |
+
app.get('/server-logs', (req, res) => {
|
| 305 |
+
log('info', 'Server logs page accessed', {
|
| 306 |
+
path: req.path,
|
| 307 |
+
userAgent: req.get('User-Agent'),
|
| 308 |
+
ip: req.ip
|
| 309 |
+
});
|
| 310 |
+
res.sendFile(path.join(__dirname, 'public', 'server-logs.html'));
|
| 311 |
+
});
|
| 312 |
+
|
| 313 |
+
// API Routes
|
| 314 |
+
|
| 315 |
+
// Send OTP
|
| 316 |
+
app.post('/api/send-otp', async (req, res) => {
|
| 317 |
+
const { email, type } = req.body;
|
| 318 |
+
|
| 319 |
+
if (!email && type !== 'admin') {
|
| 320 |
+
return res.status(400).json({ success: false, error: 'Email is required for user OTP' });
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
try {
|
| 324 |
+
let result;
|
| 325 |
+
if (type === 'admin') {
|
| 326 |
+
result = await otpService.sendAdminOtp();
|
| 327 |
+
} else {
|
| 328 |
+
result = await otpService.sendUserOtp(email);
|
| 329 |
+
}
|
| 330 |
+
res.json(result);
|
| 331 |
+
} catch (error) {
|
| 332 |
+
res.status(500).json({ success: false, error: error.message });
|
| 333 |
+
}
|
| 334 |
+
});
|
| 335 |
+
|
| 336 |
+
// Verify OTP
|
| 337 |
+
app.post('/api/verify-otp', async (req, res) => {
|
| 338 |
+
const { email, otp, type } = req.body;
|
| 339 |
+
|
| 340 |
+
if (!otp || (type !== 'admin' && !email)) {
|
| 341 |
+
return res.status(400).json({ success: false, error: 'OTP and email (for user) are required' });
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
try {
|
| 345 |
+
let result;
|
| 346 |
+
if (type === 'admin') {
|
| 347 |
+
result = await otpService.verifyAdminOtp(otp);
|
| 348 |
+
} else {
|
| 349 |
+
result = await otpService.verifyUserOtp(email, otp);
|
| 350 |
+
}
|
| 351 |
+
res.json(result);
|
| 352 |
+
} catch (error) {
|
| 353 |
+
res.status(500).json({ success: false, error: error.message });
|
| 354 |
+
}
|
| 355 |
+
});
|
| 356 |
+
|
| 357 |
+
// Register new user
|
| 358 |
+
app.post('/api/register', async (req, res) => {
|
| 359 |
+
const { name, email, password } = req.body;
|
| 360 |
+
|
| 361 |
+
if (!name || !email || !password) {
|
| 362 |
+
return res.status(400).json({
|
| 363 |
+
success: false,
|
| 364 |
+
error: 'Name, email and password are required'
|
| 365 |
+
});
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
try {
|
| 369 |
+
// Check if user already exists
|
| 370 |
+
const { rows: existingUsers } = await getPool().query(
|
| 371 |
+
'SELECT * FROM users WHERE email = $1',
|
| 372 |
+
[email]
|
| 373 |
+
);
|
| 374 |
+
|
| 375 |
+
if (existingUsers.length > 0) {
|
| 376 |
+
return res.status(400).json({
|
| 377 |
+
success: false,
|
| 378 |
+
error: 'Email already registered'
|
| 379 |
+
});
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
// Hash password
|
| 383 |
+
const hashedPassword = await bcrypt.hash(password, 10);
|
| 384 |
+
|
| 385 |
+
// Create new user
|
| 386 |
+
const { rows: newUser } = await getPool().query(
|
| 387 |
+
'INSERT INTO users (name, email, password) VALUES ($1, $2, $3) RETURNING id, name, email',
|
| 388 |
+
[name, email, hashedPassword]
|
| 389 |
+
);
|
| 390 |
+
|
| 391 |
+
res.json({
|
| 392 |
+
success: true,
|
| 393 |
+
user: newUser[0],
|
| 394 |
+
message: 'Registration successful'
|
| 395 |
+
});
|
| 396 |
+
} catch (error) {
|
| 397 |
+
console.error('Error registering user:', error);
|
| 398 |
+
res.status(500).json({
|
| 399 |
+
success: false,
|
| 400 |
+
error: 'Failed to register user'
|
| 401 |
+
});
|
| 402 |
+
}
|
| 403 |
+
});
|
| 404 |
+
|
| 405 |
+
// Login
|
| 406 |
+
app.post('/api/login', async (req, res) => {
|
| 407 |
+
const { email, password } = req.body;
|
| 408 |
+
|
| 409 |
+
if (!email || !password) {
|
| 410 |
+
return res.status(400).json({
|
| 411 |
+
success: false,
|
| 412 |
+
error: 'Email and password are required'
|
| 413 |
+
});
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
try {
|
| 417 |
+
const { rows: users } = await getPool().query(
|
| 418 |
+
'SELECT * FROM users WHERE email = $1',
|
| 419 |
+
[email]
|
| 420 |
+
);
|
| 421 |
+
|
| 422 |
+
if (users.length === 0) {
|
| 423 |
+
return res.status(401).json({
|
| 424 |
+
success: false,
|
| 425 |
+
error: 'Invalid email or password'
|
| 426 |
+
});
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
const user = users[0];
|
| 430 |
+
const validPassword = await bcrypt.compare(password, user.password);
|
| 431 |
+
|
| 432 |
+
if (!validPassword) {
|
| 433 |
+
return res.status(401).json({
|
| 434 |
+
success: false,
|
| 435 |
+
error: 'Invalid email or password'
|
| 436 |
+
});
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
res.json({
|
| 440 |
+
success: true,
|
| 441 |
+
user: {
|
| 442 |
+
id: user.id,
|
| 443 |
+
name: user.name,
|
| 444 |
+
email: user.email
|
| 445 |
+
}
|
| 446 |
+
});
|
| 447 |
+
} catch (error) {
|
| 448 |
+
console.error('Error logging in:', error);
|
| 449 |
+
res.status(500).json({
|
| 450 |
+
success: false,
|
| 451 |
+
error: 'Login failed'
|
| 452 |
+
});
|
| 453 |
+
}
|
| 454 |
+
});
|
| 455 |
+
|
| 456 |
+
// Get user submissions (protected route example)
|
| 457 |
+
app.get('/api/user-submissions/:userId', checkOtpAuth, async (req, res) => {
|
| 458 |
+
const { userId } = req.params;
|
| 459 |
+
|
| 460 |
+
try {
|
| 461 |
+
const result = await getPool().query(
|
| 462 |
+
'SELECT * FROM submissions WHERE user_id = $1 ORDER BY created_at DESC',
|
| 463 |
+
[userId]
|
| 464 |
+
);
|
| 465 |
+
res.json({ success: true, submissions: result.rows });
|
| 466 |
+
} catch (error) {
|
| 467 |
+
res.status(500).json({ success: false, error: 'Failed to fetch submissions' });
|
| 468 |
+
}
|
| 469 |
+
});
|
| 470 |
+
|
| 471 |
+
// Gift Card Routes
|
| 472 |
+
app.post('/api/gift-cards', checkOtpAuth, async (req, res) => {
|
| 473 |
+
const {
|
| 474 |
+
ticket_user_name,
|
| 475 |
+
gc_code,
|
| 476 |
+
gc_phone,
|
| 477 |
+
upi_id,
|
| 478 |
+
amount,
|
| 479 |
+
proof_video_url
|
| 480 |
+
} = req.body;
|
| 481 |
+
const userId = req.headers['x-user-id'];
|
| 482 |
+
|
| 483 |
+
if (!ticket_user_name || !gc_code || !gc_phone || !upi_id || !amount || !proof_video_url) {
|
| 484 |
+
return res.status(400).json({
|
| 485 |
+
success: false,
|
| 486 |
+
error: 'All fields are required including the video URL'
|
| 487 |
+
});
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
try {
|
| 491 |
+
const result = await getPool().query(
|
| 492 |
+
`INSERT INTO submissions (
|
| 493 |
+
user_id,
|
| 494 |
+
ticket_user_name,
|
| 495 |
+
gc_code,
|
| 496 |
+
gc_phone,
|
| 497 |
+
upi_id,
|
| 498 |
+
amount,
|
| 499 |
+
proof_video_url
|
| 500 |
+
) VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING id`,
|
| 501 |
+
[userId, ticket_user_name, gc_code, gc_phone, upi_id, amount, proof_video_url]
|
| 502 |
+
);
|
| 503 |
+
res.json({
|
| 504 |
+
success: true,
|
| 505 |
+
submissionId: result.rows[0].id,
|
| 506 |
+
message: 'Gift card submission successful'
|
| 507 |
+
});
|
| 508 |
+
} catch (error) {
|
| 509 |
+
console.error('Gift card submission error:', error);
|
| 510 |
+
res.status(500).json({
|
| 511 |
+
success: false,
|
| 512 |
+
error: 'Failed to submit gift card. Please try again.'
|
| 513 |
+
});
|
| 514 |
+
}
|
| 515 |
+
});
|
| 516 |
+
|
| 517 |
+
// File2Link Upload Route
|
| 518 |
+
app.post('/api/upload', async (req, res) => {
|
| 519 |
+
try {
|
| 520 |
+
const formData = new FormData();
|
| 521 |
+
formData.append('file', req.files.file);
|
| 522 |
+
|
| 523 |
+
const response = await axios.post('https://file2link-ol4p.onrender.com/.com/upload', formData, {
|
| 524 |
+
headers: {
|
| 525 |
+
...formData.getHeaders()
|
| 526 |
+
}
|
| 527 |
+
});
|
| 528 |
+
|
| 529 |
+
if (response.data.success) {
|
| 530 |
+
res.json({
|
| 531 |
+
success: true,
|
| 532 |
+
videoUrl: response.data.access_url
|
| 533 |
+
});
|
| 534 |
+
} else {
|
| 535 |
+
throw new Error('Upload failed');
|
| 536 |
+
}
|
| 537 |
+
} catch (error) {
|
| 538 |
+
console.error('File upload error:', error);
|
| 539 |
+
res.status(500).json({
|
| 540 |
+
success: false,
|
| 541 |
+
error: 'Failed to upload file. Please try again.'
|
| 542 |
+
});
|
| 543 |
+
}
|
| 544 |
+
});
|
| 545 |
+
|
| 546 |
+
// Get chat messages with pagination and caching
|
| 547 |
+
app.get('/api/messages/:userId', checkOtpAuth, async (req, res) => {
|
| 548 |
+
const { userId } = req.params;
|
| 549 |
+
const userEmail = req.headers['x-user-email'];
|
| 550 |
+
const page = parseInt(req.query.page) || 1;
|
| 551 |
+
const limit = parseInt(req.query.limit) || 50;
|
| 552 |
+
const offset = (page - 1) * limit;
|
| 553 |
+
|
| 554 |
+
try {
|
| 555 |
+
// Verify that the user is requesting their own messages
|
| 556 |
+
const userResult = await getPool().query('SELECT id FROM users WHERE email = $1', [userEmail]);
|
| 557 |
+
if (userResult.rows.length === 0 || userResult.rows[0].id !== parseInt(userId)) {
|
| 558 |
+
return res.status(403).json({ success: false, error: 'Unauthorized access' });
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
// Check cache first for first page
|
| 562 |
+
const cachedMessages = getCachedMessages(userId);
|
| 563 |
+
if (cachedMessages && page === 1 && limit <= 50) {
|
| 564 |
+
const paginatedMessages = cachedMessages.slice(0, limit);
|
| 565 |
+
return res.json({
|
| 566 |
+
success: true,
|
| 567 |
+
messages: paginatedMessages,
|
| 568 |
+
pagination: {
|
| 569 |
+
page: 1,
|
| 570 |
+
limit: limit,
|
| 571 |
+
total: cachedMessages.length,
|
| 572 |
+
totalPages: Math.ceil(cachedMessages.length / limit)
|
| 573 |
+
},
|
| 574 |
+
cached: true
|
| 575 |
+
});
|
| 576 |
+
}
|
| 577 |
+
|
| 578 |
+
// Get total count for pagination
|
| 579 |
+
const countResult = await getPool().query(
|
| 580 |
+
'SELECT COUNT(*) FROM messages WHERE user_id = $1',
|
| 581 |
+
[userId]
|
| 582 |
+
);
|
| 583 |
+
const totalMessages = parseInt(countResult.rows[0].count);
|
| 584 |
+
|
| 585 |
+
// Get paginated messages
|
| 586 |
+
const result = await getPool().query(
|
| 587 |
+
'SELECT * FROM messages WHERE user_id = $1 ORDER BY created_at DESC LIMIT $2 OFFSET $3',
|
| 588 |
+
[userId, limit, offset]
|
| 589 |
+
);
|
| 590 |
+
|
| 591 |
+
const messages = result.rows.reverse(); // Reverse to maintain chronological order
|
| 592 |
+
|
| 593 |
+
// Cache the results for first page
|
| 594 |
+
if (page === 1 && limit <= 50) {
|
| 595 |
+
setCachedMessages(userId, messages);
|
| 596 |
+
}
|
| 597 |
+
|
| 598 |
+
res.json({
|
| 599 |
+
success: true,
|
| 600 |
+
messages: messages,
|
| 601 |
+
pagination: {
|
| 602 |
+
page,
|
| 603 |
+
limit,
|
| 604 |
+
total: totalMessages,
|
| 605 |
+
totalPages: Math.ceil(totalMessages / limit)
|
| 606 |
+
}
|
| 607 |
+
});
|
| 608 |
+
} catch (error) {
|
| 609 |
+
console.error('Error fetching messages:', error);
|
| 610 |
+
res.status(500).json({ success: false, error: 'Failed to fetch messages' });
|
| 611 |
+
}
|
| 612 |
+
});
|
| 613 |
+
|
| 614 |
+
// Send message with real-time updates
|
| 615 |
+
app.post('/api/messages', checkOtpAuth, async (req, res) => {
|
| 616 |
+
const { userId, content, sender } = req.body;
|
| 617 |
+
const userEmail = req.headers['x-user-email'];
|
| 618 |
+
|
| 619 |
+
if (!content || !sender) {
|
| 620 |
+
return res.status(400).json({ success: false, error: 'Content and sender are required' });
|
| 621 |
+
}
|
| 622 |
+
|
| 623 |
+
try {
|
| 624 |
+
// Verify that the user is sending a message to their own chat
|
| 625 |
+
const userResult = await getPool().query('SELECT id FROM users WHERE email = $1', [userEmail]);
|
| 626 |
+
if (userResult.rows.length === 0 || userResult.rows[0].id !== parseInt(userId)) {
|
| 627 |
+
return res.status(403).json({ success: false, error: 'Unauthorized access' });
|
| 628 |
+
}
|
| 629 |
+
|
| 630 |
+
const result = await getPool().query(
|
| 631 |
+
'INSERT INTO messages (user_id, content, sender) VALUES ($1, $2, $3) RETURNING *',
|
| 632 |
+
[userId, content, sender]
|
| 633 |
+
);
|
| 634 |
+
|
| 635 |
+
const newMessage = result.rows[0];
|
| 636 |
+
|
| 637 |
+
// Invalidate cache for this user
|
| 638 |
+
invalidateUserCache(userId);
|
| 639 |
+
|
| 640 |
+
// Emit real-time update to chat room
|
| 641 |
+
io.to(`chat-${userId}`).emit('new-message', {
|
| 642 |
+
message: newMessage,
|
| 643 |
+
userEmail: userEmail
|
| 644 |
+
});
|
| 645 |
+
|
| 646 |
+
res.json({ success: true, message: newMessage });
|
| 647 |
+
} catch (error) {
|
| 648 |
+
console.error('Error sending message:', error);
|
| 649 |
+
res.status(500).json({ success: false, error: 'Failed to send message' });
|
| 650 |
+
}
|
| 651 |
+
});
|
| 652 |
+
|
| 653 |
+
// Check if submission is open (Sunday 9am-9pm)
|
| 654 |
+
app.get('/isubmissionopen', (req, res) => {
|
| 655 |
+
const now = new Date();
|
| 656 |
+
const dayOfWeek = now.getDay(); // 0 = Sunday, 1 = Monday, ..., 6 = Saturday
|
| 657 |
+
const hour = now.getHours();
|
| 658 |
+
|
| 659 |
+
// Check if it's Sunday (dayOfWeek === 0) and between 9am (9) and 9pm (21)
|
| 660 |
+
const isSubmissionOpen = dayOfWeek === 0 && hour >= 9 && hour < 21;
|
| 661 |
+
|
| 662 |
+
log('info', 'Submission status checked', {
|
| 663 |
+
dayOfWeek: dayOfWeek,
|
| 664 |
+
hour: hour,
|
| 665 |
+
isOpen: isSubmissionOpen,
|
| 666 |
+
ip: req.ip
|
| 667 |
+
});
|
| 668 |
+
|
| 669 |
+
res.json({
|
| 670 |
+
success: true,
|
| 671 |
+
isSubmissionOpen: isSubmissionOpen
|
| 672 |
+
});
|
| 673 |
+
});
|
| 674 |
+
|
| 675 |
+
// Admin routes
|
| 676 |
+
app.get('/api/admin/users', async (req, res) => {
|
| 677 |
+
try {
|
| 678 |
+
const result = await getPool().query('SELECT id, email, created_at FROM users ORDER BY created_at DESC');
|
| 679 |
+
res.json({ success: true, users: result.rows });
|
| 680 |
+
} catch (error) {
|
| 681 |
+
console.error('Error fetching users:', error);
|
| 682 |
+
res.status(500).json({ success: false, error: 'Failed to fetch users' });
|
| 683 |
+
}
|
| 684 |
+
});
|
| 685 |
+
|
| 686 |
+
app.get('/api/admin/messages/all', async (req, res) => {
|
| 687 |
+
try {
|
| 688 |
+
const result = await getPool().query(`
|
| 689 |
+
SELECT m.*, u.email as user_email
|
| 690 |
+
FROM messages m
|
| 691 |
+
JOIN users u ON m.user_id = u.id
|
| 692 |
+
ORDER BY m.created_at DESC
|
| 693 |
+
`);
|
| 694 |
+
res.json({ success: true, messages: result.rows });
|
| 695 |
+
} catch (error) {
|
| 696 |
+
console.error('Error fetching messages:', error);
|
| 697 |
+
res.status(500).json({ success: false, error: 'Failed to fetch messages' });
|
| 698 |
+
}
|
| 699 |
+
});
|
| 700 |
+
|
| 701 |
+
app.get('/api/admin/messages/:userId', async (req, res) => {
|
| 702 |
+
const { userId } = req.params;
|
| 703 |
+
try {
|
| 704 |
+
const result = await getPool().query(
|
| 705 |
+
'SELECT * FROM messages WHERE user_id = $1 ORDER BY created_at ASC',
|
| 706 |
+
[userId]
|
| 707 |
+
);
|
| 708 |
+
res.json({ success: true, messages: result.rows });
|
| 709 |
+
} catch (error) {
|
| 710 |
+
console.error('Error fetching messages:', error);
|
| 711 |
+
res.status(500).json({ success: false, error: 'Failed to fetch messages' });
|
| 712 |
+
}
|
| 713 |
+
});
|
| 714 |
+
|
| 715 |
+
app.post('/api/admin/messages', async (req, res) => {
|
| 716 |
+
try {
|
| 717 |
+
const { userId, content } = req.body;
|
| 718 |
+
const result = await getPool().query(
|
| 719 |
+
'INSERT INTO messages (user_id, content, sender) VALUES ($1, $2, $3) RETURNING *',
|
| 720 |
+
[userId, content, 'admin']
|
| 721 |
+
);
|
| 722 |
+
|
| 723 |
+
const newMessage = result.rows[0];
|
| 724 |
+
|
| 725 |
+
// Invalidate cache for this user
|
| 726 |
+
invalidateUserCache(userId);
|
| 727 |
+
|
| 728 |
+
// Emit real-time update to chat room
|
| 729 |
+
io.to(`chat-${userId}`).emit('new-message', {
|
| 730 |
+
message: newMessage,
|
| 731 |
+
userEmail: 'admin'
|
| 732 |
+
});
|
| 733 |
+
|
| 734 |
+
res.json({ success: true, message: newMessage });
|
| 735 |
+
} catch (error) {
|
| 736 |
+
console.error('Error sending message:', error);
|
| 737 |
+
res.status(500).json({ success: false, error: 'Failed to send message' });
|
| 738 |
+
}
|
| 739 |
+
});
|
| 740 |
+
|
| 741 |
+
app.delete('/api/admin/messages/:messageId', async (req, res) => {
|
| 742 |
+
const { messageId } = req.params;
|
| 743 |
+
try {
|
| 744 |
+
await getPool().query('DELETE FROM messages WHERE id = $1', [messageId]);
|
| 745 |
+
res.json({ success: true });
|
| 746 |
+
} catch (error) {
|
| 747 |
+
console.error('Error deleting message:', error);
|
| 748 |
+
res.status(500).json({ success: false, error: 'Failed to delete message' });
|
| 749 |
+
}
|
| 750 |
+
});
|
| 751 |
+
|
| 752 |
+
app.delete('/api/admin/users/:userId', async (req, res) => {
|
| 753 |
+
const { userId } = req.params;
|
| 754 |
+
try {
|
| 755 |
+
// First delete all messages for the user
|
| 756 |
+
await getPool().query('DELETE FROM messages WHERE user_id = $1', [userId]);
|
| 757 |
+
// Then delete the user
|
| 758 |
+
await getPool().query('DELETE FROM users WHERE id = $1', [userId]);
|
| 759 |
+
res.json({ success: true });
|
| 760 |
+
} catch (error) {
|
| 761 |
+
console.error('Error deleting user:', error);
|
| 762 |
+
res.status(500).json({ success: false, error: 'Failed to delete user' });
|
| 763 |
+
}
|
| 764 |
+
});
|
| 765 |
+
|
| 766 |
+
app.get('/api/admin/submissions', async (req, res) => {
|
| 767 |
+
try {
|
| 768 |
+
const result = await getPool().query(`
|
| 769 |
+
SELECT s.*, u.email as user_email
|
| 770 |
+
FROM submissions s
|
| 771 |
+
JOIN users u ON s.user_id = u.id
|
| 772 |
+
ORDER BY s.created_at DESC
|
| 773 |
+
`);
|
| 774 |
+
res.json({ success: true, submissions: result.rows });
|
| 775 |
+
} catch (error) {
|
| 776 |
+
console.error('Error fetching submissions:', error);
|
| 777 |
+
res.status(500).json({ success: false, error: 'Failed to fetch submissions' });
|
| 778 |
+
}
|
| 779 |
+
});
|
| 780 |
+
|
| 781 |
+
// Update submission status
|
| 782 |
+
app.post('/api/admin/submissions/:submissionId/status', async (req, res) => {
|
| 783 |
+
const { submissionId } = req.params;
|
| 784 |
+
const { status } = req.body;
|
| 785 |
+
|
| 786 |
+
// Validate status
|
| 787 |
+
const validStatuses = ['pending', 'approved', 'rejected', 'paid', 'closed'];
|
| 788 |
+
if (!validStatuses.includes(status)) {
|
| 789 |
+
return res.status(400).json({
|
| 790 |
+
success: false,
|
| 791 |
+
error: `Invalid status. Must be one of: ${validStatuses.join(', ')}`
|
| 792 |
+
});
|
| 793 |
+
}
|
| 794 |
+
|
| 795 |
+
try {
|
| 796 |
+
// First check if submission exists
|
| 797 |
+
const checkResult = await getPool().query(
|
| 798 |
+
'SELECT * FROM submissions WHERE id = $1',
|
| 799 |
+
[submissionId]
|
| 800 |
+
);
|
| 801 |
+
|
| 802 |
+
if (checkResult.rows.length === 0) {
|
| 803 |
+
return res.status(404).json({ success: false, error: 'Submission not found' });
|
| 804 |
+
}
|
| 805 |
+
|
| 806 |
+
// Update submission status with a CASE statement to ensure valid status
|
| 807 |
+
const updateResult = await getPool().query(
|
| 808 |
+
`UPDATE submissions
|
| 809 |
+
SET status = CASE
|
| 810 |
+
WHEN $1 IN ('pending', 'approved', 'rejected', 'paid', 'closed')
|
| 811 |
+
THEN $1
|
| 812 |
+
ELSE status
|
| 813 |
+
END
|
| 814 |
+
WHERE id = $2
|
| 815 |
+
RETURNING *`,
|
| 816 |
+
[status, submissionId]
|
| 817 |
+
);
|
| 818 |
+
|
| 819 |
+
if (updateResult.rows.length === 0) {
|
| 820 |
+
return res.status(500).json({
|
| 821 |
+
success: false,
|
| 822 |
+
error: 'Failed to update submission status'
|
| 823 |
+
});
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
res.json({
|
| 827 |
+
success: true,
|
| 828 |
+
submission: updateResult.rows[0],
|
| 829 |
+
message: `Status updated to ${status}`
|
| 830 |
+
});
|
| 831 |
+
} catch (error) {
|
| 832 |
+
console.error('Error updating submission status:', error);
|
| 833 |
+
res.status(500).json({
|
| 834 |
+
success: false,
|
| 835 |
+
error: 'Failed to update submission status',
|
| 836 |
+
details: error.message
|
| 837 |
+
});
|
| 838 |
+
}
|
| 839 |
+
});
|
| 840 |
+
|
| 841 |
+
// Get submission details including video proof
|
| 842 |
+
app.get('/api/admin/submissions/:submissionId', async (req, res) => {
|
| 843 |
+
const { submissionId } = req.params;
|
| 844 |
+
try {
|
| 845 |
+
const result = await getPool().query(`
|
| 846 |
+
SELECT s.*, u.email as user_email
|
| 847 |
+
FROM submissions s
|
| 848 |
+
JOIN users u ON s.user_id = u.id
|
| 849 |
+
WHERE s.id = $1
|
| 850 |
+
`, [submissionId]);
|
| 851 |
+
|
| 852 |
+
if (result.rows.length === 0) {
|
| 853 |
+
return res.status(404).json({ success: false, error: 'Submission not found' });
|
| 854 |
+
}
|
| 855 |
+
|
| 856 |
+
res.json({ success: true, submission: result.rows[0] });
|
| 857 |
+
} catch (error) {
|
| 858 |
+
console.error('Error fetching submission details:', error);
|
| 859 |
+
res.status(500).json({ success: false, error: 'Failed to fetch submission details' });
|
| 860 |
+
}
|
| 861 |
+
});
|
| 862 |
+
|
| 863 |
+
// Socket.IO connection handling
|
| 864 |
+
io.on('connection', (socket) => {
|
| 865 |
+
log('info', 'Client connected to server logs', {
|
| 866 |
+
socketId: socket.id,
|
| 867 |
+
totalConnections: io.engine.clientsCount
|
| 868 |
+
});
|
| 869 |
+
|
| 870 |
+
// Send existing logs to new client
|
| 871 |
+
socket.emit('server-log', {
|
| 872 |
+
type: 'info',
|
| 873 |
+
message: 'Connected to server logs',
|
| 874 |
+
details: {
|
| 875 |
+
socketId: socket.id,
|
| 876 |
+
totalLogs: serverLogs.length
|
| 877 |
+
}
|
| 878 |
+
});
|
| 879 |
+
|
| 880 |
+
// Chat functionality
|
| 881 |
+
socket.on('join-chat', (data) => {
|
| 882 |
+
const { userId, userEmail } = data;
|
| 883 |
+
if (userId && userEmail) {
|
| 884 |
+
socket.join(`chat-${userId}`);
|
| 885 |
+
log('info', 'User joined chat room', {
|
| 886 |
+
socketId: socket.id,
|
| 887 |
+
userId: userId,
|
| 888 |
+
userEmail: userEmail
|
| 889 |
+
});
|
| 890 |
+
}
|
| 891 |
+
});
|
| 892 |
+
|
| 893 |
+
socket.on('leave-chat', (data) => {
|
| 894 |
+
const { userId } = data;
|
| 895 |
+
if (userId) {
|
| 896 |
+
socket.leave(`chat-${userId}`);
|
| 897 |
+
log('info', 'User left chat room', {
|
| 898 |
+
socketId: socket.id,
|
| 899 |
+
userId: userId
|
| 900 |
+
});
|
| 901 |
+
}
|
| 902 |
+
});
|
| 903 |
+
|
| 904 |
+
socket.on('disconnect', () => {
|
| 905 |
+
log('info', 'Client disconnected from server logs', {
|
| 906 |
+
socketId: socket.id,
|
| 907 |
+
totalConnections: io.engine.clientsCount
|
| 908 |
+
});
|
| 909 |
+
});
|
| 910 |
+
|
| 911 |
+
socket.on('request-logs', () => {
|
| 912 |
+
log('info', 'Client requested historical logs', { socketId: socket.id });
|
| 913 |
+
// Send last 100 logs
|
| 914 |
+
const recentLogs = serverLogs.slice(0, 100);
|
| 915 |
+
socket.emit('historical-logs', recentLogs);
|
| 916 |
+
});
|
| 917 |
+
});
|
| 918 |
+
|
| 919 |
+
// Error handling
|
| 920 |
+
process.on('uncaughtException', (error) => {
|
| 921 |
+
log('error', 'Uncaught Exception', {
|
| 922 |
+
error: error.message,
|
| 923 |
+
stack: error.stack
|
| 924 |
+
});
|
| 925 |
+
});
|
| 926 |
+
|
| 927 |
+
process.on('unhandledRejection', (reason, promise) => {
|
| 928 |
+
log('error', 'Unhandled Rejection', {
|
| 929 |
+
reason: reason,
|
| 930 |
+
promise: promise
|
| 931 |
+
});
|
| 932 |
+
});
|
| 933 |
+
|
| 934 |
+
// Periodic system logs
|
| 935 |
+
setInterval(() => {
|
| 936 |
+
const memoryUsage = process.memoryUsage();
|
| 937 |
+
log('info', 'System status', {
|
| 938 |
+
memory: {
|
| 939 |
+
rss: Math.round(memoryUsage.rss / 1024 / 1024) + 'MB',
|
| 940 |
+
heapUsed: Math.round(memoryUsage.heapUsed / 1024 / 1024) + 'MB',
|
| 941 |
+
heapTotal: Math.round(memoryUsage.heapTotal / 1024 / 1024) + 'MB'
|
| 942 |
+
},
|
| 943 |
+
uptime: Math.round(process.uptime()) + 's',
|
| 944 |
+
connections: io.engine.clientsCount,
|
| 945 |
+
cacheSize: messageCache.size
|
| 946 |
+
});
|
| 947 |
+
}, 30000); // Every 30 seconds
|
| 948 |
+
|
| 949 |
+
// Periodic cache cleanup
|
| 950 |
+
setInterval(() => {
|
| 951 |
+
const now = Date.now();
|
| 952 |
+
let cleanedCount = 0;
|
| 953 |
+
|
| 954 |
+
for (const [userId, cacheData] of messageCache.entries()) {
|
| 955 |
+
if (now - cacheData.lastUpdated > CACHE_TTL) {
|
| 956 |
+
messageCache.delete(userId);
|
| 957 |
+
cleanedCount++;
|
| 958 |
+
}
|
| 959 |
+
}
|
| 960 |
+
|
| 961 |
+
if (cleanedCount > 0) {
|
| 962 |
+
log('info', 'Cache cleanup completed', {
|
| 963 |
+
cleanedCount: cleanedCount,
|
| 964 |
+
remainingCacheSize: messageCache.size
|
| 965 |
+
});
|
| 966 |
+
}
|
| 967 |
+
}, 60000); // Every minute
|
| 968 |
+
|
| 969 |
+
module.exports = app;
|