сгенерируй svg и вставь их в код. верни полностью исправленный код

from PyQt5.QtWidgets import (
    QWidget, QLabel, QPushButton, QVBoxLayout, QHBoxLayout,
    QLineEdit, QCheckBox, QSpinBox, QTabWidget,
    QApplication, QComboBox, QStyleFactory
)
from PyQt5.QtGui import QPalette, QColor, QFont, QIcon, QPixmap
from PyQt5.QtCore import Qt, QTimer
from password_manager import PasswordManager
from password_generator import PasswordGenerator
from password_checker import PasswordChecker
import sys

class MainWindow(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowTitle('Менеджер паролей')
        self.setGeometry(100, 100, 800, 450)
        self.password_manager = PasswordManager()
        self.init_ui()

    def init_ui(self):
        # Добавляем выбор темы
        theme_layout = QHBoxLayout()
        theme_label = QLabel('Выбор темы:')
        self.theme_combo = QComboBox()
        self.theme_combo.addItems(['Светлая', 'Тёмная', 'Чёрная'])
        self.theme_combo.currentIndexChanged.connect(self.change_theme)
        theme_layout.addWidget(theme_label)
        theme_layout.addWidget(self.theme_combo)
        theme_layout.addStretch()

        self.tabs = QTabWidget()
        self.tabs.addTab(self.generate_tab(), QIcon('icons/generate.svg'), '')
        self.tabs.addTab(self.manage_tab(), QIcon('icons/manage.svg'), '')
        self.tabs.addTab(self.check_tab(), QIcon('icons/check.svg'), '')
        self.tabs.setTabPosition(QTabWidget.West)

        main_layout = QVBoxLayout()
        main_layout.addLayout(theme_layout)
        main_layout.addWidget(self.tabs)
        self.setLayout(main_layout)

        # Устанавливаем начальную тему
        self.change_theme(0)

    def change_theme(self, index):
        palette = QPalette()
        if index == 0:  # Светлая тема
            QApplication.setStyle(QStyleFactory.create('Fusion'))
            palette.setColor(QPalette.Window, QColor(255, 255, 255))
            palette.setColor(QPalette.WindowText, QColor(33, 33, 33))
            palette.setColor(QPalette.Base, QColor(240, 240, 240))
            palette.setColor(QPalette.AlternateBase, QColor(220, 220, 220))
            palette.setColor(QPalette.ToolTipBase, QColor(250, 250, 250))
            palette.setColor(QPalette.ToolTipText, QColor(33, 33, 33))
            palette.setColor(QPalette.Text, QColor(33, 33, 33))
            palette.setColor(QPalette.Button, QColor(240, 240, 240))
            palette.setColor(QPalette.ButtonText, QColor(33, 33, 33))
            palette.setColor(QPalette.BrightText, Qt.red)
            palette.setColor(QPalette.Highlight, QColor(76, 175, 80))
            palette.setColor(QPalette.HighlightedText, Qt.white)
        elif index == 1:  # Тёмная тема
            QApplication.setStyle(QStyleFactory.create('Fusion'))
            palette.setColor(QPalette.Window, QColor(45, 45, 45))
            palette.setColor(QPalette.WindowText, Qt.white)
            palette.setColor(QPalette.Base, QColor(33, 33, 33))
            palette.setColor(QPalette.AlternateBase, QColor(66, 66, 66))
            palette.setColor(QPalette.ToolTipBase, QColor(250, 250, 250))
            palette.setColor(QPalette.ToolTipText, Qt.white)
            palette.setColor(QPalette.Text, Qt.white)
            palette.setColor(QPalette.Button, QColor(55, 55, 55))
            palette.setColor(QPalette.ButtonText, Qt.white)
            palette.setColor(QPalette.BrightText, Qt.red)
            palette.setColor(QPalette.Highlight, QColor(76, 175, 80))
            palette.setColor(QPalette.HighlightedText, Qt.black)
        elif index == 2:  # Чёрная тема
            QApplication.setStyle(QStyleFactory.create('Fusion'))
            palette.setColor(QPalette.Window, QColor(0, 0, 0))
            palette.setColor(QPalette.WindowText, Qt.white)
            palette.setColor(QPalette.Base, QColor(20, 20, 20))
            palette.setColor(QPalette.AlternateBase, QColor(50, 50, 50))
            palette.setColor(QPalette.ToolTipBase, Qt.white)
            palette.setColor(QPalette.ToolTipText, Qt.white)
            palette.setColor(QPalette.Text, Qt.white)
            palette.setColor(QPalette.Button, QColor(30, 30, 30))
            palette.setColor(QPalette.ButtonText, Qt.white)
            palette.setColor(QPalette.BrightText, Qt.red)
            palette.setColor(QPalette.Highlight, QColor(76, 175, 80))
            palette.setColor(QPalette.HighlightedText, Qt.black)
        QApplication.setPalette(palette)

        # Дополнительные стили для привлекательности
        self.setStyleSheet("""
            QWidget {
                font-family: 'Segoe UI', sans-serif;
                font-size: 14px;
                color: #333;
            }
            QLabel {
                font-size: 14px;
            }
            QPushButton {
                background-color: #4CAF50;
                color: white;
                border: none;
                padding: 10px;
                border-radius: 5px;
            }
            QPushButton:hover {
                background-color: #45a049;
            }
            QLineEdit {
                padding: 10px;
                border: 1px solid #ccc;
                border-radius: 5px;
            }
            QLineEdit[readOnly="true"] {
                background-color: #f5f5f5;
            }
            QCheckBox {
                padding: 5px;
            }
            QComboBox, QSpinBox {
                padding: 5px;
                border-radius: 5px;
            }
            QTabWidget::pane {
                border: none;
            }
            QTabBar::tab {
                background: transparent;
                color: #555;
                padding: 15px;
                margin: 5px;
            }
            QTabBar::tab:selected {
                background: #4CAF50;
                color: white;
                border-radius: 10px;
            }
        """)

    def generate_tab(self):
        tab = QWidget()
        layout = QVBoxLayout()

        length_layout = QHBoxLayout()
        length_label = QLabel('Длина пароля:')
        self.length_spin = QSpinBox()
        self.length_spin.setRange(6, 128)
        self.length_spin.setValue(12)
        length_layout.addWidget(length_label)
        length_layout.addWidget(self.length_spin)
        length_layout.addStretch()

        options_layout = QHBoxLayout()
        self.uppercase_cb = QCheckBox('Верхний регистр')
        self.lowercase_cb = QCheckBox('Нижний регистр')
        self.digits_cb = QCheckBox('Цифры')
        self.symbols_cb = QCheckBox('Символы')
        self.exclude_ambiguous_cb = QCheckBox('Без неоднозначных')
        self.uppercase_cb.setChecked(True)
        self.lowercase_cb.setChecked(True)
        self.digits_cb.setChecked(True)
        self.symbols_cb.setChecked(True)
        options_layout.addWidget(self.uppercase_cb)
        options_layout.addWidget(self.lowercase_cb)
        options_layout.addWidget(self.digits_cb)
        options_layout.addWidget(self.symbols_cb)
        options_layout.addWidget(self.exclude_ambiguous_cb)

        self.password_display = QLineEdit()
        self.password_display.setEchoMode(QLineEdit.Password)
        self.password_display.setReadOnly(True)
        self.password_display.installEventFilter(self)

        generate_btn = QPushButton(QIcon('icons/generate.svg'), ' Сгенерировать')
        generate_btn.clicked.connect(self.generate_password)
        copy_btn = QPushButton(QIcon('icons/copy.svg'), ' Скопировать')
        copy_btn.clicked.connect(self.copy_password)

        btn_layout = QHBoxLayout()
        btn_layout.addWidget(generate_btn)
        btn_layout.addWidget(copy_btn)
        btn_layout.addStretch()

        layout.addLayout(length_layout)
        layout.addLayout(options_layout)
        layout.addWidget(self.password_display)
        layout.addLayout(btn_layout)
        layout.addStretch()
        tab.setLayout(layout)
        return tab

    def generate_password(self):
        generator = PasswordGenerator()
        length = self.length_spin.value()
        options = {
            'uppercase': self.uppercase_cb.isChecked(),
            'lowercase': self.lowercase_cb.isChecked(),
            'digits': self.digits_cb.isChecked(),
            'symbols': self.symbols_cb.isChecked(),
            'exclude_ambiguous': self.exclude_ambiguous_cb.isChecked()
        }
        password = generator.generate(length, **options)
        self.password_display.setText(password)

    def copy_password(self):
        password = self.password_display.text()
        if password:
            clipboard = QApplication.clipboard()
            clipboard.setText(password)
            QTimer.singleShot(5000, lambda: clipboard.clear())

    def manage_tab(self):
        tab = QWidget()
        layout = QVBoxLayout()
        icon_label = QLabel()
        icon_label.setPixmap(QPixmap('icons/coming_soon.svg').scaled(200, 200, Qt.KeepAspectRatio))
        info_label = QLabel('Управление паролями будет доступно в будущих версиях.')
        info_label.setAlignment(Qt.AlignCenter)
        layout.addStretch()
        layout.addWidget(icon_label, alignment=Qt.AlignCenter)
        layout.addWidget(info_label)
        layout.addStretch()
        tab.setLayout(layout)
        return tab

    def check_tab(self):
        tab = QWidget()
        layout = QVBoxLayout()
        self.check_input = QLineEdit()
        self.check_input.setEchoMode(QLineEdit.Password)
        self.check_input.installEventFilter(self)
        check_btn = QPushButton(QIcon('icons/check.svg'), ' Проверить пароль')
        check_btn.clicked.connect(self.check_password)

        self.check_result = QLabel('')
        copy_btn = QPushButton(QIcon('icons/copy.svg'), ' Скопировать')
        copy_btn.clicked.connect(self.copy_checked_password)

        layout.addWidget(self.check_input)
        layout.addWidget(check_btn)
        layout.addWidget(self.check_result)
        layout.addWidget(copy_btn)
        layout.addStretch()
        tab.setLayout(layout)
        return tab

    def check_password(self):
        password = self.check_input.text()
        if password:
            checker = PasswordChecker()
            strength = checker.check_strength(password)
            leaked = checker.check_leak_async(password)
            self.check_result.setText(f'Надежность: {strength}\nУтечки: {"Найдены" if leaked else "Не обнаружены"}')

    def copy_checked_password(self):
        password = self.check_input.text()
        if password:
            clipboard = QApplication.clipboard()
            clipboard.setText(password)
            QTimer.singleShot(5000, lambda: clipboard.clear())

    def eventFilter(self, source, event):
        if event.type() == event.Enter and isinstance(source, QLineEdit):
            source.setEchoMode(QLineEdit.Normal)
        elif event.type() == event.Leave and isinstance(source, QLineEdit):
            source.setEchoMode(QLineEdit.Password)
        return super().eventFilter(source, event)