diff --git a/VERSION b/VERSION
index 0be87394..0d9c652f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.7.40
\ No newline at end of file
+0.7.42
\ No newline at end of file
diff --git a/asset-manifest.json b/asset-manifest.json
index 1c949f8d..1de1016b 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,9 +1,9 @@
{
"files": {
"main.css": "/static/css/main.34b80300.css",
- "main.js": "/static/js/main.1974bec6.js",
+ "main.js": "/static/js/main.472f47e8.js",
"widget.css": "/static/css/widget.d13f8dd3.css",
- "widget.js": "/static/js/widget.dfee4b58.js",
+ "widget.js": "/static/js/widget.6e4d9fa3.js",
"static/js/626.ad7496d5.chunk.js": "/static/js/626.ad7496d5.chunk.js",
"static/js/318.d24e5430.chunk.js": "/static/js/318.d24e5430.chunk.js",
"static/js/579.5e44a553.chunk.js": "/static/js/579.5e44a553.chunk.js",
@@ -17,11 +17,11 @@
"static/js/814.0de69a67.chunk.js": "/static/js/814.0de69a67.chunk.js",
"static/js/966.97699b5a.chunk.js": "/static/js/966.97699b5a.chunk.js",
"static/css/280.cdf1fe26.chunk.css": "/static/css/280.cdf1fe26.chunk.css",
- "static/js/280.8a0e5cea.chunk.js": "/static/js/280.8a0e5cea.chunk.js",
+ "static/js/280.73b885c8.chunk.js": "/static/js/280.73b885c8.chunk.js",
"static/js/158.6513a305.chunk.js": "/static/js/158.6513a305.chunk.js",
"static/js/88.90a67d64.chunk.js": "/static/js/88.90a67d64.chunk.js",
"static/js/243.2faf5ff2.chunk.js": "/static/js/243.2faf5ff2.chunk.js",
- "static/js/55.dbdffafe.chunk.js": "/static/js/55.dbdffafe.chunk.js",
+ "static/js/55.ef0dc87b.chunk.js": "/static/js/55.ef0dc87b.chunk.js",
"static/js/374.dd54b63f.chunk.js": "/static/js/374.dd54b63f.chunk.js",
"static/js/489.c9435ae8.chunk.js": "/static/js/489.c9435ae8.chunk.js",
"static/js/659.47e45a1d.chunk.js": "/static/js/659.47e45a1d.chunk.js",
@@ -60,6 +60,6 @@
},
"entrypoints": [
"static/css/main.34b80300.css",
- "static/js/main.1974bec6.js"
+ "static/js/main.472f47e8.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index 4f6ee652..7c919322 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
VoceChat WebAPP
\ No newline at end of file
+VoceChat WebAPP
\ No newline at end of file
diff --git a/locales/en/setting.json b/locales/en/setting.json
index cc9dba5e..78c46365 100644
--- a/locales/en/setting.json
+++ b/locales/en/setting.json
@@ -91,6 +91,7 @@
"zh": "中文",
"jp": "日本語",
"pt": "Portuguese",
+ "fr": "Français",
"es": "Español"
},
"theme": {
diff --git a/locales/es/setting.json b/locales/es/setting.json
index 893a3e4a..d21a758f 100644
--- a/locales/es/setting.json
+++ b/locales/es/setting.json
@@ -65,13 +65,7 @@
},
"lang": {
"title": "Idiomas",
- "desc": "Establecer el idioma del sistema",
- "en": "Inglés",
- "es": "Español",
- "tr": "Turco",
- "zh": "Chino",
- "jp": "Japonés",
- "pt": "Portugués"
+ "desc": "Establecer el idioma del sistema"
},
"theme": {
"title": "Tema",
diff --git a/locales/fr/auth.json b/locales/fr/auth.json
new file mode 100644
index 00000000..e5146eee
--- /dev/null
+++ b/locales/fr/auth.json
@@ -0,0 +1,74 @@
+{
+ "login": {
+ "title": "Connexion à {{name}}",
+ "google": "Se connecter avec Google",
+ "github": "Se connecter avec GitHub",
+ "metamask": "Se connecter avec MetaMask",
+ "password": "Se connecter avec Mot de Passe",
+ "oidc": "Se connecter avec OIDC",
+ "no_account": "Vous n'avez pas de compte ?"
+ },
+ "reg": {
+ "title": "Inscription à {{name}}",
+ "google": "S'inscrire avec Google",
+ "github": "S'inscrire avec GitHub",
+ "metamask": "S'inscrire avec MetaMask",
+ "oidc": "S'inscrire avec OIDC",
+ "have_account": "Vous avez un compte ?",
+ "input_name": "Quel est votre nom",
+ "input_name_tip": "Entrez un nom ou un pseudo pour que les gens sachent comment vous souhaitez être appelé. Votre nom ne sera visible que dans les espaces que vous avez rejoints."
+ },
+ "logout": {
+ "title": "Déconnexion",
+ "desc": "Êtes-vous sûr de vouloir vous déconnecter de ce compte ?",
+ "clear_local": "Effacer les données locales",
+ "role_changed": "Votre rôle a changé, voulez-vous vous reconnecter pour que cela prenne effet ?",
+ "later": "Peut-être plus tard"
+ },
+ "continue": "Continuer avec Email",
+ "placeholder_name": "Entrez votre Nom",
+ "placeholder_email": "Entrez votre Email",
+ "placeholder_pwd": "Entrez le Mot de Passe",
+ "placeholder_confirm_pwd": "Confirmez le Mot de Passe",
+ "check_email": "Vérifiez votre boîte de réception",
+ "check_email_desc": "Nous venons d'envoyer un lien magique à <0>{{email}}0>. Une fois qu'il arrive, il sera valide pendant 15 minutes.",
+ "back_sign_in": "Retour à la connexion",
+ "welcome": "Bienvenue sur le serveur {{name}}",
+ "guest_login_tip": "Veuillez scanner le code QR ou vous connecter pour envoyer un message",
+ "enter": "Se connecter à ",
+ "sign_in": "Se Connecter",
+ "sign_up": "S'inscrire",
+ "signing_up": "Inscription en cours",
+ "github_login_success": "Connexion GitHub réussie !",
+ "github_logging_in": "Connexion GitHub en cours...",
+ "github_cb_tip": "Veuillez fermer cette fenêtre et revenir à la fenêtre du widget",
+ "magic_link_expire": {
+ "title": "Lien magique invalide ou expiré",
+ "desc": "Veuillez demander un nouveau lien magique.",
+ "desc_close": "Vous pouvez fermer cette fenêtre maintenant."
+ },
+ "invite_mobile": {
+ "join": "Rejoignez notre Serveur",
+ "start_download": "Commencez par télécharger l'application mobile VoceChat",
+ "open": "Ouvrir VoceChat",
+ "have_already": "Vous avez déjà l'application ?"
+ },
+ "invite_expire": {
+ "min30": "30 minutes",
+ "h1": "1 heure",
+ "h6": "6 heures",
+ "h12": "12 heures",
+ "d1": "1 jour",
+ "d7": "7 jours",
+ "d30": "30 jours"
+ },
+ "invite_times": {
+ "no_limit": "sans limite",
+ "time1": "1 utilisation",
+ "times5": "5 utilisations",
+ "times10": "10 utilisations",
+ "times25": "25 utilisations",
+ "times50": "50 utilisations",
+ "times100": "100 utilisations"
+ }
+}
\ No newline at end of file
diff --git a/locales/fr/chat.json b/locales/fr/chat.json
new file mode 100644
index 00000000..62cdf7bc
--- /dev/null
+++ b/locales/fr/chat.json
@@ -0,0 +1,67 @@
+{
+ "pin": "Épingler",
+ "pin_desc": "Voulez-vous épingler ce message à",
+ "pinned_msg": "Message Épinglé",
+ "pin_empty_tip": "Ce canal n'a pas encore de message épinglé.",
+ "fav": "Favori",
+ "fav_msg": "Message Enregistré",
+ "fav_empty_tip": "Ce canal n'a pas encore de message enregistré.",
+ "channel_members": "Membres du Canal",
+ "add_channel_members": "Ajouter des membres",
+ "welcome_channel": "Bienvenue dans {{name}}",
+ "welcome_desc": "Ceci est le début du canal #{{name}}.",
+ "edit_channel": "Modifier le Canal",
+
+ "channel_name": "Nom du Canal",
+ "private_channel": "Canal Privé",
+ "create_channel": "Créer un Nouveau Canal",
+ "create_channel_desc": "Ceci est un canal public, tout le monde dans cette équipe peut le voir.",
+ "create_private_channel_desc": "Ceci est un canal privé, seuls certains membres pourront y accéder.",
+ "search_user_placeholder": "Tapez un Nom d'utilisateur pour chercher",
+ "welcome_msg": "Bienvenue dans le canal {{name}}",
+
+ "invite_title": "Ajouter des amis à {{name}}",
+ "invite_by_email": "Inviter par Email",
+ "enable_smtp": "Activez SMTP d'abord",
+ "send_invite_link": "Ou envoyez le lien d'invitation à vos amis",
+ "share_invite_link": "Partagez ce lien pour inviter des personnes à ce serveur.",
+ "invite_link_faq": "Lien d'invitation incorrect ?",
+ "invite_link_edit": "Modifier le lien d'invitation",
+ "invite_link_setting_tip": "Le lien d'invitation expire dans {{expire}}, max de fois d'utilisation : {{times}}",
+ "generate_new_link": "Générer un Nouveau Lien",
+
+ "send_to": "Envoyer À",
+ "edited": "modifié",
+ "license_tip": "Votre licence a atteint sa limite, veuillez mettre à niveau la Licence ou contacter l'Administrateur !",
+
+ "delete_msg_title": "Supprimer le Message",
+ "delete_msg_desc": "Êtes-vous sûr de vouloir supprimer {{msg}} ?",
+ "delete_msg_this": "ce message",
+ "delete_msg_these": "ces messages",
+
+ "new_msg": "{{num}} nouveaux messages",
+ "mark_read": "Marquer comme Lu",
+ "pin_chat": "Épingler la Conversation",
+ "unpin_chat": "Désépingler",
+
+ "reply_msg_del": "Ce message a été supprimé.",
+
+ "file": "fichier",
+ "image": "image",
+ "forward": "transférer",
+ "voice_message": "message vocal",
+ "voice": "Appel Vocal",
+ "deafen": "Se rendre sourd",
+ "undeafen": "Rendre à nouveau l'ouïe",
+ "mute": "Couper le son",
+ "unmute": "Réactiver le son",
+ "camera_on": "Activer la caméra",
+ "camera_off": "Désactiver la caméra",
+ "leave_voice": "Quitter l'Appel Vocal",
+ "add_contact": "Ajouter aux contacts",
+ "block": "Bloquer",
+ "unblock": "Débloquer",
+ "contact_tip": "Cet utilisateur n'est pas dans vos contacts",
+ "contact_block_tip": "Cet utilisateur a été bloqué par vous",
+ "file_expired": "Fichier Expiré"
+}
\ No newline at end of file
diff --git a/locales/fr/common.json b/locales/fr/common.json
new file mode 100644
index 00000000..8e50c7da
--- /dev/null
+++ b/locales/fr/common.json
@@ -0,0 +1,91 @@
+{
+ "chat": "Chat",
+ "members": "Membres",
+ "favs": "Éléments Enregistrés",
+ "files": "Fichiers",
+ "setting": "Paramètres",
+ "more": "Plus",
+ "action": {
+ "login": "Se Connecter",
+ "re_login": "Déconnexion",
+ "logout": "Se Déconnecter",
+ "change_avatar": "Changer",
+ "cancel": "Annuler",
+ "dismiss": "Rejeter",
+ "search": "Rechercher",
+ "search_user": "Rechercher par nom",
+ "new_channel": "Nouveau Canal",
+ "new_private_channel": "Nouveau Canal Privé",
+ "new_msg": "Nouveau Message",
+ "invite_people": "Inviter des Personnes",
+ "search_people": "Rechercher des Personnes",
+ "create": "Créer",
+ "open": "Ouvrir",
+ "update": "Mettre à Jour",
+ "upload": "Téléverser",
+ "done": "Fait",
+ "add": "Ajouter",
+ "yes": "Oui",
+ "delete_channel": "Supprimer le Canal",
+ "remove": "Retirer",
+ "remove_user": "Retirer l'Utilisateur",
+ "edit": "Modifier",
+ "edit_msg": "Modifier le Message",
+ "add_reaction": "Ajouter une Réaction",
+ "add_to_fav": "Ajouter aux Favoris",
+ "select": "Sélectionner",
+ "forward": "Transférer",
+ "reply": "Répondre",
+ "pin": "Épingler",
+ "unpin": "Désépingler",
+ "send": "Envoyer",
+ "send_msg": "Message",
+ "copy": "Copier",
+ "copy_email": "Copier l'Email",
+ "mute": "Couper le son",
+ "unmute": "Réactiver le son",
+ "mark_read": "Marquer comme Lu",
+ "hide_session": "Masquer la Session",
+ "reload": "Recharger",
+ "install": "Installer",
+ "download_origin": "Télécharger l'original",
+ "close": "Fermer"
+ },
+ "status": {
+ "uploading": "Téléversement"
+ },
+ "tip": {
+ "update": "Mise à Jour Réussie !",
+ "delete": "Suppression Réussie !",
+ "reg": "Inscription Réussie !",
+ "login": "Connexion Réussie !",
+ "logout": "Déconnexion Réussie !",
+ "pin": "Message Épinglé avec Succès !",
+ "pwa_install_title": "Installer l'application web sur le bureau ?",
+ "pwa_install_desc": "Ajoutez au bureau pour un accès rapide à cette application."
+ },
+ "new_version": "<0>Nouvelle Version0> Disponible",
+ "mobile_app": "Découvrez notre <0>Application Mobile0>",
+ "price": {
+ "pro": {
+ "title": "VoceChat Pro",
+ "desc": "",
+ "price": "$49"
+ },
+ "supreme": {
+ "title": "Personnalisation et Intégration de VoceChat SDK",
+ "desc": "",
+ "price": ""
+ }
+ },
+ "server_update": {
+ "version_needed": "Cette fonction nécessite la version serveur :<0>{{version}}0> au minimum 🚨",
+ "current_version": "Votre version actuelle :<0>{{version}}0>",
+ "update_tip": "Veuillez mettre à niveau le Serveur !",
+ "howto": "Comment Mettre à Jour le Serveur VoceChat"
+ },
+ "inactive": {
+ "title": "Un seul onglet actif est autorisé pour VoceChat",
+ "desc": "Veuillez recharger cette page pour continuer à utiliser cet onglet ou le fermer"
+ }
+}
\ No newline at end of file
diff --git a/locales/fr/fav.json b/locales/fr/fav.json
new file mode 100644
index 00000000..d5982b3a
--- /dev/null
+++ b/locales/fr/fav.json
@@ -0,0 +1,6 @@
+{
+ "all_items": "Tous les Éléments",
+ "image": "Images",
+ "video": "Vidéos",
+ "audio": "Audio"
+}
\ No newline at end of file
diff --git a/locales/fr/file.json b/locales/fr/file.json
new file mode 100644
index 00000000..b2c1f643
--- /dev/null
+++ b/locales/fr/file.json
@@ -0,0 +1,6 @@
+{
+ "from": "De",
+ "channel": "Canal",
+ "type": "Type",
+ "date": "Date"
+}
\ No newline at end of file
diff --git a/locales/fr/member.json b/locales/fr/member.json
new file mode 100644
index 00000000..18758623
--- /dev/null
+++ b/locales/fr/member.json
@@ -0,0 +1,39 @@
+{
+ "username": "Nom d'utilisateur",
+ "email": "Email",
+ "password": "Mot de Passe",
+ "delete_account": "Supprimer le Compte",
+ "change_name": "Changer votre nom d'utilisateur",
+ "change_name_desc": "Entrez un nouveau nom d'utilisateur",
+ "change_email": "Changer votre email",
+ "change_email_desc": "Entrez un nouvel email.",
+ "change_pwd": "Changer votre mot de passe",
+ "change_pwd_desc": "Entrez le mot de passe actuel et le nouveau mot de passe",
+ "current_pwd": "Mot de Passe Actuel",
+ "new_pwd": "Nouveau Mot de Passe",
+ "confirm_new_pwd": "Confirmer le Nouveau Mot de Passe",
+
+ "manage_members": "Gérer les Contacts",
+ "manage_tip": "Désactiver votre compte signifie que vous pouvez le récupérer à tout moment après avoir pris cette action.",
+ "admin": "Administrateur",
+ "user": "Utilisateur",
+ "copy_email": "Copier l'email",
+ "send_msg": "Envoyer un message",
+ "call": "Appeler",
+ "remove": "Retirer du serveur",
+ "remove_from_contact": "Retirer des contacts",
+ "remove_account": "Retirer le compte",
+ "remove_account_desc": "Êtes-vous sûr de vouloir retirer ce compte ?",
+ "remove_from_channel": "Retirer du canal",
+ "roles": "Rôles",
+ "set_admin": "Administrateur",
+ "set_normal": "Utilisateur",
+
+ "search_not_found": "Non trouvé, ou cet utilisateur n'est pas autorisé à être recherché.",
+ "search_by_id": "Rechercher par ID",
+ "search_by_id_ph": "Saisir l'ID de l'utilisateur",
+ "search_by_email": "Rechercher par email",
+ "search_by_email_ph": "Saisir l'email de l'utilisateur",
+ "search_by_name": "Rechercher par nom",
+ "search_by_name_ph": "Saisir le nom de l'utilisateur"
+}
\ No newline at end of file
diff --git a/locales/fr/setting.json b/locales/fr/setting.json
new file mode 100644
index 00000000..5ff1a51a
--- /dev/null
+++ b/locales/fr/setting.json
@@ -0,0 +1,282 @@
+{
+ "title": "Paramètres",
+ "save_change": "Sauvegarder les Modifications",
+ "reset": "Réinitialiser",
+ "save_tip": "Vous avez des modifications non enregistrées !",
+ "nav": {
+ "general": "Général",
+ "overview": "Aperçu",
+ "members": "Membres",
+ "data_management": "Gestion des Données",
+ "auto_delete_msg": "Auto-suppression des Messages",
+ "user": "Utilisateur",
+ "my_account": "Mon Compte",
+ "config": "Configuration",
+ "bot": "Bot & Webhook",
+ "firebase": "Firebase",
+ "agora": "Agora",
+ "smtp": "SMTP",
+ "login_method": "Méthodes de Connexion",
+ "third_app": "Connexion Tiers",
+ "widget": "Widget",
+ "license": "Licence",
+ "about": "À Propos",
+ "api_doc": "Documentation API",
+ "version": "Version"
+ },
+ "channel": {
+ "leave": "Quitter le Canal",
+ "leave_desc": "Êtes-vous sûr de vouloir quitter ce canal ?",
+ "transfer_desc": "Vous devez transférer la propriété de votre canal à quelqu'un d'autre avant de quitter le canal.",
+ "delete": "Supprimer le Canal",
+ "delete_desc": "Êtes-vous sûr de vouloir supprimer ce canal ?",
+ "id": "ID du Canal",
+ "name": "Nom du Canal",
+ "topic": "Sujet du Canal",
+ "topic_placeholder": "Faites savoir à tout le monde comment utiliser ce canal.",
+ "visibility": "Visibilité du Canal",
+ "public": "Public",
+ "private": "Privé"
+ },
+ "dm": {
+ "delete": "Supprimer l'Utilisateur",
+ "delete_desc": "Êtes-vous sûr de vouloir supprimer cet utilisateur ?"
+ },
+ "overview": {
+ "title_feat": "Fonctionnalités",
+ "name": "Nom du Serveur",
+ "desc": "Description du Serveur",
+ "upload_desc": "La taille minimale est de 128x128, nous recommandons au moins 512x512 pour le serveur. Taille maximale limitée à 5 Mo.",
+ "sign_up": {
+ "title": "Inscription par Défaut",
+ "desc": "Qui peut s'inscrire sur ce serveur.",
+ "everyone": "Tout le monde",
+ "invite": "Lien d'Invitation Seulement"
+ },
+ "guest_mode": {
+ "title": "Mode Invité",
+ "desc": "S'il est activé, les visiteurs verront les canaux publics sur ce serveur.",
+ "enable": "Activer",
+ "disable": "Désactivé"
+ },
+ "url": {
+ "title": "Mettre à Jour l'URL de Frontend",
+ "desc": "Mettre à jour l'URL de frontend"
+ },
+ "lang": {
+ "title": "Langues",
+ "desc": "Définir la langue du système"
+ },
+ "theme": {
+ "title": "Thème",
+ "desc": "Choisissez votre thème",
+ "auto": "Automatique",
+ "dark": "Sombre",
+ "light": "Clair"
+ },
+ "message_sound": {
+ "title": "Son des Messages",
+ "desc": "Jouez un son lors de la réception d'un nouveau message.",
+ "enable": "Activer",
+ "disable": "Désactiver"
+ },
+ "online_status": {
+ "title": "Statut En Ligne",
+ "desc": "S'il est activé, les membres verront le statut en ligne/hors ligne des autres.",
+ "enable": "Activer",
+ "disable": "Désactiver"
+ },
+ "chat_layout": {
+ "title": "Mise en Page du Chat",
+ "desc": "Quel côté pour afficher les messages envoyés par vous-même",
+ "left": "Gauche",
+ "self_right": "Droite"
+ },
+ "contact_verify": {
+ "title": "Vérification des Contacts",
+ "desc": "Par défaut, tous les membres du serveur peuvent se voir. Si vous souhaitez que les membres du serveur ajoutent et gèrent leurs propres contacts, veuillez activer la fonctionnalité de contact (l'administrateur sera dans la liste des contacts par défaut).",
+ "enable": "Activer",
+ "disable": "Désactiver"
+ }
+ },
+ "data": {
+ "clear_files": {
+ "title": "Fichiers et Données d'Images",
+ "desc": "Cliquez sur le bouton ci-dessous pour supprimer toutes les données de fichiers et d'images de ce serveur.",
+ "btn": "Effacer les Données de Fichiers"
+ },
+ "clear_msgs": {
+ "title": "Toutes les Données de Messages",
+ "desc": "Cliquez sur le bouton ci-dessous pour supprimer toutes les données de chat, y compris les textes et les fichiers de ce serveur.",
+ "btn": "Effacer les Données de Chats"
+ },
+ "auto_delete_file": {
+ "title": "Auto-suppression des Données de Fichiers",
+ "desc": "Définir le temps d'expiration pour toutes les données de fichiers de ce serveur.",
+ "confirm_desc": "Tous les fichiers plus anciens que le temps défini seront supprimés.",
+ "off": "Désactivé",
+ "day1": "1 Jour",
+ "day7": "7 Jours",
+ "day30": "30 Jours",
+ "day90": "90 Jours",
+ "day180": "180 Jours"
+ }
+ },
+ "license": {
+ "signed": "Signé",
+ "domain": "Domaines",
+ "user_limit": "Limite d'Utilisateur",
+ "expire": "Expiré À",
+ "create": "Créé À",
+ "value": "Valeur de la Licence",
+ "renew": "Renouveler la Licence",
+ "update": "Mettre à Jour Manuellement",
+ "update_placeholder": "Veuillez saisir la nouvelle valeur de la licence",
+ "renew_select": "Veuillez sélectionner le prix",
+ "tip": {
+ "title": "Une chance d'obtenir une mise à niveau de licence gratuite !",
+ "user_test": "Obtenez une mise à niveau de licence gratuite grâce à un test utilisateur de 25 minutes",
+ "contact": "Réservez un créneau ici : "
+ },
+ "payment_success": "Paiement Réussi !",
+ "back_home": "Retour à l'Accueil",
+ "tip_renewing": "Renouvellement de la Licence, ne fermez pas la fenêtre !",
+ "tip_renewed": "Licence Renouvelée avec Succès !",
+ "tip_renew_error": "ID de Session Stripe Invalidé",
+ "tip_domain": "La licence est liée au domaine (sans port), veuillez confirmer ou mettre à jour vos paramètres :",
+ "tip_port": "Remplissez votre nom de domaine sans port.",
+ "tip_confirm": "Commencer le Paiement"
+ },
+ "bot": {
+ "add_api_key": "Ajouter une Clé API",
+ "no_api_key": "Aucune Clé API pour l'instant",
+ "bot_tip_title": "Les bots peuvent envoyer des messages aux canaux.",
+ "bot_tip_desc": "Veuillez noter que nous ne montrons pas la clé API d'un Bot à nouveau après sa génération. Vous pouvez toujours générer une nouvelle clé API pour un Bot en cliquant sur \"Ajouter une Clé API\" et cela n'annulera pas les clés API précédentes.",
+ "webhook_tip_title": "Les Webhooks peuvent recevoir des messages dans un canal et devraient avoir une URL fournie par vous.",
+ "webhook_tip_desc": "Veuillez fournir une URL de webhook qui retournera un code 200.",
+ "manage": "Gérer",
+ "how_to_use": "Comment Utiliser",
+ "manage_desc": "Vous pouvez supprimer un bot à tout moment, l'utilisateur bot sera immédiatement supprimé et toutes les API seront annulées.",
+ "create_title": "Créer un Bot",
+ "create_desc": "Donnez un nom à votre bot. Vous pouvez également ajouter une URL de webhook d’endpoint pour recevoir des données.",
+ "create_key_title": "Créer une Clé API pour le Bot",
+ "create_key_desc": "Créer une Clé API pour authentifier votre communication",
+ "create_key_warning": "Assurez-vous de copier la Clé API maintenant. Vous ne pourrez pas la voir à nouveau !",
+ "key_copy_and_close": "Copier et Fermer",
+ "delete_title": "Supprimer le Bot",
+ "delete_desc": "Êtes-vous sûr de vouloir supprimer le Bot ?",
+ "delete_key_title": "Supprimer la Clé API du Bot",
+ "delete_key_desc": "Êtes-vous sûr de vouloir supprimer cette Clé API de Bot ?",
+ "webhook_title": "Mettre à Jour l'URL du Webhook",
+ "webhook_desc": "Veuillez saisir une URL valide",
+ "col_avatar": "Avatar",
+ "col_name": "Nom du Bot",
+ "col_api_key": "Clé API (Messages Entrants)",
+ "col_webhook": "URL du Webhook d'Endpoint (Sortant)",
+ "col_opt": "Opérations",
+ "col_key_name": "Nom",
+ "col_key_value": "Clé",
+ "col_key_create_time": "Créé À",
+ "col_key_last_used": "Dernière Utilisation"
+ },
+ "auto_delete_msg": {
+ "title": "Supprimer les messages envoyés par moi-même après une certaine période.",
+ "desc": "Cela supprimera les données de messages stockées à la fois sur le serveur et du côté client.",
+ "off": "Désactivé",
+ "5_min": "5 minutes",
+ "10_min": "10 minutes",
+ "1_hour": "1 heure",
+ "1_day": "1 jour",
+ "1_week": "1 semaine",
+ "clear": "Effacer tous les messages du canal",
+ "clear_title": "Effacer tous les messages dans ce canal.",
+ "clear_desc": "Cela supprimera toutes les données de messages stockées à la fois sur le serveur et du côté client."
+ },
+ "firebase": {
+ "disable": "Désactiver",
+ "use_official": "Utiliser la Configuration Officielle",
+ "custom": "Personnalisé",
+ "enable": "Activer",
+ "token_url": "URL du Token",
+ "project_id": "ID du Projet",
+ "private_key": "Clé Privée",
+ "client_email": "Email du Client"
+ },
+ "smtp": {
+ "enable": "Activer",
+ "host": "Hôte",
+ "port": "Port",
+ "from": "De",
+ "username": "Nom d'utilisateur",
+ "password": "Mot de Passe",
+ "how_to": "Comment configurer SMTP ?",
+ "send_test_email": "Envoyer un Email de Test"
+ },
+ "agora": {
+ "enable": "Activer",
+ "how_to": "Comment configurer Agora ?"
+ },
+ "third_app": {
+ "key": "Clé Sécurisée API",
+ "update": "Mettre à Jour le Secret",
+ "update_tip": "Êtes-vous sûr de vouloir mettre à jour le secret API ? Le secret précédent sera invalidé",
+ "key_tip": "La clé de sécurité convenue entre le serveur et l'application tierce est utilisée pour chiffrer les données de communication.",
+ "how_to": "Comment utiliser ?"
+ },
+ "login": {
+ "password": "Mot de Passe",
+ "password_desc": "Permet aux membres de se connecter avec un mot de passe.",
+ "magic_link": "Lien Magique",
+ "magic_link_desc": "Permet aux membres de se connecter avec un Lien Magique.",
+ "google": "Google",
+ "google_desc": "Permet aux membres de se connecter avec Google.",
+ "github": "GitHub",
+ "github_desc": "Permet aux membres de se connecter avec GitHub.",
+ "metamask": "Metamask",
+ "metamask_desc": "Permet aux membres de se connecter avec Metamask.",
+ "oidc": "OIDC",
+ "oidc_desc": "Permet aux membres de se connecter avec OIDC.",
+ "oidc_custom": "Personnalisé",
+ "more_details": "Besoin de plus de détails ? Consultez notre <0>documentation0>."
+ },
+ "widget": {
+ "tip": "Étendre VoceChat en intégrant le widget SDK VoceChat !",
+ "code": "Exemple de Code",
+ "code_comment": "mettez ce fragment de code dans votre fichier html",
+ "config": "Description de la Configuration",
+ "param_key": "Clé de Paramètre",
+ "default_value": "Valeur par Défaut",
+ "remark": "Remarques",
+ "custom_style_tip": "si vous souhaitez personnaliser plus précisément la position du widget, utilisez l'ID de l'élément du widget dans votre fichier HTML ou CSS, comme ceci",
+ "param_id": "ID du Widget (version serveur >= v0.3.12)",
+ "param_host": "Affecter l'utilisateur discutant avec le visiteur (ID Utilisateur)",
+ "param_title": "titre de la fenêtre de chat popup",
+ "param_logo": "URL de l'icône du logo de la fenêtre de chat popup",
+ "param_auto_reg": "true : Enregistrer automatiquement un nouvel utilisateur s'il n'existe pas, false : l'utilisateur doit saisir son email et son nom pour s'inscrire",
+ "param_login_token": "Si vous utilisez les informations existantes d'utilisateur de votre propre plateforme pour générer un nouveau compte VoceChat, ceci est le token de connexion généré par votre plateforme, pour plus de détails, veuillez vous référer à : https://doc.voce.chat/zh-cn/login-with-other-account. Ne remplissez pas ceci pour des scénarios par défaut (aucun système d'utilisateurs tiers) !",
+ "param_theme_color": "La couleur de thème du widget",
+ "param_close_width": "La largeur lorsque le widget est fermé",
+ "param_close_height": "La hauteur lorsque le widget est fermé",
+ "param_open_width": "La largeur lorsque le widget est ouvert",
+ "param_open_height": "La hauteur lorsque le widget est ouvert",
+ "param_welcome": "Message de bienvenue personnalisé",
+ "param_position": "Position du widget : gauche/droite",
+ "share_link": "Partagez le lien du widget afin que les gens puissent discuter avec vous directement",
+ "widget_faq": "Activer Laisser Tout le Monde Rejoindre en Premier"
+ },
+ "version": {
+ "client_version": "Version Client",
+ "server_version": "Version Serveur",
+ "build_time": "Horodatage de Construction",
+ "sync": "Synchroniser avec la dernière version du client web"
+ },
+ "api_doc": {
+ "desc": "Nous avons une documentation API détaillée sur laquelle vous pouvez baser votre propre outil de chat.",
+ "access": "URL d'accès :",
+ "use_method": "Méthode d'Utilisation :",
+ "step_1": "Étape Une : Changez pour votre propre Serveur",
+ "step_2": "Étape Deux : Entrez le token de connexion",
+ "step_2_desc": "Vous pouvez obtenir le token en accédant à l'en-tête http X-API-Key ou en copiant simplement le texte ci-dessous :",
+ "last": "Chaque API a un bouton 'Essayez-le', et vous pouvez déboguer l'API avec cela"
+ }
+}
diff --git a/locales/fr/welcome.json b/locales/fr/welcome.json
new file mode 100644
index 00000000..8c1a532f
--- /dev/null
+++ b/locales/fr/welcome.json
@@ -0,0 +1,39 @@
+{
+ "title": "Bienvenue sur le serveur {{name}}",
+ "desc": "Voici quelques étapes pour vous aider à commencer.",
+ "invite": "Invitez vos amis ou coéquipiers",
+ "start_by_channel": "Créez un Canal pour Commencer une Conversation",
+ "start_by_dm": "Envoyez un Message Direct",
+ "download": "Téléchargez les applications mobiles",
+ "help": "Vous avez des questions ? Visitez notre centre d'aide",
+ "sign_in_tip": "Veuillez vous connecter pour envoyer un message",
+ "onboarding": {
+ "title": "Configuration de VoceChat",
+ "welcome": "Bienvenue dans votre VoceChat !",
+ "welcome_desc": "Tout dans cet espace vous appartient. Configurons votre espace !",
+ "start": "Commencer",
+ "new_server": "Nommez votre nouveau serveur",
+ "server_desc": "Les serveurs sont des environnements partagés où les équipes peuvent travailler sur des projets et discuter.",
+ "placeholder_server": "Entrez le nom du serveur",
+ "create_server": "Créer un Serveur",
+ "admin_title": "Maintenant, configurons votre compte administrateur",
+ "admin_desc": "Vous êtes le 1er utilisateur et l'administrateur de votre espace !",
+ "sign": "S'inscrire",
+ "invite_title": "Dernière étape : invitez les autres !",
+ "invite_desc": "Tout d'abord, qui peut s'inscrire sur ce serveur ?",
+ "confirm": "Confirmer",
+ "done_welcome": "Bienvenue dans {{serverName}}",
+ "done_title": "Fièrement présenté par VoceChat",
+ "done_desc": "Plus de paramètres, y compris la résolution de domaine, les privilèges, la sécurité et les invitations sont disponibles dans <0>Paramètres0>",
+ "enter": "Entrer",
+ "last_tip": "Maintenant, invitons les autres !",
+ "last_desc": "Envoyez le lien d'invitation à vos futurs membres de la communauté :",
+ "done": "Fait",
+ "welcome_page": "Page de Bienvenue",
+ "set_name": "Définir le Nom",
+ "admin_account": "Compte Administrateur",
+ "who_sign_up": "Qui Peut S'inscrire",
+ "invites": "Invitations",
+ "update_domain_tip": "Lien de domaine incorrect ? Veuillez le mettre à jour ici :"
+ }
+}
\ No newline at end of file
diff --git a/locales/fr/widget.json b/locales/fr/widget.json
new file mode 100644
index 00000000..2fc91924
--- /dev/null
+++ b/locales/fr/widget.json
@@ -0,0 +1,5 @@
+{
+ "welcome": "👋 Bonjour, Ravi de vous rencontrer !",
+ "placeholder_send": "Tapez et appuyez sur entrer",
+ "start_chat": "Commencer le Chat"
+}
\ No newline at end of file
diff --git a/service-worker.js b/service-worker.js
index f24ced11..fc795468 100644
--- a/service-worker.js
+++ b/service-worker.js
@@ -1 +1 @@
-(()=>{"use strict";var e={851:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(e){}},603:()=>{try{self["workbox:expiration:7.0.0"]&&_()}catch(e){}},143:()=>{try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},621:()=>{try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},719:()=>{try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s(851);const n=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class a extends Error{constructor(e,t){super(n(e,t)),this.name=e,this.details=t}}const r=new Set;const i={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},c=e=>[i.prefix,e,i.suffix].filter((e=>e&&e.length>0)).join("-"),o=e=>e||c(i.precache),h=e=>e||c(i.runtime);function l(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let u;function d(e){e.then((()=>{}))}class f{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const p=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function g(e){return new Promise((t=>setTimeout(t,e)))}function w(e,t){const s=t();return e.waitUntil(s),s}async function m(e,t){let s=null;if(e.url){s=new URL(e.url).origin}if(s!==self.location.origin)throw new a("cross-origin-copy-response",{origin:s});const n=e.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=t?t(r):r,c=function(){if(void 0===u){const t=new Response("");if("body"in t)try{new Response(t.body),u=!0}catch(e){u=!1}u=!1}return u}()?n.body:await n.blob();return new Response(c,i)}const y=(e,t)=>t.some((t=>e instanceof t));let v,b;const R=new WeakMap,x=new WeakMap,C=new WeakMap,E=new WeakMap,L=new WeakMap;let q={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return x.get(e);if("objectStoreNames"===t)return e.objectStoreNames||C.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function D(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(b||(b=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(R.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return C.set(n,t.sort?t.sort():[t]),T(n)}}function U(e){return"function"===typeof e?D(e):(e instanceof IDBTransaction&&function(e){if(x.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));x.set(e,t)}(e),y(e,v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,q):e)}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&R.set(t,e)})).catch((()=>{})),L.set(t,e),t}(e);if(E.has(e))return E.get(e);const t=U(e);return t!==e&&(E.set(e,t),L.set(t,e)),t}const k=e=>L.get(e);const N=["get","getKey","getAll","getAllKeys","count"],I=["put","add","delete","clear"],K=new Map;function M(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(K.get(t))return K.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=I.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!N.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return K.set(t,r),r}q=(e=>({...e,get:(t,s,n)=>M(t,s)||e.get(t,s,n),has:(t,s)=>!!M(t,s)||e.has(t,s)}))(q);s(603);const P="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class O{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(P,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(P,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(P,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(P).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(P,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),c=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class W{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new O(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,d(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class j{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}s(719);function F(e){return"string"===typeof e?new Request(e):e}class H{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new f,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=F(e);if("navigate"===s.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))s=await e({request:s.clone(),event:t})}catch(i){if(i instanceof Error)throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=s.clone();try{let e;e=await fetch(s,"navigate"===s.mode?void 0:this._strategy.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))e=await s({event:t,request:r,response:e});return e}catch(c){throw n&&await this.runCallbacks("fetchDidFail",{error:c,event:t,originalRequest:n.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=F(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=F(e);await g(0);const n=await this.getCacheKey(s,"write");if(!t)throw new a("cache-put-with-no-response",{url:p(n.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:c,matchOptions:o}=this._strategy,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),d=u?await async function(e,t,s,n){const a=l(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===l(c.url,s))return e.match(c,n)}(h,n.clone(),["__WB_REVISION__"],o):null;try{await h.put(n,u?i.clone():i)}catch(f){if(f instanceof Error)throw"QuotaExceededError"===f.name&&await async function(){for(const e of r)await e()}(),f}for(const a of this.iterateCallbacks("cacheDidUpdate"))await a({cacheName:c,oldResponse:d,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=F(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=h(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new H(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,t,s){let n;await e.runCallbacks("handlerWillStart",{event:s,request:t});try{if(n=await this._handle(t,e),!n||"error"===n.type)throw new a("no-response",{url:t.url})}catch(r){if(r instanceof Error)for(const a of e.iterateCallbacks("handlerDidError"))if(n=await a({error:r,event:s,request:t}),n)break;if(!n)throw r}for(const a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class $ extends V{constructor(e={}){e.cacheName=o(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push($.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(!this._fallbackToNetwork)throw new a("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const a=n.integrity,r=e.integrity,i=!r||r===a;if(s=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||a:void 0})),a&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await t.cachePut(e,s.clone());0}}return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new a("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==$.copyRedirectedCacheableResponsesPlugin&&(n===$.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push($.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}$.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},$.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await m(e):e};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new $({cacheName:o(e),plugins:[...t,new j({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){"string"===typeof s?t.push(s):s&&void 0===s.revision&&t.push(s.url);const{cacheKey:e,url:n}=A(s),r="string"!==typeof s&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new a("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!==typeof s&&s.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==s.integrity)throw new a("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,s.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,r),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return w(e,(async()=>{const t=new B;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return w(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new a("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let Q;const J=()=>(Q||(Q=new G),Q);s(621);const z=e=>e&&"object"===typeof e?e:{handle:e};class X{constructor(e,t,s="GET"){this.handler=z(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=z(e)}}class Y extends X{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class Z{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return void 0;let o;try{o=i.handle({url:s,request:e,event:t,params:a})}catch(l){o=Promise.reject(l)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,z(e))}setCatchHandler(e){this._catchHandler=z(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new a("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let ee;const te=()=>(ee||(ee=new Z,ee.addFetchListener(),ee.addCacheListener()),ee);function se(e,t,s){let n;if("string"===typeof e){const a=new URL(e,location.href);0;n=new X((({url:e})=>e.href===a.href),t,s)}else if(e instanceof RegExp)n=new Y(e,t,s);else if("function"===typeof e)n=new X(e,t,s);else{if(!(e instanceof X))throw new a("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return te().registerRoute(n),n}class ne extends X{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const ae={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};var re;self.addEventListener("activate",(()=>self.clients.claim())),function(e){J().precache(e)}([{'revision':'363b7d97b457dec6b92920c809382c3c','url':'/index.html'},{'revision':null,'url':'/static/css/280.cdf1fe26.chunk.css'},{'revision':null,'url':'/static/css/773.319a0232.chunk.css'},{'revision':null,'url':'/static/css/835.8a09720a.chunk.css'},{'revision':null,'url':'/static/css/main.34b80300.css'},{'revision':null,'url':'/static/css/widget.d13f8dd3.css'},{'revision':null,'url':'/static/js/151.bf929f2b.chunk.js'},{'revision':null,'url':'/static/js/158.6513a305.chunk.js'},{'revision':null,'url':'/static/js/163.fa03ace7.chunk.js'},{'revision':null,'url':'/static/js/194.3615133e.chunk.js'},{'revision':null,'url':'/static/js/242.61a999a5.chunk.js'},{'revision':null,'url':'/static/js/243.2faf5ff2.chunk.js'},{'revision':null,'url':'/static/js/249.659153d4.chunk.js'},{'revision':null,'url':'/static/js/261.2f1dd4d6.chunk.js'},{'revision':null,'url':'/static/js/280.8a0e5cea.chunk.js'},{'revision':null,'url':'/static/js/318.d24e5430.chunk.js'},{'revision':null,'url':'/static/js/348.c61af8f6.chunk.js'},{'revision':null,'url':'/static/js/374.dd54b63f.chunk.js'},{'revision':null,'url':'/static/js/446.1aef8b9d.chunk.js'},{'revision':null,'url':'/static/js/447.b3255cd5.chunk.js'},{'revision':null,'url':'/static/js/489.c9435ae8.chunk.js'},{'revision':null,'url':'/static/js/549.c03ae970.chunk.js'},{'revision':null,'url':'/static/js/55.dbdffafe.chunk.js'},{'revision':null,'url':'/static/js/579.5e44a553.chunk.js'},{'revision':null,'url':'/static/js/626.ad7496d5.chunk.js'},{'revision':null,'url':'/static/js/630.206c9b00.chunk.js'},{'revision':null,'url':'/static/js/647.e087a26e.chunk.js'},{'revision':null,'url':'/static/js/659.47e45a1d.chunk.js'},{'revision':null,'url':'/static/js/698.f368ab03.chunk.js'},{'revision':null,'url':'/static/js/723.30b4a823.chunk.js'},{'revision':null,'url':'/static/js/736.53d56c25.chunk.js'},{'revision':null,'url':'/static/js/773.8ed2cb74.chunk.js'},{'revision':null,'url':'/static/js/814.0de69a67.chunk.js'},{'revision':null,'url':'/static/js/833.476d208e.chunk.js'},{'revision':null,'url':'/static/js/835.152dad8b.chunk.js'},{'revision':null,'url':'/static/js/854.78d2f1ea.chunk.js'},{'revision':null,'url':'/static/js/88.90a67d64.chunk.js'},{'revision':null,'url':'/static/js/909.faf0d2df.chunk.js'},{'revision':null,'url':'/static/js/966.97699b5a.chunk.js'},{'revision':null,'url':'/static/js/973.ce6d6d9a.chunk.js'},{'revision':null,'url':'/static/js/985.d1066343.chunk.js'},{'revision':null,'url':'/static/js/main.1974bec6.js'},{'revision':null,'url':'/static/js/widget.dfee4b58.js'},{'revision':null,'url':'/static/media/edit.18de09b48249f213cf85.svg'},{'revision':null,'url':'/static/media/getFetch.c4cca45e22bc1b2c7d0d.cjs'},{'revision':null,'url':'/static/media/index.294a0edb7af7d19b781b.cjs'},{'revision':null,'url':'/static/media/index.40b335a788697b39d89d.cjs'},{'revision':null,'url':'/static/media/index.4a92f16a45a8dc264e40.cjs'},{'revision':null,'url':'/static/media/index.675293235c1d3a61a78f.cjs'},{'revision':null,'url':'/static/media/index.c05687ef19f5bac24939.cjs'},{'revision':null,'url':'/static/media/join.32e45d691d059a55188a.wav'},{'revision':null,'url':'/static/media/metamask.f04d5fb63394197766d0.svg'},{'revision':null,'url':'/static/media/more.d35b0228affb89f48593.svg'},{'revision':null,'url':'/static/media/msg.sound.2c23efd582318e940e57.wav'},{'revision':null,'url':'/static/media/picture.57a395fb7f41e8e3c5d1.svg'},{'revision':null,'url':'/static/media/play.ada446bc1d007eef6447.svg'},{'revision':null,'url':'/static/media/reaction.dfc99cbb32dd13e55782.svg'},{'revision':null,'url':'/static/media/reply.c7c79a9d5cee92f51ec5.svg'},{'revision':null,'url':'/static/media/upload.image.9f8c7fc90042d2ff4eb7.svg'},{'revision':'ee8cb815aa25efc4cd8bd02e82ed7964','url':'/widget.html'}]),function(e){const t=J();se(new ne(t,e))}(re);const ie=new RegExp("/[^/?]+\\.[^/]+$");var ce;se((({request:e,url:t})=>{if("navigate"!==e.mode)return!1;const s=t.pathname;return!(s.startsWith("/_")||s.startsWith("/VERSION")||s.startsWith("/api")||s.startsWith("/locales/")||s.startsWith("/widget"))&&!s.match(ie)}),(ce="/index.html",J().createHandlerBoundToURL(ce))),se((({url:e})=>e.origin===self.location.origin&&e.pathname.endsWith(".png")),new class extends V{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ae)}async _handle(e,t){const s=t.fetchAndCachePut(e).catch((()=>{}));t.waitUntil(s);let n,r=await t.cacheMatch(e);if(r)0;else{0;try{r=await s}catch(i){i instanceof Error&&(n=i)}}if(!r)throw new a("no-response",{url:e.url,error:n});return r}}({cacheName:"images",plugins:[new class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:s,cachedResponse:n})=>{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);d(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(c){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){r.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===h())throw new a("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new W(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:50})]})),self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}))})();
\ No newline at end of file
+(()=>{"use strict";var e={851:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(e){}},603:()=>{try{self["workbox:expiration:7.0.0"]&&_()}catch(e){}},143:()=>{try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},621:()=>{try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},719:()=>{try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s(851);const n=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class a extends Error{constructor(e,t){super(n(e,t)),this.name=e,this.details=t}}const r=new Set;const i={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},c=e=>[i.prefix,e,i.suffix].filter((e=>e&&e.length>0)).join("-"),o=e=>e||c(i.precache),h=e=>e||c(i.runtime);function l(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let u;function d(e){e.then((()=>{}))}class f{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const p=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function g(e){return new Promise((t=>setTimeout(t,e)))}function w(e,t){const s=t();return e.waitUntil(s),s}async function m(e,t){let s=null;if(e.url){s=new URL(e.url).origin}if(s!==self.location.origin)throw new a("cross-origin-copy-response",{origin:s});const n=e.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=t?t(r):r,c=function(){if(void 0===u){const t=new Response("");if("body"in t)try{new Response(t.body),u=!0}catch(e){u=!1}u=!1}return u}()?n.body:await n.blob();return new Response(c,i)}const y=(e,t)=>t.some((t=>e instanceof t));let v,b;const R=new WeakMap,x=new WeakMap,C=new WeakMap,E=new WeakMap,L=new WeakMap;let q={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return x.get(e);if("objectStoreNames"===t)return e.objectStoreNames||C.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function D(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(b||(b=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(R.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return C.set(n,t.sort?t.sort():[t]),T(n)}}function U(e){return"function"===typeof e?D(e):(e instanceof IDBTransaction&&function(e){if(x.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));x.set(e,t)}(e),y(e,v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,q):e)}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&R.set(t,e)})).catch((()=>{})),L.set(t,e),t}(e);if(E.has(e))return E.get(e);const t=U(e);return t!==e&&(E.set(e,t),L.set(t,e)),t}const k=e=>L.get(e);const N=["get","getKey","getAll","getAllKeys","count"],I=["put","add","delete","clear"],K=new Map;function M(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(K.get(t))return K.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=I.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!N.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return K.set(t,r),r}q=(e=>({...e,get:(t,s,n)=>M(t,s)||e.get(t,s,n),has:(t,s)=>!!M(t,s)||e.has(t,s)}))(q);s(603);const P="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class O{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(P,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(P,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(P,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(P).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(P,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),c=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class W{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new O(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,d(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class j{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}s(719);function F(e){return"string"===typeof e?new Request(e):e}class H{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new f,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=F(e);if("navigate"===s.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))s=await e({request:s.clone(),event:t})}catch(i){if(i instanceof Error)throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=s.clone();try{let e;e=await fetch(s,"navigate"===s.mode?void 0:this._strategy.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))e=await s({event:t,request:r,response:e});return e}catch(c){throw n&&await this.runCallbacks("fetchDidFail",{error:c,event:t,originalRequest:n.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=F(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=F(e);await g(0);const n=await this.getCacheKey(s,"write");if(!t)throw new a("cache-put-with-no-response",{url:p(n.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:c,matchOptions:o}=this._strategy,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),d=u?await async function(e,t,s,n){const a=l(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===l(c.url,s))return e.match(c,n)}(h,n.clone(),["__WB_REVISION__"],o):null;try{await h.put(n,u?i.clone():i)}catch(f){if(f instanceof Error)throw"QuotaExceededError"===f.name&&await async function(){for(const e of r)await e()}(),f}for(const a of this.iterateCallbacks("cacheDidUpdate"))await a({cacheName:c,oldResponse:d,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=F(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=h(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new H(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,t,s){let n;await e.runCallbacks("handlerWillStart",{event:s,request:t});try{if(n=await this._handle(t,e),!n||"error"===n.type)throw new a("no-response",{url:t.url})}catch(r){if(r instanceof Error)for(const a of e.iterateCallbacks("handlerDidError"))if(n=await a({error:r,event:s,request:t}),n)break;if(!n)throw r}for(const a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class $ extends V{constructor(e={}){e.cacheName=o(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push($.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(!this._fallbackToNetwork)throw new a("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const a=n.integrity,r=e.integrity,i=!r||r===a;if(s=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||a:void 0})),a&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await t.cachePut(e,s.clone());0}}return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new a("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==$.copyRedirectedCacheableResponsesPlugin&&(n===$.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push($.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}$.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},$.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await m(e):e};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new $({cacheName:o(e),plugins:[...t,new j({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){"string"===typeof s?t.push(s):s&&void 0===s.revision&&t.push(s.url);const{cacheKey:e,url:n}=A(s),r="string"!==typeof s&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new a("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!==typeof s&&s.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==s.integrity)throw new a("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,s.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,r),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return w(e,(async()=>{const t=new B;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return w(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new a("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let Q;const J=()=>(Q||(Q=new G),Q);s(621);const z=e=>e&&"object"===typeof e?e:{handle:e};class X{constructor(e,t,s="GET"){this.handler=z(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=z(e)}}class Y extends X{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class Z{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return void 0;let o;try{o=i.handle({url:s,request:e,event:t,params:a})}catch(l){o=Promise.reject(l)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,z(e))}setCatchHandler(e){this._catchHandler=z(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new a("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let ee;const te=()=>(ee||(ee=new Z,ee.addFetchListener(),ee.addCacheListener()),ee);function se(e,t,s){let n;if("string"===typeof e){const a=new URL(e,location.href);0;n=new X((({url:e})=>e.href===a.href),t,s)}else if(e instanceof RegExp)n=new Y(e,t,s);else if("function"===typeof e)n=new X(e,t,s);else{if(!(e instanceof X))throw new a("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return te().registerRoute(n),n}class ne extends X{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const ae={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};var re;self.addEventListener("activate",(()=>self.clients.claim())),function(e){J().precache(e)}([{'revision':'44ad413aafbea1890bb7636b3196e3e3','url':'/index.html'},{'revision':null,'url':'/static/css/280.cdf1fe26.chunk.css'},{'revision':null,'url':'/static/css/773.319a0232.chunk.css'},{'revision':null,'url':'/static/css/835.8a09720a.chunk.css'},{'revision':null,'url':'/static/css/main.34b80300.css'},{'revision':null,'url':'/static/css/widget.d13f8dd3.css'},{'revision':null,'url':'/static/js/151.bf929f2b.chunk.js'},{'revision':null,'url':'/static/js/158.6513a305.chunk.js'},{'revision':null,'url':'/static/js/163.fa03ace7.chunk.js'},{'revision':null,'url':'/static/js/194.3615133e.chunk.js'},{'revision':null,'url':'/static/js/242.61a999a5.chunk.js'},{'revision':null,'url':'/static/js/243.2faf5ff2.chunk.js'},{'revision':null,'url':'/static/js/249.659153d4.chunk.js'},{'revision':null,'url':'/static/js/261.2f1dd4d6.chunk.js'},{'revision':null,'url':'/static/js/280.73b885c8.chunk.js'},{'revision':null,'url':'/static/js/318.d24e5430.chunk.js'},{'revision':null,'url':'/static/js/348.c61af8f6.chunk.js'},{'revision':null,'url':'/static/js/374.dd54b63f.chunk.js'},{'revision':null,'url':'/static/js/446.1aef8b9d.chunk.js'},{'revision':null,'url':'/static/js/447.b3255cd5.chunk.js'},{'revision':null,'url':'/static/js/489.c9435ae8.chunk.js'},{'revision':null,'url':'/static/js/549.c03ae970.chunk.js'},{'revision':null,'url':'/static/js/55.ef0dc87b.chunk.js'},{'revision':null,'url':'/static/js/579.5e44a553.chunk.js'},{'revision':null,'url':'/static/js/626.ad7496d5.chunk.js'},{'revision':null,'url':'/static/js/630.206c9b00.chunk.js'},{'revision':null,'url':'/static/js/647.e087a26e.chunk.js'},{'revision':null,'url':'/static/js/659.47e45a1d.chunk.js'},{'revision':null,'url':'/static/js/698.f368ab03.chunk.js'},{'revision':null,'url':'/static/js/723.30b4a823.chunk.js'},{'revision':null,'url':'/static/js/736.53d56c25.chunk.js'},{'revision':null,'url':'/static/js/773.8ed2cb74.chunk.js'},{'revision':null,'url':'/static/js/814.0de69a67.chunk.js'},{'revision':null,'url':'/static/js/833.476d208e.chunk.js'},{'revision':null,'url':'/static/js/835.152dad8b.chunk.js'},{'revision':null,'url':'/static/js/854.78d2f1ea.chunk.js'},{'revision':null,'url':'/static/js/88.90a67d64.chunk.js'},{'revision':null,'url':'/static/js/909.faf0d2df.chunk.js'},{'revision':null,'url':'/static/js/966.97699b5a.chunk.js'},{'revision':null,'url':'/static/js/973.ce6d6d9a.chunk.js'},{'revision':null,'url':'/static/js/985.d1066343.chunk.js'},{'revision':null,'url':'/static/js/main.472f47e8.js'},{'revision':null,'url':'/static/js/widget.6e4d9fa3.js'},{'revision':null,'url':'/static/media/edit.18de09b48249f213cf85.svg'},{'revision':null,'url':'/static/media/getFetch.c4cca45e22bc1b2c7d0d.cjs'},{'revision':null,'url':'/static/media/index.294a0edb7af7d19b781b.cjs'},{'revision':null,'url':'/static/media/index.40b335a788697b39d89d.cjs'},{'revision':null,'url':'/static/media/index.4a92f16a45a8dc264e40.cjs'},{'revision':null,'url':'/static/media/index.675293235c1d3a61a78f.cjs'},{'revision':null,'url':'/static/media/index.c05687ef19f5bac24939.cjs'},{'revision':null,'url':'/static/media/join.32e45d691d059a55188a.wav'},{'revision':null,'url':'/static/media/metamask.f04d5fb63394197766d0.svg'},{'revision':null,'url':'/static/media/more.d35b0228affb89f48593.svg'},{'revision':null,'url':'/static/media/msg.sound.2c23efd582318e940e57.wav'},{'revision':null,'url':'/static/media/picture.57a395fb7f41e8e3c5d1.svg'},{'revision':null,'url':'/static/media/play.ada446bc1d007eef6447.svg'},{'revision':null,'url':'/static/media/reaction.dfc99cbb32dd13e55782.svg'},{'revision':null,'url':'/static/media/reply.c7c79a9d5cee92f51ec5.svg'},{'revision':null,'url':'/static/media/upload.image.9f8c7fc90042d2ff4eb7.svg'},{'revision':'d6071f8b843e4ee83f3e188e7cfe1e13','url':'/widget.html'}]),function(e){const t=J();se(new ne(t,e))}(re);const ie=new RegExp("/[^/?]+\\.[^/]+$");var ce;se((({request:e,url:t})=>{if("navigate"!==e.mode)return!1;const s=t.pathname;return!(s.startsWith("/_")||s.startsWith("/VERSION")||s.startsWith("/api")||s.startsWith("/locales/")||s.startsWith("/widget"))&&!s.match(ie)}),(ce="/index.html",J().createHandlerBoundToURL(ce))),se((({url:e})=>e.origin===self.location.origin&&e.pathname.endsWith(".png")),new class extends V{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ae)}async _handle(e,t){const s=t.fetchAndCachePut(e).catch((()=>{}));t.waitUntil(s);let n,r=await t.cacheMatch(e);if(r)0;else{0;try{r=await s}catch(i){i instanceof Error&&(n=i)}}if(!r)throw new a("no-response",{url:e.url,error:n});return r}}({cacheName:"images",plugins:[new class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:s,cachedResponse:n})=>{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);d(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(c){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){r.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===h())throw new a("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new W(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:50})]})),self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}))})();
\ No newline at end of file
diff --git a/static/js/280.8a0e5cea.chunk.js b/static/js/280.73b885c8.chunk.js
similarity index 84%
rename from static/js/280.8a0e5cea.chunk.js
rename to static/js/280.73b885c8.chunk.js
index 2febda84..39eddc24 100644
--- a/static/js/280.8a0e5cea.chunk.js
+++ b/static/js/280.73b885c8.chunk.js
@@ -1 +1 @@
-"use strict";(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[280],{16723:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(76697);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:16,height:16,viewBox:"0 0 16 16",fill:"#6C737F",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M8.11904 0C3.91105 0 0.5 3.41105 0.5 7.61905C0.5 11.827 3.91105 15.2381 8.11904 15.2381C12.3271 15.2381 15.7381 11.827 15.7381 7.61905C15.7381 3.41105 12.3263 0 8.11904 0ZM11.7053 10.128L10.628 11.2053L8.11904 8.69714L5.61009 11.2053L4.53277 10.128L7.04095 7.61905L4.532 5.1101L5.60934 4.03353L8.11829 6.54248L10.6272 4.03353L11.7045 5.1101L9.19638 7.61905L11.7053 10.128Z"}))),c=(0,l.forwardRef)(r)},34214:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(76697);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:20,height:20,viewBox:"0 0 20 20",fill:"#667085",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M6 4C6 2.89543 6.89543 2 8 2H14C15.1046 2 16 2.89543 16 4V14C16 15.1046 15.1046 16 14 16H8C6.89543 16 6 15.1046 6 14V4ZM4 6.00001C4 5.25973 4.4022 4.61339 5 4.26758V14.5C5 15.8807 6.11929 17 7.5 17H13.7324C13.3866 17.5978 12.7403 18 12 18H7.5C5.567 18 4 16.433 4 14.5V6.00001Z"}))),c=(0,l.forwardRef)(r)},79648:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(76697);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M12 3.25C13.4346 3.25 14.6126 4.34848 14.7388 5.75019L19 5.75C19.4142 5.75 19.75 6.08579 19.75 6.5C19.75 6.8797 19.4678 7.19349 19.1018 7.24315L19 7.25H18.417L17.1499 18.2292C17.0335 19.2384 16.179 20 15.1631 20H8.83688C7.821 20 6.9665 19.2384 6.85006 18.2292L5.582 7.25H5C4.6203 7.25 4.30651 6.96785 4.25685 6.60177L4.25 6.5C4.25 6.1203 4.53215 5.80651 4.89823 5.75685L5 5.75L9.26119 5.75019C9.38741 4.34848 10.5654 3.25 12 3.25ZM10.5 9.5C10.2545 9.5 10.0504 9.65477 10.0081 9.85886L10 9.9375V16.0625L10.0081 16.1411C10.0504 16.3452 10.2545 16.5 10.5 16.5C10.7455 16.5 10.9496 16.3452 10.9919 16.1411L11 16.0625V9.9375L10.9919 9.85886C10.9496 9.65477 10.7455 9.5 10.5 9.5ZM13.5 9.5C13.2545 9.5 13.0504 9.65477 13.0081 9.85886L13 9.9375V16.0625L13.0081 16.1411C13.0504 16.3452 13.2545 16.5 13.5 16.5C13.7455 16.5 13.9496 16.3452 13.9919 16.1411L14 16.0625V9.9375L13.9919 9.85886C13.9496 9.65477 13.7455 9.5 13.5 9.5ZM12 4.75C11.3952 4.75 10.8908 5.17947 10.775 5.75005H13.225C13.1092 5.17947 12.6048 4.75 12 4.75Z",fill:"#D92D20"}))),c=(0,l.forwardRef)(r)},87181:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(76697);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"#667085",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M13.7036 5.75927L18.2405 10.2962L9.33146 19.2052C9.08325 19.4534 8.77457 19.6325 8.43593 19.7249L3.84998 20.9756C3.34808 21.1124 2.88755 20.6519 3.02443 20.15L4.27515 15.5641C4.3675 15.2254 4.54664 14.9167 4.79484 14.6685L13.7036 5.75927ZM20.0604 3.93956C21.3132 5.19232 21.3132 7.22343 20.0604 8.47618L19.1907 9.34506L14.6538 4.80903L15.5238 3.93956C16.7766 2.68681 18.8077 2.68681 20.0604 3.93956Z"}))),c=(0,l.forwardRef)(r)},54490:(e,s,t)=>{t.d(s,{A:()=>m});var a=t(56872),l=(t(25118),t(6133)),i=t(50595),r=t(29410),c=t(36506),n=t(44109);const d=({uid:e,popover:s=!0,cid:t,textOnly:a=!1})=>{const d=(0,i.GV)((e=>e.users.byId),c.bN)[e];return d?a?(0,n.jsx)(n.Fragment,{children:`@${d.name}`}):s?(0,n.jsx)(l.Ay,{interactive:!0,placement:"top",trigger:"click",content:(0,n.jsx)(r.A,{uid:e,type:"card",cid:t}),children:(0,n.jsx)("span",{className:"px-0.5 text-primary-400 cursor-pointer",children:`@${d.name}`})}):(0,n.jsx)("span",{className:"px-0.5 text-primary-400",children:`@${d.name}`}):null};var o=t(76697),u=t(95184),x=t(71359);const j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAA51BMVEUAAABGiMdGiMdGiMdOiMdHicdHh8dGh8dGiMdGiMZGh8dGh8dGh8dHiMdGh8dGiMdGh8dHiMdGh8dGiMdGichHisRHiMZEhsZGh8hHiMZHh8dHiMff8P5HiMdKisnc7v3a7PzU6PpYlM5UkcxNjMqHtN+/2vOaweWpy+qew+aNuOFgmdB/rtx8rdt4qtqmyunP5fjK4vey0u50p9hrodXC3PNlndNblc9QjsuWvuRwpNa82PGCsN3D3fSTvOJon9RhmtFdmNCgxefF3/W21O+v0O2QuuKEst6jx+iJteDV6vuszey31fCy8/ecAAAAHHRSTlMAMP34CD21kdnn5O/t0szAq31nUSAenQ83i4B6ZYuUjgAABgtJREFUWMPVWGlj2jAMHdBjPdaWbm13+JmEhPsqJdxnD2C0+/+/Z7FskaxQepAv0wcIWHmyJFuW36f/XnZ2zy+/HCXgS+Loy+X57s42aN9/nibwTBKnP79/DO1b8jNIXK8Fp993MPZckHxOfns3XOwsDjhpYJK3slIOhWhKmbVqEyDtAPGz2Pvg9gC3POrAyQshepgJX4po+J95B51RWQJ7b4e82o/DzVzngKrtQ9zDfVSAjy6G/pddBXK2byx+efU2vK8HkAtbzICcUDJARpBkMKfvHDAT9kLi4Otb1sk+0MoKMYJ8otdTHdxrwHt0UvSQl+gKMfSAy51Xc3sCWVDvMJ64wUQYmeBBP0wlfqupSpy8ku/YIdJZXzVLbxiPuww4wsA83cEltTYONuZm9wg9lQDrFhlGSbPHvpNI8+McJUtlyMPR7ga8BKoWrRClzoFzxFIc1M2TNcGMvqtIvIgYO8IgJchhmWWM36gEgFUORKCTKuMo9kI+DlBNkc4ERcFSwV0AWAihFzHR2lUcXqxdLyfwt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hxPNMRqL/KBnSaIcSSsSfbMUfTvHEkMEEou+JV7ftJc3Ne1T8pFltL5pNyVnvN214sfqxSdn1EofufgcXm26mrU3XM2ya65mfbqarbk82qxYe+HyaElprU7QTmN//fV2bPEU33O9tTy63q7Kt8PQBXx91Aoor17AG3wBX0cRlEmnKdF/B0VwHHsPiVF/gcQoGRKjgcTuRprFs7X6fDPNMljSLMe7rxFBfeWQi7tNRFABbnMzEcRycQKZo0wjv0JVlUJUVd5QVRevkmk/4kSmdSHzK2SaEybTmmMm016n+5AJ0X3z53Rfl+i+DHDI++MNk5TzMCFp04Zwcc+E5HXRRXz/6h2UqQ9ZUZRpjUpYMaBMa4oyrUjE92IfI3VLtYDUbVq10gdIXc73L0M7y/HY0M5jaWjnXxcfJMaT64jxZGxr6v5YwcYTx5q6/9/lLwwJNCus1PtUAAAAAElFTkSuQmCC";function M({url:e=""}){const s=(0,c.wA)(),[t,a]=(0,o.useState)(""),[l,{isLoading:r}]=(0,u.Q5)(),d=(0,i.GV)((s=>s.footprint.og[e]),c.bN),[M,m]=(0,o.useState)(null);(0,o.useEffect)((()=>{if(d){var s;const e=(null===d||void 0===d?void 0:d.title)||(null===d||void 0===d?void 0:d.site_name)||"",t=(null===d||void 0===d?void 0:d.description)||"",l=(null===d||void 0===d||null===(s=d.images.find((e=>!!e.url)))||void 0===s?void 0:s.url)||"",i=(null===d||void 0===d?void 0:d.favicon_url)||j;a(i),m({title:e,description:t,ogImage:l})}else e&&l(e)}),[e,d]);if(r)return(0,n.jsx)("div",{className:"h-28"});if(!e||!M||!M.title)return null;const{title:g,description:N,ogImage:h}=M,p="flex items-center border border-solid border-gray-300 dark:border-gray-600 box-border rounded-md w-[80%] md:w-[380px]";return h?(0,n.jsxs)("a",{className:`${p} flex-col !items-start p-3`,href:e,target:"_blank",rel:"noreferrer",children:[(0,n.jsx)("h3",{className:"text-primary-500 w-full truncate",children:g}),(0,n.jsx)("p",{className:"text-xs text-gray-400 mb-2 w-full truncate",children:N}),(0,n.jsx)("div",{className:"w-full h-[180px]",children:(0,n.jsx)("img",{className:"w-full h-full object-cover",onError:()=>{s((0,x.M3)({key:e,value:{...d,images:[]}}))},src:h,alt:"og image"})})]}):(0,n.jsxs)("a",{className:`${p} gap-2 px-2 py-3`,href:e,target:"_blank",rel:"noreferrer",children:[t&&(0,n.jsx)("div",{className:"flex rounded",children:(0,n.jsx)("img",{className:"object-contain w-12 h-12",onError:()=>{a(j)},src:t,alt:"favicon"})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("h3",{className:"text-sm text-gray-900 dark:text-gray-100",children:g}),(0,n.jsx)("p",{className:"hidden md:block text-xs text-gray-500 w-[288px] truncate",children:N}),(0,n.jsx)("span",{className:"text-[10px] text-gray-500 w-[288px] truncate",children:e})]})]})}const m=({url:e=!0,mention:s=!0,mentionTextOnly:t=!1,mentionPopOver:l=!0,linkPreview:i=!0,text:r,cid:c})=>(0,n.jsx)(a.A,{options:{render:{email:({content:e,attributes:{href:s}})=>t?(0,n.jsx)(n.Fragment,{children:e}):(0,n.jsx)("a",{className:"text-primary-500",href:s,rel:"noreferrer",children:e}),url:({content:s,attributes:{href:t}})=>e&&s.startsWith("http")?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{className:"text-primary-500",target:"_blank",href:t,rel:"noreferrer",children:s}),i&&(0,n.jsx)(M,{url:t})]}):(0,n.jsx)(n.Fragment,{children:s}),mention:({content:e})=>{if(!s)return(0,n.jsx)(n.Fragment,{children:e});if(/@[0-9]+/.test(e)){const s=e.trim().slice(1);return(0,n.jsx)(d,{uid:+s,cid:c,popover:l,textOnly:t})}return(0,n.jsx)(n.Fragment,{children:e})}}},children:r})},9429:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(76697),l=t(64220);function i(){const[e,s]=(0,a.useState)(!1),[t,i]=(0,a.useState)(),{data:r}=(0,l.Hx)(void 0,{refetchOnMountOrArgChange:!0}),[c,{isSuccess:n}]=(0,l.Vi)();(0,a.useEffect)((()=>{r&&i(r)}),[r]),(0,a.useEffect)((()=>{s(!n&&JSON.stringify(r)!==JSON.stringify(t))}),[r,t,n]);return{config:t,changed:e,updateGithubAuthConfig:e=>{i((s=>s?{...s,...e}:e))},updateGithubAuthConfigToServer:async()=>{t&&await c(t)},isSuccess:n}}},70169:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(76697),l=t(64220);function i(){const[e,s]=(0,a.useState)(!1),[t,i]=(0,a.useState)(""),{data:r}=(0,l.LX)(void 0,{refetchOnMountOrArgChange:!0}),[c,{isSuccess:n}]=(0,l.pA)();(0,a.useEffect)((()=>{r&&i(r.client_id)}),[r]),(0,a.useEffect)((()=>{s(!n&&(null===r||void 0===r?void 0:r.client_id)!==t)}),[r,t,n]);return{config:r,changed:e,clientId:t,updateClientId:i,updateClientIdToServer:async()=>{t&&await c({client_id:t})},updateGoogleAuthConfig:c,isSuccess:n}}},37023:(e,s,t)=>{t.d(s,{A:()=>c});var a=t(76697),l=t(64220),i=t(50595),r=t(36506);const c=(e=!1)=>{var s;const t=(0,i.GV)((e=>e.users.ids.length),r.bN),c=(0,i.GV)((e=>e.server.upgraded),r.bN),n=(0,i.GV)((e=>e.authData.guest),r.bN),{data:d,refetch:o,isLoading:u}=(0,l.xI)(void 0,{refetchOnMountOrArgChange:e,skip:n}),[x,{isLoading:j,isSuccess:M}]=(0,l._8)(),[m,{isSuccess:g,isLoading:N,reset:h}]=(0,l.bb)();(0,a.useEffect)((()=>{g&&(o(),h())}),[g]);return{upgraded:c,reachLimit:t>=(null!==(s=null===d||void 0===d?void 0:d.user_limit)&&void 0!==s?s:Number.MAX_SAFE_INTEGER),license:d,checked:M,isLoading:u,checking:j,upserting:N,upserted:g,checkLicense:e=>{x(e)},upsertLicense:async e=>{const s=await x(e);return!(!("data"in s)||!s.data.sign)&&await m(e)}}}},18545:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>MyAccount});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(76697),react_hot_toast__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(49522),react_i18next__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(39265),_app_services_user__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(82604),_app_store__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(50595),_components_AvatarUploader__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(30450),_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(29833),_ProfileBasicEditModal__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(45628),_RemoveAccountConfirmModal__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(1952),_UpdatePasswordModal__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(78169),react_redux__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(36506),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(44109);function MyAccount(){const{t:t}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_2__.Bd)("member"),{t:ct}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_2__.Bd)(),[passwordModal,setPasswordModal]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[editModal,setEditModal]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),[removeConfirmVisible,setRemoveConfirmVisible]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[uploadAvatar,{isSuccess:uploadSuccess}]=(0,_app_services_user__WEBPACK_IMPORTED_MODULE_3__.pl)(),EditModalInfo={name:{label:t("username"),title:t("change_name"),intro:t("change_name_desc")},email:{label:t("email"),title:t("change_email"),intro:t("change_email_desc")}},loginUser=(0,_app_store__WEBPACK_IMPORTED_MODULE_4__.GV)((e=>{var s;return e.users.byId[(null===(s=e.authData.user)||void 0===s?void 0:s.uid)||0]}),react_redux__WEBPACK_IMPORTED_MODULE_11__.bN);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{uploadSuccess&&react_hot_toast__WEBPACK_IMPORTED_MODULE_1__.Ay.success(ct("tip.update"))}),[uploadSuccess]);const handleBasicEdit=e=>{const{edit:s}=e.currentTarget.dataset;setEditModal(s)},closeBasicEditModal=()=>{setEditModal("")},togglePasswordModal=()=>{setPasswordModal((e=>!e))},toggleRemoveAccountModalVisible=()=>{setRemoveConfirmVisible((e=>!e))};if(!loginUser)return null;const{uid:uid,avatar:avatar,name:name,email:email}=loginUser;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col items-start gap-8",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"md:p-6 flex flex-col items-center w-full md:w-[512px] md:bg-gray-100 md:dark:bg-gray-800 md:rounded-2xl",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_AvatarUploader__WEBPACK_IMPORTED_MODULE_5__.A,{url:avatar,name:name,uploadImage:uploadAvatar}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"mt-2 mb-16 font-bold text-lg text-gray-800 dark:text-white",children:[name," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"font-normal text-gray-500",children:["#",uid]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("username")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"text-sm ",children:[name," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"text-gray-600 dark:text-gray-400",children:[" #",uid]})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{"data-edit":"name",onClick:handleBasicEdit,className:"",children:ct("action.edit")})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("email")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-sm",children:email})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{"data-edit":"email",onClick:handleBasicEdit,children:ct("action.edit")})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("password")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-sm",children:"*********"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{onClick:togglePasswordModal,children:ct("action.edit")})]})]}),1!=uid&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{className:"danger",onClick:toggleRemoveAccountModalVisible,children:t("delete_account")})]}),editModal&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_ProfileBasicEditModal__WEBPACK_IMPORTED_MODULE_7__.A,{type:"email"==editModal?"email":"text",valueKey:editModal,...EditModalInfo[editModal],value:eval(editModal),closeModal:closeBasicEditModal}),passwordModal&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_UpdatePasswordModal__WEBPACK_IMPORTED_MODULE_9__.A,{closeModal:togglePasswordModal}),removeConfirmVisible&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_RemoveAccountConfirmModal__WEBPACK_IMPORTED_MODULE_8__.A,{closeModal:toggleRemoveAccountModalVisible})]})}},45628:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(76697),l=t(49522),i=t(39265),r=t(82604),c=t(20198),n=t(29833),d=t(77197),o=t(64166),u=t(44109);const x=({label:e="Username",valueKey:s="name",value:t="",type:x="text",title:j="Change your username",intro:M="Enter a new username and your existing password.",closeModal:m})=>{const g=(0,a.useRef)(null),{t:N}=(0,i.Bd)(),[h,p]=(0,a.useState)(t),[_,{isLoading:D,isSuccess:y}]=(0,r.sU)();return(0,a.useEffect)((()=>{y&&(l.Ay.success(N("tip.update")),m())}),[y]),(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsx)(o.A,{title:j,description:M,buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{className:"cancel",onClick:m,children:N("action.cancel")}),(0,u.jsx)(n.A,{onClick:()=>{if(!g||!g.current)return;const e=g.current;e.checkValidity()?_({[s]:h}):e.reportValidity()},children:D?"Updating":N("action.done")})]}),children:(0,u.jsxs)("form",{ref:g,className:"flex flex-col gap-2 w-full",action:"/",children:[(0,u.jsx)("label",{htmlFor:s,className:"text-sm text-left text-gray-500",children:e}),(0,u.jsx)(d.A,{name:s,value:h,onChange:e=>{p(e.target.value)},type:x,required:!0})]})})})}},1952:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(76697),l=t(49522),i=t(39265),r=t(99593),c=t(20198),n=t(29833),d=t(64166),o=t(61864),u=t(44109);const x=({closeModal:e})=>{const{t:s}=(0,i.Bd)("member"),[t,{isLoading:x,isSuccess:j}]=(0,r.fe)(),{clearLocalData:M}=(0,o.A)();return(0,a.useEffect)((()=>{j&&M(!0)}),[j]),(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsx)(d.A,{title:s("remove_account"),description:s("remove_account_desc"),buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{onClick:e,children:s("action.cancel",{ns:"common"})}),(0,u.jsx)(n.A,{disabled:x,onClick:async()=>{try{await t()}catch(e){l.Ay.error("Remove Account Failed!")}},className:"danger",children:s("remove")})]})})})}},78169:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(76697),l=t(49522),i=t(39265),r=t(99593),c=t(20198),n=t(29833),d=t(77197),o=t(64166),u=t(44109);const x=({closeModal:e})=>{const{t:s}=(0,i.Bd)("member"),{t:t}=(0,i.Bd)(),{data:x}=(0,r.kU)(),[j,M]=(0,a.useState)({current:"",newPassword:"",confirmPassword:""}),[m,{isLoading:g,isSuccess:N}]=(0,r.zo)(),h=e=>{const{type:s}=e.target.dataset;M((t=>({...t,[s]:e.target.value})))};(0,a.useEffect)((()=>{N&&(l.Ay.success(t("tip.update")),e())}),[N]);const{current:p,newPassword:_,confirmPassword:D}=j,y=(null===x||void 0===x?void 0:x.password)&&!p||!_||!D||_!==D||g,w="my-4 w-full flex flex-col items-start gap-2",A="text-gray-400 font-semibold";return(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsxs)(o.A,{title:s("change_pwd"),description:s("change_pwd_desc"),buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{className:"cancel",onClick:e,children:s("action.cancel",{ns:"common"})}),(0,u.jsx)(n.A,{disabled:y,onClick:()=>{const{current:e,newPassword:s}=j;m({old_password:e,new_password:s})},children:g?"Updating":s("action.update",{ns:"common"})})]}),children:[(null===x||void 0===x?void 0:x.password)&&(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:A,htmlFor:"current",children:s("current_pwd")}),(0,u.jsx)(d.A,{type:"password",id:"current",name:"current",value:p,"data-type":"current",onChange:h})]}),(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:A,htmlFor:"newPassword",children:s("new_pwd")}),(0,u.jsx)(d.A,{type:"password",name:"newPassword",value:_,"data-type":"newPassword",onChange:h})]}),(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:A,htmlFor:"confirmPassword",children:s("confirm_new_pwd")}),(0,u.jsx)(d.A,{onBlur:()=>{const{newPassword:e,confirmPassword:s}=j;e!==s&&l.Ay.error("Not same with new password")},type:"password",name:"confirmPassword",value:D,"data-type":"confirmPassword",onChange:h})]})]})})}},66293:(e,s,t)=>{t.r(s),t.d(s,{default:()=>xs});var a=t(76697),l=t(39265),i=t(50276),r=t(24892),c=t(7449),n=t(49522),d=t(20198),o=t(29833),u=t(77090),x=t(64166),j=t(61864),M=t(44109);const m=({closeModal:e})=>{const{t:s}=(0,l.Bd)("auth"),{t:t}=(0,l.Bd)(),[i,r]=(0,a.useState)(!1),{logout:c,exited:m,exiting:g,clearLocalData:N}=(0,j.A)();return(0,a.useEffect)((()=>{m&&(i&&N(),n.Ay.success(t("tip.logout")))}),[m,i]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s("logout.title"),description:s("logout.desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:t("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{c()},className:"danger",children:g?"Logging out":t("action.logout")})]}),children:(0,M.jsxs)("div",{className:"text-sm text-gray-400 flex justify-end items-center",children:[(0,M.jsx)("label",{htmlFor:"clear_cb",className:"cursor-pointer text-orange-500 mr-3",children:s("logout.clear_local")}),(0,M.jsx)(u.A,{className:" cursor-pointer",name:"clear_cb",checked:i,onChange:e=>{r(e.target.checked)}})]})})})};var g=t(50595),N=t(91696),h=t(40709),p=t(44154),_=t.n(p),D=t(32818),y=t(36506),w=t(81477);const A=()=>{var e;const s=(0,g.GV)((e=>e.server.version),y.bN),[t,i]=(0,a.useState)(!1),{t:r}=(0,l.Bd)("setting",{keyPrefix:"version"}),c=null!==(e="1726530622")?e:0;return(0,M.jsxs)("ul",{className:"flex flex-col gap-2 dark:text-white",children:[(0,M.jsxs)("li",{children:[r("client_version"),": ","0.7.40"]}),(0,M.jsxs)("li",{children:[r("server_version"),": ",s]}),(0,M.jsxs)("li",{children:[r("build_time"),": ",c," ",(0,M.jsxs)("span",{className:"text-gray-700 dark:text-gray-300",children:["(",_()(1e3*c).fromNow(),")"]})]}),(0,M.jsx)("li",{children:(0,M.jsxs)(o.A,{disabled:t,onClick:()=>{i(!0),(0,D.h)(),setTimeout((()=>{(0,w.Mm)()}),2e3)},children:[" ",t?(0,M.jsx)(h.A,{size:18,color:"#fff"}):r("sync")]})})]})};var f=t(6133),v=t(68883),I=t(64220),b=t(77197),T=t(48633),L=t(67636);let k;function E(e="smtp"){const{t:s}=(0,l.Bd)(),[t,i]=(0,a.useState)(!1),[r,c]=(0,a.useState)(void 0),[d,{isSuccess:o,isLoading:u}]=(0,I.n6)(),[x,{isSuccess:j,isLoading:M}]=(0,I.q)(),[m,{isSuccess:g,isLoading:N}]=(0,I.u9)(),[h,{isSuccess:p,isLoading:_}]=(0,I.JW)(),{refetch:D,data:y}=(0,I.ud)(void 0,{skip:"agora"!==e}),{refetch:w,data:A}=(0,I.T7)(void 0,{skip:"login"!==e}),{refetch:f,data:v}=(0,I.Mu)(void 0,{skip:"smtp"!==e}),{refetch:b,data:T}=(0,I.rt)(void 0,{skip:"firebase"!==e}),E={login:d,smtp:x,agora:m,firebase:h}[e],O={smtp:f,agora:D,firebase:b,login:w}[e],C={login:o,smtp:j,agora:g,firebase:p}[e],z={login:u,smtp:M,agora:N,firebase:_}[e];return(0,a.useEffect)((()=>{C&&(n.Ay.success(s("tip.update")),O())}),[C]),(0,a.useEffect)((()=>{const e=v||T||A||y;e&&(k=e,c(e))}),[v,T,A,y]),(0,a.useEffect)((()=>{r&&0!=Object.keys(r).length&&((0,L.isEqual)(k,r)?i(!1):i(!0))}),[r]),{originalValues:k,updating:z,updated:C,reset:()=>{c(void 0)},changed:t,updateConfig:E,agoraConfig:y,values:r,setValues:c,toggleEnable:()=>{c((e=>e&&"enabled"in e?{...e,enabled:!e.enabled}:e))}}}function O(){const{t:e}=(0,l.Bd)("setting"),{t:s}=(0,l.Bd)(),{updateConfig:t,values:i}=E("login"),{data:r}=(0,I.B)(),[c,{data:d,isSuccess:u,isLoading:x}]=(0,I.jJ)();(0,a.useEffect)((()=>{u&&((0,v.cJ)(),n.Ay.success(s("tip.update")))}),[u]);const j=null===i||void 0===i?void 0:i.third_party;return(0,M.jsxs)("div",{className:"max-w-[500px] flex flex-col gap-4 items-start",children:[(0,M.jsx)(T.A,{onClick:(e=>{t({...i,...e})}).bind(null,{third_party:!j}),checked:j}),(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsxs)("label",{htmlFor:"secret",className:"text-sm text-gray-500 dark:text-gray-100",children:[" ",e("third_app.key"),":"]}),(0,M.jsx)(b.A,{disabled:!j,type:"password",id:"secret",value:d||r})]}),(0,M.jsx)(f.Ay,{interactive:!0,placement:"right-start",trigger:"click",content:(0,M.jsxs)("div",{className:"p-3 rounded-lg border border-orange-400 border-solid flex flex-col gap-3 w-[250px] bg-white",children:[(0,M.jsx)("div",{className:"text-orange-500 text-xs",children:e("third_app.update_tip")}),(0,M.jsxs)("div",{className:"flex justify-end gap-3 w-full",children:[(0,M.jsx)(o.A,{onClick:()=>(0,v.cJ)(),className:"cancel mini",children:s("action.cancel")}),(0,M.jsx)(o.A,{disabled:x,className:"mini danger",onClick:()=>c(),children:s("action.yes")})]})]}),children:(0,M.jsxs)(o.A,{disabled:!j,children:[" ",e("third_app.update")]})}),(0,M.jsxs)("div",{className:"text-xs text-orange-400",children:[e("third_app.key_tip"),(0,M.jsxs)("a",{className:"text-primary-500 font-bold",href:"https://doc.voce.chat/login-with-other-account",target:"_blank",rel:"noopener noreferrer",children:["\ud83d\udd17 ",e("third_app.how_to")]})]})]})}var C=t(34214),z=t(49844);const S=`${location.origin}/api/swagger`,U=()=>{const e=(0,g.GV)((e=>e.authData.token),y.bN),{copy:s}=(0,z.A)(),{t:t}=(0,l.Bd)("setting");return(0,M.jsxs)("section",{className:"flex flex-col justify-start items-start gap-4",children:[(0,M.jsx)("div",{className:"font-semibold dark:text-white",children:t("api_doc.desc")}),(0,M.jsx)("div",{className:"flex flex-col gap-2 w-full",children:(0,M.jsxs)("h2",{className:"text-gray-700 dark:text-white text-lg font-semibold flex gap-1",children:[t("api_doc.access"),(0,M.jsx)("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"underline text-primary-600",children:S})]})}),(0,M.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,M.jsx)("h2",{className:"text-gray-700 dark:text-white text-lg font-semibold",children:t("api_doc.use_method")}),(0,M.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsx)("h3",{className:"text-gray-700 dark:text-white ",children:t("api_doc.step_1")}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[50%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step1.png",alt:"step 1"})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsxs)("h3",{className:"text-gray-700 dark:text-white flex flex-col items-start gap-2",children:[t("api_doc.step_2")," ",(0,M.jsxs)("span",{className:"text-gray-400 dark:text-white text-xs",children:["(",t("api_doc.step_2_desc"),")"]})]}),(0,M.jsx)("div",{className:"flex flex-col border border-solid border-green-500 bg-green-100 rounded-md p-2 w-fit break-words text-sm relative",children:(0,M.jsxs)("p",{className:"break-all md:max-w-4xl font-bold",children:[e,(0,M.jsx)(C.A,{onClick:()=>{s(e)},className:"absolute right-2 bottom-2 cursor-pointer"})]})}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step2.jpg",alt:"step 2"})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsx)("h3",{className:"text-gray-700 dark:text-white flex items-center gap-2",children:t("api_doc.last")}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step3.png",alt:"step 3"})]})]})]})]})};var P=t(82604),Y=t(30450),B=t(79648),Q=t(49555),R=t(27074);const G=({closeModal:e,uid:s})=>{const{copy:t}=(0,z.A)(),[i,{error:r,isSuccess:c,isLoading:u,data:j=""}]=(0,P.zr)(),m=(0,a.useRef)(null),{t:g}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:N}=(0,l.Bd)();(0,a.useEffect)((()=>{if(r)switch(r.status){case 406:n.oR.error("Invalid Webhook URL!");break;case 409:n.oR.error("Name Already Exists!")}}),[r]);return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:g("create_key_title"),description:g("create_key_desc"),buttons:c?(0,M.jsx)(o.A,{onClick:()=>{t(j),n.oR.success("API Key Copied!"),e()},children:g("key_copy_and_close")}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:N("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{var e;if(!m||!m.current)return;const t=m.current;t.checkValidity()?i({uid:s,name:(null===(e=t.querySelector("input"))||void 0===e?void 0:e.value)||""}):t.reportValidity()},children:u?"...":N("action.done")})]}),children:c?(0,M.jsxs)("div",{className:"flex flex-col gap-2 text-sm",children:[(0,M.jsx)("div",{className:"border-green-600 bg-green-200/50 rounded border border-solid p-2 max-w-md w-full whitespace-pre-wrap break-all",children:j})," ",(0,M.jsxs)("div",{className:"text-red-400",children:["\u26a0\ufe0f ",g("create_key_warning")]})]}):(0,M.jsx)("form",{ref:m,className:"w-full flex flex-col gap-2 items-center",action:"/",children:(0,M.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"name",className:"text-sm text-gray-500",children:"Name"}),(0,M.jsx)(b.A,{name:"name",required:!0,placeholder:"Please input API Key name"})]})})})})},W=({closeModal:e,uid:s,kid:t})=>{const[i,{isSuccess:r,isLoading:c}]=(0,P.fM)(),{t:u}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{r&&(n.oR.success(j("tip.delete")),e())}),[r]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:`${u("delete_key_title")} ${name}`,description:u("delete_key_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:j("action.cancel")}),(0,M.jsx)(o.A,{className:"danger",onClick:()=>{i({uid:s,kid:t})},children:c?"Deleting":j("action.done")})]})})})},V="p-1 whitespace-nowrap text-xs text-gray-500 dark:text-gray-200 align-middle px-1",K=({uid:e})=>{const{t:s}=(0,l.Bd)("setting",{keyPrefix:"bot"}),[t,i]=(0,a.useState)(),[r,c]=(0,a.useState)(),{data:n,refetch:d}=(0,P.Xf)(e),o=e=>{e||d(),i(e)},u=e=>{e||d(),c(e)};if(!n)return null;const x=["w-20","w-[166px]","w-36","w-15","w-10"];return(0,M.jsxs)("div",{className:"flex flex-col gap-2 items-start",children:[(0,M.jsxs)("div",{className:"border-t border-solid border-b border-gray-100 dark:border-gray-500 py-2 w-full",children:[(0,M.jsxs)("table",{className:"min-w-full table-fixed font-mono",children:[(0,M.jsx)("thead",{children:(0,M.jsx)("tr",{children:[s("col_key_name"),s("col_key_value"),s("col_key_create_time"),s("col_key_last_used"),""].map(((e,s)=>(0,M.jsx)("th",{scope:"col",className:(0,Q.A)("text-xs text-gray-900 dark:text-gray-50 px-1 text-left pb-2",x[s]),children:e},e)))})}),(0,M.jsx)("tbody",{children:n.length>0?n.map((s=>{const{id:t,name:a,key:l,created_at:i,last_used:r}=s;return(0,M.jsxs)("tr",{className:"group",children:[(0,M.jsx)("td",{className:V,children:a}),(0,M.jsx)("td",{className:`${V} w-40`,children:`${l.slice(0,4)} ... ... ${l.slice(-6)}`}),(0,M.jsx)("td",{className:V,children:_()(i).format("YYYY-MM-DD HH:mm:ss")}),(0,M.jsx)("td",{className:V,children:r?_()(r).format("YYYY-MM-DD HH:mm:ss"):"Unused"}),(0,M.jsx)("td",{className:`${V} invisible group-hover:visible`,children:(0,M.jsx)("button",{onClick:u.bind(null,{kid:t,uid:e}),children:(0,M.jsx)(B.A,{})})})]},t)})):(0,M.jsx)("tr",{children:(0,M.jsx)("td",{colSpan:4,className:"text-center text-xs text-gray-400 py-2",children:s("no_api_key")})})})]}),(0,M.jsxs)("button",{onClick:o.bind(null,e),className:"text-green-600 text-xs py-0.5 flex items-center gap-1 m-auto my-2 bg-green-50 rounded-full px-2 ",children:[(0,M.jsx)(R.A,{className:"!w-4 !h-4 fill-green-600"})," ",s("add_api_key")]})]}),t&&(0,M.jsx)(G,{uid:t,closeModal:o.bind(null,void 0)}),r&&(0,M.jsx)(W,{uid:r.uid,kid:r.kid,closeModal:u.bind(null,void 0)})]})};var F=t(53754);const Z=({closeModal:e})=>{const[s,{isSuccess:t,isLoading:i,error:r}]=(0,P.i0)(),{t:c}=(0,l.Bd)("setting",{keyPrefix:"bot"}),[u,j]=(0,a.useState)({name:"",webhook_url:""}),{t:m}=(0,l.Bd)(),g=e=>{const{value:s}=e.target,{name:t=""}=e.target.dataset;j((e=>({...e,[t]:s})))};(0,a.useEffect)((()=>{if(r)switch(r.status){case 406:n.oR.error("Invalid Webhook URL!");break;case 409:n.oR.error("Name conflict with existed username, try the proposed name below."),j((e=>({...e,name:`${e.name}-bot`})))}}),[r]),(0,a.useEffect)((()=>{t&&(n.oR.success("Create Bot Successfully!"),e())}),[t]);const{name:N,webhook_url:h}=u;return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:c("create_title"),description:c("create_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:m("action.cancel")}),(0,M.jsx)(o.A,{disabled:!u.name,onClick:()=>{if(""===u.name.trim())return;const{name:e,webhook_url:t}=u,a=new URL(F.tx).hostname;s({is_bot:!0,is_admin:!1,gender:1,email:`bot_${(new Date).getTime()}@${a}`,password:"",name:e,webhook_url:""===t.trim()?void 0:t})},children:i?"Creating":m("action.done")})]}),children:(0,M.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,M.jsxs)("div",{className:"flex flex-col items-start gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"name",className:"text-sm text-gray-500",children:"Name"}),(0,M.jsx)(b.A,{onChange:g,value:N,"data-name":"name",placeholder:"Please input bot name"})]}),(0,M.jsxs)("div",{className:"flex flex-col items-start gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"webhook_url",className:"text-sm text-gray-500",children:"Webhook URL (Optional)"}),(0,M.jsx)(b.A,{onChange:g,value:h,"data-name":"webhook_url",type:"url",placeholder:"Please input webhook url"})]})]})})})},H=({closeModal:e,uid:s,name:t})=>{const[i,{isSuccess:r,isLoading:c}]=(0,P.Gv)(),{t:u}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{r&&(n.oR.success(j("tip.delete")),e())}),[r]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:`${u("delete_title")} ${t}`,description:u("delete_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e.bind(null),children:j("action.cancel")}),(0,M.jsx)(o.A,{className:"danger",onClick:()=>{i(s)},children:c?"Deleting":j("action.done")})]})})})};var J,X=t(31271),q=t(16723),$=t(87181);function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var s=1;sa.createElement("svg",ee({width:24,height:24,viewBox:"0 0 24 24",stroke:"#616161",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,J||(J=a.createElement("path",{d:"M17 21V13H7V21M7 3V8H15M19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H16L21 8V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),te=(0,a.forwardRef)(se),ae=({uid:e})=>{const s=(0,a.useRef)(null),[t,l]=(0,a.useState)(!1),[i,r]=(0,a.useState)(""),{data:c,isSuccess:d,refetch:o}=(0,P.pR)(e),[u,{isSuccess:x,isLoading:j}]=(0,P.H7)();(0,a.useEffect)((()=>{d&&c&&r(c.name||"")}),[c,d]),(0,a.useEffect)((()=>{x&&o()}),[x]);const m=async()=>{if(t&&s){const t=s.current;if(null===t||void 0===t||!t.checkValidity())return void(null===t||void 0===t||t.reportValidity());const a=new FormData(t).get("name"),l=await u({id:e,name:a});if("error"in l){if(409===l.error.status)n.oR.error("Conflict with existed username");return}}l((e=>!e))};return(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)("form",{action:"/",ref:s,onSubmit:e=>{e.preventDefault(),m()},children:(0,M.jsx)("input",{readOnly:!t,required:!0,autoFocus:!0,name:"name",defaultValue:i,className:(0,Q.A)("text-gray-900 dark:text-gray-100 w-auto",t?"ring-1 ring-gray-500 bg-gray-50 px-2 py-1 dark:bg-slate-900":"bg-transparent")})}),(0,M.jsx)("button",{type:"button",title:"edit name",disabled:j,onClick:m,children:j?(0,M.jsx)(X.A,{size:16}):t?(0,M.jsx)(te,{className:"stroke-gray-500 !w-5 !h-5"}):(0,M.jsx)($.A,{className:"fill-gray-500 !w-5 !h-5"})}),t&&!j&&(0,M.jsx)("button",{type:"button",disabled:j,onClick:()=>{l(!1);const e=s.current;if(e){e.querySelector("input").value=(null===c||void 0===c?void 0:c.name)||""}},children:(0,M.jsx)(q.A,{className:"!w-5 !h-5 fill-gray-500"})})]})},le=({uid:e})=>{const s=(0,a.useRef)(null),[t,l]=(0,a.useState)(!1),[i,r]=(0,a.useState)(""),{data:c,isSuccess:d,refetch:o}=(0,P.pR)(e),[u,{isSuccess:x,isLoading:j}]=(0,P.H7)();(0,a.useEffect)((()=>{d&&c&&r(c.webhook_url||"")}),[c,d]),(0,a.useEffect)((()=>{x&&o()}),[x]);const m=async()=>{if(t&&s){const t=s.current;if(null===t||void 0===t||!t.checkValidity())return void(null===t||void 0===t||t.reportValidity());const a=new FormData(t).get("webhook"),l=await u({id:e,webhook_url:a});if("error"in l){if(406===l.error.status)n.oR.error("Not Valid URL!");return}}l((e=>!e))};return(0,M.jsx)("div",{children:i||t||x?(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)("form",{action:"/",ref:s,onSubmit:e=>{e.preventDefault(),m()},children:(0,M.jsx)("input",{readOnly:!t,required:!0,autoFocus:!0,type:"url",name:"webhook",defaultValue:i,className:(0,Q.A)("text-sm text-gray-400 dark:text-gray-100 dark:bg-slate-900 px-2 py-1",t?"ring-1 ring-gray-500 bg-gray-50":"bg-transparent")})}),(0,M.jsx)("button",{type:"button",disabled:j,onClick:m,children:j?(0,M.jsx)(X.A,{size:16}):t?(0,M.jsx)(te,{className:"stroke-gray-500 !w-5 !h-5"}):(0,M.jsx)($.A,{className:"fill-gray-500 !w-5 !h-5"})}),t&&!j&&(0,M.jsx)("button",{type:"button",disabled:j,onClick:()=>{l(!1);const e=s.current;if(e){e.querySelector("input").value=(null===c||void 0===c?void 0:c.webhook_url)||""}},children:(0,M.jsx)(q.A,{className:"!w-5 !h-5 fill-gray-500"})})]}):(0,M.jsx)("button",{type:"button",className:"rounded-full bg-primary-50 text-green-600 text-xs py-0.5 px-2",onClick:()=>{l(!0)},children:"Set Webhook"})})},ie=({uid:e,webhook:s,closeModal:t})=>{const[i,r]=(0,a.useState)(s),[c,{isSuccess:u,isLoading:j}]=(0,P.H7)(),m=(0,a.useRef)(null),{t:g}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:N}=(0,l.Bd)();return(0,a.useEffect)((()=>{u&&(n.oR.success(N("tip.update")),t())}),[u]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:g("webhook_title"),description:g("webhook_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:t.bind(null,void 0),children:N("action.cancel")}),(0,M.jsx)(o.A,{disabled:!i,onClick:()=>{var s;if(!m||!m.current)return;const t=m.current;if(!t.checkValidity())return void t.reportValidity();const a=(null===(s=new FormData(t).get("webhook"))||void 0===s?void 0:s.toString())||"";c({id:e,webhook_url:a})},children:j?"Updating":N("action.done")})]}),children:(0,M.jsxs)("form",{ref:m,className:"w-full flex flex-col gap-2",action:"/",children:[(0,M.jsx)("label",{htmlFor:"webhook",className:"text-sm text-gray-500",children:"Webhook URL"}),(0,M.jsx)(b.A,{name:"webhook",value:i,onChange:e=>{r(e.target.value)},type:"url"})]})})})},re=({title:e,desc:s})=>(0,M.jsxs)("div",{className:"flex flex-col text-sm",children:[(0,M.jsx)("h2",{className:"font-semibold dark:text-white",children:e}),(0,M.jsx)("p",{className:"text-gray-400 text-xs",children:s})]}),ce="p-6 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100 align-top";function ne(){const[e,{isSuccess:s}]=(0,P.tt)(),[t,i]=(0,a.useState)(!1),[r,c]=(0,a.useState)(void 0),[d,u]=(0,a.useState)(void 0),x=(0,g.GV)((e=>Object.values(e.users.byId).filter((e=>!!e.is_bot))),y.bN),{t:j}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:m}=(0,l.Bd)(),N=()=>{i((e=>!e))},h=e=>{u(e)};return(0,a.useEffect)((()=>{s&&n.oR.success(m("tip.update"))}),[s]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"flex flex-col justify-start items-start gap-4",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-4 max-w-[634px] mb-4",children:[(0,M.jsx)(re,{title:j("bot_tip_title"),desc:j("bot_tip_desc")}),(0,M.jsx)(re,{title:j("webhook_tip_title"),desc:j("webhook_tip_desc")})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,M.jsxs)("h2",{className:"font-semibold flex gap-4 items-center dark:text-white",children:[j("manage"),(0,M.jsxs)("a",{href:"https://doc.voce.chat/bot/bot-and-webhook",target:"_blank",className:"text-sm text-blue-400 underline-offset-1 underline",rel:"noopener noreferrer",children:["\ud83d\udd17 ",j("how_to_use")]})]}),(0,M.jsx)("p",{className:"text-gray-400 text-xs",children:j("manage_desc")})]}),(0,M.jsx)("div",{className:"w-full md:w-fit overflow-auto md:overflow-hidden",children:(0,M.jsxs)("table",{className:"min-w-full table-auto",children:[(0,M.jsx)("thead",{className:"border-b dark:border-b-gray-500 bg-gray-50 dark:bg-gray-600",children:(0,M.jsx)("tr",{children:[j("col_avatar"),j("col_name"),j("col_api_key"),j("col_webhook"),j("col_opt")].map((e=>(0,M.jsx)("th",{scope:"col",className:"text-sm font-bold text-gray-900 dark:text-gray-100 px-6 py-4 text-left",children:e},e)))})}),(0,M.jsx)("tbody",{children:x.map((s=>{const{uid:t,name:a,avatar:l}=s;return(0,M.jsxs)("tr",{className:"bg-white dark:bg-gray-800 border-b dark:border-b-gray-500 transition duration-300 ease-in-out md:hover:bg-gray-100 dark:md:hover:bg-transparent",children:[(0,M.jsx)("td",{className:"px-4 py-2",children:(0,M.jsx)(Y.A,{size:60,uid:t,url:l,uploadImage:e,name:a})}),(0,M.jsxs)("td",{className:`${ce}`,children:[(0,M.jsx)(ae,{uid:t}),(0,M.jsxs)("div",{className:"text-xs text-gray-500",children:["#",t]})]}),(0,M.jsx)("td",{className:`${ce} py-2`,children:(0,M.jsx)(K,{uid:t})}),(0,M.jsx)("td",{className:ce,children:(0,M.jsx)(le,{uid:t})}),(0,M.jsx)("td",{className:ce,children:(0,M.jsx)("button",{type:"button",onClick:h.bind(null,{uid:t,name:a}),children:(0,M.jsx)(B.A,{className:"hover:opacity-80"})})})]},t)}))})]})}),(0,M.jsx)("div",{className:"flex gap-4",children:(0,M.jsx)(o.A,{onClick:N,className:"small",children:m("action.add")})})]}),t&&(0,M.jsx)(Z,{closeModal:N}),r&&(0,M.jsx)(ie,{closeModal:e=>{c(e)},...r}),d&&(0,M.jsx)(H,{closeModal:h,...d})]})}var de=t(13243),oe=t(73707),ue=t(93413);const xe=({link:e,text:s})=>(0,M.jsxs)("div",{className:"tip",children:[(0,M.jsx)(ue.A,{className:"dark:fill-gray-300"}),(0,M.jsx)("a",{href:e,target:"_blank",className:"link",rel:"noreferrer",children:s})]});function je(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"agora"}),{changed:s,reset:t,values:a,setValues:i,toggleEnable:r,updateConfig:c}=E("agora"),n=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;i((e=>e?{...e,[t]:s}:e))};if(!a)return null;const{url:d,project_id:o,app_id:u,app_certificate:x,customer_id:j,customer_secret:m,enabled:g=!1}=a,N=d||"https://api.agora.io";return(0,M.jsxs)("div",{className:"setting-container",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsxs)("div",{className:"input row",children:[(0,M.jsxs)(oe.A,{className:"flex items-center gap-2",children:["Enable",(0,M.jsx)(xe,{link:"https://doc.voce.chat/setting/setting-agora",text:e("how_to")})]}),(0,M.jsx)(T.A,{onClick:r,checked:g})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"url",children:"Agora URL"}),(0,M.jsx)(b.A,{disabled:!g,"data-type":"url",onChange:n,value:N,name:"url",placeholder:"Agora URL"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"project_id",children:"Project ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"project_id",onChange:n,value:o,name:"project_id",placeholder:"Project ID"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"app_id",children:"App ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"app_id",onChange:n,value:u,name:"app_id",placeholder:"APP ID"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"app_certificate",children:"APP Certificate"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"app_certificate",onChange:n,value:x,name:"app_certificate",placeholder:"APP Certificate"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"customer_id",children:"Customer ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"customer_id",onChange:n,value:j,name:"customer_id",placeholder:"Customer ID for RESTful API"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"customer_secret",children:"Customer Secret"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"customer_secret",onChange:n,value:m,name:"customer_secret",placeholder:"Customer Secret for RESTful API"})]})]}),s&&(0,M.jsx)(de.A,{saveHandler:()=>{const e=a;e.url||(e.url="https://api.agora.io"),c(e)},resetHandler:t})]})}var Me=t(63032),me=t(44707);function ge(){const{values:e,setValues:s,updateConfig:t,changed:a,reset:i}=E("firebase"),{t:r}=(0,l.Bd)("setting"),c={disable:r("firebase.disable"),official:r("firebase.use_official"),custom:r("firebase.custom")};let n="";if(e){const{use_official:s,enabled:t=!1}=e;n=t?s?"official":"custom":"disable"}const d=e=>{const t=e.target.value,{type:a=""}=e.target.dataset;s((e=>e?{...e,[a]:t}:e))};if(!e)return null;const{token_url:o,project_id:u,private_key:x,client_email:j}=e;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full max-md:h-auto",children:[(0,M.jsx)(Me.A,{options:Object.values(c),values:Object.keys(c),value:n,onChange:t=>{let a=null;switch(t){case"custom":a={...e,enabled:!0,use_official:!1};break;case"official":a={...e,enabled:!0,use_official:!0};break;case"disable":a={...e,enabled:!1}}a&&s(a)}}),(0,M.jsxs)("fieldset",{className:"inputs",disabled:"custom"!==n,children:[(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"name",children:r("firebase.token_url")}),(0,M.jsx)(b.A,{"data-type":"token_url",onChange:d,value:o,name:"token_url",placeholder:r("firebase.token_url")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"project_id",children:r("firebase.project_id")}),(0,M.jsx)(b.A,{"data-type":"project_id",onChange:d,value:u,name:"project_id",placeholder:r("firebase.project_id")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"private_key",children:r("firebase.private_key")}),(0,M.jsx)(me.A,{rows:10,spellCheck:!1,"data-type":"private_key",onChange:d,value:x,name:"private_key",placeholder:r("firebase.private_key")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"client_email",children:r("firebase.client_email")}),(0,M.jsx)(b.A,{"data-type":"client_email",onChange:d,value:j,name:"client_email",placeholder:r("firebase.client_email")})]})]}),a&&(0,M.jsx)(de.A,{saveHandler:()=>{t(e)},resetHandler:()=>{i()}})]})}var Ne,he=t(9429),pe=t(70169),_e=t(19081);function De(){return De=Object.assign?Object.assign.bind():function(e){for(var s=1;sa.createElement("svg",De({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,Ne||(Ne=a.createElement("path",{d:"M8.00004 1.33301C4.32004 1.33301 1.33337 4.31967 1.33337 7.99967C1.33337 11.6797 4.32004 14.6663 8.00004 14.6663C11.68 14.6663 14.6667 11.6797 14.6667 7.99967C14.6667 4.31967 11.68 1.33301 8.00004 1.33301ZM11.3334 8.66634H4.66671V7.33301H11.3334V8.66634Z",fill:"#D0D5DD"}))),we=(0,a.forwardRef)(ye),Ae=JSON.parse('[{"title":"Google","value":"accounts.google.com","selected":false,"icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE1OTA1XzI0Njk1KSI+CjxwYXRoIGQ9Ik0yMy43NjYgMTIuMjc2M0MyMy43NjYgMTEuNDYwNSAyMy42OTk5IDEwLjY0MDQgMjMuNTU4OCA5LjgzNzg5SDEyLjI0VjE0LjQ1ODlIMTguNzIxN0MxOC40NTI4IDE1Ljk0OTIgMTcuNTg4NSAxNy4yNjc2IDE2LjMyMyAxOC4xMDU0VjIxLjEwMzdIMjAuMTlDMjIuNDYwOCAxOS4wMTM3IDIzLjc2NiAxNS45MjcyIDIzLjc2NiAxMi4yNzYzWiIgZmlsbD0iIzQyODVGNCIvPgo8cGF0aCBkPSJNMTIuMjQwMSAyNC4wMDEzQzE1LjQ3NjYgMjQuMDAxMyAxOC4yMDU5IDIyLjkzODcgMjAuMTk0NSAyMS4xMDQ0TDE2LjMyNzYgMTguMTA2QzE1LjI1MTcgMTguODM4IDEzLjg2MjcgMTkuMjUyNSAxMi4yNDQ1IDE5LjI1MjVDOS4xMTM4OCAxOS4yNTI1IDYuNDU5NDYgMTcuMTQwNCA1LjUwNzA1IDE0LjMwMDhIMS41MTY2VjE3LjM5MTdDMy41NTM3MSAyMS40NDM5IDcuNzAyOSAyNC4wMDEzIDEyLjI0MDEgMjQuM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TA5LjU5NTkyIDEzOS4zMTg1bDg3LjY2Mjc1IDg3LjY2Mjc2YzUuODAyNTUgNS44MDI1NSAxNS4xOTU5MiA1LjgwMjU1IDIwLjk5ODQ3IDBsMTUuMTk1OTItMTUuMTk1OTJjNS44MDI1NS01LjgwMjU1IDUuODAyNTUtMTUuMTk1OTEgMC0yMC45OTg0N2wtODcuNjM2NzMtODcuNjYyNzVjLTUuODAyNTUtNS44MDI1NS0xNS4xOTU5Mi01LjgwMjU1LTIwLjk5ODQ3IDBsLTE1LjE5NTkyIDE1LjE5NTkyYy01Ljg1NDYgNS44MDI1NS01Ljg1NDYgMTUuMjIxOTQtLjAyNjAyIDIwLjk5ODQ3eiIgZmlsbD0iI0Y3RjdGNyIvPgogICAgPHBhdGggZmlsbD0iIzQ0NCIgb3BhY2l0eT0iLjMiIGQ9Ik0xOTguNjg5OCAyMjguNDY0NDNsLTUxLjQ5NDQtNDAuMTIzNDdoMTEuMzk2OTV6TTE0NC4zNTkxOCAxMDEuNjY2OThsNDAuNTY1ODIgNDAuNTY1ODFoMTMuNzY0OHoiLz4KICA8L2c+Cjwvc3ZnPg==","underline":true},{"title":"Custom","value":"","selected":false}]'),fe=({issuers:e=[],onChange:s})=>{const{t:t}=(0,l.Bd)(),[i,r]=(0,a.useState)(null),[c,n]=(0,a.useState)(""),d=!c&&!(null!==i&&void 0!==i&&i.value)||!(null!==i&&void 0!==i&&i.title)||e.some((e=>e.domain===c));return(0,M.jsx)("div",{className:"py-4 w-full flex flex-col gap-4",children:(0,M.jsxs)("ul",{className:"flex flex-col gap-4",children:[e.map((({enable:t,favicon:a,domain:l})=>(0,M.jsxs)("li",{className:"flex items-center justify-between gap-10",children:[(0,M.jsxs)("div",{className:"flex-1 flex items-center justify-between",children:[(0,M.jsx)(we,{className:"cursor-pointer",onClick:()=>{s(e.filter((e=>e.domain!==l)))}}),(0,M.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[Boolean(a)&&(0,M.jsx)("img",{src:a,alt:"logo",className:"w-8 h-8"}),(0,M.jsx)(b.A,{readOnly:!0,value:l,prefix:"https://",placeholder:"Issuer Domain",className:"w-[280px]"})]})]}),(0,M.jsx)("div",{className:"w-14 flex justify-end",children:(0,M.jsx)(T.A,{checked:t,onClick:()=>{s(e.map((e=>({...e,enable:e.domain===l?!t:e.enable}))))}})})]},l))),(0,M.jsxs)("li",{className:"flex items-center justify-between gap-10 cursor-pointer",children:[(0,M.jsxs)("div",{className:"flex-1 flex items-center justify-between",children:[(0,M.jsx)(_e.A,{options:Ae.map((s=>({...s,selected:e.some((e=>e.domain===s.value))}))),current:i,updateSelect:r}),(0,M.jsx)("div",{className:"flex items-center justify-between gap-4",children:(0,M.jsx)(b.A,{onChange:e=>{n(e.target.value)},readOnly:!(null===i||void 0===i||!i.value),value:(null===i||void 0===i?void 0:i.value)||c,prefix:"https://",placeholder:"domain.com",className:"w-[280px]"})})]}),(0,M.jsx)("div",{className:"w-14 flex justify-end",children:(0,M.jsx)(o.A,{disabled:d,onClick:()=>{const t=Ae.find((e=>e.value===(null===i||void 0===i?void 0:i.value)));if(!t)return;const{icon:a,value:l}=t;s(e.concat({enable:!0,favicon:a||"",domain:l||c})),r(null),n("")},children:t("action.add")})})]})]})})};t(30756);const ve=({to:e,children:s})=>(0,M.jsx)("a",{href:e,className:"text-primary-500",target:"_blank",rel:"noreferrer",children:s});function Ie({link:e="#"}){return(0,M.jsx)(f.Ay,{delay:[0,500],interactive:!0,arrow:v.qO,placement:"bottom",content:(0,M.jsx)("div",{className:"py-2 px-3 bg-gray-800 text-xs text-white rounded-lg",children:(0,M.jsx)(l.x6,{ns:"setting",i18nKey:"login.more_details",children:(0,M.jsx)(ve,{to:e})})}),children:(0,M.jsx)(ue.A,{className:"icon"})})}function be(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"login"}),{t:s}=(0,l.Bd)(),{changed:t,clientId:a,updateClientId:i,updateClientIdToServer:r}=(0,pe.A)(),{config:c,changed:d,updateGithubAuthConfigToServer:o,updateGithubAuthConfig:u}=(0,he.A)(),{values:x,updateConfig:j,setValues:m,reset:g,changed:N}=E("login"),h=e=>{const{key:s}=e.target.dataset;s&&u({[s]:e.target.value})},p=e=>{m((s=>s?{...s,...e}:s))};if(!x)return null;const{google:_,magic_link:D,github:y,metamask:w,password:A,oidc:f=[]}=x,v=t||N||d;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full max-md:h-auto",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsx)("div",{className:"txt",children:(0,M.jsx)(oe.A,{children:e("password")})}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("password_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{password:!A}),checked:A})]})}),(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsx)("div",{className:"txt",children:(0,M.jsx)(oe.A,{children:e("magic_link")})}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("magic_link_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{magic_link:!D}),checked:D})]})}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("google")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-google"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("google_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{google:!_}),checked:_})]}),(0,M.jsx)("div",{className:"row",children:(0,M.jsx)(b.A,{disabled:!_,onChange:e=>{i(e.target.value)},placeholder:"Client ID",value:a})})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("github")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-github"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("github_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{github:!y}),checked:y})]}),(0,M.jsxs)("div",{className:"row inputs",children:[(0,M.jsx)(b.A,{disabled:!y,"data-key":"client_id",onChange:h,placeholder:"GitHub Client ID",value:null===c||void 0===c?void 0:c.client_id}),(0,M.jsx)(b.A,{disabled:!y,"data-key":"client_secret",onChange:h,placeholder:"GitHub Client Secret",value:null===c||void 0===c?void 0:c.client_secret})]})]}),(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("metamask")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-metamask"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("metamask_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{metamask:!w}),checked:w})]})}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)("div",{className:"row",children:(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("oidc")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-webid"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("oidc_desc")})]})}),(0,M.jsx)("div",{className:"row",children:(0,M.jsx)(fe,{issuers:f,onChange:e=>{m((s=>s?{...s,oidc:e}:s))}})})]})]}),v&&(0,M.jsx)(de.A,{saveHandler:async()=>{const{google:e}=x;N&&j(x),e&&t&&(await r(),N||n.Ay.success(s("tip.update"))),y&&d&&(await o(),N||n.Ay.success(s("tip.update")))},resetHandler:g})]})}function Te(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"smtp"}),[s,t]=(0,a.useState)(""),[i,{isSuccess:r,isError:c}]=(0,I.lg)(),{reset:d,updateConfig:u,values:x,originalValues:j,setValues:m,changed:g,toggleEnable:N}=E("smtp"),h=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;m((e=>e?{...e,[t]:s}:e))};if((0,a.useEffect)((()=>{r&&n.Ay.success("Send Test Email Successfully"),c&&n.Ay.error("Send Test Email Fail")}),[r,c]),!x)return null;const{host:p,port:_,from:D,username:y,password:w,enabled:A=!1}=x;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsxs)("div",{className:"input row",children:[(0,M.jsxs)(oe.A,{className:"flex items-center gap-2",children:[e("enable")," ",(0,M.jsx)(xe,{link:"https://doc.voce.chat/setting/smtp/smtp-gmail",text:e("how_to")})]}),(0,M.jsx)(T.A,{onClick:N,checked:A})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"host",children:e("host")}),(0,M.jsx)(b.A,{disabled:!A,"data-type":"host",onChange:h,value:p,name:"host",placeholder:"SMTP Host"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"port",children:e("port")}),(0,M.jsx)(b.A,{disabled:!A,type:"number","data-type":"port",onChange:h,value:_,name:"port",placeholder:"SMTP Port"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"from",children:e("from")}),(0,M.jsx)(b.A,{disabled:!A,"data-type":"from",onChange:h,value:D,name:"from",placeholder:"SMTP From"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"username",children:e("username")}),(0,M.jsx)(b.A,{disabled:!A,"data-type":"username",onChange:h,value:y,name:"username",placeholder:"SMTP Username"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"password",children:e("password")}),(0,M.jsx)(b.A,{type:"password",disabled:!A,"data-type":"password",onChange:h,value:w,name:"password",placeholder:"SMTP Password"})]})]}),(0,M.jsxs)("div",{className:"flex gap-4 whitespace-nowrap mt-6",children:[(0,M.jsx)(b.A,{type:"email",disabled:!j.enabled,onChange:e=>{const s=e.target.value;t(s)},value:s,name:"email",placeholder:"test@email.com"}),(0,M.jsx)(o.A,{disabled:!A||!s,onClick:()=>{i({to:s,subject:"test title",content:"test content"})},children:e("send_test_email")})]}),g&&(0,M.jsx)(de.A,{saveHandler:()=>{var e;u({...x,port:Number(null!==(e=null===x||void 0===x?void 0:x.port)&&void 0!==e?e:0)})},resetHandler:d})]})}var Le=t(72390);const ke=()=>{const e=(0,g.GV)((e=>{var s;return null!==(s=e.server.max_file_expiry_mode)&&void 0!==s?s:"Off"}),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"data.auto_delete_file"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,c]=(0,a.useState)(e),[u,{isSuccess:j,isLoading:m}]=(0,I.u3)();(0,a.useEffect)((()=>{j&&(i(),n.oR.success(t("tip.update")))}),[j]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Le.A,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("off"),s("day1"),s("day7"),s("day30"),s("day90"),s("day180")],values:["Off","Day1","Day7","Day30","Day90","Day180"],value:e,onChange:e=>{c(e)}})}),r!==e&&(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:"Are you sure?",description:"Off"==r?"":s("confirm_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:()=>{c(e)},children:t("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{u({max_file_expiry_mode:r})},className:"danger",children:m?"Updating":t("action.yes")})]})})})]})},Ee=({context:e,title:s,desc:t,closeModal:i})=>{const{t:r}=(0,l.Bd)(),[c,{isLoading:u,isSuccess:j}]=(0,I.J9)(),[m,{isLoading:g,isSuccess:N}]=(0,I.kw)(),h=j||N;(0,a.useEffect)((()=>{h&&(n.Ay.success("Clear success"),i())}),[h]);const p=g||u;return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s,description:t,buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:i,children:r("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{switch(e){case"chat":m();break;case"files":c()}},className:"danger",children:p?"Clearing":r("action.remove")})]})})})};var Oe=t(34241);function Ce(){const[e,s]=(0,a.useState)(null),{t:t}=(0,l.Bd)("setting"),i=e=>{s(e)},r={chat:t("data.clear_msgs.desc"),files:t("data.clear_files.desc")};return(0,M.jsxs)("div",{className:"relative w-full md:w-[512px] flex flex-col gap-6",children:[(0,M.jsx)(Oe.A,{version:"0.3.10",empty:!0,children:(0,M.jsx)(Le.A,{title:t("data.clear_msgs.title"),desc:t("data.clear_msgs.desc"),children:(0,M.jsx)(o.A,{onClick:i.bind(null,"chat"),className:"danger",children:t("data.clear_msgs.btn")})})}),(0,M.jsx)(Le.A,{title:t("data.clear_files.title"),desc:t("data.clear_files.desc"),children:(0,M.jsx)(o.A,{onClick:i.bind(null,"files"),className:"danger",children:t("data.clear_files.btn")})}),(0,M.jsx)(ke,{}),e&&(0,M.jsx)(Ee,{closeModal:i.bind(null,null),context:e,title:"Are you sure?",desc:r[e]})]})}var ze=t(37023),Se=t(64817);const Ue=e=>{const s=_()();let t=s;switch(e){case"year":t=s.add(100,"year");break;case"month":t=s.add(1,"month");break;case"quarter":t=s.add(3,"month")}return t.format("YYYY-MM-DD")},Pe=(0,F.JZ)(),Ye=({closeModal:e})=>{const{t:s}=(0,l.Bd)("setting"),{t:t}=(0,l.Bd)(),[i,{isLoading:r,isSuccess:c}]=(0,I.Bh)(),[u,j]=(0,a.useState)(location.hostname),[m,g]=(0,a.useState)(!1),[N,h]=(0,a.useState)(`${Pe[0].pid}|${Pe[0].limit}|${Pe[0].type}|${Pe[0].sub_dur||""}`),p=()=>{g((e=>!e))},_=N.includes("booking");return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s("license.renew"),description:s("license.renew_select"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{onClick:e,className:"ghost",children:t("action.cancel")}),_?(0,M.jsx)(o.A,{onClick:()=>{window.open("https://calendly.com/hansu","_blank")},children:"Booking a meeting!"}):(0,M.jsx)(f.Ay,{visible:m,interactive:!0,placement:"top-end",offset:[-50,-40],trigger:"click",content:(0,M.jsxs)("div",{className:"p-3 rounded-lg border border-solid border-gray-200 dark:border-gray-900 flex flex-col items-start gap-3 w-[430px] bg-white dark:bg-gray-800 shadow shadow-gray-200 dark:shadow-gray-900 drop-shadow-xl",children:[(0,M.jsx)("div",{className:"text-gray-500 text-sm",children:s("license.tip_domain")}),(0,M.jsx)(b.A,{value:u,onChange:e=>{j(e.target.value)}}),(0,M.jsxs)("div",{className:"flex justify-between items-center w-full mt-4",children:[(0,M.jsxs)("span",{className:"text-xs text-orange-500 text-left",children:[" ",s("license.tip_port")]}),(0,M.jsxs)("div",{className:"flex gap-3 whitespace-nowrap",children:[(0,M.jsx)(o.A,{className:"mini cancel",onClick:p,children:t("action.cancel")}),(0,M.jsx)(o.A,{className:"mini",disabled:r||c,onClick:async()=>{const e=`https://${u}`;if(!Se.t6(e))return void n.Ay.error("Invalid Host");if(""!==new URL(e).port||u.endsWith(":443"))return void n.Ay.error(s("license.tip_port"));const[t,a,l,r="month"]=N.split("|"),c={user_limit:Number(a),expire:Ue("subscription"==l?r:"year"),domain:u.startsWith("localhost")?"*":u},d=await i({type:l,priceId:t,metadata:c,cancel_url:location.href,success_url:`${location.origin}/#/cb/payment_success`});"error"in d?n.Ay.error("Payment link initialized failed!"):(d.data,location.href=d.data.session_url)},children:r?"Initialize Payment URL":c?"Redirecting":s("license.tip_confirm")})]})]})]}),children:(0,M.jsxs)("button",{onClick:p,className:"text-sm text-white bg-primary-400 break-keep shadow rounded-lg px-3.5 py-2.5 md:hover:bg-primary-500 active:bg-primary-500 disabled:bg-gray-300",children:[" ",s("license.renew")]})})]}),children:(0,M.jsx)(Me.A,{options:Pe.map((({title:e,desc:s,price:t})=>`${e} ${s?`[${s}]`:""}${t?`[${t}]`:""}`)),values:Pe.map((({pid:e,limit:s,type:t="payment",sub_dur:a="month"})=>`${e}|${s}|${t}|${a}`)),value:N,onChange:e=>{h(e)}})})})},Be=({closeModal:e,updateLicense:s,updating:t,updated:i})=>{const[r,c]=(0,a.useState)(""),{t:u}=(0,l.Bd)("setting"),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{i&&(n.Ay.success(j("tip.update")),e())}),[i]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{onClick:e,className:"ghost",children:j("action.cancel")}),(0,M.jsx)(o.A,{disabled:t||i||!r,onClick:async()=>{const e=await s(r);"boolean"!=typeof e||e||n.Ay.error("Check License Invalid!")},children:t?"Updating":i?"Update Successfully":u("license.update")})]}),children:(0,M.jsx)(me.A,{rows:18,placeholder:u("license.update_placeholder"),value:r,onChange:e=>{c(e.target.value)}})})})},Qe=({label:e,data:s,foldable:t=!1,...a})=>{const l=(0,Q.A)("font-bold w-full cursor-pointer dark:text-green-500",t?"truncate":"whitespace-pre-wrap break-all");return s?(0,M.jsxs)("div",{className:"whitespace-nowrap flex flex-col items-start justify-start text-lg",children:[(0,M.jsx)("span",{className:"text-sm text-green-500",children:e}),Array.isArray(s)?(0,M.jsx)("ul",{className:l,children:s.map((e=>(0,M.jsx)("li",{children:e},e)))}):(0,M.jsx)("span",{className:l,...a,children:s})]}):null};function Re(){var e;const{t:s,i18n:t}=(0,l.Bd)("setting"),{license:i,reachLimit:r,upsertLicense:c,upserting:n,upserted:d}=(0,ze.A)(!0),[u,x]=(0,a.useState)(!1),[j,m]=(0,a.useState)(!1),[g,N]=(0,a.useState)(!0),h=()=>{x((e=>!e))},p=()=>{m((e=>!e))};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"max-w-3xl flex flex-col justify-start items-start gap-4",children:[(0,M.jsxs)("div",{className:(0,Q.A)("relative w-full p-3 rounded border-solid border flex flex-col gap-4 shadow",r?"border-red-600 bg-red-200/50":"border-green-600 bg-green-100 dark:bg-green-900"),children:[(0,M.jsx)(Qe,{label:s("license.signed"),data:null!==i&&void 0!==i&&i.sign?"Yes":"Not Yet"}),(0,M.jsx)(Qe,{label:s("license.domain"),data:null===i||void 0===i?void 0:i.domains}),(0,M.jsx)(Qe,{label:s("license.user_limit"),data:(null!==(e=null===i||void 0===i?void 0:i.user_limit)&&void 0!==e?e:0)>=999999?"No Limit":null===i||void 0===i?void 0:i.user_limit}),(0,M.jsx)(Qe,{label:s("license.expire"),data:_()(null===i||void 0===i?void 0:i.expired_at).format("YYYY-MM-DD h:mm:ss A")}),(0,M.jsx)(Qe,{label:s("license.create"),data:_()(null===i||void 0===i?void 0:i.created_at).format("YYYY-MM-DD h:mm:ss A")}),(0,M.jsx)(Qe,{label:s("license.value"),data:null===i||void 0===i?void 0:i.base58,foldable:g,title:g?"Click to see full text":"Click to fold text",onClick:()=>{N((e=>!e))}})]}),(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)(o.A,{onClick:h,children:s("license.renew")}),(0,M.jsx)(o.A,{onClick:p,className:"ghost",children:s("license.update")})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-4 bg-primary-500 text-white rounded drop-shadow-xl p-5",children:[(0,M.jsxs)("h2",{className:"text-2xl font-bold",children:[s("license.tip.title")," \ud83c\udf81"]}),(0,M.jsxs)("p",{className:"flex flex-col",children:[(0,M.jsx)("span",{children:s("license.tip.user_test")}),(0,M.jsxs)("span",{children:[s("license.tip.contact"),t.language.startsWith("zh")?"Privoce":(0,M.jsx)("a",{className:"underline text-lg text-green-200",href:"https://calendly.com/hansu/han-meeting",target:"_blank",rel:"noopener noreferrer",children:"https://calendly.com/hansu/han-meeting"})]})]})]})]}),u&&(0,M.jsx)(Ye,{closeModal:h}),j&&(0,M.jsx)(Be,{updated:d,updating:n,updateLicense:c,closeModal:p})]})}var Ge=t(18545);const We=()=>{const e=(0,g.GV)((e=>{var s;return null!==(s=e.server.chat_layout_mode)&&void 0!==s?s:"Left"}),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.chat_layout"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le.A,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("left"),s("self_right")],values:["Left","SelfRight"],value:e,onChange:e=>{r({chat_layout_mode:e})}})})},Ve=()=>{const e=(0,g.GV)((e=>!!e.server.contact_verification_enable),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.contact_verify"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le.A,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("enable"),s("disable")],values:["true","false"],value:`${e}`,onChange:()=>{r({contact_verification_enable:!e})}})})},Ke=()=>{const[e,s]=(0,a.useState)(localStorage.theme||"auto"),{t:t}=(0,l.Bd)("setting");return(0,M.jsx)(Le.A,{title:t("overview.theme.title"),desc:t("overview.theme.desc"),children:(0,M.jsx)(Me.A,{options:[t("overview.theme.auto"),t("overview.theme.dark"),t("overview.theme.light")],values:["auto","dark","light"],value:e,onChange:e=>{(e=>{if(s(e),localStorage.theme=e,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),"auto"!==e)document.documentElement.classList.add(e);else{const e=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.add(e?"dark":"light")}})(e)}})})},Fe=()=>{const{data:e,isSuccess:s}=(0,I.X)(),[t,i]=(0,a.useState)(location.origin),{t:r}=(0,l.Bd)("setting"),{t:c}=(0,l.Bd)(),[d,{isLoading:u,isSuccess:x}]=(0,I.PX)();return(0,a.useEffect)((()=>{x&&n.oR.success(c("tip.update"))}),[x]),(0,a.useEffect)((()=>{s&&e&&i(e)}),[s,e]),(0,M.jsx)(Le.A,{title:r("overview.url.title"),desc:r("overview.url.desc"),children:(0,M.jsxs)("div",{className:"flex items-center gap-4 mt-2",children:[(0,M.jsx)(b.A,{placeholder:"frontend url",value:t,onChange:e=>{i(e.target.value)}}),(0,M.jsxs)(o.A,{disabled:!t||u,className:"small",onClick:()=>{d(t)},children:[" ",c("action.update")]})]})})},Ze=["en","zh","jp","tr","pt","es"],He=()=>{const{t:e,i18n:s}=(0,l.Bd)("setting");return(0,M.jsx)(Le.A,{title:e("overview.lang.title"),desc:e("overview.lang.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.lang.en"),e("overview.lang.zh"),e("overview.lang.jp"),e("overview.lang.tr"),e("overview.lang.pt"),e("overview.lang.es")],values:Ze,value:s.language.split("-")[0],onChange:e=>{(e=>{s.changeLanguage(e)})(e)}})})},Je=()=>{const e=(0,g.GV)((e=>!!e.server.show_user_online_status),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.online_status"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le.A,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("enable"),s("disable")],values:["true","false"],value:`${e}`,onChange:()=>{r({show_user_online_status:!e})}})})};var Xe=t(22884);const qe=()=>{const e=(0,y.wA)(),s=(0,g.GV)((e=>!!e.ui.msgSound),y.bN),{t:t}=(0,l.Bd)("setting",{keyPrefix:"overview.message_sound"});return(0,M.jsx)(Le.A,{title:t("title"),desc:t("desc"),children:(0,M.jsx)(Me.A,{options:[t("enable"),t("disable")],values:["true","false"],value:`${s}`,onChange:()=>{e((0,Xe.iy)(!s))}})})},$e=()=>{const{t:e}=(0,l.Bd)("setting"),{t:s}=(0,l.Bd)(),t=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.is_admin}),y.bN),i=(0,g.GV)((e=>e.server),y.bN),[r,{isSuccess:c}]=(0,I.PZ)(),[d]=(0,I.NI)(),[o,u]=(0,a.useState)(!1),[x,j]=(0,a.useState)(i),m=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;j((e=>({...e,[t]:s})))};(0,a.useEffect)((()=>{i&&j(i)}),[i]),(0,a.useEffect)((()=>{c&&n.Ay.success(s("tip.update"))}),[c]),(0,a.useEffect)((()=>{if(i&&x){const{name:e,description:s}=x,{name:t,description:a}=i;u(t!==e||a!==s)}}),[i,x]);const{name:N,description:h,logo:p}=x;return x?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"flex gap-4",children:[(0,M.jsx)("div",{className:"w-24 h-24",children:(0,M.jsx)(Y.A,{disabled:!t,url:c?`${p}?t=${+new Date}`:p,name:N,uploadImage:r})}),t&&(0,M.jsx)("div",{className:"flex flex-col justify-between items-start",children:(0,M.jsx)("div",{className:"text-sm text-gray-600 dark:text-gray-100",children:e("overview.upload_desc")})})]}),(0,M.jsxs)("div",{className:"flex flex-col items-start gap-6 mb-3",children:[(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsx)(oe.A,{htmlFor:"name",children:e("overview.name")}),(0,M.jsx)(b.A,{disabled:!t,"data-type":"name",onChange:m,value:N,name:"name",id:"name",placeholder:"Server Name"})]}),(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsx)(oe.A,{htmlFor:"desc",children:e("overview.desc")}),(0,M.jsx)(me.A,{disabled:!t,"data-type":"description",onChange:m,value:null!==h&&void 0!==h?h:"",rows:4,name:"desc",id:"desc",placeholder:"Tell the world a bit about this server"})]})]}),o&&(0,M.jsx)(de.A,{saveHandler:()=>{const{name:e,description:s}=x;d({name:e,description:s})},resetHandler:()=>{j(i)}})]}):null},es=({})=>{const{t:e}=(0,l.Bd)("setting"),{t:s}=(0,l.Bd)(),{refetch:t}=(0,I.Mv)(),i=(0,g.GV)((e=>{var s;return null!==(s=e.server.only_admin_can_create_group)&&void 0!==s&&s}),y.bN),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(t(),n.Ay.success(s("tip.update")))}),[c]);return(0,M.jsx)(Oe.A,{empty:!0,version:"0.3.50",children:(0,M.jsx)(Le.A,{title:e("overview.admin_create_group.title"),desc:e("overview.admin_create_group.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.admin_create_group.enable"),e("overview.admin_create_group.disable")],values:["true","false"],value:`${i}`,onChange:e=>{r({only_admin_can_create_group:"true"==e})}})})})},ss=({})=>{var e;const{t:s}=(0,l.Bd)("setting"),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),r=(0,g.GV)((e=>{var s;return null!==(s=e.server.ext_setting)&&void 0!==s?s:"{}"}),y.bN),[c,{isSuccess:d}]=(0,I.u3)();(0,a.useEffect)((()=>{d&&(i(),n.Ay.success(t("tip.update")))}),[d]);const o=null!==(e=(0,w.zk)(r,F.Ez))&&void 0!==e&&e;return(0,M.jsx)(Oe.A,{empty:!0,version:"0.3.50",children:(0,M.jsx)(Le.A,{title:s("overview.admin_see_group_members.title"),desc:s("overview.admin_see_group_members.desc"),children:(0,M.jsx)(Me.A,{options:[s("overview.admin_see_group_members.enable"),s("overview.admin_see_group_members.disable")],values:["true","false"],value:`${o}`,onChange:e=>{(e=>{const s=(0,w.Ub)(r,{[F.Ez]:e});c({ext_setting:s})})("true"==e)}})})})};function ts(){const{t:e}=(0,l.Bd)("setting"),s=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.is_admin}),y.bN),{values:t,updateConfig:a}=E("login");if(!t)return null;const{who_can_sign_up:i,guest:r=!1}=t;return(0,M.jsxs)("div",{className:"relative w-full md:w-[512px] flex flex-col gap-6",children:[(0,M.jsx)($e,{}),s&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fe,{}),(0,M.jsx)("div",{className:"flex flex-col",children:(0,M.jsx)("h4",{className:"font-bold text-gray-700 dark:text-white",children:e("overview.title_feat")})}),(0,M.jsx)(Le.A,{title:e("overview.sign_up.title"),desc:e("overview.sign_up.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.sign_up.everyone"),e("overview.sign_up.invite")],values:["EveryOne","InvitationOnly"],value:i,onChange:e=>{var s;s=e,a({...t,who_can_sign_up:s})}})}),(0,M.jsx)(es,{}),(0,M.jsx)(ss,{}),(0,M.jsx)(Le.A,{title:e("overview.guest_mode.title"),desc:e("overview.guest_mode.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.guest_mode.enable"),e("overview.guest_mode.disable")],values:["true","false"],value:`${r}`,onChange:e=>{(e=>{const s="true"===e;a({...t,guest:s})})(e)}})}),(0,M.jsx)(Je,{}),(0,M.jsx)(We,{}),(0,M.jsx)(Ve,{})]}),(0,M.jsx)(He,{}),(0,M.jsx)(Ke,{}),(0,M.jsx)(qe,{})]})}var as=t(91924),ls=t(67352),is=t(54490);const rs=({paramKey:e,paramDefault:s,remarks:t})=>(0,M.jsxs)("tr",{className:"bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-50 border-b transition duration-300 ease-in-out md:hover:bg-gray-100 dark:md:hover:bg-gray-900",children:[(0,M.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:e}),(0,M.jsx)("td",{className:"text-sm font-light px-6 py-4 whitespace-nowrap",children:"theme-color"==e?(0,M.jsxs)("span",{style:{color:s},children:[" ",s]}):s}),(0,M.jsx)("td",{className:"text-sm font-light px-6 py-4",children:(0,M.jsx)(is.A,{linkPreview:!1,text:t,mention:!1})})]});function cs(){const e=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.uid}),y.bN),s=`${location.origin}/widget.html?host=${e}`,{t:t}=(0,l.Bd)("setting",{keyPrefix:"widget"}),{t:a}=(0,l.Bd)("widget"),{t:i}=(0,l.Bd)(),{copied:r,copy:c}=(0,z.A)({enableToast:!1});return(0,M.jsxs)("div",{className:"flex flex-col justify-start items-start",children:[(0,M.jsx)("div",{className:"font-semibold dark:text-white",children:t("tip")}),(0,M.jsxs)("label",{htmlFor:"code",className:"font-semibold dark:text-white",children:[t("code"),":"]}),(0,M.jsx)(as.A,{id:"code",language:"html",style:ls.A,className:"rounded",children:`\x3c!-- ${t("code_comment")} --\x3e\n