@satek-team-intern/chatbot-widget 0.10.5 → 0.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ import { createMp3Encoder as C } from "wasm-media-encoders";
7
7
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
8
8
  //#endregion
9
9
  //#region src/styles/index.ts
10
- var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family:Inter,-apple-system,sans-serif;font-size:16px;font-weight:400;line-height:24px;display:block;position:fixed;bottom:0;right:0}#chat-internal-root *{box-sizing:border-box;pointer-events:auto}#chat-internal-root ::-webkit-scrollbar{width:5px;height:5px}#chat-internal-root ::-webkit-scrollbar-thumb{background-color:#0000001a;border-radius:4px}#chat-internal-root ::-webkit-scrollbar-thumb:hover{background-color:#0003}.chatbot-container{width:100%;height:100%;position:relative}\n .floating-button{background:var(--primary);-webkit-backdrop-filter:blur(25px)saturate(150%);color:#fff;cursor:pointer;z-index:99999;border:1px solid #fff6;border-radius:20px;outline:none;justify-content:center;align-items:center;width:64px;height:64px;transition:all .4s cubic-bezier(.4,0,.2,1);display:flex;position:fixed;bottom:24px;right:24px;box-shadow:0 12px 40px #0000000d,inset 0 0 0 1px #fff6}.floating-button:hover{transform:scale(1.1)rotate(5deg)}.floating-button:active{transform:scale(.95)}.floating-button .ping{pointer-events:none;background:#fff3;border-radius:16px;animation:2s cubic-bezier(0,0,.2,1) infinite ping;position:absolute;inset:0}@keyframes ping{75%,to{opacity:0;transform:scale(1.5)}}.floating-button .icon{z-index:10;font-size:24px;position:relative}\n .chat-window{--primary:#155dfc;--chat-bg:#fff;--chat-text:#101828;--chat-subtext:#6a7282;--chat-header-bg:#fff;--chat-border:#e5e7eb;--sidebar-bg:#fff}.chat-window.dark-theme{--chat-bg:color-mix(in srgb, var(--primary), #0f172a99 85%);--chat-text:#f8fafc;--chat-subtext:#94a3b8;--chat-header-bg:color-mix(in srgb, var(--primary), #1e293b99 80%);--chat-border:#334155;--sidebar-bg:color-mix(in srgb, var(--primary), #0f172a66 95%)}.chat-window{background:var(--chat-bg);-webkit-backdrop-filter:blur(20px)saturate(180%);backdrop-filter:blur(20px)saturate(180%);border:1px solid var(--chat-border);z-index:99998;width:420px;height:640px;color:var(--chat-text);transform-origin:100% 100%;border-radius:14px;flex-direction:column;max-width:100%;max-height:100%;margin:0;transition:none;animation:.6s cubic-bezier(.34,1.56,.64,1) slideUp;display:flex;position:fixed;bottom:90px;right:20px;overflow:hidden;transform:none;box-shadow:0 8px 32px #0000005e,inset 0 0 0 1px #ffffff0d}.chat-window.fullpage{--chat-bg:#fff;--chat-header-bg:#fff;--chat-border:#f1f5f9;--sidebar-bg:#fff;--app-sidebar-bg:#f9f9f9;--active-item-bg:#f1f5f9;-webkit-backdrop-filter:none;z-index:9999;border-radius:16px;flex-direction:column;display:flex;transform:none}.chat-main-layout{--chat-bg:#fff;--chat-header-bg:#fff;--chat-border:#f1f5f9;--sidebar-bg:#fff;--active-item-bg:#f1f5f9;-webkit-backdrop-filter:none;z-index:9999;background-color:var(--app-sidebar-bg);border-radius:0;flex-direction:row;flex:1;width:100%;max-width:none;height:100vh;display:flex;inset:0;overflow:hidden;transform:none}.chat-window.fullpage.dark-theme{--chat-bg:#0f172a;--chat-header-bg:#1e293b;--chat-border:#334155;--sidebar-bg:#0f172a;--app-sidebar-bg:#1e293b;--active-item-bg:#334155;overflow:hidden}.chat-header{background:var(--chat-header-bg);color:var(--chat-text);flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 16px;display:flex}.header-info{align-items:center;gap:8px;display:flex}.header-logo{flex-shrink:0;justify-content:center;align-items:center;padding-left:6px;padding-right:8px;display:flex}.header-logo img,.header-logo .satek-icon{object-fit:contain;width:22px;height:22px}.back-btn{color:#64748b;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;margin-right:8px;padding:0;font-size:20px;display:flex}.header-info-text{align-items:center;gap:6px;min-width:0;display:flex}.header-dot{color:var(--chat-subtext);opacity:.6}.header-title{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.header-subtitle{color:var(--chat-subtext);white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:400;overflow:hidden}.chat-body-container{border-top-left-radius:8px;flex-direction:row;flex:1;display:flex;position:relative;overflow:hidden}.chat-sidebar{background:var(--sidebar-bg);border-right:1px solid #0000000d;flex-direction:column;width:100%;transition:all .3s;display:flex}.chat-sidebar.is-full{flex-shrink:0;width:320px}.chat-search-bar{background:0 0;align-items:center;gap:4px;padding:12px 12px 4px;display:flex}.search-input-wrapper{flex:1;align-items:center;display:flex;position:relative}.search-icon{color:#94a3b8;pointer-events:none;width:16px;height:16px;position:absolute;left:12px}.search-input{color:#1e293b;background:#f3f4f6;border:1px solid #0000;border-radius:8px;outline:none;width:100%;padding:8px 36px;font-size:14px;transition:all .3s}.search-input:focus{background:#fff;border-color:#a855f74d;box-shadow:0 4px 12px #00000008}.clear-search{color:#94a3b8;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:4px;font-size:18px;display:flex;position:absolute;right:10px}.clear-search:hover{color:#64748b}.sidebar-scroll{flex:1;padding:0 8px 20px;overflow-y:auto}.chat-filter-tabs{gap:24px;margin:0 12px;display:flex;position:relative}.chat-filter-tabs:before{content:\"\";background-color:#0000000d;height:1px;position:absolute;bottom:0;left:0;right:0}.chat-filter-tabs button{cursor:pointer;color:#667085;background:0 0;border:none;align-items:center;gap:6px;padding:8px 0;font-size:13px;font-weight:500;transition:all .2s;display:flex;position:relative}.chat-filter-tabs button.active{color:#155dfc;font-weight:600}.chat-filter-tabs button.active:after{content:\"\";z-index:1;background-color:#155dfc;border-radius:2px;height:2px;position:absolute;bottom:0;left:0;right:0}.filter-unread-badge-container{align-items:center;gap:6px;display:flex}.filter-unread-badge{color:#fff;background-color:#f04438;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;padding:0 4px;font-size:11px;font-weight:600;display:flex}.sidebar-scroll::-webkit-scrollbar{width:5px;margin-left:10px}.sidebar-scroll::-webkit-scrollbar-thumb{background:#0000000d;border-radius:10px}.member-search-section{border-top:1px solid #00000008;margin-top:10px;padding:20px 0;animation:.3s fadeIn}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.member-search-section .section-header{color:var(--chat-text);text-transform:uppercase;letter-spacing:1px;padding:0 20px 12px;font-size:11px;font-weight:700}.member-search-section .members-list{max-height:none;padding:0 10px}.member-search-section .member-item{background:0 0;border:none;margin-bottom:4px;padding:10px 12px}.member-search-section .member-item:hover{background:#fff6}.chat-main{background:#ffffff1a;flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.drag-overlay-full{pointer-events:none;z-index:10;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0009;border:3px dashed #a855f7cc;justify-content:center;align-items:center;animation:.2s fadeIn;display:flex;position:absolute;inset:0}.drag-overlay-full .drag-content{color:#fff;text-shadow:0 2px 4px #0000004d;flex-direction:row;align-items:center;gap:12px;display:flex}.drag-overlay-full .drag-icon{font-size:20px;animation:.6s ease-in-out infinite bounce}.chat-list{background:0 0;flex:1;overflow-y:auto}.chat-item{cursor:pointer;border-radius:8px;align-items:center;gap:12px;height:64px;padding:8px;transition:background .1s ease-in-out;display:flex;position:relative}.chat-item:hover{background:#eff6ff99}.chat-item.active{background:#eff6ff}.chat-item-avatar{justify-content:center;align-items:center;width:32px;height:32px;font-size:22px;display:flex;position:relative}.online-indicator{z-index:1;background-color:#22c55e;border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;bottom:-3px;right:2px}.chat-item-info{flex:1;overflow:hidden}.chat-item-name{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.chat-item-last{flex:1;min-width:0}.last-message-text{color:var(--chat-subtext);white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;display:block;overflow:hidden}.info-bottom-right{flex-shrink:0;align-items:center;gap:4px;margin-top:4px;display:flex}.mute-icon-list{color:#94a3b8;flex-shrink:0}.chat-item.active .chat-item-last{color:var(--chat-text)}.unread-badge{color:#fff;z-index:2;background:linear-gradient(135deg,#f43f5e,#e11d48);border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;min-width:18px;height:18px;padding:10px 7px;font-size:10px;font-weight:700;display:flex;position:absolute;top:-4px;right:-4px;box-shadow:0 2px 4px #0000001a}.chat-item-time{color:var(--chat-subtext);white-space:nowrap}.chat-list-section{margin-bottom:16px}.empty-chat-list{padding:12px 8px 4px}.section-header{color:#64748b;text-transform:none;align-items:center;gap:6px;padding:12px 8px 4px;display:flex}.section-icon{color:#94a3b8}.info-top-row{justify-content:space-between;align-items:baseline;margin-bottom:2px;display:flex}.info-bottom-row{justify-content:space-between;align-items:center;display:flex}.unread-badge-circle{color:#fff;background-color:#3b82f6;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;margin-left:8px;padding:0 5px;font-size:10px;font-weight:600;display:flex}.chat-options-wrapper{opacity:0;pointer-events:none;z-index:100;justify-content:center;align-items:center;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;position:absolute;top:50%;right:12px;transform:translateY(-50%)scale(.8)}.chat-item:hover .chat-options-wrapper,.chat-item.has-open-dropdown .chat-options-wrapper{opacity:1;pointer-events:auto;transform:translateY(-50%)scale(1)}.chat-options-btn{-webkit-backdrop-filter:blur(8px);color:#64748b;cursor:pointer;background:#ffffff26;border:1px solid #fff3;border-radius:10px;justify-content:center;align-items:center;width:32px;height:32px;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex}.chat-options-btn:hover,.chat-options-btn.active{color:#1e293b;background:#ffffff4d;border-color:#fff6;transform:scale(1.05)}.chat-options-btn svg{width:18px;height:18px}.chat-options-dropdown{-webkit-backdrop-filter:blur(20px)saturate(160%);z-index:1000;background:#ffffffe6;border:1px solid #fff9;border-radius:14px;flex-direction:column;gap:4px;min-width:160px;padding:6px;animation:.2s cubic-bezier(.4,0,.2,1) dropdownFadeIn;display:flex;position:absolute;top:calc(100% + 8px);right:0;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a}@keyframes dropdownFadeIn{0%{opacity:0;transform:translateY(-10px)scale(.95)}to{opacity:1;transform:translateY(0)scale(1)}}.dropdown-item{color:#334155;cursor:pointer;border-radius:10px;align-items:center;gap:10px;padding:10px 12px;font-size:13px;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{color:#0f172a;background:#0000000a}.dropdown-item.delete{color:#ef4444}.dropdown-item.delete:hover{color:#dc2626;background:#ef444414}.dropdown-icon{flex-shrink:0;width:16px;height:16px}.header-actions{gap:4px;display:flex}.action-btn{color:#667085;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;padding:6px;transition:all .2s;display:flex}.action-btn:hover{color:#101828;background:#f2f4f7}.action-btn.close-btn:hover{color:#ef4444;background:#fee2e2}.add-group-btn{color:#667085;cursor:pointer;background:#f9fafb;border:1px solid #f2f4f7;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s;display:flex}.add-group-btn:hover{color:#101828;background:#f2f4f7;border-color:#eaecf0}.dark-theme .add-group-btn{color:#f8fafc;background:#1e293b66;border-color:#ffffff1a}.dark-theme .add-group-btn:hover{background:#1e293bcc;border-color:#fff3}.theme-toggle{background:#fff6;border:1px solid #ffffff80;border-radius:12px;font-size:16px;transition:all .4s cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px #0000000d}.theme-toggle:hover{background:#fff;box-shadow:0 8px 20px #0000001a;transform:rotate(15deg)scale(1.1)!important}.dark-theme .theme-toggle{color:#f8fafc;background:#1e293b66;border-color:#ffffff1a}.dark-theme .theme-toggle:hover{background:#1e293bcc;border-color:#fff3}.modal-overlay{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:100000;background:#0006;justify-content:center;align-items:center;animation:.3s modalFadeIn;display:flex;position:absolute;inset:0}.modal-content{background:color-mix(in srgb, var(--primary), #ffffffb3 92%);-webkit-backdrop-filter:blur(30px)saturate(150%);border:1px solid #fffc;border-radius:36px;width:90%;max-width:380px;height:85%;padding:32px;animation:.4s cubic-bezier(.175,.885,.32,1.275) modalPopUp;overflow-y:auto;box-shadow:0 30px 60px #00000014}.dark-theme .modal-content{background:color-mix(in srgb, var(--primary), #1e293bb3 90%);color:#f8fafc;border-color:#ffffff1a}.modal-content::-webkit-scrollbar-track{margin:10px 0}.modal-title{color:var(--chat-text);text-align:center;letter-spacing:-.5px;margin-bottom:24px;font-size:22px;font-weight:800}.modal-input{color:#1e293b;background:#fff;border:1px solid #0000000d;border-radius:18px;outline:none;width:100%;margin-bottom:28px;padding:16px 20px;font-size:15px;transition:all .3s}.modal-input:focus{background:#ffffff14;border-color:#155dfc;box-shadow:0 0 0 4px #155dfc26}.members-section{margin-bottom:24px}.section-title{color:#64748b;text-transform:uppercase;letter-spacing:1px;padding-left:4px;font-size:11px;font-weight:700;display:block}.members-list{max-height:250px;margin:0 -4px;padding:4px;overflow-y:auto}.members-list::-webkit-scrollbar{width:5px}.members-list::-webkit-scrollbar-thumb{background:#4f46e533;border-radius:10px}.member-item{cursor:pointer;background:#fff6;border:1px solid #0000;border-radius:16px;align-items:center;gap:14px;padding:12px;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.member-item:hover{background:#fffc}.remove-member-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;margin-left:auto;padding:6px;transition:all .2s;display:flex}.remove-member-btn:hover{color:#ef4444;background:#ef44441a;transform:scale(1.1)}.remove-member-btn svg{width:18px;height:18px}.member-avatar{background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%);border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;display:flex;box-shadow:0 2px 5px #0000000d}.member-name{color:var(--chat-text);flex:1;font-size:14px;font-weight:600}.member-check{color:#fff;border:2px solid #e2e8f0;border-radius:50%;justify-content:center;align-items:center;width:22px;height:22px;font-size:11px;font-weight:700;transition:all .2s;display:flex}.member-item.selected .member-check{background:linear-gradient(135deg,#6366f1,#4f46e5);border-color:#4f46e5;transform:scale(1.1)}.modal-actions{gap:12px;margin-top:8px;display:flex}.modal-btn{cursor:pointer;border:none;border-radius:16px;flex:1;padding:14px;font-size:14px;font-weight:700;transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-btn.cancel{color:#64748b;background:#f1f5f9cc}.modal-btn.cancel:hover{color:#0f172a;background:#f1f5f9}.modal-btn.confirm{color:#fff;background:linear-gradient(135deg,#6366f1,#4f46e5);box-shadow:0 10px 20px -5px #4f46e566}.modal-btn.confirm:hover{transform:translateY(-2px);box-shadow:0 15px 25px -5px #4f46e580}.modal-btn.disabled{color:#cbd5e1;cursor:not-allowed;box-shadow:none;background:#f1f5f9}.empty-chat-state h3{color:#1e293b;margin-bottom:8px;font-size:20px;font-weight:700}.empty-chat-state p{opacity:.8;font-size:15px}.modal-search-wrapper{margin-bottom:20px}.no-members-found{text-align:center;text-align:center;color:#9ca3af;background:#ffffff4d;border:1px dashed #0000000d;border-radius:16px;padding:20px;font-size:14px}.member-item.loading{cursor:not-allowed;opacity:.6}.member-add-action{color:#6366f1;background:#6366f11a;border-radius:6px;margin-left:auto;padding:4px 12px;font-size:13px;font-weight:700;transition:all .2s}.member-item:hover .member-add-action{color:#fff;background:#6366f1}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-12px)}}@keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}@keyframes modalPopUp{0%{opacity:0;transform:scale(.8)translateY(30px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(40px)scale(.9)}to{opacity:1;transform:translateY(0)scale(1)}}.theme-modal{max-width:300px!important;height:auto!important;padding:24px!important}.modal-header{justify-content:space-between;align-items:center;display:flex}.close-modal-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;padding:4px;font-size:24px;line-height:1}.theme-section{flex-direction:column;gap:12px;margin-bottom:24px;display:flex}.section-desc{color:#64748b;margin:0;font-size:13px;line-height:1.5}.color-presets{grid-template-columns:repeat(4,1fr);gap:12px;margin-top:8px;display:grid}.color-preset-btn{aspect-ratio:1;cursor:pointer;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;padding:0;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;box-shadow:0 2px 8px #0000001a}.color-preset-btn:hover{transform:scale(1.1);box-shadow:0 4px 12px #00000026}.color-preset-btn.active{border-color:#334155;transform:scale(1.15)}.check-icon{color:#fff;text-shadow:0 0 2px #00000080;font-size:14px;font-weight:700}.custom-color-picker{background:#fff;border:1px solid #0000000d;border-radius:12px;align-items:center;gap:12px;margin-top:8px;padding:8px 12px;display:flex}.color-input{cursor:pointer;background:0 0;border:none;border-radius:6px;width:32px;height:32px;padding:0;overflow:hidden}.color-input::-webkit-color-swatch-wrapper{padding:0}.color-input::-webkit-color-swatch{border:none;border-radius:6px}.color-hex-code{color:#64748b;font-weight:600}.contact-categories{flex-direction:column;gap:8px;padding:8px;display:flex}.category-item{cursor:pointer;color:var(--chat-text);border-radius:8px;align-items:center;gap:12px;width:100%;height:40px;padding:10px 12px;font-weight:500;transition:all .2s;display:flex}.category-item:hover{color:#1e293b;background:#f1f5f9}.category-item.active{color:#1447e6;background:#eff6ff}.category-item .count{color:#99a1af;border-radius:10px;margin-left:auto;padding:2px 8px}.contact-list-view{background:#fff;flex-direction:column;flex:1;height:100%;display:flex}.contact-list-header{color:var(--chat-text);border-bottom:1px solid #f1f5f9;height:45px;padding:10px 16px}.contact-list-toolbar{justify-content:space-between;align-items:center;padding:12px 16px 20px;display:flex}.toolbar-left{align-items:center;gap:20px;display:flex}.toolbar-left span{color:#64748b;font-weight:500}.toolbar-search{background:#f3f4f6;border-radius:6px;align-items:center;gap:8px;width:300px;height:36px;padding:12px;display:flex}.toolbar-search input{background:0 0;border:none;outline:none;width:100%;font-size:14px}.toolbar-right{gap:12px;height:36px;display:flex}.filter-select{cursor:pointer;color:#1e293b;background:#f3f4f6;border-radius:6px;align-items:center;gap:8px;padding:9px 12px;font-size:14px;display:flex}.dropdown-select{z-index:10;background:#fff;border:1px solid #e2e8f0;border-radius:8px;min-width:150px;margin-top:8px;position:absolute;top:100%;right:0;box-shadow:0 4px 6px #0000001a}.dropdown-select .dropdown-item{cursor:pointer;border-bottom:1px solid #e2e8f0;border-radius:0;align-items:center;gap:8px;height:40px;padding:12px 16px;display:flex}.dropdown-select .dropdown-item div{padding-top:3px}.contact-scroll-area{flex:1;padding:0 16px 16px;overflow-y:auto}.letter-title{color:var(--chat-subtext)}.contact-item-row{justify-content:space-between;align-items:center;height:64px;padding:12px 0;display:flex}.contact-item-left{align-items:center;gap:16px;display:flex}.contact-avatar{width:32px;height:32px;position:relative}.contact-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.contact-avatar .online-status{background:#22c55e;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;bottom:0;right:0}.contact-info{flex-direction:column;display:flex}.contact-name{color:var(--chat-text)}.contact-role{color:var(--chat-subtext)}.contact-item-actions{gap:8px;display:flex}.contact-action-btn{color:#64748b;cursor:pointer;background:#fff;border:1px solid #e2e8f0;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;transition:all .2s;display:flex}.contact-action-btn:hover{color:#1e293b;background:#f1f5f9;border-color:#cbd5e1}.chat-window.fullpage .chat-body-container{background:#fff;overflow:hidden;flex:1!important;width:100%!important;height:100%!important;display:flex!important}.chat-window.fullpage .chat-sidebar{border-right:1px solid var(--chat-border);background:#fff;flex-direction:column;flex-shrink:0;width:312px;display:flex}.chat-window.fullpage .chat-main{background:#fff;flex-direction:column;flex:1;display:flex;position:relative}.chat-main-header{border-bottom:1px solid var(--chat-border);background:#fff;flex-shrink:0;justify-content:space-between;align-items:center;min-height:64px;padding:12px 16px;display:flex}.chat-main-info{align-items:center;gap:10px;min-width:0;display:flex}.chat-main-avatar{flex-shrink:0;width:40px;height:40px}.chat-main-text{flex-direction:column;min-width:0;display:flex}.chat-main-text-container{align-items:center;gap:6px;display:flex}.chat-main-name{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:600;line-height:1.2;overflow:hidden}.chat-main-status{color:#94a3b8;margin-top:1px;font-size:13px}.chat-main-actions{flex-shrink:0;gap:4px;display:flex}.main-action-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:34px;height:34px;transition:all .2s;display:flex}.main-action-btn:hover{color:var(--primary);background:#f1f5f9}.chat-window.fullpage .chat-main-header{min-height:72px;padding:16px 24px}.chat-window.fullpage .chat-main-name{font-size:18px}.chat-window.fullpage .chat-main-actions{gap:8px;display:flex}.chat-window.fullpage .header-info-text{flex-direction:row;align-items:center;gap:6px}.chat-window.fullpage .header-subtitle{margin-top:0;font-size:16px}.chat-window.fullpage .chat-header .action-btn.theme-toggle{box-shadow:none;background:0 0}.chat-window.fullpage .chat-header{background-color:var(--app-sidebar-bg);height:45px;padding:8px 12px}.empty-chat-state{color:#94a3b8;text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;padding:40px;display:flex}.empty-icon{opacity:.5;margin-bottom:24px;font-size:64px}.empty-chat-state h3{color:#1e293b;margin-bottom:8px;font-size:20px}.empty-chat-state p{max-width:280px;font-size:14px;line-height:1.5}.search-section-title{color:#1e293b;align-items:center;gap:8px;margin-bottom:12px;font-size:16px;font-weight:700;display:flex}.search-count{color:#3b82f6;font-size:14px;font-weight:500}.search-section-content{flex-direction:column;gap:8px;display:flex}.search-result-item{cursor:pointer;border-radius:12px;align-items:center;gap:12px;height:64px;padding:8px;transition:all .2s;display:flex}.search-result-item:hover{background:#00000008}.search-result-avatar{border-radius:50%;flex-shrink:0;width:32px;height:32px;overflow:hidden}.search-result-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.avatar-placeholder{color:#fff;background:linear-gradient(135deg,#3b82f6,#2563eb);justify-content:center;align-items:center;width:100%;height:100%;font-size:18px;font-weight:600;display:flex}.search-result-info{flex:1;min-width:0}.search-result-name{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.search-result-sub{color:#64748b;margin-top:2px;font-size:12px}.search-view-all{color:#64748b;cursor:pointer;background:#00000008;border:none;border-radius:8px;width:100%;margin-top:12px;padding:10px;font-size:13px;font-weight:500;transition:all .2s}.search-view-all:hover{color:#1e293b;background:#0000000f}.message-result .search-result-top{justify-content:space-between;align-items:center;margin-bottom:2px;display:flex}.search-result-date{color:#94a3b8;font-size:11px}.search-result-text{color:#475569;-webkit-line-clamp:2;line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;font-size:13px;display:-webkit-box;overflow:hidden}.file-icon-wrapper{color:#3b82f6;background:#3b82f61a;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;font-size:20px;display:flex}.highlight-match{color:var(--primary);font-weight:500}.resize-handle.ne{cursor:ne-resize;z-index:10001;width:15px;height:15px;position:absolute;top:0;right:0}.resize-handle.nw{cursor:nw-resize;z-index:10001;width:15px;height:15px;position:absolute;top:0;left:0}.resize-handle.se{cursor:se-resize;z-index:10001;width:15px;height:15px;position:absolute;bottom:0;right:0}.resize-handle.sw{cursor:sw-resize;z-index:10001;width:15px;height:15px;position:absolute;bottom:0;left:0}\n .chat-input-area{background:#fff;border-top:1px solid #e5e7eb;align-items:center;gap:12px;padding:12px 16px;transition:all .3s;display:flex;position:relative}.chat-input-actions{flex-shrink:0;align-items:center;gap:8px;display:flex}.action-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:6px;transition:all .2s;display:flex}.action-btn:hover{color:#374151;background:#f3f4f6}.action-btn.active{color:var(--primary);background:#f3f4f6}.chat-input-container{flex:1;align-items:center;display:flex}.chat-input{color:#1f2937;background:#f3f4f6;border:1px solid #0000;border-radius:8px;outline:none;width:100%;padding:10px 16px;font-size:14px;transition:all .2s}.chat-input::placeholder{color:#9ca3af}.chat-input:focus{background:#f3f4f6;border-color:#3b82f64d}.chat-input:disabled{opacity:.6;cursor:not-allowed}.send-btn{cursor:pointer;color:#fff;background:var(--primary,#8aaeff);width:36px;height:36px;box-shadow:none;border:none;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s;display:flex}.send-btn:hover:not(:disabled){filter:brightness(.9);transform:translateY(-1px)}.send-btn:disabled{opacity:.6;cursor:not-allowed;background:#d1d5db}.send-btn svg{width:18px;height:18px}.emoji-picker{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:10;background:#fffffff2;border:1px solid #0000000d;border-radius:20px;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:10px;padding:12px;animation:.3s cubic-bezier(.34,1.56,.64,1) emojiSlideUp;display:grid;position:absolute;bottom:100%;left:16px;box-shadow:0 10px 30px #0000001a}@keyframes emojiSlideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.emoji-btn{cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:4px;font-size:20px;transition:all .2s;display:flex}.emoji-btn:hover{background:#fff;transform:scale(1.2);box-shadow:0 2px 5px #0000000d}.selected-files-list{background:#ffffff1a;border-bottom:1px solid #fff3;flex-wrap:nowrap;gap:12px;height:100px;padding:12px 20px;display:flex;overflow:auto hidden}.selected-file-item{background:#fef2f280;border-radius:12px;flex-direction:column;align-items:center;gap:8px;padding:8px;transition:all .2s;display:flex;position:relative;box-shadow:0 2px 8px #00000014}.selected-file-item.other-file{flex-direction:row}.selected-file-item:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001f}.file-preview-image{object-fit:cover;border-radius:8px;width:54px;height:54px;display:block}.file-content-wrapper{flex-direction:row;align-items:center;gap:6px;display:flex}.file-icon{background:#f1f5f9;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;font-size:24px;display:flex}.file-info{flex-direction:column;gap:2px;min-width:0;display:flex}.file-name{color:#475569;white-space:nowrap;text-overflow:ellipsis;width:400px;max-width:100%;font-size:12px;overflow:hidden}.file-size{color:#94a3b8;white-space:nowrap;text-overflow:ellipsis;max-width:120px;font-size:11px;overflow:hidden}.remove-file-btn{color:#fff;cursor:pointer;background:#ef4444;border:none;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;font-size:14px;transition:all .2s;display:flex;position:absolute;top:-8px;right:-8px;box-shadow:0 2px 8px #ef44444d}.remove-file-btn:hover{background:#dc2626;transform:scale(1.1);box-shadow:0 4px 12px #ef444466}.remove-file-btn:disabled{opacity:.5;cursor:not-allowed}.selected-file-item.error-file-item{border:2px solid #ef4444;animation:.3s ease-in-out errorShake}@keyframes errorShake{0%{transform:translate(-3px)}50%{transform:translate(3px)}to{transform:translate(0)}}.selected-file-item.error-file-item:hover{background:#fef2f2b3;border-color:#dc2626}.file-size.error-size{color:#ef4444;font-weight:500}.reply-input-preview{background:#eff6ff;border-left:2px solid #2b7fff;border-top-left-radius:2px;border-bottom-left-radius:2px;justify-content:space-between;align-items:center;margin:0 10px 10px;padding:5px 20px;animation:.3s slideUp;display:flex;position:relative}.reply-content{flex-direction:column;flex:1;gap:2px;min-width:0;padding-left:18px;display:flex}.reply-user{color:#155dfc;margin-bottom:2px;font-size:.85rem;font-weight:700}.reply-user span{color:var(--primary,#155dfc)}.reply-text{color:#4a5565;white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;overflow:hidden}.close-reply{color:#9ca3af;cursor:pointer;background:0 0;border:none;font-size:14px;transition:all .2s;position:absolute;top:0;right:0}.reply-icon{color:#155dfc;position:absolute;top:6px;left:10px}.close-reply:hover{color:#ef4444;transform:scale(1.1)}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.voice-recording-container{background:linear-gradient(135deg,#ef44441a,#ef44440d);border:1px solid #ef444433;flex:1;align-items:center;gap:12px;padding:12px 16px;animation:.2s slideUp;display:flex}.voice-recording-info{flex:1;align-items:center;gap:8px;display:flex}.recording-indicator{color:#374151;align-items:center;gap:6px;font-size:13px;font-weight:500;display:flex}.recording-dot{background:#ef4444;border-radius:50%;width:8px;height:8px;animation:1.5s ease-in-out infinite recordingPulse}@keyframes recordingPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}}.recording-duration{color:#374151;text-align:right;min-width:45px;font-size:13px;font-weight:600}.voice-recorded-container{background:linear-gradient(135deg,#3b82f61a,#3b82f60d);border:1px solid #3b82f633;flex:1;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;animation:.2s slideUp;display:flex}.voice-recorded-info{flex:1;align-items:center;gap:8px;font-size:13px;display:flex}.voice-label{color:#1f2937;white-space:nowrap;font-weight:500}.voice-duration{color:#3b82f6;text-align:right;min-width:45px;margin-left:auto;font-weight:600}.voice-control-btn{color:#1f2937;cursor:pointer;background:#fff;border:1px solid #0000001a;border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;font-size:14px;transition:all .2s;display:flex}.voice-control-btn:hover{background:#f9fafb;transform:scale(1.05)}.voice-control-btn.cancel-btn{color:#ef4444;background:#ef44440d;border-color:#ef44441a}.voice-control-btn.add-btn{color:#fff;background:#8aaeff;border-color:#8aaeff}\n .message-list-wrapper{flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.message-list{background:#f9fafb80;flex-direction:column-reverse;flex:1;gap:20px;padding:24px 20px;display:flex;overflow:hidden auto}.chat-date-divider{justify-content:center;align-items:center;width:100%;margin:20px 0;display:flex}.chat-date-divider span{color:#64748b;background:#f1f5f9;border-radius:20px;padding:4px 16px;font-size:12px;font-weight:500;box-shadow:0 1px 2px #0000000d}.message-item{gap:4px 8px;max-width:70%;display:flex;position:relative}.message-content{flex-direction:column;gap:4px;width:fit-content;max-width:100%;display:flex}.message-item.current-user .message-content{align-items:flex-end}.message-item.other-user .message-content{align-items:flex-start}.message-content-container{flex-direction:column;gap:12px;display:flex;position:relative}.message-item.current-user{flex-direction:row-reverse;align-self:flex-end}.message-item.other-user{align-self:flex-start}.message-bubble.current-user{background:#155dfc;align-self:flex-end}.message-bubble.other-user{background:#f3f4f6;border-radius:8px 16px 16px;align-self:flex-start}.message-avatar{object-fit:cover;border:2px solid #ffffff4d;border-radius:50%;flex-shrink:0;width:40px;height:40px;transition:transform .2s;box-shadow:0 4px 12px #00000026}.message-bubble{border-radius:16px 8px 16px 16px;grid-template-columns:minmax(0,1fr);padding:10px 16px;font-size:15px;line-height:1.6;display:grid;position:relative}.message-files{grid-template-columns:repeat(2,minmax(145px,1fr));align-content:start;gap:8px;max-width:100%;display:grid}.message-files>*{aspect-ratio:1.5;width:100%}.message-item .message-files>:last-child:nth-child(odd){grid-column:span 2}.message-item.current-user .message-files{align-self:flex-end}.message-item.other-user .message-files{align-self:flex-start}.file-item{cursor:pointer;background:#ffffff26;border:1px solid #fff3;border-radius:8px;align-items:center;gap:10px;max-height:60px;padding:8px 12px;text-decoration:none;transition:all .2s;display:flex}.file-item:hover{background:#ffffff40;border-color:#ffffff4d;transform:translate(4px)}.file-icon{flex-shrink:0;font-size:18px}.file-info{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.file-size{opacity:.7;color:inherit;font-size:11px}.file-image-wrapper{border-radius:8px;justify-content:center;align-items:center;max-width:100%;max-height:288px;margin-top:0;display:flex;position:relative;overflow:hidden}.file-image{object-fit:cover;cursor:pointer;border:1px solid #fff3;border-radius:8px;width:100%;height:100%;transition:transform .2s}.file-image:hover{transform:scale(1.05)}.image-overlay-more{cursor:pointer;background:#00000080;border-radius:8px;justify-content:center;align-items:center;width:100%;height:100%;transition:all .2s;display:flex;position:absolute;top:0;left:0}.image-overlay-more:hover{background:#000000a6}.image-overlay-text{color:#fff;text-shadow:0 2px 4px #0000004d;font-size:28px;font-weight:600}.user .file-image{border-color:#ffffff4d}.message-actions-bar{-webkit-backdrop-filter:none;box-shadow:none;opacity:0;pointer-events:none;z-index:100;background:0 0;border:none;gap:2px;padding:0;transition:all .2s;display:flex;position:absolute;bottom:0}.message-item:hover .message-actions-bar{opacity:1;pointer-events:auto}.message-item.current-user .message-actions-bar{right:calc(100% + 8px)}.message-item.other-user .message-actions-bar{left:calc(100% + 8px)}.chat-window:not(.fullpage) .message-list{overflow-x:hidden}.chat-window:not(.fullpage) .message-item.current-user .message-actions-bar,.chat-window:not(.fullpage) .message-item.other-user .message-actions-bar{-webkit-backdrop-filter:blur(8px);background:#ffffffe6;border:1px solid #0000000d;border-radius:20px;gap:2px;padding:2px 6px;display:flex;inset:auto 0 -22px auto;transform:none;box-shadow:0 2px 8px #00000014}.chat-window:not(.fullpage) .message-item.other-user .message-member-name{margin-right:0}.chat-window:not(.fullpage) .action-icon svg{width:13px;height:13px}.chat-window:not(.fullpage) .action-icon{width:26px;height:26px}.action-icon{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.action-icon svg{stroke-width:2.2px;width:16px;height:16px}.action-icon:hover{background:#0000000d;transform:translateY(-2px)}.action-icon[title=Xóa]:hover,.action-icon[title=Thu\\ hồi]:hover{color:#ef4444;background:#ef44441a}.action-icon[title=Trả\\ lời]:hover{color:#3b82f6;background:#3b82f61a}.action-icon[title=Thích]:hover{color:#f59e0b;background:#f59e0b1a}.action-icon[title=Yêu\\ thích]:hover{color:#ec4899;background:#ec48991a}.message-reactions-badge{z-index:10;background:#fffffff2;border:1px solid #0000000d;border-radius:10px;align-items:center;gap:2px;padding:2px 6px;font-size:13px;animation:.3s cubic-bezier(.175,.885,.32,1.275) popIn;display:flex;position:absolute;bottom:-11px;box-shadow:0 2px 8px #0000001a}.message-reactions-badge span{line-height:1}.message-item.current-user .message-reactions-badge{right:8px}.message-item.other-user .message-reactions-badge{left:8px}@keyframes popIn{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.message-reply-preview{cursor:pointer;background:#0000001a;border-left:3px solid #ffffff80;border-radius:8px;min-width:120px;margin-bottom:8px;padding:6px 10px;font-size:.8rem;transition:all .2s}.message-bubble.other-user .message-reply-preview{border-left-color:var(--primary,#155dfc);background:#0000000d}.message-reply-preview:hover{background:#00000026}.reply-user-name{color:#fffffff2;white-space:nowrap;text-overflow:ellipsis;margin-bottom:2px;font-size:.75rem;font-weight:700;overflow:hidden}.message-bubble.other-user .reply-user-name{color:var(--primary,#155dfc)}.reply-content-text{color:#fffc;white-space:nowrap;text-overflow:ellipsis;font-size:.8rem;overflow:hidden}.message-bubble.other-user .reply-content-text{color:#475569}.message-text{overflow-wrap:break-word;word-break:break-word;width:auto;display:inline-block}.message-bubble.other-user .message-text{color:var(--chat-text)}.message-bubble.current-user .message-text{color:var(--primary-contrast,#f8fafc)}.message-bubble.other-user.revoked .message-text,.message-bubble.current-user.revoked .message-text{color:color-mix(in srgb, var(--chat-text), transparent 50%)}.message-member-name{color:#475569;white-space:nowrap;text-overflow:ellipsis;min-width:0;margin-bottom:4px;font-size:15px;font-weight:500;overflow:hidden}.scroll-bottom-btn{-webkit-backdrop-filter:blur(8px);cursor:pointer;color:#4f46e5;z-index:1000;background:#ffffffb3;border:1px solid #ffffff4d;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;transition:all .3s cubic-bezier(.4,0,.2,1);animation:.3s fadeInPop;display:flex;position:absolute;bottom:20px;right:20px;box-shadow:0 4px 15px #00000026}.scroll-bottom-btn:hover{background:#fff;transform:translateY(-4px);box-shadow:0 6px 20px #0003}.unread-dot{background-color:#ff4d4f;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;top:0;right:0}@keyframes fadeInPop{0%{opacity:0;transform:scale(.5)translateY(20px)}to{opacity:1;transform:scale(1)translateY(0)}}.message-time{color:var(--chat-text);margin-top:2px;font-size:10px;font-weight:500}.message-item.current-user .message-time{text-align:right;margin-right:4px}.message-item.other-user .message-time{text-align:left;margin-left:4px}.message-item-status{color:var(--chat-text);margin-left:4px;font-size:10px;font-weight:400}.message-item-status.seen{color:#3b82f6;font-weight:600}.message-item-status.seen svg{margin-bottom:-2px}.message-bubble.revoked{opacity:.8;background:#ffffff0d;border:1px dashed #fff3;font-style:italic}@keyframes highlight-fade{0%{background-color:rgba(var(--primary-rgb), .2);transform:scale(1.02)}to{background-color:#0000;transform:scale(1)}}.highlight-message .message-bubble{animation:2s ease-out highlight-fade}.see-more-btn{color:#3b82f6;cursor:pointer;margin-left:8px;font-size:.85em;font-weight:600;text-decoration:none;transition:all .2s;display:inline-block}.message-bubble.current-user .see-more-btn{color:#ffffffe6;text-decoration:underline}.see-more-btn:hover{filter:brightness(1.1);text-decoration:underline}.message-bubble.current-user .see-more-btn:hover{color:#fff}\n .file-viewer-overlay{z-index:100001;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#000000e6;justify-content:center;align-items:center;animation:.2s ease-in-out fadeIn;display:flex;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.file-viewer-content{flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;animation:.3s ease-out slideUp;display:flex;position:relative}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.file-viewer-main{border-radius:8px;justify-content:center;align-items:center;max-width:100%;max-height:70vh;display:flex;position:relative;overflow:hidden}.file-viewer-image{object-fit:contain;border-radius:8px;max-width:100%;max-height:70vh;box-shadow:0 10px 40px #0000004d}.file-viewer-main:has(.file-viewer-video){overflow:visible}.file-viewer-video{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%;box-shadow:0 10px 40px #0000004d}.video-container{justify-content:center;width:85vw;height:78vh;display:flex;overflow:visible}.file-viewer-close{color:#fff;cursor:pointer;z-index:100001;text-align:center;background:#fff3;border:1px solid #ffffff4d;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-size:24px;transition:all .2s;display:flex;position:absolute;top:30px;right:70px}.file-viewer-close:hover{background:#ffffff4d;border-color:#fff6;transform:scale(1.1)}.file-viewer-close:active{transform:scale(.95)}.file-viewer-nav{color:#fff;cursor:pointer;z-index:100001;text-align:center;background:#ffffff26;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-size:32px;transition:all .2s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.file-viewer-nav:hover{background:#ffffff40;border-color:#ffffff4d}.file-viewer-nav:active{transform:translateY(-50%)scale(.95)}.file-viewer-prev{left:70px}.file-viewer-next{right:70px}@media (width<=768px){.file-viewer-prev{left:10px}.file-viewer-next{right:10px}.file-viewer-close{top:10px;right:10px}}.file-viewer-counter{color:#fff;white-space:nowrap;z-index:100001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#00000080;border-radius:20px;padding:8px 16px;font-size:14px;font-weight:500;position:absolute;bottom:20px;left:50%;transform:translate(-50%)}.file-viewer-thumbnails-container{z-index:100001;opacity:0;pointer-events:none;visibility:hidden;justify-content:center;align-items:center;gap:2rem;width:100%;padding-bottom:3.5rem;display:flex;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.file-viewer-thumbnails{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#0000004d;border-radius:8px;gap:8px;max-width:60%;padding-top:12px;padding-bottom:12px;display:flex;overflow-x:auto;-webkit-mask-image:linear-gradient(90deg,#0000 0%,#000 10% 90%,#0000 100%);mask-image:linear-gradient(90deg,#0000 0%,#000 10% 90%,#0000 100%)}.file-viewer-counter:hover~.file-viewer-thumbnails-container,.file-viewer-thumbnails-container:hover{opacity:1;visibility:visible;pointer-events:auto}.file-viewer-thumbnails::-webkit-scrollbar{height:4px}.file-viewer-thumbnails::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:2px}.file-viewer-thumbnails::-webkit-scrollbar-thumb:hover{background:#ffffff80}.file-viewer-thumbnails-scroll-btn{color:#fff;cursor:pointer;z-index:100002;-webkit-backdrop-filter:blur(10px)saturate(180%);backdrop-filter:blur(10px)saturate(180%);background:#fff3;border:1px solid #ffffff4d;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;font-size:18px;transition:all .3s;display:flex;box-shadow:0 8px 32px #1f26875e}.file-viewer-thumbnails-scroll-btn:hover{background:#ffffff4d;border-color:#ffffff80;transform:scale(1.05);box-shadow:0 8px 32px #1f268780}.file-viewer-thumbnails-scroll-btn:active{transform:scale(.95)}.file-viewer-thumbnail{cursor:pointer;background:#0000004d;border:2px solid #0000;border-radius:4px;width:60px;min-width:60px;height:60px;padding:0;transition:all .2s;overflow:hidden}.file-viewer-thumbnail:hover{background:#0006;border-color:#ffffff80}.file-viewer-thumbnail.active{background:#0003;border-color:#fffc}.thumbnail-image{object-fit:cover;width:100%;height:100%}.thumbnail-video{object-fit:cover;z-index:1;cursor:pointer;width:100%;height:100%}.video-thumbnail-container{border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative;overflow:hidden}.play-icon-overlay{z-index:2;pointer-events:none;cursor:pointer;background-color:#00000080;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;display:flex;position:absolute}.play-arrow{color:#fff;margin-bottom:3px;margin-left:2px;font-size:18px}.file-viewer-overlay:has(.file-viewer-audio){background:0 0}.file-viewer-main:has(.file-viewer-audio){overflow:visible}.audio-container{justify-content:center;align-items:center;width:100vw;height:100vh;display:flex;overflow:visible}.audio-player-wrapper{-webkit-backdrop-filter:blur(30px)saturate(150%);backdrop-filter:blur(30px)saturate(150%);color:#1e293b;z-index:1000;background:#ffffff4d;border:1px solid #ffffff80;border-radius:8px;flex-direction:column;flex-shrink:0;justify-content:center;align-items:center;gap:12px;width:100%;max-width:500px;padding:24px 20px;display:flex;position:relative;box-shadow:0 0 0 100vmax #000000e6}.file-viewer-audio{width:100%;height:40px}.file-viewer-audio::-webkit-media-controls-panel{background-color:#ffffff1a}.audio-name{color:#000;text-align:center;word-break:break-word;max-width:100%;margin:0;font-size:16px}.audio-thumbnail-container{background:linear-gradient(135deg,#6496ff80 0%,#c864ff80 100%);border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.audio-thumbnail-icon{font-size:28px}.pdf-thumbnail-container{background:linear-gradient(135deg,#f5222dcc 0%,#ff7a45cc 100%);border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.pdf-thumbnail-icon{font-size:28px}@media (width<=1024px){.file-viewer-content{max-width:95%}.file-viewer-image{max-height:60vh}.file-viewer-nav{width:40px;height:40px;font-size:24px}}@media (width<=600px){.file-viewer-overlay{inset:0}.file-viewer-content{max-width:100%;max-height:100vh}.file-viewer-main,.file-viewer-image{max-height:50vh}.file-viewer-nav{width:36px;height:36px;font-size:20px}.file-viewer-prev{left:10px}.file-viewer-next{right:10px}.file-viewer-close{width:36px;height:36px;font-size:20px;top:10px;right:10px}.file-viewer-counter{padding:6px 12px;font-size:12px;bottom:60px}.file-viewer-thumbnails{max-width:100%;padding:8px}.file-viewer-thumbnails-scroll-btn{width:32px;height:32px;font-size:16px}.file-viewer-thumbnail{width:50px;min-width:50px;height:50px}}.file-viewer-main:has(.file-viewer-pdf){overflow:visible}.file-viewer-content:has(.file-viewer-pdf) .file-viewer-close{top:5rem}.pdf-container{justify-content:center;width:100vw;height:100vh;display:flex;overflow:visible}.file-viewer-pdf{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%;box-shadow:0 10px 40px #0000004d}\n .toast-container{z-index:100000;pointer-events:none;flex-direction:column;gap:10px;display:flex;position:absolute;bottom:24px;right:24px}.toast-item{pointer-events:auto;-webkit-backdrop-filter:blur(15px)saturate(150%);color:#1e293b;background:#fffc;border:1px solid #fff9;border-radius:20px;align-items:center;gap:12px;min-width:500px;max-width:calc(100% - 40px);padding:12px 16px;font-size:14px;font-weight:500;animation:.4s cubic-bezier(.175,.885,.32,1.275) toast-pop-in;display:flex;position:relative;overflow:hidden;box-shadow:0 4px 6px -1px #0000000d,0 10px 15px -3px #0000001a}.toast-item:before{content:\"\";width:4px;transition:background .3s;position:absolute;top:0;bottom:0;left:0}.toast-item.success:before{background:#10b981}.toast-item.error:before{background:#ef4444}.toast-item.info:before{background:#3b82f6}.toast-item.warning:before{background:#f59e0b}.toast-item span{background:#00000008;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;display:flex}.toast-item button{cursor:pointer;color:#94a3b8;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;padding:4px;transition:all .2s;display:flex}.toast-item button:hover{color:#1e293b;background:#0000000d}@keyframes toast-pop-in{0%{opacity:0;transform:translate(20px)scale(.9)}to{opacity:1;transform:translate(0)scale(1)}}.dark-theme .toast-item{color:#f8fafc;background:#1e293bb3;border-color:#ffffff14;box-shadow:0 20px 25px -5px #0003}.dark-theme .toast-item span{background:#ffffff0d}.toast-message{flex:1}.toast-actions{gap:8px;margin-top:10px;display:flex}.toast-btn{cursor:pointer;border-radius:4px;padding:4px 10px;font-size:12px;transition:all .2s}.toast-btn.cancel{color:inherit;background:#ffffff1a;border:1px solid #ffffff4d}.toast-btn.confirm{color:#fff;border:none;font-weight:700}.toast-item.warning .toast-btn.confirm{background:#ff9800}.toast-item.success .toast-btn.confirm,.toast-item.info .toast-btn.confirm{background:#2196f3}.toast-close-btn{cursor:pointer;opacity:.5;color:inherit;background:0 0;border:none;justify-content:center;align-items:center;padding:0 0 0 8px;font-size:16px;display:flex}\n .side-bar-info-chat{border-left:1px solid var(--chat-border);background:#fff;flex-direction:column;flex-shrink:0;width:320px;display:flex}.info-header{justify-content:flex-end;padding:16px;display:flex}.close-info-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:4px;padding:4px}.close-info-btn:hover{background:#f1f5f9}.info-content-scroll{flex-direction:column;flex:1;padding:0 20px 20px;display:flex;overflow-y:auto}.info-content-scroll::-webkit-scrollbar{width:4px}.info-content-scroll::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:10px}.info-basic-section{text-align:center;flex-direction:column;align-items:center;display:flex}.info-avatar-large{width:80px;height:80px}.info-avatar-large .chat-avatar{font-size:24px}.info-main-details{flex-direction:column;display:flex}.info-chat-name{color:#1e293b;justify-content:center;align-items:center;gap:8px;margin-top:12px;margin-bottom:4px;font-size:18px;font-weight:700;display:flex}.info-status-icons{color:#94a3b8;gap:4px;display:flex}.info-member-count{color:#64748b;margin-top:0;margin-bottom:10px;font-size:14px}.info-quick-actions{justify-content:space-around;margin-bottom:24px;display:flex}.action-item{cursor:pointer;flex-direction:column;align-items:center;gap:8px;display:flex}.action-icon-info{color:#475569;background:#f8fafc;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:80px;height:60px;transition:all .2s;display:flex}.action-item:hover .action-icon-info{color:var(--primary);background:#f1f5f9}.action-item span{color:#475569;font-size:13px;font-weight:500}.menu-item{cursor:pointer;color:#1e293b;border-radius:8px;justify-content:space-between;align-items:center;padding:10px 12px;font-size:15px;font-weight:500;display:flex}.menu-item:hover{background:#f8fafc}.menu-left{align-items:center;gap:12px;display:flex}.info-members-section{padding:16px 0}.section-title-row{color:#64748b;justify-content:space-between;align-items:center;margin-bottom:12px;padding:0 4px;font-size:14px;font-weight:600;display:flex}.title-actions{color:#94a3b8;gap:8px;display:flex}.title-actions svg{cursor:pointer}.arrow-icon{transition:transform .2s}.arrow-icon.collapsed{transform:rotate(-180deg)}.member-item-left.clickable{cursor:pointer}.members-compact-list{flex-direction:column;display:flex}.members-facepile{align-items:center;padding:8px 4px;display:flex}.facepile-item{z-index:1;border:2px solid #fff;border-radius:50%;width:32px;height:32px;margin-left:-8px;transition:transform .2s;position:relative}.facepile-item:first-child{margin-left:0}.facepile-item:hover{z-index:10;transform:translateY(-4px)}.facepile-item .member-avatar-small{width:100%;height:100%}.facepile-item .online-status{border-width:1.5px;width:8px;height:8px;bottom:0;right:0}.facepile-more{color:#64748b;z-index:0;cursor:pointer;background:#f1f5f9;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;margin-left:-8px;font-size:11px;font-weight:700;display:flex}.facepile-more:hover{background:#e2e8f0}.member-compact-item{border-radius:8px;justify-content:space-between;align-items:center;padding:8px;transition:background .2s;display:flex;position:relative}.member-compact-item:hover{background:#f8fafc}.member-item-left{align-items:center;gap:8px;display:flex}.member-avatar-small{border-radius:50%;width:32px;height:32px;position:relative}.member-avatar-small img,.member-img{object-fit:cover;border-radius:50%;width:100%;height:100%;display:block}.member-initials{background:var(--primary);color:#fff;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:12px;font-weight:600;display:flex}.member-info{flex-direction:column;gap:2px;display:flex}.member-options-container{align-items:center;display:flex;position:relative}.member-options-btn{color:#94a3b8;cursor:pointer;opacity:0;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:6px;transition:all .2s;display:flex}.member-compact-item:hover .member-options-btn{opacity:1}.member-options-btn:hover{color:#475569;background:#e2e8f0}.member-dropdown-menu{z-index:100;background:#fff;border:1px solid #f1f5f9;border-radius:12px;width:190px;margin-top:4px;padding:6px;animation:.2s fadeIn;position:absolute;top:100%;right:0;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}@keyframes fadeIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.dropdown-item{color:#1e293b;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:10px;width:100%;padding:10px 12px;font-size:14px;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{background:#f1f5f9}.dropdown-item.delete{color:#ef4444}.dropdown-item.delete:hover{background:#fef2f2}.dropdown-item svg{flex-shrink:0}.member-name-row{align-items:center;gap:4px;width:fit-content;display:flex}.member-role{color:#64748b;font-size:12px}.online-status{background:#22c55e;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;bottom:0;right:0}.info-summary-section{padding:16px 0}.info-summary-section .section-title{color:#64748b;margin-bottom:12px;font-size:14px;font-weight:600}.summary-tabs{background:#f1f5f9;border-radius:8px;margin-bottom:16px;padding:4px;display:flex}.tab-item{text-align:center;color:#64748b;cursor:pointer;border-radius:6px;flex:1;padding:6px;font-size:13px}.tab-item.active{color:#1e293b;background:#fff;font-weight:600;box-shadow:0 1px 3px #0000001a}.file-item{border-radius:8px;align-items:center;gap:12px;padding:8px;display:flex}.file-item:hover{background:#f8fafc}.file-icon{background:#f1f5f9;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.file-details{flex-direction:column;flex:1;min-width:0;display:flex}.file-name{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:500;overflow:hidden}.file-size{color:#94a3b8;font-size:12px}.file-download-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;padding:4px}.file-download-btn:hover{color:var(--primary)}.group-management-view,.main-info-view{animation:.25s ease-out fadeInSlide}@keyframes fadeInSlide{0%{opacity:0;transform:translate(15px)}to{opacity:1;transform:translate(0)}}.header-left{flex:1;align-items:center;gap:12px;display:flex}.back-info-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:4px;display:flex}.back-info-btn:hover{background:#f1f5f9}.management-section{padding:16px 0}.management-section.border-top{border-top:1px solid #f1f5f9}.section-subtitle{color:#64748b;margin-bottom:16px;padding:0 4px;font-size:14px}.settings-list{flex-direction:column;display:flex}.setting-item{cursor:pointer;justify-content:space-between;align-items:center;padding:12px 4px;transition:background .2s;display:flex}.setting-item span{color:#1e293b;flex:1;padding-right:12px;font-size:14px;line-height:1.4}.setting-item input[type=checkbox]{width:18px;height:18px;accent-color:var(--primary);cursor:pointer}.setting-item-switch{justify-content:space-between;align-items:center;padding:12px 4px;display:flex}.setting-info{flex:1;align-items:center;gap:8px;display:flex}.setting-info span{color:#1e293b;max-width:200px;font-size:14px;line-height:1.4}.help-icon{color:#94a3b8;cursor:pointer}.switch{flex-shrink:0;width:36px;height:20px;display:inline-block;position:relative}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;background-color:#e2e8f0;transition:all .4s;position:absolute;inset:0}.slider:before{content:\"\";background-color:#fff;width:14px;height:14px;transition:all .4s;position:absolute;bottom:3px;left:3px}input:checked+.slider{background-color:var(--primary)}input:checked+.slider:before{transform:translate(16px)}.slider.round{border-radius:20px}.slider.round:before{border-radius:50%}.management-menu{flex-direction:column;display:flex}.management-menu .menu-item{padding:12px 4px}.management-menu .menu-left svg{color:#64748b}.info-panel-clear-history{color:#d4183d;cursor:pointer;background:0 0;border:none;place-self:center;gap:4px;padding:7px 12px;display:flex}.info-panel-clear-history>span{margin-top:1px}\n .app-sidebar{background:var(--app-sidebar-bg);flex-direction:column;flex-shrink:0;align-items:center;gap:32px;width:64px;padding:12px 12px 24px;display:flex}.app-nav{flex-direction:column;flex:1;gap:16px;display:flex}.nav-item{color:#64748b;cursor:pointer;border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;display:flex}.nav-item:hover{background:var(--active-item-bg);color:var(--primary)}.nav-item.active{background:var(--primary);color:var(--primary-contrast)}.nav-separator{opacity:.8;background:#98a8b3;width:40px;height:1px;margin:4px 0}.app-sidebar-footer{flex-direction:column;align-items:center;gap:20px;padding-bottom:8px;display:flex}.app-avatar{background:#f1f5f9;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;display:flex;overflow:hidden;box-shadow:0 2px 8px #0000000d}.app-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.app-avatar-fallback{color:#64748b;justify-content:center;align-items:center;width:100%;height:100%;font-size:14px;font-weight:700;display:flex}\n .modal-overlay{z-index:9999;-webkit-backdrop-filter:blur();backdrop-filter:blur();background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.profile-modal-content{background:#fff;border-radius:20px;width:400px;padding:30px;animation:.3s cubic-bezier(.34,1.56,.64,1) modalScaleUp;position:relative;box-shadow:0 20px 40px #0003}@keyframes modalScaleUp{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.close-modal-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:5px;transition:all .2s;display:flex;position:absolute;top:20px;right:20px}.close-modal-btn:hover{color:#475569;background:#f1f5f9}.profile-header{text-align:center;margin-bottom:25px}.profile-avatar-wrapper{width:90px;height:90px;margin:0 auto 15px;position:relative}.profile-avatar-wrapper img{object-fit:cover;border:4px solid #f8fafc;border-radius:50%;width:100%;height:100%}.profile-avatar-placeholder{color:#fff;background:#3b82f6;border:4px solid #f8fafc;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:36px;font-weight:600;display:flex}.profile-online-status{background:#22c55e;border:3px solid #fff;border-radius:50%;width:16px;height:16px;position:absolute;bottom:5px;right:5px}.profile-name{color:#1e293b;margin-bottom:4px;font-size:20px;font-weight:700}.status-text{color:#64748b;font-size:13px}.profile-actions{gap:12px;margin-bottom:30px;display:flex}.profile-action-btn{cursor:pointer;color:#475569;background:#f8fafc;border:none;border-radius:12px;flex-direction:column;flex:1;align-items:center;gap:6px;padding:12px 8px;transition:all .2s;display:flex}.profile-action-btn:hover{color:#3b82f6;background:#f1f5f9;transform:translateY(-2px)}.profile-action-btn svg{color:#64748b;transition:color .2s}.profile-action-btn:hover svg{color:#3b82f6}.profile-action-btn span{font-size:13px;font-weight:600}.profile-details{border-top:1px solid #f1f5f9;padding-top:10px}.detail-item{border-bottom:1px solid #f1f5f9;justify-content:flex-start;align-items:center;padding:12px 0;font-size:14px;display:flex}.detail-item:last-child{border-bottom:none}.detail-item .label{color:#64748b;flex-shrink:0;width:110px}.detail-item .value{color:#1e293b;font-size:16px;font-weight:400}.value.email,.value.phone{color:#3b82f6;cursor:pointer}.value.email:hover,.value.phone:hover{text-decoration:underline}\n .modal-content.add-chat-modal{background:#fff;border:1px solid #0000000d;border-radius:10px;flex-direction:column;width:450px;max-width:450px;height:auto;min-height:430px;max-height:90vh;padding:0;display:flex;overflow:hidden;box-shadow:0 10px 40px #0000001a}.add-chat-modal .modal-header{justify-content:space-between;align-items:center;padding:16px 20px 0;display:flex}.add-chat-modal .modal-title{color:#1f2937;text-align:left;margin:0;font-size:18px;font-weight:600}.add-chat-modal .close-modal-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:4px;transition:background .2s;display:flex}.add-chat-modal .close-modal-btn:hover{color:#111827;background:#f3f4f6}.add-chat-modal .modal-body{flex-direction:column;flex:1;gap:8px;padding:20px 20px 0;display:flex;overflow:hidden}.add-chat-modal .group-info-section{align-items:center;gap:16px;display:flex}.add-chat-modal .group-avatar-upload{flex-shrink:0}.add-chat-modal .avatar-placeholder{color:#9ca3af;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex;position:relative}.add-chat-modal .upload-icon{color:#6b7280;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:50%;justify-content:center;align-items:center;width:18px;height:18px;display:flex;position:absolute;bottom:-2px;right:-2px}.add-chat-modal .preview-avatar{object-fit:cover;border-radius:100%;width:100%;height:100%}.add-chat-modal .group-name-input{border:none;border-bottom:1px solid #e5e7eb;outline:none;flex:1;padding:8px 0;font-size:16px;transition:border-color .2s}.add-chat-modal .group-name-input:focus{border-bottom-color:#3b82f6}.add-chat-modal .search-section .chat-search-bar{padding:0}.add-chat-modal .search-section .search-input{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:10px 16px 10px 40px;font-size:15px}.add-chat-modal .search-section .search-icon{left:16px}.add-chat-modal .selected-members-tags{flex-wrap:wrap;gap:8px;display:flex}.add-chat-modal .member-tag{color:#2563eb;background:#eff6ff;border-radius:100px;align-items:center;gap:6px;padding:4px 10px;font-size:14px;font-weight:500;display:flex}.add-chat-modal .member-tag>span{margin-bottom:-4px}.add-chat-modal .remove-tag-btn{color:#2563eb;cursor:pointer;opacity:.7;background:0 0;border:none;justify-content:center;align-items:center;padding:2px;transition:opacity .2s;display:flex}.add-chat-modal .remove-tag-btn:hover{opacity:1}.modal-content.add-chat-modal.has-tags{height:550px}.add-chat-modal .members-list-container{border-top:1px solid #f3f4f6;flex:1;margin:0 -20px;padding:0 7px;overflow-y:hidden}.add-chat-modal .members-list{margin:0;padding:12px 0}.add-chat-modal .member-item{cursor:pointer;background:0 0;border-radius:10px;align-items:center;gap:12px;padding:10px 12px;transition:background .2s;display:flex}.add-chat-modal .member-item.selected{background:#f0f7ff}.add-chat-modal .member-item:hover{background:#f9fafb}.add-chat-modal .member-item.selected:hover{background:#e0efff}.add-chat-modal .member-checkbox{flex-shrink:0}.add-chat-modal .checkbox-custom{border:1.5px solid #d1d5db;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;transition:all .2s;display:flex}.add-chat-modal .checkbox-custom.checked{background:#3b82f6;border-color:#3b82f6}.add-chat-modal .member-avatar-wrapper{width:32px;height:32px;position:relative}.add-chat-modal .member-avatar{color:#4b5563;background:#f3f4f6;border:none;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:14px;font-weight:600;display:flex;overflow:hidden}.add-chat-modal .member-avatar img{object-fit:cover;width:100%;height:100%}.add-chat-modal .avatar-letter{color:#fff;background:linear-gradient(135deg,#6366f1,#a855f7);justify-content:center;align-items:center;width:100%;height:100%;display:flex}.add-chat-modal .status-dot{width:12px;height:12px;position:absolute;bottom:-1px;right:-1px}.add-chat-modal .member-name{color:#374151;font-size:15px;font-weight:500}.add-chat-modal .modal-footer{border-top:1px solid #f3f4f6;justify-content:flex-end;gap:12px;padding:11px 20px;display:flex}.add-chat-modal .footer-btn{cursor:pointer;border:none;border-radius:10px;padding:10px 24px;font-size:15px;font-weight:600;transition:all .2s}.add-chat-modal .footer-btn.cancel{color:#4b5563;background:#f3f4f6}.add-chat-modal .footer-btn.cancel:hover{background:#e5e7eb}.add-chat-modal .footer-btn.confirm{color:#fff;background:#3b82f6}.add-chat-modal .footer-btn.confirm:hover:not(.disabled){background:#7a9ce9}.add-chat-modal .footer-btn.disabled{opacity:.6;cursor:not-allowed}.display-none{display:none}.modal-content.update-group-modal{background:#fff;border:1px solid #0000000d;border-radius:10px;flex-direction:column;width:450px;max-width:450px;height:auto;min-height:430px;max-height:90vh;padding:0;display:flex;overflow:hidden;box-shadow:0 10px 40px #0000001a}.update-group-modal .modal-header{justify-content:space-between;align-items:center;padding:16px 20px 0;display:flex}.update-group-modal .modal-title{color:#1f2937;text-align:left;margin:0;font-size:18px;font-weight:600}.update-group-modal .close-modal-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:4px;transition:background .2s;display:flex}.update-group-modal .close-modal-btn:hover{color:#111827;background:#f3f4f6}.update-group-modal .modal-body{flex-direction:column;flex:1;gap:8px;padding:20px 20px 0;display:flex;overflow:hidden}.update-group-modal .group-info-section{align-items:center;gap:16px;display:flex}.update-group-modal .group-avatar-upload{cursor:pointer;flex-shrink:0}.update-group-modal .group-avatar-upload input{display:none}.update-group-modal .avatar-placeholder{color:#9ca3af;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex;position:relative}.update-group-modal .avatar-placeholder img{object-fit:cover;border-radius:50%;width:100%;height:100%}.update-group-modal .group-name-input{border:none;border-bottom:1px solid #e5e7eb;outline:none;flex:1;padding:8px 0;font-size:16px;transition:border-color .2s}.update-group-modal .group-name-input:focus{border-bottom-color:#3b82f6}.update-group-modal .members-section{margin-top:8px}.update-group-modal .section-title{padding-left:0;display:block}.update-group-modal .members-list-container{border-top:none;flex:1;height:240px;margin:0 -20px;padding:0 7px;overflow-y:hidden}.update-group-modal .members-list{margin:0;padding:12px 0}.update-group-modal .member-item{cursor:default;background:0 0;border-radius:10px;align-items:center;gap:12px;padding:10px 12px;transition:background .2s;display:flex}.update-group-modal .member-item:hover{background:#f9fafb}.update-group-modal .member-avatar-wrapper{width:32px;height:32px;position:relative}.update-group-modal .status-dot{width:12px;height:12px;position:absolute;bottom:-1px;right:-1px}.update-group-modal .member-info-wrapper{flex-direction:column;flex:1;gap:2px;display:flex}.update-group-modal .member-name-row{align-items:center;gap:4px;width:fit-content;display:flex}.update-group-modal .member-name{color:#1e293b;font-size:15px;font-weight:500}.update-group-modal .owner-icon{color:#64748b}.update-group-modal .member-role{color:#64748b;font-size:13px}.update-group-modal .remove-member-btn{color:#ef4444;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:4px;font-size:14px;display:flex}.update-group-modal .modal-footer{border-top:1px solid #f3f4f6;justify-content:flex-end;gap:12px;padding:11px 20px;display:flex}.update-group-modal .footer-btn{cursor:pointer;border:none;border-radius:10px;padding:10px 24px;font-size:15px;font-weight:600;transition:all .2s}.update-group-modal .footer-btn.cancel{color:#4b5563;background:#f3f4f6}.update-group-modal .footer-btn.cancel:hover{background:#e5e7eb}.update-group-modal .footer-btn.confirm{color:#fff;background:#3b82f6}.update-group-modal .footer-btn.confirm:hover:not(.disabled){background:#7a9ce9}.update-group-modal .footer-btn.disabled{opacity:.6;cursor:not-allowed}\n .contact-list-header>div{align-items:center;gap:8px;display:flex}.contact-list-toolbar{gap:12px}.toolbar-search{flex:1}.filter-select{position:relative}.avatar-placeholder{color:#fff;background:#3b82f6;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:16px;font-weight:600;display:flex}.online-status.is-online{background:#22c55e}.online-status.is-offline{background:#94a3b8}.contact-action-btn{background:0 0;border:none}\n .chat-avatar-emoji{background-color:#fff;border-radius:100%;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.chat-avatar-img{object-fit:cover;border-radius:100%;width:100%;height:100%}\n", O = (e, t = 0, n = "Hội thoại không tên") => e ? e.name ? e.name : e.type === "group" ? n : e.members?.find((e) => e.id !== t)?.name ?? n : n, k = new Set([
10
+ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family:Inter,-apple-system,sans-serif;font-size:16px;font-weight:400;line-height:24px;display:block;position:fixed;bottom:0;right:0}#chat-internal-root *{box-sizing:border-box;pointer-events:auto}#chat-internal-root ::-webkit-scrollbar{width:5px;height:5px}#chat-internal-root ::-webkit-scrollbar-thumb{background-color:#0000001a;border-radius:4px}#chat-internal-root ::-webkit-scrollbar-thumb:hover{background-color:#0003}.chatbot-container{width:100%;height:100%;position:relative}\n .floating-button{background:var(--primary);-webkit-backdrop-filter:blur(25px)saturate(150%);color:#fff;cursor:pointer;z-index:99999;border:1px solid #fff6;border-radius:20px;outline:none;justify-content:center;align-items:center;width:64px;height:64px;transition:all .4s cubic-bezier(.4,0,.2,1);display:flex;position:fixed;bottom:24px;right:24px;box-shadow:0 12px 40px #0000000d,inset 0 0 0 1px #fff6}.floating-button:hover{transform:scale(1.1)rotate(5deg)}.floating-button:active{transform:scale(.95)}.floating-button .ping{pointer-events:none;background:#fff3;border-radius:16px;animation:2s cubic-bezier(0,0,.2,1) infinite ping;position:absolute;inset:0}@keyframes ping{75%,to{opacity:0;transform:scale(1.5)}}.floating-button .icon{z-index:10;font-size:24px;position:relative}\n .chat-window{--primary:#155dfc;--chat-bg:#fff;--chat-text:#101828;--chat-subtext:#6a7282;--chat-header-bg:#fff;--chat-border:#e5e7eb;--sidebar-bg:#fff}.chat-window.dark-theme{--chat-bg:color-mix(in srgb, var(--primary), #0f172a99 85%);--chat-text:#f8fafc;--chat-subtext:#94a3b8;--chat-header-bg:color-mix(in srgb, var(--primary), #1e293b99 80%);--chat-border:#334155;--sidebar-bg:color-mix(in srgb, var(--primary), #0f172a66 95%)}.chat-window{background:var(--chat-bg);-webkit-backdrop-filter:blur(20px)saturate(180%);backdrop-filter:blur(20px)saturate(180%);border:1px solid var(--chat-border);z-index:99998;width:420px;height:640px;color:var(--chat-text);transform-origin:100% 100%;border-radius:14px;flex-direction:column;max-width:100%;max-height:100%;margin:0;transition:none;animation:.6s cubic-bezier(.34,1.56,.64,1) slideUp;display:flex;position:fixed;bottom:90px;right:20px;overflow:hidden;transform:none;box-shadow:0 8px 32px #0000005e,inset 0 0 0 1px #ffffff0d}.chat-window.fullpage{--chat-bg:#fff;--chat-header-bg:#fff;--chat-border:#f1f5f9;--sidebar-bg:#fff;--app-sidebar-bg:#f9f9f9;--active-item-bg:#f1f5f9;-webkit-backdrop-filter:none;z-index:9999;border-radius:16px;flex-direction:column;display:flex;transform:none}.chat-main-layout{--chat-bg:#fff;--chat-header-bg:#fff;--chat-border:#f1f5f9;--sidebar-bg:#fff;--active-item-bg:#f1f5f9;-webkit-backdrop-filter:none;z-index:9999;background-color:var(--app-sidebar-bg);border-radius:0;flex-direction:row;flex:1;width:100%;max-width:none;height:100vh;display:flex;inset:0;overflow:hidden;transform:none}.chat-window.fullpage.dark-theme{--chat-bg:#0f172a;--chat-header-bg:#1e293b;--chat-border:#334155;--sidebar-bg:#0f172a;--app-sidebar-bg:#1e293b;--active-item-bg:#334155;overflow:hidden}.chat-header{background:var(--chat-header-bg);color:var(--chat-text);flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 16px;display:flex}.header-info{align-items:center;gap:8px;display:flex}.header-logo{flex-shrink:0;justify-content:center;align-items:center;padding-left:6px;padding-right:8px;display:flex}.header-logo img,.header-logo .satek-icon{object-fit:contain;width:22px;height:22px}.back-btn{color:#64748b;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;margin-right:8px;padding:0;font-size:20px;display:flex}.header-info-text{align-items:center;gap:6px;min-width:0;display:flex}.header-dot{color:var(--chat-subtext);opacity:.6}.header-title{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.header-subtitle{color:var(--chat-subtext);white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:400;overflow:hidden}.chat-body-container{border-top-left-radius:8px;flex-direction:row;flex:1;display:flex;position:relative;overflow:hidden}.chat-sidebar{background:var(--sidebar-bg);border-right:1px solid #0000000d;flex-direction:column;width:100%;transition:all .3s;display:flex}.chat-sidebar.is-full{flex-shrink:0;width:320px}.chat-search-bar{background:0 0;align-items:center;gap:4px;padding:12px 12px 4px;display:flex}.search-input-wrapper{flex:1;align-items:center;display:flex;position:relative}.search-icon{color:#94a3b8;pointer-events:none;width:16px;height:16px;position:absolute;left:12px}.search-input{color:#1e293b;background:#f3f4f6;border:1px solid #0000;border-radius:8px;outline:none;width:100%;padding:8px 36px;font-size:14px;transition:all .3s}.search-input:focus{background:#fff;border-color:#a855f74d;box-shadow:0 4px 12px #00000008}.clear-search{color:#94a3b8;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:4px;font-size:18px;display:flex;position:absolute;right:10px}.clear-search:hover{color:#64748b}.sidebar-scroll{flex:1;padding:0 8px 20px;overflow-y:auto}.chat-filter-tabs{gap:24px;margin:0 12px;display:flex;position:relative}.chat-filter-tabs:before{content:\"\";background-color:#0000000d;height:1px;position:absolute;bottom:0;left:0;right:0}.chat-filter-tabs button{cursor:pointer;color:#667085;background:0 0;border:none;align-items:center;gap:6px;padding:8px 0;font-size:13px;font-weight:500;transition:all .2s;display:flex;position:relative}.chat-filter-tabs button.active{color:#155dfc;font-weight:600}.chat-filter-tabs button.active:after{content:\"\";z-index:1;background-color:#155dfc;border-radius:2px;height:2px;position:absolute;bottom:0;left:0;right:0}.filter-unread-badge-container{align-items:center;gap:6px;display:flex}.filter-unread-badge{color:#fff;background-color:#f04438;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;padding:0 4px;font-size:11px;font-weight:600;display:flex}.sidebar-scroll::-webkit-scrollbar{width:5px;margin-left:10px}.sidebar-scroll::-webkit-scrollbar-thumb{background:#0000000d;border-radius:10px}.member-search-section{border-top:1px solid #00000008;margin-top:10px;padding:20px 0;animation:.3s fadeIn}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.member-search-section .section-header{color:var(--chat-text);text-transform:uppercase;letter-spacing:1px;padding:0 20px 12px;font-size:11px;font-weight:700}.member-search-section .members-list{max-height:none;padding:0 10px}.member-search-section .member-item{background:0 0;border:none;margin-bottom:4px;padding:10px 12px}.member-search-section .member-item:hover{background:#fff6}.chat-main{background:#ffffff1a;flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.drag-overlay-full{pointer-events:none;z-index:10;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0009;border:3px dashed #a855f7cc;justify-content:center;align-items:center;animation:.2s fadeIn;display:flex;position:absolute;inset:0}.drag-overlay-full .drag-content{color:#fff;text-shadow:0 2px 4px #0000004d;flex-direction:row;align-items:center;gap:12px;display:flex}.drag-overlay-full .drag-icon{font-size:20px;animation:.6s ease-in-out infinite bounce}.chat-list{background:0 0;flex:1;overflow-y:auto}.chat-item{cursor:pointer;border-radius:8px;align-items:center;gap:12px;height:64px;padding:8px;transition:background .1s ease-in-out;display:flex;position:relative}.chat-item:hover{background:#eff6ff99}.chat-item.active{background:#eff6ff}.chat-item-avatar{justify-content:center;align-items:center;width:32px;height:32px;font-size:22px;display:flex;position:relative}.online-indicator{z-index:1;background-color:#22c55e;border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;bottom:-3px;right:2px}.chat-item-info{flex:1;overflow:hidden}.chat-item-name{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.chat-item-last{flex:1;min-width:0}.last-message-text{color:var(--chat-subtext);white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;display:block;overflow:hidden}.info-bottom-right{flex-shrink:0;align-items:center;gap:4px;margin-top:4px;display:flex}.mute-icon-list{color:#94a3b8;flex-shrink:0}.chat-item.active .chat-item-last{color:var(--chat-text)}.unread-badge{color:#fff;z-index:2;background:linear-gradient(135deg,#f43f5e,#e11d48);border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;min-width:18px;height:18px;padding:10px 7px;font-size:10px;font-weight:700;display:flex;position:absolute;top:-4px;right:-4px;box-shadow:0 2px 4px #0000001a}.chat-item-time{color:var(--chat-subtext);white-space:nowrap}.chat-list-section{margin-bottom:16px}.empty-chat-list{padding:12px 8px 4px}.section-header{color:#64748b;text-transform:none;align-items:center;gap:6px;padding:12px 8px 4px;display:flex}.section-icon{color:#94a3b8}.info-top-row{justify-content:space-between;align-items:baseline;margin-bottom:2px;display:flex}.info-bottom-row{justify-content:space-between;align-items:center;display:flex}.unread-badge-circle{color:#fff;background-color:#3b82f6;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;margin-left:8px;padding:0 5px;font-size:10px;font-weight:600;display:flex}.chat-options-wrapper{opacity:0;pointer-events:none;z-index:100;justify-content:center;align-items:center;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;position:absolute;top:50%;right:12px;transform:translateY(-50%)scale(.8)}.chat-item:hover .chat-options-wrapper,.chat-item.has-open-dropdown .chat-options-wrapper{opacity:1;pointer-events:auto;transform:translateY(-50%)scale(1)}.chat-options-btn{-webkit-backdrop-filter:blur(8px);color:#64748b;cursor:pointer;background:#ffffff26;border:1px solid #fff3;border-radius:10px;justify-content:center;align-items:center;width:32px;height:32px;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex}.chat-options-btn:hover,.chat-options-btn.active{color:#1e293b;background:#ffffff4d;border-color:#fff6;transform:scale(1.05)}.chat-options-btn svg{width:18px;height:18px}.chat-options-dropdown{-webkit-backdrop-filter:blur(20px)saturate(160%);z-index:1000;background:#ffffffe6;border:1px solid #fff9;border-radius:14px;flex-direction:column;gap:4px;min-width:160px;padding:6px;animation:.2s cubic-bezier(.4,0,.2,1) dropdownFadeIn;display:flex;position:absolute;top:calc(100% + 8px);right:0;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a}@keyframes dropdownFadeIn{0%{opacity:0;transform:translateY(-10px)scale(.95)}to{opacity:1;transform:translateY(0)scale(1)}}.dropdown-item{color:#334155;cursor:pointer;border-radius:10px;align-items:center;gap:10px;padding:10px 12px;font-size:13px;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{color:#0f172a;background:#0000000a}.dropdown-item.delete{color:#ef4444}.dropdown-item.delete:hover{color:#dc2626;background:#ef444414}.dropdown-icon{flex-shrink:0;width:16px;height:16px}.header-actions{gap:4px;display:flex}.action-btn{color:#667085;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;padding:6px;transition:all .2s;display:flex}.action-btn:hover{color:#101828;background:#f2f4f7}.action-btn.close-btn:hover{color:#ef4444;background:#fee2e2}.add-group-btn{color:#667085;cursor:pointer;background:#f9fafb;border:1px solid #f2f4f7;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s;display:flex}.add-group-btn:hover{color:#101828;background:#f2f4f7;border-color:#eaecf0}.dark-theme .add-group-btn{color:#f8fafc;background:#1e293b66;border-color:#ffffff1a}.dark-theme .add-group-btn:hover{background:#1e293bcc;border-color:#fff3}.theme-toggle{background:#fff6;border:1px solid #ffffff80;border-radius:12px;font-size:16px;transition:all .4s cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px #0000000d}.theme-toggle:hover{background:#fff;box-shadow:0 8px 20px #0000001a;transform:rotate(15deg)scale(1.1)!important}.dark-theme .theme-toggle{color:#f8fafc;background:#1e293b66;border-color:#ffffff1a}.dark-theme .theme-toggle:hover{background:#1e293bcc;border-color:#fff3}.modal-overlay{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:100000;background:#0006;justify-content:center;align-items:center;animation:.3s modalFadeIn;display:flex;position:absolute;inset:0}.modal-content{background:color-mix(in srgb, var(--primary), #ffffffb3 92%);-webkit-backdrop-filter:blur(30px)saturate(150%);border:1px solid #fffc;border-radius:36px;width:90%;max-width:380px;height:85%;padding:32px;animation:.4s cubic-bezier(.175,.885,.32,1.275) modalPopUp;overflow-y:auto;box-shadow:0 30px 60px #00000014}.dark-theme .modal-content{background:color-mix(in srgb, var(--primary), #1e293bb3 90%);color:#f8fafc;border-color:#ffffff1a}.modal-content::-webkit-scrollbar-track{margin:10px 0}.modal-title{color:var(--chat-text);text-align:center;letter-spacing:-.5px;margin-bottom:24px;font-size:22px;font-weight:800}.modal-input{color:#1e293b;background:#fff;border:1px solid #0000000d;border-radius:18px;outline:none;width:100%;margin-bottom:28px;padding:16px 20px;font-size:15px;transition:all .3s}.modal-input:focus{background:#ffffff14;border-color:#155dfc;box-shadow:0 0 0 4px #155dfc26}.members-section{margin-bottom:24px}.section-title{color:#64748b;text-transform:uppercase;letter-spacing:1px;padding-left:4px;font-size:11px;font-weight:700;display:block}.members-list{max-height:250px;margin:0 -4px;padding:4px;overflow-y:auto}.members-list::-webkit-scrollbar{width:5px}.members-list::-webkit-scrollbar-thumb{background:#4f46e533;border-radius:10px}.member-item{cursor:pointer;background:#fff6;border:1px solid #0000;border-radius:16px;align-items:center;gap:14px;padding:12px;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.member-item:hover{background:#fffc}.remove-member-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;margin-left:auto;padding:6px;transition:all .2s;display:flex}.remove-member-btn:hover{color:#ef4444;background:#ef44441a;transform:scale(1.1)}.remove-member-btn svg{width:18px;height:18px}.member-avatar{background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%);border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;display:flex;box-shadow:0 2px 5px #0000000d}.member-name{color:var(--chat-text);flex:1;font-size:14px;font-weight:600}.member-check{color:#fff;border:2px solid #e2e8f0;border-radius:50%;justify-content:center;align-items:center;width:22px;height:22px;font-size:11px;font-weight:700;transition:all .2s;display:flex}.member-item.selected .member-check{background:linear-gradient(135deg,#6366f1,#4f46e5);border-color:#4f46e5;transform:scale(1.1)}.modal-actions{gap:12px;margin-top:8px;display:flex}.modal-btn{cursor:pointer;border:none;border-radius:16px;flex:1;padding:14px;font-size:14px;font-weight:700;transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-btn.cancel{color:#64748b;background:#f1f5f9cc}.modal-btn.cancel:hover{color:#0f172a;background:#f1f5f9}.modal-btn.confirm{color:#fff;background:linear-gradient(135deg,#6366f1,#4f46e5);box-shadow:0 10px 20px -5px #4f46e566}.modal-btn.confirm:hover{transform:translateY(-2px);box-shadow:0 15px 25px -5px #4f46e580}.modal-btn.disabled{color:#cbd5e1;cursor:not-allowed;box-shadow:none;background:#f1f5f9}.empty-chat-state h3{color:#1e293b;margin-bottom:8px;font-size:20px;font-weight:700}.empty-chat-state p{opacity:.8;font-size:15px}.modal-search-wrapper{margin-bottom:20px}.no-members-found{text-align:center;text-align:center;color:#9ca3af;background:#ffffff4d;border:1px dashed #0000000d;border-radius:16px;padding:20px;font-size:14px}.member-item.loading{cursor:not-allowed;opacity:.6}.member-add-action{color:#6366f1;background:#6366f11a;border-radius:6px;margin-left:auto;padding:4px 12px;font-size:13px;font-weight:700;transition:all .2s}.member-item:hover .member-add-action{color:#fff;background:#6366f1}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-12px)}}@keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}@keyframes modalPopUp{0%{opacity:0;transform:scale(.8)translateY(30px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(40px)scale(.9)}to{opacity:1;transform:translateY(0)scale(1)}}.theme-modal{max-width:300px!important;height:auto!important;padding:24px!important}.modal-header{justify-content:space-between;align-items:center;display:flex}.close-modal-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;padding:4px;font-size:24px;line-height:1}.theme-section{flex-direction:column;gap:12px;margin-bottom:24px;display:flex}.section-desc{color:#64748b;margin:0;font-size:13px;line-height:1.5}.color-presets{grid-template-columns:repeat(4,1fr);gap:12px;margin-top:8px;display:grid}.color-preset-btn{aspect-ratio:1;cursor:pointer;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;padding:0;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;box-shadow:0 2px 8px #0000001a}.color-preset-btn:hover{transform:scale(1.1);box-shadow:0 4px 12px #00000026}.color-preset-btn.active{border-color:#334155;transform:scale(1.15)}.check-icon{color:#fff;text-shadow:0 0 2px #00000080;font-size:14px;font-weight:700}.custom-color-picker{background:#fff;border:1px solid #0000000d;border-radius:12px;align-items:center;gap:12px;margin-top:8px;padding:8px 12px;display:flex}.color-input{cursor:pointer;background:0 0;border:none;border-radius:6px;width:32px;height:32px;padding:0;overflow:hidden}.color-input::-webkit-color-swatch-wrapper{padding:0}.color-input::-webkit-color-swatch{border:none;border-radius:6px}.color-hex-code{color:#64748b;font-weight:600}.contact-categories{flex-direction:column;gap:8px;padding:8px;display:flex}.category-item{cursor:pointer;color:var(--chat-text);border-radius:8px;align-items:center;gap:12px;width:100%;height:40px;padding:10px 12px;font-weight:500;transition:all .2s;display:flex}.category-item:hover{color:#1e293b;background:#f1f5f9}.category-item.active{color:#1447e6;background:#eff6ff}.category-item .count{color:#99a1af;border-radius:10px;margin-left:auto;padding:2px 8px}.contact-list-view{background:#fff;flex-direction:column;flex:1;height:100%;display:flex}.contact-list-header{color:var(--chat-text);border-bottom:1px solid #f1f5f9;height:45px;padding:10px 16px}.contact-list-toolbar{justify-content:space-between;align-items:center;padding:12px 16px 20px;display:flex}.toolbar-left{align-items:center;gap:20px;display:flex}.toolbar-left span{color:#64748b;font-weight:500}.toolbar-search{background:#f3f4f6;border-radius:6px;align-items:center;gap:8px;width:300px;height:36px;padding:12px;display:flex}.toolbar-search input{background:0 0;border:none;outline:none;width:100%;font-size:14px}.toolbar-right{gap:12px;height:36px;display:flex}.filter-select{cursor:pointer;color:#1e293b;background:#f3f4f6;border-radius:6px;align-items:center;gap:8px;padding:9px 12px;font-size:14px;display:flex}.dropdown-select{z-index:10;background:#fff;border:1px solid #e2e8f0;border-radius:8px;min-width:150px;margin-top:8px;position:absolute;top:100%;right:0;box-shadow:0 4px 6px #0000001a}.dropdown-select .dropdown-item{cursor:pointer;border-bottom:1px solid #e2e8f0;border-radius:0;align-items:center;gap:8px;height:40px;padding:12px 16px;display:flex}.dropdown-select .dropdown-item div{padding-top:3px}.contact-scroll-area{flex:1;padding:0 16px 16px;overflow-y:auto}.letter-title{color:var(--chat-subtext)}.contact-item-row{justify-content:space-between;align-items:center;height:64px;padding:12px 0;display:flex}.contact-item-left{align-items:center;gap:16px;display:flex}.contact-avatar{width:32px;height:32px;position:relative}.contact-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.contact-avatar .online-status{background:#22c55e;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;bottom:0;right:0}.contact-info{flex-direction:column;display:flex}.contact-name{color:var(--chat-text)}.contact-role{color:var(--chat-subtext)}.contact-item-actions{gap:8px;display:flex}.contact-action-btn{color:#64748b;cursor:pointer;background:#fff;border:1px solid #e2e8f0;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;transition:all .2s;display:flex}.contact-action-btn:hover{color:#1e293b;background:#f1f5f9;border-color:#cbd5e1}.chat-window.fullpage .chat-body-container{background:#fff;overflow:hidden;flex:1!important;width:100%!important;height:100%!important;display:flex!important}.chat-window.fullpage .chat-sidebar{border-right:1px solid var(--chat-border);background:#fff;flex-direction:column;flex-shrink:0;width:312px;display:flex}.chat-window.fullpage .chat-main{background:#fff;flex-direction:column;flex:1;display:flex;position:relative}.chat-main-header{border-bottom:1px solid var(--chat-border);background:#fff;flex-shrink:0;justify-content:space-between;align-items:center;min-height:64px;padding:12px 16px;display:flex}.chat-main-info{align-items:center;gap:10px;min-width:0;display:flex}.chat-main-avatar{flex-shrink:0;width:40px;height:40px}.chat-main-text{flex-direction:column;min-width:0;display:flex}.chat-main-text-container{align-items:center;gap:6px;display:flex}.chat-main-name{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:600;line-height:1.2;overflow:hidden}.chat-main-status{color:#94a3b8;margin-top:1px;font-size:13px}.chat-main-actions{flex-shrink:0;gap:4px;display:flex}.main-action-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:34px;height:34px;transition:all .2s;display:flex}.main-action-btn:hover{color:var(--primary);background:#f1f5f9}.chat-window.fullpage .chat-main-header{min-height:72px;padding:16px 24px}.chat-window.fullpage .chat-main-name{font-size:18px}.chat-window.fullpage .chat-main-actions{gap:8px;display:flex}.chat-window.fullpage .header-info-text{flex-direction:row;align-items:center;gap:6px}.chat-window.fullpage .header-subtitle{margin-top:0;font-size:16px}.chat-window.fullpage .chat-header .action-btn.theme-toggle{box-shadow:none;background:0 0}.chat-window.fullpage .chat-header{background-color:var(--app-sidebar-bg);height:45px;padding:8px 12px}.empty-chat-state{color:#94a3b8;text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;padding:40px;display:flex}.empty-icon{opacity:.5;margin-bottom:24px;font-size:64px}.empty-chat-state h3{color:#1e293b;margin-bottom:8px;font-size:20px}.empty-chat-state p{max-width:280px;font-size:14px;line-height:1.5}.search-section-title{color:#1e293b;align-items:center;gap:8px;margin-bottom:12px;font-size:16px;font-weight:700;display:flex}.search-count{color:#3b82f6;font-size:14px;font-weight:500}.search-section-content{flex-direction:column;gap:8px;display:flex}.search-result-item{cursor:pointer;border-radius:12px;align-items:center;gap:12px;height:64px;padding:8px;transition:all .2s;display:flex}.search-result-item:hover{background:#00000008}.search-result-avatar{border-radius:50%;flex-shrink:0;width:32px;height:32px;overflow:hidden}.search-result-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.avatar-placeholder{color:#fff;background:linear-gradient(135deg,#3b82f6,#2563eb);justify-content:center;align-items:center;width:100%;height:100%;font-size:18px;font-weight:600;display:flex}.search-result-info{flex:1;min-width:0}.search-result-name{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.search-result-sub{color:#64748b;margin-top:2px;font-size:12px}.search-view-all{color:#64748b;cursor:pointer;background:#00000008;border:none;border-radius:8px;width:100%;margin-top:12px;padding:10px;font-size:13px;font-weight:500;transition:all .2s}.search-view-all:hover{color:#1e293b;background:#0000000f}.message-result .search-result-top{justify-content:space-between;align-items:center;margin-bottom:2px;display:flex}.search-result-date{color:#94a3b8;font-size:11px}.search-result-text{color:#475569;-webkit-line-clamp:2;line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;font-size:13px;display:-webkit-box;overflow:hidden}.file-icon-wrapper{color:#3b82f6;background:#3b82f61a;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;font-size:20px;display:flex}.highlight-match{color:var(--primary);font-weight:500}.resize-handle.ne{cursor:ne-resize;z-index:10001;width:15px;height:15px;position:absolute;top:0;right:0}.resize-handle.nw{cursor:nw-resize;z-index:10001;width:15px;height:15px;position:absolute;top:0;left:0}.resize-handle.se{cursor:se-resize;z-index:10001;width:15px;height:15px;position:absolute;bottom:0;right:0}.resize-handle.sw{cursor:sw-resize;z-index:10001;width:15px;height:15px;position:absolute;bottom:0;left:0}\n .chat-input-area{background:#fff;border-top:1px solid #e5e7eb;align-items:center;gap:12px;padding:12px 16px;transition:all .3s;display:flex;position:relative}.chat-input-actions{flex-shrink:0;align-items:center;gap:8px;display:flex}.action-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:6px;transition:all .2s;display:flex}.action-btn:hover{color:#374151;background:#f3f4f6}.action-btn.active{color:var(--primary);background:#f3f4f6}.chat-input-container{flex:1;align-items:center;display:flex}.chat-input{color:#1f2937;background:#f3f4f6;border:1px solid #0000;border-radius:8px;outline:none;width:100%;padding:10px 16px;font-size:14px;transition:all .2s}.chat-input::placeholder{color:#9ca3af}.chat-input:focus{background:#f3f4f6;border-color:#3b82f64d}.chat-input:disabled{opacity:.6;cursor:not-allowed}.send-btn{cursor:pointer;color:#fff;background:var(--primary,#8aaeff);width:36px;height:36px;box-shadow:none;border:none;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s;display:flex}.send-btn:hover:not(:disabled){filter:brightness(.9);transform:translateY(-1px)}.send-btn:disabled{opacity:.6;cursor:not-allowed;background:#d1d5db}.send-btn svg{width:18px;height:18px}.emoji-picker{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:10;background:#fffffff2;border:1px solid #0000000d;border-radius:20px;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:10px;padding:12px;animation:.3s cubic-bezier(.34,1.56,.64,1) emojiSlideUp;display:grid;position:absolute;bottom:100%;left:16px;box-shadow:0 10px 30px #0000001a}@keyframes emojiSlideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.emoji-btn{cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:4px;font-size:20px;transition:all .2s;display:flex}.emoji-btn:hover{background:#fff;transform:scale(1.2);box-shadow:0 2px 5px #0000000d}.selected-files-list{background:#ffffff1a;border-bottom:1px solid #fff3;flex-wrap:nowrap;gap:12px;height:100px;padding:12px 20px;display:flex;overflow:auto hidden}.selected-file-item{background:#fef2f280;border-radius:12px;flex-direction:column;align-items:center;gap:8px;padding:8px;transition:all .2s;display:flex;position:relative;box-shadow:0 2px 8px #00000014}.selected-file-item.other-file{flex-direction:row}.selected-file-item:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001f}.file-preview-image{object-fit:cover;border-radius:8px;width:54px;height:54px;display:block}.file-content-wrapper{flex-direction:row;align-items:center;gap:6px;display:flex}.file-icon{background:#f1f5f9;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;font-size:24px;display:flex}.file-info{flex-direction:column;gap:2px;min-width:0;display:flex}.file-name{color:#475569;white-space:nowrap;text-overflow:ellipsis;width:400px;max-width:100%;font-size:12px;overflow:hidden}.file-size{color:#94a3b8;white-space:nowrap;text-overflow:ellipsis;max-width:120px;font-size:11px;overflow:hidden}.remove-file-btn{color:#fff;cursor:pointer;background:#ef4444;border:none;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;font-size:14px;transition:all .2s;display:flex;position:absolute;top:-8px;right:-8px;box-shadow:0 2px 8px #ef44444d}.remove-file-btn:hover{background:#dc2626;transform:scale(1.1);box-shadow:0 4px 12px #ef444466}.remove-file-btn:disabled{opacity:.5;cursor:not-allowed}.selected-file-item.error-file-item{border:2px solid #ef4444;animation:.3s ease-in-out errorShake}@keyframes errorShake{0%{transform:translate(-3px)}50%{transform:translate(3px)}to{transform:translate(0)}}.selected-file-item.error-file-item:hover{background:#fef2f2b3;border-color:#dc2626}.file-size.error-size{color:#ef4444;font-weight:500}.reply-input-preview{background:#eff6ff;border-left:2px solid #2b7fff;border-top-left-radius:2px;border-bottom-left-radius:2px;justify-content:space-between;align-items:center;margin:0 10px 10px;padding:5px 20px;animation:.3s slideUp;display:flex;position:relative}.reply-content{flex-direction:column;flex:1;gap:2px;min-width:0;padding-left:18px;display:flex}.reply-user{color:#155dfc;margin-bottom:2px;font-size:.85rem;font-weight:700}.reply-user span{color:var(--primary,#155dfc)}.reply-text{color:#4a5565;white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;overflow:hidden}.close-reply{color:#9ca3af;cursor:pointer;background:0 0;border:none;font-size:14px;transition:all .2s;position:absolute;top:0;right:0}.reply-icon{color:#155dfc;position:absolute;top:6px;left:10px}.close-reply:hover{color:#ef4444;transform:scale(1.1)}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.voice-recording-container{background:linear-gradient(135deg,#ef44441a,#ef44440d);border:1px solid #ef444433;flex:1;align-items:center;gap:12px;padding:12px 16px;animation:.2s slideUp;display:flex}.voice-recording-info{flex:1;align-items:center;gap:8px;display:flex}.recording-indicator{color:#374151;align-items:center;gap:6px;font-size:13px;font-weight:500;display:flex}.recording-dot{background:#ef4444;border-radius:50%;width:8px;height:8px;animation:1.5s ease-in-out infinite recordingPulse}@keyframes recordingPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}}.recording-duration{color:#374151;text-align:right;min-width:45px;font-size:13px;font-weight:600}.voice-recorded-container{background:linear-gradient(135deg,#3b82f61a,#3b82f60d);border:1px solid #3b82f633;flex:1;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;animation:.2s slideUp;display:flex}.voice-recorded-info{flex:1;align-items:center;gap:8px;font-size:13px;display:flex}.voice-label{color:#1f2937;white-space:nowrap;font-weight:500}.voice-duration{color:#3b82f6;text-align:right;min-width:45px;margin-left:auto;font-weight:600}.voice-control-btn{color:#1f2937;cursor:pointer;background:#fff;border:1px solid #0000001a;border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;font-size:14px;transition:all .2s;display:flex}.voice-control-btn:hover{background:#f9fafb;transform:scale(1.05)}.voice-control-btn.cancel-btn{color:#ef4444;background:#ef44440d;border-color:#ef44441a}.voice-control-btn.add-btn{color:#fff;background:#8aaeff;border-color:#8aaeff}\n .message-list-wrapper{flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.message-list{background:#f9fafb80;flex-direction:column-reverse;flex:1;gap:20px;padding:24px 20px;display:flex;overflow:hidden auto}.chat-date-divider{justify-content:center;align-items:center;width:100%;margin:20px 0;display:flex}.chat-date-divider span{color:#64748b;background:#f1f5f9;border-radius:20px;padding:4px 16px;font-size:12px;font-weight:500;box-shadow:0 1px 2px #0000000d}.message-item{gap:4px 8px;max-width:70%;display:flex;position:relative}.message-content{flex-direction:column;gap:4px;width:fit-content;max-width:100%;display:flex}.message-item.current-user .message-content{align-items:flex-end}.message-item.other-user .message-content{align-items:flex-start}.message-content-container{flex-direction:column;gap:12px;display:flex;position:relative}.message-item.current-user{flex-direction:row-reverse;align-self:flex-end}.message-item.other-user{align-self:flex-start}.message-bubble.current-user{background:#155dfc;align-self:flex-end}.message-bubble.other-user{background:#f3f4f6;border-radius:8px 16px 16px;align-self:flex-start}.message-avatar{object-fit:cover;cursor:pointer;border:2px solid #ffffff4d;border-radius:50%;flex-shrink:0;width:40px;height:40px;transition:transform .2s;box-shadow:0 4px 12px #00000026}.message-bubble{border-radius:16px 8px 16px 16px;grid-template-columns:minmax(0,1fr);padding:10px 16px;font-size:15px;line-height:1.6;display:grid;position:relative}.message-files{grid-template-columns:repeat(2,minmax(145px,1fr));align-content:start;align-items:center;gap:8px;max-width:100%;display:grid}.message-files>*{aspect-ratio:1.5;width:100%}.message-item .message-files>:last-child:nth-child(odd){grid-column:span 2}.message-item.current-user .message-files{align-self:flex-end}.message-item.other-user .message-files{align-self:flex-start}.file-item{cursor:pointer;background:#ffffff26;border:1px solid #fff3;border-radius:8px;align-items:center;gap:10px;max-height:60px;padding:8px 12px;text-decoration:none;transition:all .2s;display:flex}.file-item:hover{background:#ffffff40;border-color:#ffffff4d;transform:translate(4px)}.file-icon{flex-shrink:0;font-size:18px}.file-info{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.file-size{opacity:.7;color:inherit;font-size:11px}.file-image-wrapper{border-radius:8px;justify-content:center;align-items:center;max-width:100%;max-height:288px;margin-top:0;display:flex;position:relative;overflow:hidden}.file-image{object-fit:cover;cursor:pointer;border:1px solid #fff3;border-radius:8px;width:100%;height:100%;transition:transform .2s}.file-image:hover{transform:scale(1.05)}.image-overlay-more{cursor:pointer;background:#00000080;border-radius:8px;justify-content:center;align-items:center;width:100%;height:100%;transition:all .2s;display:flex;position:absolute;top:0;left:0}.image-overlay-more:hover{background:#000000a6}.image-overlay-text{color:#fff;text-shadow:0 2px 4px #0000004d;font-size:28px;font-weight:600}.user .file-image{border-color:#ffffff4d}.message-actions-bar{-webkit-backdrop-filter:none;box-shadow:none;opacity:0;pointer-events:none;z-index:100;background:0 0;border:none;gap:2px;padding:0;transition:all .2s;display:flex;position:absolute;bottom:0}.message-item:hover .message-actions-bar{opacity:1;pointer-events:auto}.message-item.current-user .message-actions-bar{right:calc(100% + 8px)}.message-item.other-user .message-actions-bar{left:calc(100% + 8px)}.chat-window:not(.fullpage) .message-list{overflow-x:hidden}.chat-window:not(.fullpage) .message-item.current-user .message-actions-bar,.chat-window:not(.fullpage) .message-item.other-user .message-actions-bar{-webkit-backdrop-filter:blur(8px);background:#ffffffe6;border:1px solid #0000000d;border-radius:20px;gap:2px;padding:2px 6px;display:flex;inset:auto 0 -22px auto;transform:none;box-shadow:0 2px 8px #00000014}.chat-window:not(.fullpage) .message-item.other-user .message-member-name{margin-right:0}.chat-window:not(.fullpage) .action-icon svg{width:13px;height:13px}.chat-window:not(.fullpage) .action-icon{width:26px;height:26px}.action-icon{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.action-icon svg{stroke-width:2.2px;width:16px;height:16px}.action-icon:hover{background:#0000000d;transform:translateY(-2px)}.action-icon[title=Xóa]:hover,.action-icon[title=Thu\\ hồi]:hover{color:#ef4444;background:#ef44441a}.action-icon[title=Trả\\ lời]:hover{color:#3b82f6;background:#3b82f61a}.action-icon[title=Thích]:hover{color:#f59e0b;background:#f59e0b1a}.action-icon[title=Yêu\\ thích]:hover{color:#ec4899;background:#ec48991a}.message-reactions-badge{z-index:10;background:#fffffff2;border:1px solid #0000000d;border-radius:10px;align-items:center;gap:2px;padding:2px 6px;font-size:13px;animation:.3s cubic-bezier(.175,.885,.32,1.275) popIn;display:flex;position:absolute;bottom:-11px;box-shadow:0 2px 8px #0000001a}.message-reactions-badge span{line-height:1}.message-item.current-user .message-reactions-badge{right:8px}.message-item.other-user .message-reactions-badge{left:8px}@keyframes popIn{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.message-reply-preview{cursor:pointer;background:#0000001a;border-left:3px solid #ffffff80;border-radius:8px;min-width:120px;margin-bottom:8px;padding:6px 10px;font-size:.8rem;transition:all .2s}.message-bubble.other-user .message-reply-preview{border-left-color:var(--primary,#155dfc);background:#0000000d}.message-reply-preview:hover{background:#00000026}.reply-user-name{color:#fffffff2;white-space:nowrap;text-overflow:ellipsis;margin-bottom:2px;font-size:.75rem;font-weight:700;overflow:hidden}.message-bubble.other-user .reply-user-name{color:var(--primary,#155dfc)}.reply-content-text{color:#fffc;white-space:nowrap;text-overflow:ellipsis;font-size:.8rem;overflow:hidden}.message-bubble.other-user .reply-content-text{color:#475569}.message-text{overflow-wrap:break-word;word-break:break-word;width:auto;display:inline-block}.message-bubble.other-user .message-text{color:var(--chat-text)}.message-bubble.current-user .message-text{color:var(--primary-contrast,#f8fafc)}.message-bubble.other-user.revoked .message-text,.message-bubble.current-user.revoked .message-text{color:color-mix(in srgb, var(--chat-text), transparent 50%)}.message-member-name{color:#475569;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;min-width:0;margin-bottom:4px;font-size:15px;font-weight:500;overflow:hidden}.scroll-bottom-btn{-webkit-backdrop-filter:blur(8px);cursor:pointer;color:#4f46e5;z-index:1000;background:#ffffffb3;border:1px solid #ffffff4d;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;transition:all .3s cubic-bezier(.4,0,.2,1);animation:.3s fadeInPop;display:flex;position:absolute;bottom:20px;right:20px;box-shadow:0 4px 15px #00000026}.scroll-bottom-btn:hover{background:#fff;transform:translateY(-4px);box-shadow:0 6px 20px #0003}.unread-dot{background-color:#ff4d4f;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;top:0;right:0}@keyframes fadeInPop{0%{opacity:0;transform:scale(.5)translateY(20px)}to{opacity:1;transform:scale(1)translateY(0)}}.message-time{color:var(--chat-text);margin-top:2px;font-size:10px;font-weight:500}.message-item.current-user .message-time{text-align:right;margin-right:4px}.message-item.other-user .message-time{text-align:left;margin-left:4px}.message-item-status{color:var(--chat-text);margin-left:4px;font-size:10px;font-weight:400}.message-item-status.seen{color:#3b82f6;font-weight:600}.message-item-status.seen svg{margin-bottom:-2px}.message-bubble.revoked{opacity:.8;background:#ffffff0d;border:1px dashed #fff3;font-size:14px;font-style:italic}@keyframes highlight-fade{0%{background-color:rgba(var(--primary-rgb), .2);transform:scale(1.02)}to{background-color:#0000;transform:scale(1)}}.highlight-message .message-bubble{animation:2s ease-out highlight-fade}.see-more-btn{color:#3b82f6;cursor:pointer;margin-left:8px;font-size:.85em;font-weight:600;text-decoration:none;transition:all .2s;display:inline-block}.message-bubble.current-user .see-more-btn{color:#ffffffe6;text-decoration:underline}.see-more-btn:hover{filter:brightness(1.1);text-decoration:underline}.message-bubble.current-user .see-more-btn:hover{color:#fff}\n .file-viewer-overlay{z-index:100001;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#000000e6;justify-content:center;align-items:center;animation:.2s ease-in-out fadeIn;display:flex;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.file-viewer-content{flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;animation:.3s ease-out slideUp;display:flex;position:relative}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.file-viewer-main{border-radius:8px;justify-content:center;align-items:center;max-width:100%;max-height:70vh;display:flex;position:relative;overflow:hidden}.file-viewer-image{object-fit:contain;border-radius:8px;max-width:100%;max-height:70vh;box-shadow:0 10px 40px #0000004d}.file-viewer-main:has(.file-viewer-video){overflow:visible}.file-viewer-video{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%;box-shadow:0 10px 40px #0000004d}.video-container{justify-content:center;width:85vw;height:78vh;display:flex;overflow:visible}.file-viewer-close{color:#fff;cursor:pointer;z-index:100001;text-align:center;background:#fff3;border:1px solid #ffffff4d;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-size:24px;transition:all .2s;display:flex;position:absolute;top:30px;right:70px}.file-viewer-close:hover{background:#ffffff4d;border-color:#fff6;transform:scale(1.1)}.file-viewer-close:active{transform:scale(.95)}.file-viewer-nav{color:#fff;cursor:pointer;z-index:100001;text-align:center;background:#ffffff26;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-size:32px;transition:all .2s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.file-viewer-nav:hover{background:#ffffff40;border-color:#ffffff4d}.file-viewer-nav:active{transform:translateY(-50%)scale(.95)}.file-viewer-prev{left:70px}.file-viewer-next{right:70px}@media (width<=768px){.file-viewer-prev{left:10px}.file-viewer-next{right:10px}.file-viewer-close{top:10px;right:10px}}.file-viewer-counter{color:#fff;white-space:nowrap;z-index:100001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#00000080;border-radius:20px;padding:8px 16px;font-size:14px;font-weight:500;position:absolute;bottom:20px;left:50%;transform:translate(-50%)}.file-viewer-thumbnails-container{z-index:100001;opacity:0;pointer-events:none;visibility:hidden;justify-content:center;align-items:center;gap:2rem;width:100%;padding-bottom:3.5rem;display:flex;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.file-viewer-thumbnails{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#0000004d;border-radius:8px;gap:8px;max-width:60%;padding-top:12px;padding-bottom:12px;display:flex;overflow-x:auto;-webkit-mask-image:linear-gradient(90deg,#0000 0%,#000 10% 90%,#0000 100%);mask-image:linear-gradient(90deg,#0000 0%,#000 10% 90%,#0000 100%)}.file-viewer-counter:hover~.file-viewer-thumbnails-container,.file-viewer-thumbnails-container:hover{opacity:1;visibility:visible;pointer-events:auto}.file-viewer-thumbnails::-webkit-scrollbar{height:4px}.file-viewer-thumbnails::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:2px}.file-viewer-thumbnails::-webkit-scrollbar-thumb:hover{background:#ffffff80}.file-viewer-thumbnails-scroll-btn{color:#fff;cursor:pointer;z-index:100002;-webkit-backdrop-filter:blur(10px)saturate(180%);backdrop-filter:blur(10px)saturate(180%);background:#fff3;border:1px solid #ffffff4d;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;font-size:18px;transition:all .3s;display:flex;box-shadow:0 8px 32px #1f26875e}.file-viewer-thumbnails-scroll-btn:hover{background:#ffffff4d;border-color:#ffffff80;transform:scale(1.05);box-shadow:0 8px 32px #1f268780}.file-viewer-thumbnails-scroll-btn:active{transform:scale(.95)}.file-viewer-thumbnail{cursor:pointer;background:#0000004d;border:2px solid #0000;border-radius:4px;width:60px;min-width:60px;height:60px;padding:0;transition:all .2s;overflow:hidden}.file-viewer-thumbnail:hover{background:#0006;border-color:#ffffff80}.file-viewer-thumbnail.active{background:#0003;border-color:#fffc}.thumbnail-image{object-fit:cover;width:100%;height:100%}.thumbnail-video{object-fit:cover;z-index:1;cursor:pointer;width:100%;height:100%}.video-thumbnail-container{border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative;overflow:hidden}.play-icon-overlay{z-index:2;pointer-events:none;cursor:pointer;background-color:#00000080;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;display:flex;position:absolute}.play-arrow{color:#fff;margin-bottom:3px;margin-left:2px;font-size:18px}.file-viewer-overlay:has(.file-viewer-audio){background:0 0}.file-viewer-main:has(.file-viewer-audio){overflow:visible}.audio-container{justify-content:center;align-items:center;width:100vw;height:100vh;display:flex;overflow:visible}.audio-player-wrapper{-webkit-backdrop-filter:blur(30px)saturate(150%);backdrop-filter:blur(30px)saturate(150%);color:#1e293b;z-index:1000;background:#ffffff4d;border:1px solid #ffffff80;border-radius:8px;flex-direction:column;flex-shrink:0;justify-content:center;align-items:center;gap:12px;width:100%;max-width:500px;padding:24px 20px;display:flex;position:relative;box-shadow:0 0 0 100vmax #000000e6}.file-viewer-audio{width:100%;height:40px}.file-viewer-audio::-webkit-media-controls-panel{background-color:#ffffff1a}.audio-name{color:#000;text-align:center;word-break:break-word;max-width:100%;margin:0;font-size:16px}.audio-thumbnail-container{background:linear-gradient(135deg,#6496ff80 0%,#c864ff80 100%);border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.audio-thumbnail-icon{font-size:28px}.pdf-thumbnail-container{background:linear-gradient(135deg,#f5222dcc 0%,#ff7a45cc 100%);border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.pdf-thumbnail-icon{font-size:28px}@media (width<=1024px){.file-viewer-content{max-width:95%}.file-viewer-image{max-height:60vh}.file-viewer-nav{width:40px;height:40px;font-size:24px}}@media (width<=600px){.file-viewer-overlay{inset:0}.file-viewer-content{max-width:100%;max-height:100vh}.file-viewer-main,.file-viewer-image{max-height:50vh}.file-viewer-nav{width:36px;height:36px;font-size:20px}.file-viewer-prev{left:10px}.file-viewer-next{right:10px}.file-viewer-close{width:36px;height:36px;font-size:20px;top:10px;right:10px}.file-viewer-counter{padding:6px 12px;font-size:12px;bottom:60px}.file-viewer-thumbnails{max-width:100%;padding:8px}.file-viewer-thumbnails-scroll-btn{width:32px;height:32px;font-size:16px}.file-viewer-thumbnail{width:50px;min-width:50px;height:50px}}.file-viewer-main:has(.file-viewer-pdf){overflow:visible}.file-viewer-content:has(.file-viewer-pdf) .file-viewer-close{top:5rem}.pdf-container{justify-content:center;width:100vw;height:100vh;display:flex;overflow:visible}.file-viewer-pdf{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%;box-shadow:0 10px 40px #0000004d}\n .toast-container{z-index:100000;pointer-events:none;flex-direction:column;gap:10px;display:flex;position:absolute;bottom:24px;right:24px}.confirm-overlay{z-index:100001;-webkit-backdrop-filter:blur(8px);pointer-events:auto;border-radius:inherit;background:#0f172a66;justify-content:center;align-items:center;animation:.3s ease-out confirm-fade-in;display:flex;position:absolute;inset:0}@keyframes confirm-fade-in{0%{opacity:0}to{opacity:1}}.confirm-toast{text-align:center;background:#fff;border:1px solid #fffc;border-radius:24px;flex-direction:column;align-items:center;gap:0;width:420px;min-width:420px;animation:.4s cubic-bezier(.175,.885,.32,1.275) confirm-pop-up;display:flex;overflow:visible;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a,0 0 0 1px #0000000d;padding:32px!important}.confirm-toast:before{display:none}@keyframes confirm-pop-up{0%{opacity:0;transform:scale(.9)translateY(20px)}to{opacity:1;transform:scale(1)translateY(0)}}.confirm-modal-content{flex-direction:column;align-items:center;width:100%;display:flex}.confirm-toast .toast-message{color:#64748b;margin-bottom:32px;font-size:15px;font-weight:500;line-height:1.6}.confirm-toast .toast-actions{gap:12px;width:100%;display:flex}.confirm-toast .toast-btn{border-radius:16px;flex:1;padding:14px;font-size:15px;font-weight:700}.confirm-toast .toast-btn.cancel{color:#475569;background:#f1f5f9;border:none}.confirm-toast .toast-btn.cancel:hover{color:#1e293b;background:#e2e8f0}.dark-theme .confirm-toast{background:#1e293b;border-color:#ffffff1a}.dark-theme .confirm-title{color:#f8fafc}.dark-theme .confirm-toast .toast-message{color:#94a3b8}.dark-theme .confirm-toast .toast-btn.cancel{color:#cbd5e1;background:#334155}.dark-theme .confirm-toast .toast-btn.cancel:hover{color:#f8fafc;background:#475569}.dark-theme .confirm-toast.warning .confirm-icon{background:#f59e0b26}.toast-item{pointer-events:auto;color:#1e293b;background:#fff;border:1px solid #fff9;border-radius:20px;align-items:center;gap:12px;min-width:500px;max-width:calc(100% - 40px);padding:12px 16px;font-size:14px;font-weight:500;animation:.4s cubic-bezier(.175,.885,.32,1.275) toast-pop-in;display:flex;position:relative;overflow:hidden;box-shadow:0 4px 6px -1px #0000000d,0 10px 15px -3px #0000001a}.toast-item:before{content:\"\";width:4px;transition:background .3s;position:absolute;top:0;bottom:0;left:0}.toast-item.success:before{background:#10b981}.toast-item.error:before{background:#ef4444}.toast-item.info:before{background:#3b82f6}.toast-item.warning:before{background:#f59e0b}.toast-item span{background:#00000008;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;display:flex}.toast-item button{cursor:pointer;color:#94a3b8;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;padding:4px;transition:all .2s;display:flex}.toast-item button:hover{color:#1e293b;background:#0000000d}@keyframes toast-pop-in{0%{opacity:0;transform:translate(20px)scale(.9)}to{opacity:1;transform:translate(0)scale(1)}}.dark-theme .toast-item{color:#f8fafc;background:#1e293bb3;border-color:#ffffff14;box-shadow:0 20px 25px -5px #0003}.dark-theme .toast-item span{background:#ffffff0d}.toast-message{flex:1}.toast-actions{align-items:center;gap:12px;display:flex}.toast-btn{cursor:pointer;white-space:nowrap;border-radius:10px;justify-content:center;align-items:center;padding:8px 20px;font-size:14px;font-weight:600;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.toast-btn.cancel{color:#64748b;background:0 0;border:1px solid #00000014}.dark-theme .toast-btn.cancel{color:#94a3b8;border-color:#ffffff1a}.toast-btn.cancel:hover{background:#0000000d}.dark-theme .toast-btn.cancel:hover{background:#ffffff0d}.toast-btn.confirm{color:#fff;border:none;box-shadow:0 4px 6px -1px #0000001a}.toast-btn.confirm:hover{filter:brightness(1.1);transform:translateY(-1px);box-shadow:0 10px 15px -3px #0000001a}.toast-btn.confirm:active{transform:translateY(0)}.toast-item.warning .toast-btn.confirm{background:linear-gradient(135deg,#f59e0b,#d97706)}.toast-item.success .toast-btn.confirm{background:linear-gradient(135deg,#10b981,#059669)}.toast-item.info .toast-btn.confirm{background:linear-gradient(135deg,#3b82f6,#2563eb)}.toast-item.error .toast-btn.confirm{background:linear-gradient(135deg,#ef4444,#dc2626)}.toast-close-btn{cursor:pointer;opacity:.5;color:inherit;background:0 0;border:none;justify-content:center;align-items:center;padding:0 0 0 8px;font-size:16px;display:flex}\n .side-bar-info-chat{border-left:1px solid var(--chat-border);background:#fff;flex-direction:column;flex-shrink:0;width:320px;display:flex}.info-header{justify-content:flex-end;padding:16px;display:flex}.close-info-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:4px;padding:4px}.close-info-btn:hover{background:#f1f5f9}.info-content-scroll{flex-direction:column;flex:1;padding:0 20px 20px;display:flex;overflow-y:auto}.info-content-scroll::-webkit-scrollbar{width:4px}.info-content-scroll::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:10px}.info-basic-section{text-align:center;flex-direction:column;align-items:center;display:flex}.info-avatar-large{width:80px;height:80px}.info-avatar-large .chat-avatar{font-size:24px}.info-main-details{flex-direction:column;display:flex}.info-chat-name{color:#1e293b;justify-content:center;align-items:center;gap:8px;margin-top:12px;margin-bottom:4px;font-size:18px;font-weight:700;display:flex}.info-status-icons{color:#94a3b8;gap:4px;display:flex}.info-member-count{color:#64748b;margin-top:0;margin-bottom:10px;font-size:14px}.info-quick-actions{justify-content:space-around;margin-bottom:24px;display:flex}.action-item{cursor:pointer;flex-direction:column;align-items:center;gap:8px;display:flex}.action-icon-info{color:#475569;background:#f8fafc;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:80px;height:60px;transition:all .2s;display:flex}.action-item:hover .action-icon-info{color:var(--primary);background:#f1f5f9}.action-item span{color:#475569;font-size:13px;font-weight:500}.menu-item{cursor:pointer;color:#1e293b;border-radius:8px;justify-content:space-between;align-items:center;padding:10px 12px;font-size:15px;font-weight:500;display:flex}.menu-item:hover{background:#f8fafc}.menu-left{align-items:center;gap:12px;display:flex}.info-members-section{padding:16px 0}.section-title-row{color:#64748b;justify-content:space-between;align-items:center;margin-bottom:12px;padding:0 4px;font-size:14px;font-weight:600;display:flex}.title-actions{color:#94a3b8;gap:8px;display:flex}.title-actions svg{cursor:pointer}.arrow-icon{transition:transform .2s}.arrow-icon.collapsed{transform:rotate(-180deg)}.member-item-left.clickable{cursor:pointer}.members-compact-list{flex-direction:column;display:flex}.members-facepile{align-items:center;padding:8px 4px;display:flex}.facepile-item{z-index:1;border:2px solid #fff;border-radius:50%;width:32px;height:32px;margin-left:-8px;transition:transform .2s;position:relative}.facepile-item:first-child{margin-left:0}.facepile-item:hover{z-index:10;transform:translateY(-4px)}.facepile-item .member-avatar-small{width:100%;height:100%}.facepile-item .online-status{border-width:1.5px;width:8px;height:8px;bottom:0;right:0}.facepile-more{color:#64748b;z-index:0;cursor:pointer;background:#f1f5f9;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;margin-left:-8px;font-size:11px;font-weight:700;display:flex}.facepile-more:hover{background:#e2e8f0}.member-compact-item{border-radius:8px;justify-content:space-between;align-items:center;padding:8px;transition:background .2s;display:flex;position:relative}.member-compact-item:hover{background:#f8fafc}.member-item-left{align-items:center;gap:8px;display:flex}.member-avatar-small{border-radius:50%;width:32px;height:32px;position:relative}.member-avatar-small img,.member-img{object-fit:cover;border-radius:50%;width:100%;height:100%;display:block}.member-initials{background:var(--primary);color:#fff;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:14px;font-weight:600;display:flex}.member-info{flex-direction:column;gap:2px;display:flex}.member-options-container{align-items:center;display:flex;position:relative}.member-options-btn{color:#94a3b8;cursor:pointer;opacity:0;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:6px;transition:all .2s;display:flex}.member-compact-item:hover .member-options-btn{opacity:1}.member-options-btn:hover{color:#475569;background:#e2e8f0}.member-dropdown-menu{z-index:100;background:#fff;border:1px solid #f1f5f9;border-radius:12px;width:190px;margin-top:4px;padding:6px;animation:.2s fadeIn;position:absolute;top:100%;right:0;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}@keyframes fadeIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.dropdown-item{color:#1e293b;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:10px;width:100%;padding:10px 12px;font-size:14px;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{background:#f1f5f9}.dropdown-item.delete{color:#ef4444}.dropdown-item.delete:hover{background:#fef2f2}.dropdown-item svg{flex-shrink:0}.member-name-row{align-items:center;gap:4px;width:fit-content;display:flex}.member-role{color:#64748b;font-size:12px}.online-status{background:#22c55e;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;bottom:0;right:0}.info-summary-section{padding:16px 0}.info-summary-section .section-title{color:#64748b;margin-bottom:12px;font-size:14px;font-weight:600}.summary-tabs{background:#f1f5f9;border-radius:8px;margin-bottom:16px;padding:4px;display:flex}.tab-item{text-align:center;color:#64748b;cursor:pointer;border-radius:6px;flex:1;padding:6px;font-size:13px}.tab-item.active{color:#1e293b;background:#fff;font-weight:600;box-shadow:0 1px 3px #0000001a}.file-item{border-radius:8px;align-items:center;gap:12px;padding:8px;display:flex}.file-item:hover{background:#f8fafc}.file-icon{background:#f1f5f9;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.file-details{flex-direction:column;flex:1;min-width:0;display:flex}.file-name{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:500;overflow:hidden}.file-size{color:#94a3b8;font-size:12px}.file-download-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;padding:4px}.file-download-btn:hover{color:var(--primary)}.group-management-view,.main-info-view{animation:.25s ease-out fadeInSlide}@keyframes fadeInSlide{0%{opacity:0;transform:translate(15px)}to{opacity:1;transform:translate(0)}}.header-left{flex:1;align-items:center;gap:12px;display:flex}.back-info-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:4px;display:flex}.back-info-btn:hover{background:#f1f5f9}.management-section{padding:16px 0}.management-section.border-top{border-top:1px solid #f1f5f9}.section-subtitle{color:#64748b;margin-bottom:16px;padding:0 4px;font-size:14px}.settings-list{flex-direction:column;display:flex}.setting-item{cursor:pointer;justify-content:space-between;align-items:center;padding:12px 4px;transition:background .2s;display:flex}.setting-item span{color:#1e293b;flex:1;padding-right:12px;font-size:14px;line-height:1.4}.setting-item input[type=checkbox]{width:18px;height:18px;accent-color:var(--primary);cursor:pointer}.setting-item-switch{justify-content:space-between;align-items:center;padding:12px 4px;display:flex}.setting-info{flex:1;align-items:center;gap:8px;display:flex}.setting-info span{color:#1e293b;max-width:200px;font-size:14px;line-height:1.4}.help-icon{color:#94a3b8;cursor:pointer}.switch{flex-shrink:0;width:36px;height:20px;display:inline-block;position:relative}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;background-color:#e2e8f0;transition:all .4s;position:absolute;inset:0}.slider:before{content:\"\";background-color:#fff;width:14px;height:14px;transition:all .4s;position:absolute;bottom:3px;left:3px}input:checked+.slider{background-color:var(--primary)}input:checked+.slider:before{transform:translate(16px)}.slider.round{border-radius:20px}.slider.round:before{border-radius:50%}.management-menu{flex-direction:column;display:flex}.management-menu .menu-item{padding:12px 4px}.management-menu .menu-left svg{color:#64748b}.info-panel-clear-history{color:#d4183d;cursor:pointer;background:0 0;border:none;place-self:center;gap:4px;padding:7px 12px;display:flex}.info-panel-clear-history>span{margin-top:1px}\n .app-sidebar{background:var(--app-sidebar-bg);flex-direction:column;flex-shrink:0;align-items:center;gap:32px;width:64px;padding:12px 12px 24px;display:flex}.app-nav{flex-direction:column;flex:1;gap:16px;display:flex}.nav-item{color:#64748b;cursor:pointer;border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;display:flex}.nav-item:hover{background:var(--active-item-bg);color:var(--primary)}.nav-item.active{background:var(--primary);color:var(--primary-contrast)}.nav-separator{opacity:.8;background:#98a8b3;width:40px;height:1px;margin:4px 0}.app-sidebar-footer{flex-direction:column;align-items:center;gap:20px;padding-bottom:8px;display:flex}.app-avatar{background:#f1f5f9;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;display:flex;overflow:hidden;box-shadow:0 2px 8px #0000000d}.app-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.app-avatar-fallback{color:#64748b;justify-content:center;align-items:center;width:100%;height:100%;font-size:14px;font-weight:700;display:flex}\n .modal-overlay{z-index:9999;-webkit-backdrop-filter:blur();backdrop-filter:blur();background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.profile-modal-content{background:#fff;border-radius:20px;width:400px;padding:30px;animation:.3s cubic-bezier(.34,1.56,.64,1) modalScaleUp;position:relative;box-shadow:0 20px 40px #0003}@keyframes modalScaleUp{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.close-modal-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:5px;transition:all .2s;display:flex;position:absolute;top:20px;right:20px}.close-modal-btn:hover{color:#475569;background:#f1f5f9}.profile-header{text-align:center;margin-bottom:25px}.profile-avatar-wrapper{width:90px;height:90px;margin:0 auto 15px;position:relative}.profile-avatar-wrapper img{object-fit:cover;border:4px solid #f8fafc;border-radius:50%;width:100%;height:100%}.profile-avatar-placeholder{color:#fff;background:#3b82f6;border:4px solid #f8fafc;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:36px;font-weight:600;display:flex}.profile-online-status{background:#22c55e;border:3px solid #fff;border-radius:50%;width:16px;height:16px;position:absolute;bottom:5px;right:5px}.profile-name{color:#1e293b;margin-bottom:4px;font-size:20px;font-weight:700}.status-text{color:#64748b;font-size:13px}.profile-actions{gap:12px;margin-bottom:30px;display:flex}.profile-action-btn{cursor:pointer;color:#475569;background:#f8fafc;border:none;border-radius:12px;flex-direction:column;flex:1;align-items:center;gap:6px;padding:12px 8px;transition:all .2s;display:flex}.profile-action-btn:hover{color:#3b82f6;background:#f1f5f9;transform:translateY(-2px)}.profile-action-btn svg{color:#64748b;transition:color .2s}.profile-action-btn:hover svg{color:#3b82f6}.profile-action-btn span{font-size:13px;font-weight:600}.profile-details{border-top:1px solid #f1f5f9;padding-top:10px}.detail-item{border-bottom:1px solid #f1f5f9;justify-content:flex-start;align-items:center;padding:12px 0;font-size:14px;display:flex}.detail-item:last-child{border-bottom:none}.detail-item .label{color:#64748b;flex-shrink:0;width:110px}.detail-item .value{color:#1e293b;font-size:16px;font-weight:400}.value.email,.value.phone{color:#3b82f6;cursor:pointer}.value.email:hover,.value.phone:hover{text-decoration:underline}\n .modal-content.add-chat-modal{background:#fff;border:1px solid #0000000d;border-radius:10px;flex-direction:column;width:450px;max-width:450px;height:auto;min-height:430px;max-height:90vh;padding:0;display:flex;overflow:hidden;box-shadow:0 10px 40px #0000001a}.add-chat-modal .modal-header{justify-content:space-between;align-items:center;padding:16px 20px 0;display:flex}.add-chat-modal .modal-title{color:#1f2937;text-align:left;margin:0;font-size:18px;font-weight:600}.add-chat-modal .close-modal-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:4px;transition:background .2s;display:flex}.add-chat-modal .close-modal-btn:hover{color:#111827;background:#f3f4f6}.add-chat-modal .modal-body{flex-direction:column;flex:1;gap:8px;padding:20px 20px 0;display:flex;overflow:hidden}.add-chat-modal .group-info-section{align-items:center;gap:16px;display:flex}.add-chat-modal .group-avatar-upload{flex-shrink:0}.add-chat-modal .avatar-placeholder{color:#9ca3af;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex;position:relative}.add-chat-modal .upload-icon{color:#6b7280;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:50%;justify-content:center;align-items:center;width:18px;height:18px;display:flex;position:absolute;bottom:-2px;right:-2px}.add-chat-modal .preview-avatar{object-fit:cover;border-radius:100%;width:100%;height:100%}.add-chat-modal .group-name-input{border:none;border-bottom:1px solid #e5e7eb;outline:none;flex:1;padding:8px 0;font-size:16px;transition:border-color .2s}.add-chat-modal .group-name-input:focus{border-bottom-color:#3b82f6}.add-chat-modal .search-section .chat-search-bar{padding:0}.add-chat-modal .search-section .search-input{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:10px 16px 10px 40px;font-size:15px}.add-chat-modal .search-section .search-icon{left:16px}.add-chat-modal .selected-members-tags{flex-wrap:wrap;gap:8px;display:flex}.add-chat-modal .member-tag{color:#2563eb;background:#eff6ff;border-radius:100px;align-items:center;gap:6px;padding:4px 10px;font-size:14px;font-weight:500;display:flex}.add-chat-modal .member-tag>span{margin-bottom:-4px}.add-chat-modal .remove-tag-btn{color:#2563eb;cursor:pointer;opacity:.7;background:0 0;border:none;justify-content:center;align-items:center;padding:2px;transition:opacity .2s;display:flex}.add-chat-modal .remove-tag-btn:hover{opacity:1}.modal-content.add-chat-modal.has-tags{height:550px}.add-chat-modal .members-list-container{border-top:1px solid #f3f4f6;flex:1;margin:0 -20px;padding:0 7px;overflow-y:hidden}.add-chat-modal .members-list{margin:0;padding:12px 0}.add-chat-modal .member-item{cursor:pointer;background:0 0;border-radius:10px;align-items:center;gap:12px;padding:10px 12px;transition:background .2s;display:flex}.add-chat-modal .member-item.selected{background:#f0f7ff}.add-chat-modal .member-item:hover{background:#f9fafb}.add-chat-modal .member-item.selected:hover{background:#e0efff}.add-chat-modal .member-checkbox{flex-shrink:0}.add-chat-modal .checkbox-custom{border:1.5px solid #d1d5db;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;transition:all .2s;display:flex}.add-chat-modal .checkbox-custom.checked{background:#3b82f6;border-color:#3b82f6}.add-chat-modal .member-avatar-wrapper{width:32px;height:32px;position:relative}.add-chat-modal .member-avatar{color:#4b5563;background:#f3f4f6;border:none;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:14px;font-weight:600;display:flex;overflow:hidden}.add-chat-modal .member-avatar img{object-fit:cover;width:100%;height:100%}.add-chat-modal .avatar-letter{color:#fff;background:linear-gradient(135deg,#6366f1,#a855f7);justify-content:center;align-items:center;width:100%;height:100%;display:flex}.add-chat-modal .status-dot{width:12px;height:12px;position:absolute;bottom:-1px;right:-1px}.add-chat-modal .member-name{color:#374151;font-size:15px;font-weight:500}.add-chat-modal .modal-footer{border-top:1px solid #f3f4f6;justify-content:flex-end;gap:12px;padding:11px 20px;display:flex}.add-chat-modal .footer-btn{cursor:pointer;border:none;border-radius:10px;padding:10px 24px;font-size:15px;font-weight:600;transition:all .2s}.add-chat-modal .footer-btn.cancel{color:#4b5563;background:#f3f4f6}.add-chat-modal .footer-btn.cancel:hover{background:#e5e7eb}.add-chat-modal .footer-btn.confirm{color:#fff;background:#3b82f6}.add-chat-modal .footer-btn.confirm:hover:not(.disabled){background:#7a9ce9}.add-chat-modal .footer-btn.disabled{opacity:.6;cursor:not-allowed}.display-none{display:none}.modal-content.update-group-modal{background:#fff;border:1px solid #0000000d;border-radius:10px;flex-direction:column;width:450px;max-width:450px;height:auto;min-height:430px;max-height:90vh;padding:0;display:flex;overflow:hidden;box-shadow:0 10px 40px #0000001a}.update-group-modal .modal-header{justify-content:space-between;align-items:center;padding:16px 20px 0;display:flex}.update-group-modal .modal-title{color:#1f2937;text-align:left;margin:0;font-size:18px;font-weight:600}.update-group-modal .close-modal-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:4px;transition:background .2s;display:flex}.update-group-modal .close-modal-btn:hover{color:#111827;background:#f3f4f6}.update-group-modal .modal-body{flex-direction:column;flex:1;gap:8px;padding:20px 20px 0;display:flex;overflow:hidden}.update-group-modal .group-info-section{align-items:center;gap:16px;display:flex}.update-group-modal .group-avatar-upload{cursor:pointer;flex-shrink:0}.update-group-modal .group-avatar-upload input{display:none}.update-group-modal .avatar-placeholder{color:#9ca3af;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex;position:relative}.update-group-modal .avatar-placeholder img{object-fit:cover;border-radius:50%;width:100%;height:100%}.update-group-modal .group-name-input{border:none;border-bottom:1px solid #e5e7eb;outline:none;flex:1;padding:8px 0;font-size:16px;transition:border-color .2s}.update-group-modal .group-name-input:focus{border-bottom-color:#3b82f6}.update-group-modal .members-section{margin-top:8px}.update-group-modal .section-title{padding-left:0;display:block}.update-group-modal .members-list-container{border-top:none;flex:1;height:240px;margin:0 -20px;padding:0 7px;overflow-y:hidden}.update-group-modal .members-list{margin:0;padding:12px 0}.update-group-modal .member-item{cursor:default;background:0 0;border-radius:10px;align-items:center;gap:12px;padding:10px 12px;transition:background .2s;display:flex}.update-group-modal .member-item:hover{background:#f9fafb}.update-group-modal .member-avatar-wrapper{width:32px;height:32px;position:relative}.update-group-modal .status-dot{width:12px;height:12px;position:absolute;bottom:-1px;right:-1px}.update-group-modal .member-info-wrapper{flex-direction:column;flex:1;gap:2px;display:flex}.update-group-modal .member-name-row{align-items:center;gap:4px;width:fit-content;display:flex}.update-group-modal .member-name{color:#1e293b;font-size:15px;font-weight:500}.update-group-modal .owner-icon{color:#64748b}.update-group-modal .member-role{color:#64748b;font-size:13px}.update-group-modal .remove-member-btn{color:#ef4444;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:4px;font-size:14px;display:flex}.update-group-modal .modal-footer{border-top:1px solid #f3f4f6;justify-content:flex-end;gap:12px;padding:11px 20px;display:flex}.update-group-modal .footer-btn{cursor:pointer;border:none;border-radius:10px;padding:10px 24px;font-size:15px;font-weight:600;transition:all .2s}.update-group-modal .footer-btn.cancel{color:#4b5563;background:#f3f4f6}.update-group-modal .footer-btn.cancel:hover{background:#e5e7eb}.update-group-modal .footer-btn.confirm{color:#fff;background:#3b82f6}.update-group-modal .footer-btn.confirm:hover:not(.disabled){background:#7a9ce9}.update-group-modal .footer-btn.disabled{opacity:.6;cursor:not-allowed}\n .contact-list-header>div{align-items:center;gap:8px;display:flex}.contact-list-toolbar{gap:12px}.toolbar-search{flex:1}.filter-select{position:relative}.avatar-placeholder{color:#fff;background:#3b82f6;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:16px;font-weight:600;display:flex}.online-status.is-online{background:#22c55e}.online-status.is-offline{background:#94a3b8}.contact-action-btn{background:0 0;border:none}\n .chat-avatar-emoji{background-color:#fff;border-radius:100%;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.chat-avatar-img{object-fit:cover;border-radius:100%;width:100%;height:100%}\n", O = (e, t = 0, n = "Hội thoại không tên") => e ? e.name ? e.name : e.type === "group" ? n : e.members?.find((e) => e.id !== t)?.name ?? n : n, k = new Set([
11
11
  "pdf",
12
12
  "doc",
13
13
  "docx",
@@ -41,8 +41,9 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
41
41
  hasMultipleAttachments: a.has("multiple"),
42
42
  hasAttachment: (t && t?.length > 0) ?? !1,
43
43
  hasGroupChat: s.has("group"),
44
+ hasSingleChat: s.has("single"),
44
45
  hasChangeColor: c.has("change-color"),
45
- hasMultipleLanguages: c.has("multi-language")
46
+ hasMultipleLanguages: !1
46
47
  };
47
48
  }, M = (e) => Object.keys(A).filter((t) => e.attachments.has(t)).map((e) => A[e]).join(","), ee = (e) => (t) => {
48
49
  let n = t.type;
@@ -51,11 +52,11 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
51
52
  if (n.startsWith("audio/")) return e.attachments.has("audio");
52
53
  let r = t.name.split(".").pop()?.toLowerCase() ?? "";
53
54
  return k.has(r), e.attachments.has("file");
54
- }, te = (e) => {
55
+ }, N = (e) => {
55
56
  if (!e) return !1;
56
57
  let t = new Date(e).getTime();
57
58
  return Date.now() - t <= 300 * 1e3;
58
- }, N = (e) => {
59
+ }, P = (e) => {
59
60
  let t = new Date(e), n = /* @__PURE__ */ new Date(), r = new Date(n.getFullYear(), n.getMonth(), n.getDate()), i = new Date(r);
60
61
  i.setDate(i.getDate() - 1);
61
62
  let a = new Date(t.getFullYear(), t.getMonth(), t.getDate());
@@ -64,26 +65,26 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
64
65
  month: "2-digit",
65
66
  year: "numeric"
66
67
  });
67
- }, ne = (e) => {
68
+ }, te = (e) => {
68
69
  let t = Math.floor(e / 1e3);
69
70
  return `${Math.floor(t / 60)}:${(t % 60).toString().padStart(2, "0")}`;
70
- }, P = null, re = async (e) => {
71
- P || (P = await C(), P.configure({
71
+ }, F = null, ne = async (e) => {
72
+ F || (F = await C(), F.configure({
72
73
  sampleRate: 44100,
73
74
  channels: 1,
74
75
  bitrate: 128
75
76
  }));
76
77
  let t = (await new AudioContext().decodeAudioData(await e.arrayBuffer())).getChannelData(0), n = [], r = 1152;
77
78
  for (let e = 0; e < t.length; e += r) {
78
- let i = t.subarray(e, e + r), a = P.encode([i]);
79
+ let i = t.subarray(e, e + r), a = F.encode([i]);
79
80
  a && a.length > 0 && n.push(new Uint8Array(a));
80
81
  }
81
- let i = P.finalize();
82
- i && i.length > 0 && n.push(new Uint8Array(i)), P = null;
82
+ let i = F.finalize();
83
+ i && i.length > 0 && n.push(new Uint8Array(i)), F = null;
83
84
  let a = n.reduce((e, t) => e + t.length, 0), o = new Uint8Array(a), s = 0;
84
85
  for (let e of n) o.set(e, s), s += e.length;
85
86
  return new Blob([o], { type: "audio/mp3" });
86
- }, ie = 25 * 1024 * 1024, F = [
87
+ }, I = 25 * 1024 * 1024, re = [
87
88
  "🙂",
88
89
  "😀",
89
90
  "😂",
@@ -102,7 +103,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
102
103
  "💯",
103
104
  "✅",
104
105
  "❌"
105
- ], I = {
106
+ ], L = {
106
107
  pdf: "📄",
107
108
  doc: "📄",
108
109
  docx: "📄",
@@ -125,12 +126,12 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
125
126
  mov: "🎬",
126
127
  mkv: "🎬",
127
128
  default: "📎"
128
- }, L = (e) => e && I[e.includes(".") ? e.split(".").pop()?.toLowerCase() ?? "" : e.toLowerCase()] || "📎", R = /* @__PURE__ */ new WeakMap(), ae = (e) => {
129
- if (!R.has(e)) {
129
+ }, R = (e) => e && L[e.includes(".") ? e.split(".").pop()?.toLowerCase() ?? "" : e.toLowerCase()] || "📎", ie = /* @__PURE__ */ new WeakMap(), ae = (e) => {
130
+ if (!ie.has(e)) {
130
131
  let t = Math.random().toString(36).substring(2, 9);
131
- R.set(e, `${e.name}-${e.size}-${t}`);
132
+ ie.set(e, `${e.name}-${e.size}-${t}`);
132
133
  }
133
- return R.get(e);
134
+ return ie.get(e);
134
135
  }, oe = (e) => {
135
136
  if (e === 0) return "0 B";
136
137
  let t = 1024, n = [
@@ -140,7 +141,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
140
141
  "GB"
141
142
  ], r = Math.floor(Math.log(e) / Math.log(t));
142
143
  return Math.round(e / t ** +r * 100) / 100 + " " + n[r];
143
- }, z = (e) => {
144
+ }, se = (e) => {
144
145
  let t = e.split(".").pop()?.toLowerCase() ?? "";
145
146
  return [
146
147
  "jpg",
@@ -163,13 +164,13 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
163
164
  "ogg",
164
165
  "wma"
165
166
  ].includes(t) ? "audio" : "other";
166
- }, se = (e) => URL.createObjectURL(e), ce = (e) => e.type.startsWith("image/"), le = (e) => {
167
+ }, ce = (e) => URL.createObjectURL(e), le = (e) => e.type.startsWith("image/"), z = (e) => {
167
168
  let t = (e) => {
168
169
  let t = e.name.toLowerCase().split(".").pop() ?? "";
169
170
  return e.type.startsWith("image/") ? 0 : t === "mp4" ? 1 : t === "mp3" ? 2 : 3;
170
171
  };
171
172
  return [...e].sort((e, n) => t(e) - t(n));
172
- }, B = (e) => new Promise((t) => {
173
+ }, ue = (e) => new Promise((t) => {
173
174
  if (!e.type.startsWith("image/")) {
174
175
  t(e);
175
176
  return;
@@ -197,14 +198,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
197
198
  }, a, s);
198
199
  }, r.onerror = () => t(e), r.src = n.target?.result;
199
200
  }, n.onerror = () => t(e), n.readAsDataURL(e);
200
- }), ue = (e, t, n) => e.length === 0 ? null : !t && e.length > 1 ? {
201
+ }), B = (e, t, n) => e.length === 0 ? null : !t && e.length > 1 ? {
201
202
  message: "Chỉ cho phép đính kèm tối đa 1 file.",
202
203
  type: "warning"
203
204
  } : e.length > 20 ? {
204
205
  message: "Chỉ cho phép tối đa 20 file.",
205
206
  type: "warning"
206
207
  } : e.some((e) => e.isError) ? {
207
- message: `Vui lòng loại bỏ các file bị lỗi (vượt quá ${ie / (1024 * 1024)} MB).`,
208
+ message: `Vui lòng loại bỏ các file bị lỗi (vượt quá ${I / (1024 * 1024)} MB).`,
208
209
  type: "warning"
209
210
  } : e.every(n) ? null : {
210
211
  message: "Vui lòng chỉ chọn các loại file được phép.",
@@ -247,7 +248,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
247
248
  },
248
249
  setMembers: (e, t) => {
249
250
  e.members = t.payload.map((e) => {
250
- let t = te(e.socket_at);
251
+ let t = N(e.socket_at);
251
252
  return {
252
253
  ...e,
253
254
  socket_ids: e.socket_ids ?? (t && e.socket_id ? [e.socket_id] : []),
@@ -258,7 +259,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
258
259
  },
259
260
  setCurrentChatMembers: (e, t) => {
260
261
  e.currentChatMembers = t.payload.map((e) => {
261
- let t = te(e.socket_at);
262
+ let t = N(e.socket_at);
262
263
  return {
263
264
  ...e,
264
265
  socket_ids: e.socket_ids ?? (t && e.socket_id ? [e.socket_id] : []),
@@ -373,7 +374,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
373
374
  i && (i[r] = !i[r]), e.currentChat?.id === n && (e.currentChat[r] = !e.currentChat[r]);
374
375
  }
375
376
  }
376
- }), { clearAll: pe, setCurrentUser: me, setChats: he, setCurrentChat: V, setCurrentChatMessages: ge, setCurrentChatMembers: _e, setMembers: ve, setMember: H, setMemberDisconnect: ye, setMessagesPagination: be, prependMessages: xe, addNewMessage: Se, removeChat: Ce, addChat: we, updateChat: Te, updateChatAvatar: Ee, removeMessage: De, updateMessage: Oe, setReplyingMessage: ke, setTotalMessagesUnread: Ae, updateMemberReadStatus: U, toggleChatSetting: W } = fe.actions, je = fe.reducer, G = class e {
377
+ }), { clearAll: pe, setCurrentUser: me, setChats: he, setCurrentChat: V, setCurrentChatMessages: ge, setCurrentChatMembers: _e, setMembers: H, setMember: ve, setMemberDisconnect: ye, setMessagesPagination: be, prependMessages: xe, addNewMessage: Se, removeChat: Ce, addChat: we, updateChat: Te, updateChatAvatar: Ee, removeMessage: De, updateMessage: Oe, setReplyingMessage: ke, setTotalMessagesUnread: U, updateMemberReadStatus: W, toggleChatSetting: Ae } = fe.actions, je = fe.reducer, G = class e {
377
378
  static instance;
378
379
  chatSDK = null;
379
380
  constructor() {
@@ -527,7 +528,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
527
528
  setConfig(e) {
528
529
  this.chatSDK && this.chatSDK.setConfig(e);
529
530
  }
530
- }.getInstance(), Me = {
531
+ }.getInstance(), K = {
531
532
  common: {
532
533
  buttons: {
533
534
  save: "Save",
@@ -660,7 +661,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
660
661
  updateButton: "Update",
661
662
  updatingButton: "Updating..."
662
663
  }
663
- }, K = {
664
+ }, Me = {
664
665
  common: {
665
666
  buttons: {
666
667
  save: "Lưu",
@@ -794,14 +795,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
794
795
  updateButton: "Cập nhật",
795
796
  updatingButton: "Đang cập nhật..."
796
797
  }
797
- }, q = class e {
798
+ }, Ne = class e {
798
799
  static instance;
799
800
  translations;
800
801
  currentLocale;
801
802
  constructor() {
802
803
  this.currentLocale = "vietnamese", this.translations = {
803
- vietnamese: K,
804
- english: Me
804
+ vietnamese: Me,
805
+ english: K
805
806
  };
806
807
  }
807
808
  static getInstance() {
@@ -816,13 +817,13 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
816
817
  t(e, t) {
817
818
  let n = e.split("."), r = (e) => n.reduce((e, t) => {
818
819
  if (e && typeof e == "object") return e[t];
819
- }, e), i = r(this.translations[this.currentLocale]) ?? r(Me);
820
+ }, e), i = r(this.translations[this.currentLocale]) ?? r(K);
820
821
  if (typeof i != "string") return e;
821
822
  let a = i;
822
823
  if (t) for (let [e, n] of Object.entries(t)) a = a.replace(RegExp(`{${e}}`, "g"), n);
823
824
  return a;
824
825
  }
825
- }.getInstance(), Ne = S({
826
+ }.getInstance(), Pe = S({
826
827
  name: "widget-settingslice",
827
828
  initialState: {
828
829
  theme: localStorage.getItem("chat-theme") || "light",
@@ -836,7 +837,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
836
837
  reducers: {
837
838
  setConfig: (e, t) => {
838
839
  let n = t.payload;
839
- n !== void 0 && (e.features = n);
840
+ n && (e.features = n);
840
841
  },
841
842
  toggleTheme: (e) => {
842
843
  e.theme = e.theme === "light" ? "dark" : "light", localStorage.setItem("chat-theme", e.theme);
@@ -848,17 +849,17 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
848
849
  e.primaryColor = t.payload, localStorage.setItem("chat-primary-color", e.primaryColor);
849
850
  },
850
851
  setLanguage: (e, t) => {
851
- e.currentLanguage = t.payload, q.locale = t.payload, localStorage.setItem("chat-widget:language", e.currentLanguage);
852
+ e.currentLanguage = t.payload, Ne.locale = t.payload, localStorage.setItem("chat-widget:language", e.currentLanguage);
852
853
  }
853
854
  }
854
- }), { setConfig: Pe, toggleTheme: J, setFeatures: Y, setPrimaryColor: X, setLanguage: Fe } = Ne.actions, Ie = Ne.reducer, Le = y({
855
+ }), { setConfig: q, toggleTheme: J, setFeatures: Fe, setPrimaryColor: Ie, setLanguage: Le } = Pe.actions, Re = Pe.reducer, ze = y({
855
856
  chat: je,
856
- setting: Ie
857
- }), Re = b({
858
- reducer: (e, t) => (t.type === "chatSlice/logout" && (e = void 0), Le(e, t)),
857
+ setting: Re
858
+ }), Be = b({
859
+ reducer: (e, t) => (t.type === "chatSlice/logout" && (e = void 0), ze(e, t)),
859
860
  middleware: (e) => e({ serializableCheck: { ignoredPaths: ["chat.instance"] } }),
860
861
  devTools: { name: "ChatbotWidget" }
861
- }), ze = (e) => e.setting.features, Be = (e, t) => {
862
+ }), Ve = (e) => e.setting.features, He = (e, t) => {
862
863
  let n = {
863
864
  minutes: 1e3 * 60,
864
865
  hours: 1e3 * 60 * 60,
@@ -866,7 +867,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
866
867
  };
867
868
  return e * (n[t] || n.hours);
868
869
  };
869
- function Ve(e) {
870
+ function Ue(e) {
870
871
  return (t) => {
871
872
  let { allow_delete_message: n, delete_duration: r } = G.setting || {};
872
873
  if (!n) return !1;
@@ -875,7 +876,7 @@ function Ve(e) {
875
876
  return Date.now() - i <= e;
876
877
  };
877
878
  }
878
- function He(e) {
879
+ function We(e) {
879
880
  return (t) => {
880
881
  let { allow_revoke_message: n, revoke_duration: r } = G.setting || {};
881
882
  if (!n) return !1;
@@ -884,17 +885,17 @@ function He(e) {
884
885
  return Date.now() - i <= e;
885
886
  };
886
887
  }
887
- var Ue = x([ze], (e) => {
888
- let t = j(e), n = Be(G.setting?.delete_duration ?? 0, G.setting?.delete_duration_unit ?? "hours"), r = Be(G.setting?.revoke_duration ?? 0, G.setting?.revoke_duration_unit ?? "hours");
888
+ var Ge = x([Ve], (e) => {
889
+ let t = j(e), n = He(G.setting?.delete_duration ?? 0, G.setting?.delete_duration_unit ?? "hours"), r = He(G.setting?.revoke_duration ?? 0, G.setting?.revoke_duration_unit ?? "hours");
889
890
  return {
890
891
  ...t,
891
892
  acceptFilter: M(t.featureSet),
892
893
  isFileTypeAllowed: ee(t.featureSet),
893
894
  allowDeleteChat: G.setting?.allow_delete_chat ?? !1,
894
- allowDeleteMessage: Ve(n),
895
- allowRevokeMessage: He(r)
895
+ allowDeleteMessage: Ue(n),
896
+ allowRevokeMessage: We(r)
896
897
  };
897
- }), We = (e, t, n) => {
898
+ }), Ke = (e, t, n) => {
898
899
  let r = g(), i = f(!1), { currentUser: a, chats: o, currentChat: s } = _((e) => e.chat), l = f({
899
900
  chats: null,
900
901
  currentUser: null,
@@ -928,9 +929,9 @@ var Ue = x([ze], (e) => {
928
929
  }
929
930
  r(me(t)), console.warn("Authenticated as:", t);
930
931
  let [{ data: u }, { data: d }] = await Promise.all([G.getMembers(), G.getChats()]);
931
- r(he(d)), r(ve(u));
932
+ r(he(d)), r(H(u));
932
933
  let f = d?.reduce((e, n) => e + (n.new[t.id] ?? 0), 0) ?? 0;
933
- r(Ae(f)), console.warn("Total unread messages:", f);
934
+ r(U(f)), console.warn("Total unread messages:", f);
934
935
  } catch (e) {
935
936
  i.current = !1, console.error("Failed to init chat or authenticate:", e);
936
937
  }
@@ -971,7 +972,7 @@ var Ue = x([ze], (e) => {
971
972
  if (console.warn("Chat Event:", e), e.type === "read") {
972
973
  e.chat && r(Te(e.chat));
973
974
  let t = e.chat?.id ?? e.chat_id, n = e.member_id ?? e.user_id, i = e.message_id ?? e.chat?.message?.id;
974
- t && n && i && r(U({
975
+ t && n && i && r(W({
975
976
  chatId: Number(t),
976
977
  memberId: Number(n),
977
978
  lastReadId: Number(i)
@@ -984,7 +985,7 @@ var Ue = x([ze], (e) => {
984
985
  "members.connect"(e) {
985
986
  console.warn("Member Connected:", e);
986
987
  let { member: t, timestamp: n, socketId: i } = e;
987
- r(H({
988
+ r(ve({
988
989
  member: t,
989
990
  timestamp: n,
990
991
  socketId: i
@@ -1006,7 +1007,7 @@ var Ue = x([ze], (e) => {
1006
1007
  }), console.warn("Chat event listeners removed"), r(pe()), G.clearAuth(), console.warn("Clear auth");
1007
1008
  };
1008
1009
  }, [a?.id, r]);
1009
- }, Ge = t(void 0), Ke = ({ children: e }) => {
1010
+ }, qe = t(void 0), Je = ({ children: e }) => {
1010
1011
  let [t, n] = p(!1), [r, i] = p([]), [o, s] = p(0), c = {
1011
1012
  isOpen: t,
1012
1013
  files: r,
@@ -1018,11 +1019,11 @@ var Ue = x([ze], (e) => {
1018
1019
  n(!1);
1019
1020
  }, [])
1020
1021
  };
1021
- return /* @__PURE__ */ T(Ge.Provider, {
1022
+ return /* @__PURE__ */ T(qe.Provider, {
1022
1023
  value: c,
1023
1024
  children: e
1024
1025
  });
1025
- }, qe = ({ children: e }) => {
1026
+ }, Ye = ({ children: e }) => {
1026
1027
  let [t, n] = p([]), r = a((e) => {
1027
1028
  n((t) => t.filter((t) => t.id !== e));
1028
1029
  }, []), i = a((e, t = "info") => {
@@ -1047,7 +1048,7 @@ var Ue = x([ze], (e) => {
1047
1048
  }
1048
1049
  }]);
1049
1050
  }), [r]);
1050
- return /* @__PURE__ */ T(Je.Provider, {
1051
+ return /* @__PURE__ */ T(Xe.Provider, {
1051
1052
  value: {
1052
1053
  showToast: i,
1053
1054
  removeToast: r,
@@ -1056,11 +1057,11 @@ var Ue = x([ze], (e) => {
1056
1057
  },
1057
1058
  children: e
1058
1059
  });
1059
- }, Je = t(void 0), Ye = () => {
1060
- let e = o(Ge);
1060
+ }, Xe = t(void 0), Ze = () => {
1061
+ let e = o(qe);
1061
1062
  if (!e) throw Error("useFileViewer must be used within FileViewerProvider");
1062
1063
  return e;
1063
- }, Xe = ({ onFilesAdded: e }) => {
1064
+ }, Qe = ({ onFilesAdded: e }) => {
1064
1065
  let [t, n] = p(!1), r = f(0);
1065
1066
  return {
1066
1067
  isDragOver: t,
@@ -1079,7 +1080,7 @@ var Ue = x([ze], (e) => {
1079
1080
  i && i.length > 0 && e(i);
1080
1081
  }, [e])
1081
1082
  };
1082
- }, Ze = () => {
1083
+ }, $e = () => {
1083
1084
  let [e, t] = p({
1084
1085
  isRecording: !1,
1085
1086
  duration: 0,
@@ -1130,7 +1131,7 @@ var Ue = x([ze], (e) => {
1130
1131
  o.current &&= (clearInterval(o.current), null), r.current?.getTracks().forEach((e) => e.stop());
1131
1132
  let a = new Blob(i.current, { type: "audio/webm;codecs=opus" }), s;
1132
1133
  try {
1133
- s = await re(a);
1134
+ s = await ne(a);
1134
1135
  } catch (e) {
1135
1136
  console.error("MP3 convert failed, fallback to webm", e), s = a;
1136
1137
  }
@@ -1168,45 +1169,49 @@ var Ue = x([ze], (e) => {
1168
1169
  });
1169
1170
  }, [])
1170
1171
  }];
1171
- }, Z = () => {
1172
+ }, Y = () => {
1173
+ let e = o(Xe);
1174
+ if (!e) throw Error("useToast must be used within ToastProvider");
1175
+ return e;
1176
+ }, X = () => {
1172
1177
  _((e) => e.setting.currentLanguage);
1173
- let e = g();
1178
+ let { showToast: e } = Y(), t = g();
1174
1179
  return {
1175
- t: q.t.bind(q),
1180
+ t: Ne.t.bind(Ne),
1176
1181
  toggleChangeLanguage: () => {
1177
- q.locale === "english" ? (q.locale = "vietnamese", e(Fe("vietnamese"))) : (q.locale = "english", e(Fe("english")));
1182
+ Ne.locale === "vietnamese" ? e("Current only supports Vietnamese language", "info") : (Ne.locale = "vietnamese", t(Le("vietnamese")));
1178
1183
  }
1179
1184
  };
1180
- }, Qe = () => {
1181
- let e = o(Je);
1182
- if (!e) throw Error("useToast must be used within ToastProvider");
1183
- return e;
1184
- }, $e = (e) => {
1185
+ }, et = (e) => {
1185
1186
  let t = g(), n = f(!1);
1186
1187
  c(() => {
1187
1188
  (() => {
1188
1189
  if (!(!e || n.current)) try {
1189
- n.current = !0, e && t(Pe(e));
1190
+ if (n.current = !0, !e) return;
1191
+ t(q({
1192
+ ...e,
1193
+ chatModes: e.chatModes?.length ? [...e.chatModes, "single"] : ["single"]
1194
+ }));
1190
1195
  } catch (e) {
1191
1196
  n.current = !1, console.error("Failed to init chat or authenticate:", e);
1192
1197
  }
1193
1198
  })();
1194
1199
  }, [e, t]);
1195
- }, et = ({ chatKey: e, auth: t, features: n, logoUrl: r, workspace: i, ...a }) => {
1196
- $e(n), We(e, t, i);
1200
+ }, tt = ({ chatKey: e, auth: t, features: n, logoUrl: r, workspace: i, ...a }) => {
1201
+ et(n), Ke(e, t, i);
1197
1202
  let [o, s] = p("closed"), [c, l] = p(null), [u, d] = p(null), [f, m] = p({
1198
1203
  width: 1e3,
1199
1204
  height: 750
1200
1205
  });
1201
1206
  return /* @__PURE__ */ E("div", {
1202
1207
  className: `chatbot-container ${o}`,
1203
- children: [o === "closed" && /* @__PURE__ */ T(rt, {
1208
+ children: [o === "closed" && /* @__PURE__ */ T(it, {
1204
1209
  mode: o,
1205
1210
  setMode: s,
1206
1211
  dragPosition: c,
1207
1212
  setDragPosition: l,
1208
1213
  primaryColor: a.primaryColor
1209
- }), o !== "closed" && /* @__PURE__ */ T(Wt, {
1214
+ }), o !== "closed" && /* @__PURE__ */ T(Gt, {
1210
1215
  logoUrl: r,
1211
1216
  mode: o,
1212
1217
  setMode: s,
@@ -1222,15 +1227,15 @@ var Ue = x([ze], (e) => {
1222
1227
  ...a
1223
1228
  })]
1224
1229
  });
1225
- }, tt = () => {
1226
- let { isOpen: e, files: t, initialIndex: n, closeViewer: r } = Ye();
1230
+ }, nt = () => {
1231
+ let { isOpen: e, files: t, initialIndex: n, closeViewer: r } = Ze();
1227
1232
  return e ? /* @__PURE__ */ T(tn, {
1228
1233
  isOpen: e,
1229
1234
  files: t,
1230
1235
  initialIndex: n,
1231
1236
  onClose: r
1232
1237
  }) : null;
1233
- }, nt = (e) => {
1238
+ }, rt = (e) => {
1234
1239
  let t = f(null), [n, r] = p(null);
1235
1240
  return u(() => {
1236
1241
  let e = t.current;
@@ -1247,13 +1252,13 @@ var Ue = x([ze], (e) => {
1247
1252
  }
1248
1253
  r(i);
1249
1254
  }, []), /* @__PURE__ */ T(h, {
1250
- store: Re,
1251
- children: /* @__PURE__ */ T(Ke, { children: /* @__PURE__ */ T(qe, { children: /* @__PURE__ */ E("div", {
1255
+ store: Be,
1256
+ children: /* @__PURE__ */ T(Je, { children: /* @__PURE__ */ T(Ye, { children: /* @__PURE__ */ E("div", {
1252
1257
  ref: t,
1253
- children: [n && v(/* @__PURE__ */ T(et, { ...e }), n), n && v(/* @__PURE__ */ T(tt, {}), n)]
1258
+ children: [n && v(/* @__PURE__ */ T(tt, { ...e }), n), n && v(/* @__PURE__ */ T(nt, {}), n)]
1254
1259
  }) }) })
1255
1260
  });
1256
- }, rt = ({ mode: e, setMode: t, dragPosition: n, setDragPosition: r }) => {
1261
+ }, it = ({ mode: e, setMode: t, dragPosition: n, setDragPosition: r }) => {
1257
1262
  let [i, a] = p(!1), [o, s] = p({
1258
1263
  x: 0,
1259
1264
  y: 0
@@ -1323,7 +1328,7 @@ var Ue = x([ze], (e) => {
1323
1328
  })
1324
1329
  ]
1325
1330
  });
1326
- }, Q = (e, t, { viewBox: n = "0 0 16 16", fill: i = "none", sizeDefault: a = 24, strokeWidthDefault: o = 2, strokeColorDefault: s = "none", strokeLinecapDefault: c, strokeLinejoinDefault: l } = {}) => {
1331
+ }, Z = (e, t, { viewBox: n = "0 0 16 16", fill: i = "none", sizeDefault: a = 24, strokeWidthDefault: o = 2, strokeColorDefault: s = "none", strokeLinecapDefault: c, strokeLinejoinDefault: l } = {}) => {
1327
1332
  let u = r(({ size: r = a, strokeWidth: u = o, strokeColor: d = s, strokeLinecap: f = c, strokeLinejoin: p = l, className: m = "", ...h }, g) => /* @__PURE__ */ T("svg", {
1328
1333
  ref: g,
1329
1334
  width: r,
@@ -1340,7 +1345,7 @@ var Ue = x([ze], (e) => {
1340
1345
  children: t
1341
1346
  }));
1342
1347
  return u.displayName = e, u;
1343
- }, it = Q("Online", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("g", {
1348
+ }, at = Z("Online", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("g", {
1344
1349
  filter: "url(#filter0_d_4_4932)",
1345
1350
  children: /* @__PURE__ */ T("path", {
1346
1351
  d: "M2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8Z",
@@ -1392,7 +1397,7 @@ var Ue = x([ze], (e) => {
1392
1397
  result: "shape"
1393
1398
  })
1394
1399
  ]
1395
- }) })] })), at = Q("Owner", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
1400
+ }) })] })), ot = Z("Owner", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
1396
1401
  clipPath: "url(#clip0_4_9682)",
1397
1402
  children: [/* @__PURE__ */ T("path", {
1398
1403
  d: "M6.74458 1.90514C6.76976 1.85941 6.80675 1.82128 6.85169 1.79472C6.89664 1.76816 6.94788 1.75415 7.00008 1.75415C7.05229 1.75415 7.10353 1.76816 7.14848 1.79472C7.19342 1.82128 7.23041 1.85941 7.25558 1.90514L8.97758 5.17414C9.01865 5.24984 9.07596 5.3155 9.14541 5.36642C9.21486 5.41734 9.29473 5.45225 9.37927 5.46864C9.46381 5.48504 9.55093 5.48251 9.63438 5.46125C9.71783 5.43998 9.79554 5.4005 9.86192 5.34564L12.3568 3.20831C12.4047 3.16936 12.4637 3.1466 12.5254 3.14333C12.587 3.14005 12.6481 3.15642 12.6999 3.19008C12.7516 3.22374 12.7914 3.27295 12.8134 3.33063C12.8354 3.38831 12.8385 3.45148 12.8223 3.51106L11.1692 9.48789C11.1354 9.6102 11.0627 9.71817 10.9621 9.79543C10.8615 9.8727 10.7384 9.91505 10.6115 9.91606H3.38925C3.26228 9.91517 3.13907 9.87288 3.03831 9.79561C2.93756 9.71833 2.86477 9.61029 2.831 9.48789L1.17842 3.51164C1.16223 3.45207 1.16536 3.38889 1.18737 3.33121C1.20937 3.27353 1.24911 3.22432 1.30086 3.19066C1.35261 3.157 1.41371 3.14063 1.47536 3.14391C1.53701 3.14719 1.59602 3.16994 1.64392 3.20889L4.13825 5.34623C4.20463 5.40108 4.28234 5.44056 4.36579 5.46183C4.44924 5.4831 4.53636 5.48562 4.6209 5.46923C4.70544 5.45283 4.7853 5.41792 4.85475 5.367C4.92421 5.31608 4.98152 5.25042 5.02258 5.17473L6.74458 1.90514Z",
@@ -1417,7 +1422,7 @@ var Ue = x([ze], (e) => {
1417
1422
  }) })] }), {
1418
1423
  viewBox: "0 0 14 14",
1419
1424
  sizeDefault: 14
1420
- }), ot = Q("SaOneLogo", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
1425
+ }), st = Z("SaOneLogo", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
1421
1426
  width: "22.4671",
1422
1427
  height: "22.4671",
1423
1428
  fill: "url(#pattern0_22_372)"
@@ -1439,7 +1444,7 @@ var Ue = x([ze], (e) => {
1439
1444
  })] })] }), {
1440
1445
  viewBox: "0 0 23 23",
1441
1446
  sizeDefault: 23
1442
- }), st = Q("MemberList", /* @__PURE__ */ E(w, { children: [
1447
+ }), ct = Z("MemberList", /* @__PURE__ */ E(w, { children: [
1443
1448
  /* @__PURE__ */ T("path", {
1444
1449
  d: "M10.6667 14V12.6667C10.6667 11.9594 10.3857 11.2811 9.88562 10.781C9.38552 10.281 8.70724 10 8 10H4C3.29276 10 2.61448 10.281 2.11438 10.781C1.61428 11.2811 1.33333 11.9594 1.33333 12.6667V14",
1445
1450
  stroke: "currentColor",
@@ -1461,7 +1466,7 @@ var Ue = x([ze], (e) => {
1461
1466
  strokeLinecap: "round",
1462
1467
  strokeLinejoin: "round"
1463
1468
  })
1464
- ] }), { sizeDefault: 16 }), ct = Q("GroupList", /* @__PURE__ */ E(w, { children: [
1469
+ ] }), { sizeDefault: 16 }), lt = Z("GroupList", /* @__PURE__ */ E(w, { children: [
1465
1470
  /* @__PURE__ */ T("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
1466
1471
  /* @__PURE__ */ T("circle", {
1467
1472
  cx: "9",
@@ -1475,12 +1480,12 @@ var Ue = x([ze], (e) => {
1475
1480
  viewBox: "0 0 24 24",
1476
1481
  strokeColorDefault: "currentColor",
1477
1482
  strokeWidthDefault: 2
1478
- }), lt = Q("Back", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M15 18l-6-6 6-6" }) }), {
1483
+ }), ut = Z("Back", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M15 18l-6-6 6-6" }) }), {
1479
1484
  sizeDefault: 20,
1480
1485
  viewBox: "0 0 24 24",
1481
1486
  strokeColorDefault: "currentColor",
1482
1487
  strokeWidthDefault: 2
1483
- }), ut = Q("Mute", /* @__PURE__ */ E(w, { children: [
1488
+ }), dt = Z("Mute", /* @__PURE__ */ E(w, { children: [
1484
1489
  /* @__PURE__ */ T("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }),
1485
1490
  /* @__PURE__ */ T("path", { d: "M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742" }),
1486
1491
  /* @__PURE__ */ T("path", { d: "m2 2 20 20" }),
@@ -1491,12 +1496,12 @@ var Ue = x([ze], (e) => {
1491
1496
  strokeColorDefault: "#94a3b8",
1492
1497
  strokeWidthDefault: 2
1493
1498
  });
1494
- Q("Call", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l2.27-2.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" }) }), {
1499
+ Z("Call", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l2.27-2.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" }) }), {
1495
1500
  sizeDefault: 18,
1496
1501
  viewBox: "0 0 24 24",
1497
1502
  strokeColorDefault: "currentColor",
1498
1503
  strokeWidthDefault: 2
1499
- }), Q("VideoCall", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("polygon", { points: "23 7 16 12 23 17 23 7" }), /* @__PURE__ */ T("rect", {
1504
+ }), Z("VideoCall", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("polygon", { points: "23 7 16 12 23 17 23 7" }), /* @__PURE__ */ T("rect", {
1500
1505
  x: "1",
1501
1506
  y: "5",
1502
1507
  width: "15",
@@ -1509,7 +1514,7 @@ Q("Call", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 1
1509
1514
  strokeColorDefault: "currentColor",
1510
1515
  strokeWidthDefault: 2
1511
1516
  });
1512
- var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
1517
+ var ft = Z("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
1513
1518
  x: "3",
1514
1519
  y: "3",
1515
1520
  width: "18",
@@ -1526,7 +1531,7 @@ var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1526
1531
  viewBox: "0 0 24 24",
1527
1532
  strokeColorDefault: "currentColor",
1528
1533
  strokeWidthDefault: 2
1529
- }), $ = Q("Close", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("line", {
1534
+ }), Q = Z("Close", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("line", {
1530
1535
  x1: "18",
1531
1536
  y1: "6",
1532
1537
  x2: "6",
@@ -1541,22 +1546,22 @@ var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1541
1546
  viewBox: "0 0 24 24",
1542
1547
  strokeColorDefault: "currentColor",
1543
1548
  strokeWidthDefault: 1.7
1544
- }), ft = Q("Previous", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "15 18 9 12 15 6" }) }), {
1549
+ }), pt = Z("Previous", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "15 18 9 12 15 6" }) }), {
1545
1550
  sizeDefault: 24,
1546
1551
  viewBox: "0 0 24 24",
1547
1552
  strokeColorDefault: "currentColor",
1548
1553
  strokeWidthDefault: 2
1549
- }), pt = Q("Next", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "9 18 15 12 9 6" }) }), {
1554
+ }), mt = Z("Next", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "9 18 15 12 9 6" }) }), {
1550
1555
  sizeDefault: 24,
1551
1556
  viewBox: "0 0 24 24",
1552
1557
  strokeColorDefault: "currentColor",
1553
1558
  strokeWidthDefault: 2
1554
- }), mt = Q("Conversation", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }) }), {
1559
+ }), ht = Z("Conversation", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }) }), {
1555
1560
  sizeDefault: 20,
1556
1561
  viewBox: "0 0 24 24",
1557
1562
  strokeColorDefault: "currentColor",
1558
1563
  strokeWidthDefault: 2
1559
- }), ht = Q("ConversationList", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
1564
+ }), gt = Z("ConversationList", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
1560
1565
  clipPath: "url(#clip0_22_6147)",
1561
1566
  fill: "none",
1562
1567
  children: [/* @__PURE__ */ T("path", {
@@ -1582,7 +1587,7 @@ var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1582
1587
  sizeDefault: 20,
1583
1588
  viewBox: "0 0 20 20",
1584
1589
  strokeColorDefault: "currentColor"
1585
- }), gt = Q("Add", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1590
+ }), _t = Z("Add", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1586
1591
  d: "M4.16675 10H15.8334",
1587
1592
  stroke: "currentColor",
1588
1593
  strokeWidth: "1.67",
@@ -1598,7 +1603,7 @@ var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1598
1603
  sizeDefault: 20,
1599
1604
  viewBox: "0 0 20 20",
1600
1605
  strokeColorDefault: "currentColor"
1601
- }), _t = Q("Search", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1606
+ }), vt = Z("Search", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1602
1607
  d: "M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z",
1603
1608
  stroke: "currentColor",
1604
1609
  strokeWidth: "1.67",
@@ -1614,7 +1619,7 @@ var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1614
1619
  sizeDefault: 20,
1615
1620
  viewBox: "0 0 20 20",
1616
1621
  strokeColorDefault: "currentColor"
1617
- }), vt = Q("Setting", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1622
+ }), yt = Z("Setting", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1618
1623
  d: "M10.1833 1.66699H9.81667C9.37464 1.66699 8.95072 1.84259 8.63816 2.15515C8.3256 2.46771 8.15 2.89163 8.15 3.33366V3.48366C8.1497 3.77593 8.07255 4.06298 7.92628 4.31602C7.78002 4.56906 7.56978 4.77919 7.31667 4.92533L6.95834 5.13366C6.70497 5.27994 6.41756 5.35695 6.125 5.35695C5.83244 5.35695 5.54503 5.27994 5.29167 5.13366L5.16667 5.06699C4.78422 4.84638 4.32987 4.78653 3.90334 4.90058C3.47681 5.01464 3.11296 5.29327 2.89167 5.67533L2.70833 5.99199C2.48772 6.37444 2.42787 6.82879 2.54192 7.25532C2.65598 7.68185 2.93461 8.0457 3.31667 8.26699L3.44167 8.35033C3.69356 8.49575 3.90302 8.70457 4.04921 8.95602C4.1954 9.20747 4.27325 9.4928 4.275 9.78366V10.2087C4.27617 10.5023 4.19971 10.7911 4.05337 11.0457C3.90703 11.3004 3.69601 11.5118 3.44167 11.6587L3.31667 11.7337C2.93461 11.955 2.65598 12.3188 2.54192 12.7453C2.42787 13.1719 2.48772 13.6262 2.70833 14.0087L2.89167 14.3253C3.11296 14.7074 3.47681 14.986 3.90334 15.1001C4.32987 15.2141 4.78422 15.1543 5.16667 14.9337L5.29167 14.867C5.54503 14.7207 5.83244 14.6437 6.125 14.6437C6.41756 14.6437 6.70497 14.7207 6.95834 14.867L7.31667 15.0753C7.56978 15.2215 7.78002 15.4316 7.92628 15.6846C8.07255 15.9377 8.1497 16.2247 8.15 16.517V16.667C8.15 17.109 8.3256 17.5329 8.63816 17.8455C8.95072 18.1581 9.37464 18.3337 9.81667 18.3337H10.1833C10.6254 18.3337 11.0493 18.1581 11.3618 17.8455C11.6744 17.5329 11.85 17.109 11.85 16.667V16.517C11.8503 16.2247 11.9275 15.9377 12.0737 15.6846C12.22 15.4316 12.4302 15.2215 12.6833 15.0753L13.0417 14.867C13.295 14.7207 13.5824 14.6437 13.875 14.6437C14.1676 14.6437 14.455 14.7207 14.7083 14.867L14.8333 14.9337C15.2158 15.1543 15.6701 15.2141 16.0967 15.1001C16.5232 14.986 16.887 14.7074 17.1083 14.3253L17.2917 14.0003C17.5123 13.6179 17.5721 13.1635 17.4581 12.737C17.344 12.3105 17.0654 11.9466 16.6833 11.7253L16.5583 11.6587C16.304 11.5118 16.093 11.3004 15.9466 11.0457C15.8003 10.7911 15.7238 10.5023 15.725 10.2087V9.79199C15.7238 9.49831 15.8003 9.20953 15.9466 8.9549C16.093 8.70027 16.304 8.48883 16.5583 8.34199L16.6833 8.26699C17.0654 8.0457 17.344 7.68185 17.4581 7.25532C17.5721 6.82879 17.5123 6.37444 17.2917 5.99199L17.1083 5.67533C16.887 5.29327 16.5232 5.01464 16.0967 4.90058C15.6701 4.78653 15.2158 4.84638 14.8333 5.06699L14.7083 5.13366C14.455 5.27994 14.1676 5.35695 13.875 5.35695C13.5824 5.35695 13.295 5.27994 13.0417 5.13366L12.6833 4.92533C12.4302 4.77919 12.22 4.56906 12.0737 4.31602C11.9275 4.06298 11.8503 3.77593 11.85 3.48366V3.33366C11.85 2.89163 11.6744 2.46771 11.3618 2.15515C11.0493 1.84259 10.6254 1.66699 10.1833 1.66699Z",
1619
1624
  stroke: "currentColor",
1620
1625
  strokeWidth: "1.66667",
@@ -1631,13 +1636,13 @@ var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1631
1636
  viewBox: "0 0 20 20",
1632
1637
  strokeColorDefault: "currentColor"
1633
1638
  });
1634
- Q("Pin", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 17v5" }), /* @__PURE__ */ T("path", { d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" })] }), {
1639
+ Z("Pin", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 17v5" }), /* @__PURE__ */ T("path", { d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" })] }), {
1635
1640
  sizeDefault: 14,
1636
1641
  viewBox: "0 0 24 24",
1637
1642
  strokeColorDefault: "currentColor",
1638
1643
  strokeWidthDefault: 2
1639
1644
  });
1640
- var yt = Q("Help", /* @__PURE__ */ E(w, { children: [
1645
+ var bt = Z("Help", /* @__PURE__ */ E(w, { children: [
1641
1646
  /* @__PURE__ */ T("circle", {
1642
1647
  cx: "12",
1643
1648
  cy: "12",
@@ -1655,7 +1660,7 @@ var yt = Q("Help", /* @__PURE__ */ E(w, { children: [
1655
1660
  viewBox: "0 0 24 24",
1656
1661
  strokeColorDefault: "currentColor",
1657
1662
  strokeWidthDefault: 2
1658
- }), bt = Q("RemoveMember", /* @__PURE__ */ E(w, { children: [
1663
+ }), xt = Z("RemoveMember", /* @__PURE__ */ E(w, { children: [
1659
1664
  /* @__PURE__ */ T("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
1660
1665
  /* @__PURE__ */ T("circle", {
1661
1666
  cx: "9",
@@ -1679,7 +1684,7 @@ var yt = Q("Help", /* @__PURE__ */ E(w, { children: [
1679
1684
  viewBox: "0 0 24 24",
1680
1685
  strokeColorDefault: "currentColor",
1681
1686
  strokeWidthDefault: 2
1682
- }), xt = Q("Key", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" }), /* @__PURE__ */ T("circle", {
1687
+ }), St = Z("Key", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" }), /* @__PURE__ */ T("circle", {
1683
1688
  cx: "16.5",
1684
1689
  cy: "7.5",
1685
1690
  r: ".5",
@@ -1689,19 +1694,19 @@ var yt = Q("Help", /* @__PURE__ */ E(w, { children: [
1689
1694
  viewBox: "0 0 24 24",
1690
1695
  strokeColorDefault: "currentColor",
1691
1696
  strokeWidthDefault: 2
1692
- }), St = Q("Edit", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }), /* @__PURE__ */ T("path", { d: "m15 5 4 4" })] }), {
1697
+ }), Ct = Z("Edit", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }), /* @__PURE__ */ T("path", { d: "m15 5 4 4" })] }), {
1693
1698
  sizeDefault: 14,
1694
1699
  viewBox: "0 0 24 24",
1695
1700
  strokeColorDefault: "currentColor",
1696
1701
  strokeWidthDefault: 2
1697
1702
  });
1698
- Q("Bell", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }), /* @__PURE__ */ T("path", { d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" })] }), {
1703
+ Z("Bell", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }), /* @__PURE__ */ T("path", { d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" })] }), {
1699
1704
  sizeDefault: 20,
1700
1705
  viewBox: "0 0 24 24",
1701
1706
  strokeColorDefault: "currentColor",
1702
1707
  strokeWidthDefault: 2
1703
1708
  });
1704
- var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1709
+ var wt = Z("AddMember", /* @__PURE__ */ E(w, { children: [
1705
1710
  /* @__PURE__ */ T("path", { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
1706
1711
  /* @__PURE__ */ T("circle", {
1707
1712
  cx: "9",
@@ -1725,12 +1730,12 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1725
1730
  viewBox: "0 0 24 24",
1726
1731
  strokeColorDefault: "currentColor",
1727
1732
  strokeWidthDefault: 2
1728
- }), wt = Q("ArrowDown", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M6 9l6 6 6-6" }) }), {
1733
+ }), Tt = Z("ArrowDown", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M6 9l6 6 6-6" }) }), {
1729
1734
  sizeDefault: 16,
1730
1735
  viewBox: "0 0 24 24",
1731
1736
  strokeColorDefault: "currentColor",
1732
1737
  strokeWidthDefault: 2
1733
- }), Tt = Q("More", /* @__PURE__ */ E(w, { children: [
1738
+ }), Et = Z("More", /* @__PURE__ */ E(w, { children: [
1734
1739
  /* @__PURE__ */ T("circle", {
1735
1740
  cx: "12",
1736
1741
  cy: "12",
@@ -1752,12 +1757,12 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1752
1757
  strokeColorDefault: "currentColor",
1753
1758
  strokeWidthDefault: 2,
1754
1759
  strokeLinecapDefault: "round"
1755
- }), Et = Q("Minimize", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M5 12h14" }) }), {
1760
+ }), Dt = Z("Minimize", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M5 12h14" }) }), {
1756
1761
  sizeDefault: 14,
1757
1762
  viewBox: "0 0 24 24",
1758
1763
  strokeColorDefault: "currentColor",
1759
1764
  strokeWidthDefault: 2
1760
- }), Dt = Q("OpenFullPage", /* @__PURE__ */ E(w, { children: [
1765
+ }), Ot = Z("OpenFullPage", /* @__PURE__ */ E(w, { children: [
1761
1766
  /* @__PURE__ */ T("path", { d: "M15 3h6v6" }),
1762
1767
  /* @__PURE__ */ T("path", { d: "m21 3-7 7" }),
1763
1768
  /* @__PURE__ */ T("path", { d: "m3 21 7-7" }),
@@ -1767,7 +1772,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1767
1772
  viewBox: "0 0 24 24",
1768
1773
  strokeColorDefault: "currentColor",
1769
1774
  strokeWidthDefault: 2
1770
- }), Ot = Q("MinimizeFullPage", /* @__PURE__ */ E(w, { children: [
1775
+ }), kt = Z("MinimizeFullPage", /* @__PURE__ */ E(w, { children: [
1771
1776
  /* @__PURE__ */ T("path", { d: "m14 10 7-7" }),
1772
1777
  /* @__PURE__ */ T("path", { d: "M20 10h-6V4" }),
1773
1778
  /* @__PURE__ */ T("path", { d: "m3 21 7-7" }),
@@ -1777,19 +1782,19 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1777
1782
  viewBox: "0 0 24 24",
1778
1783
  strokeColorDefault: "currentColor",
1779
1784
  strokeWidthDefault: 2
1780
- }), kt = Q("Reply", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M20 18v-2a4 4 0 0 0-4-4H4" }), /* @__PURE__ */ T("path", { d: "m9 17-5-5 5-5" })] }), {
1785
+ }), At = Z("Reply", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M20 18v-2a4 4 0 0 0-4-4H4" }), /* @__PURE__ */ T("path", { d: "m9 17-5-5 5-5" })] }), {
1781
1786
  sizeDefault: 20,
1782
1787
  viewBox: "0 0 24 24",
1783
1788
  strokeColorDefault: "currentColor",
1784
1789
  strokeWidthDefault: 2
1785
- }), At = Q("Attachment", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.51a2 2 0 0 1-2.83-2.83l8.49-8.48" }) }), {
1790
+ }), jt = Z("Attachment", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.51a2 2 0 0 1-2.83-2.83l8.49-8.48" }) }), {
1786
1791
  sizeDefault: 20,
1787
1792
  viewBox: "0 0 24 24",
1788
1793
  strokeColorDefault: "currentColor",
1789
1794
  strokeWidthDefault: 2,
1790
1795
  strokeLinecapDefault: "round",
1791
1796
  strokeLinejoinDefault: "round"
1792
- }), jt = Q("Image", /* @__PURE__ */ E(w, { children: [
1797
+ }), Mt = Z("Image", /* @__PURE__ */ E(w, { children: [
1793
1798
  /* @__PURE__ */ T("rect", {
1794
1799
  width: "18",
1795
1800
  height: "18",
@@ -1811,7 +1816,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1811
1816
  strokeWidthDefault: 2,
1812
1817
  strokeLinecapDefault: "round",
1813
1818
  strokeLinejoinDefault: "round"
1814
- }), Mt = Q("Voice", /* @__PURE__ */ E(w, { children: [
1819
+ }), Nt = Z("Voice", /* @__PURE__ */ E(w, { children: [
1815
1820
  /* @__PURE__ */ T("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }),
1816
1821
  /* @__PURE__ */ T("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
1817
1822
  /* @__PURE__ */ T("line", {
@@ -1827,7 +1832,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1827
1832
  strokeWidthDefault: 2,
1828
1833
  strokeLinecapDefault: "round",
1829
1834
  strokeLinejoinDefault: "round"
1830
- }), Nt = Q("Emoji", /* @__PURE__ */ E(w, { children: [
1835
+ }), Pt = Z("Emoji", /* @__PURE__ */ E(w, { children: [
1831
1836
  /* @__PURE__ */ T("circle", {
1832
1837
  cx: "12",
1833
1838
  cy: "12",
@@ -1853,7 +1858,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1853
1858
  strokeWidthDefault: 2,
1854
1859
  strokeLinecapDefault: "round",
1855
1860
  strokeLinejoinDefault: "round"
1856
- }), Pt = Q("SendMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("line", {
1861
+ }), Ft = Z("SendMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("line", {
1857
1862
  x1: "22",
1858
1863
  y1: "2",
1859
1864
  x2: "11",
@@ -1865,27 +1870,27 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1865
1870
  strokeWidthDefault: 2,
1866
1871
  strokeLinecapDefault: "round",
1867
1872
  strokeLinejoinDefault: "round"
1868
- }), Ft = Q("SortASC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7-7 7 7" })] }), {
1873
+ }), It = Z("SortASC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7-7 7 7" })] }), {
1869
1874
  sizeDefault: 16,
1870
1875
  viewBox: "0 0 24 24",
1871
1876
  strokeColorDefault: "currentColor",
1872
1877
  strokeWidthDefault: 2
1873
- }), It = Q("SortDESC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7 7 7-7" })] }), {
1878
+ }), Lt = Z("SortDESC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7 7 7-7" })] }), {
1874
1879
  sizeDefault: 16,
1875
1880
  viewBox: "0 0 24 24",
1876
1881
  strokeColorDefault: "currentColor",
1877
1882
  strokeWidthDefault: 2
1878
- }), Lt = Q("Like", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" }), /* @__PURE__ */ T("path", { d: "M7 10v12" })] }), {
1883
+ }), Rt = Z("Like", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" }), /* @__PURE__ */ T("path", { d: "M7 10v12" })] }), {
1879
1884
  sizeDefault: 24,
1880
1885
  viewBox: "0 0 24 24",
1881
1886
  strokeColorDefault: "currentColor",
1882
1887
  strokeWidthDefault: 2
1883
- }), Rt = Q("Love", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" }) }), {
1888
+ }), zt = Z("Love", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" }) }), {
1884
1889
  sizeDefault: 24,
1885
1890
  viewBox: "0 0 24 24",
1886
1891
  strokeColorDefault: "currentColor",
1887
1892
  strokeWidthDefault: 2
1888
- }), zt = Q("DeleteIcon", /* @__PURE__ */ E(w, { children: [
1893
+ }), Bt = Z("DeleteIcon", /* @__PURE__ */ E(w, { children: [
1889
1894
  /* @__PURE__ */ T("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
1890
1895
  /* @__PURE__ */ T("path", { d: "M3 6h18" }),
1891
1896
  /* @__PURE__ */ T("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
@@ -1894,12 +1899,12 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1894
1899
  viewBox: "0 0 24 24",
1895
1900
  strokeColorDefault: "currentColor",
1896
1901
  strokeWidthDefault: 2
1897
- }), Bt = Q("RevokeMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ T("path", { d: "M3 3v5h5" })] }), {
1902
+ }), Vt = Z("RevokeMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ T("path", { d: "M3 3v5h5" })] }), {
1898
1903
  sizeDefault: 24,
1899
1904
  viewBox: "0 0 24 24",
1900
1905
  strokeColorDefault: "currentColor",
1901
1906
  strokeWidthDefault: 2
1902
- }), Vt = Q("Seen", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1907
+ }), Ht = Z("Seen", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1903
1908
  d: "M9 3L3.5 8.5L1 6",
1904
1909
  stroke: "#2B7FFF",
1905
1910
  strokeLinecap: "round",
@@ -1912,7 +1917,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1912
1917
  })] }), {
1913
1918
  sizeDefault: 12,
1914
1919
  viewBox: "0 0 12 12"
1915
- }), Ht = Q("language", /* @__PURE__ */ E(w, { children: [
1920
+ }), Ut = Z("language", /* @__PURE__ */ E(w, { children: [
1916
1921
  /* @__PURE__ */ T("circle", {
1917
1922
  cx: "12",
1918
1923
  cy: "12",
@@ -1927,7 +1932,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1927
1932
  strokeWidthDefault: 2,
1928
1933
  strokeLinecapDefault: "round",
1929
1934
  strokeLinejoinDefault: "round"
1930
- }), Ut = Q("ImagePlaceholder", /* @__PURE__ */ E(w, { children: [
1935
+ }), Wt = Z("ImagePlaceholder", /* @__PURE__ */ E(w, { children: [
1931
1936
  /* @__PURE__ */ T("path", { d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21" }),
1932
1937
  /* @__PURE__ */ T("path", { d: "m14 19.5 3-3 3 3" }),
1933
1938
  /* @__PURE__ */ T("path", { d: "M17 22v-5.5" }),
@@ -1940,41 +1945,41 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1940
1945
  sizeDefault: 20,
1941
1946
  viewBox: "0 0 24 24",
1942
1947
  strokeColorDefault: "currentColor"
1943
- }), Wt = ({ title: e = "Live Chat", logoUrl: t, mode: n, setMode: r, primaryColor: i, dragPosition: o, setDragPosition: l, fullpagePosition: u, setFullpagePosition: m, fullpageSize: h = {
1948
+ }), Gt = ({ title: e = "Live Chat", logoUrl: t, mode: n, setMode: r, dragPosition: i, setDragPosition: o, fullpagePosition: l, setFullpagePosition: u, fullpageSize: m = {
1944
1949
  width: 1e3,
1945
1950
  height: 750
1946
- }, setFullpageSize: v }) => {
1947
- let { t: y } = Z(), [b, x] = p(!1), [S, C] = p(!1), [D, k] = p(null), [A, j] = p(!1), [M, ee] = p(!1), [te, N] = p(!1), [ne, P] = p("chats"), [re, ie] = p("members"), { showToast: F, confirm: I } = Qe(), [L, R] = p("all"), [ae, oe] = p(!1), [z, se] = p(!1), [ce, le] = p(null), [B, ue] = p({
1951
+ }, setFullpageSize: h }) => {
1952
+ let { t: v } = X(), [y, b] = p(!1), [x, S] = p(!1), [C, D] = p(null), [k, A] = p(!1), [j, M] = p(!1), [ee, N] = p(!1), [P, te] = p("chats"), [F, ne] = p("members"), { showToast: I, confirm: re } = Y(), [L, R] = p("all"), [ie, ae] = p(!1), [oe, se] = p(!1), [ce, le] = p(null), [z, ue] = p({
1948
1953
  mouseX: 0,
1949
1954
  mouseY: 0,
1950
1955
  baseW: 0,
1951
1956
  baseH: 0,
1952
1957
  baseX: 0,
1953
1958
  baseY: 0
1954
- }), [de, fe] = p({
1959
+ }), [B, de] = p({
1955
1960
  x: 0,
1956
1961
  y: 0
1957
- }), pe = f(null), me = f(null), [ge, ve] = p(""), H = s(ge), [ye, be] = p(!1), [xe, Se] = p(!1), [Ce, we] = p(!1), { hasGroupChat: Te } = _(Ue), { isDragOver: Ee, handleDragEnter: De, handleDragOver: Oe, handleDragLeave: ke, handleDrop: Ae } = Xe({ onFilesAdded: (e) => {
1958
- e && e.length > 0 && me.current?.processPastedFiles(e);
1959
- } }), { currentChat: U, currentUser: W, members: je, currentChatMembers: Me, chats: K, totalMessagesUnread: q } = _((e) => e.chat);
1962
+ }), fe = f(null), pe = f(null), [me, ge] = p(""), H = s(me), [ve, ye] = p(!1), [be, xe] = p(!1), [Se, Ce] = p(!1), { hasGroupChat: we } = _(Ge), { isDragOver: Te, handleDragEnter: Ee, handleDragOver: De, handleDragLeave: Oe, handleDrop: ke } = Qe({ onFilesAdded: (e) => {
1963
+ e && e.length > 0 && pe.current?.processPastedFiles(e);
1964
+ } }), { currentChat: U, currentUser: W, members: Ae, currentChatMembers: je, chats: K, totalMessagesUnread: Me } = _((e) => e.chat);
1960
1965
  c(() => {
1961
- if (n === "fullpage" && !u && m && v) {
1966
+ if (n === "fullpage" && !l && u && h) {
1962
1967
  let e = 1e3;
1963
- v({
1968
+ h({
1964
1969
  width: e,
1965
1970
  height: 750
1966
- }), m({
1971
+ }), u({
1967
1972
  x: (window.innerWidth - e) / 2,
1968
1973
  y: (window.innerHeight - 750) / 2
1969
1974
  });
1970
1975
  }
1971
1976
  }, [
1972
1977
  n,
1978
+ l,
1973
1979
  u,
1974
- m,
1975
- v
1980
+ h
1976
1981
  ]);
1977
- let { theme: Ne, primaryColor: Pe } = _((e) => e.setting), J = g(), Y = d(() => {
1982
+ let { theme: Ne, primaryColor: Pe } = _((e) => e.setting), q = g(), J = d(() => {
1978
1983
  let e = H.toLowerCase().trim();
1979
1984
  if (!e) return {
1980
1985
  filteredChat: K.filter((e) => {
@@ -1998,7 +2003,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1998
2003
  ...t,
1999
2004
  matchedMemberNames: n.map((e) => e.name)
2000
2005
  };
2001
- }), n = je.filter((t) => t.code === W?.code || ![t.name, t.code].some((t) => t.toLowerCase().includes(e)) ? !1 : !K.some((e) => e.type === "single" && e.members?.some((e) => e.code === t.code))), r = K.filter((t) => t.message?.content?.toLowerCase().includes(e)).map((e) => ({
2006
+ }), n = Ae.filter((t) => t.code === W?.code || ![t.name, t.code].some((t) => t.toLowerCase().includes(e)) ? !1 : !K.some((e) => e.type === "single" && e.members?.some((e) => e.code === t.code))), r = K.filter((t) => t.message?.content?.toLowerCase().includes(e)).map((e) => ({
2002
2007
  chat: e,
2003
2008
  message: e.message
2004
2009
  })), i = K.filter((t) => t.message?.files?.some((t) => t.name.toLowerCase().includes(e))).map((t) => ({
@@ -2014,61 +2019,42 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2014
2019
  };
2015
2020
  }, [
2016
2021
  K,
2017
- je,
2022
+ Ae,
2018
2023
  H,
2019
2024
  L,
2020
2025
  W
2021
- ]), X = (e, t) => t.trim() ? /* @__PURE__ */ T(w, { children: e.split(RegExp(`(${t})`, "gi")).map((e, n) => e.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ T("span", {
2026
+ ]), Fe = (e, t) => t.trim() ? /* @__PURE__ */ T(w, { children: e.split(RegExp(`(${t})`, "gi")).map((e, n) => e.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ T("span", {
2022
2027
  className: "highlight-match",
2023
2028
  children: e
2024
- }, n) : e) }) : e, Fe = (e) => {
2029
+ }, n) : e) }) : e, Ie = (e) => {
2025
2030
  if (!e) return "#ffffff";
2026
2031
  let t = e.startsWith("#") ? e.slice(1) : e;
2027
2032
  if (t.length === 3 && (t = t.split("").map((e) => e + e).join("")), t.length !== 6) return "#ffffff";
2028
2033
  let n = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), i = parseInt(t.slice(4, 6), 16);
2029
2034
  return (n * 299 + r * 587 + i * 114) / 1e3 > 180 ? "#1e293b" : "#ffffff";
2030
- }, Ie = d(() => Fe(Pe), [Pe]), Le = a((e) => {
2031
- ve(e), R("all"), be(!1), Se(!1), we(!1);
2032
- }, [R]), Re = async (e, t) => {
2033
- if (t.stopPropagation(), await I("Bạn có chắc chắn muốn xóa cuộc trò chuyện này?")) try {
2034
- await G.removeChat(Number(e)), J(he(K.filter((t) => t.id !== e))), U?.id === e && J(V(null)), F("Đã xóa cuộc trò chuyện", "success");
2035
- } catch (e) {
2036
- console.error("Lỗi khi xóa chat:", e), F("Không thể xóa cuộc trò chuyện. Vui lòng thử lại!", "error");
2037
- }
2038
- }, ze = (e) => {
2039
- k(e), C(!0);
2040
- }, Be = async (e, t, n) => {
2041
- try {
2042
- let r = await G.updateGroup(e, t, n);
2043
- r?.data && (J(he(K.map((t) => t.id === e ? {
2044
- ...t,
2045
- ...r.data
2046
- } : t))), U?.id === e && J(V({
2047
- ...U,
2048
- ...r.data
2049
- })), C(!1), k(null), F("Cập nhật thông tin nhóm thành công!", "success"));
2035
+ }, Le = d(() => Ie(Pe), [Pe]), Re = a((e) => {
2036
+ ge(e), R("all"), ye(!1), xe(!1), Ce(!1);
2037
+ }, [R]), ze = (e) => {
2038
+ D(e), S(!0);
2039
+ }, Be = () => {
2040
+ A(!0);
2041
+ }, Ve = async (e, t) => {
2042
+ if (await re("Bạn có chắc chắn muốn xóa thành viên này ra khỏi nhóm?")) try {
2043
+ await G.removeMember(e, t), q(_e(je.filter((e) => String(e.id) !== String(t)))), String(t) === String(W?.id) ? (I("Bạn đã rời khỏi nhóm này", "success"), S(!1), D(null), q(V(null)), q(he((await G.getChats()).data ?? []))) : I("Đã xóa thành viên khỏi nhóm", "success");
2050
2044
  } catch (e) {
2051
- console.error("Lỗi khi cập nhật thông tin nhóm:", e), F("Không thể cập nhật thông tin nhóm. Vui lòng thử lại!", "error");
2045
+ console.error("Lỗi khi xóa thành viên:", e), I("Không thể xóa thành viên. Vui lòng thử lại!", "error");
2052
2046
  }
2053
- }, Ve = () => {
2054
- j(!0);
2055
- }, He = async (e, t) => {
2056
- if (await I("Bạn có chắc chắn muốn xóa thành viên này ra khỏi nhóm?")) try {
2057
- await G.removeMember(e, t), J(_e(Me.filter((e) => String(e.id) !== String(t)))), String(t) === String(W?.id) ? (F("Bạn đã rời khỏi nhóm này", "success"), C(!1), k(null), J(V(null)), J(he((await G.getChats()).data ?? []))) : F("Đã xóa thành viên khỏi nhóm", "success");
2058
- } catch (e) {
2059
- console.error("Lỗi khi xóa thành viên:", e), F("Không thể xóa thành viên. Vui lòng thử lại!", "error");
2060
- }
2061
- }, We = (e) => {
2047
+ }, He = (e) => {
2062
2048
  if (n !== "fullpage" || e.target.closest(".action-btn, .back-btn")) return;
2063
2049
  let t = e.currentTarget.parentElement?.getBoundingClientRect();
2064
- t && (oe(!0), fe({
2050
+ t && (ae(!0), de({
2065
2051
  x: e.clientX - t.left,
2066
2052
  y: e.clientY - t.top
2067
2053
  }), e.stopPropagation(), e.preventDefault());
2068
- }, Ge = (e, t) => {
2054
+ }, Ue = (e, t) => {
2069
2055
  if (n !== "fullpage") return;
2070
2056
  e.stopPropagation(), e.preventDefault();
2071
- let r = pe.current?.getBoundingClientRect();
2057
+ let r = fe.current?.getBoundingClientRect();
2072
2058
  r && (se(!0), le(t), ue({
2073
2059
  mouseX: e.clientX,
2074
2060
  mouseY: e.clientY,
@@ -2080,98 +2066,98 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2080
2066
  };
2081
2067
  c(() => {
2082
2068
  let e = (e) => {
2083
- if (z && ce) {
2084
- let t = e.clientX - B.mouseX, n = e.clientY - B.mouseY, r = B.baseW, i = B.baseH, a = B.baseX, o = B.baseY, s = 1e3, c = document.documentElement.clientWidth, l = document.documentElement.clientHeight;
2069
+ if (oe && ce) {
2070
+ let t = e.clientX - z.mouseX, n = e.clientY - z.mouseY, r = z.baseW, i = z.baseH, a = z.baseX, o = z.baseY, s = 1e3, c = document.documentElement.clientWidth, l = document.documentElement.clientHeight;
2085
2071
  switch (ce) {
2086
2072
  case "ne":
2087
- r = Math.min(c - B.baseX, Math.max(s, B.baseW + t)), i = Math.min(B.baseY + B.baseH, Math.max(700, B.baseH - n)), o = B.baseY + (B.baseH - i);
2073
+ r = Math.min(c - z.baseX, Math.max(s, z.baseW + t)), i = Math.min(z.baseY + z.baseH, Math.max(700, z.baseH - n)), o = z.baseY + (z.baseH - i);
2088
2074
  break;
2089
2075
  case "nw":
2090
- r = Math.min(B.baseX + B.baseW, Math.max(s, B.baseW - t)), i = Math.min(B.baseY + B.baseH, Math.max(700, B.baseH - n)), a = B.baseX + (B.baseW - r), o = B.baseY + (B.baseH - i);
2076
+ r = Math.min(z.baseX + z.baseW, Math.max(s, z.baseW - t)), i = Math.min(z.baseY + z.baseH, Math.max(700, z.baseH - n)), a = z.baseX + (z.baseW - r), o = z.baseY + (z.baseH - i);
2091
2077
  break;
2092
2078
  case "se":
2093
- r = Math.min(c - B.baseX, Math.max(s, B.baseW + t)), i = Math.min(l - B.baseY, Math.max(700, B.baseH + n));
2079
+ r = Math.min(c - z.baseX, Math.max(s, z.baseW + t)), i = Math.min(l - z.baseY, Math.max(700, z.baseH + n));
2094
2080
  break;
2095
2081
  case "sw":
2096
- r = Math.min(B.baseX + B.baseW, Math.max(s, B.baseW - t)), i = Math.min(l - B.baseY, Math.max(700, B.baseH + n)), a = B.baseX + (B.baseW - r);
2082
+ r = Math.min(z.baseX + z.baseW, Math.max(s, z.baseW - t)), i = Math.min(l - z.baseY, Math.max(700, z.baseH + n)), a = z.baseX + (z.baseW - r);
2097
2083
  break;
2098
2084
  }
2099
- v?.({
2085
+ h?.({
2100
2086
  width: r,
2101
2087
  height: i
2102
- }), m?.({
2088
+ }), u?.({
2103
2089
  x: a,
2104
2090
  y: o
2105
2091
  });
2106
2092
  return;
2107
2093
  }
2108
- if (!ae || !de) return;
2109
- let t = pe.current;
2094
+ if (!ie || !B) return;
2095
+ let t = fe.current;
2110
2096
  if (!t) return;
2111
- let r = t.getBoundingClientRect(), i = r.width, a = r.height, o = document.documentElement.clientWidth, s = document.documentElement.clientHeight, c = e.clientX - de.x;
2112
- c < 0 && (c = 0), c + i > o && (c = o - i);
2113
- let u = e.clientY - de.y;
2114
- u < 0 && (u = 0), u + a > s && (u = s - a), n === "fullpage" ? m?.({
2115
- x: c,
2116
- y: u
2117
- }) : l && l({
2118
- x: c,
2119
- y: u
2097
+ let r = t.getBoundingClientRect(), i = r.width, a = r.height, s = document.documentElement.clientWidth, c = document.documentElement.clientHeight, l = e.clientX - B.x;
2098
+ l < 0 && (l = 0), l + i > s && (l = s - i);
2099
+ let d = e.clientY - B.y;
2100
+ d < 0 && (d = 0), d + a > c && (d = c - a), n === "fullpage" ? u?.({
2101
+ x: l,
2102
+ y: d
2103
+ }) : o && o({
2104
+ x: l,
2105
+ y: d
2120
2106
  });
2121
2107
  }, t = () => {
2122
- oe(!1), se(!1), le(null);
2108
+ ae(!1), se(!1), le(null);
2123
2109
  };
2124
- return (ae || z) && (document.addEventListener("mousemove", e), document.addEventListener("mouseup", t)), () => {
2110
+ return (ie || oe) && (document.addEventListener("mousemove", e), document.addEventListener("mouseup", t)), () => {
2125
2111
  document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
2126
2112
  };
2127
2113
  }, [
2128
- ae,
2129
- z,
2114
+ ie,
2115
+ oe,
2130
2116
  ce,
2131
- de,
2117
+ B,
2132
2118
  n,
2133
- l,
2134
- m,
2135
- v,
2136
- B
2119
+ o,
2120
+ u,
2121
+ h,
2122
+ z
2137
2123
  ]);
2138
- let Ke = (() => {
2139
- if (!o || typeof document > "u") return null;
2140
- let e = document.documentElement.clientWidth, t = document.documentElement.clientHeight, n = o.x, r = o.y;
2124
+ let We = (() => {
2125
+ if (!i || typeof document > "u") return null;
2126
+ let e = document.documentElement.clientWidth, t = document.documentElement.clientHeight, n = i.x, r = i.y;
2141
2127
  return n + 400 > e && (n = e - 400 - 20), n < 20 && (n = 20), r + 640 > t && (r = t - 640 - 20), r < 20 && (r = 20), {
2142
2128
  x: n,
2143
2129
  y: r
2144
2130
  };
2145
- })(), qe = () => {
2146
- if (n === "popup") r("fullpage"), v?.({
2131
+ })(), Ke = () => {
2132
+ if (n === "popup") r("fullpage"), h?.({
2147
2133
  width: window.innerWidth,
2148
2134
  height: window.innerHeight
2149
- }), m?.({
2135
+ }), u?.({
2150
2136
  x: 0,
2151
2137
  y: 0
2152
2138
  });
2153
- else if (n === "fullpage") if (h.width >= window.innerWidth && h.height >= window.innerHeight) {
2139
+ else if (n === "fullpage") if (m.width >= window.innerWidth && m.height >= window.innerHeight) {
2154
2140
  let e = 1e3;
2155
- v?.({
2141
+ h?.({
2156
2142
  width: e,
2157
2143
  height: 750
2158
- }), m?.({
2144
+ }), u?.({
2159
2145
  x: (window.innerWidth - e) / 2,
2160
2146
  y: (window.innerHeight - 750) / 2
2161
2147
  });
2162
- } else v?.({
2148
+ } else h?.({
2163
2149
  width: window.innerWidth,
2164
2150
  height: window.innerHeight
2165
- }), m?.({
2151
+ }), u?.({
2166
2152
  x: 0,
2167
2153
  y: 0
2168
2154
  });
2169
- }, Je = a(async (e) => {
2155
+ }, qe = a(async (e) => {
2170
2156
  if (e) try {
2171
- let t = je.find((t) => String(t.id) === e);
2157
+ let t = Ae.find((t) => String(t.id) === e);
2172
2158
  if (t) {
2173
2159
  let n = K.find((t) => t.type === "single" && t.members?.some((t) => String(t.id) === e));
2174
- if (n) J(V(n));
2160
+ if (n) q(V(n));
2175
2161
  else {
2176
2162
  await G.setReceiver({
2177
2163
  id: t.id,
@@ -2179,76 +2165,76 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2179
2165
  name: t.name
2180
2166
  });
2181
2167
  let e = (await G.addChat(Number(t.id))).data;
2182
- e && J(V(e));
2168
+ e && q(V(e));
2183
2169
  }
2184
2170
  }
2185
- x(!1);
2171
+ b(!1);
2186
2172
  } catch (e) {
2187
- console.error("Lỗi khi tạo cuộc trò chuyện:", e), F("Không thể tạo cuộc trò chuyện. Vui lòng thử lại sau.", "error");
2173
+ console.error("Lỗi khi tạo cuộc trò chuyện:", e), I("Không thể tạo cuộc trò chuyện. Vui lòng thử lại sau.", "error");
2188
2174
  }
2189
2175
  }, [
2190
2176
  K,
2191
- je,
2192
- F,
2193
- J
2177
+ Ae,
2178
+ I,
2179
+ q
2194
2180
  ]);
2195
2181
  return /* @__PURE__ */ E("div", {
2196
- ref: pe,
2182
+ ref: fe,
2197
2183
  className: `chat-window ${n === "fullpage" ? "fullpage" : ""} ${Ne === "dark" ? "dark-theme" : ""}`,
2198
2184
  style: n === "fullpage" ? {
2199
2185
  position: "fixed",
2200
- left: u ? `${u.x}px` : `${(window.innerWidth - h.width) / 2}px`,
2201
- top: u ? `${u.y}px` : `${(window.innerHeight - h.height) / 2}px`,
2202
- width: `${h.width}px`,
2203
- height: `${h.height}px`,
2204
- borderRadius: h.width >= window.innerWidth && u?.x === 0 && u?.y === 0 ? 0 : "14px",
2186
+ left: l ? `${l.x}px` : `${(window.innerWidth - m.width) / 2}px`,
2187
+ top: l ? `${l.y}px` : `${(window.innerHeight - m.height) / 2}px`,
2188
+ width: `${m.width}px`,
2189
+ height: `${m.height}px`,
2190
+ borderRadius: m.width >= window.innerWidth && l?.x === 0 && l?.y === 0 ? 0 : "14px",
2205
2191
  "--primary": Pe,
2206
- "--primary-contrast": Ie
2207
- } : n === "popup" && Ke ? {
2192
+ "--primary-contrast": Le
2193
+ } : n === "popup" && We ? {
2208
2194
  position: "fixed",
2209
- left: `${Ke.x}px`,
2210
- top: `${Ke.y}px`,
2195
+ left: `${We.x}px`,
2196
+ top: `${We.y}px`,
2211
2197
  "--primary": Pe,
2212
- "--primary-contrast": Ie
2198
+ "--primary-contrast": Le
2213
2199
  } : {
2214
2200
  "--primary": Pe,
2215
- "--primary-contrast": Ie
2201
+ "--primary-contrast": Le
2216
2202
  },
2217
2203
  children: [
2218
2204
  n === "fullpage" && /* @__PURE__ */ E(w, { children: [
2219
2205
  /* @__PURE__ */ T("div", {
2220
- onMouseDown: (e) => Ge(e, "ne"),
2206
+ onMouseDown: (e) => Ue(e, "ne"),
2221
2207
  className: "resize-handle ne"
2222
2208
  }),
2223
2209
  /* @__PURE__ */ T("div", {
2224
- onMouseDown: (e) => Ge(e, "nw"),
2210
+ onMouseDown: (e) => Ue(e, "nw"),
2225
2211
  className: "resize-handle nw"
2226
2212
  }),
2227
2213
  /* @__PURE__ */ T("div", {
2228
- onMouseDown: (e) => Ge(e, "se"),
2214
+ onMouseDown: (e) => Ue(e, "se"),
2229
2215
  className: "resize-handle se"
2230
2216
  }),
2231
2217
  /* @__PURE__ */ T("div", {
2232
- onMouseDown: (e) => Ge(e, "sw"),
2218
+ onMouseDown: (e) => Ue(e, "sw"),
2233
2219
  className: "resize-handle sw"
2234
2220
  })
2235
2221
  ] }),
2236
2222
  /* @__PURE__ */ T("div", {
2237
- onMouseDown: We,
2238
- onDoubleClick: qe,
2223
+ onMouseDown: He,
2224
+ onDoubleClick: Ke,
2239
2225
  style: { cursor: n === "fullpage" ? "move" : "default" },
2240
2226
  children: /* @__PURE__ */ T(dn, {
2241
2227
  mode: n,
2242
2228
  title: e,
2243
2229
  logoUrl: t,
2244
- onBack: () => J(V(null)),
2230
+ onBack: () => q(V(null)),
2245
2231
  onToggleMode: () => {
2246
- if (n === "popup" && !u) {
2232
+ if (n === "popup" && !l) {
2247
2233
  let e = 1e3;
2248
- v?.({
2234
+ h?.({
2249
2235
  width: e,
2250
2236
  height: 750
2251
- }), m?.({
2237
+ }), u?.({
2252
2238
  x: (window.innerWidth - e) / 2,
2253
2239
  y: (window.innerHeight - 750) / 2
2254
2240
  });
@@ -2256,7 +2242,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2256
2242
  r(n === "popup" ? "fullpage" : "popup");
2257
2243
  },
2258
2244
  onClose: () => r("closed"),
2259
- onAddMemberClick: () => U && Ve(),
2245
+ onAddMemberClick: () => U && Be(),
2260
2246
  onOpenSettings: () => N(!0)
2261
2247
  })
2262
2248
  }),
@@ -2264,23 +2250,23 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2264
2250
  className: "chat-main-layout",
2265
2251
  children: [n === "fullpage" && W && /* @__PURE__ */ T(ln, {
2266
2252
  setIsThemeModalOpen: N,
2267
- activeTab: ne,
2268
- setActiveTab: P
2253
+ activeTab: P,
2254
+ setActiveTab: te
2269
2255
  }), /* @__PURE__ */ E("div", {
2270
2256
  className: "chat-body-container",
2271
2257
  children: [
2272
2258
  (n === "fullpage" || !U) && /* @__PURE__ */ T("div", {
2273
2259
  className: `chat-sidebar ${n === "fullpage" ? "is-full" : ""}`,
2274
- children: ne === "chats" ? /* @__PURE__ */ E(w, { children: [
2260
+ children: P === "chats" ? /* @__PURE__ */ E(w, { children: [
2275
2261
  /* @__PURE__ */ T(cn, {
2276
- value: ge,
2277
- onChange: Le,
2278
- onAddClick: () => x(!0),
2279
- placeholder: y("chatWindow.searchPlaceholder")
2262
+ value: me,
2263
+ onChange: Re,
2264
+ onAddClick: () => b(!0),
2265
+ placeholder: v("chatWindow.searchPlaceholder")
2280
2266
  }),
2281
2267
  /* @__PURE__ */ T("div", {
2282
2268
  className: "chat-filter-tabs",
2283
- children: ge ? /* @__PURE__ */ E(w, { children: [
2269
+ children: me ? /* @__PURE__ */ E(w, { children: [
2284
2270
  /* @__PURE__ */ T("button", {
2285
2271
  className: L === "all" ? "active" : "",
2286
2272
  onClick: () => R("all"),
@@ -2304,22 +2290,22 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2304
2290
  ] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
2305
2291
  className: L === "all" ? "active" : "",
2306
2292
  onClick: () => R("all"),
2307
- children: y("chatWindow.filterAll") || "Tất cả"
2293
+ children: v("chatWindow.filterAll") || "Tất cả"
2308
2294
  }), /* @__PURE__ */ T("button", {
2309
2295
  className: L === "unread" ? "active" : "",
2310
2296
  onClick: () => R("unread"),
2311
2297
  children: /* @__PURE__ */ E("div", {
2312
2298
  className: "filter-unread-badge-container",
2313
- children: [/* @__PURE__ */ T("span", { children: "Chưa đọc" }), q > 0 && /* @__PURE__ */ T("span", {
2299
+ children: [/* @__PURE__ */ T("span", { children: "Chưa đọc" }), Me > 0 && /* @__PURE__ */ T("span", {
2314
2300
  className: "filter-unread-badge",
2315
- children: q
2301
+ children: Me
2316
2302
  })]
2317
2303
  })
2318
2304
  })] })
2319
2305
  }),
2320
2306
  /* @__PURE__ */ T("div", {
2321
2307
  className: "sidebar-scroll",
2322
- children: ge ? /* @__PURE__ */ E("div", {
2308
+ children: me ? /* @__PURE__ */ E("div", {
2323
2309
  className: "chat-search-results",
2324
2310
  children: [
2325
2311
  (L === "all" || L === "member") && /* @__PURE__ */ E("div", {
@@ -2331,33 +2317,30 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2331
2317
  }),
2332
2318
  /* @__PURE__ */ E("div", {
2333
2319
  className: "search-section-content",
2334
- children: [Y.filteredChat.slice(0, ye ? void 0 : 4).map((e) => /* @__PURE__ */ E("div", {
2320
+ children: [J.filteredChat.slice(0, ve ? void 0 : 4).map((e) => /* @__PURE__ */ E("div", {
2335
2321
  className: "search-result-item",
2336
- onClick: () => J(V(e)),
2322
+ onClick: () => q(V(e)),
2337
2323
  children: [/* @__PURE__ */ T("div", {
2338
2324
  className: "search-result-avatar",
2339
- children: /* @__PURE__ */ T(Gt, {
2340
- chat: e,
2341
- currentUserId: W?.id
2342
- })
2325
+ children: /* @__PURE__ */ T($, { member: e.type === "single" ? e.members?.find((e) => e.id !== W?.id) ?? e : e })
2343
2326
  }), /* @__PURE__ */ E("div", {
2344
2327
  className: "search-result-info",
2345
2328
  children: [/* @__PURE__ */ T("div", {
2346
2329
  className: "search-result-name",
2347
- children: X(O(e, W?.id), H)
2330
+ children: Fe(O(e, W?.id), H)
2348
2331
  }), e.type === "group" && /* @__PURE__ */ E("div", {
2349
2332
  className: "search-result-sub",
2350
2333
  children: [
2351
2334
  "Thành viên:",
2352
2335
  " ",
2353
- e.matchedMemberNames && e.matchedMemberNames.length > 0 ? X(e.matchedMemberNames.join(", "), H) : X(H, H)
2336
+ e.matchedMemberNames && e.matchedMemberNames.length > 0 ? Fe(e.matchedMemberNames.join(", "), H) : Fe(H, H)
2354
2337
  ]
2355
2338
  })]
2356
2339
  })]
2357
- }, `chat-${e.id}`)), Y.matchedMembers.slice(0, ye ? void 0 : Math.max(0, 4 - Y.filteredChat.length)).map((e) => /* @__PURE__ */ E("div", {
2340
+ }, `chat-${e.id}`)), J.matchedMembers.slice(0, ve ? void 0 : Math.max(0, 4 - J.filteredChat.length)).map((e) => /* @__PURE__ */ E("div", {
2358
2341
  className: "search-result-item",
2359
2342
  onClick: () => {
2360
- Je(String(e.id));
2343
+ qe(String(e.id));
2361
2344
  },
2362
2345
  children: [/* @__PURE__ */ T("div", {
2363
2346
  className: "search-result-avatar",
@@ -2372,19 +2355,19 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2372
2355
  className: "search-result-info",
2373
2356
  children: /* @__PURE__ */ T("div", {
2374
2357
  className: "search-result-name",
2375
- children: X(e.name, H)
2358
+ children: Fe(e.name, H)
2376
2359
  })
2377
2360
  })]
2378
2361
  }, `member-${e.code}`))]
2379
2362
  }),
2380
- !ye && Y.filteredChat.length + Y.matchedMembers.length > 4 && /* @__PURE__ */ T("button", {
2363
+ !ve && J.filteredChat.length + J.matchedMembers.length > 4 && /* @__PURE__ */ T("button", {
2381
2364
  className: "search-view-all",
2382
- onClick: () => be(!0),
2365
+ onClick: () => ye(!0),
2383
2366
  children: "Xem tất cả thành viên"
2384
2367
  })
2385
2368
  ]
2386
2369
  }),
2387
- (L === "all" || L === "message") && Y.matchedMessages.length > 0 && /* @__PURE__ */ E("div", {
2370
+ (L === "all" || L === "message") && J.matchedMessages.length > 0 && /* @__PURE__ */ E("div", {
2388
2371
  className: "search-section",
2389
2372
  children: [
2390
2373
  /* @__PURE__ */ E("h3", {
@@ -2394,21 +2377,18 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2394
2377
  " ",
2395
2378
  /* @__PURE__ */ E("span", {
2396
2379
  className: "search-count",
2397
- children: ["+", Y.matchedMessages.length]
2380
+ children: ["+", J.matchedMessages.length]
2398
2381
  })
2399
2382
  ]
2400
2383
  }),
2401
2384
  /* @__PURE__ */ T("div", {
2402
2385
  className: "search-section-content",
2403
- children: Y.matchedMessages.slice(0, xe ? void 0 : 3).map((e, t) => /* @__PURE__ */ E("div", {
2386
+ children: J.matchedMessages.slice(0, be ? void 0 : 3).map((e, t) => /* @__PURE__ */ E("div", {
2404
2387
  className: "search-result-item message-result",
2405
- onClick: () => J(V(e.chat)),
2388
+ onClick: () => q(V(e.chat)),
2406
2389
  children: [/* @__PURE__ */ T("div", {
2407
2390
  className: "search-result-avatar",
2408
- children: /* @__PURE__ */ T(Gt, {
2409
- chat: e.chat,
2410
- currentUserId: W?.id
2411
- })
2391
+ children: /* @__PURE__ */ T($, { member: e.chat.type === "single" ? e.chat.members?.find((e) => e.id !== W?.id) ?? e.chat : e.chat })
2412
2392
  }), /* @__PURE__ */ E("div", {
2413
2393
  className: "search-result-info",
2414
2394
  children: [/* @__PURE__ */ E("div", {
@@ -2422,19 +2402,19 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2422
2402
  })]
2423
2403
  }), /* @__PURE__ */ T("div", {
2424
2404
  className: "search-result-text",
2425
- children: X(e.message?.content ?? "", H)
2405
+ children: Fe(e.message?.content ?? "", H)
2426
2406
  })]
2427
2407
  })]
2428
2408
  }, `msg-${t}`))
2429
2409
  }),
2430
- !xe && Y.matchedMessages.length > 3 && /* @__PURE__ */ T("button", {
2410
+ !be && J.matchedMessages.length > 3 && /* @__PURE__ */ T("button", {
2431
2411
  className: "search-view-all",
2432
- onClick: () => Se(!0),
2412
+ onClick: () => xe(!0),
2433
2413
  children: "Xem tất cả tin nhắn"
2434
2414
  })
2435
2415
  ]
2436
2416
  }),
2437
- (L === "all" || L === "file") && Y.matchedFiles.length > 0 && /* @__PURE__ */ E("div", {
2417
+ (L === "all" || L === "file") && J.matchedFiles.length > 0 && /* @__PURE__ */ E("div", {
2438
2418
  className: "search-section",
2439
2419
  children: [
2440
2420
  /* @__PURE__ */ E("h3", {
@@ -2444,15 +2424,15 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2444
2424
  " ",
2445
2425
  /* @__PURE__ */ T("span", {
2446
2426
  className: "search-count",
2447
- children: Y.totalMatchedFiles
2427
+ children: J.totalMatchedFiles
2448
2428
  })
2449
2429
  ]
2450
2430
  }),
2451
2431
  /* @__PURE__ */ T("div", {
2452
2432
  className: "search-section-content",
2453
- children: Y.matchedFiles.slice(0, Ce ? void 0 : 3).map((e, t) => e.files.map((n, r) => /* @__PURE__ */ E("div", {
2433
+ children: J.matchedFiles.slice(0, Se ? void 0 : 3).map((e, t) => e.files.map((n, r) => /* @__PURE__ */ E("div", {
2454
2434
  className: "search-result-item file-result",
2455
- onClick: () => J(V(e.chat)),
2435
+ onClick: () => q(V(e.chat)),
2456
2436
  children: [/* @__PURE__ */ T("div", {
2457
2437
  className: "file-icon-wrapper",
2458
2438
  children: /* @__PURE__ */ T("i", { className: "fas fa-file-alt" })
@@ -2472,42 +2452,39 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2472
2452
  })]
2473
2453
  }, `file-${t}-${r}`)))
2474
2454
  }),
2475
- !Ce && Y.totalMatchedFiles > 3 && /* @__PURE__ */ T("button", {
2455
+ !Se && J.totalMatchedFiles > 3 && /* @__PURE__ */ T("button", {
2476
2456
  className: "search-view-all",
2477
- onClick: () => we(!0),
2457
+ onClick: () => Ce(!0),
2478
2458
  children: "Xem tất cả file"
2479
2459
  })
2480
2460
  ]
2481
2461
  })
2482
2462
  ]
2483
2463
  }) : /* @__PURE__ */ T(sn, {
2484
- chats: Y.filteredChat,
2464
+ chats: J.filteredChat,
2485
2465
  onSelectChat: (e) => {
2486
- J(V(e)), W?.id && e.new?.[W.id] > 0 && G.readChat(e.id);
2487
- },
2488
- onRemoveChat: (e, t) => void Re(e, t),
2489
- onUpdateGroup: ze,
2490
- onAddMemberClick: Ve
2466
+ q(V(e)), W?.id && e.new?.[W.id] > 0 && G.readChat(e.id);
2467
+ }
2491
2468
  })
2492
2469
  })
2493
2470
  ] }) : /* @__PURE__ */ E("div", {
2494
2471
  className: "contact-categories",
2495
2472
  children: [/* @__PURE__ */ E("div", {
2496
- className: `category-item ${re === "members" ? "active" : ""}`,
2497
- onClick: () => ie("members"),
2473
+ className: `category-item ${F === "members" ? "active" : ""}`,
2474
+ onClick: () => ne("members"),
2498
2475
  children: [
2499
- /* @__PURE__ */ T(st, {}),
2476
+ /* @__PURE__ */ T(ct, {}),
2500
2477
  /* @__PURE__ */ T("span", { children: "Danh sách thành viên" }),
2501
2478
  /* @__PURE__ */ T("span", {
2502
2479
  className: "count",
2503
- children: je.length
2480
+ children: Ae.length
2504
2481
  })
2505
2482
  ]
2506
- }), Te && /* @__PURE__ */ E("div", {
2507
- className: `category-item ${re === "groups" ? "active" : ""}`,
2508
- onClick: () => ie("groups"),
2483
+ }), we && /* @__PURE__ */ E("div", {
2484
+ className: `category-item ${F === "groups" ? "active" : ""}`,
2485
+ onClick: () => ne("groups"),
2509
2486
  children: [
2510
- /* @__PURE__ */ T(ct, {}),
2487
+ /* @__PURE__ */ T(lt, {}),
2511
2488
  /* @__PURE__ */ T("span", { children: "Danh sách nhóm" }),
2512
2489
  /* @__PURE__ */ T("span", {
2513
2490
  className: "count",
@@ -2519,11 +2496,11 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2519
2496
  }),
2520
2497
  (n === "fullpage" || U) && /* @__PURE__ */ E("div", {
2521
2498
  className: "chat-main",
2522
- onDragEnter: De,
2523
- onDragOver: Oe,
2524
- onDragLeave: ke,
2525
- onDrop: Ae,
2526
- children: [Ee && /* @__PURE__ */ T("div", {
2499
+ onDragEnter: Ee,
2500
+ onDragOver: De,
2501
+ onDragLeave: Oe,
2502
+ onDrop: ke,
2503
+ children: [Te && /* @__PURE__ */ T("div", {
2527
2504
  className: "drag-overlay-full",
2528
2505
  children: /* @__PURE__ */ E("div", {
2529
2506
  className: "drag-content",
@@ -2532,10 +2509,10 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2532
2509
  children: "📤"
2533
2510
  }), /* @__PURE__ */ T("span", {
2534
2511
  className: "drag-text",
2535
- children: y("chatWindow.dragFile")
2512
+ children: v("chatWindow.dragFile")
2536
2513
  })]
2537
2514
  })
2538
- }), ne === "chats" ? U ? /* @__PURE__ */ E(w, { children: [
2515
+ }), P === "chats" ? U ? /* @__PURE__ */ E(w, { children: [
2539
2516
  /* @__PURE__ */ E("div", {
2540
2517
  className: "chat-main-header",
2541
2518
  children: [/* @__PURE__ */ E("div", {
@@ -2543,15 +2520,12 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2543
2520
  children: [
2544
2521
  n === "popup" && /* @__PURE__ */ T("button", {
2545
2522
  className: "back-btn",
2546
- onClick: () => J(V(null)),
2547
- children: /* @__PURE__ */ T(lt, {})
2523
+ onClick: () => q(V(null)),
2524
+ children: /* @__PURE__ */ T(ut, {})
2548
2525
  }),
2549
2526
  /* @__PURE__ */ T("div", {
2550
2527
  className: "chat-main-avatar",
2551
- children: /* @__PURE__ */ T(Gt, {
2552
- chat: U,
2553
- currentUserId: W?.id
2554
- })
2528
+ children: /* @__PURE__ */ T($, { member: U?.type === "single" ? U.members?.find((e) => e.id !== W?.id) ?? U : U })
2555
2529
  }),
2556
2530
  /* @__PURE__ */ E("div", {
2557
2531
  className: "chat-main-text",
@@ -2560,24 +2534,24 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2560
2534
  children: [/* @__PURE__ */ T("span", {
2561
2535
  className: "chat-main-name",
2562
2536
  children: O(U, W?.id)
2563
- }), U.is_muted && /* @__PURE__ */ T(ut, {})]
2537
+ }), U.is_muted && /* @__PURE__ */ T(dt, {})]
2564
2538
  }), /* @__PURE__ */ T("span", {
2565
2539
  className: "chat-main-status",
2566
- children: U.type === "single" ? (Me.find((e) => e.id !== W?.id)?.socket_ids?.length ?? 0) > 0 ? "Đang hoạt động" : "Không hoạt động" : `${Me.length ?? 0} thành viên`
2540
+ children: U.type === "single" ? (je.find((e) => e.id !== W?.id)?.socket_ids?.length ?? 0) > 0 ? "Đang hoạt động" : "Không hoạt động" : `${je.length ?? 0} thành viên`
2567
2541
  })]
2568
2542
  })
2569
2543
  ]
2570
2544
  }), /* @__PURE__ */ T("div", {
2571
2545
  className: "chat-main-actions",
2572
2546
  children: /* @__PURE__ */ T("button", {
2573
- className: `main-action-btn ${M ? "active" : ""}`,
2574
- onClick: () => ee(!M),
2575
- children: /* @__PURE__ */ T(dt, {})
2547
+ className: `main-action-btn ${j ? "active" : ""}`,
2548
+ onClick: () => M(!j),
2549
+ children: /* @__PURE__ */ T(ft, {})
2576
2550
  })
2577
2551
  })]
2578
2552
  }),
2579
2553
  /* @__PURE__ */ T(xn, {}),
2580
- /* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(fn, { ref: me }) })
2554
+ /* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(fn, { ref: pe }) })
2581
2555
  ] }) : /* @__PURE__ */ E("div", {
2582
2556
  className: "empty-chat-state",
2583
2557
  children: [
@@ -2585,55 +2559,52 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2585
2559
  className: "empty-icon",
2586
2560
  children: "💬"
2587
2561
  }),
2588
- /* @__PURE__ */ T("h3", { children: y("chatWindow.selectChat") }),
2589
- /* @__PURE__ */ T("p", { children: y("chatWindow.startConversation") })
2562
+ /* @__PURE__ */ T("h3", { children: v("chatWindow.selectChat") }),
2563
+ /* @__PURE__ */ T("p", { children: v("chatWindow.startConversation") })
2590
2564
  ]
2591
- }) : /* @__PURE__ */ T(w, { children: re === "members" ? /* @__PURE__ */ T(hn, { onMessageClick: (e) => {
2592
- Je(e), P("chats");
2565
+ }) : /* @__PURE__ */ T(w, { children: F === "members" ? /* @__PURE__ */ T(hn, { onMessageClick: (e) => {
2566
+ qe(e), te("chats");
2593
2567
  } }) : /* @__PURE__ */ T(gn, {
2594
2568
  groups: K.filter((e) => e.type === "group"),
2595
- currentUserId: W?.id,
2596
2569
  onGroupClick: (e) => {
2597
- J(V(e)), P("chats");
2570
+ q(V(e)), te("chats");
2598
2571
  }
2599
2572
  }) })]
2600
2573
  }),
2601
- n === "fullpage" && ne === "chats" && U && M && /* @__PURE__ */ T(un, {
2602
- onClose: () => ee(!1),
2603
- onAddMember: () => Ve(),
2574
+ n === "fullpage" && P === "chats" && U && j && /* @__PURE__ */ T(un, {
2575
+ onClose: () => M(!1),
2576
+ onAddMember: () => Be(),
2604
2577
  onUpdateGroup: ze,
2605
2578
  onRemoveMember: (e, t) => {
2606
- He(e, t);
2579
+ Ve(e, t);
2607
2580
  }
2608
2581
  })
2609
2582
  ]
2610
2583
  })]
2611
2584
  }),
2612
- b && /* @__PURE__ */ T(an, { onClose: () => {
2613
- x(!1);
2585
+ y && /* @__PURE__ */ T(an, { onClose: () => {
2586
+ b(!1);
2614
2587
  } }),
2615
- /* @__PURE__ */ T(Jt, {
2616
- isOpen: S,
2588
+ /* @__PURE__ */ T(qt, {
2589
+ isOpen: x,
2617
2590
  onClose: () => {
2618
- C(!1), k(null);
2591
+ S(!1), D(null);
2619
2592
  },
2620
- group: D,
2621
- onUpdate: Be,
2622
- removeMember: He,
2623
- primaryColor: i
2624
- }),
2625
- A && /* @__PURE__ */ T(Yt, { onClose: () => {
2626
- j(!1);
2593
+ group: C
2594
+ }, x ? C?.id ?? "open" : "closed"),
2595
+ k && /* @__PURE__ */ T(Jt, { onClose: () => {
2596
+ A(!1);
2627
2597
  } }),
2628
2598
  /* @__PURE__ */ T(rn, {
2629
- isOpen: te,
2599
+ isOpen: ee,
2630
2600
  onClose: () => N(!1),
2631
2601
  defaultColor: "#ffffff"
2632
2602
  }),
2633
2603
  /* @__PURE__ */ T(Kt, {})
2634
2604
  ]
2635
2605
  });
2636
- }, Gt = i(({ chat: e, currentUserId: t }) => {
2606
+ };
2607
+ i(({ chat: e, currentUserId: t }) => {
2637
2608
  let n = d(() => e ? e.avatar ? e.avatar : e.type === "group" ? "👥" : e.members?.find((e) => e.id !== t)?.avatar ?? "👤" : "👤", [e, t]);
2638
2609
  return n === "👥" || n === "👤" ? /* @__PURE__ */ T("div", {
2639
2610
  className: "chat-avatar-emoji",
@@ -2644,18 +2615,21 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2644
2615
  loading: "lazy",
2645
2616
  className: "chat-avatar-img"
2646
2617
  });
2647
- }), Kt = () => {
2648
- let { toasts: e, removeToast: t } = Qe(), { theme: n } = _((e) => e.setting);
2649
- return /* @__PURE__ */ T("div", {
2650
- className: `toast-container ${n === "dark" ? "dark-theme" : ""}`,
2651
- children: e.map((e) => /* @__PURE__ */ E("div", {
2652
- className: `toast-item ${e.type}`,
2653
- children: [
2654
- /* @__PURE__ */ T("div", {
2618
+ });
2619
+ //#endregion
2620
+ //#region src/components/shared/ToastContainer.tsx
2621
+ var Kt = () => {
2622
+ let { toasts: e, removeToast: t } = Y(), { theme: n } = _((e) => e.setting), r = e.filter((e) => e.isConfirm), i = e.filter((e) => !e.isConfirm);
2623
+ return /* @__PURE__ */ E(w, { children: [r.length > 0 && /* @__PURE__ */ T("div", {
2624
+ className: `confirm-overlay ${n === "dark" ? "dark-theme" : ""}`,
2625
+ children: r.map((e) => /* @__PURE__ */ T("div", {
2626
+ className: `toast-item confirm-toast ${e.type}`,
2627
+ children: /* @__PURE__ */ E("div", {
2628
+ className: "confirm-modal-content",
2629
+ children: [/* @__PURE__ */ T("div", {
2655
2630
  className: "toast-message",
2656
2631
  children: e.message
2657
- }),
2658
- e.isConfirm && /* @__PURE__ */ E("div", {
2632
+ }), /* @__PURE__ */ E("div", {
2659
2633
  className: "toast-actions",
2660
2634
  children: [/* @__PURE__ */ T("button", {
2661
2635
  className: "toast-btn cancel",
@@ -2666,16 +2640,24 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2666
2640
  onClick: () => e.onConfirm?.(),
2667
2641
  children: "Xác nhận"
2668
2642
  })]
2669
- }),
2670
- !e.isConfirm && /* @__PURE__ */ T("button", {
2671
- className: "toast-close-btn",
2672
- onClick: () => t(e.id),
2673
- children: "✕"
2674
- })
2675
- ]
2643
+ })]
2644
+ })
2676
2645
  }, e.id))
2677
- });
2678
- }, qt = ({ member: e }) => {
2646
+ }), /* @__PURE__ */ T("div", {
2647
+ className: `toast-container ${n === "dark" ? "dark-theme" : ""}`,
2648
+ children: i.map((e) => /* @__PURE__ */ E("div", {
2649
+ className: `toast-item ${e.type}`,
2650
+ children: [/* @__PURE__ */ T("div", {
2651
+ className: "toast-message",
2652
+ children: e.message
2653
+ }), /* @__PURE__ */ T("button", {
2654
+ className: "toast-close-btn",
2655
+ onClick: () => t(e.id),
2656
+ children: "✕"
2657
+ })]
2658
+ }, e.id))
2659
+ })] });
2660
+ }, $ = ({ member: e }) => {
2679
2661
  let [t, n] = p(!1), r = e.name?.charAt(0).toUpperCase() || "?";
2680
2662
  if (e.avatar && !t) return /* @__PURE__ */ T("img", {
2681
2663
  src: e.avatar,
@@ -2696,23 +2678,31 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2696
2678
  style: { backgroundColor: i[(String(e.id)?.charCodeAt(0) || 0) % i.length] },
2697
2679
  children: r
2698
2680
  });
2699
- }, Jt = ({ isOpen: e, onClose: t, group: n, onUpdate: r, removeMember: i, primaryColor: a }) => {
2700
- let [o, s] = p(""), [c, l] = p(""), [u, d] = p(""), [f, m] = p(!1), [h, g] = p(null), [v, y] = p(!1), { currentChatMembers: b, currentUser: x } = _((e) => e.chat);
2701
- (e !== v || e && n && n.id !== h) && (y(e), n ? (g(n.id), s(n.name ?? ""), l(n.avatar ?? ""), d(n.avatar ?? "")) : g(null));
2702
- let { t: S } = Z();
2681
+ }, qt = ({ isOpen: e, onClose: t, group: n }) => {
2682
+ let r = g(), { showToast: i, confirm: a } = Y(), { t: o } = X(), [s, c] = p(n?.name ?? ""), [l, u] = p(n?.avatar ?? ""), [f, m] = p(n?.avatar ?? ""), [h, v] = p(!1), { currentChatMembers: y, currentUser: b } = _((e) => e.chat), x = d(() => n ? s !== (n.name ?? "") || l !== (n.avatar ?? "") : !1, [
2683
+ s,
2684
+ l,
2685
+ n
2686
+ ]);
2703
2687
  if (!e || !n) return null;
2704
- let C = async (e) => {
2705
- if (e?.preventDefault(), o.trim()) {
2706
- m(!0);
2688
+ let S = async (e) => {
2689
+ if (e?.preventDefault(), s.trim()) {
2690
+ v(!0);
2707
2691
  try {
2708
- let e = typeof c == "string" ? c.trim() || void 0 : c || void 0;
2709
- await r(n.id, o.trim(), e), t();
2692
+ let e = typeof l == "string" ? l.trim() || void 0 : l || void 0, a = await G.updateGroup(n.id, s.trim(), e);
2693
+ a?.data && (r(Te(a.data)), i("Cập nhật nhóm thành công", "success"), t());
2710
2694
  } catch (e) {
2711
- console.error(e);
2695
+ console.error(e), i("Lỗi khi cập nhật nhóm", "error");
2712
2696
  } finally {
2713
- m(!1);
2697
+ v(!1);
2714
2698
  }
2715
2699
  }
2700
+ }, C = async (e) => {
2701
+ if (await a("Bạn có chắc chắn muốn xóa thành viên này ra khỏi nhóm?")) try {
2702
+ await G.removeMember(n.id, e), r(_e(y.filter((t) => String(t.id) !== String(e)))), String(e) === String(b?.id) ? (i("Bạn đã rời khỏi nhóm này", "success"), t(), r(V(null)), r(he((await G.getChats()).data ?? []))) : i("Đã xóa thành viên khỏi nhóm", "success");
2703
+ } catch (e) {
2704
+ console.error("Lỗi khi xóa thành viên:", e), i("Không thể xóa thành viên. Vui lòng thử lại!", "error");
2705
+ }
2716
2706
  };
2717
2707
  return /* @__PURE__ */ T("div", {
2718
2708
  className: "modal-overlay",
@@ -2725,11 +2715,11 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2725
2715
  className: "modal-header",
2726
2716
  children: [/* @__PURE__ */ T("h3", {
2727
2717
  className: "modal-title",
2728
- children: S("updateGroup.title")
2718
+ children: o("updateGroup.title")
2729
2719
  }), /* @__PURE__ */ T("button", {
2730
2720
  className: "close-modal-btn",
2731
2721
  onClick: t,
2732
- children: /* @__PURE__ */ T($, {})
2722
+ children: /* @__PURE__ */ T(Q, {})
2733
2723
  })]
2734
2724
  }),
2735
2725
  /* @__PURE__ */ E("div", {
@@ -2744,17 +2734,17 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2744
2734
  onChange: (e) => {
2745
2735
  let t = e.target.files?.[0];
2746
2736
  if (t) {
2747
- l(t);
2737
+ u(t);
2748
2738
  let e = new FileReader();
2749
2739
  e.onload = (e) => {
2750
- d(e.target?.result);
2740
+ m(e.target?.result);
2751
2741
  }, e.readAsDataURL(t);
2752
2742
  }
2753
2743
  }
2754
2744
  }), /* @__PURE__ */ T("div", {
2755
2745
  className: "avatar-placeholder",
2756
- children: u ? /* @__PURE__ */ T("img", {
2757
- src: u,
2746
+ children: f ? /* @__PURE__ */ T("img", {
2747
+ src: f,
2758
2748
  alt: "Preview"
2759
2749
  }) : /* @__PURE__ */ E("svg", {
2760
2750
  xmlns: "http://www.w3.org/2000/svg",
@@ -2778,9 +2768,9 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2778
2768
  }), /* @__PURE__ */ T("input", {
2779
2769
  type: "text",
2780
2770
  className: "group-name-input",
2781
- value: o,
2782
- onChange: (e) => s(e.target.value),
2783
- placeholder: S("updateGroup.groupNamePlaceholder"),
2771
+ value: s,
2772
+ onChange: (e) => c(e.target.value),
2773
+ placeholder: o("updateGroup.groupNamePlaceholder"),
2784
2774
  required: !0
2785
2775
  })]
2786
2776
  }), /* @__PURE__ */ E("div", {
@@ -2788,23 +2778,23 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2788
2778
  children: [/* @__PURE__ */ E("span", {
2789
2779
  className: "section-title",
2790
2780
  children: [
2791
- S("updateGroup.membersSection"),
2781
+ o("updateGroup.membersSection"),
2792
2782
  " (",
2793
- b?.length,
2783
+ y?.length,
2794
2784
  ")"
2795
2785
  ]
2796
2786
  }), /* @__PURE__ */ T("div", {
2797
2787
  className: "members-list-container",
2798
2788
  children: /* @__PURE__ */ T("div", {
2799
2789
  className: "members-list",
2800
- children: b.map((e) => {
2801
- let t = e.id === n.owner_id, r = e.id === x?.id;
2790
+ children: y.map((e) => {
2791
+ let t = e.id === n.owner_id, r = e.id === b?.id;
2802
2792
  return /* @__PURE__ */ E("div", {
2803
2793
  className: "member-item",
2804
2794
  children: [
2805
2795
  /* @__PURE__ */ E("div", {
2806
2796
  className: "member-avatar-wrapper",
2807
- children: [/* @__PURE__ */ T(qt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
2797
+ children: [/* @__PURE__ */ T($, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(at, {
2808
2798
  size: 12,
2809
2799
  className: "status-dot"
2810
2800
  }) : null]
@@ -2816,7 +2806,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2816
2806
  children: [/* @__PURE__ */ T("span", {
2817
2807
  className: "member-name",
2818
2808
  children: r ? "Bạn" : e.name
2819
- }), t && /* @__PURE__ */ T(at, {
2809
+ }), t && /* @__PURE__ */ T(ot, {
2820
2810
  size: 14,
2821
2811
  className: "owner-icon"
2822
2812
  })]
@@ -2829,9 +2819,9 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2829
2819
  type: "button",
2830
2820
  className: "remove-member-btn",
2831
2821
  onClick: (t) => {
2832
- t.stopPropagation(), i && n && i(n.id, e.id);
2822
+ t.stopPropagation(), C(e.id);
2833
2823
  },
2834
- title: S("updateGroup.removeMemberButtonTitle"),
2824
+ title: o("updateGroup.removeMemberButtonTitle"),
2835
2825
  children: "✕"
2836
2826
  })
2837
2827
  ]
@@ -2846,21 +2836,20 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2846
2836
  children: [/* @__PURE__ */ T("button", {
2847
2837
  className: "footer-btn cancel",
2848
2838
  onClick: t,
2849
- disabled: f,
2850
- children: S("updateGroup.cancelButton")
2839
+ disabled: h,
2840
+ children: o("updateGroup.cancelButton")
2851
2841
  }), /* @__PURE__ */ T("button", {
2852
- className: `footer-btn confirm ${f || !o.trim() ? "disabled" : ""}`,
2853
- style: a ? { background: a } : {},
2854
- onClick: () => void C(),
2855
- disabled: f || !o.trim(),
2856
- children: S(f ? "updateGroup.updatingButton" : "updateGroup.updateButton")
2842
+ className: `footer-btn confirm ${h || !s.trim() || !x ? "disabled" : ""}`,
2843
+ onClick: () => void S(),
2844
+ disabled: h || !s.trim() || !x,
2845
+ children: o(h ? "updateGroup.updatingButton" : "updateGroup.updateButton")
2857
2846
  })]
2858
2847
  })
2859
2848
  ]
2860
2849
  })
2861
2850
  });
2862
- }, Yt = ({ onClose: e }) => {
2863
- let [t, n] = p(""), [r, i] = p(!1), { t: a } = Z(), { currentChatMembers: o, members: s, currentChat: c } = _((e) => e.chat), l = g(), { showToast: u } = Qe();
2851
+ }, Jt = ({ onClose: e }) => {
2852
+ let [t, n] = p(""), [r, i] = p(!1), { t: a } = X(), { currentChatMembers: o, members: s, currentChat: c } = _((e) => e.chat), l = g(), { showToast: u } = Y();
2864
2853
  if (!c || c?.type === "single") return null;
2865
2854
  let d = new Set((o || []).map((e) => e.id)), f = (s || []).filter((e) => !d.has(e.id) && e.name.toLowerCase().includes(t.toLowerCase())), m = async (t) => {
2866
2855
  if (!r) {
@@ -2942,7 +2931,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2942
2931
  children: [
2943
2932
  /* @__PURE__ */ E("div", {
2944
2933
  className: "member-avatar-wrapper",
2945
- children: [/* @__PURE__ */ T(qt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
2934
+ children: [/* @__PURE__ */ T($, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(at, {
2946
2935
  size: 12,
2947
2936
  className: "status-dot"
2948
2937
  }) : null]
@@ -2971,12 +2960,12 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2971
2960
  ]
2972
2961
  })
2973
2962
  });
2974
- }, Xt = ({ file: e }) => /* @__PURE__ */ T("img", {
2963
+ }, Yt = ({ file: e }) => /* @__PURE__ */ T("img", {
2975
2964
  src: e.link,
2976
2965
  alt: e.name,
2977
2966
  className: "file-viewer-image",
2978
2967
  title: e.name
2979
- }), Zt = ({ file: e }) => /* @__PURE__ */ T("div", {
2968
+ }), Xt = ({ file: e }) => /* @__PURE__ */ T("div", {
2980
2969
  className: "video-container",
2981
2970
  children: /* @__PURE__ */ T("video", {
2982
2971
  src: e.link,
@@ -2985,7 +2974,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2985
2974
  className: "file-viewer-video",
2986
2975
  title: e.name
2987
2976
  })
2988
- }), Qt = ({ file: e }) => /* @__PURE__ */ T("div", {
2977
+ }), Zt = ({ file: e }) => /* @__PURE__ */ T("div", {
2989
2978
  className: "audio-container",
2990
2979
  children: /* @__PURE__ */ E("div", {
2991
2980
  className: "audio-player-wrapper",
@@ -3000,7 +2989,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3000
2989
  children: e.name
3001
2990
  })]
3002
2991
  })
3003
- }), $t = ({ file: e }) => /* @__PURE__ */ T("div", {
2992
+ }), Qt = ({ file: e }) => /* @__PURE__ */ T("div", {
3004
2993
  className: "pdf-container",
3005
2994
  children: /* @__PURE__ */ T("iframe", {
3006
2995
  src: `${e.link}#toolbar=1&navpanes=0`,
@@ -3013,7 +3002,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3013
3002
  borderRadius: "8px"
3014
3003
  }
3015
3004
  })
3016
- }), en = ({ file: e, openDownloadButtonText: t }) => /* @__PURE__ */ E("div", {
3005
+ }), $t = ({ file: e, openDownloadButtonText: t }) => /* @__PURE__ */ E("div", {
3017
3006
  className: "file-viewer-generic",
3018
3007
  children: [
3019
3008
  /* @__PURE__ */ T("div", {
@@ -3032,8 +3021,14 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3032
3021
  children: t
3033
3022
  })
3034
3023
  ]
3024
+ }), en = ({ file: e, index: t, currentIndex: n, onClick: r, children: i }) => /* @__PURE__ */ T("button", {
3025
+ className: `file-viewer-thumbnail ${t === n ? "active" : ""}`,
3026
+ onClick: () => r(t),
3027
+ title: e.name,
3028
+ "aria-label": `Go to image ${t + 1}`,
3029
+ children: i
3035
3030
  }), tn = ({ isOpen: e, files: t, initialIndex: n = 0, onClose: r }) => {
3036
- let [i, a] = p(n), o = f(null), { t: s } = Z();
3031
+ let [i, a] = p(n), o = f(null), { t: s } = X();
3037
3032
  if (!e || t.length === 0) return null;
3038
3033
  let c = () => {
3039
3034
  a((e) => e === 0 ? t.length - 1 : e - 1);
@@ -3051,7 +3046,64 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3051
3046
  });
3052
3047
  }, m = (e) => {
3053
3048
  e.key === "ArrowLeft" ? c() : e.key === "ArrowRight" ? l() : e.key === "Escape" && r();
3054
- }, h = t[i], g = z(h.name);
3049
+ }, h = t[i], g = se(h.name), _ = (e, t) => {
3050
+ let n = se(e.name), r;
3051
+ switch (n) {
3052
+ case "image":
3053
+ r = /* @__PURE__ */ T("img", {
3054
+ src: e.link,
3055
+ alt: `Thumb ${t + 1}`,
3056
+ className: "thumbnail-image"
3057
+ });
3058
+ break;
3059
+ case "video":
3060
+ r = /* @__PURE__ */ E("div", {
3061
+ className: "video-thumbnail-container",
3062
+ children: [/* @__PURE__ */ T("video", {
3063
+ src: `${e.link}#t=0.1`,
3064
+ className: "thumbnail-video",
3065
+ muted: !0,
3066
+ preload: "metadata"
3067
+ }), /* @__PURE__ */ T("div", {
3068
+ className: "play-icon-overlay",
3069
+ children: /* @__PURE__ */ T("span", {
3070
+ className: "play-arrow",
3071
+ children: "▶"
3072
+ })
3073
+ })]
3074
+ });
3075
+ break;
3076
+ case "audio":
3077
+ r = /* @__PURE__ */ T("div", {
3078
+ className: "audio-thumbnail-container",
3079
+ children: /* @__PURE__ */ T("div", {
3080
+ className: "audio-thumbnail-icon",
3081
+ children: "🎵"
3082
+ })
3083
+ });
3084
+ break;
3085
+ case "pdf":
3086
+ r = /* @__PURE__ */ T("div", {
3087
+ className: "pdf-thumbnail-container",
3088
+ children: /* @__PURE__ */ T("div", {
3089
+ className: "pdf-thumbnail-icon",
3090
+ children: "📕"
3091
+ })
3092
+ });
3093
+ break;
3094
+ default: r = /* @__PURE__ */ T("div", {
3095
+ className: "thumbnail-icon",
3096
+ children: "📄"
3097
+ });
3098
+ }
3099
+ return /* @__PURE__ */ T(en, {
3100
+ file: e,
3101
+ currentIndex: i,
3102
+ onClick: () => a(t),
3103
+ index: t,
3104
+ children: r
3105
+ }, e.id);
3106
+ };
3055
3107
  return /* @__PURE__ */ T("div", {
3056
3108
  className: "file-viewer-overlay",
3057
3109
  onClick: r,
@@ -3069,16 +3121,16 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3069
3121
  onClick: r,
3070
3122
  "aria-label": s("fileViewer.closeAriaLabel"),
3071
3123
  title: s("fileViewer.closeButtonTitle"),
3072
- children: /* @__PURE__ */ T($, {})
3124
+ children: /* @__PURE__ */ T(Q, {})
3073
3125
  }),
3074
3126
  /* @__PURE__ */ E("div", {
3075
3127
  className: "file-viewer-main",
3076
3128
  children: [
3077
- g === "image" && /* @__PURE__ */ T(Xt, { file: h }),
3078
- g === "video" && /* @__PURE__ */ T(Zt, { file: h }),
3079
- g === "audio" && /* @__PURE__ */ T(Qt, { file: h }),
3080
- g === "pdf" && /* @__PURE__ */ T($t, { file: h }),
3081
- g === "other" && /* @__PURE__ */ T(en, {
3129
+ g === "image" && /* @__PURE__ */ T(Yt, { file: h }),
3130
+ g === "video" && /* @__PURE__ */ T(Xt, { file: h }),
3131
+ g === "audio" && /* @__PURE__ */ T(Zt, { file: h }),
3132
+ g === "pdf" && /* @__PURE__ */ T(Qt, { file: h }),
3133
+ g === "other" && /* @__PURE__ */ T($t, {
3082
3134
  file: h,
3083
3135
  openDownloadButtonText: s("fileViewer.openDownloadButton")
3084
3136
  })
@@ -3089,13 +3141,13 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3089
3141
  onClick: c,
3090
3142
  "aria-label": s("fileViewer.previousAriaLabel"),
3091
3143
  title: s("fileViewer.previousButtonTitle"),
3092
- children: /* @__PURE__ */ T(ft, {})
3144
+ children: /* @__PURE__ */ T(pt, {})
3093
3145
  }), /* @__PURE__ */ T("button", {
3094
3146
  className: "file-viewer-nav file-viewer-next",
3095
3147
  onClick: l,
3096
3148
  "aria-label": s("fileViewer.nextAriaLabel"),
3097
3149
  title: s("fileViewer.nextButtonTitle"),
3098
- children: /* @__PURE__ */ T(pt, {})
3150
+ children: /* @__PURE__ */ T(mt, {})
3099
3151
  })] }),
3100
3152
  /* @__PURE__ */ E("div", {
3101
3153
  className: "file-viewer-counter",
@@ -3113,61 +3165,19 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3113
3165
  onClick: u,
3114
3166
  "aria-label": s("fileViewer.scrollLeftAriaLabel"),
3115
3167
  title: s("fileViewer.scrollLeftTitle"),
3116
- children: /* @__PURE__ */ T(ft, {})
3168
+ children: /* @__PURE__ */ T(pt, {})
3117
3169
  }),
3118
3170
  /* @__PURE__ */ T("div", {
3119
3171
  className: "file-viewer-thumbnails",
3120
3172
  ref: o,
3121
- children: t.map((e, t) => {
3122
- let n = z(e.name);
3123
- return /* @__PURE__ */ T("button", {
3124
- className: `file-viewer-thumbnail ${t === i ? "active" : ""}`,
3125
- onClick: () => a(t),
3126
- title: e.name,
3127
- "aria-label": `Go to image ${t + 1}`,
3128
- children: n === "image" ? /* @__PURE__ */ T("img", {
3129
- src: e.link,
3130
- alt: `Thumb ${t + 1}`,
3131
- className: "thumbnail-image"
3132
- }) : n === "video" ? /* @__PURE__ */ E("div", {
3133
- className: "video-thumbnail-container",
3134
- children: [/* @__PURE__ */ T("video", {
3135
- src: `${e.link}#t=0.1`,
3136
- className: "thumbnail-video",
3137
- muted: !0,
3138
- preload: "metadata"
3139
- }), /* @__PURE__ */ T("div", {
3140
- className: "play-icon-overlay",
3141
- children: /* @__PURE__ */ T("span", {
3142
- className: "play-arrow",
3143
- children: "▶"
3144
- })
3145
- })]
3146
- }) : n === "audio" ? /* @__PURE__ */ T("div", {
3147
- className: "audio-thumbnail-container",
3148
- children: /* @__PURE__ */ T("div", {
3149
- className: "audio-thumbnail-icon",
3150
- children: "🎵"
3151
- })
3152
- }) : n === "pdf" ? /* @__PURE__ */ T("div", {
3153
- className: "pdf-thumbnail-container",
3154
- children: /* @__PURE__ */ T("div", {
3155
- className: "pdf-thumbnail-icon",
3156
- children: "📕"
3157
- })
3158
- }) : /* @__PURE__ */ T("div", {
3159
- className: "thumbnail-icon",
3160
- children: "📄"
3161
- })
3162
- }, e.id);
3163
- })
3173
+ children: t.map((e, t) => _(e, t))
3164
3174
  }),
3165
3175
  /* @__PURE__ */ T("button", {
3166
3176
  className: "file-viewer-thumbnails-scroll-btn file-viewer-thumbnails-scroll-next",
3167
3177
  onClick: d,
3168
3178
  "aria-label": s("fileViewer.scrollRightAriaLabel"),
3169
3179
  title: s("fileViewer.scrollRightTitle"),
3170
- children: /* @__PURE__ */ T(pt, {})
3180
+ children: /* @__PURE__ */ T(mt, {})
3171
3181
  })
3172
3182
  ]
3173
3183
  })
@@ -3185,7 +3195,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3185
3195
  "#6366f1",
3186
3196
  "#14b8a6"
3187
3197
  ], rn = ({ isOpen: e, onClose: t, defaultColor: n = "#ffffff" }) => {
3188
- let r = g(), { t: i } = Z(), { primaryColor: a } = _((e) => e.setting);
3198
+ let r = g(), { t: i } = X(), { primaryColor: a } = _((e) => e.setting);
3189
3199
  return e ? /* @__PURE__ */ T("div", {
3190
3200
  className: "modal-overlay",
3191
3201
  onClick: t,
@@ -3220,7 +3230,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3220
3230
  children: nn.map((e) => /* @__PURE__ */ T("button", {
3221
3231
  className: `color-preset-btn ${a === e ? "active" : ""}`,
3222
3232
  style: { backgroundColor: e },
3223
- onClick: () => r(X(e)),
3233
+ onClick: () => r(Ie(e)),
3224
3234
  children: a === e && /* @__PURE__ */ T("span", {
3225
3235
  className: "check-icon",
3226
3236
  children: "✓"
@@ -3237,7 +3247,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3237
3247
  children: [/* @__PURE__ */ T("input", {
3238
3248
  type: "color",
3239
3249
  value: a,
3240
- onChange: (e) => r(X(e.target.value)),
3250
+ onChange: (e) => r(Ie(e.target.value)),
3241
3251
  className: "color-input"
3242
3252
  }), /* @__PURE__ */ T("span", {
3243
3253
  className: "color-hex-code",
@@ -3255,7 +3265,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3255
3265
  children: i("themeModal.doneButton")
3256
3266
  }), /* @__PURE__ */ T("button", {
3257
3267
  className: "modal-btn cancel",
3258
- onClick: () => r(X(n)),
3268
+ onClick: () => r(Ie(n)),
3259
3269
  children: i("themeModal.resetButton")
3260
3270
  })]
3261
3271
  })
@@ -3263,7 +3273,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3263
3273
  })
3264
3274
  }) : null;
3265
3275
  }, an = ({ onClose: e }) => {
3266
- let { t } = Z(), n = g(), { showToast: r } = Qe(), { members: i, chats: o } = _((e) => e.chat), [s, c] = p([]), [l, u] = p(""), [d, m] = p(""), [h, v] = p(""), [y, b] = p(""), x = f(null), S = (e) => {
3276
+ let { t } = X(), n = g(), { showToast: r } = Y(), { members: i, chats: o } = _((e) => e.chat), [s, c] = p([]), [l, u] = p(""), [d, m] = p(""), [h, v] = p(""), [y, b] = p(""), x = f(null), S = (e) => {
3267
3277
  c((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
3268
3278
  }, C = (e) => {
3269
3279
  let t = e.target.files?.[0];
@@ -3308,7 +3318,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3308
3318
  }), /* @__PURE__ */ T("button", {
3309
3319
  className: "close-modal-btn",
3310
3320
  onClick: e,
3311
- children: /* @__PURE__ */ T($, {})
3321
+ children: /* @__PURE__ */ T(Q, {})
3312
3322
  })]
3313
3323
  }),
3314
3324
  /* @__PURE__ */ E("div", {
@@ -3332,7 +3342,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3332
3342
  src: y,
3333
3343
  alt: "Group avatar",
3334
3344
  className: "preview-avatar"
3335
- }) : /* @__PURE__ */ T(Ut, {})
3345
+ }) : /* @__PURE__ */ T(Wt, {})
3336
3346
  })]
3337
3347
  }), /* @__PURE__ */ T("input", {
3338
3348
  type: "text",
@@ -3359,7 +3369,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3359
3369
  onClick: (t) => {
3360
3370
  t.stopPropagation(), S(e);
3361
3371
  },
3362
- children: /* @__PURE__ */ T($, { size: 14 })
3372
+ children: /* @__PURE__ */ T(Q, { size: 14 })
3363
3373
  })]
3364
3374
  }, e))
3365
3375
  }),
@@ -3402,7 +3412,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3402
3412
  className: "avatar-letter",
3403
3413
  children: e.name.charAt(0).toUpperCase()
3404
3414
  })
3405
- }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
3415
+ }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(at, {
3406
3416
  size: 12,
3407
3417
  className: "status-dot"
3408
3418
  }) : null]
@@ -3443,14 +3453,14 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3443
3453
  /* @__PURE__ */ T("button", {
3444
3454
  className: "close-modal-btn",
3445
3455
  onClick: t,
3446
- children: /* @__PURE__ */ T($, {})
3456
+ children: /* @__PURE__ */ T(Q, {})
3447
3457
  }),
3448
3458
  /* @__PURE__ */ E("div", {
3449
3459
  className: "profile-header",
3450
3460
  children: [
3451
3461
  /* @__PURE__ */ E("div", {
3452
3462
  className: "profile-avatar-wrapper",
3453
- children: [/* @__PURE__ */ T(qt, { member: e }), n && /* @__PURE__ */ T("span", { className: "profile-online-status" })]
3463
+ children: [/* @__PURE__ */ T($, { member: e }), n && /* @__PURE__ */ T("span", { className: "profile-online-status" })]
3454
3464
  }),
3455
3465
  /* @__PURE__ */ T("h3", {
3456
3466
  className: "profile-name",
@@ -3467,7 +3477,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3467
3477
  children: /* @__PURE__ */ E("button", {
3468
3478
  className: "profile-action-btn",
3469
3479
  onClick: r,
3470
- children: [/* @__PURE__ */ T(mt, {}), /* @__PURE__ */ T("span", { children: "Nhắn tin" })]
3480
+ children: [/* @__PURE__ */ T(ht, {}), /* @__PURE__ */ T("span", { children: "Nhắn tin" })]
3471
3481
  })
3472
3482
  }),
3473
3483
  /* @__PURE__ */ E("div", {
@@ -3528,104 +3538,44 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3528
3538
  ]
3529
3539
  })
3530
3540
  }) : null, sn = ({ chats: e, onSelectChat: t }) => {
3531
- let { currentUser: n, members: r, currentChat: i } = _((e) => e.chat), [a, o] = p(null), { t: s } = Z(), { hasGroupChat: c } = _(Ue), l = e.filter((e) => !(e.type === "group" && !c)), u = l.filter((e) => e.is_pined), d = l.filter((e) => !e.is_pined), f = (e) => e ? new Date(e).toLocaleTimeString([], {
3532
- hour: "2-digit",
3533
- minute: "2-digit"
3534
- }) : "";
3541
+ let [n, r] = p(null), { hasGroupChat: i } = _(Ge), a = e.filter((e) => !(e.type === "group" && !i)), o = a.filter((e) => e.is_pined), s = a.filter((e) => !e.is_pined);
3535
3542
  return /* @__PURE__ */ E("div", {
3536
3543
  className: "chat-list",
3537
- children: [
3538
- u.length > 0 && null,
3539
- /* @__PURE__ */ E("div", {
3540
- className: "chat-list-section",
3541
- children: [/* @__PURE__ */ T("div", {
3542
- className: "section-header",
3543
- children: /* @__PURE__ */ T("span", { children: "Tất cả tin nhắn" })
3544
- }), d.length > 0 ? d.map((e) => {
3545
- let a = e.message?.member.id === n?.id, c = n?.id && e.new?.[n.id] ? e.new[n.id] : 0, l = e.type === "single" ? e.members?.find((e) => e.id !== n?.id) : null, u = !!l && r.some((e) => e.id === l.id && (e.socket_ids?.length ?? 0) > 0);
3546
- return /* @__PURE__ */ E("div", {
3547
- className: `chat-item ${i?.id === e.id ? "active" : ""} `,
3548
- onClick: () => t(e),
3549
- children: [/* @__PURE__ */ E("div", {
3550
- className: "chat-item-avatar",
3551
- style: {
3552
- position: "relative",
3553
- background: e.avatar ? "transparent" : void 0,
3554
- cursor: e.type === "single" ? "pointer" : "default"
3555
- },
3556
- onClick: (t) => {
3557
- t.stopPropagation(), e.type === "single" && l && o({
3558
- user: l,
3559
- isOnline: u
3560
- });
3561
- },
3562
- children: [/* @__PURE__ */ T(Gt, {
3563
- chat: e,
3564
- currentUserId: n?.id
3565
- }), e.type === "single" && u && /* @__PURE__ */ T(it, {
3566
- size: 12,
3567
- className: "online-indicator"
3568
- })]
3569
- }), /* @__PURE__ */ E("div", {
3570
- className: "chat-item-info",
3571
- children: [/* @__PURE__ */ E("div", {
3572
- className: "info-top-row",
3573
- children: [/* @__PURE__ */ T("div", {
3574
- className: "chat-item-name",
3575
- children: /* @__PURE__ */ T("span", {
3576
- className: "name-text",
3577
- children: O(e, n?.id)
3578
- })
3579
- }), /* @__PURE__ */ T("span", {
3580
- className: "chat-item-time",
3581
- children: f(e.message?.created_at ?? e.updated_at)
3582
- })]
3583
- }), /* @__PURE__ */ E("div", {
3584
- className: "info-bottom-row",
3585
- children: [/* @__PURE__ */ T("div", {
3586
- className: "chat-item-last",
3587
- children: /* @__PURE__ */ E("span", {
3588
- className: "last-message-text",
3589
- children: [a && `${s("chatList.yourMessage")}`, e.message?.content ?? (e.message?.files?.length ? s("chatMessage.states.attachment") : "")]
3590
- })
3591
- }), /* @__PURE__ */ E("div", {
3592
- className: "info-bottom-right",
3593
- children: [e.is_muted && /* @__PURE__ */ T(ut, {
3594
- size: 14,
3595
- className: "mute-icon-list"
3596
- }), c > 0 && /* @__PURE__ */ T("div", {
3597
- className: "unread-badge-circle",
3598
- children: c > 99 ? "99+" : c
3599
- })]
3600
- })]
3601
- })]
3602
- })]
3603
- }, e.id);
3604
- }) : u.length === 0 ? /* @__PURE__ */ T("div", {
3605
- className: "empty-chat-list",
3606
- children: "Không có tin nhắn nào"
3607
- }) : null]
3608
- }),
3609
- a && /* @__PURE__ */ T(on, {
3610
- user: a.user,
3611
- isOnline: a.isOnline,
3612
- onClose: () => o(null),
3613
- onMessage: () => {
3614
- if (!a) return;
3615
- let n = e.find((e) => e.type === "single" && e.members?.some((e) => e.id === a.user.id));
3616
- n && t(n), o(null);
3617
- }
3618
- })
3619
- ]
3544
+ children: [/* @__PURE__ */ E("div", {
3545
+ className: "chat-list-section",
3546
+ children: [/* @__PURE__ */ T("div", {
3547
+ className: "section-header",
3548
+ children: /* @__PURE__ */ T("span", { children: "Tất cả tin nhắn" })
3549
+ }), s.length > 0 ? s.map((e) => /* @__PURE__ */ T(Sn, {
3550
+ chat: e,
3551
+ onSelectChat: t,
3552
+ onAvatarClick: (e, t) => r({
3553
+ user: e,
3554
+ isOnline: t
3555
+ })
3556
+ }, e.id)) : o.length === 0 ? /* @__PURE__ */ T("div", {
3557
+ className: "empty-chat-list",
3558
+ children: "Không có tin nhắn nào"
3559
+ }) : null]
3560
+ }), n && /* @__PURE__ */ T(on, {
3561
+ user: n.user,
3562
+ isOnline: n.isOnline,
3563
+ onClose: () => r(null),
3564
+ onMessage: () => {
3565
+ if (!n) return;
3566
+ let i = e.find((e) => e.type === "single" && e.members?.some((e) => e.id === n.user.id));
3567
+ i && t(i), r(null);
3568
+ }
3569
+ })]
3620
3570
  });
3621
3571
  }, cn = ({ value: e, onChange: t, onAddClick: n, placeholder: r, activeTab: i }) => {
3622
- let { hasGroupChat: a } = _(Ue), { t: o } = Z(), s = o("chatSearchBar.searchPlaceholder");
3572
+ let { hasGroupChat: a } = _(Ge), { t: o } = X(), s = o("chatSearchBar.searchPlaceholder");
3623
3573
  return /* @__PURE__ */ E("div", {
3624
3574
  className: "chat-search-bar",
3625
3575
  children: [/* @__PURE__ */ E("div", {
3626
3576
  className: "search-input-wrapper",
3627
3577
  children: [
3628
- /* @__PURE__ */ T(_t, { className: "search-icon" }),
3578
+ /* @__PURE__ */ T(vt, { className: "search-icon" }),
3629
3579
  /* @__PURE__ */ T("input", {
3630
3580
  type: "text",
3631
3581
  className: "search-input",
@@ -3643,7 +3593,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3643
3593
  className: "action-btn add-group-btn",
3644
3594
  onClick: n,
3645
3595
  title: o("chatSearchBar.createGroup"),
3646
- children: /* @__PURE__ */ T(ct, {})
3596
+ children: /* @__PURE__ */ T(lt, {})
3647
3597
  })]
3648
3598
  });
3649
3599
  }, ln = ({ setIsThemeModalOpen: e, activeTab: t, setActiveTab: n }) => {
@@ -3656,21 +3606,21 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3656
3606
  /* @__PURE__ */ T("div", {
3657
3607
  className: `nav-item ${t === "chats" ? "active" : ""}`,
3658
3608
  onClick: () => n("chats"),
3659
- children: /* @__PURE__ */ T(ht, {})
3609
+ children: /* @__PURE__ */ T(gt, {})
3660
3610
  }),
3661
3611
  /* @__PURE__ */ T("div", {
3662
3612
  className: `nav-item ${t === "contacts" ? "active" : ""}`,
3663
3613
  onClick: () => n("contacts"),
3664
- children: /* @__PURE__ */ T(ct, {})
3614
+ children: /* @__PURE__ */ T(lt, {})
3665
3615
  }),
3666
3616
  /* @__PURE__ */ T("div", { className: "nav-separator" }),
3667
3617
  /* @__PURE__ */ T("div", {
3668
3618
  className: "nav-item",
3669
- children: /* @__PURE__ */ T(gt, {})
3619
+ children: /* @__PURE__ */ T(_t, {})
3670
3620
  }),
3671
3621
  /* @__PURE__ */ T("div", {
3672
3622
  className: "nav-item",
3673
- children: /* @__PURE__ */ T(_t, {})
3623
+ children: /* @__PURE__ */ T(vt, {})
3674
3624
  })
3675
3625
  ]
3676
3626
  }), /* @__PURE__ */ E("div", {
@@ -3678,21 +3628,15 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3678
3628
  children: [/* @__PURE__ */ T("div", {
3679
3629
  className: "nav-item",
3680
3630
  onClick: () => e(!0),
3681
- children: /* @__PURE__ */ T(vt, {})
3631
+ children: /* @__PURE__ */ T(yt, {})
3682
3632
  }), /* @__PURE__ */ T("div", {
3683
3633
  className: "app-avatar",
3684
- children: r?.avatar ? /* @__PURE__ */ T("img", {
3685
- src: r.avatar,
3686
- alt: r.name
3687
- }) : /* @__PURE__ */ T("div", {
3688
- className: "app-avatar-fallback",
3689
- children: r?.name?.[0].toUpperCase()
3690
- })
3634
+ children: r && /* @__PURE__ */ T($, { member: r })
3691
3635
  })]
3692
3636
  })]
3693
3637
  });
3694
3638
  }, un = ({ onClose: e, onAddMember: t, onUpdateGroup: n, onRemoveMember: r }) => {
3695
- let i = g(), { showToast: a, confirm: o } = Qe(), { currentChatMembers: s, currentChat: l, currentUser: u } = _((e) => e.chat), { allowDeleteChat: d } = _(Ue), [f, m] = p("info"), [h, v] = p(null), [y, b] = p(!1), [x, S] = p(null), [C, D] = p({
3639
+ let i = g(), { showToast: a, confirm: o } = Y(), { currentChatMembers: s, currentChat: c, currentUser: l } = _((e) => e.chat), { allowDeleteChat: u } = _(Ge), [d, f] = p("info"), [m, h] = p(null), [v, y] = p(!1), [b, x] = p(null), [S, C] = p({
3696
3640
  canChangeInfo: !0,
3697
3641
  canPinMessage: !0,
3698
3642
  canCreateNote: !0,
@@ -3701,33 +3645,24 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3701
3645
  approveNewMembers: !1,
3702
3646
  markAdminMessages: !0,
3703
3647
  allowNewMembersReadRecent: !0
3704
- }), k = (e) => {
3705
- D((t) => ({
3648
+ }), D = (e) => {
3649
+ C((t) => ({
3706
3650
  ...t,
3707
3651
  [e]: !t[e]
3708
3652
  }));
3709
- };
3710
- c(() => {
3711
- let e = () => {
3712
- v(null);
3713
- };
3714
- return h !== null && window.addEventListener("click", e), () => {
3715
- window.removeEventListener("click", e);
3716
- };
3717
- }, [h]);
3718
- let A = s.length ?? 0, j = O(l, u?.id, ""), M = s ?? [], ee = async () => {
3719
- if (!x) return;
3720
- let e = l;
3653
+ }, k = s.length ?? 0, A = O(c, l?.id, ""), j = s ?? [], M = async () => {
3654
+ if (!b) return;
3655
+ let e = c;
3721
3656
  if (e) i(V(e));
3722
3657
  else try {
3723
- let e = await G.addChat(x.user.id);
3658
+ let e = await G.addChat(b.user.id);
3724
3659
  e?.data && (i(we(e.data)), i(V(e.data)));
3725
3660
  } catch (e) {
3726
3661
  console.error("Lỗi khi tạo phòng chat mới:", e);
3727
3662
  }
3728
- S(null);
3663
+ x(null);
3729
3664
  };
3730
- return f === "group_management" ? /* @__PURE__ */ E("div", {
3665
+ return d === "group_management" ? /* @__PURE__ */ E("div", {
3731
3666
  className: "side-bar-info-chat group-management-view",
3732
3667
  children: [/* @__PURE__ */ E("div", {
3733
3668
  className: "info-header",
@@ -3735,8 +3670,8 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3735
3670
  className: "header-left",
3736
3671
  children: [/* @__PURE__ */ T("button", {
3737
3672
  className: "back-info-btn",
3738
- onClick: () => m("info"),
3739
- children: /* @__PURE__ */ T(lt, {})
3673
+ onClick: () => f("info"),
3674
+ children: /* @__PURE__ */ T(ut, {})
3740
3675
  }), /* @__PURE__ */ T("h3", {
3741
3676
  className: "header-title",
3742
3677
  children: "Quản lý nhóm"
@@ -3744,7 +3679,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3744
3679
  }), /* @__PURE__ */ T("button", {
3745
3680
  className: "close-info-btn",
3746
3681
  onClick: e,
3747
- children: /* @__PURE__ */ T($, {})
3682
+ children: /* @__PURE__ */ T(Q, {})
3748
3683
  })]
3749
3684
  }), /* @__PURE__ */ E("div", {
3750
3685
  className: "info-content-scroll",
@@ -3759,46 +3694,46 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3759
3694
  children: [
3760
3695
  /* @__PURE__ */ E("div", {
3761
3696
  className: "setting-item",
3762
- onClick: () => k("canChangeInfo"),
3697
+ onClick: () => D("canChangeInfo"),
3763
3698
  children: [/* @__PURE__ */ T("span", { children: "Thay đổi tên & ảnh đại diện của nhóm" }), /* @__PURE__ */ T("input", {
3764
3699
  type: "checkbox",
3765
- checked: C.canChangeInfo,
3700
+ checked: S.canChangeInfo,
3766
3701
  readOnly: !0
3767
3702
  })]
3768
3703
  }),
3769
3704
  /* @__PURE__ */ E("div", {
3770
3705
  className: "setting-item",
3771
- onClick: () => k("canPinMessage"),
3706
+ onClick: () => D("canPinMessage"),
3772
3707
  children: [/* @__PURE__ */ T("span", { children: "Ghim tin nhắn, ghi chú, bình chọn lên đầu hội thoại" }), /* @__PURE__ */ T("input", {
3773
3708
  type: "checkbox",
3774
- checked: C.canPinMessage,
3709
+ checked: S.canPinMessage,
3775
3710
  readOnly: !0
3776
3711
  })]
3777
3712
  }),
3778
3713
  /* @__PURE__ */ E("div", {
3779
3714
  className: "setting-item",
3780
- onClick: () => k("canCreateNote"),
3715
+ onClick: () => D("canCreateNote"),
3781
3716
  children: [/* @__PURE__ */ T("span", { children: "Tạo mới ghi chú, nhắc hẹn" }), /* @__PURE__ */ T("input", {
3782
3717
  type: "checkbox",
3783
- checked: C.canCreateNote,
3718
+ checked: S.canCreateNote,
3784
3719
  readOnly: !0
3785
3720
  })]
3786
3721
  }),
3787
3722
  /* @__PURE__ */ E("div", {
3788
3723
  className: "setting-item",
3789
- onClick: () => k("canCreatePoll"),
3724
+ onClick: () => D("canCreatePoll"),
3790
3725
  children: [/* @__PURE__ */ T("span", { children: "Tạo mới bình chọn" }), /* @__PURE__ */ T("input", {
3791
3726
  type: "checkbox",
3792
- checked: C.canCreatePoll,
3727
+ checked: S.canCreatePoll,
3793
3728
  readOnly: !0
3794
3729
  })]
3795
3730
  }),
3796
3731
  /* @__PURE__ */ E("div", {
3797
3732
  className: "setting-item",
3798
- onClick: () => k("canSendMessage"),
3733
+ onClick: () => D("canSendMessage"),
3799
3734
  children: [/* @__PURE__ */ T("span", { children: "Gửi tin nhắn" }), /* @__PURE__ */ T("input", {
3800
3735
  type: "checkbox",
3801
- checked: C.canSendMessage,
3736
+ checked: S.canSendMessage,
3802
3737
  readOnly: !0
3803
3738
  })]
3804
3739
  })
@@ -3814,13 +3749,13 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3814
3749
  className: "setting-item-switch",
3815
3750
  children: [/* @__PURE__ */ E("div", {
3816
3751
  className: "setting-info",
3817
- children: [/* @__PURE__ */ T("span", { children: "Chế độ phê duyệt thành viên mới" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
3752
+ children: [/* @__PURE__ */ T("span", { children: "Chế độ phê duyệt thành viên mới" }), /* @__PURE__ */ T(bt, { className: "help-icon" })]
3818
3753
  }), /* @__PURE__ */ E("label", {
3819
3754
  className: "switch",
3820
3755
  children: [/* @__PURE__ */ T("input", {
3821
3756
  type: "checkbox",
3822
- checked: C.approveNewMembers,
3823
- onChange: () => k("approveNewMembers")
3757
+ checked: S.approveNewMembers,
3758
+ onChange: () => D("approveNewMembers")
3824
3759
  }), /* @__PURE__ */ T("span", { className: "slider round" })]
3825
3760
  })]
3826
3761
  }),
@@ -3828,13 +3763,13 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3828
3763
  className: "setting-item-switch",
3829
3764
  children: [/* @__PURE__ */ E("div", {
3830
3765
  className: "setting-info",
3831
- children: [/* @__PURE__ */ T("span", { children: "Đánh dấu tin nhắn từ trưởng/phó nhóm" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
3766
+ children: [/* @__PURE__ */ T("span", { children: "Đánh dấu tin nhắn từ trưởng/phó nhóm" }), /* @__PURE__ */ T(bt, { className: "help-icon" })]
3832
3767
  }), /* @__PURE__ */ E("label", {
3833
3768
  className: "switch",
3834
3769
  children: [/* @__PURE__ */ T("input", {
3835
3770
  type: "checkbox",
3836
- checked: C.markAdminMessages,
3837
- onChange: () => k("markAdminMessages")
3771
+ checked: S.markAdminMessages,
3772
+ onChange: () => D("markAdminMessages")
3838
3773
  }), /* @__PURE__ */ T("span", { className: "slider round" })]
3839
3774
  })]
3840
3775
  }),
@@ -3842,13 +3777,13 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3842
3777
  className: "setting-item-switch",
3843
3778
  children: [/* @__PURE__ */ E("div", {
3844
3779
  className: "setting-info",
3845
- children: [/* @__PURE__ */ T("span", { children: "Cho phép thành viên mới đọc tin nhắn gần nhất" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
3780
+ children: [/* @__PURE__ */ T("span", { children: "Cho phép thành viên mới đọc tin nhắn gần nhất" }), /* @__PURE__ */ T(bt, { className: "help-icon" })]
3846
3781
  }), /* @__PURE__ */ E("label", {
3847
3782
  className: "switch",
3848
3783
  children: [/* @__PURE__ */ T("input", {
3849
3784
  type: "checkbox",
3850
- checked: C.allowNewMembersReadRecent,
3851
- onChange: () => k("allowNewMembersReadRecent")
3785
+ checked: S.allowNewMembersReadRecent,
3786
+ onChange: () => D("allowNewMembersReadRecent")
3852
3787
  }), /* @__PURE__ */ T("span", { className: "slider round" })]
3853
3788
  })]
3854
3789
  })
@@ -3863,13 +3798,13 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3863
3798
  className: "menu-item",
3864
3799
  children: /* @__PURE__ */ E("div", {
3865
3800
  className: "menu-left",
3866
- children: [/* @__PURE__ */ T(bt, {}), /* @__PURE__ */ T("span", { children: "Chặn khỏi nhóm" })]
3801
+ children: [/* @__PURE__ */ T(xt, {}), /* @__PURE__ */ T("span", { children: "Chặn khỏi nhóm" })]
3867
3802
  })
3868
3803
  }), /* @__PURE__ */ T("div", {
3869
3804
  className: "menu-item",
3870
3805
  children: /* @__PURE__ */ E("div", {
3871
3806
  className: "menu-left",
3872
- children: [/* @__PURE__ */ T(xt, {}), /* @__PURE__ */ T("span", { children: "Trưởng & phó nhóm" })]
3807
+ children: [/* @__PURE__ */ T(St, {}), /* @__PURE__ */ T("span", { children: "Trưởng & phó nhóm" })]
3873
3808
  })
3874
3809
  })]
3875
3810
  })
@@ -3884,39 +3819,36 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3884
3819
  children: /* @__PURE__ */ T("button", {
3885
3820
  className: "close-info-btn",
3886
3821
  onClick: e,
3887
- children: /* @__PURE__ */ T($, {})
3822
+ children: /* @__PURE__ */ T(Q, {})
3888
3823
  })
3889
3824
  }),
3890
- l && /* @__PURE__ */ E("div", {
3825
+ c && /* @__PURE__ */ E("div", {
3891
3826
  className: "info-content-scroll",
3892
3827
  children: [
3893
3828
  /* @__PURE__ */ E("div", {
3894
3829
  className: "info-basic-section",
3895
3830
  children: [/* @__PURE__ */ T("div", {
3896
3831
  className: "info-avatar-large",
3897
- children: /* @__PURE__ */ T(Gt, {
3898
- chat: l,
3899
- currentUserId: u?.id
3900
- })
3832
+ children: /* @__PURE__ */ T($, { member: c.type === "single" ? c.members?.find((e) => e.id !== l?.id) ?? c : c })
3901
3833
  }), /* @__PURE__ */ E("div", {
3902
3834
  className: "info-main-details",
3903
3835
  children: [/* @__PURE__ */ E("h3", {
3904
3836
  className: "info-chat-name",
3905
- children: [j, /* @__PURE__ */ T("span", {
3837
+ children: [A, /* @__PURE__ */ T("span", {
3906
3838
  className: "info-status-icons",
3907
- children: l.type === "group" && /* @__PURE__ */ T(St, { onClick: (e) => {
3908
- e.stopPropagation(), n && n(l);
3839
+ children: c.type === "group" && /* @__PURE__ */ T(Ct, { onClick: (e) => {
3840
+ e.stopPropagation(), n && n(c);
3909
3841
  } })
3910
3842
  })]
3911
3843
  }), /* @__PURE__ */ T("p", {
3912
3844
  className: "info-member-count",
3913
- children: l.type === "group" ? `Thành viên (${A})` : s.find((e) => e.id !== u?.id)?.socket_ids?.length ? "Đang hoạt động" : "Không hoạt động"
3845
+ children: c.type === "group" ? `Thành viên (${k})` : s.find((e) => e.id !== l?.id)?.socket_ids?.length ? "Đang hoạt động" : "Không hoạt động"
3914
3846
  })]
3915
3847
  })]
3916
3848
  }),
3917
3849
  /* @__PURE__ */ T("div", {
3918
3850
  className: "info-quick-actions",
3919
- children: l.type === "group" ? /* @__PURE__ */ T("div", {
3851
+ children: c.type === "group" ? /* @__PURE__ */ T("div", {
3920
3852
  className: "action-item",
3921
3853
  onClick: t,
3922
3854
  children: /* @__PURE__ */ E("div", {
@@ -3952,57 +3884,57 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3952
3884
  })
3953
3885
  }) : /* @__PURE__ */ T(w, {})
3954
3886
  }),
3955
- l.type === "group" && null,
3956
- l.type === "group" && /* @__PURE__ */ E("div", {
3887
+ c.type === "group" && null,
3888
+ c.type === "group" && /* @__PURE__ */ E("div", {
3957
3889
  className: "info-members-section",
3958
3890
  children: [/* @__PURE__ */ E("div", {
3959
3891
  className: "section-title-row",
3960
3892
  children: [/* @__PURE__ */ E("span", { children: [
3961
3893
  "Thành viên (",
3962
- A,
3894
+ k,
3963
3895
  ")"
3964
3896
  ] }), /* @__PURE__ */ E("div", {
3965
3897
  className: "title-actions",
3966
- children: [/* @__PURE__ */ T(Ct, {
3898
+ children: [/* @__PURE__ */ T(wt, {
3967
3899
  size: 16,
3968
3900
  onClick: t
3969
- }), /* @__PURE__ */ T(wt, {
3970
- className: `arrow-icon ${y ? "collapsed" : ""}`,
3971
- onClick: () => b(!y)
3901
+ }), /* @__PURE__ */ T(Tt, {
3902
+ className: `arrow-icon ${v ? "collapsed" : ""}`,
3903
+ onClick: () => y(!v)
3972
3904
  })]
3973
3905
  })]
3974
- }), y ? /* @__PURE__ */ E("div", {
3906
+ }), v ? /* @__PURE__ */ E("div", {
3975
3907
  className: "members-facepile",
3976
- children: [M.slice(0, 8).map((e) => /* @__PURE__ */ E("div", {
3908
+ children: [j.slice(0, 8).map((e) => /* @__PURE__ */ E("div", {
3977
3909
  className: "facepile-item",
3978
- children: [/* @__PURE__ */ T(qt, { member: e }), (e.id === u?.id || (e.socket_ids?.length ?? 0) > 0) && /* @__PURE__ */ T("div", { className: "online-status" })]
3979
- }, e.id)), M.length > 8 && /* @__PURE__ */ E("div", {
3910
+ children: [/* @__PURE__ */ T($, { member: e }), (e.id === l?.id || (e.socket_ids?.length ?? 0) > 0) && /* @__PURE__ */ T("div", { className: "online-status" })]
3911
+ }, e.id)), j.length > 8 && /* @__PURE__ */ E("div", {
3980
3912
  className: "facepile-more",
3981
- children: ["+", M.length - 8]
3913
+ children: ["+", j.length - 8]
3982
3914
  })]
3983
3915
  }) : /* @__PURE__ */ T("div", {
3984
3916
  className: "members-compact-list",
3985
- children: M.map((e) => {
3986
- let t = l.owner_id === e.id, n = e.id === u?.id || e.socket_ids && e.socket_ids.length > 0;
3917
+ children: j.map((e) => {
3918
+ let t = c.owner_id === e.id, n = e.id === l?.id || e.socket_ids && e.socket_ids.length > 0;
3987
3919
  return /* @__PURE__ */ E("div", {
3988
3920
  className: "member-compact-item",
3989
3921
  children: [/* @__PURE__ */ E("div", {
3990
3922
  className: "member-item-left clickable",
3991
- onClick: () => S({
3923
+ onClick: () => x({
3992
3924
  user: e,
3993
3925
  isOnline: n ?? !1
3994
3926
  }),
3995
3927
  children: [/* @__PURE__ */ E("div", {
3996
3928
  className: "member-avatar-small",
3997
- children: [/* @__PURE__ */ T(qt, { member: e }), n && /* @__PURE__ */ T("div", { className: "online-status" })]
3929
+ children: [/* @__PURE__ */ T($, { member: e }), n && /* @__PURE__ */ T("div", { className: "online-status" })]
3998
3930
  }), /* @__PURE__ */ E("div", {
3999
3931
  className: "member-info",
4000
3932
  children: [/* @__PURE__ */ E("div", {
4001
3933
  className: "member-name-row",
4002
3934
  children: [/* @__PURE__ */ T("span", {
4003
3935
  className: "member-name",
4004
- children: e.id === u?.id ? "Bạn" : e.name
4005
- }), t && /* @__PURE__ */ T(at, {})]
3936
+ children: e.id === l?.id ? "Bạn" : e.name
3937
+ }), t && /* @__PURE__ */ T(ot, {})]
4006
3938
  }), /* @__PURE__ */ T("span", {
4007
3939
  className: "member-role",
4008
3940
  children: t ? "Trưởng nhóm" : "Thành viên"
@@ -4012,20 +3944,23 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4012
3944
  className: "member-item-right",
4013
3945
  children: /* @__PURE__ */ E("div", {
4014
3946
  className: "member-options-container",
3947
+ onBlur: (e) => {
3948
+ e.currentTarget.contains(e.relatedTarget) || h(null);
3949
+ },
4015
3950
  children: [/* @__PURE__ */ T("button", {
4016
3951
  className: "member-options-btn",
4017
3952
  onClick: (t) => {
4018
- t.stopPropagation(), v(h === e.id ? null : e.id);
3953
+ t.stopPropagation(), h(m === e.id ? null : e.id);
4019
3954
  },
4020
- children: /* @__PURE__ */ T(Tt, {})
4021
- }), h === e.id && /* @__PURE__ */ T("div", {
3955
+ children: /* @__PURE__ */ T(Et, {})
3956
+ }), m === e.id && /* @__PURE__ */ T("div", {
4022
3957
  className: "member-dropdown-menu",
4023
3958
  children: !t && /* @__PURE__ */ E("button", {
4024
3959
  className: "dropdown-item delete",
4025
3960
  onClick: (t) => {
4026
- t.stopPropagation(), r && r(l.id, e.id), v(null);
3961
+ t.stopPropagation(), r && r(c.id, e.id), h(null);
4027
3962
  },
4028
- children: [/* @__PURE__ */ T(bt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá khỏi nhóm" })]
3963
+ children: [/* @__PURE__ */ T(xt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá khỏi nhóm" })]
4029
3964
  })
4030
3965
  })]
4031
3966
  })
@@ -4034,23 +3969,23 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4034
3969
  })
4035
3970
  })]
4036
3971
  }),
4037
- d && /* @__PURE__ */ E("button", {
3972
+ u && /* @__PURE__ */ E("button", {
4038
3973
  className: "info-panel-clear-history",
4039
3974
  onClick: void 0,
4040
- children: [/* @__PURE__ */ T(zt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá lịch sử trò chuyện" })]
3975
+ children: [/* @__PURE__ */ T(Bt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá lịch sử trò chuyện" })]
4041
3976
  })
4042
3977
  ]
4043
3978
  }),
4044
- x && /* @__PURE__ */ T(on, {
4045
- user: x.user,
4046
- isOnline: x.isOnline,
4047
- onClose: () => S(null),
4048
- onMessage: () => void ee()
3979
+ b && /* @__PURE__ */ T(on, {
3980
+ user: b.user,
3981
+ isOnline: b.isOnline,
3982
+ onClose: () => x(null),
3983
+ onMessage: () => void M()
4049
3984
  })
4050
3985
  ]
4051
3986
  });
4052
3987
  }, dn = ({ mode: e, title: t, logoUrl: n, onToggleMode: r, onClose: i }) => {
4053
- let { t: a, toggleChangeLanguage: o } = Z(), { hasMultipleLanguages: s } = _(Ue), c = t ?? a("chatHeader.defaultTitle");
3988
+ let { t: a, toggleChangeLanguage: o } = X(), { hasMultipleLanguages: s } = _(Ge), c = t ?? a("chatHeader.defaultTitle");
4054
3989
  return /* @__PURE__ */ E("div", {
4055
3990
  className: `chat-header ${e}`,
4056
3991
  children: [/* @__PURE__ */ E("div", {
@@ -4060,7 +3995,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4060
3995
  children: n ? /* @__PURE__ */ T("img", {
4061
3996
  src: n,
4062
3997
  alt: "Logo"
4063
- }) : /* @__PURE__ */ T(ot, { size: 22 })
3998
+ }) : /* @__PURE__ */ T(st, { size: 22 })
4064
3999
  }), /* @__PURE__ */ E("div", {
4065
4000
  className: "header-info-text",
4066
4001
  children: [
@@ -4085,64 +4020,64 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4085
4020
  className: "action-btn",
4086
4021
  onClick: o,
4087
4022
  title: a("chatHeader.language"),
4088
- children: /* @__PURE__ */ T(Ht, { size: 16 })
4023
+ children: /* @__PURE__ */ T(Ut, { size: 16 })
4089
4024
  }),
4090
4025
  /* @__PURE__ */ T("button", {
4091
4026
  className: "action-btn",
4092
4027
  onClick: i,
4093
4028
  title: a("chatHeader.minimize"),
4094
- children: /* @__PURE__ */ T(Et, { size: 16 })
4029
+ children: /* @__PURE__ */ T(Dt, { size: 16 })
4095
4030
  }),
4096
4031
  /* @__PURE__ */ T("button", {
4097
4032
  className: "action-btn",
4098
4033
  onClick: r,
4099
4034
  title: a(e === "fullpage" ? "chatHeader.minimize" : "chatHeader.maximize"),
4100
- children: T(e === "fullpage" ? Ot : Dt, {})
4035
+ children: T(e === "fullpage" ? kt : Ot, {})
4101
4036
  }),
4102
4037
  /* @__PURE__ */ T("button", {
4103
4038
  className: "action-btn close-btn",
4104
4039
  onClick: i,
4105
4040
  title: a("chatHeader.close"),
4106
- children: /* @__PURE__ */ T($, { size: 14 })
4041
+ children: /* @__PURE__ */ T(Q, { size: 14 })
4107
4042
  })
4108
4043
  ]
4109
4044
  })]
4110
4045
  });
4111
4046
  }, fn = r((e, t) => {
4112
- let { t: n } = Z(), r = g(), { currentChat: i, replyingMessage: o } = _((e) => e.chat), { hasVoice: s, hasAttachment: u, hasMultipleAttachments: d, acceptFilter: m, isFileTypeAllowed: h } = _(Ue), [v, y] = p(""), [b, x] = p(!1), [S, C] = p(!1), [D, O] = p([]), [k, A] = p(!1), [j, M] = Ze(), [ee, te] = p(!1), { showToast: N } = Qe(), P = f(null), re = f(null), ie = f(null), I = f(/* @__PURE__ */ new Map()), R = (e) => {
4047
+ let { t: n } = X(), r = g(), { currentChat: i, replyingMessage: o } = _((e) => e.chat), { hasVoice: s, hasAttachment: u, hasMultipleAttachments: d, acceptFilter: m, isFileTypeAllowed: h } = _(Ge), [v, y] = p(""), [b, x] = p(!1), [S, C] = p(!1), [D, O] = p([]), [k, A] = p(!1), [j, M] = $e(), [ee, N] = p(!1), { showToast: P } = Y(), F = f(null), ne = f(null), I = f(null), L = f(/* @__PURE__ */ new Map()), ie = (e) => {
4113
4048
  y((t) => t + e), x(!1);
4114
- }, z = async () => {
4049
+ }, se = async () => {
4115
4050
  await M.startRecording();
4116
4051
  }, de = async () => {
4117
- te(!0);
4052
+ N(!0);
4118
4053
  try {
4119
4054
  await M.stopRecording();
4120
4055
  } finally {
4121
- te(!1);
4056
+ N(!1);
4122
4057
  }
4123
4058
  }, fe = () => {
4124
4059
  j.recordedFile && (O((e) => [...e, j.recordedFile]), M.clearRecording());
4125
4060
  }, pe = (e) => {
4126
4061
  let t = `${e.name}-${e.size}`;
4127
- I.current.has(t) && clearTimeout(I.current.get(t));
4062
+ L.current.has(t) && clearTimeout(L.current.get(t));
4128
4063
  let n = setTimeout(() => {
4129
- O((e) => e.filter((e) => e.errorId !== t)), I.current.delete(t);
4064
+ O((e) => e.filter((e) => e.errorId !== t)), L.current.delete(t);
4130
4065
  }, 5e3);
4131
- return I.current.set(t, n), t;
4066
+ return L.current.set(t, n), t;
4132
4067
  }, me = (e) => {
4133
4068
  if (!e?.length) return;
4134
4069
  if (!u) {
4135
- N("Tính năng đính kèm file chưa được kích hoạt.", "warning");
4070
+ P("Tính năng đính kèm file chưa được kích hoạt.", "warning");
4136
4071
  return;
4137
4072
  }
4138
4073
  let t = Array.from(e).filter(h);
4139
4074
  if (t.length === 0) {
4140
- N("Loại file không được phép.", "error");
4075
+ P("Loại file không được phép.", "error");
4141
4076
  return;
4142
4077
  }
4143
- let n = ue([...D, ...t], d, h);
4078
+ let n = B([...D, ...t], d, h);
4144
4079
  if (n) {
4145
- N(n.message, n.type);
4080
+ P(n.message, n.type);
4146
4081
  return;
4147
4082
  }
4148
4083
  let r = t.map((e) => {
@@ -4172,17 +4107,17 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4172
4107
  e.currentTarget.value = "", C(!1);
4173
4108
  };
4174
4109
  if (!u) {
4175
- N("Tính năng đính kèm file chưa được kích hoạt.", "warning"), n();
4110
+ P("Tính năng đính kèm file chưa được kích hoạt.", "warning"), n();
4176
4111
  return;
4177
4112
  }
4178
4113
  let r = Array.from(t).filter(h);
4179
4114
  if (r.length === 0) {
4180
- N("Loại file được chọn không được phép.", "error"), n();
4115
+ P("Loại file được chọn không được phép.", "error"), n();
4181
4116
  return;
4182
4117
  }
4183
- let i = ue([...D, ...r], d, h);
4118
+ let i = B([...D, ...r], d, h);
4184
4119
  if (i) {
4185
- N(i.message, i.type), n();
4120
+ P(i.message, i.type), n();
4186
4121
  return;
4187
4122
  }
4188
4123
  let a = r.map((e) => {
@@ -4197,24 +4132,24 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4197
4132
  }, ge = a((e) => {
4198
4133
  O((t) => t.filter((t, n) => n !== e));
4199
4134
  }, []), _e = a(() => {
4200
- P.current?.click();
4135
+ F.current?.click();
4201
4136
  }, []);
4202
4137
  c(() => {
4203
4138
  if (!S) return;
4204
4139
  let e = (e) => {
4205
- re.current && !re.current.contains(e.target) && C(!1);
4140
+ ne.current && !ne.current.contains(e.target) && C(!1);
4206
4141
  };
4207
4142
  return document.addEventListener("click", e), () => {
4208
4143
  document.removeEventListener("click", e);
4209
4144
  };
4210
4145
  }, [S]), c(() => {
4211
- k || ie.current?.focus();
4146
+ k || I.current?.focus();
4212
4147
  }, [k]);
4213
- let ve = async (e, t) => {
4148
+ let H = async (e, t) => {
4214
4149
  if (i && !(!e && (!t || t.length === 0))) {
4215
4150
  A(!0);
4216
4151
  try {
4217
- let n = le(t ?? []), a = await Promise.all(n.map(async (e) => await B(e))), { data: s } = await G.addMessage(i.id, e, a, o?.id);
4152
+ let n = z(t ?? []), a = await Promise.all(n.map(async (e) => await ue(e))), { data: s } = await G.addMessage(i.id, e, a, o?.id);
4218
4153
  r(Se({
4219
4154
  chat: i,
4220
4155
  message: s
@@ -4225,19 +4160,19 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4225
4160
  A(!1);
4226
4161
  }
4227
4162
  }
4228
- }, H = () => {
4163
+ }, ve = () => {
4229
4164
  let e = v.trim();
4230
4165
  if (!e && D.length === 0) return;
4231
- let t = ue(D, d, h);
4166
+ let t = B(D, d, h);
4232
4167
  if (t) {
4233
- N(t.message, t.type);
4168
+ P(t.message, t.type);
4234
4169
  return;
4235
4170
  }
4236
- ve(e, D);
4171
+ H(e, D);
4237
4172
  }, ye = (e) => {
4238
- e.key === "Enter" && H();
4173
+ e.key === "Enter" && ve();
4239
4174
  }, be = (e) => {
4240
- let t = ie.current?.getRootNode(), n = t?.getElementById ? t.getElementById(`chat-message-${e}`) : document.getElementById(`chat-message-${e}`);
4175
+ let t = I.current?.getRootNode(), n = t?.getElementById ? t.getElementById(`chat-message-${e}`) : document.getElementById(`chat-message-${e}`);
4241
4176
  n ? (n.scrollIntoView({
4242
4177
  behavior: "smooth",
4243
4178
  block: "center"
@@ -4249,18 +4184,18 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4249
4184
  D.length > 0 && /* @__PURE__ */ T("div", {
4250
4185
  className: "selected-files-list",
4251
4186
  children: D.map((e, t) => {
4252
- let r = e.isError, i = ce(e);
4187
+ let r = e.isError, i = le(e);
4253
4188
  return /* @__PURE__ */ E("div", {
4254
4189
  className: `selected-file-item ${i ? "image-file" : "other-file"} ${r ? "error-file-item" : ""}`,
4255
4190
  children: [i ? /* @__PURE__ */ T("img", {
4256
- src: se(e),
4191
+ src: ce(e),
4257
4192
  alt: e.name,
4258
4193
  className: "file-preview-image"
4259
4194
  }) : /* @__PURE__ */ E("div", {
4260
4195
  className: "file-content-wrapper",
4261
4196
  children: [/* @__PURE__ */ T("span", {
4262
4197
  className: "file-icon",
4263
- children: L(e.name)
4198
+ children: R(e.name)
4264
4199
  }), /* @__PURE__ */ E("div", {
4265
4200
  className: "file-info",
4266
4201
  children: [/* @__PURE__ */ T("span", {
@@ -4308,7 +4243,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4308
4243
  }),
4309
4244
  /* @__PURE__ */ T("div", {
4310
4245
  className: "reply-icon",
4311
- children: /* @__PURE__ */ T(kt, {})
4246
+ children: /* @__PURE__ */ T(At, {})
4312
4247
  })
4313
4248
  ]
4314
4249
  }),
@@ -4324,7 +4259,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4324
4259
  })]
4325
4260
  }), /* @__PURE__ */ T("span", {
4326
4261
  className: "recording-duration",
4327
- children: ne(j.duration)
4262
+ children: te(j.duration)
4328
4263
  })]
4329
4264
  }), /* @__PURE__ */ E("div", {
4330
4265
  className: "voice-recording-controls",
@@ -4359,7 +4294,7 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4359
4294
  }),
4360
4295
  /* @__PURE__ */ T("span", {
4361
4296
  className: "voice-duration",
4362
- children: ne(j.duration)
4297
+ children: te(j.duration)
4363
4298
  })
4364
4299
  ]
4365
4300
  }), /* @__PURE__ */ E("div", {
@@ -4391,14 +4326,14 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4391
4326
  children: [
4392
4327
  b && /* @__PURE__ */ T("div", {
4393
4328
  className: "emoji-picker",
4394
- children: F.map((e) => /* @__PURE__ */ T("button", {
4329
+ children: re.map((e) => /* @__PURE__ */ T("button", {
4395
4330
  className: "emoji-btn",
4396
- onClick: () => R(e),
4331
+ onClick: () => ie(e),
4397
4332
  children: e
4398
4333
  }, e))
4399
4334
  }),
4400
4335
  /* @__PURE__ */ T("input", {
4401
- ref: P,
4336
+ ref: F,
4402
4337
  type: "file",
4403
4338
  multiple: !0,
4404
4339
  onChange: V,
@@ -4413,35 +4348,35 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4413
4348
  onClick: () => _e(),
4414
4349
  title: n("chatInput.selectFiles"),
4415
4350
  disabled: k,
4416
- children: /* @__PURE__ */ T(At, {})
4351
+ children: /* @__PURE__ */ T(jt, {})
4417
4352
  }),
4418
4353
  u && /* @__PURE__ */ T("button", {
4419
4354
  className: "action-btn",
4420
4355
  onClick: () => _e(),
4421
4356
  title: n("chatInput.selectFiles"),
4422
4357
  disabled: k,
4423
- children: /* @__PURE__ */ T(jt, {})
4358
+ children: /* @__PURE__ */ T(Mt, {})
4424
4359
  }),
4425
4360
  s && /* @__PURE__ */ T("button", {
4426
4361
  className: "action-btn",
4427
- onClick: () => void z(),
4362
+ onClick: () => void se(),
4428
4363
  title: n("chatInput.recordVoice"),
4429
4364
  disabled: k,
4430
- children: /* @__PURE__ */ T(Mt, {})
4365
+ children: /* @__PURE__ */ T(Nt, {})
4431
4366
  }),
4432
4367
  /* @__PURE__ */ T("button", {
4433
4368
  className: `action-btn ${b ? "active" : ""}`,
4434
4369
  onClick: () => x(!b),
4435
4370
  title: "emoji",
4436
4371
  disabled: k,
4437
- children: /* @__PURE__ */ T(Nt, {})
4372
+ children: /* @__PURE__ */ T(Pt, {})
4438
4373
  })
4439
4374
  ]
4440
4375
  }),
4441
4376
  /* @__PURE__ */ T("div", {
4442
4377
  className: "chat-input-container",
4443
4378
  children: /* @__PURE__ */ T("input", {
4444
- ref: ie,
4379
+ ref: I,
4445
4380
  type: "text",
4446
4381
  className: "chat-input",
4447
4382
  placeholder: n("chatInput.placeholder"),
@@ -4454,9 +4389,9 @@ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4454
4389
  }),
4455
4390
  /* @__PURE__ */ T("button", {
4456
4391
  className: "send-btn",
4457
- onClick: H,
4392
+ onClick: ve,
4458
4393
  disabled: k || !v.trim() && D.length === 0,
4459
- children: k ? "⏳" : /* @__PURE__ */ T(Pt, {})
4394
+ children: k ? "⏳" : /* @__PURE__ */ T(Ft, {})
4460
4395
  })
4461
4396
  ]
4462
4397
  })
@@ -4468,11 +4403,11 @@ fn.displayName = "ChatInput";
4468
4403
  var pn = [{
4469
4404
  label: "A-Z",
4470
4405
  value: "asc",
4471
- icon: /* @__PURE__ */ T(Ft, {})
4406
+ icon: /* @__PURE__ */ T(It, {})
4472
4407
  }, {
4473
4408
  label: "Z-A",
4474
4409
  value: "desc",
4475
- icon: /* @__PURE__ */ T(It, {})
4410
+ icon: /* @__PURE__ */ T(Lt, {})
4476
4411
  }], mn = [
4477
4412
  {
4478
4413
  label: "Tất cả",
@@ -4487,7 +4422,7 @@ var pn = [{
4487
4422
  value: "offline"
4488
4423
  }
4489
4424
  ], hn = ({ onMessageClick: e }) => {
4490
- let [t, n] = p(""), [r, i] = p("asc"), [a, o] = p(!1), [s, c] = p("all"), [l, u] = p(!1), { members: f } = _((e) => e.chat), m = d(() => {
4425
+ let [t, n] = p(""), [r, i] = p("asc"), [a, o] = p(!1), [s, c] = p("all"), [l, u] = p(!1), { members: f } = _((e) => e.chat), [m, h] = p(null), g = d(() => {
4491
4426
  let e = f.filter((e) => e.name.toLowerCase().includes(t.toLowerCase()));
4492
4427
  return s === "online" ? e = e.filter((e) => (e.socket_ids?.length ?? 0) > 0) : s === "offline" && (e = e.filter((e) => (e.socket_ids?.length ?? 0) === 0)), [...e].sort((e, t) => {
4493
4428
  let n = e.name.localeCompare(t.name);
@@ -4498,26 +4433,26 @@ var pn = [{
4498
4433
  t,
4499
4434
  r,
4500
4435
  s
4501
- ]), h = d(() => {
4436
+ ]), v = d(() => {
4502
4437
  let e = /* @__PURE__ */ new Set();
4503
- m.forEach((t) => {
4438
+ g.forEach((t) => {
4504
4439
  t.name && e.add(t.name.charAt(0).toUpperCase());
4505
4440
  });
4506
4441
  let t = Array.from(e);
4507
4442
  return r === "asc" ? t.sort((e, t) => e.localeCompare(t)) : t.sort((e, t) => t.localeCompare(e));
4508
- }, [m, r]);
4443
+ }, [g, r]);
4509
4444
  return /* @__PURE__ */ E("div", {
4510
4445
  className: "contact-list-view",
4511
4446
  children: [
4512
4447
  /* @__PURE__ */ T("div", {
4513
4448
  className: "contact-list-header",
4514
- children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(ct, {}), /* @__PURE__ */ T("div", { children: "Danh sách thành viên" })] })
4449
+ children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(lt, {}), /* @__PURE__ */ T("div", { children: "Danh sách thành viên" })] })
4515
4450
  }),
4516
4451
  /* @__PURE__ */ E("div", {
4517
4452
  className: "contact-list-toolbar",
4518
4453
  children: [/* @__PURE__ */ E("div", {
4519
4454
  className: "toolbar-search",
4520
- children: [/* @__PURE__ */ T(_t, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
4455
+ children: [/* @__PURE__ */ T(vt, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
4521
4456
  type: "text",
4522
4457
  placeholder: "Tìm bạn",
4523
4458
  value: t,
@@ -4532,7 +4467,7 @@ var pn = [{
4532
4467
  },
4533
4468
  children: [
4534
4469
  /* @__PURE__ */ T("span", { children: r === "asc" ? "Tên (A-Z)" : "Tên (Z-A)" }),
4535
- /* @__PURE__ */ T(wt, {}),
4470
+ /* @__PURE__ */ T(Tt, {}),
4536
4471
  a && /* @__PURE__ */ T("div", {
4537
4472
  className: "dropdown-select",
4538
4473
  children: pn.map((e) => /* @__PURE__ */ E("div", {
@@ -4551,7 +4486,7 @@ var pn = [{
4551
4486
  },
4552
4487
  children: [
4553
4488
  /* @__PURE__ */ T("span", { children: mn.find((e) => e.value === s)?.label }),
4554
- /* @__PURE__ */ T(wt, {}),
4489
+ /* @__PURE__ */ T(Tt, {}),
4555
4490
  l && /* @__PURE__ */ T("div", {
4556
4491
  className: "dropdown-select",
4557
4492
  children: mn.map((e) => /* @__PURE__ */ T("div", {
@@ -4568,8 +4503,8 @@ var pn = [{
4568
4503
  }),
4569
4504
  /* @__PURE__ */ T("div", {
4570
4505
  className: "contact-scroll-area",
4571
- children: h.map((t) => {
4572
- let n = m.filter((e) => e.name.charAt(0).toUpperCase() === t);
4506
+ children: v.map((t) => {
4507
+ let n = g.filter((e) => e.name.charAt(0).toUpperCase() === t);
4573
4508
  return /* @__PURE__ */ E("div", {
4574
4509
  className: "contact-letter-group",
4575
4510
  children: [/* @__PURE__ */ T("div", {
@@ -4602,21 +4537,28 @@ var pn = [{
4602
4537
  className: "contact-item-actions",
4603
4538
  children: [/* @__PURE__ */ T("button", {
4604
4539
  className: "contact-action-btn",
4605
- children: /* @__PURE__ */ T(st, { size: 16 })
4540
+ onClick: () => h(t),
4541
+ children: /* @__PURE__ */ T(ct, { size: 16 })
4606
4542
  }), /* @__PURE__ */ T("button", {
4607
4543
  className: "contact-action-btn",
4608
4544
  onClick: () => e(String(t.id)),
4609
- children: /* @__PURE__ */ T(mt, { size: 16 })
4545
+ children: /* @__PURE__ */ T(ht, { size: 16 })
4610
4546
  })]
4611
4547
  })]
4612
4548
  }, t.id))]
4613
4549
  }, t);
4614
4550
  })
4551
+ }),
4552
+ m && /* @__PURE__ */ T(on, {
4553
+ user: m,
4554
+ isOnline: (m.socket_ids?.length ?? 0) > 0,
4555
+ onClose: () => h(null),
4556
+ onMessage: () => void e(String(m.id))
4615
4557
  })
4616
4558
  ]
4617
4559
  });
4618
- }, gn = ({ groups: e, onGroupClick: t, currentUserId: n }) => {
4619
- let [r, i] = p(""), a = d(() => e.filter((e) => e.name?.toLowerCase().includes(r.toLowerCase())), [e, r]);
4560
+ }, gn = ({ groups: e, onGroupClick: t }) => {
4561
+ let [n, r] = p(""), i = d(() => e.filter((e) => e.name?.toLowerCase().includes(n.toLowerCase())), [e, n]);
4620
4562
  return /* @__PURE__ */ E("div", {
4621
4563
  className: "contact-list-view",
4622
4564
  children: [
@@ -4628,7 +4570,7 @@ var pn = [{
4628
4570
  alignItems: "center",
4629
4571
  gap: "8px"
4630
4572
  },
4631
- children: [/* @__PURE__ */ T(ct, {}), /* @__PURE__ */ T("div", { children: "Danh sách nhóm và cộng đồng" })]
4573
+ children: [/* @__PURE__ */ T(lt, {}), /* @__PURE__ */ T("div", { children: "Danh sách nhóm và cộng đồng" })]
4632
4574
  })
4633
4575
  }),
4634
4576
  /* @__PURE__ */ T("div", {
@@ -4637,11 +4579,11 @@ var pn = [{
4637
4579
  children: /* @__PURE__ */ E("div", {
4638
4580
  className: "toolbar-search",
4639
4581
  style: { flex: 1 },
4640
- children: [/* @__PURE__ */ T(_t, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
4582
+ children: [/* @__PURE__ */ T(vt, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
4641
4583
  type: "text",
4642
4584
  placeholder: "Tìm nhóm",
4643
- value: r,
4644
- onChange: (e) => i(e.target.value)
4585
+ value: n,
4586
+ onChange: (e) => r(e.target.value)
4645
4587
  })]
4646
4588
  })
4647
4589
  }),
@@ -4650,7 +4592,7 @@ var pn = [{
4650
4592
  children: /* @__PURE__ */ T("div", {
4651
4593
  className: "contact-letter-group",
4652
4594
  style: { marginTop: "0" },
4653
- children: a.map((e) => /* @__PURE__ */ T("div", {
4595
+ children: i.map((e) => /* @__PURE__ */ T("div", {
4654
4596
  className: "contact-item-row",
4655
4597
  style: { cursor: "pointer" },
4656
4598
  onClick: () => t(e),
@@ -4658,10 +4600,7 @@ var pn = [{
4658
4600
  className: "contact-item-left",
4659
4601
  children: [/* @__PURE__ */ T("div", {
4660
4602
  className: "contact-avatar",
4661
- children: /* @__PURE__ */ T(Gt, {
4662
- chat: e,
4663
- currentUserId: n
4664
- })
4603
+ children: /* @__PURE__ */ T($, { member: e })
4665
4604
  }), /* @__PURE__ */ E("div", {
4666
4605
  className: "contact-info",
4667
4606
  children: [/* @__PURE__ */ T("div", {
@@ -4700,7 +4639,7 @@ var pn = [{
4700
4639
  });
4701
4640
  }, vn = ({ file: e }) => /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("span", {
4702
4641
  className: "file-icon",
4703
- children: L(e.ext)
4642
+ children: R(e.ext)
4704
4643
  }), /* @__PURE__ */ E("div", {
4705
4644
  className: "file-info",
4706
4645
  children: [/* @__PURE__ */ T("div", {
@@ -4711,10 +4650,10 @@ var pn = [{
4711
4650
  children: oe(e.size)
4712
4651
  })]
4713
4652
  })] }), yn = ({ files: e }) => {
4714
- let { openViewer: t } = Ye();
4653
+ let { openViewer: t } = Ze();
4715
4654
  if (!e || e.length === 0) return null;
4716
4655
  let n = e.filter((e) => {
4717
- let t = z(e.name);
4656
+ let t = se(e.name);
4718
4657
  return [
4719
4658
  "image",
4720
4659
  "video",
@@ -4725,7 +4664,7 @@ var pn = [{
4725
4664
  let r = e.findIndex((e) => e.id === n);
4726
4665
  r !== -1 && t(e, r);
4727
4666
  }, s = (e) => {
4728
- switch (z(e.name)) {
4667
+ switch (se(e.name)) {
4729
4668
  case "image": return r.includes(e) ? /* @__PURE__ */ E(_n, {
4730
4669
  file: e,
4731
4670
  className: "file-image-wrapper",
@@ -4777,17 +4716,17 @@ var pn = [{
4777
4716
  className: "message-files",
4778
4717
  children: e.map((e) => s(e))
4779
4718
  });
4780
- }, bn = ({ message: e }) => {
4781
- let { currentUser: t, currentChat: n, currentChatMessages: r } = _((e) => e.chat), { allowDeleteMessage: i, allowRevokeMessage: a } = _(Ue), o = g(), { t: s } = Z(), { showToast: c } = Qe(), l = e.member.code === t?.code, [u, f] = p(!1), m = new Date(e.created_at).toLocaleTimeString([], {
4719
+ }, bn = ({ message: e, onHandleClick: t }) => {
4720
+ let { currentUser: n, currentChat: r, currentChatMessages: i } = _((e) => e.chat), { allowDeleteMessage: a, allowRevokeMessage: o } = _(Ge), s = g(), { t: c } = X(), { showToast: l } = Y(), u = e.member.code === n?.code, [f, m] = p(!1), h = new Date(e.created_at).toLocaleTimeString([], {
4782
4721
  hour: "2-digit",
4783
4722
  minute: "2-digit"
4784
- }), h = async (t) => {
4785
- if (n) try {
4786
- await G.actionMessage(n.id, e.id, t);
4723
+ }), v = async (t) => {
4724
+ if (r) try {
4725
+ await G.actionMessage(r.id, e.id, t);
4787
4726
  } catch (e) {
4788
- console.error("Lỗi khi tương tác tin nhắn:", e), c("Thao tác không thành công, vui lòng thử lại!", "error");
4727
+ console.error("Lỗi khi tương tác tin nhắn:", e), l("Thao tác không thành công, vui lòng thử lại!", "error");
4789
4728
  }
4790
- }, v = (e, t) => {
4729
+ }, y = (e, t) => {
4791
4730
  e.stopPropagation();
4792
4731
  let n = e.currentTarget.getRootNode(), r = n.getElementById ? n.getElementById(`chat-message-${t}`) : document.getElementById(`chat-message-${t}`);
4793
4732
  r && r.scrollIntoView({
@@ -4796,10 +4735,10 @@ var pn = [{
4796
4735
  }), r?.classList.add("highlight-message"), setTimeout(() => {
4797
4736
  r?.classList.remove("highlight-message");
4798
4737
  }, 2e3);
4799
- }, y = d(() => r.find((e) => e.member.code === t?.code)?.id, [r, t?.code]), b = d(() => n?.members ? Math.max(...n.members.filter((e) => e.id !== t?.id).map((e) => e.last_read_id ?? 0)) : 0, [n, t?.id]), x = l && e.id === b && b > 0, S = l && e.id === y && e.id > b;
4738
+ }, b = d(() => i.find((e) => e.member.code === n?.code)?.id, [i, n?.code]), x = d(() => r?.members ? Math.max(...r.members.filter((e) => e.id !== n?.id).map((e) => e.last_read_id ?? 0)) : 0, [r, n?.id]), S = u && e.id === x && x > 0, C = u && e.id === b && e.id > x;
4800
4739
  return e.removed ? null : e.revoked ? /* @__PURE__ */ E("div", {
4801
- className: `message-item ${l ? "current-user" : "other-user"}`,
4802
- children: [!l && e.member.avatar && /* @__PURE__ */ T("img", {
4740
+ className: `message-item ${u ? "current-user" : "other-user"}`,
4741
+ children: [!u && e.member.avatar && /* @__PURE__ */ T("img", {
4803
4742
  src: e.member.avatar,
4804
4743
  alt: e.member.name,
4805
4744
  className: "message-avatar",
@@ -4807,26 +4746,28 @@ var pn = [{
4807
4746
  }), /* @__PURE__ */ T("div", {
4808
4747
  className: "message-content",
4809
4748
  children: /* @__PURE__ */ T("div", {
4810
- className: `message-bubble ${l ? "current-user" : "other-user"} revoked`,
4749
+ className: `message-bubble ${u ? "current-user" : "other-user"} revoked`,
4811
4750
  children: /* @__PURE__ */ T("div", {
4812
4751
  className: "message-text",
4813
- children: s("chatMessage.states.revoked")
4752
+ children: c("chatMessage.states.revoked")
4814
4753
  })
4815
4754
  })
4816
4755
  })]
4817
4756
  }) : /* @__PURE__ */ E("div", {
4818
4757
  id: `chat-message-${e.id}`,
4819
- className: `message-item ${l ? "current-user" : "other-user"}`,
4820
- children: [!l && e.member.avatar && /* @__PURE__ */ T("img", {
4758
+ className: `message-item ${u ? "current-user" : "other-user"}`,
4759
+ children: [!u && e.member.avatar && /* @__PURE__ */ T("img", {
4821
4760
  src: e.member.avatar,
4822
4761
  alt: e.member.name,
4823
4762
  className: "message-avatar",
4824
- title: e.member.name
4763
+ title: e.member.name,
4764
+ onClick: () => t(e.member)
4825
4765
  }), /* @__PURE__ */ E("div", {
4826
4766
  className: "message-content",
4827
4767
  children: [
4828
- !l && /* @__PURE__ */ T("div", {
4768
+ !u && /* @__PURE__ */ T("div", {
4829
4769
  className: "message-member-name",
4770
+ onClick: () => t(e.member),
4830
4771
  children: e.member.name
4831
4772
  }),
4832
4773
  /* @__PURE__ */ E("div", {
@@ -4834,84 +4775,84 @@ var pn = [{
4834
4775
  children: [
4835
4776
  /* @__PURE__ */ T("div", {
4836
4777
  className: "message-actions-bar",
4837
- children: l ? /* @__PURE__ */ E(w, { children: [
4838
- /* @__PURE__ */ T("button", {
4839
- className: "action-icon",
4840
- title: s("chatMessage.actions.like"),
4841
- onClick: () => void h("like"),
4842
- children: /* @__PURE__ */ T(Lt, {})
4843
- }),
4778
+ children: u ? /* @__PURE__ */ E(w, { children: [
4844
4779
  /* @__PURE__ */ T("button", {
4845
4780
  className: "action-icon",
4846
- title: s("chatMessage.actions.love"),
4847
- onClick: () => void h("love"),
4781
+ title: c("chatMessage.actions.like"),
4782
+ onClick: () => void v("like"),
4848
4783
  children: /* @__PURE__ */ T(Rt, {})
4849
4784
  }),
4850
4785
  /* @__PURE__ */ T("button", {
4851
4786
  className: "action-icon",
4852
- title: s("chatMessage.actions.reply"),
4853
- onClick: () => o(ke(e)),
4854
- children: /* @__PURE__ */ T(kt, {})
4787
+ title: c("chatMessage.actions.love"),
4788
+ onClick: () => void v("love"),
4789
+ children: /* @__PURE__ */ T(zt, {})
4855
4790
  }),
4856
- i(e.created_at) && /* @__PURE__ */ T("button", {
4791
+ /* @__PURE__ */ T("button", {
4857
4792
  className: "action-icon",
4858
- title: s("chatMessage.actions.delete"),
4859
- onClick: () => void h("remove"),
4860
- children: /* @__PURE__ */ T(zt, {})
4793
+ title: c("chatMessage.actions.reply"),
4794
+ onClick: () => s(ke(e)),
4795
+ children: /* @__PURE__ */ T(At, {})
4861
4796
  }),
4862
4797
  a(e.created_at) && /* @__PURE__ */ T("button", {
4863
4798
  className: "action-icon",
4864
- title: s("chatMessage.actions.revoke"),
4865
- onClick: () => void h("revoke"),
4799
+ title: c("chatMessage.actions.delete"),
4800
+ onClick: () => void v("remove"),
4866
4801
  children: /* @__PURE__ */ T(Bt, {})
4802
+ }),
4803
+ o(e.created_at) && /* @__PURE__ */ T("button", {
4804
+ className: "action-icon",
4805
+ title: c("chatMessage.actions.revoke"),
4806
+ onClick: () => void v("revoke"),
4807
+ children: /* @__PURE__ */ T(Vt, {})
4867
4808
  })
4868
4809
  ] }) : /* @__PURE__ */ E(w, { children: [
4869
4810
  /* @__PURE__ */ T("button", {
4870
4811
  className: "action-icon",
4871
- title: s("chatMessage.actions.reply"),
4872
- onClick: () => o(ke(e)),
4873
- children: /* @__PURE__ */ T(kt, {})
4812
+ title: c("chatMessage.actions.reply"),
4813
+ onClick: () => s(ke(e)),
4814
+ children: /* @__PURE__ */ T(At, {})
4874
4815
  }),
4875
4816
  /* @__PURE__ */ T("button", {
4876
4817
  className: "action-icon",
4877
- title: s("chatMessage.actions.like"),
4878
- onClick: () => void h("like"),
4879
- children: /* @__PURE__ */ T(Lt, {})
4818
+ title: c("chatMessage.actions.like"),
4819
+ onClick: () => void v("like"),
4820
+ children: /* @__PURE__ */ T(Rt, {})
4880
4821
  }),
4881
4822
  /* @__PURE__ */ T("button", {
4882
4823
  className: "action-icon",
4883
- title: s("chatMessage.actions.love"),
4884
- onClick: () => void h("love"),
4885
- children: /* @__PURE__ */ T(Rt, {})
4824
+ title: c("chatMessage.actions.love"),
4825
+ onClick: () => void v("love"),
4826
+ children: /* @__PURE__ */ T(zt, {})
4886
4827
  })
4887
4828
  ] })
4888
4829
  }),
4889
4830
  e.content || e.reply ? /* @__PURE__ */ E("div", {
4890
- className: `message-bubble ${l ? "current-user" : "other-user"}`,
4831
+ className: `message-bubble ${u ? "current-user" : "other-user"}`,
4891
4832
  children: [e.reply && /* @__PURE__ */ E("div", {
4892
4833
  className: "message-reply-preview",
4893
- onClick: (t) => v(t, e.reply.id),
4834
+ onClick: (t) => y(t, e.reply.id),
4894
4835
  children: [/* @__PURE__ */ T("div", {
4895
4836
  className: "reply-user-name",
4896
4837
  children: e.reply.member.name
4897
4838
  }), /* @__PURE__ */ T("div", {
4898
4839
  className: "reply-content-text",
4899
- children: e.reply.content ?? (e.reply.files?.length ? s("chatMessage.states.attachment") : "")
4840
+ children: e.reply.content ?? (e.reply.files?.length ? c("chatMessage.states.attachment") : "")
4900
4841
  })]
4901
4842
  }), e.content && /* @__PURE__ */ T("div", {
4902
4843
  className: "message-text",
4903
- children: e.content.length > 500 && !u ? /* @__PURE__ */ E(w, { children: [
4844
+ children: e.content.length > 500 && !f ? /* @__PURE__ */ E(w, { children: [
4904
4845
  e.content.substring(0, 500),
4905
4846
  "...",
4906
4847
  /* @__PURE__ */ T("span", {
4907
4848
  className: "see-more-btn",
4908
- onClick: () => f(!0),
4909
- children: s("chatMessage.actions.seeMore")
4849
+ onClick: () => m(!0),
4850
+ children: c("chatMessage.actions.seeMore")
4910
4851
  })
4911
4852
  ] }) : /* @__PURE__ */ E(w, { children: [e.content, e.content.length > 500 && /* @__PURE__ */ T("span", {
4912
4853
  className: "see-more-btn",
4913
- onClick: () => f(!1),
4914
- children: s("chatMessage.actions.seeLess")
4854
+ onClick: () => m(!1),
4855
+ children: c("chatMessage.actions.seeLess")
4915
4856
  })] })
4916
4857
  })]
4917
4858
  }) : null,
@@ -4924,25 +4865,25 @@ var pn = [{
4924
4865
  }),
4925
4866
  /* @__PURE__ */ E("div", {
4926
4867
  className: "message-time",
4927
- children: [m, l && (x || S) && /* @__PURE__ */ T("span", {
4928
- className: `message-item-status ${x ? "seen" : ""}`,
4929
- children: x ? /* @__PURE__ */ T(Vt, {}) : `• ${s("chatMessage.status.sent")}`
4868
+ children: [h, u && (S || C) && /* @__PURE__ */ T("span", {
4869
+ className: `message-item-status ${S ? "seen" : ""}`,
4870
+ children: S ? /* @__PURE__ */ T(Ht, {}) : `• ${c("chatMessage.status.sent")}`
4930
4871
  })]
4931
4872
  })
4932
4873
  ]
4933
4874
  })]
4934
4875
  });
4935
4876
  }, xn = () => {
4936
- let { currentChat: t, currentChatMessages: n, messagesPagination: r, currentUser: i } = _((e) => e.chat), o = g(), s = f(null), l = f(null), u = f(null), [d, m] = p(!1), [h, v] = p(!1), [y, b] = p(!1), x = f(null), S = f(!1);
4877
+ let { currentChat: t, currentChatMessages: n, messagesPagination: r, currentUser: i } = _((e) => e.chat), o = g(), s = f(null), l = f(null), u = f(null), { chats: d } = _((e) => e.chat), [m, h] = p(!1), [v, y] = p(!1), [b, x] = p(!1), [S, C] = p(null), w = f(null), D = f(!1);
4937
4878
  c(() => {
4938
4879
  (async () => {
4939
- if (t && x.current !== Number(t.id)) {
4940
- x.current = Number(t.id);
4880
+ if (t && w.current !== Number(t.id)) {
4881
+ w.current = Number(t.id);
4941
4882
  try {
4942
4883
  let e = G.getMessages(t.id, 20, 1), n = t.type === "group" ? G.getMembers(t.id).then((e) => e.data ?? []) : Promise.resolve(t.members ?? []), [r, i] = await Promise.all([e, n]);
4943
4884
  r?.data && (o(ge(r.data)), o(be(r.pagination)), o(_e(i)));
4944
4885
  } catch (e) {
4945
- console.error("Lỗi khi tải tin nhắn:", e), x.current = null;
4886
+ console.error("Lỗi khi tải tin nhắn:", e), w.current = null;
4946
4887
  }
4947
4888
  }
4948
4889
  })();
@@ -4961,20 +4902,20 @@ var pn = [{
4961
4902
  i?.code,
4962
4903
  i?.id
4963
4904
  ]);
4964
- let C = async (e) => {
4905
+ let O = async (e) => {
4965
4906
  let n = e.currentTarget, i = Math.abs(n.scrollTop);
4966
- if (v(i > 300), i < 10 && b(!1), Math.abs(n.scrollTop) + n.clientHeight >= n.scrollHeight - 1 && !d && !S.current && r && r.current_page < r.total_pages) {
4967
- S.current = !0, m(!0);
4907
+ if (y(i > 300), i < 10 && x(!1), Math.abs(n.scrollTop) + n.clientHeight >= n.scrollHeight - 1 && !m && !D.current && r && r.current_page < r.total_pages) {
4908
+ D.current = !0, h(!0);
4968
4909
  try {
4969
4910
  let e = r.current_page + 1, n = await G.getMessages(Number(t?.id), 20, e);
4970
4911
  n.data && (o(xe(n.data)), o(be(n.pagination)));
4971
4912
  } catch (e) {
4972
4913
  console.error("Load more error", e);
4973
4914
  } finally {
4974
- m(!1), S.current = !1;
4915
+ h(!1), D.current = !1;
4975
4916
  }
4976
4917
  }
4977
- }, w = a(() => {
4918
+ }, k = a(() => {
4978
4919
  let e = s.current;
4979
4920
  e && requestAnimationFrame(() => {
4980
4921
  let t = 1e3, n = e.scrollTop, r = null, i = (a) => {
@@ -4985,39 +4926,116 @@ var pn = [{
4985
4926
  requestAnimationFrame(i);
4986
4927
  });
4987
4928
  }, []);
4988
- return c(() => {
4929
+ c(() => {
4989
4930
  if (!t) return;
4990
4931
  let e = t.id !== l.current, r = n[0]?.id, i = r !== u.current;
4991
- e ? (w(), b(!1)) : i && (Math.abs(s.current?.scrollTop ?? 0) < 100 ? w() : b(!0)), l.current = t?.id ?? null, u.current = r ?? null;
4932
+ e ? (k(), x(!1)) : i && (Math.abs(s.current?.scrollTop ?? 0) < 100 ? k() : x(!0)), l.current = t?.id ?? null, u.current = r ?? null;
4992
4933
  }, [
4993
4934
  n,
4994
4935
  t,
4995
- w
4996
- ]), /* @__PURE__ */ E("div", {
4936
+ k
4937
+ ]);
4938
+ let A = (e) => {
4939
+ C(e);
4940
+ }, j = () => {
4941
+ if (!S) return;
4942
+ let e = d.find((e) => e.type === "single" && e.members?.some((e) => e.id === S.id));
4943
+ e && o(V(e)), C(null);
4944
+ };
4945
+ return /* @__PURE__ */ E("div", {
4997
4946
  className: "message-list-wrapper",
4998
- children: [/* @__PURE__ */ T("div", {
4999
- className: "message-list",
5000
- ref: s,
5001
- onScroll: (e) => void C(e),
5002
- children: n.map((t, r) => {
5003
- let i = new Date(t.created_at).toDateString(), a = n[r + 1], o = i !== (a ? new Date(a.created_at).toDateString() : null);
5004
- return /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(bn, { message: t }), o && /* @__PURE__ */ T("div", {
5005
- className: "chat-date-divider",
5006
- children: /* @__PURE__ */ T("span", { children: N(t.created_at) })
5007
- })] }, t.id);
4947
+ children: [
4948
+ /* @__PURE__ */ T("div", {
4949
+ className: "message-list",
4950
+ ref: s,
4951
+ onScroll: (e) => void O(e),
4952
+ children: n.map((t, r) => {
4953
+ let i = new Date(t.created_at).toDateString(), a = n[r + 1], o = i !== (a ? new Date(a.created_at).toDateString() : null);
4954
+ return /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(bn, {
4955
+ message: t,
4956
+ onHandleClick: A
4957
+ }), o && /* @__PURE__ */ T("div", {
4958
+ className: "chat-date-divider",
4959
+ children: /* @__PURE__ */ T("span", { children: P(t.created_at) })
4960
+ })] }, t.id);
4961
+ })
4962
+ }),
4963
+ v && /* @__PURE__ */ E("button", {
4964
+ className: "scroll-bottom-btn",
4965
+ onClick: () => k(),
4966
+ children: ["↓", b && /* @__PURE__ */ T("span", { className: "unread-dot" })]
4967
+ }),
4968
+ S && /* @__PURE__ */ T(on, {
4969
+ user: S,
4970
+ isOnline: (S.socket_ids?.length ?? 0) > 0,
4971
+ onClose: () => C(null),
4972
+ onMessage: () => void j()
5008
4973
  })
5009
- }), h && /* @__PURE__ */ E("button", {
5010
- className: "scroll-bottom-btn",
5011
- onClick: () => w(),
5012
- children: ["↓", y && /* @__PURE__ */ T("span", { className: "unread-dot" })]
4974
+ ]
4975
+ });
4976
+ }, Sn = ({ chat: e, onSelectChat: t, onAvatarClick: n }) => {
4977
+ let { currentUser: r, members: i, currentChat: a } = _((e) => e.chat), { t: o } = X(), s = (e) => e ? new Date(e).toLocaleTimeString([], {
4978
+ hour: "2-digit",
4979
+ minute: "2-digit"
4980
+ }) : "", c = e.message?.member.id === r?.id, l = r?.id && e.new?.[r.id] ? e.new[r.id] : 0, u = e.type === "single" ? e.members?.find((e) => e.id !== r?.id) : null, d = !!u && i.some((e) => e.id === u.id && (e.socket_ids?.length ?? 0) > 0);
4981
+ return /* @__PURE__ */ E("div", {
4982
+ className: `chat-item ${a?.id === e.id ? "active" : ""} `,
4983
+ onClick: () => t(e),
4984
+ children: [/* @__PURE__ */ E("div", {
4985
+ className: "chat-item-avatar",
4986
+ style: {
4987
+ position: "relative",
4988
+ background: e.avatar ? "transparent" : void 0,
4989
+ cursor: e.type === "single" ? "pointer" : "default"
4990
+ },
4991
+ onClick: (t) => {
4992
+ t.stopPropagation(), e.type === "single" && u && n(u, d);
4993
+ },
4994
+ children: [/* @__PURE__ */ T($, { member: e.type === "single" && u ? u : e }), e.type === "single" && d && /* @__PURE__ */ T(at, {
4995
+ size: 12,
4996
+ className: "online-indicator"
4997
+ })]
4998
+ }), /* @__PURE__ */ E("div", {
4999
+ className: "chat-item-info",
5000
+ children: [/* @__PURE__ */ E("div", {
5001
+ className: "info-top-row",
5002
+ children: [/* @__PURE__ */ T("div", {
5003
+ className: "chat-item-name",
5004
+ children: /* @__PURE__ */ T("span", {
5005
+ className: "name-text",
5006
+ children: O(e, r?.id)
5007
+ })
5008
+ }), /* @__PURE__ */ T("span", {
5009
+ className: "chat-item-time",
5010
+ children: s(e.message?.created_at ?? e.updated_at)
5011
+ })]
5012
+ }), /* @__PURE__ */ E("div", {
5013
+ className: "info-bottom-row",
5014
+ children: [/* @__PURE__ */ T("div", {
5015
+ className: "chat-item-last",
5016
+ children: /* @__PURE__ */ E("span", {
5017
+ className: "last-message-text",
5018
+ children: [c && `${o("chatList.yourMessage")}`, e.message?.content ?? (e.message?.files?.length ? o("chatMessage.states.attachment") : "")]
5019
+ })
5020
+ }), /* @__PURE__ */ E("div", {
5021
+ className: "info-bottom-right",
5022
+ children: [e.is_muted && /* @__PURE__ */ T(dt, {
5023
+ size: 14,
5024
+ className: "mute-icon-list"
5025
+ }), l > 0 && /* @__PURE__ */ T("div", {
5026
+ className: "unread-badge-circle",
5027
+ children: l > 99 ? "99+" : l
5028
+ })]
5029
+ })]
5030
+ })]
5013
5031
  })]
5014
5032
  });
5015
5033
  };
5016
5034
  //#endregion
5017
5035
  //#region src/index.ts
5018
- function Sn(e) {
5036
+ function Cn(e) {
5019
5037
  let t = document.createElement("div");
5020
- t.id = "chatbot-widget-umd-root", document.body.appendChild(t), m(t).render(n(nt, e));
5038
+ t.id = "chatbot-widget-umd-root", document.body.appendChild(t), m(t).render(n(rt, e));
5021
5039
  }
5022
5040
  //#endregion
5023
- export { nt as ChatWidget, Sn as init };
5041
+ export { rt as ChatWidget, Cn as init };