@satek-team-intern/chatbot-widget 0.10.2 → 0.10.4
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.
- package/README.md +1 -1
- package/dist/chatbot-widget.es.js +821 -1040
- package/dist/chatbot-widget.umd.js +13 -10
- package/dist/src/assets/Icons.d.ts +1 -1
- package/dist/src/components/modals/AddMember.d.ts +0 -7
- package/dist/src/components/sidebar/AppSideBar.d.ts +1 -3
- package/dist/src/components/sidebar/ChatInfoPanel.d.ts +1 -2
- package/dist/src/components/sidebar/ChatList.d.ts +0 -1
- package/dist/src/components/view/ChatInput.d.ts +1 -5
- package/dist/src/components/view/ContactList.d.ts +0 -2
- package/dist/src/hooks/useChat.d.ts +1 -1
- package/dist/src/types/types.d.ts +3 -3
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/validate.utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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}.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:2px;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:20px;margin-left:auto;padding:6px 14px;font-size:13px;font-weight:700;transition:all .2s}.member-item:hover .member-add-action{transform:scale(1.05);color:#fff!important;background:#6366f1!important}@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}.chat-window.fullpage .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}.chat-window.fullpage .app-nav{flex-direction:column;flex:1;gap:16px;display:flex}.chat-window.fullpage .nav-item{color:#64748b;cursor:pointer;border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;display:flex}.chat-window.fullpage .nav-item:hover{background:var(--active-item-bg);color:var(--primary)}.chat-window.fullpage .nav-item.active{background:var(--primary);color:var(--primary-contrast)}.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 .nav-separator{opacity:.8;background:#98a8b3;width:40px;height:1px;margin:4px 0}.chat-window.fullpage .app-sidebar-footer{flex-direction:column;align-items:center;gap:20px;padding-bottom:8px;display:flex}.chat-window.fullpage .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}.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}.send-btn{cursor:pointer;color:#fff;width:36px;height:36px;box-shadow:none;background:#8aaeff;border:none;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s;display:flex}.send-btn:hover:not(:disabled){background:#7096ff;transform:translateY(-1px)}.send-btn:disabled{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}.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{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:10px;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}@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:50%;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}\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:1;padding:0 20px 20px;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}.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;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}\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}\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;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([
|
|
11
11
|
"pdf",
|
|
12
12
|
"doc",
|
|
13
13
|
"docx",
|
|
@@ -23,12 +23,12 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
23
23
|
"tar",
|
|
24
24
|
"gz",
|
|
25
25
|
"json"
|
|
26
|
-
]),
|
|
26
|
+
]), A = {
|
|
27
27
|
"attachment:image": "image/*",
|
|
28
28
|
"attachment:video": "video/*",
|
|
29
29
|
"attachment:audio": "audio/*",
|
|
30
30
|
"attachment:file": Array.from(k).map((e) => `.${e}`).join(",")
|
|
31
|
-
},
|
|
31
|
+
}, j = (e) => {
|
|
32
32
|
let { attachments: t, communication: n, chatModes: r, customizations: i } = e, a = new Set(t ?? []), o = new Set(n ?? []), s = new Set(r ?? []), c = new Set(i ?? []);
|
|
33
33
|
return {
|
|
34
34
|
featureSet: {
|
|
@@ -44,14 +44,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
44
44
|
hasChangeColor: c.has("change-color"),
|
|
45
45
|
hasMultipleLanguages: c.has("multi-language")
|
|
46
46
|
};
|
|
47
|
-
},
|
|
47
|
+
}, M = (e) => Object.keys(A).filter((t) => e.attachments.has(t)).map((e) => A[e]).join(","), ee = (e) => (t) => {
|
|
48
48
|
let n = t.type;
|
|
49
49
|
if (n.startsWith("image/")) return e.attachments.has("image");
|
|
50
50
|
if (n.startsWith("video/")) return e.attachments.has("video");
|
|
51
51
|
if (n.startsWith("audio/")) return e.attachments.has("audio");
|
|
52
52
|
let r = t.name.split(".").pop()?.toLowerCase() ?? "";
|
|
53
53
|
return k.has(r), e.attachments.has("file");
|
|
54
|
-
},
|
|
54
|
+
}, te = (e) => {
|
|
55
55
|
if (!e) return !1;
|
|
56
56
|
let t = new Date(e).getTime();
|
|
57
57
|
return Date.now() - t <= 300 * 1e3;
|
|
@@ -83,7 +83,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
83
83
|
let a = n.reduce((e, t) => e + t.length, 0), o = new Uint8Array(a), s = 0;
|
|
84
84
|
for (let e of n) o.set(e, s), s += e.length;
|
|
85
85
|
return new Blob([o], { type: "audio/mp3" });
|
|
86
|
-
}, ie = 25 * 1024 * 1024,
|
|
86
|
+
}, ie = 25 * 1024 * 1024, F = [
|
|
87
87
|
"🙂",
|
|
88
88
|
"😀",
|
|
89
89
|
"😂",
|
|
@@ -102,7 +102,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
102
102
|
"💯",
|
|
103
103
|
"✅",
|
|
104
104
|
"❌"
|
|
105
|
-
],
|
|
105
|
+
], I = {
|
|
106
106
|
pdf: "📄",
|
|
107
107
|
doc: "📄",
|
|
108
108
|
docx: "📄",
|
|
@@ -125,13 +125,13 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
125
125
|
mov: "🎬",
|
|
126
126
|
mkv: "🎬",
|
|
127
127
|
default: "📎"
|
|
128
|
-
},
|
|
129
|
-
if (!
|
|
128
|
+
}, L = (e) => e && I[e.includes(".") ? e.split(".").pop()?.toLowerCase() ?? "" : e.toLowerCase()] || "📎", R = /* @__PURE__ */ new WeakMap(), ae = (e) => {
|
|
129
|
+
if (!R.has(e)) {
|
|
130
130
|
let t = Math.random().toString(36).substring(2, 9);
|
|
131
|
-
|
|
131
|
+
R.set(e, `${e.name}-${e.size}-${t}`);
|
|
132
132
|
}
|
|
133
|
-
return
|
|
134
|
-
},
|
|
133
|
+
return R.get(e);
|
|
134
|
+
}, oe = (e) => {
|
|
135
135
|
if (e === 0) return "0 B";
|
|
136
136
|
let t = 1024, n = [
|
|
137
137
|
"B",
|
|
@@ -140,7 +140,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
140
140
|
"GB"
|
|
141
141
|
], r = Math.floor(Math.log(e) / Math.log(t));
|
|
142
142
|
return Math.round(e / t ** +r * 100) / 100 + " " + n[r];
|
|
143
|
-
},
|
|
143
|
+
}, z = (e) => {
|
|
144
144
|
let t = e.split(".").pop()?.toLowerCase() ?? "";
|
|
145
145
|
return [
|
|
146
146
|
"jpg",
|
|
@@ -163,13 +163,13 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
163
163
|
"ogg",
|
|
164
164
|
"wma"
|
|
165
165
|
].includes(t) ? "audio" : "other";
|
|
166
|
-
},
|
|
166
|
+
}, se = (e) => URL.createObjectURL(e), ce = (e) => e.type.startsWith("image/"), le = (e) => {
|
|
167
167
|
let t = (e) => {
|
|
168
168
|
let t = e.name.toLowerCase().split(".").pop() ?? "";
|
|
169
169
|
return e.type.startsWith("image/") ? 0 : t === "mp4" ? 1 : t === "mp3" ? 2 : 3;
|
|
170
170
|
};
|
|
171
171
|
return [...e].sort((e, n) => t(e) - t(n));
|
|
172
|
-
},
|
|
172
|
+
}, B = (e) => new Promise((t) => {
|
|
173
173
|
if (!e.type.startsWith("image/")) {
|
|
174
174
|
t(e);
|
|
175
175
|
return;
|
|
@@ -197,7 +197,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
197
197
|
}, a, s);
|
|
198
198
|
}, r.onerror = () => t(e), r.src = n.target?.result;
|
|
199
199
|
}, n.onerror = () => t(e), n.readAsDataURL(e);
|
|
200
|
-
}),
|
|
200
|
+
}), ue = (e, t, n) => e.length === 0 ? null : !t && e.length > 1 ? {
|
|
201
201
|
message: "Chỉ cho phép đính kèm tối đa 1 file.",
|
|
202
202
|
type: "warning"
|
|
203
203
|
} : e.length > 20 ? {
|
|
@@ -209,7 +209,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
209
209
|
} : e.every(n) ? null : {
|
|
210
210
|
message: "Vui lòng chỉ chọn các loại file được phép.",
|
|
211
211
|
type: "warning"
|
|
212
|
-
},
|
|
212
|
+
}, de = (e) => {
|
|
213
|
+
try {
|
|
214
|
+
let t = new URL(e);
|
|
215
|
+
return t.protocol === "http:" || t.protocol === "https:";
|
|
216
|
+
} catch {
|
|
217
|
+
return !1;
|
|
218
|
+
}
|
|
219
|
+
}, fe = S({
|
|
213
220
|
name: "widget-chatslice",
|
|
214
221
|
initialState: {
|
|
215
222
|
currentUser: null,
|
|
@@ -240,7 +247,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
240
247
|
},
|
|
241
248
|
setMembers: (e, t) => {
|
|
242
249
|
e.members = t.payload.map((e) => {
|
|
243
|
-
let t =
|
|
250
|
+
let t = te(e.socket_at);
|
|
244
251
|
return {
|
|
245
252
|
...e,
|
|
246
253
|
socket_ids: e.socket_ids ?? (t && e.socket_id ? [e.socket_id] : []),
|
|
@@ -251,7 +258,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
251
258
|
},
|
|
252
259
|
setCurrentChatMembers: (e, t) => {
|
|
253
260
|
e.currentChatMembers = t.payload.map((e) => {
|
|
254
|
-
let t =
|
|
261
|
+
let t = te(e.socket_at);
|
|
255
262
|
return {
|
|
256
263
|
...e,
|
|
257
264
|
socket_ids: e.socket_ids ?? (t && e.socket_id ? [e.socket_id] : []),
|
|
@@ -366,7 +373,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
366
373
|
i && (i[r] = !i[r]), e.currentChat?.id === n && (e.currentChat[r] = !e.currentChat[r]);
|
|
367
374
|
}
|
|
368
375
|
}
|
|
369
|
-
}), { clearAll:
|
|
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 {
|
|
370
377
|
static instance;
|
|
371
378
|
chatSDK = null;
|
|
372
379
|
constructor() {
|
|
@@ -520,7 +527,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
520
527
|
setConfig(e) {
|
|
521
528
|
this.chatSDK && this.chatSDK.setConfig(e);
|
|
522
529
|
}
|
|
523
|
-
}.getInstance(),
|
|
530
|
+
}.getInstance(), Me = {
|
|
524
531
|
common: {
|
|
525
532
|
buttons: {
|
|
526
533
|
save: "Save",
|
|
@@ -653,7 +660,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
653
660
|
updateButton: "Update",
|
|
654
661
|
updatingButton: "Updating..."
|
|
655
662
|
}
|
|
656
|
-
},
|
|
663
|
+
}, K = {
|
|
657
664
|
common: {
|
|
658
665
|
buttons: {
|
|
659
666
|
save: "Lưu",
|
|
@@ -787,14 +794,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
787
794
|
updateButton: "Cập nhật",
|
|
788
795
|
updatingButton: "Đang cập nhật..."
|
|
789
796
|
}
|
|
790
|
-
},
|
|
797
|
+
}, q = class e {
|
|
791
798
|
static instance;
|
|
792
799
|
translations;
|
|
793
800
|
currentLocale;
|
|
794
801
|
constructor() {
|
|
795
802
|
this.currentLocale = "vietnamese", this.translations = {
|
|
796
|
-
vietnamese:
|
|
797
|
-
english:
|
|
803
|
+
vietnamese: K,
|
|
804
|
+
english: Me
|
|
798
805
|
};
|
|
799
806
|
}
|
|
800
807
|
static getInstance() {
|
|
@@ -809,7 +816,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
809
816
|
t(e, t) {
|
|
810
817
|
let n = e.split("."), r = (e) => n.reduce((e, t) => {
|
|
811
818
|
if (e && typeof e == "object") return e[t];
|
|
812
|
-
}, e), i = r(this.translations[this.currentLocale]) ?? r(
|
|
819
|
+
}, e), i = r(this.translations[this.currentLocale]) ?? r(Me);
|
|
813
820
|
if (typeof i != "string") return e;
|
|
814
821
|
let a = i;
|
|
815
822
|
if (t) for (let [e, n] of Object.entries(t)) a = a.replace(RegExp(`{${e}}`, "g"), n);
|
|
@@ -841,17 +848,17 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
841
848
|
e.primaryColor = t.payload, localStorage.setItem("chat-primary-color", e.primaryColor);
|
|
842
849
|
},
|
|
843
850
|
setLanguage: (e, t) => {
|
|
844
|
-
e.currentLanguage = t.payload,
|
|
851
|
+
e.currentLanguage = t.payload, q.locale = t.payload, localStorage.setItem("chat-widget:language", e.currentLanguage);
|
|
845
852
|
}
|
|
846
853
|
}
|
|
847
|
-
}), { setConfig:
|
|
848
|
-
chat:
|
|
849
|
-
setting:
|
|
850
|
-
}),
|
|
851
|
-
reducer: (e, t) => (t.type === "chatSlice/logout" && (e = void 0),
|
|
854
|
+
}), { setConfig: Pe, toggleTheme: J, setFeatures: Y, setPrimaryColor: X, setLanguage: Fe } = Ne.actions, Ie = Ne.reducer, Le = y({
|
|
855
|
+
chat: je,
|
|
856
|
+
setting: Ie
|
|
857
|
+
}), Re = b({
|
|
858
|
+
reducer: (e, t) => (t.type === "chatSlice/logout" && (e = void 0), Le(e, t)),
|
|
852
859
|
middleware: (e) => e({ serializableCheck: { ignoredPaths: ["chat.instance"] } }),
|
|
853
860
|
devTools: { name: "ChatbotWidget" }
|
|
854
|
-
}),
|
|
861
|
+
}), ze = (e) => e.setting.features, Be = (e, t) => {
|
|
855
862
|
let n = {
|
|
856
863
|
minutes: 1e3 * 60,
|
|
857
864
|
hours: 1e3 * 60 * 60,
|
|
@@ -859,35 +866,35 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
859
866
|
};
|
|
860
867
|
return e * (n[t] || n.hours);
|
|
861
868
|
};
|
|
862
|
-
function
|
|
869
|
+
function Ve(e) {
|
|
863
870
|
return (t) => {
|
|
864
|
-
let { allow_delete_message: n, delete_duration: r } =
|
|
871
|
+
let { allow_delete_message: n, delete_duration: r } = G.setting || {};
|
|
865
872
|
if (!n) return !1;
|
|
866
873
|
if (r <= 0) return !0;
|
|
867
874
|
let i = new Date(t).getTime();
|
|
868
875
|
return Date.now() - i <= e;
|
|
869
876
|
};
|
|
870
877
|
}
|
|
871
|
-
function
|
|
878
|
+
function He(e) {
|
|
872
879
|
return (t) => {
|
|
873
|
-
let { allow_revoke_message: n, revoke_duration: r } =
|
|
880
|
+
let { allow_revoke_message: n, revoke_duration: r } = G.setting || {};
|
|
874
881
|
if (!n) return !1;
|
|
875
882
|
if (r <= 0) return !0;
|
|
876
883
|
let i = new Date(t).getTime();
|
|
877
884
|
return Date.now() - i <= e;
|
|
878
885
|
};
|
|
879
886
|
}
|
|
880
|
-
var
|
|
881
|
-
let t =
|
|
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");
|
|
882
889
|
return {
|
|
883
890
|
...t,
|
|
884
|
-
acceptFilter:
|
|
885
|
-
isFileTypeAllowed:
|
|
886
|
-
allowDeleteChat:
|
|
887
|
-
allowDeleteMessage:
|
|
888
|
-
allowRevokeMessage:
|
|
891
|
+
acceptFilter: M(t.featureSet),
|
|
892
|
+
isFileTypeAllowed: ee(t.featureSet),
|
|
893
|
+
allowDeleteChat: G.setting?.allow_delete_chat ?? !1,
|
|
894
|
+
allowDeleteMessage: Ve(n),
|
|
895
|
+
allowRevokeMessage: He(r)
|
|
889
896
|
};
|
|
890
|
-
}),
|
|
897
|
+
}), We = (e, t, n) => {
|
|
891
898
|
let r = g(), i = f(!1), { currentUser: a, chats: o, currentChat: s } = _((e) => e.chat), l = f({
|
|
892
899
|
chats: null,
|
|
893
900
|
currentUser: null,
|
|
@@ -907,11 +914,11 @@ var He = x([Re], (e) => {
|
|
|
907
914
|
(async () => {
|
|
908
915
|
let { code: a, name: o, avatar: s, email: c, phone: l } = t || {};
|
|
909
916
|
if (!(!a || !o || !s || !c || !n || i.current)) try {
|
|
910
|
-
i.current = !0, await
|
|
911
|
-
let t = await
|
|
917
|
+
i.current = !0, await G.init(e, n);
|
|
918
|
+
let t = await G.setAuth({
|
|
912
919
|
code: a,
|
|
913
920
|
name: o,
|
|
914
|
-
avatar: s,
|
|
921
|
+
avatar: de(s) ? s : void 0,
|
|
915
922
|
email: c,
|
|
916
923
|
phone: l
|
|
917
924
|
});
|
|
@@ -919,11 +926,11 @@ var He = x([Re], (e) => {
|
|
|
919
926
|
i.current = !1, console.error("Authentication failed: No user data returned");
|
|
920
927
|
return;
|
|
921
928
|
}
|
|
922
|
-
r(
|
|
923
|
-
let [{ data: u }, { data: d }] = await Promise.all([
|
|
929
|
+
r(me(t)), console.warn("Authenticated as:", t);
|
|
930
|
+
let [{ data: u }, { data: d }] = await Promise.all([G.getMembers(), G.getChats()]);
|
|
924
931
|
r(he(d)), r(ve(u));
|
|
925
932
|
let f = d?.reduce((e, n) => e + (n.new[t.id] ?? 0), 0) ?? 0;
|
|
926
|
-
r(
|
|
933
|
+
r(Ae(f)), console.warn("Total unread messages:", f);
|
|
927
934
|
} catch (e) {
|
|
928
935
|
i.current = !1, console.error("Failed to init chat or authenticate:", e);
|
|
929
936
|
}
|
|
@@ -939,32 +946,32 @@ var He = x([Re], (e) => {
|
|
|
939
946
|
"chats.message": (e) => {
|
|
940
947
|
console.warn("Message Event:", e);
|
|
941
948
|
let { chat: t, message: n, type: i, chat_id: a, message_id: o } = e;
|
|
942
|
-
i === "add" ? r(
|
|
949
|
+
i === "add" ? r(Se({
|
|
943
950
|
chat: t,
|
|
944
951
|
message: n
|
|
945
|
-
})) : i === "remove" || i === "revoke" ? r(
|
|
952
|
+
})) : i === "remove" || i === "revoke" ? r(De({
|
|
946
953
|
chat_id: a,
|
|
947
954
|
message_id: o,
|
|
948
955
|
type: i
|
|
949
|
-
})) : (i === "love" || i === "like") && r(
|
|
956
|
+
})) : (i === "love" || i === "like") && r(Oe({
|
|
950
957
|
chat_id: a,
|
|
951
958
|
message: n
|
|
952
959
|
}));
|
|
953
960
|
},
|
|
954
961
|
"chats.created": (e) => {
|
|
955
|
-
console.warn("Chat Event:", e), r(
|
|
962
|
+
console.warn("Chat Event:", e), r(we(e.chat));
|
|
956
963
|
},
|
|
957
964
|
"chats.updated": (e) => {
|
|
958
|
-
console.warn("Chat Event:", e), r(
|
|
965
|
+
console.warn("Chat Event:", e), r(Te(e.chat));
|
|
959
966
|
},
|
|
960
967
|
"chats.deleted": (e) => {
|
|
961
|
-
l.current.chats && (console.warn("Chat Event:", e), l.current.chats.find((t) => t.id === e.chat_id)?.type === "group" && r(
|
|
968
|
+
l.current.chats && (console.warn("Chat Event:", e), l.current.chats.find((t) => t.id === e.chat_id)?.type === "group" && r(Ce(e.chat_id)));
|
|
962
969
|
},
|
|
963
970
|
"chats.action": (e) => {
|
|
964
971
|
if (console.warn("Chat Event:", e), e.type === "read") {
|
|
965
|
-
e.chat && r(
|
|
972
|
+
e.chat && r(Te(e.chat));
|
|
966
973
|
let t = e.chat?.id ?? e.chat_id, n = e.member_id ?? e.user_id, i = e.message_id ?? e.chat?.message?.id;
|
|
967
|
-
t && n && i && r(
|
|
974
|
+
t && n && i && r(U({
|
|
968
975
|
chatId: Number(t),
|
|
969
976
|
memberId: Number(n),
|
|
970
977
|
lastReadId: Number(i)
|
|
@@ -977,7 +984,7 @@ var He = x([Re], (e) => {
|
|
|
977
984
|
"members.connect"(e) {
|
|
978
985
|
console.warn("Member Connected:", e);
|
|
979
986
|
let { member: t, timestamp: n, socketId: i } = e;
|
|
980
|
-
r(
|
|
987
|
+
r(H({
|
|
981
988
|
member: t,
|
|
982
989
|
timestamp: n,
|
|
983
990
|
socketId: i
|
|
@@ -987,19 +994,23 @@ var He = x([Re], (e) => {
|
|
|
987
994
|
console.warn("Member Disconnected:", e);
|
|
988
995
|
let { socketId: t } = e;
|
|
989
996
|
setTimeout(() => {
|
|
990
|
-
r(
|
|
997
|
+
r(ye(t));
|
|
991
998
|
}, 3e3);
|
|
992
999
|
}
|
|
993
1000
|
};
|
|
994
1001
|
return Object.entries(e).forEach(([e, t]) => {
|
|
995
|
-
|
|
1002
|
+
G.addEventListener(e, t);
|
|
996
1003
|
}), console.warn("Chat event listeners registered"), () => {
|
|
997
1004
|
Object.entries(e).forEach(([e, t]) => {
|
|
998
|
-
|
|
999
|
-
}), console.warn("Chat event listeners removed"), r(
|
|
1005
|
+
G.removeEventListener(e, t);
|
|
1006
|
+
}), console.warn("Chat event listeners removed"), r(pe()), G.clearAuth(), console.warn("Clear auth");
|
|
1000
1007
|
};
|
|
1001
|
-
}, [
|
|
1002
|
-
|
|
1008
|
+
}, [
|
|
1009
|
+
a?.id,
|
|
1010
|
+
n,
|
|
1011
|
+
r
|
|
1012
|
+
]);
|
|
1013
|
+
}, Ge = t(void 0), Ke = ({ children: e }) => {
|
|
1003
1014
|
let [t, n] = p(!1), [r, i] = p([]), [o, s] = p(0), c = {
|
|
1004
1015
|
isOpen: t,
|
|
1005
1016
|
files: r,
|
|
@@ -1011,11 +1022,11 @@ var He = x([Re], (e) => {
|
|
|
1011
1022
|
n(!1);
|
|
1012
1023
|
}, [])
|
|
1013
1024
|
};
|
|
1014
|
-
return /* @__PURE__ */ T(
|
|
1025
|
+
return /* @__PURE__ */ T(Ge.Provider, {
|
|
1015
1026
|
value: c,
|
|
1016
1027
|
children: e
|
|
1017
1028
|
});
|
|
1018
|
-
},
|
|
1029
|
+
}, qe = ({ children: e }) => {
|
|
1019
1030
|
let [t, n] = p([]), r = a((e) => {
|
|
1020
1031
|
n((t) => t.filter((t) => t.id !== e));
|
|
1021
1032
|
}, []), i = a((e, t = "info") => {
|
|
@@ -1040,7 +1051,7 @@ var He = x([Re], (e) => {
|
|
|
1040
1051
|
}
|
|
1041
1052
|
}]);
|
|
1042
1053
|
}), [r]);
|
|
1043
|
-
return /* @__PURE__ */ T(
|
|
1054
|
+
return /* @__PURE__ */ T(Je.Provider, {
|
|
1044
1055
|
value: {
|
|
1045
1056
|
showToast: i,
|
|
1046
1057
|
removeToast: r,
|
|
@@ -1049,11 +1060,11 @@ var He = x([Re], (e) => {
|
|
|
1049
1060
|
},
|
|
1050
1061
|
children: e
|
|
1051
1062
|
});
|
|
1052
|
-
},
|
|
1053
|
-
let e = o(
|
|
1063
|
+
}, Je = t(void 0), Ye = () => {
|
|
1064
|
+
let e = o(Ge);
|
|
1054
1065
|
if (!e) throw Error("useFileViewer must be used within FileViewerProvider");
|
|
1055
1066
|
return e;
|
|
1056
|
-
},
|
|
1067
|
+
}, Xe = ({ onFilesAdded: e }) => {
|
|
1057
1068
|
let [t, n] = p(!1), r = f(0);
|
|
1058
1069
|
return {
|
|
1059
1070
|
isDragOver: t,
|
|
@@ -1072,7 +1083,7 @@ var He = x([Re], (e) => {
|
|
|
1072
1083
|
i && i.length > 0 && e(i);
|
|
1073
1084
|
}, [e])
|
|
1074
1085
|
};
|
|
1075
|
-
},
|
|
1086
|
+
}, Ze = () => {
|
|
1076
1087
|
let [e, t] = p({
|
|
1077
1088
|
isRecording: !1,
|
|
1078
1089
|
duration: 0,
|
|
@@ -1165,41 +1176,41 @@ var He = x([Re], (e) => {
|
|
|
1165
1176
|
_((e) => e.setting.currentLanguage);
|
|
1166
1177
|
let e = g();
|
|
1167
1178
|
return {
|
|
1168
|
-
t:
|
|
1179
|
+
t: q.t.bind(q),
|
|
1169
1180
|
toggleChangeLanguage: () => {
|
|
1170
|
-
|
|
1181
|
+
q.locale === "english" ? (q.locale = "vietnamese", e(Fe("vietnamese"))) : (q.locale = "english", e(Fe("english")));
|
|
1171
1182
|
}
|
|
1172
1183
|
};
|
|
1173
|
-
},
|
|
1174
|
-
let e = o(
|
|
1184
|
+
}, Qe = () => {
|
|
1185
|
+
let e = o(Je);
|
|
1175
1186
|
if (!e) throw Error("useToast must be used within ToastProvider");
|
|
1176
1187
|
return e;
|
|
1177
|
-
},
|
|
1188
|
+
}, $e = (e) => {
|
|
1178
1189
|
let t = g(), n = f(!1);
|
|
1179
1190
|
c(() => {
|
|
1180
1191
|
(() => {
|
|
1181
1192
|
if (!(!e || n.current)) try {
|
|
1182
|
-
n.current = !0, e && t(
|
|
1193
|
+
n.current = !0, e && t(Pe(e));
|
|
1183
1194
|
} catch (e) {
|
|
1184
1195
|
n.current = !1, console.error("Failed to init chat or authenticate:", e);
|
|
1185
1196
|
}
|
|
1186
1197
|
})();
|
|
1187
1198
|
}, [e, t]);
|
|
1188
|
-
},
|
|
1189
|
-
|
|
1199
|
+
}, et = ({ chatKey: e, auth: t, features: n, logoUrl: r, workspace: i, ...a }) => {
|
|
1200
|
+
$e(n), We(e, t, i);
|
|
1190
1201
|
let [o, s] = p("closed"), [c, l] = p(null), [u, d] = p(null), [f, m] = p({
|
|
1191
1202
|
width: 1e3,
|
|
1192
1203
|
height: 750
|
|
1193
1204
|
});
|
|
1194
1205
|
return /* @__PURE__ */ E("div", {
|
|
1195
1206
|
className: `chatbot-container ${o}`,
|
|
1196
|
-
children: [o === "closed" && /* @__PURE__ */ T(
|
|
1207
|
+
children: [o === "closed" && /* @__PURE__ */ T(rt, {
|
|
1197
1208
|
mode: o,
|
|
1198
1209
|
setMode: s,
|
|
1199
1210
|
dragPosition: c,
|
|
1200
1211
|
setDragPosition: l,
|
|
1201
1212
|
primaryColor: a.primaryColor
|
|
1202
|
-
}), o !== "closed" && /* @__PURE__ */ T(
|
|
1213
|
+
}), o !== "closed" && /* @__PURE__ */ T(Wt, {
|
|
1203
1214
|
logoUrl: r,
|
|
1204
1215
|
mode: o,
|
|
1205
1216
|
setMode: s,
|
|
@@ -1211,18 +1222,19 @@ var He = x([Re], (e) => {
|
|
|
1211
1222
|
setFullpageSize: m,
|
|
1212
1223
|
chatKey: e,
|
|
1213
1224
|
auth: t,
|
|
1225
|
+
workspace: i,
|
|
1214
1226
|
...a
|
|
1215
1227
|
})]
|
|
1216
1228
|
});
|
|
1217
|
-
},
|
|
1218
|
-
let { isOpen: e, files: t, initialIndex: n, closeViewer: r } =
|
|
1219
|
-
return e ? /* @__PURE__ */ T(
|
|
1229
|
+
}, tt = () => {
|
|
1230
|
+
let { isOpen: e, files: t, initialIndex: n, closeViewer: r } = Ye();
|
|
1231
|
+
return e ? /* @__PURE__ */ T(tn, {
|
|
1220
1232
|
isOpen: e,
|
|
1221
1233
|
files: t,
|
|
1222
1234
|
initialIndex: n,
|
|
1223
1235
|
onClose: r
|
|
1224
1236
|
}) : null;
|
|
1225
|
-
},
|
|
1237
|
+
}, nt = (e) => {
|
|
1226
1238
|
let t = f(null), [n, r] = p(null);
|
|
1227
1239
|
return u(() => {
|
|
1228
1240
|
let e = t.current;
|
|
@@ -1239,13 +1251,13 @@ var He = x([Re], (e) => {
|
|
|
1239
1251
|
}
|
|
1240
1252
|
r(i);
|
|
1241
1253
|
}, []), /* @__PURE__ */ T(h, {
|
|
1242
|
-
store:
|
|
1243
|
-
children: /* @__PURE__ */ T(
|
|
1254
|
+
store: Re,
|
|
1255
|
+
children: /* @__PURE__ */ T(Ke, { children: /* @__PURE__ */ T(qe, { children: /* @__PURE__ */ E("div", {
|
|
1244
1256
|
ref: t,
|
|
1245
|
-
children: [n && v(/* @__PURE__ */ T(
|
|
1257
|
+
children: [n && v(/* @__PURE__ */ T(et, { ...e }), n), n && v(/* @__PURE__ */ T(tt, {}), n)]
|
|
1246
1258
|
}) }) })
|
|
1247
1259
|
});
|
|
1248
|
-
},
|
|
1260
|
+
}, rt = ({ mode: e, setMode: t, dragPosition: n, setDragPosition: r }) => {
|
|
1249
1261
|
let [i, a] = p(!1), [o, s] = p({
|
|
1250
1262
|
x: 0,
|
|
1251
1263
|
y: 0
|
|
@@ -1332,7 +1344,7 @@ var He = x([Re], (e) => {
|
|
|
1332
1344
|
children: t
|
|
1333
1345
|
}));
|
|
1334
1346
|
return u.displayName = e, u;
|
|
1335
|
-
},
|
|
1347
|
+
}, it = Q("Online", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("g", {
|
|
1336
1348
|
filter: "url(#filter0_d_4_4932)",
|
|
1337
1349
|
children: /* @__PURE__ */ T("path", {
|
|
1338
1350
|
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",
|
|
@@ -1384,7 +1396,7 @@ var He = x([Re], (e) => {
|
|
|
1384
1396
|
result: "shape"
|
|
1385
1397
|
})
|
|
1386
1398
|
]
|
|
1387
|
-
}) })] })),
|
|
1399
|
+
}) })] })), at = Q("Owner", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
|
|
1388
1400
|
clipPath: "url(#clip0_4_9682)",
|
|
1389
1401
|
children: [/* @__PURE__ */ T("path", {
|
|
1390
1402
|
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",
|
|
@@ -1409,7 +1421,7 @@ var He = x([Re], (e) => {
|
|
|
1409
1421
|
}) })] }), {
|
|
1410
1422
|
viewBox: "0 0 14 14",
|
|
1411
1423
|
sizeDefault: 14
|
|
1412
|
-
}),
|
|
1424
|
+
}), ot = Q("SaOneLogo", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
|
|
1413
1425
|
width: "22.4671",
|
|
1414
1426
|
height: "22.4671",
|
|
1415
1427
|
fill: "url(#pattern0_22_372)"
|
|
@@ -1431,7 +1443,7 @@ var He = x([Re], (e) => {
|
|
|
1431
1443
|
})] })] }), {
|
|
1432
1444
|
viewBox: "0 0 23 23",
|
|
1433
1445
|
sizeDefault: 23
|
|
1434
|
-
}),
|
|
1446
|
+
}), st = Q("MemberList", /* @__PURE__ */ E(w, { children: [
|
|
1435
1447
|
/* @__PURE__ */ T("path", {
|
|
1436
1448
|
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",
|
|
1437
1449
|
stroke: "currentColor",
|
|
@@ -1453,7 +1465,7 @@ var He = x([Re], (e) => {
|
|
|
1453
1465
|
strokeLinecap: "round",
|
|
1454
1466
|
strokeLinejoin: "round"
|
|
1455
1467
|
})
|
|
1456
|
-
] }), { sizeDefault: 16 }),
|
|
1468
|
+
] }), { sizeDefault: 16 }), ct = Q("GroupList", /* @__PURE__ */ E(w, { children: [
|
|
1457
1469
|
/* @__PURE__ */ T("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
1458
1470
|
/* @__PURE__ */ T("circle", {
|
|
1459
1471
|
cx: "9",
|
|
@@ -1467,12 +1479,12 @@ var He = x([Re], (e) => {
|
|
|
1467
1479
|
viewBox: "0 0 24 24",
|
|
1468
1480
|
strokeColorDefault: "currentColor",
|
|
1469
1481
|
strokeWidthDefault: 2
|
|
1470
|
-
}),
|
|
1482
|
+
}), lt = Q("Back", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M15 18l-6-6 6-6" }) }), {
|
|
1471
1483
|
sizeDefault: 20,
|
|
1472
1484
|
viewBox: "0 0 24 24",
|
|
1473
1485
|
strokeColorDefault: "currentColor",
|
|
1474
1486
|
strokeWidthDefault: 2
|
|
1475
|
-
}),
|
|
1487
|
+
}), ut = Q("Mute", /* @__PURE__ */ E(w, { children: [
|
|
1476
1488
|
/* @__PURE__ */ T("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }),
|
|
1477
1489
|
/* @__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" }),
|
|
1478
1490
|
/* @__PURE__ */ T("path", { d: "m2 2 20 20" }),
|
|
@@ -1501,7 +1513,7 @@ Q("Call", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 1
|
|
|
1501
1513
|
strokeColorDefault: "currentColor",
|
|
1502
1514
|
strokeWidthDefault: 2
|
|
1503
1515
|
});
|
|
1504
|
-
var
|
|
1516
|
+
var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
|
|
1505
1517
|
x: "3",
|
|
1506
1518
|
y: "3",
|
|
1507
1519
|
width: "18",
|
|
@@ -1533,22 +1545,22 @@ var ut = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
|
|
|
1533
1545
|
viewBox: "0 0 24 24",
|
|
1534
1546
|
strokeColorDefault: "currentColor",
|
|
1535
1547
|
strokeWidthDefault: 1.7
|
|
1536
|
-
}),
|
|
1548
|
+
}), ft = Q("Previous", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "15 18 9 12 15 6" }) }), {
|
|
1537
1549
|
sizeDefault: 24,
|
|
1538
1550
|
viewBox: "0 0 24 24",
|
|
1539
1551
|
strokeColorDefault: "currentColor",
|
|
1540
1552
|
strokeWidthDefault: 2
|
|
1541
|
-
}),
|
|
1553
|
+
}), pt = Q("Next", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "9 18 15 12 9 6" }) }), {
|
|
1542
1554
|
sizeDefault: 24,
|
|
1543
1555
|
viewBox: "0 0 24 24",
|
|
1544
1556
|
strokeColorDefault: "currentColor",
|
|
1545
1557
|
strokeWidthDefault: 2
|
|
1546
|
-
}),
|
|
1558
|
+
}), 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" }) }), {
|
|
1547
1559
|
sizeDefault: 20,
|
|
1548
1560
|
viewBox: "0 0 24 24",
|
|
1549
1561
|
strokeColorDefault: "currentColor",
|
|
1550
1562
|
strokeWidthDefault: 2
|
|
1551
|
-
}),
|
|
1563
|
+
}), ht = Q("ConversationList", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
|
|
1552
1564
|
clipPath: "url(#clip0_22_6147)",
|
|
1553
1565
|
fill: "none",
|
|
1554
1566
|
children: [/* @__PURE__ */ T("path", {
|
|
@@ -1574,7 +1586,7 @@ var ut = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
|
|
|
1574
1586
|
sizeDefault: 20,
|
|
1575
1587
|
viewBox: "0 0 20 20",
|
|
1576
1588
|
strokeColorDefault: "currentColor"
|
|
1577
|
-
}),
|
|
1589
|
+
}), gt = Q("Add", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
|
|
1578
1590
|
d: "M4.16675 10H15.8334",
|
|
1579
1591
|
stroke: "currentColor",
|
|
1580
1592
|
strokeWidth: "1.67",
|
|
@@ -1590,7 +1602,7 @@ var ut = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
|
|
|
1590
1602
|
sizeDefault: 20,
|
|
1591
1603
|
viewBox: "0 0 20 20",
|
|
1592
1604
|
strokeColorDefault: "currentColor"
|
|
1593
|
-
}),
|
|
1605
|
+
}), _t = Q("Search", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
|
|
1594
1606
|
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",
|
|
1595
1607
|
stroke: "currentColor",
|
|
1596
1608
|
strokeWidth: "1.67",
|
|
@@ -1606,7 +1618,7 @@ var ut = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
|
|
|
1606
1618
|
sizeDefault: 20,
|
|
1607
1619
|
viewBox: "0 0 20 20",
|
|
1608
1620
|
strokeColorDefault: "currentColor"
|
|
1609
|
-
}),
|
|
1621
|
+
}), vt = Q("Setting", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
|
|
1610
1622
|
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",
|
|
1611
1623
|
stroke: "currentColor",
|
|
1612
1624
|
strokeWidth: "1.66667",
|
|
@@ -1629,7 +1641,7 @@ Q("Pin", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 1
|
|
|
1629
1641
|
strokeColorDefault: "currentColor",
|
|
1630
1642
|
strokeWidthDefault: 2
|
|
1631
1643
|
});
|
|
1632
|
-
var
|
|
1644
|
+
var yt = Q("Help", /* @__PURE__ */ E(w, { children: [
|
|
1633
1645
|
/* @__PURE__ */ T("circle", {
|
|
1634
1646
|
cx: "12",
|
|
1635
1647
|
cy: "12",
|
|
@@ -1647,7 +1659,7 @@ var vt = Q("Help", /* @__PURE__ */ E(w, { children: [
|
|
|
1647
1659
|
viewBox: "0 0 24 24",
|
|
1648
1660
|
strokeColorDefault: "currentColor",
|
|
1649
1661
|
strokeWidthDefault: 2
|
|
1650
|
-
}),
|
|
1662
|
+
}), bt = Q("RemoveMember", /* @__PURE__ */ E(w, { children: [
|
|
1651
1663
|
/* @__PURE__ */ T("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
1652
1664
|
/* @__PURE__ */ T("circle", {
|
|
1653
1665
|
cx: "9",
|
|
@@ -1671,7 +1683,7 @@ var vt = Q("Help", /* @__PURE__ */ E(w, { children: [
|
|
|
1671
1683
|
viewBox: "0 0 24 24",
|
|
1672
1684
|
strokeColorDefault: "currentColor",
|
|
1673
1685
|
strokeWidthDefault: 2
|
|
1674
|
-
}),
|
|
1686
|
+
}), 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", {
|
|
1675
1687
|
cx: "16.5",
|
|
1676
1688
|
cy: "7.5",
|
|
1677
1689
|
r: ".5",
|
|
@@ -1681,7 +1693,7 @@ var vt = Q("Help", /* @__PURE__ */ E(w, { children: [
|
|
|
1681
1693
|
viewBox: "0 0 24 24",
|
|
1682
1694
|
strokeColorDefault: "currentColor",
|
|
1683
1695
|
strokeWidthDefault: 2
|
|
1684
|
-
}),
|
|
1696
|
+
}), 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" })] }), {
|
|
1685
1697
|
sizeDefault: 14,
|
|
1686
1698
|
viewBox: "0 0 24 24",
|
|
1687
1699
|
strokeColorDefault: "currentColor",
|
|
@@ -1693,7 +1705,7 @@ Q("Bell", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M10.
|
|
|
1693
1705
|
strokeColorDefault: "currentColor",
|
|
1694
1706
|
strokeWidthDefault: 2
|
|
1695
1707
|
});
|
|
1696
|
-
var
|
|
1708
|
+
var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
1697
1709
|
/* @__PURE__ */ T("path", { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
1698
1710
|
/* @__PURE__ */ T("circle", {
|
|
1699
1711
|
cx: "9",
|
|
@@ -1717,12 +1729,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1717
1729
|
viewBox: "0 0 24 24",
|
|
1718
1730
|
strokeColorDefault: "currentColor",
|
|
1719
1731
|
strokeWidthDefault: 2
|
|
1720
|
-
}),
|
|
1732
|
+
}), wt = Q("ArrowDown", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M6 9l6 6 6-6" }) }), {
|
|
1721
1733
|
sizeDefault: 16,
|
|
1722
1734
|
viewBox: "0 0 24 24",
|
|
1723
1735
|
strokeColorDefault: "currentColor",
|
|
1724
1736
|
strokeWidthDefault: 2
|
|
1725
|
-
}),
|
|
1737
|
+
}), Tt = Q("More", /* @__PURE__ */ E(w, { children: [
|
|
1726
1738
|
/* @__PURE__ */ T("circle", {
|
|
1727
1739
|
cx: "12",
|
|
1728
1740
|
cy: "12",
|
|
@@ -1744,12 +1756,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1744
1756
|
strokeColorDefault: "currentColor",
|
|
1745
1757
|
strokeWidthDefault: 2,
|
|
1746
1758
|
strokeLinecapDefault: "round"
|
|
1747
|
-
}),
|
|
1759
|
+
}), Et = Q("Minimize", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M5 12h14" }) }), {
|
|
1748
1760
|
sizeDefault: 14,
|
|
1749
1761
|
viewBox: "0 0 24 24",
|
|
1750
1762
|
strokeColorDefault: "currentColor",
|
|
1751
1763
|
strokeWidthDefault: 2
|
|
1752
|
-
}),
|
|
1764
|
+
}), Dt = Q("OpenFullPage", /* @__PURE__ */ E(w, { children: [
|
|
1753
1765
|
/* @__PURE__ */ T("path", { d: "M15 3h6v6" }),
|
|
1754
1766
|
/* @__PURE__ */ T("path", { d: "m21 3-7 7" }),
|
|
1755
1767
|
/* @__PURE__ */ T("path", { d: "m3 21 7-7" }),
|
|
@@ -1759,7 +1771,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1759
1771
|
viewBox: "0 0 24 24",
|
|
1760
1772
|
strokeColorDefault: "currentColor",
|
|
1761
1773
|
strokeWidthDefault: 2
|
|
1762
|
-
}),
|
|
1774
|
+
}), Ot = Q("MinimizeFullPage", /* @__PURE__ */ E(w, { children: [
|
|
1763
1775
|
/* @__PURE__ */ T("path", { d: "m14 10 7-7" }),
|
|
1764
1776
|
/* @__PURE__ */ T("path", { d: "M20 10h-6V4" }),
|
|
1765
1777
|
/* @__PURE__ */ T("path", { d: "m3 21 7-7" }),
|
|
@@ -1769,19 +1781,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1769
1781
|
viewBox: "0 0 24 24",
|
|
1770
1782
|
strokeColorDefault: "currentColor",
|
|
1771
1783
|
strokeWidthDefault: 2
|
|
1772
|
-
}),
|
|
1784
|
+
}), 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" })] }), {
|
|
1773
1785
|
sizeDefault: 20,
|
|
1774
1786
|
viewBox: "0 0 24 24",
|
|
1775
1787
|
strokeColorDefault: "currentColor",
|
|
1776
1788
|
strokeWidthDefault: 2
|
|
1777
|
-
}),
|
|
1789
|
+
}), 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" }) }), {
|
|
1778
1790
|
sizeDefault: 20,
|
|
1779
1791
|
viewBox: "0 0 24 24",
|
|
1780
1792
|
strokeColorDefault: "currentColor",
|
|
1781
1793
|
strokeWidthDefault: 2,
|
|
1782
1794
|
strokeLinecapDefault: "round",
|
|
1783
1795
|
strokeLinejoinDefault: "round"
|
|
1784
|
-
}),
|
|
1796
|
+
}), jt = Q("Image", /* @__PURE__ */ E(w, { children: [
|
|
1785
1797
|
/* @__PURE__ */ T("rect", {
|
|
1786
1798
|
width: "18",
|
|
1787
1799
|
height: "18",
|
|
@@ -1803,7 +1815,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1803
1815
|
strokeWidthDefault: 2,
|
|
1804
1816
|
strokeLinecapDefault: "round",
|
|
1805
1817
|
strokeLinejoinDefault: "round"
|
|
1806
|
-
}),
|
|
1818
|
+
}), Mt = Q("Voice", /* @__PURE__ */ E(w, { children: [
|
|
1807
1819
|
/* @__PURE__ */ T("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }),
|
|
1808
1820
|
/* @__PURE__ */ T("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
1809
1821
|
/* @__PURE__ */ T("line", {
|
|
@@ -1819,7 +1831,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1819
1831
|
strokeWidthDefault: 2,
|
|
1820
1832
|
strokeLinecapDefault: "round",
|
|
1821
1833
|
strokeLinejoinDefault: "round"
|
|
1822
|
-
}),
|
|
1834
|
+
}), Nt = Q("Emoji", /* @__PURE__ */ E(w, { children: [
|
|
1823
1835
|
/* @__PURE__ */ T("circle", {
|
|
1824
1836
|
cx: "12",
|
|
1825
1837
|
cy: "12",
|
|
@@ -1845,7 +1857,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1845
1857
|
strokeWidthDefault: 2,
|
|
1846
1858
|
strokeLinecapDefault: "round",
|
|
1847
1859
|
strokeLinejoinDefault: "round"
|
|
1848
|
-
}),
|
|
1860
|
+
}), Pt = Q("SendMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("line", {
|
|
1849
1861
|
x1: "22",
|
|
1850
1862
|
y1: "2",
|
|
1851
1863
|
x2: "11",
|
|
@@ -1857,27 +1869,27 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1857
1869
|
strokeWidthDefault: 2,
|
|
1858
1870
|
strokeLinecapDefault: "round",
|
|
1859
1871
|
strokeLinejoinDefault: "round"
|
|
1860
|
-
}),
|
|
1872
|
+
}), Ft = Q("SortASC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7-7 7 7" })] }), {
|
|
1861
1873
|
sizeDefault: 16,
|
|
1862
1874
|
viewBox: "0 0 24 24",
|
|
1863
1875
|
strokeColorDefault: "currentColor",
|
|
1864
1876
|
strokeWidthDefault: 2
|
|
1865
|
-
}),
|
|
1877
|
+
}), It = Q("SortDESC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7 7 7-7" })] }), {
|
|
1866
1878
|
sizeDefault: 16,
|
|
1867
1879
|
viewBox: "0 0 24 24",
|
|
1868
1880
|
strokeColorDefault: "currentColor",
|
|
1869
1881
|
strokeWidthDefault: 2
|
|
1870
|
-
}),
|
|
1882
|
+
}), 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" })] }), {
|
|
1871
1883
|
sizeDefault: 24,
|
|
1872
1884
|
viewBox: "0 0 24 24",
|
|
1873
1885
|
strokeColorDefault: "currentColor",
|
|
1874
1886
|
strokeWidthDefault: 2
|
|
1875
|
-
}),
|
|
1887
|
+
}), 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" }) }), {
|
|
1876
1888
|
sizeDefault: 24,
|
|
1877
1889
|
viewBox: "0 0 24 24",
|
|
1878
1890
|
strokeColorDefault: "currentColor",
|
|
1879
1891
|
strokeWidthDefault: 2
|
|
1880
|
-
}),
|
|
1892
|
+
}), zt = Q("DeleteIcon", /* @__PURE__ */ E(w, { children: [
|
|
1881
1893
|
/* @__PURE__ */ T("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
1882
1894
|
/* @__PURE__ */ T("path", { d: "M3 6h18" }),
|
|
1883
1895
|
/* @__PURE__ */ T("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
@@ -1886,12 +1898,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1886
1898
|
viewBox: "0 0 24 24",
|
|
1887
1899
|
strokeColorDefault: "currentColor",
|
|
1888
1900
|
strokeWidthDefault: 2
|
|
1889
|
-
}),
|
|
1901
|
+
}), 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" })] }), {
|
|
1890
1902
|
sizeDefault: 24,
|
|
1891
1903
|
viewBox: "0 0 24 24",
|
|
1892
1904
|
strokeColorDefault: "currentColor",
|
|
1893
1905
|
strokeWidthDefault: 2
|
|
1894
|
-
}),
|
|
1906
|
+
}), Vt = Q("Seen", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
|
|
1895
1907
|
d: "M9 3L3.5 8.5L1 6",
|
|
1896
1908
|
stroke: "#2B7FFF",
|
|
1897
1909
|
strokeLinecap: "round",
|
|
@@ -1904,7 +1916,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1904
1916
|
})] }), {
|
|
1905
1917
|
sizeDefault: 12,
|
|
1906
1918
|
viewBox: "0 0 12 12"
|
|
1907
|
-
}),
|
|
1919
|
+
}), Ht = Q("language", /* @__PURE__ */ E(w, { children: [
|
|
1908
1920
|
/* @__PURE__ */ T("circle", {
|
|
1909
1921
|
cx: "12",
|
|
1910
1922
|
cy: "12",
|
|
@@ -1919,7 +1931,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1919
1931
|
strokeWidthDefault: 2,
|
|
1920
1932
|
strokeLinecapDefault: "round",
|
|
1921
1933
|
strokeLinejoinDefault: "round"
|
|
1922
|
-
}),
|
|
1934
|
+
}), Ut = Q("ImagePlaceholder", /* @__PURE__ */ E(w, { children: [
|
|
1923
1935
|
/* @__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" }),
|
|
1924
1936
|
/* @__PURE__ */ T("path", { d: "m14 19.5 3-3 3 3" }),
|
|
1925
1937
|
/* @__PURE__ */ T("path", { d: "M17 22v-5.5" }),
|
|
@@ -1932,23 +1944,23 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1932
1944
|
sizeDefault: 20,
|
|
1933
1945
|
viewBox: "0 0 24 24",
|
|
1934
1946
|
strokeColorDefault: "currentColor"
|
|
1935
|
-
}),
|
|
1947
|
+
}), Wt = ({ title: e = "Live Chat", logoUrl: t, mode: n, setMode: r, primaryColor: i, dragPosition: o, setDragPosition: l, fullpagePosition: u, setFullpagePosition: m, fullpageSize: h = {
|
|
1936
1948
|
width: 1e3,
|
|
1937
1949
|
height: 750
|
|
1938
1950
|
}, setFullpageSize: v }) => {
|
|
1939
|
-
let { t: y } = Z(), [b, x] = p(!1), [S, C] = p(!1), [D, k] = p(null), [
|
|
1951
|
+
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({
|
|
1940
1952
|
mouseX: 0,
|
|
1941
1953
|
mouseY: 0,
|
|
1942
1954
|
baseW: 0,
|
|
1943
1955
|
baseH: 0,
|
|
1944
1956
|
baseX: 0,
|
|
1945
1957
|
baseY: 0
|
|
1946
|
-
}), [
|
|
1958
|
+
}), [de, fe] = p({
|
|
1947
1959
|
x: 0,
|
|
1948
1960
|
y: 0
|
|
1949
|
-
}),
|
|
1950
|
-
e && e.length > 0 &&
|
|
1951
|
-
} }), { currentChat:
|
|
1961
|
+
}), 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) => {
|
|
1962
|
+
e && e.length > 0 && me.current?.processPastedFiles(e);
|
|
1963
|
+
} }), { currentChat: U, currentUser: W, members: je, currentChatMembers: Me, chats: K, totalMessagesUnread: q } = _((e) => e.chat);
|
|
1952
1964
|
c(() => {
|
|
1953
1965
|
if (n === "fullpage" && !u && m && v) {
|
|
1954
1966
|
let e = 1e3;
|
|
@@ -1966,12 +1978,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1966
1978
|
m,
|
|
1967
1979
|
v
|
|
1968
1980
|
]);
|
|
1969
|
-
let { theme:
|
|
1981
|
+
let { theme: Ne, primaryColor: Pe } = _((e) => e.setting), J = g(), Y = d(() => {
|
|
1970
1982
|
let e = H.toLowerCase().trim();
|
|
1971
1983
|
if (!e) return {
|
|
1972
|
-
filteredChat:
|
|
1973
|
-
if (
|
|
1974
|
-
let t =
|
|
1984
|
+
filteredChat: K.filter((e) => {
|
|
1985
|
+
if (L === "unread") {
|
|
1986
|
+
let t = W?.id && e.new ? e.new[W.id] ?? 0 : 0;
|
|
1975
1987
|
return Number(t) > 0;
|
|
1976
1988
|
}
|
|
1977
1989
|
return !0;
|
|
@@ -1981,7 +1993,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1981
1993
|
matchedFiles: [],
|
|
1982
1994
|
totalMatchedFiles: 0
|
|
1983
1995
|
};
|
|
1984
|
-
let t =
|
|
1996
|
+
let t = K.filter((t) => {
|
|
1985
1997
|
let n = t.name?.toLowerCase().includes(e), r = t.members?.some((t) => t.name.toLowerCase().includes(e));
|
|
1986
1998
|
return (n ?? !1) || (r ?? !1);
|
|
1987
1999
|
}).map((t) => {
|
|
@@ -1990,10 +2002,10 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1990
2002
|
...t,
|
|
1991
2003
|
matchedMemberNames: n.map((e) => e.name)
|
|
1992
2004
|
};
|
|
1993
|
-
}), n =
|
|
2005
|
+
}), 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) => ({
|
|
1994
2006
|
chat: e,
|
|
1995
2007
|
message: e.message
|
|
1996
|
-
})), i =
|
|
2008
|
+
})), i = K.filter((t) => t.message?.files?.some((t) => t.name.toLowerCase().includes(e))).map((t) => ({
|
|
1997
2009
|
chat: t,
|
|
1998
2010
|
files: t.message?.files?.filter((t) => t.name.toLowerCase().includes(e)) ?? []
|
|
1999
2011
|
}));
|
|
@@ -2005,71 +2017,63 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2005
2017
|
totalMatchedFiles: i.reduce((e, t) => e + (t.files?.length ?? 0), 0)
|
|
2006
2018
|
};
|
|
2007
2019
|
}, [
|
|
2008
|
-
q,
|
|
2009
2020
|
K,
|
|
2021
|
+
je,
|
|
2010
2022
|
H,
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
]),
|
|
2023
|
+
L,
|
|
2024
|
+
W
|
|
2025
|
+
]), X = (e, t) => t.trim() ? /* @__PURE__ */ T(w, { children: e.split(RegExp(`(${t})`, "gi")).map((e, n) => e.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ T("span", {
|
|
2014
2026
|
className: "highlight-match",
|
|
2015
2027
|
children: e
|
|
2016
|
-
}, n) : e) }) : e,
|
|
2028
|
+
}, n) : e) }) : e, Fe = (e) => {
|
|
2017
2029
|
if (!e) return "#ffffff";
|
|
2018
2030
|
let t = e.startsWith("#") ? e.slice(1) : e;
|
|
2019
2031
|
if (t.length === 3 && (t = t.split("").map((e) => e + e).join("")), t.length !== 6) return "#ffffff";
|
|
2020
2032
|
let n = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), i = parseInt(t.slice(4, 6), 16);
|
|
2021
2033
|
return (n * 299 + r * 587 + i * 114) / 1e3 > 180 ? "#1e293b" : "#ffffff";
|
|
2022
|
-
},
|
|
2023
|
-
|
|
2024
|
-
}, [
|
|
2025
|
-
if (t.stopPropagation(), await
|
|
2026
|
-
await
|
|
2034
|
+
}, Ie = d(() => Fe(Pe), [Pe]), Le = a((e) => {
|
|
2035
|
+
ve(e), R("all"), be(!1), Se(!1), we(!1);
|
|
2036
|
+
}, [R]), Re = async (e, t) => {
|
|
2037
|
+
if (t.stopPropagation(), await I("Bạn có chắc chắn muốn xóa cuộc trò chuyện này?")) try {
|
|
2038
|
+
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");
|
|
2027
2039
|
} catch (e) {
|
|
2028
2040
|
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");
|
|
2029
2041
|
}
|
|
2030
|
-
},
|
|
2042
|
+
}, ze = (e) => {
|
|
2031
2043
|
k(e), C(!0);
|
|
2032
|
-
},
|
|
2044
|
+
}, Be = async (e, t, n) => {
|
|
2033
2045
|
try {
|
|
2034
|
-
let r = await
|
|
2035
|
-
r?.data && (
|
|
2046
|
+
let r = await G.updateGroup(e, t, n);
|
|
2047
|
+
r?.data && (J(he(K.map((t) => t.id === e ? {
|
|
2036
2048
|
...t,
|
|
2037
2049
|
...r.data
|
|
2038
|
-
} : t))),
|
|
2039
|
-
...
|
|
2050
|
+
} : t))), U?.id === e && J(V({
|
|
2051
|
+
...U,
|
|
2040
2052
|
...r.data
|
|
2041
2053
|
})), C(!1), k(null), F("Cập nhật thông tin nhóm thành công!", "success"));
|
|
2042
2054
|
} catch (e) {
|
|
2043
2055
|
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");
|
|
2044
2056
|
}
|
|
2045
|
-
},
|
|
2046
|
-
|
|
2047
|
-
},
|
|
2048
|
-
try {
|
|
2049
|
-
await
|
|
2050
|
-
let n = await U.getMembers(e);
|
|
2051
|
-
n?.data && Y(_e(n.data));
|
|
2052
|
-
} catch (e) {
|
|
2053
|
-
console.error("Lỗi khi thêm thành viên:", e), F("Không thể thêm thành viên. Vui lòng thử lại!", "error");
|
|
2054
|
-
}
|
|
2055
|
-
}, Ke = async (e, t) => {
|
|
2056
|
-
if (await se("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 U.removeMember(e, t), Y(_e(Ne.filter((e) => String(e.id) !== String(t)))), String(t) === String(G?.id) ? (F("Bạn đã rời khỏi nhóm này", "success"), C(!1), k(null), Y(B(null)), Y(he((await U.getChats()).data ?? []))) : F("Đã xóa thành viên khỏi nhóm", "success");
|
|
2057
|
+
}, Ve = () => {
|
|
2058
|
+
j(!0);
|
|
2059
|
+
}, He = async (e, t) => {
|
|
2060
|
+
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 {
|
|
2061
|
+
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
2062
|
} catch (e) {
|
|
2059
2063
|
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
2064
|
}
|
|
2061
|
-
},
|
|
2065
|
+
}, We = (e) => {
|
|
2062
2066
|
if (n !== "fullpage" || e.target.closest(".action-btn, .back-btn")) return;
|
|
2063
2067
|
let t = e.currentTarget.parentElement?.getBoundingClientRect();
|
|
2064
|
-
t && (
|
|
2068
|
+
t && (oe(!0), fe({
|
|
2065
2069
|
x: e.clientX - t.left,
|
|
2066
2070
|
y: e.clientY - t.top
|
|
2067
2071
|
}), e.stopPropagation(), e.preventDefault());
|
|
2068
|
-
},
|
|
2072
|
+
}, Ge = (e, t) => {
|
|
2069
2073
|
if (n !== "fullpage") return;
|
|
2070
2074
|
e.stopPropagation(), e.preventDefault();
|
|
2071
|
-
let r =
|
|
2072
|
-
r && (
|
|
2075
|
+
let r = pe.current?.getBoundingClientRect();
|
|
2076
|
+
r && (se(!0), le(t), ue({
|
|
2073
2077
|
mouseX: e.clientX,
|
|
2074
2078
|
mouseY: e.clientY,
|
|
2075
2079
|
baseW: r.width,
|
|
@@ -2080,20 +2084,20 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2080
2084
|
};
|
|
2081
2085
|
c(() => {
|
|
2082
2086
|
let e = (e) => {
|
|
2083
|
-
if (
|
|
2084
|
-
let t = e.clientX -
|
|
2085
|
-
switch (
|
|
2087
|
+
if (z && ce) {
|
|
2088
|
+
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;
|
|
2089
|
+
switch (ce) {
|
|
2086
2090
|
case "ne":
|
|
2087
|
-
r = Math.min(c -
|
|
2091
|
+
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);
|
|
2088
2092
|
break;
|
|
2089
2093
|
case "nw":
|
|
2090
|
-
r = Math.min(
|
|
2094
|
+
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);
|
|
2091
2095
|
break;
|
|
2092
2096
|
case "se":
|
|
2093
|
-
r = Math.min(c -
|
|
2097
|
+
r = Math.min(c - B.baseX, Math.max(s, B.baseW + t)), i = Math.min(l - B.baseY, Math.max(700, B.baseH + n));
|
|
2094
2098
|
break;
|
|
2095
2099
|
case "sw":
|
|
2096
|
-
r = Math.min(
|
|
2100
|
+
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);
|
|
2097
2101
|
break;
|
|
2098
2102
|
}
|
|
2099
2103
|
v?.({
|
|
@@ -2105,12 +2109,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2105
2109
|
});
|
|
2106
2110
|
return;
|
|
2107
2111
|
}
|
|
2108
|
-
if (!
|
|
2109
|
-
let t =
|
|
2112
|
+
if (!ae || !de) return;
|
|
2113
|
+
let t = pe.current;
|
|
2110
2114
|
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 -
|
|
2115
|
+
let r = t.getBoundingClientRect(), i = r.width, a = r.height, o = document.documentElement.clientWidth, s = document.documentElement.clientHeight, c = e.clientX - de.x;
|
|
2112
2116
|
c < 0 && (c = 0), c + i > o && (c = o - i);
|
|
2113
|
-
let u = e.clientY -
|
|
2117
|
+
let u = e.clientY - de.y;
|
|
2114
2118
|
u < 0 && (u = 0), u + a > s && (u = s - a), n === "fullpage" ? m?.({
|
|
2115
2119
|
x: c,
|
|
2116
2120
|
y: u
|
|
@@ -2119,30 +2123,30 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2119
2123
|
y: u
|
|
2120
2124
|
});
|
|
2121
2125
|
}, t = () => {
|
|
2122
|
-
|
|
2126
|
+
oe(!1), se(!1), le(null);
|
|
2123
2127
|
};
|
|
2124
|
-
return (
|
|
2128
|
+
return (ae || z) && (document.addEventListener("mousemove", e), document.addEventListener("mouseup", t)), () => {
|
|
2125
2129
|
document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
|
|
2126
2130
|
};
|
|
2127
2131
|
}, [
|
|
2128
|
-
|
|
2129
|
-
ue,
|
|
2130
|
-
fe,
|
|
2132
|
+
ae,
|
|
2131
2133
|
z,
|
|
2134
|
+
ce,
|
|
2135
|
+
de,
|
|
2132
2136
|
n,
|
|
2133
2137
|
l,
|
|
2134
2138
|
m,
|
|
2135
2139
|
v,
|
|
2136
|
-
|
|
2140
|
+
B
|
|
2137
2141
|
]);
|
|
2138
|
-
let
|
|
2142
|
+
let Ke = (() => {
|
|
2139
2143
|
if (!o || typeof document > "u") return null;
|
|
2140
2144
|
let e = document.documentElement.clientWidth, t = document.documentElement.clientHeight, n = o.x, r = o.y;
|
|
2141
2145
|
return n + 400 > e && (n = e - 400 - 20), n < 20 && (n = 20), r + 640 > t && (r = t - 640 - 20), r < 20 && (r = 20), {
|
|
2142
2146
|
x: n,
|
|
2143
2147
|
y: r
|
|
2144
2148
|
};
|
|
2145
|
-
})(),
|
|
2149
|
+
})(), qe = () => {
|
|
2146
2150
|
if (n === "popup") r("fullpage"), v?.({
|
|
2147
2151
|
width: window.innerWidth,
|
|
2148
2152
|
height: window.innerHeight
|
|
@@ -2166,34 +2170,35 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2166
2170
|
x: 0,
|
|
2167
2171
|
y: 0
|
|
2168
2172
|
});
|
|
2169
|
-
},
|
|
2173
|
+
}, Je = a(async (e) => {
|
|
2170
2174
|
if (e) try {
|
|
2171
|
-
let t =
|
|
2175
|
+
let t = je.find((t) => String(t.id) === e);
|
|
2172
2176
|
if (t) {
|
|
2173
|
-
let n =
|
|
2174
|
-
if (n)
|
|
2177
|
+
let n = K.find((t) => t.type === "single" && t.members?.some((t) => String(t.id) === e));
|
|
2178
|
+
if (n) J(V(n));
|
|
2175
2179
|
else {
|
|
2176
|
-
await
|
|
2180
|
+
await G.setReceiver({
|
|
2177
2181
|
id: t.id,
|
|
2178
2182
|
code: t.code,
|
|
2179
2183
|
name: t.name
|
|
2180
2184
|
});
|
|
2181
|
-
let e = (await
|
|
2182
|
-
e &&
|
|
2185
|
+
let e = (await G.addChat(Number(t.id))).data;
|
|
2186
|
+
e && J(V(e));
|
|
2183
2187
|
}
|
|
2184
2188
|
}
|
|
2185
2189
|
x(!1);
|
|
2186
2190
|
} catch (e) {
|
|
2187
|
-
console.error("Lỗi khi tạo cuộc trò chuyện:", e),
|
|
2191
|
+
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");
|
|
2188
2192
|
}
|
|
2189
2193
|
}, [
|
|
2190
|
-
q,
|
|
2191
2194
|
K,
|
|
2192
|
-
|
|
2195
|
+
je,
|
|
2196
|
+
F,
|
|
2197
|
+
J
|
|
2193
2198
|
]);
|
|
2194
2199
|
return /* @__PURE__ */ E("div", {
|
|
2195
|
-
ref:
|
|
2196
|
-
className: `chat-window ${n === "fullpage" ? "fullpage" : ""} ${
|
|
2200
|
+
ref: pe,
|
|
2201
|
+
className: `chat-window ${n === "fullpage" ? "fullpage" : ""} ${Ne === "dark" ? "dark-theme" : ""}`,
|
|
2197
2202
|
style: n === "fullpage" ? {
|
|
2198
2203
|
position: "fixed",
|
|
2199
2204
|
left: u ? `${u.x}px` : `${(window.innerWidth - h.width) / 2}px`,
|
|
@@ -2201,46 +2206,46 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2201
2206
|
width: `${h.width}px`,
|
|
2202
2207
|
height: `${h.height}px`,
|
|
2203
2208
|
borderRadius: h.width >= window.innerWidth && u?.x === 0 && u?.y === 0 ? 0 : "14px",
|
|
2204
|
-
"--primary":
|
|
2205
|
-
"--primary-contrast":
|
|
2206
|
-
} : n === "popup" &&
|
|
2209
|
+
"--primary": Pe,
|
|
2210
|
+
"--primary-contrast": Ie
|
|
2211
|
+
} : n === "popup" && Ke ? {
|
|
2207
2212
|
position: "fixed",
|
|
2208
|
-
left: `${
|
|
2209
|
-
top: `${
|
|
2210
|
-
"--primary":
|
|
2211
|
-
"--primary-contrast":
|
|
2213
|
+
left: `${Ke.x}px`,
|
|
2214
|
+
top: `${Ke.y}px`,
|
|
2215
|
+
"--primary": Pe,
|
|
2216
|
+
"--primary-contrast": Ie
|
|
2212
2217
|
} : {
|
|
2213
|
-
"--primary":
|
|
2214
|
-
"--primary-contrast":
|
|
2218
|
+
"--primary": Pe,
|
|
2219
|
+
"--primary-contrast": Ie
|
|
2215
2220
|
},
|
|
2216
2221
|
children: [
|
|
2217
2222
|
n === "fullpage" && /* @__PURE__ */ E(w, { children: [
|
|
2218
2223
|
/* @__PURE__ */ T("div", {
|
|
2219
|
-
onMouseDown: (e) =>
|
|
2224
|
+
onMouseDown: (e) => Ge(e, "ne"),
|
|
2220
2225
|
className: "resize-handle ne"
|
|
2221
2226
|
}),
|
|
2222
2227
|
/* @__PURE__ */ T("div", {
|
|
2223
|
-
onMouseDown: (e) =>
|
|
2228
|
+
onMouseDown: (e) => Ge(e, "nw"),
|
|
2224
2229
|
className: "resize-handle nw"
|
|
2225
2230
|
}),
|
|
2226
2231
|
/* @__PURE__ */ T("div", {
|
|
2227
|
-
onMouseDown: (e) =>
|
|
2232
|
+
onMouseDown: (e) => Ge(e, "se"),
|
|
2228
2233
|
className: "resize-handle se"
|
|
2229
2234
|
}),
|
|
2230
2235
|
/* @__PURE__ */ T("div", {
|
|
2231
|
-
onMouseDown: (e) =>
|
|
2236
|
+
onMouseDown: (e) => Ge(e, "sw"),
|
|
2232
2237
|
className: "resize-handle sw"
|
|
2233
2238
|
})
|
|
2234
2239
|
] }),
|
|
2235
2240
|
/* @__PURE__ */ T("div", {
|
|
2236
|
-
onMouseDown:
|
|
2237
|
-
onDoubleClick:
|
|
2241
|
+
onMouseDown: We,
|
|
2242
|
+
onDoubleClick: qe,
|
|
2238
2243
|
style: { cursor: n === "fullpage" ? "move" : "default" },
|
|
2239
|
-
children: /* @__PURE__ */ T(
|
|
2244
|
+
children: /* @__PURE__ */ T(dn, {
|
|
2240
2245
|
mode: n,
|
|
2241
2246
|
title: e,
|
|
2242
2247
|
logoUrl: t,
|
|
2243
|
-
onBack: () =>
|
|
2248
|
+
onBack: () => J(V(null)),
|
|
2244
2249
|
onToggleMode: () => {
|
|
2245
2250
|
if (n === "popup" && !u) {
|
|
2246
2251
|
let e = 1e3;
|
|
@@ -2255,74 +2260,73 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2255
2260
|
r(n === "popup" ? "fullpage" : "popup");
|
|
2256
2261
|
},
|
|
2257
2262
|
onClose: () => r("closed"),
|
|
2258
|
-
onAddMemberClick: () =>
|
|
2259
|
-
onOpenSettings: () =>
|
|
2263
|
+
onAddMemberClick: () => U && Ve(),
|
|
2264
|
+
onOpenSettings: () => N(!0)
|
|
2260
2265
|
})
|
|
2261
2266
|
}),
|
|
2262
2267
|
/* @__PURE__ */ E("div", {
|
|
2263
2268
|
className: "chat-main-layout",
|
|
2264
|
-
children: [n === "fullpage" &&
|
|
2265
|
-
setIsThemeModalOpen:
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
setActiveTab: ie
|
|
2269
|
+
children: [n === "fullpage" && W && /* @__PURE__ */ T(ln, {
|
|
2270
|
+
setIsThemeModalOpen: N,
|
|
2271
|
+
activeTab: ne,
|
|
2272
|
+
setActiveTab: P
|
|
2269
2273
|
}), /* @__PURE__ */ E("div", {
|
|
2270
2274
|
className: "chat-body-container",
|
|
2271
2275
|
children: [
|
|
2272
|
-
(n === "fullpage" || !
|
|
2276
|
+
(n === "fullpage" || !U) && /* @__PURE__ */ T("div", {
|
|
2273
2277
|
className: `chat-sidebar ${n === "fullpage" ? "is-full" : ""}`,
|
|
2274
|
-
children:
|
|
2275
|
-
/* @__PURE__ */ T(
|
|
2276
|
-
value:
|
|
2277
|
-
onChange:
|
|
2278
|
+
children: ne === "chats" ? /* @__PURE__ */ E(w, { children: [
|
|
2279
|
+
/* @__PURE__ */ T(cn, {
|
|
2280
|
+
value: ge,
|
|
2281
|
+
onChange: Le,
|
|
2278
2282
|
onAddClick: () => x(!0),
|
|
2279
2283
|
placeholder: y("chatWindow.searchPlaceholder")
|
|
2280
2284
|
}),
|
|
2281
2285
|
/* @__PURE__ */ T("div", {
|
|
2282
2286
|
className: "chat-filter-tabs",
|
|
2283
|
-
children:
|
|
2287
|
+
children: ge ? /* @__PURE__ */ E(w, { children: [
|
|
2284
2288
|
/* @__PURE__ */ T("button", {
|
|
2285
|
-
className:
|
|
2286
|
-
onClick: () =>
|
|
2289
|
+
className: L === "all" ? "active" : "",
|
|
2290
|
+
onClick: () => R("all"),
|
|
2287
2291
|
children: "Tất cả"
|
|
2288
2292
|
}),
|
|
2289
2293
|
/* @__PURE__ */ T("button", {
|
|
2290
|
-
className:
|
|
2291
|
-
onClick: () =>
|
|
2294
|
+
className: L === "member" ? "active" : "",
|
|
2295
|
+
onClick: () => R("member"),
|
|
2292
2296
|
children: "Thành viên"
|
|
2293
2297
|
}),
|
|
2294
2298
|
/* @__PURE__ */ T("button", {
|
|
2295
|
-
className:
|
|
2296
|
-
onClick: () =>
|
|
2299
|
+
className: L === "message" ? "active" : "",
|
|
2300
|
+
onClick: () => R("message"),
|
|
2297
2301
|
children: "Tin nhắn"
|
|
2298
2302
|
}),
|
|
2299
2303
|
/* @__PURE__ */ T("button", {
|
|
2300
|
-
className:
|
|
2301
|
-
onClick: () =>
|
|
2304
|
+
className: L === "file" ? "active" : "",
|
|
2305
|
+
onClick: () => R("file"),
|
|
2302
2306
|
children: "File"
|
|
2303
2307
|
})
|
|
2304
2308
|
] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
|
|
2305
|
-
className:
|
|
2306
|
-
onClick: () =>
|
|
2309
|
+
className: L === "all" ? "active" : "",
|
|
2310
|
+
onClick: () => R("all"),
|
|
2307
2311
|
children: y("chatWindow.filterAll") || "Tất cả"
|
|
2308
2312
|
}), /* @__PURE__ */ T("button", {
|
|
2309
|
-
className:
|
|
2310
|
-
onClick: () =>
|
|
2313
|
+
className: L === "unread" ? "active" : "",
|
|
2314
|
+
onClick: () => R("unread"),
|
|
2311
2315
|
children: /* @__PURE__ */ E("div", {
|
|
2312
2316
|
className: "filter-unread-badge-container",
|
|
2313
|
-
children: [/* @__PURE__ */ T("span", { children: "Chưa đọc" }),
|
|
2317
|
+
children: [/* @__PURE__ */ T("span", { children: "Chưa đọc" }), q > 0 && /* @__PURE__ */ T("span", {
|
|
2314
2318
|
className: "filter-unread-badge",
|
|
2315
|
-
children:
|
|
2319
|
+
children: q
|
|
2316
2320
|
})]
|
|
2317
2321
|
})
|
|
2318
2322
|
})] })
|
|
2319
2323
|
}),
|
|
2320
2324
|
/* @__PURE__ */ T("div", {
|
|
2321
2325
|
className: "sidebar-scroll",
|
|
2322
|
-
children:
|
|
2326
|
+
children: ge ? /* @__PURE__ */ E("div", {
|
|
2323
2327
|
className: "chat-search-results",
|
|
2324
2328
|
children: [
|
|
2325
|
-
(
|
|
2329
|
+
(L === "all" || L === "member") && /* @__PURE__ */ E("div", {
|
|
2326
2330
|
className: "search-section",
|
|
2327
2331
|
children: [
|
|
2328
2332
|
/* @__PURE__ */ T("h3", {
|
|
@@ -2331,33 +2335,33 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2331
2335
|
}),
|
|
2332
2336
|
/* @__PURE__ */ E("div", {
|
|
2333
2337
|
className: "search-section-content",
|
|
2334
|
-
children: [
|
|
2338
|
+
children: [Y.filteredChat.slice(0, ye ? void 0 : 4).map((e) => /* @__PURE__ */ E("div", {
|
|
2335
2339
|
className: "search-result-item",
|
|
2336
|
-
onClick: () =>
|
|
2340
|
+
onClick: () => J(V(e)),
|
|
2337
2341
|
children: [/* @__PURE__ */ T("div", {
|
|
2338
2342
|
className: "search-result-avatar",
|
|
2339
|
-
children: /* @__PURE__ */ T(
|
|
2343
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
2340
2344
|
chat: e,
|
|
2341
|
-
currentUserId:
|
|
2345
|
+
currentUserId: W?.id
|
|
2342
2346
|
})
|
|
2343
2347
|
}), /* @__PURE__ */ E("div", {
|
|
2344
2348
|
className: "search-result-info",
|
|
2345
2349
|
children: [/* @__PURE__ */ T("div", {
|
|
2346
2350
|
className: "search-result-name",
|
|
2347
|
-
children:
|
|
2351
|
+
children: X(O(e, W?.id), H)
|
|
2348
2352
|
}), e.type === "group" && /* @__PURE__ */ E("div", {
|
|
2349
2353
|
className: "search-result-sub",
|
|
2350
2354
|
children: [
|
|
2351
2355
|
"Thành viên:",
|
|
2352
2356
|
" ",
|
|
2353
|
-
e.matchedMemberNames && e.matchedMemberNames.length > 0 ?
|
|
2357
|
+
e.matchedMemberNames && e.matchedMemberNames.length > 0 ? X(e.matchedMemberNames.join(", "), H) : X(H, H)
|
|
2354
2358
|
]
|
|
2355
2359
|
})]
|
|
2356
2360
|
})]
|
|
2357
|
-
}, `chat-${e.id}`)),
|
|
2361
|
+
}, `chat-${e.id}`)), Y.matchedMembers.slice(0, ye ? void 0 : Math.max(0, 4 - Y.filteredChat.length)).map((e) => /* @__PURE__ */ E("div", {
|
|
2358
2362
|
className: "search-result-item",
|
|
2359
2363
|
onClick: () => {
|
|
2360
|
-
|
|
2364
|
+
Je(String(e.id));
|
|
2361
2365
|
},
|
|
2362
2366
|
children: [/* @__PURE__ */ T("div", {
|
|
2363
2367
|
className: "search-result-avatar",
|
|
@@ -2372,19 +2376,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2372
2376
|
className: "search-result-info",
|
|
2373
2377
|
children: /* @__PURE__ */ T("div", {
|
|
2374
2378
|
className: "search-result-name",
|
|
2375
|
-
children:
|
|
2379
|
+
children: X(e.name, H)
|
|
2376
2380
|
})
|
|
2377
2381
|
})]
|
|
2378
2382
|
}, `member-${e.code}`))]
|
|
2379
2383
|
}),
|
|
2380
|
-
!
|
|
2384
|
+
!ye && Y.filteredChat.length + Y.matchedMembers.length > 4 && /* @__PURE__ */ T("button", {
|
|
2381
2385
|
className: "search-view-all",
|
|
2382
|
-
onClick: () =>
|
|
2386
|
+
onClick: () => be(!0),
|
|
2383
2387
|
children: "Xem tất cả thành viên"
|
|
2384
2388
|
})
|
|
2385
2389
|
]
|
|
2386
2390
|
}),
|
|
2387
|
-
(
|
|
2391
|
+
(L === "all" || L === "message") && Y.matchedMessages.length > 0 && /* @__PURE__ */ E("div", {
|
|
2388
2392
|
className: "search-section",
|
|
2389
2393
|
children: [
|
|
2390
2394
|
/* @__PURE__ */ E("h3", {
|
|
@@ -2394,20 +2398,20 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2394
2398
|
" ",
|
|
2395
2399
|
/* @__PURE__ */ E("span", {
|
|
2396
2400
|
className: "search-count",
|
|
2397
|
-
children: ["+",
|
|
2401
|
+
children: ["+", Y.matchedMessages.length]
|
|
2398
2402
|
})
|
|
2399
2403
|
]
|
|
2400
2404
|
}),
|
|
2401
2405
|
/* @__PURE__ */ T("div", {
|
|
2402
2406
|
className: "search-section-content",
|
|
2403
|
-
children:
|
|
2407
|
+
children: Y.matchedMessages.slice(0, xe ? void 0 : 3).map((e, t) => /* @__PURE__ */ E("div", {
|
|
2404
2408
|
className: "search-result-item message-result",
|
|
2405
|
-
onClick: () =>
|
|
2409
|
+
onClick: () => J(V(e.chat)),
|
|
2406
2410
|
children: [/* @__PURE__ */ T("div", {
|
|
2407
2411
|
className: "search-result-avatar",
|
|
2408
|
-
children: /* @__PURE__ */ T(
|
|
2412
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
2409
2413
|
chat: e.chat,
|
|
2410
|
-
currentUserId:
|
|
2414
|
+
currentUserId: W?.id
|
|
2411
2415
|
})
|
|
2412
2416
|
}), /* @__PURE__ */ E("div", {
|
|
2413
2417
|
className: "search-result-info",
|
|
@@ -2415,26 +2419,26 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2415
2419
|
className: "search-result-top",
|
|
2416
2420
|
children: [/* @__PURE__ */ T("span", {
|
|
2417
2421
|
className: "search-result-name",
|
|
2418
|
-
children: O(e.chat,
|
|
2422
|
+
children: O(e.chat, W?.id)
|
|
2419
2423
|
}), /* @__PURE__ */ T("span", {
|
|
2420
2424
|
className: "search-result-date",
|
|
2421
2425
|
children: e.message?.date
|
|
2422
2426
|
})]
|
|
2423
2427
|
}), /* @__PURE__ */ T("div", {
|
|
2424
2428
|
className: "search-result-text",
|
|
2425
|
-
children:
|
|
2429
|
+
children: X(e.message?.content ?? "", H)
|
|
2426
2430
|
})]
|
|
2427
2431
|
})]
|
|
2428
2432
|
}, `msg-${t}`))
|
|
2429
2433
|
}),
|
|
2430
|
-
!
|
|
2434
|
+
!xe && Y.matchedMessages.length > 3 && /* @__PURE__ */ T("button", {
|
|
2431
2435
|
className: "search-view-all",
|
|
2432
|
-
onClick: () =>
|
|
2436
|
+
onClick: () => Se(!0),
|
|
2433
2437
|
children: "Xem tất cả tin nhắn"
|
|
2434
2438
|
})
|
|
2435
2439
|
]
|
|
2436
2440
|
}),
|
|
2437
|
-
(
|
|
2441
|
+
(L === "all" || L === "file") && Y.matchedFiles.length > 0 && /* @__PURE__ */ E("div", {
|
|
2438
2442
|
className: "search-section",
|
|
2439
2443
|
children: [
|
|
2440
2444
|
/* @__PURE__ */ E("h3", {
|
|
@@ -2444,15 +2448,15 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2444
2448
|
" ",
|
|
2445
2449
|
/* @__PURE__ */ T("span", {
|
|
2446
2450
|
className: "search-count",
|
|
2447
|
-
children:
|
|
2451
|
+
children: Y.totalMatchedFiles
|
|
2448
2452
|
})
|
|
2449
2453
|
]
|
|
2450
2454
|
}),
|
|
2451
2455
|
/* @__PURE__ */ T("div", {
|
|
2452
2456
|
className: "search-section-content",
|
|
2453
|
-
children:
|
|
2457
|
+
children: Y.matchedFiles.slice(0, Ce ? void 0 : 3).map((e, t) => e.files.map((n, r) => /* @__PURE__ */ E("div", {
|
|
2454
2458
|
className: "search-result-item file-result",
|
|
2455
|
-
onClick: () =>
|
|
2459
|
+
onClick: () => J(V(e.chat)),
|
|
2456
2460
|
children: [/* @__PURE__ */ T("div", {
|
|
2457
2461
|
className: "file-icon-wrapper",
|
|
2458
2462
|
children: /* @__PURE__ */ T("i", { className: "fas fa-file-alt" })
|
|
@@ -2472,59 +2476,58 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2472
2476
|
})]
|
|
2473
2477
|
}, `file-${t}-${r}`)))
|
|
2474
2478
|
}),
|
|
2475
|
-
!
|
|
2479
|
+
!Ce && Y.totalMatchedFiles > 3 && /* @__PURE__ */ T("button", {
|
|
2476
2480
|
className: "search-view-all",
|
|
2477
|
-
onClick: () =>
|
|
2481
|
+
onClick: () => we(!0),
|
|
2478
2482
|
children: "Xem tất cả file"
|
|
2479
2483
|
})
|
|
2480
2484
|
]
|
|
2481
2485
|
})
|
|
2482
2486
|
]
|
|
2483
|
-
}) : /* @__PURE__ */ T(
|
|
2484
|
-
chats:
|
|
2485
|
-
selectedChat: W ?? null,
|
|
2487
|
+
}) : /* @__PURE__ */ T(sn, {
|
|
2488
|
+
chats: Y.filteredChat,
|
|
2486
2489
|
onSelectChat: (e) => {
|
|
2487
|
-
|
|
2490
|
+
J(V(e)), W?.id && e.new?.[W.id] > 0 && G.readChat(e.id);
|
|
2488
2491
|
},
|
|
2489
|
-
onRemoveChat: (e, t) => void
|
|
2490
|
-
onUpdateGroup:
|
|
2491
|
-
onAddMemberClick:
|
|
2492
|
+
onRemoveChat: (e, t) => void Re(e, t),
|
|
2493
|
+
onUpdateGroup: ze,
|
|
2494
|
+
onAddMemberClick: Ve
|
|
2492
2495
|
})
|
|
2493
2496
|
})
|
|
2494
2497
|
] }) : /* @__PURE__ */ E("div", {
|
|
2495
2498
|
className: "contact-categories",
|
|
2496
2499
|
children: [/* @__PURE__ */ E("div", {
|
|
2497
|
-
className: `category-item ${
|
|
2498
|
-
onClick: () =>
|
|
2500
|
+
className: `category-item ${re === "members" ? "active" : ""}`,
|
|
2501
|
+
onClick: () => ie("members"),
|
|
2499
2502
|
children: [
|
|
2500
|
-
/* @__PURE__ */ T(
|
|
2503
|
+
/* @__PURE__ */ T(st, {}),
|
|
2501
2504
|
/* @__PURE__ */ T("span", { children: "Danh sách thành viên" }),
|
|
2502
2505
|
/* @__PURE__ */ T("span", {
|
|
2503
2506
|
className: "count",
|
|
2504
|
-
children:
|
|
2507
|
+
children: je.length
|
|
2505
2508
|
})
|
|
2506
2509
|
]
|
|
2507
|
-
}),
|
|
2508
|
-
className: `category-item ${
|
|
2509
|
-
onClick: () =>
|
|
2510
|
+
}), Te && /* @__PURE__ */ E("div", {
|
|
2511
|
+
className: `category-item ${re === "groups" ? "active" : ""}`,
|
|
2512
|
+
onClick: () => ie("groups"),
|
|
2510
2513
|
children: [
|
|
2511
|
-
/* @__PURE__ */ T(
|
|
2514
|
+
/* @__PURE__ */ T(ct, {}),
|
|
2512
2515
|
/* @__PURE__ */ T("span", { children: "Danh sách nhóm" }),
|
|
2513
2516
|
/* @__PURE__ */ T("span", {
|
|
2514
2517
|
className: "count",
|
|
2515
|
-
children:
|
|
2518
|
+
children: K.filter((e) => e.type === "group").length
|
|
2516
2519
|
})
|
|
2517
2520
|
]
|
|
2518
2521
|
})]
|
|
2519
2522
|
})
|
|
2520
2523
|
}),
|
|
2521
|
-
(n === "fullpage" ||
|
|
2524
|
+
(n === "fullpage" || U) && /* @__PURE__ */ E("div", {
|
|
2522
2525
|
className: "chat-main",
|
|
2523
|
-
onDragEnter:
|
|
2524
|
-
onDragOver:
|
|
2525
|
-
onDragLeave:
|
|
2526
|
-
onDrop:
|
|
2527
|
-
children: [
|
|
2526
|
+
onDragEnter: De,
|
|
2527
|
+
onDragOver: Oe,
|
|
2528
|
+
onDragLeave: ke,
|
|
2529
|
+
onDrop: Ae,
|
|
2530
|
+
children: [Ee && /* @__PURE__ */ T("div", {
|
|
2528
2531
|
className: "drag-overlay-full",
|
|
2529
2532
|
children: /* @__PURE__ */ E("div", {
|
|
2530
2533
|
className: "drag-content",
|
|
@@ -2536,7 +2539,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2536
2539
|
children: y("chatWindow.dragFile")
|
|
2537
2540
|
})]
|
|
2538
2541
|
})
|
|
2539
|
-
}),
|
|
2542
|
+
}), ne === "chats" ? U ? /* @__PURE__ */ E(w, { children: [
|
|
2540
2543
|
/* @__PURE__ */ E("div", {
|
|
2541
2544
|
className: "chat-main-header",
|
|
2542
2545
|
children: [/* @__PURE__ */ E("div", {
|
|
@@ -2544,14 +2547,14 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2544
2547
|
children: [
|
|
2545
2548
|
n === "popup" && /* @__PURE__ */ T("button", {
|
|
2546
2549
|
className: "back-btn",
|
|
2547
|
-
onClick: () =>
|
|
2548
|
-
children: /* @__PURE__ */ T(
|
|
2550
|
+
onClick: () => J(V(null)),
|
|
2551
|
+
children: /* @__PURE__ */ T(lt, {})
|
|
2549
2552
|
}),
|
|
2550
2553
|
/* @__PURE__ */ T("div", {
|
|
2551
2554
|
className: "chat-main-avatar",
|
|
2552
|
-
children: /* @__PURE__ */ T(
|
|
2553
|
-
chat:
|
|
2554
|
-
currentUserId:
|
|
2555
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
2556
|
+
chat: U,
|
|
2557
|
+
currentUserId: W?.id
|
|
2555
2558
|
})
|
|
2556
2559
|
}),
|
|
2557
2560
|
/* @__PURE__ */ E("div", {
|
|
@@ -2560,11 +2563,11 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2560
2563
|
className: "chat-main-text-container",
|
|
2561
2564
|
children: [/* @__PURE__ */ T("span", {
|
|
2562
2565
|
className: "chat-main-name",
|
|
2563
|
-
children: O(
|
|
2564
|
-
}),
|
|
2566
|
+
children: O(U, W?.id)
|
|
2567
|
+
}), U.is_muted && /* @__PURE__ */ T(ut, {})]
|
|
2565
2568
|
}), /* @__PURE__ */ T("span", {
|
|
2566
2569
|
className: "chat-main-status",
|
|
2567
|
-
children:
|
|
2570
|
+
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`
|
|
2568
2571
|
})]
|
|
2569
2572
|
})
|
|
2570
2573
|
]
|
|
@@ -2572,16 +2575,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2572
2575
|
className: "chat-main-actions",
|
|
2573
2576
|
children: /* @__PURE__ */ T("button", {
|
|
2574
2577
|
className: `main-action-btn ${M ? "active" : ""}`,
|
|
2575
|
-
onClick: () =>
|
|
2576
|
-
children: /* @__PURE__ */ T(
|
|
2578
|
+
onClick: () => ee(!M),
|
|
2579
|
+
children: /* @__PURE__ */ T(dt, {})
|
|
2577
2580
|
})
|
|
2578
2581
|
})]
|
|
2579
2582
|
}),
|
|
2580
|
-
/* @__PURE__ */ T(
|
|
2581
|
-
/* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(
|
|
2582
|
-
ref: ye,
|
|
2583
|
-
primaryColor: i
|
|
2584
|
-
}) })
|
|
2583
|
+
/* @__PURE__ */ T(xn, {}),
|
|
2584
|
+
/* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(fn, { ref: me }) })
|
|
2585
2585
|
] }) : /* @__PURE__ */ E("div", {
|
|
2586
2586
|
className: "empty-chat-state",
|
|
2587
2587
|
children: [
|
|
@@ -2592,146 +2592,94 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2592
2592
|
/* @__PURE__ */ T("h3", { children: y("chatWindow.selectChat") }),
|
|
2593
2593
|
/* @__PURE__ */ T("p", { children: y("chatWindow.startConversation") })
|
|
2594
2594
|
]
|
|
2595
|
-
}) : /* @__PURE__ */ T(w, { children:
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
}) : /* @__PURE__ */ T(hn, {
|
|
2601
|
-
groups: q.filter((e) => e.type === "group"),
|
|
2602
|
-
currentUserId: G?.id,
|
|
2595
|
+
}) : /* @__PURE__ */ T(w, { children: re === "members" ? /* @__PURE__ */ T(hn, { onMessageClick: (e) => {
|
|
2596
|
+
Je(e), P("chats");
|
|
2597
|
+
} }) : /* @__PURE__ */ T(gn, {
|
|
2598
|
+
groups: K.filter((e) => e.type === "group"),
|
|
2599
|
+
currentUserId: W?.id,
|
|
2603
2600
|
onGroupClick: (e) => {
|
|
2604
|
-
|
|
2601
|
+
J(V(e)), P("chats");
|
|
2605
2602
|
}
|
|
2606
2603
|
}) })]
|
|
2607
2604
|
}),
|
|
2608
|
-
n === "fullpage" &&
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
onUpdateGroup: Ve,
|
|
2605
|
+
n === "fullpage" && ne === "chats" && U && M && /* @__PURE__ */ T(un, {
|
|
2606
|
+
onClose: () => ee(!1),
|
|
2607
|
+
onAddMember: () => Ve(),
|
|
2608
|
+
onUpdateGroup: ze,
|
|
2613
2609
|
onRemoveMember: (e, t) => {
|
|
2614
|
-
|
|
2610
|
+
He(e, t);
|
|
2615
2611
|
}
|
|
2616
2612
|
})
|
|
2617
2613
|
]
|
|
2618
2614
|
})]
|
|
2619
2615
|
}),
|
|
2620
|
-
b && /* @__PURE__ */ T(
|
|
2616
|
+
b && /* @__PURE__ */ T(an, { onClose: () => {
|
|
2621
2617
|
x(!1);
|
|
2622
2618
|
} }),
|
|
2623
|
-
/* @__PURE__ */ T(
|
|
2619
|
+
/* @__PURE__ */ T(Jt, {
|
|
2624
2620
|
isOpen: S,
|
|
2625
2621
|
onClose: () => {
|
|
2626
2622
|
C(!1), k(null);
|
|
2627
2623
|
},
|
|
2628
2624
|
group: D,
|
|
2629
|
-
onUpdate:
|
|
2630
|
-
removeMember:
|
|
2625
|
+
onUpdate: Be,
|
|
2626
|
+
removeMember: He,
|
|
2631
2627
|
primaryColor: i
|
|
2632
2628
|
}),
|
|
2633
|
-
/* @__PURE__ */ T(
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
members: K,
|
|
2640
|
-
currentChatMembers: Ne,
|
|
2641
|
-
onAddMember: Ge,
|
|
2642
|
-
primaryColor: i
|
|
2643
|
-
}),
|
|
2644
|
-
/* @__PURE__ */ T(nn, {
|
|
2645
|
-
isOpen: ne,
|
|
2646
|
-
onClose: () => P(!1),
|
|
2629
|
+
A && /* @__PURE__ */ T(Yt, { onClose: () => {
|
|
2630
|
+
j(!1);
|
|
2631
|
+
} }),
|
|
2632
|
+
/* @__PURE__ */ T(rn, {
|
|
2633
|
+
isOpen: te,
|
|
2634
|
+
onClose: () => N(!1),
|
|
2647
2635
|
defaultColor: "#ffffff"
|
|
2648
2636
|
}),
|
|
2649
|
-
/* @__PURE__ */ T(
|
|
2637
|
+
/* @__PURE__ */ T(Kt, {})
|
|
2650
2638
|
]
|
|
2651
2639
|
});
|
|
2652
|
-
},
|
|
2640
|
+
}, Gt = i(({ chat: e, currentUserId: t }) => {
|
|
2653
2641
|
let n = d(() => e ? e.avatar ? e.avatar : e.type === "group" ? "👥" : e.members?.find((e) => e.id !== t)?.avatar ?? "👤" : "👤", [e, t]);
|
|
2654
2642
|
return n === "👥" || n === "👤" ? /* @__PURE__ */ T("div", {
|
|
2655
|
-
|
|
2656
|
-
display: "flex",
|
|
2657
|
-
alignItems: "center",
|
|
2658
|
-
justifyContent: "center",
|
|
2659
|
-
width: "100%",
|
|
2660
|
-
height: "100%",
|
|
2661
|
-
backgroundColor: "white",
|
|
2662
|
-
borderRadius: "100%"
|
|
2663
|
-
},
|
|
2643
|
+
className: "chat-avatar-emoji",
|
|
2664
2644
|
children: n
|
|
2665
2645
|
}) : /* @__PURE__ */ T("img", {
|
|
2666
2646
|
src: n,
|
|
2667
2647
|
alt: e?.name ?? "Avatar",
|
|
2668
2648
|
loading: "lazy",
|
|
2669
|
-
|
|
2670
|
-
width: "100%",
|
|
2671
|
-
height: "100%",
|
|
2672
|
-
objectFit: "cover",
|
|
2673
|
-
borderRadius: "100%"
|
|
2674
|
-
}
|
|
2649
|
+
className: "chat-avatar-img"
|
|
2675
2650
|
});
|
|
2676
|
-
}),
|
|
2677
|
-
let { toasts: e, removeToast: t } =
|
|
2651
|
+
}), Kt = () => {
|
|
2652
|
+
let { toasts: e, removeToast: t } = Qe(), { theme: n } = _((e) => e.setting);
|
|
2678
2653
|
return /* @__PURE__ */ T("div", {
|
|
2679
2654
|
className: `toast-container ${n === "dark" ? "dark-theme" : ""}`,
|
|
2680
2655
|
children: e.map((e) => /* @__PURE__ */ E("div", {
|
|
2681
2656
|
className: `toast-item ${e.type}`,
|
|
2682
2657
|
children: [
|
|
2683
2658
|
/* @__PURE__ */ T("div", {
|
|
2684
|
-
|
|
2659
|
+
className: "toast-message",
|
|
2685
2660
|
children: e.message
|
|
2686
2661
|
}),
|
|
2687
2662
|
e.isConfirm && /* @__PURE__ */ E("div", {
|
|
2688
|
-
|
|
2689
|
-
display: "flex",
|
|
2690
|
-
gap: "8px",
|
|
2691
|
-
marginTop: "10px"
|
|
2692
|
-
},
|
|
2663
|
+
className: "toast-actions",
|
|
2693
2664
|
children: [/* @__PURE__ */ T("button", {
|
|
2665
|
+
className: "toast-btn cancel",
|
|
2694
2666
|
onClick: () => e.onCancel?.(),
|
|
2695
|
-
style: {
|
|
2696
|
-
padding: "4px 10px",
|
|
2697
|
-
borderRadius: "4px",
|
|
2698
|
-
border: "1px solid rgba(255,255,255,0.3)",
|
|
2699
|
-
background: "rgba(255,255,255,0.1)",
|
|
2700
|
-
color: "inherit",
|
|
2701
|
-
cursor: "pointer",
|
|
2702
|
-
fontSize: "12px"
|
|
2703
|
-
},
|
|
2704
2667
|
children: "Hủy"
|
|
2705
2668
|
}), /* @__PURE__ */ T("button", {
|
|
2669
|
+
className: "toast-btn confirm",
|
|
2706
2670
|
onClick: () => e.onConfirm?.(),
|
|
2707
|
-
style: {
|
|
2708
|
-
padding: "4px 10px",
|
|
2709
|
-
borderRadius: "4px",
|
|
2710
|
-
border: "none",
|
|
2711
|
-
background: e.type === "warning" ? "#ff9800" : "#2196f3",
|
|
2712
|
-
color: "white",
|
|
2713
|
-
cursor: "pointer",
|
|
2714
|
-
fontSize: "12px",
|
|
2715
|
-
fontWeight: "bold"
|
|
2716
|
-
},
|
|
2717
2671
|
children: "Xác nhận"
|
|
2718
2672
|
})]
|
|
2719
2673
|
}),
|
|
2720
2674
|
!e.isConfirm && /* @__PURE__ */ T("button", {
|
|
2675
|
+
className: "toast-close-btn",
|
|
2721
2676
|
onClick: () => t(e.id),
|
|
2722
|
-
style: {
|
|
2723
|
-
background: "none",
|
|
2724
|
-
border: "none",
|
|
2725
|
-
cursor: "pointer",
|
|
2726
|
-
opacity: .5,
|
|
2727
|
-
padding: "0 0 0 8px"
|
|
2728
|
-
},
|
|
2729
2677
|
children: "✕"
|
|
2730
2678
|
})
|
|
2731
2679
|
]
|
|
2732
2680
|
}, e.id))
|
|
2733
2681
|
});
|
|
2734
|
-
},
|
|
2682
|
+
}, qt = ({ member: e }) => {
|
|
2735
2683
|
let [t, n] = p(!1), r = e.name?.charAt(0).toUpperCase() || "?";
|
|
2736
2684
|
if (e.avatar && !t) return /* @__PURE__ */ T("img", {
|
|
2737
2685
|
src: e.avatar,
|
|
@@ -2752,7 +2700,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2752
2700
|
style: { backgroundColor: i[(String(e.id)?.charCodeAt(0) || 0) % i.length] },
|
|
2753
2701
|
children: r
|
|
2754
2702
|
});
|
|
2755
|
-
},
|
|
2703
|
+
}, Jt = ({ isOpen: e, onClose: t, group: n, onUpdate: r, removeMember: i, primaryColor: a }) => {
|
|
2756
2704
|
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);
|
|
2757
2705
|
(e !== v || e && n && n.id !== h) && (y(e), n ? (g(n.id), s(n.name ?? ""), l(n.avatar ?? ""), d(n.avatar ?? "")) : g(null));
|
|
2758
2706
|
let { t: S } = Z();
|
|
@@ -2774,7 +2722,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2774
2722
|
className: "modal-overlay",
|
|
2775
2723
|
onClick: t,
|
|
2776
2724
|
children: /* @__PURE__ */ E("div", {
|
|
2777
|
-
className: "modal-content
|
|
2725
|
+
className: "modal-content update-group-modal",
|
|
2778
2726
|
onClick: (e) => e.stopPropagation(),
|
|
2779
2727
|
children: [
|
|
2780
2728
|
/* @__PURE__ */ E("div", {
|
|
@@ -2794,7 +2742,6 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2794
2742
|
className: "group-info-section",
|
|
2795
2743
|
children: [/* @__PURE__ */ E("label", {
|
|
2796
2744
|
className: "group-avatar-upload",
|
|
2797
|
-
style: { cursor: "pointer" },
|
|
2798
2745
|
children: [/* @__PURE__ */ T("input", {
|
|
2799
2746
|
type: "file",
|
|
2800
2747
|
accept: "image/*",
|
|
@@ -2807,19 +2754,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2807
2754
|
d(e.target?.result);
|
|
2808
2755
|
}, e.readAsDataURL(t);
|
|
2809
2756
|
}
|
|
2810
|
-
}
|
|
2811
|
-
style: { display: "none" }
|
|
2757
|
+
}
|
|
2812
2758
|
}), /* @__PURE__ */ T("div", {
|
|
2813
2759
|
className: "avatar-placeholder",
|
|
2814
2760
|
children: u ? /* @__PURE__ */ T("img", {
|
|
2815
2761
|
src: u,
|
|
2816
|
-
alt: "Preview"
|
|
2817
|
-
style: {
|
|
2818
|
-
width: "100%",
|
|
2819
|
-
height: "100%",
|
|
2820
|
-
borderRadius: "50%",
|
|
2821
|
-
objectFit: "cover"
|
|
2822
|
-
}
|
|
2762
|
+
alt: "Preview"
|
|
2823
2763
|
}) : /* @__PURE__ */ E("svg", {
|
|
2824
2764
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2825
2765
|
width: "20",
|
|
@@ -2849,13 +2789,8 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2849
2789
|
})]
|
|
2850
2790
|
}), /* @__PURE__ */ E("div", {
|
|
2851
2791
|
className: "members-section",
|
|
2852
|
-
style: { marginTop: "8px" },
|
|
2853
2792
|
children: [/* @__PURE__ */ E("span", {
|
|
2854
2793
|
className: "section-title",
|
|
2855
|
-
style: {
|
|
2856
|
-
paddingLeft: "0",
|
|
2857
|
-
display: "block"
|
|
2858
|
-
},
|
|
2859
2794
|
children: [
|
|
2860
2795
|
S("updateGroup.membersSection"),
|
|
2861
2796
|
" (",
|
|
@@ -2864,73 +2799,39 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2864
2799
|
]
|
|
2865
2800
|
}), /* @__PURE__ */ T("div", {
|
|
2866
2801
|
className: "members-list-container",
|
|
2867
|
-
style: {
|
|
2868
|
-
borderTop: "none",
|
|
2869
|
-
height: "240px"
|
|
2870
|
-
},
|
|
2871
2802
|
children: /* @__PURE__ */ T("div", {
|
|
2872
2803
|
className: "members-list",
|
|
2873
2804
|
children: b.map((e) => {
|
|
2874
2805
|
let t = e.id === n.owner_id, r = e.id === x?.id;
|
|
2875
2806
|
return /* @__PURE__ */ E("div", {
|
|
2876
2807
|
className: "member-item",
|
|
2877
|
-
style: { cursor: "default" },
|
|
2878
2808
|
children: [
|
|
2879
2809
|
/* @__PURE__ */ E("div", {
|
|
2880
2810
|
className: "member-avatar-wrapper",
|
|
2881
|
-
children: [/* @__PURE__ */ T(
|
|
2811
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
|
|
2882
2812
|
size: 12,
|
|
2883
2813
|
className: "status-dot"
|
|
2884
2814
|
}) : null]
|
|
2885
2815
|
}),
|
|
2886
2816
|
/* @__PURE__ */ E("div", {
|
|
2887
2817
|
className: "member-info-wrapper",
|
|
2888
|
-
style: {
|
|
2889
|
-
flex: 1,
|
|
2890
|
-
display: "flex",
|
|
2891
|
-
flexDirection: "column",
|
|
2892
|
-
gap: "2px"
|
|
2893
|
-
},
|
|
2894
2818
|
children: [/* @__PURE__ */ E("div", {
|
|
2895
|
-
|
|
2896
|
-
display: "flex",
|
|
2897
|
-
alignItems: "center",
|
|
2898
|
-
gap: "4px"
|
|
2899
|
-
},
|
|
2819
|
+
className: "member-name-row",
|
|
2900
2820
|
children: [/* @__PURE__ */ T("span", {
|
|
2901
2821
|
className: "member-name",
|
|
2902
|
-
style: {
|
|
2903
|
-
fontSize: "15px",
|
|
2904
|
-
fontWeight: "500",
|
|
2905
|
-
color: "#1e293b"
|
|
2906
|
-
},
|
|
2907
2822
|
children: r ? "Bạn" : e.name
|
|
2908
|
-
}), t && /* @__PURE__ */ T(
|
|
2823
|
+
}), t && /* @__PURE__ */ T(at, {
|
|
2909
2824
|
size: 14,
|
|
2910
|
-
|
|
2825
|
+
className: "owner-icon"
|
|
2911
2826
|
})]
|
|
2912
2827
|
}), t && /* @__PURE__ */ T("div", {
|
|
2913
|
-
|
|
2914
|
-
fontSize: "13px",
|
|
2915
|
-
color: "#64748b"
|
|
2916
|
-
},
|
|
2828
|
+
className: "member-role",
|
|
2917
2829
|
children: "Trưởng nhóm"
|
|
2918
2830
|
})]
|
|
2919
2831
|
}),
|
|
2920
2832
|
!t && /* @__PURE__ */ T("button", {
|
|
2921
2833
|
type: "button",
|
|
2922
2834
|
className: "remove-member-btn",
|
|
2923
|
-
style: {
|
|
2924
|
-
background: "transparent",
|
|
2925
|
-
border: "none",
|
|
2926
|
-
color: "#ef4444",
|
|
2927
|
-
cursor: "pointer",
|
|
2928
|
-
padding: "4px",
|
|
2929
|
-
display: "flex",
|
|
2930
|
-
alignItems: "center",
|
|
2931
|
-
justifyContent: "center",
|
|
2932
|
-
fontSize: "14px"
|
|
2933
|
-
},
|
|
2934
2835
|
onClick: (t) => {
|
|
2935
2836
|
t.stopPropagation(), i && n && i(n.id, e.id);
|
|
2936
2837
|
},
|
|
@@ -2962,24 +2863,32 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2962
2863
|
]
|
|
2963
2864
|
})
|
|
2964
2865
|
});
|
|
2965
|
-
},
|
|
2966
|
-
let [
|
|
2967
|
-
if (!
|
|
2968
|
-
let
|
|
2969
|
-
if (!
|
|
2970
|
-
|
|
2866
|
+
}, Yt = ({ onClose: e }) => {
|
|
2867
|
+
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();
|
|
2868
|
+
if (!c || c?.type === "single") return null;
|
|
2869
|
+
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) => {
|
|
2870
|
+
if (!r) {
|
|
2871
|
+
i(!0);
|
|
2971
2872
|
try {
|
|
2972
|
-
await
|
|
2873
|
+
await h(t), e(), n("");
|
|
2973
2874
|
} catch (e) {
|
|
2974
2875
|
console.error(e);
|
|
2975
2876
|
} finally {
|
|
2976
|
-
|
|
2877
|
+
i(!1);
|
|
2977
2878
|
}
|
|
2978
2879
|
}
|
|
2880
|
+
}, h = async (e) => {
|
|
2881
|
+
if (c?.id) try {
|
|
2882
|
+
await G.addMember(c.id, e), u("Đã thêm thành viên vào nhóm thành công!", "success");
|
|
2883
|
+
let t = await G.getMembers(c.id);
|
|
2884
|
+
t?.data && l(_e(t.data));
|
|
2885
|
+
} catch (e) {
|
|
2886
|
+
console.error("Lỗi khi thêm thành viên:", e), u("Không thể thêm thành viên. Vui lòng thử lại!", "error");
|
|
2887
|
+
}
|
|
2979
2888
|
};
|
|
2980
2889
|
return /* @__PURE__ */ T("div", {
|
|
2981
2890
|
className: "modal-overlay",
|
|
2982
|
-
onClick:
|
|
2891
|
+
onClick: e,
|
|
2983
2892
|
children: /* @__PURE__ */ E("div", {
|
|
2984
2893
|
className: "modal-content add-chat-modal",
|
|
2985
2894
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -2988,10 +2897,10 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2988
2897
|
className: "modal-header",
|
|
2989
2898
|
children: [/* @__PURE__ */ T("h3", {
|
|
2990
2899
|
className: "modal-title",
|
|
2991
|
-
children:
|
|
2900
|
+
children: a("addMember.title")
|
|
2992
2901
|
}), /* @__PURE__ */ T("button", {
|
|
2993
2902
|
className: "close-modal-btn",
|
|
2994
|
-
onClick:
|
|
2903
|
+
onClick: e,
|
|
2995
2904
|
children: /* @__PURE__ */ E("svg", {
|
|
2996
2905
|
width: "20",
|
|
2997
2906
|
height: "20",
|
|
@@ -3019,25 +2928,25 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3019
2928
|
className: "modal-body",
|
|
3020
2929
|
children: [/* @__PURE__ */ T("div", {
|
|
3021
2930
|
className: "search-section",
|
|
3022
|
-
children: /* @__PURE__ */ T(
|
|
3023
|
-
value:
|
|
3024
|
-
onChange:
|
|
3025
|
-
placeholder:
|
|
2931
|
+
children: /* @__PURE__ */ T(cn, {
|
|
2932
|
+
value: t,
|
|
2933
|
+
onChange: n,
|
|
2934
|
+
placeholder: a("addMember.memberSearchPlaceholder")
|
|
3026
2935
|
})
|
|
3027
2936
|
}), /* @__PURE__ */ T("div", {
|
|
3028
2937
|
className: "members-list-container",
|
|
3029
2938
|
children: /* @__PURE__ */ T("div", {
|
|
3030
2939
|
className: "members-list",
|
|
3031
|
-
children:
|
|
2940
|
+
children: f.length === 0 ? /* @__PURE__ */ T("div", {
|
|
3032
2941
|
className: "no-members-found",
|
|
3033
|
-
children:
|
|
3034
|
-
}) :
|
|
3035
|
-
className: `member-item ${
|
|
3036
|
-
onClick: () => void
|
|
2942
|
+
children: a("addMember.noMembersFound")
|
|
2943
|
+
}) : f.map((e) => /* @__PURE__ */ E("div", {
|
|
2944
|
+
className: `member-item ${r ? "loading" : ""}`,
|
|
2945
|
+
onClick: () => void m(e.id),
|
|
3037
2946
|
children: [
|
|
3038
2947
|
/* @__PURE__ */ E("div", {
|
|
3039
2948
|
className: "member-avatar-wrapper",
|
|
3040
|
-
children: [/* @__PURE__ */ T(
|
|
2949
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
|
|
3041
2950
|
size: 12,
|
|
3042
2951
|
className: "status-dot"
|
|
3043
2952
|
}) : null]
|
|
@@ -3048,15 +2957,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3048
2957
|
}),
|
|
3049
2958
|
/* @__PURE__ */ T("div", {
|
|
3050
2959
|
className: "member-add-action",
|
|
3051
|
-
|
|
3052
|
-
color: o ?? "#3b82f6",
|
|
3053
|
-
fontSize: "13px",
|
|
3054
|
-
fontWeight: "600",
|
|
3055
|
-
background: "#eff6ff",
|
|
3056
|
-
padding: "4px 12px",
|
|
3057
|
-
borderRadius: "6px"
|
|
3058
|
-
},
|
|
3059
|
-
children: d("addMember.addButton")
|
|
2960
|
+
children: a("addMember.addButton")
|
|
3060
2961
|
})
|
|
3061
2962
|
]
|
|
3062
2963
|
}, e.id))
|
|
@@ -3067,19 +2968,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3067
2968
|
className: "modal-footer",
|
|
3068
2969
|
children: /* @__PURE__ */ T("button", {
|
|
3069
2970
|
className: "footer-btn cancel",
|
|
3070
|
-
onClick:
|
|
3071
|
-
children:
|
|
2971
|
+
onClick: e,
|
|
2972
|
+
children: a("common.buttons.close")
|
|
3072
2973
|
})
|
|
3073
2974
|
})
|
|
3074
2975
|
]
|
|
3075
2976
|
})
|
|
3076
2977
|
});
|
|
3077
|
-
},
|
|
2978
|
+
}, Xt = ({ file: e }) => /* @__PURE__ */ T("img", {
|
|
3078
2979
|
src: e.link,
|
|
3079
2980
|
alt: e.name,
|
|
3080
2981
|
className: "file-viewer-image",
|
|
3081
2982
|
title: e.name
|
|
3082
|
-
}),
|
|
2983
|
+
}), Zt = ({ file: e }) => /* @__PURE__ */ T("div", {
|
|
3083
2984
|
className: "video-container",
|
|
3084
2985
|
children: /* @__PURE__ */ T("video", {
|
|
3085
2986
|
src: e.link,
|
|
@@ -3088,7 +2989,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3088
2989
|
className: "file-viewer-video",
|
|
3089
2990
|
title: e.name
|
|
3090
2991
|
})
|
|
3091
|
-
}),
|
|
2992
|
+
}), Qt = ({ file: e }) => /* @__PURE__ */ T("div", {
|
|
3092
2993
|
className: "audio-container",
|
|
3093
2994
|
children: /* @__PURE__ */ E("div", {
|
|
3094
2995
|
className: "audio-player-wrapper",
|
|
@@ -3103,7 +3004,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3103
3004
|
children: e.name
|
|
3104
3005
|
})]
|
|
3105
3006
|
})
|
|
3106
|
-
}),
|
|
3007
|
+
}), $t = ({ file: e }) => /* @__PURE__ */ T("div", {
|
|
3107
3008
|
className: "pdf-container",
|
|
3108
3009
|
children: /* @__PURE__ */ T("iframe", {
|
|
3109
3010
|
src: `${e.link}#toolbar=1&navpanes=0`,
|
|
@@ -3116,7 +3017,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3116
3017
|
borderRadius: "8px"
|
|
3117
3018
|
}
|
|
3118
3019
|
})
|
|
3119
|
-
}),
|
|
3020
|
+
}), en = ({ file: e, openDownloadButtonText: t }) => /* @__PURE__ */ E("div", {
|
|
3120
3021
|
className: "file-viewer-generic",
|
|
3121
3022
|
children: [
|
|
3122
3023
|
/* @__PURE__ */ T("div", {
|
|
@@ -3135,7 +3036,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3135
3036
|
children: t
|
|
3136
3037
|
})
|
|
3137
3038
|
]
|
|
3138
|
-
}),
|
|
3039
|
+
}), tn = ({ isOpen: e, files: t, initialIndex: n = 0, onClose: r }) => {
|
|
3139
3040
|
let [i, a] = p(n), o = f(null), { t: s } = Z();
|
|
3140
3041
|
if (!e || t.length === 0) return null;
|
|
3141
3042
|
let c = () => {
|
|
@@ -3154,30 +3055,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3154
3055
|
});
|
|
3155
3056
|
}, m = (e) => {
|
|
3156
3057
|
e.key === "ArrowLeft" ? c() : e.key === "ArrowRight" ? l() : e.key === "Escape" && r();
|
|
3157
|
-
}, h = t[i], g = (
|
|
3158
|
-
let t = e.split(".").pop()?.toLowerCase() ?? "";
|
|
3159
|
-
return [
|
|
3160
|
-
"jpg",
|
|
3161
|
-
"jpeg",
|
|
3162
|
-
"png",
|
|
3163
|
-
"gif",
|
|
3164
|
-
"webp",
|
|
3165
|
-
"svg"
|
|
3166
|
-
].includes(t) ? "image" : [
|
|
3167
|
-
"mp4",
|
|
3168
|
-
"webm",
|
|
3169
|
-
"ogg",
|
|
3170
|
-
"mov"
|
|
3171
|
-
].includes(t) ? "video" : [
|
|
3172
|
-
"mp3",
|
|
3173
|
-
"wav",
|
|
3174
|
-
"flac",
|
|
3175
|
-
"m4a",
|
|
3176
|
-
"aac",
|
|
3177
|
-
"wma",
|
|
3178
|
-
"opus"
|
|
3179
|
-
].includes(t) ? "audio" : ["pdf"].includes(t) ? "pdf" : "other";
|
|
3180
|
-
}, _ = g(h.name);
|
|
3058
|
+
}, h = t[i], g = z(h.name);
|
|
3181
3059
|
return /* @__PURE__ */ T("div", {
|
|
3182
3060
|
className: "file-viewer-overlay",
|
|
3183
3061
|
onClick: r,
|
|
@@ -3200,11 +3078,11 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3200
3078
|
/* @__PURE__ */ E("div", {
|
|
3201
3079
|
className: "file-viewer-main",
|
|
3202
3080
|
children: [
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3081
|
+
g === "image" && /* @__PURE__ */ T(Xt, { file: h }),
|
|
3082
|
+
g === "video" && /* @__PURE__ */ T(Zt, { file: h }),
|
|
3083
|
+
g === "audio" && /* @__PURE__ */ T(Qt, { file: h }),
|
|
3084
|
+
g === "pdf" && /* @__PURE__ */ T($t, { file: h }),
|
|
3085
|
+
g === "other" && /* @__PURE__ */ T(en, {
|
|
3208
3086
|
file: h,
|
|
3209
3087
|
openDownloadButtonText: s("fileViewer.openDownloadButton")
|
|
3210
3088
|
})
|
|
@@ -3215,13 +3093,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3215
3093
|
onClick: c,
|
|
3216
3094
|
"aria-label": s("fileViewer.previousAriaLabel"),
|
|
3217
3095
|
title: s("fileViewer.previousButtonTitle"),
|
|
3218
|
-
children: /* @__PURE__ */ T(
|
|
3096
|
+
children: /* @__PURE__ */ T(ft, {})
|
|
3219
3097
|
}), /* @__PURE__ */ T("button", {
|
|
3220
3098
|
className: "file-viewer-nav file-viewer-next",
|
|
3221
3099
|
onClick: l,
|
|
3222
3100
|
"aria-label": s("fileViewer.nextAriaLabel"),
|
|
3223
3101
|
title: s("fileViewer.nextButtonTitle"),
|
|
3224
|
-
children: /* @__PURE__ */ T(
|
|
3102
|
+
children: /* @__PURE__ */ T(pt, {})
|
|
3225
3103
|
})] }),
|
|
3226
3104
|
/* @__PURE__ */ E("div", {
|
|
3227
3105
|
className: "file-viewer-counter",
|
|
@@ -3239,13 +3117,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3239
3117
|
onClick: u,
|
|
3240
3118
|
"aria-label": s("fileViewer.scrollLeftAriaLabel"),
|
|
3241
3119
|
title: s("fileViewer.scrollLeftTitle"),
|
|
3242
|
-
children: /* @__PURE__ */ T(
|
|
3120
|
+
children: /* @__PURE__ */ T(ft, {})
|
|
3243
3121
|
}),
|
|
3244
3122
|
/* @__PURE__ */ T("div", {
|
|
3245
3123
|
className: "file-viewer-thumbnails",
|
|
3246
3124
|
ref: o,
|
|
3247
3125
|
children: t.map((e, t) => {
|
|
3248
|
-
let n =
|
|
3126
|
+
let n = z(e.name);
|
|
3249
3127
|
return /* @__PURE__ */ T("button", {
|
|
3250
3128
|
className: `file-viewer-thumbnail ${t === i ? "active" : ""}`,
|
|
3251
3129
|
onClick: () => a(t),
|
|
@@ -3293,14 +3171,14 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3293
3171
|
onClick: d,
|
|
3294
3172
|
"aria-label": s("fileViewer.scrollRightAriaLabel"),
|
|
3295
3173
|
title: s("fileViewer.scrollRightTitle"),
|
|
3296
|
-
children: /* @__PURE__ */ T(
|
|
3174
|
+
children: /* @__PURE__ */ T(pt, {})
|
|
3297
3175
|
})
|
|
3298
3176
|
]
|
|
3299
3177
|
})
|
|
3300
3178
|
]
|
|
3301
3179
|
})
|
|
3302
3180
|
});
|
|
3303
|
-
},
|
|
3181
|
+
}, nn = [
|
|
3304
3182
|
"#fff",
|
|
3305
3183
|
"#a855f7",
|
|
3306
3184
|
"#3b82f6",
|
|
@@ -3310,7 +3188,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3310
3188
|
"#ec4899",
|
|
3311
3189
|
"#6366f1",
|
|
3312
3190
|
"#14b8a6"
|
|
3313
|
-
],
|
|
3191
|
+
], rn = ({ isOpen: e, onClose: t, defaultColor: n = "#ffffff" }) => {
|
|
3314
3192
|
let r = g(), { t: i } = Z(), { primaryColor: a } = _((e) => e.setting);
|
|
3315
3193
|
return e ? /* @__PURE__ */ T("div", {
|
|
3316
3194
|
className: "modal-overlay",
|
|
@@ -3343,10 +3221,10 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3343
3221
|
}),
|
|
3344
3222
|
/* @__PURE__ */ T("div", {
|
|
3345
3223
|
className: "color-presets",
|
|
3346
|
-
children:
|
|
3224
|
+
children: nn.map((e) => /* @__PURE__ */ T("button", {
|
|
3347
3225
|
className: `color-preset-btn ${a === e ? "active" : ""}`,
|
|
3348
3226
|
style: { backgroundColor: e },
|
|
3349
|
-
onClick: () => r(
|
|
3227
|
+
onClick: () => r(X(e)),
|
|
3350
3228
|
children: a === e && /* @__PURE__ */ T("span", {
|
|
3351
3229
|
className: "check-icon",
|
|
3352
3230
|
children: "✓"
|
|
@@ -3363,7 +3241,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3363
3241
|
children: [/* @__PURE__ */ T("input", {
|
|
3364
3242
|
type: "color",
|
|
3365
3243
|
value: a,
|
|
3366
|
-
onChange: (e) => r(
|
|
3244
|
+
onChange: (e) => r(X(e.target.value)),
|
|
3367
3245
|
className: "color-input"
|
|
3368
3246
|
}), /* @__PURE__ */ T("span", {
|
|
3369
3247
|
className: "color-hex-code",
|
|
@@ -3381,48 +3259,49 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3381
3259
|
children: i("themeModal.doneButton")
|
|
3382
3260
|
}), /* @__PURE__ */ T("button", {
|
|
3383
3261
|
className: "modal-btn cancel",
|
|
3384
|
-
onClick: () => r(
|
|
3262
|
+
onClick: () => r(X(n)),
|
|
3385
3263
|
children: i("themeModal.resetButton")
|
|
3386
3264
|
})]
|
|
3387
3265
|
})
|
|
3388
3266
|
]
|
|
3389
3267
|
})
|
|
3390
3268
|
}) : null;
|
|
3391
|
-
},
|
|
3392
|
-
let { t } = Z(), n = g(), {
|
|
3393
|
-
|
|
3394
|
-
},
|
|
3269
|
+
}, an = ({ onClose: e }) => {
|
|
3270
|
+
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) => {
|
|
3271
|
+
c((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
3272
|
+
}, C = (e) => {
|
|
3395
3273
|
let t = e.target.files?.[0];
|
|
3396
3274
|
if (t) {
|
|
3397
|
-
|
|
3275
|
+
v(t);
|
|
3398
3276
|
let e = new FileReader();
|
|
3399
3277
|
e.onload = (e) => {
|
|
3400
|
-
|
|
3278
|
+
b(e.target?.result);
|
|
3401
3279
|
}, e.readAsDataURL(t);
|
|
3402
3280
|
}
|
|
3403
|
-
},
|
|
3404
|
-
|
|
3405
|
-
},
|
|
3406
|
-
if (!(
|
|
3407
|
-
if (!
|
|
3408
|
-
let t =
|
|
3409
|
-
|
|
3281
|
+
}, w = () => {
|
|
3282
|
+
x.current?.click();
|
|
3283
|
+
}, D = a(async () => {
|
|
3284
|
+
if (!(s.length < 2)) try {
|
|
3285
|
+
if (!l.trim()) return;
|
|
3286
|
+
let t = s.map((e) => Number(e)), r = typeof h == "string" ? h.trim() || void 0 : h || void 0, i = (await G.addGroup(t, l, r)).data;
|
|
3287
|
+
i && n(V(o.find((e) => e.id === i.id) || i)), e();
|
|
3410
3288
|
} catch (e) {
|
|
3411
|
-
console.error("Lỗi khi tạo cuộc trò chuyện:", e),
|
|
3289
|
+
console.error("Lỗi khi tạo cuộc trò chuyện:", e), r("Không thể tạo cuộc trò chuyện. Vui lòng thử lại sau.", "error");
|
|
3412
3290
|
}
|
|
3413
3291
|
}, [
|
|
3292
|
+
s,
|
|
3293
|
+
l,
|
|
3294
|
+
h,
|
|
3414
3295
|
o,
|
|
3415
|
-
c,
|
|
3416
|
-
m,
|
|
3417
|
-
i,
|
|
3418
3296
|
e,
|
|
3419
|
-
n
|
|
3297
|
+
n,
|
|
3298
|
+
r
|
|
3420
3299
|
]);
|
|
3421
3300
|
return /* @__PURE__ */ T("div", {
|
|
3422
3301
|
className: "modal-overlay",
|
|
3423
3302
|
onClick: e,
|
|
3424
3303
|
children: /* @__PURE__ */ E("div", {
|
|
3425
|
-
className: `modal-content add-chat-modal ${
|
|
3304
|
+
className: `modal-content add-chat-modal ${s.length > 0 ? "has-tags" : ""}`,
|
|
3426
3305
|
onClick: (e) => e.stopPropagation(),
|
|
3427
3306
|
children: [
|
|
3428
3307
|
/* @__PURE__ */ E("div", {
|
|
@@ -3444,45 +3323,45 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3444
3323
|
children: [/* @__PURE__ */ E("div", {
|
|
3445
3324
|
className: "group-avatar-upload",
|
|
3446
3325
|
children: [/* @__PURE__ */ T("input", {
|
|
3447
|
-
ref:
|
|
3326
|
+
ref: x,
|
|
3448
3327
|
type: "file",
|
|
3449
3328
|
accept: "image/*",
|
|
3450
|
-
onChange:
|
|
3329
|
+
onChange: C,
|
|
3451
3330
|
className: "display-none"
|
|
3452
3331
|
}), /* @__PURE__ */ T("button", {
|
|
3453
3332
|
type: "button",
|
|
3454
3333
|
className: "avatar-placeholder",
|
|
3455
|
-
onClick:
|
|
3456
|
-
children:
|
|
3457
|
-
src:
|
|
3334
|
+
onClick: w,
|
|
3335
|
+
children: y ? /* @__PURE__ */ T("img", {
|
|
3336
|
+
src: y,
|
|
3458
3337
|
alt: "Group avatar",
|
|
3459
3338
|
className: "preview-avatar"
|
|
3460
|
-
}) : /* @__PURE__ */ T(
|
|
3339
|
+
}) : /* @__PURE__ */ T(Ut, {})
|
|
3461
3340
|
})]
|
|
3462
3341
|
}), /* @__PURE__ */ T("input", {
|
|
3463
3342
|
type: "text",
|
|
3464
3343
|
className: "group-name-input",
|
|
3465
3344
|
placeholder: t("addChat.groupNamePlaceholder"),
|
|
3466
|
-
value:
|
|
3467
|
-
onChange: (e) =>
|
|
3345
|
+
value: l,
|
|
3346
|
+
onChange: (e) => u(e.target.value)
|
|
3468
3347
|
})]
|
|
3469
3348
|
}),
|
|
3470
3349
|
/* @__PURE__ */ T("div", {
|
|
3471
3350
|
className: "search-section",
|
|
3472
|
-
children: /* @__PURE__ */ T(
|
|
3473
|
-
value:
|
|
3474
|
-
onChange:
|
|
3351
|
+
children: /* @__PURE__ */ T(cn, {
|
|
3352
|
+
value: d,
|
|
3353
|
+
onChange: m,
|
|
3475
3354
|
placeholder: t("addChat.memberSearchPlaceholder")
|
|
3476
3355
|
})
|
|
3477
3356
|
}),
|
|
3478
|
-
|
|
3357
|
+
s.length > 0 && /* @__PURE__ */ T("div", {
|
|
3479
3358
|
className: "selected-members-tags",
|
|
3480
|
-
children:
|
|
3359
|
+
children: s.map((e) => /* @__PURE__ */ E("div", {
|
|
3481
3360
|
className: "member-tag",
|
|
3482
|
-
children: [/* @__PURE__ */ T("span", { children:
|
|
3361
|
+
children: [/* @__PURE__ */ T("span", { children: i.find((t) => String(t.id) === e)?.name ?? e }), /* @__PURE__ */ T("button", {
|
|
3483
3362
|
className: "remove-tag-btn",
|
|
3484
3363
|
onClick: (t) => {
|
|
3485
|
-
t.stopPropagation(),
|
|
3364
|
+
t.stopPropagation(), S(e);
|
|
3486
3365
|
},
|
|
3487
3366
|
children: /* @__PURE__ */ T($, { size: 14 })
|
|
3488
3367
|
})]
|
|
@@ -3492,15 +3371,15 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3492
3371
|
className: "members-list-container",
|
|
3493
3372
|
children: /* @__PURE__ */ T("div", {
|
|
3494
3373
|
className: "members-list",
|
|
3495
|
-
children:
|
|
3496
|
-
className: `member-item ${
|
|
3497
|
-
onClick: () =>
|
|
3374
|
+
children: i.filter((e) => e.name.toLowerCase().includes(d.toLowerCase())).map((e) => /* @__PURE__ */ E("div", {
|
|
3375
|
+
className: `member-item ${s.includes(String(e.id)) ? "selected" : ""}`,
|
|
3376
|
+
onClick: () => S(String(e.id)),
|
|
3498
3377
|
children: [
|
|
3499
3378
|
/* @__PURE__ */ T("div", {
|
|
3500
3379
|
className: "member-checkbox",
|
|
3501
3380
|
children: /* @__PURE__ */ T("div", {
|
|
3502
|
-
className: `checkbox-custom ${
|
|
3503
|
-
children:
|
|
3381
|
+
className: `checkbox-custom ${s.includes(String(e.id)) ? "checked" : ""}`,
|
|
3382
|
+
children: s.includes(String(e.id)) && /* @__PURE__ */ T("svg", {
|
|
3504
3383
|
width: "12",
|
|
3505
3384
|
height: "12",
|
|
3506
3385
|
viewBox: "0 0 24 24",
|
|
@@ -3527,7 +3406,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3527
3406
|
className: "avatar-letter",
|
|
3528
3407
|
children: e.name.charAt(0).toUpperCase()
|
|
3529
3408
|
})
|
|
3530
|
-
}), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(
|
|
3409
|
+
}), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
|
|
3531
3410
|
size: 12,
|
|
3532
3411
|
className: "status-dot"
|
|
3533
3412
|
}) : null]
|
|
@@ -3549,16 +3428,16 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3549
3428
|
onClick: e,
|
|
3550
3429
|
children: "Hủy"
|
|
3551
3430
|
}), /* @__PURE__ */ T("button", {
|
|
3552
|
-
className: `footer-btn confirm ${
|
|
3553
|
-
onClick: () => void
|
|
3554
|
-
disabled:
|
|
3431
|
+
className: `footer-btn confirm ${s.length === 0 || s.length < 2 || !l.trim() ? "disabled" : ""}`,
|
|
3432
|
+
onClick: () => void D(),
|
|
3433
|
+
disabled: s.length === 0,
|
|
3555
3434
|
children: t("addChat.selectMembers")
|
|
3556
3435
|
})]
|
|
3557
3436
|
})
|
|
3558
3437
|
]
|
|
3559
3438
|
})
|
|
3560
3439
|
});
|
|
3561
|
-
},
|
|
3440
|
+
}, on = ({ user: e, onClose: t, isOnline: n, onMessage: r }) => e ? /* @__PURE__ */ T("div", {
|
|
3562
3441
|
className: "modal-overlay",
|
|
3563
3442
|
onClick: t,
|
|
3564
3443
|
children: /* @__PURE__ */ E("div", {
|
|
@@ -3575,7 +3454,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3575
3454
|
children: [
|
|
3576
3455
|
/* @__PURE__ */ E("div", {
|
|
3577
3456
|
className: "profile-avatar-wrapper",
|
|
3578
|
-
children: [/* @__PURE__ */ T(
|
|
3457
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), n && /* @__PURE__ */ T("span", { className: "profile-online-status" })]
|
|
3579
3458
|
}),
|
|
3580
3459
|
/* @__PURE__ */ T("h3", {
|
|
3581
3460
|
className: "profile-name",
|
|
@@ -3592,7 +3471,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3592
3471
|
children: /* @__PURE__ */ E("button", {
|
|
3593
3472
|
className: "profile-action-btn",
|
|
3594
3473
|
onClick: r,
|
|
3595
|
-
children: [/* @__PURE__ */ T(
|
|
3474
|
+
children: [/* @__PURE__ */ T(mt, {}), /* @__PURE__ */ T("span", { children: "Nhắn tin" })]
|
|
3596
3475
|
})
|
|
3597
3476
|
}),
|
|
3598
3477
|
/* @__PURE__ */ E("div", {
|
|
@@ -3652,28 +3531,25 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3652
3531
|
})
|
|
3653
3532
|
]
|
|
3654
3533
|
})
|
|
3655
|
-
}) : null,
|
|
3656
|
-
let { currentUser:
|
|
3534
|
+
}) : null, sn = ({ chats: e, onSelectChat: t }) => {
|
|
3535
|
+
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([], {
|
|
3657
3536
|
hour: "2-digit",
|
|
3658
3537
|
minute: "2-digit"
|
|
3659
3538
|
}) : "";
|
|
3660
|
-
return
|
|
3661
|
-
let e = () => o(null);
|
|
3662
|
-
return document.addEventListener("click", e), () => document.removeEventListener("click", e);
|
|
3663
|
-
}, []), /* @__PURE__ */ E("div", {
|
|
3539
|
+
return /* @__PURE__ */ E("div", {
|
|
3664
3540
|
className: "chat-list",
|
|
3665
3541
|
children: [
|
|
3666
|
-
|
|
3542
|
+
u.length > 0 && null,
|
|
3667
3543
|
/* @__PURE__ */ E("div", {
|
|
3668
3544
|
className: "chat-list-section",
|
|
3669
3545
|
children: [/* @__PURE__ */ T("div", {
|
|
3670
3546
|
className: "section-header",
|
|
3671
3547
|
children: /* @__PURE__ */ T("span", { children: "Tất cả tin nhắn" })
|
|
3672
|
-
}),
|
|
3673
|
-
let
|
|
3548
|
+
}), d.length > 0 ? d.map((e) => {
|
|
3549
|
+
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);
|
|
3674
3550
|
return /* @__PURE__ */ E("div", {
|
|
3675
|
-
className: `chat-item ${
|
|
3676
|
-
onClick: () =>
|
|
3551
|
+
className: `chat-item ${i?.id === e.id ? "active" : ""} `,
|
|
3552
|
+
onClick: () => t(e),
|
|
3677
3553
|
children: [/* @__PURE__ */ E("div", {
|
|
3678
3554
|
className: "chat-item-avatar",
|
|
3679
3555
|
style: {
|
|
@@ -3682,15 +3558,15 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3682
3558
|
cursor: e.type === "single" ? "pointer" : "default"
|
|
3683
3559
|
},
|
|
3684
3560
|
onClick: (t) => {
|
|
3685
|
-
t.stopPropagation(), e.type === "single" &&
|
|
3686
|
-
user:
|
|
3687
|
-
isOnline:
|
|
3561
|
+
t.stopPropagation(), e.type === "single" && l && o({
|
|
3562
|
+
user: l,
|
|
3563
|
+
isOnline: u
|
|
3688
3564
|
});
|
|
3689
3565
|
},
|
|
3690
|
-
children: [/* @__PURE__ */ T(
|
|
3566
|
+
children: [/* @__PURE__ */ T(Gt, {
|
|
3691
3567
|
chat: e,
|
|
3692
|
-
currentUserId:
|
|
3693
|
-
}), e.type === "single" &&
|
|
3568
|
+
currentUserId: n?.id
|
|
3569
|
+
}), e.type === "single" && u && /* @__PURE__ */ T(it, {
|
|
3694
3570
|
size: 12,
|
|
3695
3571
|
className: "online-indicator"
|
|
3696
3572
|
})]
|
|
@@ -3702,11 +3578,11 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3702
3578
|
className: "chat-item-name",
|
|
3703
3579
|
children: /* @__PURE__ */ T("span", {
|
|
3704
3580
|
className: "name-text",
|
|
3705
|
-
children: O(e,
|
|
3581
|
+
children: O(e, n?.id)
|
|
3706
3582
|
})
|
|
3707
3583
|
}), /* @__PURE__ */ T("span", {
|
|
3708
3584
|
className: "chat-item-time",
|
|
3709
|
-
children:
|
|
3585
|
+
children: f(e.message?.created_at ?? e.updated_at)
|
|
3710
3586
|
})]
|
|
3711
3587
|
}), /* @__PURE__ */ E("div", {
|
|
3712
3588
|
className: "info-bottom-row",
|
|
@@ -3714,46 +3590,46 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3714
3590
|
className: "chat-item-last",
|
|
3715
3591
|
children: /* @__PURE__ */ E("span", {
|
|
3716
3592
|
className: "last-message-text",
|
|
3717
|
-
children: [
|
|
3593
|
+
children: [a && `${s("chatList.yourMessage")}`, e.message?.content ?? (e.message?.files?.length ? s("chatMessage.states.attachment") : "")]
|
|
3718
3594
|
})
|
|
3719
3595
|
}), /* @__PURE__ */ E("div", {
|
|
3720
3596
|
className: "info-bottom-right",
|
|
3721
|
-
children: [e.is_muted && /* @__PURE__ */ T(
|
|
3597
|
+
children: [e.is_muted && /* @__PURE__ */ T(ut, {
|
|
3722
3598
|
size: 14,
|
|
3723
3599
|
className: "mute-icon-list"
|
|
3724
|
-
}),
|
|
3600
|
+
}), c > 0 && /* @__PURE__ */ T("div", {
|
|
3725
3601
|
className: "unread-badge-circle",
|
|
3726
|
-
children:
|
|
3602
|
+
children: c > 99 ? "99+" : c
|
|
3727
3603
|
})]
|
|
3728
3604
|
})]
|
|
3729
3605
|
})]
|
|
3730
3606
|
})]
|
|
3731
3607
|
}, e.id);
|
|
3732
|
-
}) :
|
|
3608
|
+
}) : u.length === 0 ? /* @__PURE__ */ T("div", {
|
|
3733
3609
|
className: "empty-chat-list",
|
|
3734
3610
|
children: "Không có tin nhắn nào"
|
|
3735
3611
|
}) : null]
|
|
3736
3612
|
}),
|
|
3737
|
-
|
|
3738
|
-
user:
|
|
3739
|
-
isOnline:
|
|
3740
|
-
onClose: () =>
|
|
3613
|
+
a && /* @__PURE__ */ T(on, {
|
|
3614
|
+
user: a.user,
|
|
3615
|
+
isOnline: a.isOnline,
|
|
3616
|
+
onClose: () => o(null),
|
|
3741
3617
|
onMessage: () => {
|
|
3742
|
-
if (!
|
|
3743
|
-
let
|
|
3744
|
-
|
|
3618
|
+
if (!a) return;
|
|
3619
|
+
let n = e.find((e) => e.type === "single" && e.members?.some((e) => e.id === a.user.id));
|
|
3620
|
+
n && t(n), o(null);
|
|
3745
3621
|
}
|
|
3746
3622
|
})
|
|
3747
3623
|
]
|
|
3748
3624
|
});
|
|
3749
|
-
},
|
|
3750
|
-
let { hasGroupChat: a } = _(
|
|
3625
|
+
}, cn = ({ value: e, onChange: t, onAddClick: n, placeholder: r, activeTab: i }) => {
|
|
3626
|
+
let { hasGroupChat: a } = _(Ue), { t: o } = Z(), s = o("chatSearchBar.searchPlaceholder");
|
|
3751
3627
|
return /* @__PURE__ */ E("div", {
|
|
3752
3628
|
className: "chat-search-bar",
|
|
3753
3629
|
children: [/* @__PURE__ */ E("div", {
|
|
3754
3630
|
className: "search-input-wrapper",
|
|
3755
3631
|
children: [
|
|
3756
|
-
/* @__PURE__ */ T(
|
|
3632
|
+
/* @__PURE__ */ T(_t, { className: "search-icon" }),
|
|
3757
3633
|
/* @__PURE__ */ T("input", {
|
|
3758
3634
|
type: "text",
|
|
3759
3635
|
className: "search-input",
|
|
@@ -3771,68 +3647,56 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3771
3647
|
className: "action-btn add-group-btn",
|
|
3772
3648
|
onClick: n,
|
|
3773
3649
|
title: o("chatSearchBar.createGroup"),
|
|
3774
|
-
children: /* @__PURE__ */ T(
|
|
3650
|
+
children: /* @__PURE__ */ T(ct, {})
|
|
3775
3651
|
})]
|
|
3776
3652
|
});
|
|
3777
|
-
},
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
className: "app-
|
|
3781
|
-
children: [
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
className: "nav-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3653
|
+
}, ln = ({ setIsThemeModalOpen: e, activeTab: t, setActiveTab: n }) => {
|
|
3654
|
+
let { currentUser: r } = _((e) => e.chat);
|
|
3655
|
+
return /* @__PURE__ */ E("div", {
|
|
3656
|
+
className: "app-sidebar",
|
|
3657
|
+
children: [/* @__PURE__ */ E("div", {
|
|
3658
|
+
className: "app-nav",
|
|
3659
|
+
children: [
|
|
3660
|
+
/* @__PURE__ */ T("div", {
|
|
3661
|
+
className: `nav-item ${t === "chats" ? "active" : ""}`,
|
|
3662
|
+
onClick: () => n("chats"),
|
|
3663
|
+
children: /* @__PURE__ */ T(ht, {})
|
|
3664
|
+
}),
|
|
3665
|
+
/* @__PURE__ */ T("div", {
|
|
3666
|
+
className: `nav-item ${t === "contacts" ? "active" : ""}`,
|
|
3667
|
+
onClick: () => n("contacts"),
|
|
3668
|
+
children: /* @__PURE__ */ T(ct, {})
|
|
3669
|
+
}),
|
|
3670
|
+
/* @__PURE__ */ T("div", { className: "nav-separator" }),
|
|
3671
|
+
/* @__PURE__ */ T("div", {
|
|
3672
|
+
className: "nav-item",
|
|
3673
|
+
children: /* @__PURE__ */ T(gt, {})
|
|
3674
|
+
}),
|
|
3675
|
+
/* @__PURE__ */ T("div", {
|
|
3676
|
+
className: "nav-item",
|
|
3677
|
+
children: /* @__PURE__ */ T(_t, {})
|
|
3678
|
+
})
|
|
3679
|
+
]
|
|
3680
|
+
}), /* @__PURE__ */ E("div", {
|
|
3681
|
+
className: "app-sidebar-footer",
|
|
3682
|
+
children: [/* @__PURE__ */ T("div", {
|
|
3798
3683
|
className: "nav-item",
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
src: t.avatar,
|
|
3812
|
-
alt: t.name,
|
|
3813
|
-
style: {
|
|
3814
|
-
width: "100%",
|
|
3815
|
-
height: "100%",
|
|
3816
|
-
borderRadius: "50%",
|
|
3817
|
-
objectFit: "cover"
|
|
3818
|
-
}
|
|
3819
|
-
}) : /* @__PURE__ */ T("div", {
|
|
3820
|
-
style: {
|
|
3821
|
-
width: "100%",
|
|
3822
|
-
height: "100%",
|
|
3823
|
-
display: "flex",
|
|
3824
|
-
alignItems: "center",
|
|
3825
|
-
justifyContent: "center",
|
|
3826
|
-
fontSize: "14px",
|
|
3827
|
-
fontWeight: "bold",
|
|
3828
|
-
color: "#64748b"
|
|
3829
|
-
},
|
|
3830
|
-
children: t?.name?.[0].toUpperCase()
|
|
3831
|
-
})
|
|
3684
|
+
onClick: () => e(!0),
|
|
3685
|
+
children: /* @__PURE__ */ T(vt, {})
|
|
3686
|
+
}), /* @__PURE__ */ T("div", {
|
|
3687
|
+
className: "app-avatar",
|
|
3688
|
+
children: r?.avatar ? /* @__PURE__ */ T("img", {
|
|
3689
|
+
src: r.avatar,
|
|
3690
|
+
alt: r.name
|
|
3691
|
+
}) : /* @__PURE__ */ T("div", {
|
|
3692
|
+
className: "app-avatar-fallback",
|
|
3693
|
+
children: r?.name?.[0].toUpperCase()
|
|
3694
|
+
})
|
|
3695
|
+
})]
|
|
3832
3696
|
})]
|
|
3833
|
-
})
|
|
3834
|
-
}
|
|
3835
|
-
let
|
|
3697
|
+
});
|
|
3698
|
+
}, un = ({ onClose: e, onAddMember: t, onUpdateGroup: n, onRemoveMember: r }) => {
|
|
3699
|
+
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({
|
|
3836
3700
|
canChangeInfo: !0,
|
|
3837
3701
|
canPinMessage: !0,
|
|
3838
3702
|
canCreateNote: !0,
|
|
@@ -3841,33 +3705,33 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3841
3705
|
approveNewMembers: !1,
|
|
3842
3706
|
markAdminMessages: !0,
|
|
3843
3707
|
allowNewMembersReadRecent: !0
|
|
3844
|
-
}),
|
|
3845
|
-
|
|
3708
|
+
}), k = (e) => {
|
|
3709
|
+
D((t) => ({
|
|
3846
3710
|
...t,
|
|
3847
3711
|
[e]: !t[e]
|
|
3848
3712
|
}));
|
|
3849
3713
|
};
|
|
3850
3714
|
c(() => {
|
|
3851
3715
|
let e = () => {
|
|
3852
|
-
|
|
3716
|
+
v(null);
|
|
3853
3717
|
};
|
|
3854
|
-
return
|
|
3718
|
+
return h !== null && window.addEventListener("click", e), () => {
|
|
3855
3719
|
window.removeEventListener("click", e);
|
|
3856
3720
|
};
|
|
3857
|
-
}, [
|
|
3858
|
-
let
|
|
3859
|
-
if (!
|
|
3860
|
-
let e =
|
|
3861
|
-
if (e)
|
|
3721
|
+
}, [h]);
|
|
3722
|
+
let A = s.length ?? 0, j = O(l, u?.id, ""), M = s ?? [], ee = async () => {
|
|
3723
|
+
if (!x) return;
|
|
3724
|
+
let e = l;
|
|
3725
|
+
if (e) i(V(e));
|
|
3862
3726
|
else try {
|
|
3863
|
-
let e = await
|
|
3864
|
-
e?.data && (
|
|
3727
|
+
let e = await G.addChat(x.user.id);
|
|
3728
|
+
e?.data && (i(we(e.data)), i(V(e.data)));
|
|
3865
3729
|
} catch (e) {
|
|
3866
3730
|
console.error("Lỗi khi tạo phòng chat mới:", e);
|
|
3867
3731
|
}
|
|
3868
|
-
|
|
3732
|
+
S(null);
|
|
3869
3733
|
};
|
|
3870
|
-
return
|
|
3734
|
+
return f === "group_management" ? /* @__PURE__ */ E("div", {
|
|
3871
3735
|
className: "side-bar-info-chat group-management-view",
|
|
3872
3736
|
children: [/* @__PURE__ */ E("div", {
|
|
3873
3737
|
className: "info-header",
|
|
@@ -3875,15 +3739,15 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3875
3739
|
className: "header-left",
|
|
3876
3740
|
children: [/* @__PURE__ */ T("button", {
|
|
3877
3741
|
className: "back-info-btn",
|
|
3878
|
-
onClick: () =>
|
|
3879
|
-
children: /* @__PURE__ */ T(
|
|
3742
|
+
onClick: () => m("info"),
|
|
3743
|
+
children: /* @__PURE__ */ T(lt, {})
|
|
3880
3744
|
}), /* @__PURE__ */ T("h3", {
|
|
3881
3745
|
className: "header-title",
|
|
3882
3746
|
children: "Quản lý nhóm"
|
|
3883
3747
|
})]
|
|
3884
3748
|
}), /* @__PURE__ */ T("button", {
|
|
3885
3749
|
className: "close-info-btn",
|
|
3886
|
-
onClick:
|
|
3750
|
+
onClick: e,
|
|
3887
3751
|
children: /* @__PURE__ */ T($, {})
|
|
3888
3752
|
})]
|
|
3889
3753
|
}), /* @__PURE__ */ E("div", {
|
|
@@ -3899,46 +3763,46 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3899
3763
|
children: [
|
|
3900
3764
|
/* @__PURE__ */ E("div", {
|
|
3901
3765
|
className: "setting-item",
|
|
3902
|
-
onClick: () =>
|
|
3766
|
+
onClick: () => k("canChangeInfo"),
|
|
3903
3767
|
children: [/* @__PURE__ */ T("span", { children: "Thay đổi tên & ảnh đại diện của nhóm" }), /* @__PURE__ */ T("input", {
|
|
3904
3768
|
type: "checkbox",
|
|
3905
|
-
checked:
|
|
3769
|
+
checked: C.canChangeInfo,
|
|
3906
3770
|
readOnly: !0
|
|
3907
3771
|
})]
|
|
3908
3772
|
}),
|
|
3909
3773
|
/* @__PURE__ */ E("div", {
|
|
3910
3774
|
className: "setting-item",
|
|
3911
|
-
onClick: () =>
|
|
3775
|
+
onClick: () => k("canPinMessage"),
|
|
3912
3776
|
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", {
|
|
3913
3777
|
type: "checkbox",
|
|
3914
|
-
checked:
|
|
3778
|
+
checked: C.canPinMessage,
|
|
3915
3779
|
readOnly: !0
|
|
3916
3780
|
})]
|
|
3917
3781
|
}),
|
|
3918
3782
|
/* @__PURE__ */ E("div", {
|
|
3919
3783
|
className: "setting-item",
|
|
3920
|
-
onClick: () =>
|
|
3784
|
+
onClick: () => k("canCreateNote"),
|
|
3921
3785
|
children: [/* @__PURE__ */ T("span", { children: "Tạo mới ghi chú, nhắc hẹn" }), /* @__PURE__ */ T("input", {
|
|
3922
3786
|
type: "checkbox",
|
|
3923
|
-
checked:
|
|
3787
|
+
checked: C.canCreateNote,
|
|
3924
3788
|
readOnly: !0
|
|
3925
3789
|
})]
|
|
3926
3790
|
}),
|
|
3927
3791
|
/* @__PURE__ */ E("div", {
|
|
3928
3792
|
className: "setting-item",
|
|
3929
|
-
onClick: () =>
|
|
3793
|
+
onClick: () => k("canCreatePoll"),
|
|
3930
3794
|
children: [/* @__PURE__ */ T("span", { children: "Tạo mới bình chọn" }), /* @__PURE__ */ T("input", {
|
|
3931
3795
|
type: "checkbox",
|
|
3932
|
-
checked:
|
|
3796
|
+
checked: C.canCreatePoll,
|
|
3933
3797
|
readOnly: !0
|
|
3934
3798
|
})]
|
|
3935
3799
|
}),
|
|
3936
3800
|
/* @__PURE__ */ E("div", {
|
|
3937
3801
|
className: "setting-item",
|
|
3938
|
-
onClick: () =>
|
|
3802
|
+
onClick: () => k("canSendMessage"),
|
|
3939
3803
|
children: [/* @__PURE__ */ T("span", { children: "Gửi tin nhắn" }), /* @__PURE__ */ T("input", {
|
|
3940
3804
|
type: "checkbox",
|
|
3941
|
-
checked:
|
|
3805
|
+
checked: C.canSendMessage,
|
|
3942
3806
|
readOnly: !0
|
|
3943
3807
|
})]
|
|
3944
3808
|
})
|
|
@@ -3954,13 +3818,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3954
3818
|
className: "setting-item-switch",
|
|
3955
3819
|
children: [/* @__PURE__ */ E("div", {
|
|
3956
3820
|
className: "setting-info",
|
|
3957
|
-
children: [/* @__PURE__ */ T("span", { children: "Chế độ phê duyệt thành viên mới" }), /* @__PURE__ */ T(
|
|
3821
|
+
children: [/* @__PURE__ */ T("span", { children: "Chế độ phê duyệt thành viên mới" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
|
|
3958
3822
|
}), /* @__PURE__ */ E("label", {
|
|
3959
3823
|
className: "switch",
|
|
3960
3824
|
children: [/* @__PURE__ */ T("input", {
|
|
3961
3825
|
type: "checkbox",
|
|
3962
|
-
checked:
|
|
3963
|
-
onChange: () =>
|
|
3826
|
+
checked: C.approveNewMembers,
|
|
3827
|
+
onChange: () => k("approveNewMembers")
|
|
3964
3828
|
}), /* @__PURE__ */ T("span", { className: "slider round" })]
|
|
3965
3829
|
})]
|
|
3966
3830
|
}),
|
|
@@ -3968,13 +3832,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3968
3832
|
className: "setting-item-switch",
|
|
3969
3833
|
children: [/* @__PURE__ */ E("div", {
|
|
3970
3834
|
className: "setting-info",
|
|
3971
|
-
children: [/* @__PURE__ */ T("span", { children: "Đánh dấu tin nhắn từ trưởng/phó nhóm" }), /* @__PURE__ */ T(
|
|
3835
|
+
children: [/* @__PURE__ */ T("span", { children: "Đánh dấu tin nhắn từ trưởng/phó nhóm" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
|
|
3972
3836
|
}), /* @__PURE__ */ E("label", {
|
|
3973
3837
|
className: "switch",
|
|
3974
3838
|
children: [/* @__PURE__ */ T("input", {
|
|
3975
3839
|
type: "checkbox",
|
|
3976
|
-
checked:
|
|
3977
|
-
onChange: () =>
|
|
3840
|
+
checked: C.markAdminMessages,
|
|
3841
|
+
onChange: () => k("markAdminMessages")
|
|
3978
3842
|
}), /* @__PURE__ */ T("span", { className: "slider round" })]
|
|
3979
3843
|
})]
|
|
3980
3844
|
}),
|
|
@@ -3982,13 +3846,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3982
3846
|
className: "setting-item-switch",
|
|
3983
3847
|
children: [/* @__PURE__ */ E("div", {
|
|
3984
3848
|
className: "setting-info",
|
|
3985
|
-
children: [/* @__PURE__ */ T("span", { children: "Cho phép thành viên mới đọc tin nhắn gần nhất" }), /* @__PURE__ */ T(
|
|
3849
|
+
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" })]
|
|
3986
3850
|
}), /* @__PURE__ */ E("label", {
|
|
3987
3851
|
className: "switch",
|
|
3988
3852
|
children: [/* @__PURE__ */ T("input", {
|
|
3989
3853
|
type: "checkbox",
|
|
3990
|
-
checked:
|
|
3991
|
-
onChange: () =>
|
|
3854
|
+
checked: C.allowNewMembersReadRecent,
|
|
3855
|
+
onChange: () => k("allowNewMembersReadRecent")
|
|
3992
3856
|
}), /* @__PURE__ */ T("span", { className: "slider round" })]
|
|
3993
3857
|
})]
|
|
3994
3858
|
})
|
|
@@ -4003,13 +3867,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4003
3867
|
className: "menu-item",
|
|
4004
3868
|
children: /* @__PURE__ */ E("div", {
|
|
4005
3869
|
className: "menu-left",
|
|
4006
|
-
children: [/* @__PURE__ */ T(
|
|
3870
|
+
children: [/* @__PURE__ */ T(bt, {}), /* @__PURE__ */ T("span", { children: "Chặn khỏi nhóm" })]
|
|
4007
3871
|
})
|
|
4008
3872
|
}), /* @__PURE__ */ T("div", {
|
|
4009
3873
|
className: "menu-item",
|
|
4010
3874
|
children: /* @__PURE__ */ E("div", {
|
|
4011
3875
|
className: "menu-left",
|
|
4012
|
-
children: [/* @__PURE__ */ T(
|
|
3876
|
+
children: [/* @__PURE__ */ T(xt, {}), /* @__PURE__ */ T("span", { children: "Trưởng & phó nhóm" })]
|
|
4013
3877
|
})
|
|
4014
3878
|
})]
|
|
4015
3879
|
})
|
|
@@ -4023,42 +3887,42 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4023
3887
|
className: "info-header",
|
|
4024
3888
|
children: /* @__PURE__ */ T("button", {
|
|
4025
3889
|
className: "close-info-btn",
|
|
4026
|
-
onClick:
|
|
3890
|
+
onClick: e,
|
|
4027
3891
|
children: /* @__PURE__ */ T($, {})
|
|
4028
3892
|
})
|
|
4029
3893
|
}),
|
|
4030
|
-
|
|
3894
|
+
l && /* @__PURE__ */ E("div", {
|
|
4031
3895
|
className: "info-content-scroll",
|
|
4032
3896
|
children: [
|
|
4033
3897
|
/* @__PURE__ */ E("div", {
|
|
4034
3898
|
className: "info-basic-section",
|
|
4035
3899
|
children: [/* @__PURE__ */ T("div", {
|
|
4036
3900
|
className: "info-avatar-large",
|
|
4037
|
-
children: /* @__PURE__ */ T(
|
|
4038
|
-
chat:
|
|
4039
|
-
currentUserId:
|
|
3901
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
3902
|
+
chat: l,
|
|
3903
|
+
currentUserId: u?.id
|
|
4040
3904
|
})
|
|
4041
3905
|
}), /* @__PURE__ */ E("div", {
|
|
4042
3906
|
className: "info-main-details",
|
|
4043
3907
|
children: [/* @__PURE__ */ E("h3", {
|
|
4044
3908
|
className: "info-chat-name",
|
|
4045
|
-
children: [
|
|
3909
|
+
children: [j, /* @__PURE__ */ T("span", {
|
|
4046
3910
|
className: "info-status-icons",
|
|
4047
|
-
children:
|
|
4048
|
-
e.stopPropagation(),
|
|
3911
|
+
children: l.type === "group" && /* @__PURE__ */ T(St, { onClick: (e) => {
|
|
3912
|
+
e.stopPropagation(), n && n(l);
|
|
4049
3913
|
} })
|
|
4050
3914
|
})]
|
|
4051
3915
|
}), /* @__PURE__ */ T("p", {
|
|
4052
3916
|
className: "info-member-count",
|
|
4053
|
-
children:
|
|
3917
|
+
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"
|
|
4054
3918
|
})]
|
|
4055
3919
|
})]
|
|
4056
3920
|
}),
|
|
4057
3921
|
/* @__PURE__ */ T("div", {
|
|
4058
3922
|
className: "info-quick-actions",
|
|
4059
|
-
children:
|
|
3923
|
+
children: l.type === "group" ? /* @__PURE__ */ T("div", {
|
|
4060
3924
|
className: "action-item",
|
|
4061
|
-
onClick:
|
|
3925
|
+
onClick: t,
|
|
4062
3926
|
children: /* @__PURE__ */ E("div", {
|
|
4063
3927
|
className: "action-icon-info",
|
|
4064
3928
|
children: [/* @__PURE__ */ E("svg", {
|
|
@@ -4092,66 +3956,60 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4092
3956
|
})
|
|
4093
3957
|
}) : /* @__PURE__ */ T(w, {})
|
|
4094
3958
|
}),
|
|
4095
|
-
|
|
4096
|
-
|
|
3959
|
+
l.type === "group" && null,
|
|
3960
|
+
l.type === "group" && /* @__PURE__ */ E("div", {
|
|
4097
3961
|
className: "info-members-section",
|
|
4098
3962
|
children: [/* @__PURE__ */ E("div", {
|
|
4099
3963
|
className: "section-title-row",
|
|
4100
3964
|
children: [/* @__PURE__ */ E("span", { children: [
|
|
4101
3965
|
"Thành viên (",
|
|
4102
|
-
|
|
3966
|
+
A,
|
|
4103
3967
|
")"
|
|
4104
3968
|
] }), /* @__PURE__ */ E("div", {
|
|
4105
3969
|
className: "title-actions",
|
|
4106
|
-
children: [/* @__PURE__ */ T(
|
|
3970
|
+
children: [/* @__PURE__ */ T(Ct, {
|
|
4107
3971
|
size: 16,
|
|
4108
|
-
onClick:
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
onClick: () =>
|
|
4112
|
-
style: {
|
|
4113
|
-
cursor: "pointer",
|
|
4114
|
-
transform: m ? "rotate(-180deg)" : "rotate(0deg)",
|
|
4115
|
-
transition: "transform 0.2s ease"
|
|
4116
|
-
}
|
|
3972
|
+
onClick: t
|
|
3973
|
+
}), /* @__PURE__ */ T(wt, {
|
|
3974
|
+
className: `arrow-icon ${y ? "collapsed" : ""}`,
|
|
3975
|
+
onClick: () => b(!y)
|
|
4117
3976
|
})]
|
|
4118
3977
|
})]
|
|
4119
|
-
}),
|
|
3978
|
+
}), y ? /* @__PURE__ */ E("div", {
|
|
4120
3979
|
className: "members-facepile",
|
|
4121
|
-
children: [
|
|
3980
|
+
children: [M.slice(0, 8).map((e) => /* @__PURE__ */ E("div", {
|
|
4122
3981
|
className: "facepile-item",
|
|
4123
|
-
children: [/* @__PURE__ */ T(
|
|
4124
|
-
},
|
|
3982
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), (e.id === u?.id || (e.socket_ids?.length ?? 0) > 0) && /* @__PURE__ */ T("div", { className: "online-status" })]
|
|
3983
|
+
}, e.id)), M.length > 8 && /* @__PURE__ */ E("div", {
|
|
4125
3984
|
className: "facepile-more",
|
|
4126
|
-
children: ["+",
|
|
3985
|
+
children: ["+", M.length - 8]
|
|
4127
3986
|
})]
|
|
4128
3987
|
}) : /* @__PURE__ */ T("div", {
|
|
4129
3988
|
className: "members-compact-list",
|
|
4130
|
-
children:
|
|
4131
|
-
let
|
|
3989
|
+
children: M.map((e) => {
|
|
3990
|
+
let t = l.owner_id === e.id, n = e.id === u?.id || e.socket_ids && e.socket_ids.length > 0;
|
|
4132
3991
|
return /* @__PURE__ */ E("div", {
|
|
4133
3992
|
className: "member-compact-item",
|
|
4134
3993
|
children: [/* @__PURE__ */ E("div", {
|
|
4135
|
-
className: "member-item-left",
|
|
4136
|
-
onClick: () =>
|
|
4137
|
-
user:
|
|
4138
|
-
isOnline:
|
|
3994
|
+
className: "member-item-left clickable",
|
|
3995
|
+
onClick: () => S({
|
|
3996
|
+
user: e,
|
|
3997
|
+
isOnline: n ?? !1
|
|
4139
3998
|
}),
|
|
4140
|
-
style: { cursor: "pointer" },
|
|
4141
3999
|
children: [/* @__PURE__ */ E("div", {
|
|
4142
4000
|
className: "member-avatar-small",
|
|
4143
|
-
children: [/* @__PURE__ */ T(
|
|
4001
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), n && /* @__PURE__ */ T("div", { className: "online-status" })]
|
|
4144
4002
|
}), /* @__PURE__ */ E("div", {
|
|
4145
4003
|
className: "member-info",
|
|
4146
4004
|
children: [/* @__PURE__ */ E("div", {
|
|
4147
4005
|
className: "member-name-row",
|
|
4148
4006
|
children: [/* @__PURE__ */ T("span", {
|
|
4149
4007
|
className: "member-name",
|
|
4150
|
-
children:
|
|
4151
|
-
}),
|
|
4008
|
+
children: e.id === u?.id ? "Bạn" : e.name
|
|
4009
|
+
}), t && /* @__PURE__ */ T(at, {})]
|
|
4152
4010
|
}), /* @__PURE__ */ T("span", {
|
|
4153
4011
|
className: "member-role",
|
|
4154
|
-
children:
|
|
4012
|
+
children: t ? "Trưởng nhóm" : "Thành viên"
|
|
4155
4013
|
})]
|
|
4156
4014
|
})]
|
|
4157
4015
|
}), /* @__PURE__ */ T("div", {
|
|
@@ -4160,38 +4018,43 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4160
4018
|
className: "member-options-container",
|
|
4161
4019
|
children: [/* @__PURE__ */ T("button", {
|
|
4162
4020
|
className: "member-options-btn",
|
|
4163
|
-
onClick: (
|
|
4164
|
-
|
|
4021
|
+
onClick: (t) => {
|
|
4022
|
+
t.stopPropagation(), v(h === e.id ? null : e.id);
|
|
4165
4023
|
},
|
|
4166
|
-
children: /* @__PURE__ */ T(
|
|
4167
|
-
}),
|
|
4024
|
+
children: /* @__PURE__ */ T(Tt, {})
|
|
4025
|
+
}), h === e.id && /* @__PURE__ */ T("div", {
|
|
4168
4026
|
className: "member-dropdown-menu",
|
|
4169
|
-
children: !
|
|
4027
|
+
children: !t && /* @__PURE__ */ E("button", {
|
|
4170
4028
|
className: "dropdown-item delete",
|
|
4171
|
-
onClick: (
|
|
4172
|
-
|
|
4029
|
+
onClick: (t) => {
|
|
4030
|
+
t.stopPropagation(), r && r(l.id, e.id), v(null);
|
|
4173
4031
|
},
|
|
4174
|
-
children: [/* @__PURE__ */ T(
|
|
4032
|
+
children: [/* @__PURE__ */ T(bt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá khỏi nhóm" })]
|
|
4175
4033
|
})
|
|
4176
4034
|
})]
|
|
4177
4035
|
})
|
|
4178
4036
|
})]
|
|
4179
|
-
},
|
|
4037
|
+
}, e.id);
|
|
4180
4038
|
})
|
|
4181
4039
|
})]
|
|
4040
|
+
}),
|
|
4041
|
+
d && /* @__PURE__ */ E("button", {
|
|
4042
|
+
className: "info-panel-clear-history",
|
|
4043
|
+
onClick: void 0,
|
|
4044
|
+
children: [/* @__PURE__ */ T(zt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá lịch sử trò chuyện" })]
|
|
4182
4045
|
})
|
|
4183
4046
|
]
|
|
4184
4047
|
}),
|
|
4185
|
-
|
|
4186
|
-
user:
|
|
4187
|
-
isOnline:
|
|
4188
|
-
onClose: () =>
|
|
4048
|
+
x && /* @__PURE__ */ T(on, {
|
|
4049
|
+
user: x.user,
|
|
4050
|
+
isOnline: x.isOnline,
|
|
4051
|
+
onClose: () => S(null),
|
|
4189
4052
|
onMessage: () => void ee()
|
|
4190
4053
|
})
|
|
4191
4054
|
]
|
|
4192
4055
|
});
|
|
4193
|
-
},
|
|
4194
|
-
let { t: a, toggleChangeLanguage: o } = Z(), { hasMultipleLanguages: s } = _(
|
|
4056
|
+
}, dn = ({ mode: e, title: t, logoUrl: n, onToggleMode: r, onClose: i }) => {
|
|
4057
|
+
let { t: a, toggleChangeLanguage: o } = Z(), { hasMultipleLanguages: s } = _(Ue), c = t ?? a("chatHeader.defaultTitle");
|
|
4195
4058
|
return /* @__PURE__ */ E("div", {
|
|
4196
4059
|
className: `chat-header ${e}`,
|
|
4197
4060
|
children: [/* @__PURE__ */ E("div", {
|
|
@@ -4200,20 +4063,8 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4200
4063
|
className: "header-logo",
|
|
4201
4064
|
children: n ? /* @__PURE__ */ T("img", {
|
|
4202
4065
|
src: n,
|
|
4203
|
-
alt: "Logo"
|
|
4204
|
-
|
|
4205
|
-
width: "22px",
|
|
4206
|
-
height: "22px",
|
|
4207
|
-
objectFit: "contain"
|
|
4208
|
-
}
|
|
4209
|
-
}) : /* @__PURE__ */ T(at, {
|
|
4210
|
-
size: 22,
|
|
4211
|
-
style: {
|
|
4212
|
-
width: "22px",
|
|
4213
|
-
height: "22px",
|
|
4214
|
-
objectFit: "contain"
|
|
4215
|
-
}
|
|
4216
|
-
})
|
|
4066
|
+
alt: "Logo"
|
|
4067
|
+
}) : /* @__PURE__ */ T(ot, { size: 22 })
|
|
4217
4068
|
}), /* @__PURE__ */ E("div", {
|
|
4218
4069
|
className: "header-info-text",
|
|
4219
4070
|
children: [
|
|
@@ -4238,19 +4089,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4238
4089
|
className: "action-btn",
|
|
4239
4090
|
onClick: o,
|
|
4240
4091
|
title: a("chatHeader.language"),
|
|
4241
|
-
children: /* @__PURE__ */ T(
|
|
4092
|
+
children: /* @__PURE__ */ T(Ht, { size: 16 })
|
|
4242
4093
|
}),
|
|
4243
4094
|
/* @__PURE__ */ T("button", {
|
|
4244
4095
|
className: "action-btn",
|
|
4245
4096
|
onClick: i,
|
|
4246
4097
|
title: a("chatHeader.minimize"),
|
|
4247
|
-
children: /* @__PURE__ */ T(
|
|
4098
|
+
children: /* @__PURE__ */ T(Et, { size: 16 })
|
|
4248
4099
|
}),
|
|
4249
4100
|
/* @__PURE__ */ T("button", {
|
|
4250
4101
|
className: "action-btn",
|
|
4251
4102
|
onClick: r,
|
|
4252
4103
|
title: a(e === "fullpage" ? "chatHeader.minimize" : "chatHeader.maximize"),
|
|
4253
|
-
children: T(e === "fullpage" ?
|
|
4104
|
+
children: T(e === "fullpage" ? Ot : Dt, {})
|
|
4254
4105
|
}),
|
|
4255
4106
|
/* @__PURE__ */ T("button", {
|
|
4256
4107
|
className: "action-btn close-btn",
|
|
@@ -4261,28 +4112,28 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4261
4112
|
]
|
|
4262
4113
|
})]
|
|
4263
4114
|
});
|
|
4264
|
-
},
|
|
4265
|
-
let { t: n } = Z(), r = g(), { currentChat: i, replyingMessage: o } = _((e) => e.chat), { hasVoice: s, hasAttachment: u, hasMultipleAttachments: d, acceptFilter: m, isFileTypeAllowed: h } = _(
|
|
4115
|
+
}, fn = r((e, t) => {
|
|
4116
|
+
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) => {
|
|
4266
4117
|
y((t) => t + e), x(!1);
|
|
4267
|
-
},
|
|
4268
|
-
await
|
|
4269
|
-
},
|
|
4270
|
-
|
|
4118
|
+
}, z = async () => {
|
|
4119
|
+
await M.startRecording();
|
|
4120
|
+
}, de = async () => {
|
|
4121
|
+
te(!0);
|
|
4271
4122
|
try {
|
|
4272
|
-
await
|
|
4123
|
+
await M.stopRecording();
|
|
4273
4124
|
} finally {
|
|
4274
|
-
|
|
4125
|
+
te(!1);
|
|
4275
4126
|
}
|
|
4276
|
-
},
|
|
4277
|
-
|
|
4278
|
-
},
|
|
4127
|
+
}, fe = () => {
|
|
4128
|
+
j.recordedFile && (O((e) => [...e, j.recordedFile]), M.clearRecording());
|
|
4129
|
+
}, pe = (e) => {
|
|
4279
4130
|
let t = `${e.name}-${e.size}`;
|
|
4280
|
-
|
|
4131
|
+
I.current.has(t) && clearTimeout(I.current.get(t));
|
|
4281
4132
|
let n = setTimeout(() => {
|
|
4282
|
-
O((e) => e.filter((e) => e.errorId !== t)),
|
|
4133
|
+
O((e) => e.filter((e) => e.errorId !== t)), I.current.delete(t);
|
|
4283
4134
|
}, 5e3);
|
|
4284
|
-
return
|
|
4285
|
-
},
|
|
4135
|
+
return I.current.set(t, n), t;
|
|
4136
|
+
}, me = (e) => {
|
|
4286
4137
|
if (!e?.length) return;
|
|
4287
4138
|
if (!u) {
|
|
4288
4139
|
N("Tính năng đính kèm file chưa được kích hoạt.", "warning");
|
|
@@ -4293,14 +4144,14 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4293
4144
|
N("Loại file không được phép.", "error");
|
|
4294
4145
|
return;
|
|
4295
4146
|
}
|
|
4296
|
-
let n =
|
|
4147
|
+
let n = ue([...D, ...t], d, h);
|
|
4297
4148
|
if (n) {
|
|
4298
4149
|
N(n.message, n.type);
|
|
4299
4150
|
return;
|
|
4300
4151
|
}
|
|
4301
4152
|
let r = t.map((e) => {
|
|
4302
4153
|
if (e.size <= 26214400) return e;
|
|
4303
|
-
let t =
|
|
4154
|
+
let t = pe(e);
|
|
4304
4155
|
return Object.assign(e, {
|
|
4305
4156
|
isError: !0,
|
|
4306
4157
|
errorId: t
|
|
@@ -4308,17 +4159,17 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4308
4159
|
});
|
|
4309
4160
|
O((e) => [...e, ...r]);
|
|
4310
4161
|
};
|
|
4311
|
-
l(t, () => ({ processPastedFiles:
|
|
4312
|
-
let
|
|
4162
|
+
l(t, () => ({ processPastedFiles: me }));
|
|
4163
|
+
let he = (e) => {
|
|
4313
4164
|
let t = e.clipboardData;
|
|
4314
4165
|
if (!t) return;
|
|
4315
4166
|
if (t.files && t.files.length > 0) {
|
|
4316
|
-
e.preventDefault(),
|
|
4167
|
+
e.preventDefault(), me(t.files);
|
|
4317
4168
|
return;
|
|
4318
4169
|
}
|
|
4319
4170
|
let n = t.getData("text/plain");
|
|
4320
4171
|
n && y((e) => e + n);
|
|
4321
|
-
},
|
|
4172
|
+
}, V = (e) => {
|
|
4322
4173
|
let t = e.currentTarget.files;
|
|
4323
4174
|
if (!t?.length) return;
|
|
4324
4175
|
let n = () => {
|
|
@@ -4333,23 +4184,23 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4333
4184
|
N("Loại file được chọn không được phép.", "error"), n();
|
|
4334
4185
|
return;
|
|
4335
4186
|
}
|
|
4336
|
-
let i =
|
|
4187
|
+
let i = ue([...D, ...r], d, h);
|
|
4337
4188
|
if (i) {
|
|
4338
4189
|
N(i.message, i.type), n();
|
|
4339
4190
|
return;
|
|
4340
4191
|
}
|
|
4341
4192
|
let a = r.map((e) => {
|
|
4342
4193
|
if (e.size <= 26214400) return e;
|
|
4343
|
-
let t =
|
|
4194
|
+
let t = pe(e);
|
|
4344
4195
|
return Object.assign(e, {
|
|
4345
4196
|
isError: !0,
|
|
4346
4197
|
errorId: t
|
|
4347
4198
|
});
|
|
4348
4199
|
});
|
|
4349
4200
|
O((e) => [...e, ...a]), n();
|
|
4350
|
-
},
|
|
4201
|
+
}, ge = a((e) => {
|
|
4351
4202
|
O((t) => t.filter((t, n) => n !== e));
|
|
4352
|
-
}, []),
|
|
4203
|
+
}, []), _e = a(() => {
|
|
4353
4204
|
P.current?.click();
|
|
4354
4205
|
}, []);
|
|
4355
4206
|
c(() => {
|
|
@@ -4363,33 +4214,33 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4363
4214
|
}, [S]), c(() => {
|
|
4364
4215
|
k || ie.current?.focus();
|
|
4365
4216
|
}, [k]);
|
|
4366
|
-
let
|
|
4217
|
+
let ve = async (e, t) => {
|
|
4367
4218
|
if (i && !(!e && (!t || t.length === 0))) {
|
|
4368
|
-
|
|
4219
|
+
A(!0);
|
|
4369
4220
|
try {
|
|
4370
|
-
let n =
|
|
4371
|
-
r(
|
|
4221
|
+
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);
|
|
4222
|
+
r(Se({
|
|
4372
4223
|
chat: i,
|
|
4373
4224
|
message: s
|
|
4374
|
-
})), y(""), O([]), x(!1), r(
|
|
4225
|
+
})), y(""), O([]), x(!1), r(ke(null));
|
|
4375
4226
|
} catch (e) {
|
|
4376
4227
|
console.error("Error sending message:", e);
|
|
4377
4228
|
} finally {
|
|
4378
|
-
|
|
4229
|
+
A(!1);
|
|
4379
4230
|
}
|
|
4380
4231
|
}
|
|
4381
|
-
},
|
|
4232
|
+
}, H = () => {
|
|
4382
4233
|
let e = v.trim();
|
|
4383
4234
|
if (!e && D.length === 0) return;
|
|
4384
|
-
let t =
|
|
4235
|
+
let t = ue(D, d, h);
|
|
4385
4236
|
if (t) {
|
|
4386
4237
|
N(t.message, t.type);
|
|
4387
4238
|
return;
|
|
4388
4239
|
}
|
|
4389
|
-
|
|
4240
|
+
ve(e, D);
|
|
4241
|
+
}, ye = (e) => {
|
|
4242
|
+
e.key === "Enter" && H();
|
|
4390
4243
|
}, be = (e) => {
|
|
4391
|
-
e.key === "Enter" && V();
|
|
4392
|
-
}, H = (e) => {
|
|
4393
4244
|
let t = ie.current?.getRootNode(), n = t?.getElementById ? t.getElementById(`chat-message-${e}`) : document.getElementById(`chat-message-${e}`);
|
|
4394
4245
|
n ? (n.scrollIntoView({
|
|
4395
4246
|
behavior: "smooth",
|
|
@@ -4402,18 +4253,18 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4402
4253
|
D.length > 0 && /* @__PURE__ */ T("div", {
|
|
4403
4254
|
className: "selected-files-list",
|
|
4404
4255
|
children: D.map((e, t) => {
|
|
4405
|
-
let r = e.isError, i =
|
|
4256
|
+
let r = e.isError, i = ce(e);
|
|
4406
4257
|
return /* @__PURE__ */ E("div", {
|
|
4407
4258
|
className: `selected-file-item ${i ? "image-file" : "other-file"} ${r ? "error-file-item" : ""}`,
|
|
4408
4259
|
children: [i ? /* @__PURE__ */ T("img", {
|
|
4409
|
-
src:
|
|
4260
|
+
src: se(e),
|
|
4410
4261
|
alt: e.name,
|
|
4411
4262
|
className: "file-preview-image"
|
|
4412
4263
|
}) : /* @__PURE__ */ E("div", {
|
|
4413
4264
|
className: "file-content-wrapper",
|
|
4414
4265
|
children: [/* @__PURE__ */ T("span", {
|
|
4415
4266
|
className: "file-icon",
|
|
4416
|
-
children:
|
|
4267
|
+
children: L(e.name)
|
|
4417
4268
|
}), /* @__PURE__ */ E("div", {
|
|
4418
4269
|
className: "file-info",
|
|
4419
4270
|
children: [/* @__PURE__ */ T("span", {
|
|
@@ -4421,27 +4272,22 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4421
4272
|
children: e.name
|
|
4422
4273
|
}), /* @__PURE__ */ T("span", {
|
|
4423
4274
|
className: `file-size ${r ? "error-size" : ""}`,
|
|
4424
|
-
children: r ? `Vượt quá ${26214400 / (1024 * 1024)} MB` :
|
|
4275
|
+
children: r ? `Vượt quá ${26214400 / (1024 * 1024)} MB` : oe(e.size)
|
|
4425
4276
|
})]
|
|
4426
4277
|
})]
|
|
4427
4278
|
}), /* @__PURE__ */ T("button", {
|
|
4428
4279
|
className: "remove-file-btn",
|
|
4429
|
-
onClick: () =>
|
|
4280
|
+
onClick: () => ge(t),
|
|
4430
4281
|
title: n("chatInput.removeFile"),
|
|
4431
4282
|
disabled: k,
|
|
4432
|
-
style: {
|
|
4433
|
-
opacity: k ? .5 : 1,
|
|
4434
|
-
cursor: k ? "not-allowed" : "pointer"
|
|
4435
|
-
},
|
|
4436
4283
|
children: "✕"
|
|
4437
4284
|
})]
|
|
4438
|
-
},
|
|
4285
|
+
}, ae(e));
|
|
4439
4286
|
})
|
|
4440
4287
|
}),
|
|
4441
4288
|
o && /* @__PURE__ */ E("div", {
|
|
4442
4289
|
className: "reply-input-preview",
|
|
4443
|
-
onClick: () =>
|
|
4444
|
-
style: { cursor: "pointer" },
|
|
4290
|
+
onClick: () => be(o.id),
|
|
4445
4291
|
children: [
|
|
4446
4292
|
/* @__PURE__ */ E("div", {
|
|
4447
4293
|
className: "reply-content",
|
|
@@ -4460,17 +4306,17 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4460
4306
|
/* @__PURE__ */ T("button", {
|
|
4461
4307
|
className: "close-reply",
|
|
4462
4308
|
onClick: (e) => {
|
|
4463
|
-
e.stopPropagation(), r(
|
|
4309
|
+
e.stopPropagation(), r(ke(null));
|
|
4464
4310
|
},
|
|
4465
4311
|
children: "✕"
|
|
4466
4312
|
}),
|
|
4467
4313
|
/* @__PURE__ */ T("div", {
|
|
4468
4314
|
className: "reply-icon",
|
|
4469
|
-
children: /* @__PURE__ */ T(
|
|
4315
|
+
children: /* @__PURE__ */ T(kt, {})
|
|
4470
4316
|
})
|
|
4471
4317
|
]
|
|
4472
4318
|
}),
|
|
4473
|
-
|
|
4319
|
+
j.isRecording ? /* @__PURE__ */ E("div", {
|
|
4474
4320
|
className: "voice-recording-container",
|
|
4475
4321
|
children: [/* @__PURE__ */ E("div", {
|
|
4476
4322
|
className: "voice-recording-info",
|
|
@@ -4482,27 +4328,27 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4482
4328
|
})]
|
|
4483
4329
|
}), /* @__PURE__ */ T("span", {
|
|
4484
4330
|
className: "recording-duration",
|
|
4485
|
-
children: ne(
|
|
4331
|
+
children: ne(j.duration)
|
|
4486
4332
|
})]
|
|
4487
4333
|
}), /* @__PURE__ */ E("div", {
|
|
4488
4334
|
className: "voice-recording-controls",
|
|
4489
4335
|
children: [/* @__PURE__ */ T("button", {
|
|
4490
4336
|
className: "voice-control-btn cancel-btn",
|
|
4491
|
-
onClick: () =>
|
|
4337
|
+
onClick: () => M.cancelRecording(),
|
|
4492
4338
|
title: n("chatInput.cancelRecording"),
|
|
4493
|
-
disabled:
|
|
4339
|
+
disabled: ee,
|
|
4494
4340
|
children: "✕"
|
|
4495
4341
|
}), /* @__PURE__ */ T("button", {
|
|
4496
4342
|
className: "voice-control-btn stop-btn",
|
|
4497
4343
|
onClick: () => {
|
|
4498
|
-
|
|
4344
|
+
de();
|
|
4499
4345
|
},
|
|
4500
4346
|
title: n("chatInput.stopRecording"),
|
|
4501
|
-
disabled:
|
|
4502
|
-
children:
|
|
4347
|
+
disabled: ee,
|
|
4348
|
+
children: ee ? "⏳" : "⏹"
|
|
4503
4349
|
})]
|
|
4504
4350
|
})]
|
|
4505
|
-
}) :
|
|
4351
|
+
}) : j.recordedFile ? /* @__PURE__ */ E("div", {
|
|
4506
4352
|
className: "voice-recorded-container",
|
|
4507
4353
|
children: [/* @__PURE__ */ E("div", {
|
|
4508
4354
|
className: "voice-recorded-info",
|
|
@@ -4517,7 +4363,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4517
4363
|
}),
|
|
4518
4364
|
/* @__PURE__ */ T("span", {
|
|
4519
4365
|
className: "voice-duration",
|
|
4520
|
-
children: ne(
|
|
4366
|
+
children: ne(j.duration)
|
|
4521
4367
|
})
|
|
4522
4368
|
]
|
|
4523
4369
|
}), /* @__PURE__ */ E("div", {
|
|
@@ -4525,19 +4371,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4525
4371
|
children: [
|
|
4526
4372
|
/* @__PURE__ */ T("button", {
|
|
4527
4373
|
className: "voice-control-btn play-btn",
|
|
4528
|
-
onClick: () =>
|
|
4374
|
+
onClick: () => M.playback(),
|
|
4529
4375
|
title: n("chatInput.playRecording"),
|
|
4530
4376
|
children: "▶"
|
|
4531
4377
|
}),
|
|
4532
4378
|
/* @__PURE__ */ T("button", {
|
|
4533
4379
|
className: "voice-control-btn discard-btn",
|
|
4534
|
-
onClick: () =>
|
|
4380
|
+
onClick: () => M.clearRecording(),
|
|
4535
4381
|
title: n("chatInput.discardRecording"),
|
|
4536
4382
|
children: "✕"
|
|
4537
4383
|
}),
|
|
4538
4384
|
/* @__PURE__ */ T("button", {
|
|
4539
4385
|
className: "voice-control-btn add-btn",
|
|
4540
|
-
onClick:
|
|
4386
|
+
onClick: fe,
|
|
4541
4387
|
title: n("chatInput.addToMessage"),
|
|
4542
4388
|
children: "✓"
|
|
4543
4389
|
})
|
|
@@ -4549,9 +4395,9 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4549
4395
|
children: [
|
|
4550
4396
|
b && /* @__PURE__ */ T("div", {
|
|
4551
4397
|
className: "emoji-picker",
|
|
4552
|
-
children:
|
|
4398
|
+
children: F.map((e) => /* @__PURE__ */ T("button", {
|
|
4553
4399
|
className: "emoji-btn",
|
|
4554
|
-
onClick: () =>
|
|
4400
|
+
onClick: () => R(e),
|
|
4555
4401
|
children: e
|
|
4556
4402
|
}, e))
|
|
4557
4403
|
}),
|
|
@@ -4559,7 +4405,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4559
4405
|
ref: P,
|
|
4560
4406
|
type: "file",
|
|
4561
4407
|
multiple: !0,
|
|
4562
|
-
onChange:
|
|
4408
|
+
onChange: V,
|
|
4563
4409
|
accept: m,
|
|
4564
4410
|
className: "display-none"
|
|
4565
4411
|
}),
|
|
@@ -4568,31 +4414,31 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4568
4414
|
children: [
|
|
4569
4415
|
u && /* @__PURE__ */ T("button", {
|
|
4570
4416
|
className: "action-btn",
|
|
4571
|
-
onClick: () =>
|
|
4417
|
+
onClick: () => _e(),
|
|
4572
4418
|
title: n("chatInput.selectFiles"),
|
|
4573
4419
|
disabled: k,
|
|
4574
|
-
children: /* @__PURE__ */ T(
|
|
4420
|
+
children: /* @__PURE__ */ T(At, {})
|
|
4575
4421
|
}),
|
|
4576
4422
|
u && /* @__PURE__ */ T("button", {
|
|
4577
4423
|
className: "action-btn",
|
|
4578
|
-
onClick: () =>
|
|
4424
|
+
onClick: () => _e(),
|
|
4579
4425
|
title: n("chatInput.selectFiles"),
|
|
4580
4426
|
disabled: k,
|
|
4581
|
-
children: /* @__PURE__ */ T(
|
|
4427
|
+
children: /* @__PURE__ */ T(jt, {})
|
|
4582
4428
|
}),
|
|
4583
4429
|
s && /* @__PURE__ */ T("button", {
|
|
4584
4430
|
className: "action-btn",
|
|
4585
|
-
onClick: () => void
|
|
4431
|
+
onClick: () => void z(),
|
|
4586
4432
|
title: n("chatInput.recordVoice"),
|
|
4587
4433
|
disabled: k,
|
|
4588
|
-
children: /* @__PURE__ */ T(
|
|
4434
|
+
children: /* @__PURE__ */ T(Mt, {})
|
|
4589
4435
|
}),
|
|
4590
4436
|
/* @__PURE__ */ T("button", {
|
|
4591
4437
|
className: `action-btn ${b ? "active" : ""}`,
|
|
4592
4438
|
onClick: () => x(!b),
|
|
4593
4439
|
title: "emoji",
|
|
4594
4440
|
disabled: k,
|
|
4595
|
-
children: /* @__PURE__ */ T(
|
|
4441
|
+
children: /* @__PURE__ */ T(Nt, {})
|
|
4596
4442
|
})
|
|
4597
4443
|
]
|
|
4598
4444
|
}),
|
|
@@ -4605,42 +4451,33 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4605
4451
|
placeholder: n("chatInput.placeholder"),
|
|
4606
4452
|
value: v,
|
|
4607
4453
|
onChange: (e) => y(e.target.value),
|
|
4608
|
-
onKeyPress:
|
|
4609
|
-
onPaste:
|
|
4610
|
-
disabled: k
|
|
4611
|
-
style: {
|
|
4612
|
-
opacity: k ? .6 : 1,
|
|
4613
|
-
cursor: k ? "not-allowed" : "text"
|
|
4614
|
-
}
|
|
4454
|
+
onKeyPress: ye,
|
|
4455
|
+
onPaste: he,
|
|
4456
|
+
disabled: k
|
|
4615
4457
|
})
|
|
4616
4458
|
}),
|
|
4617
4459
|
/* @__PURE__ */ T("button", {
|
|
4618
4460
|
className: "send-btn",
|
|
4619
|
-
onClick:
|
|
4461
|
+
onClick: H,
|
|
4620
4462
|
disabled: k || !v.trim() && D.length === 0,
|
|
4621
|
-
|
|
4622
|
-
background: k || !v.trim() && D.length === 0 ? "#d1d5db" : e ?? "#8aaeff",
|
|
4623
|
-
opacity: k || !v.trim() && D.length === 0 ? .6 : 1,
|
|
4624
|
-
cursor: k || !v.trim() && D.length === 0 ? "not-allowed" : "pointer"
|
|
4625
|
-
},
|
|
4626
|
-
children: k ? "⏳" : /* @__PURE__ */ T(Nt, {})
|
|
4463
|
+
children: k ? "⏳" : /* @__PURE__ */ T(Pt, {})
|
|
4627
4464
|
})
|
|
4628
4465
|
]
|
|
4629
4466
|
})
|
|
4630
4467
|
] });
|
|
4631
4468
|
});
|
|
4632
|
-
|
|
4469
|
+
fn.displayName = "ChatInput";
|
|
4633
4470
|
//#endregion
|
|
4634
4471
|
//#region src/components/view/ContactList.tsx
|
|
4635
|
-
var
|
|
4472
|
+
var pn = [{
|
|
4636
4473
|
label: "A-Z",
|
|
4637
4474
|
value: "asc",
|
|
4638
|
-
icon: /* @__PURE__ */ T(
|
|
4475
|
+
icon: /* @__PURE__ */ T(Ft, {})
|
|
4639
4476
|
}, {
|
|
4640
4477
|
label: "Z-A",
|
|
4641
4478
|
value: "desc",
|
|
4642
|
-
icon: /* @__PURE__ */ T(
|
|
4643
|
-
}],
|
|
4479
|
+
icon: /* @__PURE__ */ T(It, {})
|
|
4480
|
+
}], mn = [
|
|
4644
4481
|
{
|
|
4645
4482
|
label: "Tất cả",
|
|
4646
4483
|
value: "all"
|
|
@@ -4653,68 +4490,58 @@ var fn = [{
|
|
|
4653
4490
|
label: "Offline",
|
|
4654
4491
|
value: "offline"
|
|
4655
4492
|
}
|
|
4656
|
-
],
|
|
4657
|
-
let [
|
|
4658
|
-
let
|
|
4659
|
-
return
|
|
4493
|
+
], hn = ({ onMessageClick: e }) => {
|
|
4494
|
+
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(() => {
|
|
4495
|
+
let e = f.filter((e) => e.name.toLowerCase().includes(t.toLowerCase()));
|
|
4496
|
+
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) => {
|
|
4660
4497
|
let n = e.name.localeCompare(t.name);
|
|
4661
|
-
return
|
|
4498
|
+
return r === "asc" ? n : -n;
|
|
4662
4499
|
});
|
|
4663
4500
|
}, [
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4501
|
+
f,
|
|
4502
|
+
t,
|
|
4503
|
+
r,
|
|
4504
|
+
s
|
|
4668
4505
|
]), h = d(() => {
|
|
4669
4506
|
let e = /* @__PURE__ */ new Set();
|
|
4670
4507
|
m.forEach((t) => {
|
|
4671
4508
|
t.name && e.add(t.name.charAt(0).toUpperCase());
|
|
4672
4509
|
});
|
|
4673
4510
|
let t = Array.from(e);
|
|
4674
|
-
return
|
|
4675
|
-
}, [m,
|
|
4511
|
+
return r === "asc" ? t.sort((e, t) => e.localeCompare(t)) : t.sort((e, t) => t.localeCompare(e));
|
|
4512
|
+
}, [m, r]);
|
|
4676
4513
|
return /* @__PURE__ */ E("div", {
|
|
4677
4514
|
className: "contact-list-view",
|
|
4678
4515
|
children: [
|
|
4679
4516
|
/* @__PURE__ */ T("div", {
|
|
4680
4517
|
className: "contact-list-header",
|
|
4681
|
-
children: /* @__PURE__ */ E("div", {
|
|
4682
|
-
style: {
|
|
4683
|
-
display: "flex",
|
|
4684
|
-
alignItems: "center",
|
|
4685
|
-
gap: "8px"
|
|
4686
|
-
},
|
|
4687
|
-
children: [/* @__PURE__ */ T(st, {}), /* @__PURE__ */ T("div", { children: "Danh sách thành viên" })]
|
|
4688
|
-
})
|
|
4518
|
+
children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(ct, {}), /* @__PURE__ */ T("div", { children: "Danh sách thành viên" })] })
|
|
4689
4519
|
}),
|
|
4690
4520
|
/* @__PURE__ */ E("div", {
|
|
4691
4521
|
className: "contact-list-toolbar",
|
|
4692
|
-
style: { gap: "12px" },
|
|
4693
4522
|
children: [/* @__PURE__ */ E("div", {
|
|
4694
4523
|
className: "toolbar-search",
|
|
4695
|
-
|
|
4696
|
-
children: [/* @__PURE__ */ T(gt, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
|
|
4524
|
+
children: [/* @__PURE__ */ T(_t, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
|
|
4697
4525
|
type: "text",
|
|
4698
4526
|
placeholder: "Tìm bạn",
|
|
4699
|
-
value:
|
|
4700
|
-
onChange: (e) =>
|
|
4527
|
+
value: t,
|
|
4528
|
+
onChange: (e) => n(e.target.value)
|
|
4701
4529
|
})]
|
|
4702
4530
|
}), /* @__PURE__ */ E("div", {
|
|
4703
4531
|
className: "toolbar-right",
|
|
4704
4532
|
children: [/* @__PURE__ */ E("div", {
|
|
4705
4533
|
className: "filter-select",
|
|
4706
4534
|
onClick: () => {
|
|
4707
|
-
|
|
4535
|
+
o(!a), u(!1);
|
|
4708
4536
|
},
|
|
4709
|
-
style: { position: "relative" },
|
|
4710
4537
|
children: [
|
|
4711
|
-
/* @__PURE__ */ T("span", { children:
|
|
4712
|
-
/* @__PURE__ */ T(
|
|
4713
|
-
|
|
4538
|
+
/* @__PURE__ */ T("span", { children: r === "asc" ? "Tên (A-Z)" : "Tên (Z-A)" }),
|
|
4539
|
+
/* @__PURE__ */ T(wt, {}),
|
|
4540
|
+
a && /* @__PURE__ */ T("div", {
|
|
4714
4541
|
className: "dropdown-select",
|
|
4715
|
-
children:
|
|
4542
|
+
children: pn.map((e) => /* @__PURE__ */ E("div", {
|
|
4716
4543
|
onClick: () => {
|
|
4717
|
-
|
|
4544
|
+
i(e.value), o(!1);
|
|
4718
4545
|
},
|
|
4719
4546
|
className: "dropdown-item",
|
|
4720
4547
|
children: [e.icon, /* @__PURE__ */ T("div", { children: e.label })]
|
|
@@ -4724,17 +4551,16 @@ var fn = [{
|
|
|
4724
4551
|
}), /* @__PURE__ */ E("div", {
|
|
4725
4552
|
className: "filter-select",
|
|
4726
4553
|
onClick: () => {
|
|
4727
|
-
|
|
4554
|
+
u(!l), o(!1);
|
|
4728
4555
|
},
|
|
4729
|
-
style: { position: "relative" },
|
|
4730
4556
|
children: [
|
|
4731
|
-
/* @__PURE__ */ T("span", { children:
|
|
4732
|
-
/* @__PURE__ */ T(
|
|
4733
|
-
|
|
4557
|
+
/* @__PURE__ */ T("span", { children: mn.find((e) => e.value === s)?.label }),
|
|
4558
|
+
/* @__PURE__ */ T(wt, {}),
|
|
4559
|
+
l && /* @__PURE__ */ T("div", {
|
|
4734
4560
|
className: "dropdown-select",
|
|
4735
|
-
children:
|
|
4561
|
+
children: mn.map((e) => /* @__PURE__ */ T("div", {
|
|
4736
4562
|
onClick: () => {
|
|
4737
|
-
|
|
4563
|
+
c(e.value), u(!1);
|
|
4738
4564
|
},
|
|
4739
4565
|
className: "dropdown-item",
|
|
4740
4566
|
children: /* @__PURE__ */ T("div", { children: e.label })
|
|
@@ -4746,46 +4572,31 @@ var fn = [{
|
|
|
4746
4572
|
}),
|
|
4747
4573
|
/* @__PURE__ */ T("div", {
|
|
4748
4574
|
className: "contact-scroll-area",
|
|
4749
|
-
children: h.map((
|
|
4750
|
-
let n = m.filter((
|
|
4575
|
+
children: h.map((t) => {
|
|
4576
|
+
let n = m.filter((e) => e.name.charAt(0).toUpperCase() === t);
|
|
4751
4577
|
return /* @__PURE__ */ E("div", {
|
|
4752
4578
|
className: "contact-letter-group",
|
|
4753
4579
|
children: [/* @__PURE__ */ T("div", {
|
|
4754
4580
|
className: "letter-title",
|
|
4755
|
-
children:
|
|
4756
|
-
}), n.map((
|
|
4581
|
+
children: t
|
|
4582
|
+
}), n.map((t) => /* @__PURE__ */ E("div", {
|
|
4757
4583
|
className: "contact-item-row",
|
|
4758
4584
|
children: [/* @__PURE__ */ E("div", {
|
|
4759
4585
|
className: "contact-item-left",
|
|
4760
4586
|
children: [/* @__PURE__ */ E("div", {
|
|
4761
4587
|
className: "contact-avatar",
|
|
4762
|
-
children: [
|
|
4763
|
-
src:
|
|
4588
|
+
children: [t.avatar ? /* @__PURE__ */ T("img", {
|
|
4589
|
+
src: t.avatar,
|
|
4764
4590
|
alt: ""
|
|
4765
4591
|
}) : /* @__PURE__ */ T("div", {
|
|
4766
4592
|
className: "avatar-placeholder",
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
color: "white",
|
|
4770
|
-
width: "40px",
|
|
4771
|
-
height: "40px",
|
|
4772
|
-
borderRadius: "50%",
|
|
4773
|
-
display: "flex",
|
|
4774
|
-
alignItems: "center",
|
|
4775
|
-
justifyContent: "center",
|
|
4776
|
-
fontSize: "16px",
|
|
4777
|
-
fontWeight: "600"
|
|
4778
|
-
},
|
|
4779
|
-
children: e.name.charAt(0)
|
|
4780
|
-
}), /* @__PURE__ */ T("div", {
|
|
4781
|
-
className: "online-status",
|
|
4782
|
-
style: { background: (e.socket_ids?.length ?? 0) > 0 ? "#22c55e" : "#94a3b8" }
|
|
4783
|
-
})]
|
|
4593
|
+
children: t.name.charAt(0)
|
|
4594
|
+
}), /* @__PURE__ */ T("div", { className: `online-status ${(t.socket_ids?.length ?? 0) > 0 ? "is-online" : "is-offline"}` })]
|
|
4784
4595
|
}), /* @__PURE__ */ E("div", {
|
|
4785
4596
|
className: "contact-info",
|
|
4786
4597
|
children: [/* @__PURE__ */ T("div", {
|
|
4787
4598
|
className: "contact-name",
|
|
4788
|
-
children:
|
|
4599
|
+
children: t.name
|
|
4789
4600
|
}), /* @__PURE__ */ T("div", {
|
|
4790
4601
|
className: "contact-role",
|
|
4791
4602
|
children: "Nhân viên"
|
|
@@ -4795,28 +4606,20 @@ var fn = [{
|
|
|
4795
4606
|
className: "contact-item-actions",
|
|
4796
4607
|
children: [/* @__PURE__ */ T("button", {
|
|
4797
4608
|
className: "contact-action-btn",
|
|
4798
|
-
|
|
4799
|
-
border: "none",
|
|
4800
|
-
background: "transparent"
|
|
4801
|
-
},
|
|
4802
|
-
children: /* @__PURE__ */ T(ot, { size: 16 })
|
|
4609
|
+
children: /* @__PURE__ */ T(st, { size: 16 })
|
|
4803
4610
|
}), /* @__PURE__ */ T("button", {
|
|
4804
4611
|
className: "contact-action-btn",
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
background: "transparent"
|
|
4808
|
-
},
|
|
4809
|
-
onClick: () => t(String(e.id)),
|
|
4810
|
-
children: /* @__PURE__ */ T(pt, { size: 16 })
|
|
4612
|
+
onClick: () => e(String(t.id)),
|
|
4613
|
+
children: /* @__PURE__ */ T(mt, { size: 16 })
|
|
4811
4614
|
})]
|
|
4812
4615
|
})]
|
|
4813
|
-
},
|
|
4814
|
-
},
|
|
4616
|
+
}, t.id))]
|
|
4617
|
+
}, t);
|
|
4815
4618
|
})
|
|
4816
4619
|
})
|
|
4817
4620
|
]
|
|
4818
4621
|
});
|
|
4819
|
-
},
|
|
4622
|
+
}, gn = ({ groups: e, onGroupClick: t, currentUserId: n }) => {
|
|
4820
4623
|
let [r, i] = p(""), a = d(() => e.filter((e) => e.name?.toLowerCase().includes(r.toLowerCase())), [e, r]);
|
|
4821
4624
|
return /* @__PURE__ */ E("div", {
|
|
4822
4625
|
className: "contact-list-view",
|
|
@@ -4829,7 +4632,7 @@ var fn = [{
|
|
|
4829
4632
|
alignItems: "center",
|
|
4830
4633
|
gap: "8px"
|
|
4831
4634
|
},
|
|
4832
|
-
children: [/* @__PURE__ */ T(
|
|
4635
|
+
children: [/* @__PURE__ */ T(ct, {}), /* @__PURE__ */ T("div", { children: "Danh sách nhóm và cộng đồng" })]
|
|
4833
4636
|
})
|
|
4834
4637
|
}),
|
|
4835
4638
|
/* @__PURE__ */ T("div", {
|
|
@@ -4838,7 +4641,7 @@ var fn = [{
|
|
|
4838
4641
|
children: /* @__PURE__ */ E("div", {
|
|
4839
4642
|
className: "toolbar-search",
|
|
4840
4643
|
style: { flex: 1 },
|
|
4841
|
-
children: [/* @__PURE__ */ T(
|
|
4644
|
+
children: [/* @__PURE__ */ T(_t, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
|
|
4842
4645
|
type: "text",
|
|
4843
4646
|
placeholder: "Tìm nhóm",
|
|
4844
4647
|
value: r,
|
|
@@ -4859,7 +4662,7 @@ var fn = [{
|
|
|
4859
4662
|
className: "contact-item-left",
|
|
4860
4663
|
children: [/* @__PURE__ */ T("div", {
|
|
4861
4664
|
className: "contact-avatar",
|
|
4862
|
-
children: /* @__PURE__ */ T(
|
|
4665
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
4863
4666
|
chat: e,
|
|
4864
4667
|
currentUserId: n
|
|
4865
4668
|
})
|
|
@@ -4879,7 +4682,7 @@ var fn = [{
|
|
|
4879
4682
|
})
|
|
4880
4683
|
]
|
|
4881
4684
|
});
|
|
4882
|
-
},
|
|
4685
|
+
}, _n = ({ file: e, children: t, className: n = "file-item", isLink: r = !1, handleImageClick: i }) => {
|
|
4883
4686
|
let a = {
|
|
4884
4687
|
className: n,
|
|
4885
4688
|
role: "button",
|
|
@@ -4899,9 +4702,9 @@ var fn = [{
|
|
|
4899
4702
|
...a,
|
|
4900
4703
|
children: t
|
|
4901
4704
|
});
|
|
4902
|
-
},
|
|
4705
|
+
}, vn = ({ file: e }) => /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("span", {
|
|
4903
4706
|
className: "file-icon",
|
|
4904
|
-
children:
|
|
4707
|
+
children: L(e.ext)
|
|
4905
4708
|
}), /* @__PURE__ */ E("div", {
|
|
4906
4709
|
className: "file-info",
|
|
4907
4710
|
children: [/* @__PURE__ */ T("div", {
|
|
@@ -4909,13 +4712,13 @@ var fn = [{
|
|
|
4909
4712
|
children: e.name
|
|
4910
4713
|
}), /* @__PURE__ */ T("div", {
|
|
4911
4714
|
className: "file-size",
|
|
4912
|
-
children:
|
|
4715
|
+
children: oe(e.size)
|
|
4913
4716
|
})]
|
|
4914
|
-
})] }),
|
|
4915
|
-
let { openViewer: t } =
|
|
4717
|
+
})] }), yn = ({ files: e }) => {
|
|
4718
|
+
let { openViewer: t } = Ye();
|
|
4916
4719
|
if (!e || e.length === 0) return null;
|
|
4917
4720
|
let n = e.filter((e) => {
|
|
4918
|
-
let t =
|
|
4721
|
+
let t = z(e.name);
|
|
4919
4722
|
return [
|
|
4920
4723
|
"image",
|
|
4921
4724
|
"video",
|
|
@@ -4926,8 +4729,8 @@ var fn = [{
|
|
|
4926
4729
|
let r = e.findIndex((e) => e.id === n);
|
|
4927
4730
|
r !== -1 && t(e, r);
|
|
4928
4731
|
}, s = (e) => {
|
|
4929
|
-
switch (
|
|
4930
|
-
case "image": return r.includes(e) ? /* @__PURE__ */ E(
|
|
4732
|
+
switch (z(e.name)) {
|
|
4733
|
+
case "image": return r.includes(e) ? /* @__PURE__ */ E(_n, {
|
|
4931
4734
|
file: e,
|
|
4932
4735
|
className: "file-image-wrapper",
|
|
4933
4736
|
handleImageClick: o,
|
|
@@ -4943,7 +4746,7 @@ var fn = [{
|
|
|
4943
4746
|
})
|
|
4944
4747
|
})]
|
|
4945
4748
|
}, e.id) : null;
|
|
4946
|
-
case "video": return /* @__PURE__ */ E(
|
|
4749
|
+
case "video": return /* @__PURE__ */ E(_n, {
|
|
4947
4750
|
file: e,
|
|
4948
4751
|
className: "file-image-wrapper",
|
|
4949
4752
|
handleImageClick: o,
|
|
@@ -4961,16 +4764,16 @@ var fn = [{
|
|
|
4961
4764
|
})]
|
|
4962
4765
|
}, e.id);
|
|
4963
4766
|
case "pdf":
|
|
4964
|
-
case "audio": return /* @__PURE__ */ T(
|
|
4767
|
+
case "audio": return /* @__PURE__ */ T(_n, {
|
|
4965
4768
|
file: e,
|
|
4966
4769
|
handleImageClick: o,
|
|
4967
|
-
children: /* @__PURE__ */ T(
|
|
4770
|
+
children: /* @__PURE__ */ T(vn, { file: e })
|
|
4968
4771
|
}, e.id);
|
|
4969
|
-
default: return /* @__PURE__ */ T(
|
|
4772
|
+
default: return /* @__PURE__ */ T(_n, {
|
|
4970
4773
|
file: e,
|
|
4971
4774
|
isLink: !0,
|
|
4972
4775
|
handleImageClick: o,
|
|
4973
|
-
children: /* @__PURE__ */ T(
|
|
4776
|
+
children: /* @__PURE__ */ T(vn, { file: e })
|
|
4974
4777
|
}, e.id);
|
|
4975
4778
|
}
|
|
4976
4779
|
};
|
|
@@ -4978,17 +4781,17 @@ var fn = [{
|
|
|
4978
4781
|
className: "message-files",
|
|
4979
4782
|
children: e.map((e) => s(e))
|
|
4980
4783
|
});
|
|
4981
|
-
},
|
|
4982
|
-
let { currentUser: t, currentChat: n, currentChatMessages: r } = _((e) => e.chat), { allowDeleteMessage: i, allowRevokeMessage: a } = _(
|
|
4784
|
+
}, bn = ({ message: e }) => {
|
|
4785
|
+
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([], {
|
|
4983
4786
|
hour: "2-digit",
|
|
4984
4787
|
minute: "2-digit"
|
|
4985
|
-
}),
|
|
4788
|
+
}), h = async (t) => {
|
|
4986
4789
|
if (n) try {
|
|
4987
|
-
await
|
|
4790
|
+
await G.actionMessage(n.id, e.id, t);
|
|
4988
4791
|
} catch (e) {
|
|
4989
|
-
console.error("Lỗi khi tương tác tin nhắn:", e),
|
|
4792
|
+
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");
|
|
4990
4793
|
}
|
|
4991
|
-
},
|
|
4794
|
+
}, v = (e, t) => {
|
|
4992
4795
|
e.stopPropagation();
|
|
4993
4796
|
let n = e.currentTarget.getRootNode(), r = n.getElementById ? n.getElementById(`chat-message-${t}`) : document.getElementById(`chat-message-${t}`);
|
|
4994
4797
|
r && r.scrollIntoView({
|
|
@@ -4997,10 +4800,10 @@ var fn = [{
|
|
|
4997
4800
|
}), r?.classList.add("highlight-message"), setTimeout(() => {
|
|
4998
4801
|
r?.classList.remove("highlight-message");
|
|
4999
4802
|
}, 2e3);
|
|
5000
|
-
},
|
|
4803
|
+
}, 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;
|
|
5001
4804
|
return e.removed ? null : e.revoked ? /* @__PURE__ */ E("div", {
|
|
5002
|
-
className: `message-item ${
|
|
5003
|
-
children: [!
|
|
4805
|
+
className: `message-item ${l ? "current-user" : "other-user"}`,
|
|
4806
|
+
children: [!l && e.member.avatar && /* @__PURE__ */ T("img", {
|
|
5004
4807
|
src: e.member.avatar,
|
|
5005
4808
|
alt: e.member.name,
|
|
5006
4809
|
className: "message-avatar",
|
|
@@ -5008,13 +4811,7 @@ var fn = [{
|
|
|
5008
4811
|
}), /* @__PURE__ */ T("div", {
|
|
5009
4812
|
className: "message-content",
|
|
5010
4813
|
children: /* @__PURE__ */ T("div", {
|
|
5011
|
-
className: `message-bubble ${
|
|
5012
|
-
style: {
|
|
5013
|
-
fontStyle: "italic",
|
|
5014
|
-
opacity: .8,
|
|
5015
|
-
background: "rgba(255, 255, 255, 0.05)",
|
|
5016
|
-
border: "1px dashed rgba(255, 255, 255, 0.2)"
|
|
5017
|
-
},
|
|
4814
|
+
className: `message-bubble ${l ? "current-user" : "other-user"} revoked`,
|
|
5018
4815
|
children: /* @__PURE__ */ T("div", {
|
|
5019
4816
|
className: "message-text",
|
|
5020
4817
|
children: s("chatMessage.states.revoked")
|
|
@@ -5023,8 +4820,8 @@ var fn = [{
|
|
|
5023
4820
|
})]
|
|
5024
4821
|
}) : /* @__PURE__ */ E("div", {
|
|
5025
4822
|
id: `chat-message-${e.id}`,
|
|
5026
|
-
className: `message-item ${
|
|
5027
|
-
children: [!
|
|
4823
|
+
className: `message-item ${l ? "current-user" : "other-user"}`,
|
|
4824
|
+
children: [!l && e.member.avatar && /* @__PURE__ */ T("img", {
|
|
5028
4825
|
src: e.member.avatar,
|
|
5029
4826
|
alt: e.member.name,
|
|
5030
4827
|
className: "message-avatar",
|
|
@@ -5032,7 +4829,7 @@ var fn = [{
|
|
|
5032
4829
|
}), /* @__PURE__ */ E("div", {
|
|
5033
4830
|
className: "message-content",
|
|
5034
4831
|
children: [
|
|
5035
|
-
!
|
|
4832
|
+
!l && /* @__PURE__ */ T("div", {
|
|
5036
4833
|
className: "message-member-name",
|
|
5037
4834
|
children: e.member.name
|
|
5038
4835
|
}),
|
|
@@ -5041,64 +4838,63 @@ var fn = [{
|
|
|
5041
4838
|
children: [
|
|
5042
4839
|
/* @__PURE__ */ T("div", {
|
|
5043
4840
|
className: "message-actions-bar",
|
|
5044
|
-
children:
|
|
4841
|
+
children: l ? /* @__PURE__ */ E(w, { children: [
|
|
5045
4842
|
/* @__PURE__ */ T("button", {
|
|
5046
4843
|
className: "action-icon",
|
|
5047
4844
|
title: s("chatMessage.actions.like"),
|
|
5048
|
-
onClick: () => void
|
|
5049
|
-
children: /* @__PURE__ */ T(
|
|
4845
|
+
onClick: () => void h("like"),
|
|
4846
|
+
children: /* @__PURE__ */ T(Lt, {})
|
|
5050
4847
|
}),
|
|
5051
4848
|
/* @__PURE__ */ T("button", {
|
|
5052
4849
|
className: "action-icon",
|
|
5053
4850
|
title: s("chatMessage.actions.love"),
|
|
5054
|
-
onClick: () => void
|
|
5055
|
-
children: /* @__PURE__ */ T(
|
|
4851
|
+
onClick: () => void h("love"),
|
|
4852
|
+
children: /* @__PURE__ */ T(Rt, {})
|
|
5056
4853
|
}),
|
|
5057
4854
|
/* @__PURE__ */ T("button", {
|
|
5058
4855
|
className: "action-icon",
|
|
5059
4856
|
title: s("chatMessage.actions.reply"),
|
|
5060
|
-
onClick: () => o(
|
|
5061
|
-
children: /* @__PURE__ */ T(
|
|
4857
|
+
onClick: () => o(ke(e)),
|
|
4858
|
+
children: /* @__PURE__ */ T(kt, {})
|
|
5062
4859
|
}),
|
|
5063
4860
|
i(e.created_at) && /* @__PURE__ */ T("button", {
|
|
5064
4861
|
className: "action-icon",
|
|
5065
4862
|
title: s("chatMessage.actions.delete"),
|
|
5066
|
-
onClick: () => void
|
|
5067
|
-
children: /* @__PURE__ */ T(
|
|
4863
|
+
onClick: () => void h("remove"),
|
|
4864
|
+
children: /* @__PURE__ */ T(zt, {})
|
|
5068
4865
|
}),
|
|
5069
4866
|
a(e.created_at) && /* @__PURE__ */ T("button", {
|
|
5070
4867
|
className: "action-icon",
|
|
5071
4868
|
title: s("chatMessage.actions.revoke"),
|
|
5072
|
-
onClick: () => void
|
|
5073
|
-
children: /* @__PURE__ */ T(
|
|
4869
|
+
onClick: () => void h("revoke"),
|
|
4870
|
+
children: /* @__PURE__ */ T(Bt, {})
|
|
5074
4871
|
})
|
|
5075
4872
|
] }) : /* @__PURE__ */ E(w, { children: [
|
|
5076
4873
|
/* @__PURE__ */ T("button", {
|
|
5077
4874
|
className: "action-icon",
|
|
5078
4875
|
title: s("chatMessage.actions.reply"),
|
|
5079
|
-
onClick: () => o(
|
|
5080
|
-
children: /* @__PURE__ */ T(
|
|
4876
|
+
onClick: () => o(ke(e)),
|
|
4877
|
+
children: /* @__PURE__ */ T(kt, {})
|
|
5081
4878
|
}),
|
|
5082
4879
|
/* @__PURE__ */ T("button", {
|
|
5083
4880
|
className: "action-icon",
|
|
5084
4881
|
title: s("chatMessage.actions.like"),
|
|
5085
|
-
onClick: () => void
|
|
5086
|
-
children: /* @__PURE__ */ T(
|
|
4882
|
+
onClick: () => void h("like"),
|
|
4883
|
+
children: /* @__PURE__ */ T(Lt, {})
|
|
5087
4884
|
}),
|
|
5088
4885
|
/* @__PURE__ */ T("button", {
|
|
5089
4886
|
className: "action-icon",
|
|
5090
4887
|
title: s("chatMessage.actions.love"),
|
|
5091
|
-
onClick: () => void
|
|
5092
|
-
children: /* @__PURE__ */ T(
|
|
4888
|
+
onClick: () => void h("love"),
|
|
4889
|
+
children: /* @__PURE__ */ T(Rt, {})
|
|
5093
4890
|
})
|
|
5094
4891
|
] })
|
|
5095
4892
|
}),
|
|
5096
4893
|
e.content || e.reply ? /* @__PURE__ */ E("div", {
|
|
5097
|
-
className: `message-bubble ${
|
|
4894
|
+
className: `message-bubble ${l ? "current-user" : "other-user"}`,
|
|
5098
4895
|
children: [e.reply && /* @__PURE__ */ E("div", {
|
|
5099
4896
|
className: "message-reply-preview",
|
|
5100
|
-
onClick: (t) =>
|
|
5101
|
-
style: { cursor: "pointer" },
|
|
4897
|
+
onClick: (t) => v(t, e.reply.id),
|
|
5102
4898
|
children: [/* @__PURE__ */ T("div", {
|
|
5103
4899
|
className: "reply-user-name",
|
|
5104
4900
|
children: e.reply.member.name
|
|
@@ -5108,22 +4904,22 @@ var fn = [{
|
|
|
5108
4904
|
})]
|
|
5109
4905
|
}), e.content && /* @__PURE__ */ T("div", {
|
|
5110
4906
|
className: "message-text",
|
|
5111
|
-
children: e.content.length > 500 && !
|
|
4907
|
+
children: e.content.length > 500 && !u ? /* @__PURE__ */ E(w, { children: [
|
|
5112
4908
|
e.content.substring(0, 500),
|
|
5113
4909
|
"...",
|
|
5114
4910
|
/* @__PURE__ */ T("span", {
|
|
5115
4911
|
className: "see-more-btn",
|
|
5116
|
-
onClick: () =>
|
|
4912
|
+
onClick: () => f(!0),
|
|
5117
4913
|
children: s("chatMessage.actions.seeMore")
|
|
5118
4914
|
})
|
|
5119
4915
|
] }) : /* @__PURE__ */ E(w, { children: [e.content, e.content.length > 500 && /* @__PURE__ */ T("span", {
|
|
5120
4916
|
className: "see-more-btn",
|
|
5121
|
-
onClick: () =>
|
|
4917
|
+
onClick: () => f(!1),
|
|
5122
4918
|
children: s("chatMessage.actions.seeLess")
|
|
5123
4919
|
})] })
|
|
5124
4920
|
})]
|
|
5125
4921
|
}) : null,
|
|
5126
|
-
/* @__PURE__ */ T(
|
|
4922
|
+
/* @__PURE__ */ T(yn, { files: e.files }),
|
|
5127
4923
|
e.action && (e.action.like > 0 || e.action.love > 0) && /* @__PURE__ */ E("div", {
|
|
5128
4924
|
className: "message-reactions-badge",
|
|
5129
4925
|
children: [e.action.like > 0 && /* @__PURE__ */ T("span", { children: "👍" }), e.action.love > 0 && /* @__PURE__ */ T("span", { children: "♥️" })]
|
|
@@ -5132,22 +4928,22 @@ var fn = [{
|
|
|
5132
4928
|
}),
|
|
5133
4929
|
/* @__PURE__ */ E("div", {
|
|
5134
4930
|
className: "message-time",
|
|
5135
|
-
children: [
|
|
5136
|
-
className: `message-item-status ${
|
|
5137
|
-
children:
|
|
4931
|
+
children: [m, l && (x || S) && /* @__PURE__ */ T("span", {
|
|
4932
|
+
className: `message-item-status ${x ? "seen" : ""}`,
|
|
4933
|
+
children: x ? /* @__PURE__ */ T(Vt, {}) : `• ${s("chatMessage.status.sent")}`
|
|
5138
4934
|
})]
|
|
5139
4935
|
})
|
|
5140
4936
|
]
|
|
5141
4937
|
})]
|
|
5142
4938
|
});
|
|
5143
|
-
},
|
|
4939
|
+
}, xn = () => {
|
|
5144
4940
|
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);
|
|
5145
4941
|
c(() => {
|
|
5146
4942
|
(async () => {
|
|
5147
4943
|
if (t && x.current !== Number(t.id)) {
|
|
5148
4944
|
x.current = Number(t.id);
|
|
5149
4945
|
try {
|
|
5150
|
-
let e =
|
|
4946
|
+
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]);
|
|
5151
4947
|
r?.data && (o(ge(r.data)), o(be(r.pagination)), o(_e(i)));
|
|
5152
4948
|
} catch (e) {
|
|
5153
4949
|
console.error("Lỗi khi tải tin nhắn:", e), x.current = null;
|
|
@@ -5161,7 +4957,7 @@ var fn = [{
|
|
|
5161
4957
|
]), c(() => {
|
|
5162
4958
|
if (t && n.length > 0) {
|
|
5163
4959
|
let e = n[0], r = t.new?.[i?.id ?? 0] > 0;
|
|
5164
|
-
e.member.code !== i?.code && r &&
|
|
4960
|
+
e.member.code !== i?.code && r && G.readChat(t.id);
|
|
5165
4961
|
}
|
|
5166
4962
|
}, [
|
|
5167
4963
|
t,
|
|
@@ -5174,8 +4970,8 @@ var fn = [{
|
|
|
5174
4970
|
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) {
|
|
5175
4971
|
S.current = !0, m(!0);
|
|
5176
4972
|
try {
|
|
5177
|
-
let e = r.current_page + 1, n = await
|
|
5178
|
-
n.data && (o(
|
|
4973
|
+
let e = r.current_page + 1, n = await G.getMessages(Number(t?.id), 20, e);
|
|
4974
|
+
n.data && (o(xe(n.data)), o(be(n.pagination)));
|
|
5179
4975
|
} catch (e) {
|
|
5180
4976
|
console.error("Load more error", e);
|
|
5181
4977
|
} finally {
|
|
@@ -5203,28 +4999,13 @@ var fn = [{
|
|
|
5203
4999
|
w
|
|
5204
5000
|
]), /* @__PURE__ */ E("div", {
|
|
5205
5001
|
className: "message-list-wrapper",
|
|
5206
|
-
style: {
|
|
5207
|
-
position: "relative",
|
|
5208
|
-
flex: 1,
|
|
5209
|
-
overflow: "hidden",
|
|
5210
|
-
display: "flex",
|
|
5211
|
-
flexDirection: "column"
|
|
5212
|
-
},
|
|
5213
5002
|
children: [/* @__PURE__ */ T("div", {
|
|
5214
5003
|
className: "message-list",
|
|
5215
5004
|
ref: s,
|
|
5216
5005
|
onScroll: (e) => void C(e),
|
|
5217
|
-
style: {
|
|
5218
|
-
overflowY: "auto",
|
|
5219
|
-
flex: 1,
|
|
5220
|
-
display: "flex",
|
|
5221
|
-
flexDirection: "column-reverse",
|
|
5222
|
-
gap: "20px",
|
|
5223
|
-
padding: "24px 20px"
|
|
5224
|
-
},
|
|
5225
5006
|
children: n.map((t, r) => {
|
|
5226
5007
|
let i = new Date(t.created_at).toDateString(), a = n[r + 1], o = i !== (a ? new Date(a.created_at).toDateString() : null);
|
|
5227
|
-
return /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(
|
|
5008
|
+
return /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(bn, { message: t }), o && /* @__PURE__ */ T("div", {
|
|
5228
5009
|
className: "chat-date-divider",
|
|
5229
5010
|
children: /* @__PURE__ */ T("span", { children: N(t.created_at) })
|
|
5230
5011
|
})] }, t.id);
|
|
@@ -5238,9 +5019,9 @@ var fn = [{
|
|
|
5238
5019
|
};
|
|
5239
5020
|
//#endregion
|
|
5240
5021
|
//#region src/index.ts
|
|
5241
|
-
function
|
|
5022
|
+
function Sn(e) {
|
|
5242
5023
|
let t = document.createElement("div");
|
|
5243
|
-
t.id = "chatbot-widget-umd-root", document.body.appendChild(t), m(t).render(n(
|
|
5024
|
+
t.id = "chatbot-widget-umd-root", document.body.appendChild(t), m(t).render(n(nt, e));
|
|
5244
5025
|
}
|
|
5245
5026
|
//#endregion
|
|
5246
|
-
export {
|
|
5027
|
+
export { nt as ChatWidget, Sn as init };
|