2025-10-15 01:46:54 -04:00
|
|
|
// Bootstrap that loads modules using dynamic ESM imports.
|
|
|
|
|
// This approach is CSP-compliant and doesn't use eval().
|
2025-09-08 16:04:58 -04:00
|
|
|
(async () => {
|
|
|
|
|
try {
|
|
|
|
|
const timestamp = Date.now();
|
2025-10-15 19:58:28 -04:00
|
|
|
const [cryptoModule, webrtcModule, fileTransferModule, notificationModule, notificationTestModule, notificationGestureTestModule] = await Promise.all([
|
2025-09-08 16:04:58 -04:00
|
|
|
import(`../crypto/EnhancedSecureCryptoUtils.js?v=${timestamp}`),
|
|
|
|
|
import(`../network/EnhancedSecureWebRTCManager.js?v=${timestamp}`),
|
|
|
|
|
import(`../transfer/EnhancedSecureFileTransfer.js?v=${timestamp}`),
|
2025-10-15 19:58:28 -04:00
|
|
|
import(`../notifications/NotificationIntegration.js?v=${timestamp}`),
|
|
|
|
|
import(`../notifications/NotificationTest.js?v=${timestamp}`),
|
|
|
|
|
import(`../notifications/NotificationGestureTest.js?v=${timestamp}`),
|
2025-09-08 16:04:58 -04:00
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const { EnhancedSecureCryptoUtils } = cryptoModule;
|
|
|
|
|
window.EnhancedSecureCryptoUtils = EnhancedSecureCryptoUtils;
|
|
|
|
|
const { EnhancedSecureWebRTCManager } = webrtcModule;
|
|
|
|
|
window.EnhancedSecureWebRTCManager = EnhancedSecureWebRTCManager;
|
|
|
|
|
const { EnhancedSecureFileTransfer } = fileTransferModule;
|
|
|
|
|
window.EnhancedSecureFileTransfer = EnhancedSecureFileTransfer;
|
2025-10-15 19:58:28 -04:00
|
|
|
const { NotificationIntegration } = notificationModule;
|
|
|
|
|
window.NotificationIntegration = NotificationIntegration;
|
|
|
|
|
const { NotificationTest } = notificationTestModule;
|
|
|
|
|
window.NotificationTest = NotificationTest;
|
|
|
|
|
const { NotificationGestureTest } = notificationGestureTestModule;
|
|
|
|
|
window.NotificationGestureTest = NotificationGestureTest;
|
2025-09-08 16:04:58 -04:00
|
|
|
|
2025-10-15 01:46:54 -04:00
|
|
|
// Load React components using dynamic imports instead of eval
|
|
|
|
|
const componentModules = await Promise.all([
|
|
|
|
|
import(`../components/ui/Header.jsx?v=${timestamp}`),
|
|
|
|
|
import(`../components/ui/DownloadApps.jsx?v=${timestamp}`),
|
|
|
|
|
import(`../components/ui/ComparisonTable.jsx?v=${timestamp}`),
|
|
|
|
|
import(`../components/ui/UniqueFeatureSlider.jsx?v=${timestamp}`),
|
|
|
|
|
import(`../components/ui/SecurityFeatures.jsx?v=${timestamp}`),
|
|
|
|
|
import(`../components/ui/Testimonials.jsx?v=${timestamp}`),
|
|
|
|
|
import(`../components/ui/Roadmap.jsx?v=${timestamp}`),
|
|
|
|
|
import(`../components/ui/FileTransfer.jsx?v=${timestamp}`),
|
2025-09-08 16:04:58 -04:00
|
|
|
]);
|
|
|
|
|
|
2025-10-15 01:46:54 -04:00
|
|
|
// Components are automatically registered on window by their respective modules
|
|
|
|
|
console.log('✅ All React components loaded successfully');
|
|
|
|
|
|
2025-09-08 16:04:58 -04:00
|
|
|
if (typeof window.initializeApp === 'function') {
|
|
|
|
|
window.initializeApp();
|
|
|
|
|
} else {
|
|
|
|
|
console.error('❌ Function initializeApp not found');
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('❌ Module loading error:', error);
|
|
|
|
|
}
|
|
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
|