// 聊天室 Vite 入口,集中导出从 Blade 内联脚本迁移出的纯前端工具。 /** * 模块引用说明: * - html.js:提供聊天内容通用 HTML 转义工具。 * - appointment-announcement.js:处理任命/撤销公告的大卡片和系统消息。 * - banner.js:提供 window.chatBanner 居中大卡片通知。 * - chat-bot.js:处理 AI 小班长发送消息和清空上下文。 * - dialog.js:提供 window.chatDialog 全局弹窗。 * - daily-sign-in.js:处理每日签到弹窗与补签入口。 * - font-size.js:处理聊天输入/消息字号设置。 * - image-upload.js:处理聊天图片上传入口。 * - composer.js:处理聊天输入框、发送按钮和快捷操作。 * - toast.js:提供 window.chatToast 右下角通知。 * - friend-panel.js:处理好友面板、搜索和好友快捷操作。 * - friend-notifications.js:监听好友通知和通用 BannerNotification。 * - lightbox.js:处理聊天图片预览灯箱。 * - lottery-panel.js:提供双色球彩票 lotteryPanel Alpine 组件和全局开关入口。 * - mobile-drawer.js:处理移动端抽屉、房间列表和在线名单。 * - marriage-status.js:处理婚姻状态展示与用户名片联动。 * - toolbar.js:处理工具栏按钮和功能快捷入口。 * - user-target-actions.js:处理点击用户名切换私聊目标和打开名片。 * - welcome-menu.js:处理欢迎菜单交互。 * - admin-menu.js:处理聊天室管理菜单交互。 * - baccarat-loss-cover-admin.js:处理百家乐买单活动管理弹层。 * - baccarat-loss-cover.js:处理百家乐买单活动前台弹窗。 * - game-hall.js:处理娱乐大厅弹窗和游戏入口卡片。 * - game-bootstrap.js:提供非关键游戏延迟初始化工具。 * - game-panels.js:处理通用游戏面板关闭事件。 * - holiday-modal.js:处理节日福利弹窗和系统消息入口。 * - initial-state.js:恢复首屏历史消息、欢迎消息、入场特效和挂起婚姻事件。 * - bank-modal.js:处理银行弹窗、转账、排行和标签切换。 * - fishing.js:处理钓鱼入口与自动钓鱼相关交互。 * - fortune-panel.js:提供神秘占卜 fortunePanel Alpine 组件。 * - profile-controls.js:处理用户资料和资料相关按钮。 * - shop-controls.js:处理商店弹窗的基础按钮事件。 * - slot-machine.js:提供老虎机 slotPanel/slotFab Alpine 组件。 * - vip-controls.js:处理 VIP 中心相关入口。 * - preferences-status.js:处理聊天偏好、屏蔽系统播报和静音状态。 * - right-panel.js:处理右侧在线用户列表和用户名交互。 * - rooms.js:处理房间在线状态渲染和跳转 URL。 * - reward-modal.js:处理职务奖励金币弹窗入口。 * - message-queue.js:提供聊天消息分批渲染队列。 */ // 统一转发各子模块导出,方便测试或后续模块继续复用同一组工具。 export { escapeHtml, escapeHtmlWithLineBreaks } from "./chat-room/html.js"; export { bindAppointmentAnnouncementControls, showAppointmentBanner } from "./chat-room/appointment-announcement.js"; export { bindChatBanner } from "./chat-room/banner.js"; export { bindChatBotControls, clearChatBotContext, sendToChatBot } from "./chat-room/chat-bot.js"; export { bindGlobalDialogControls } from "./chat-room/dialog.js"; export { bindDailySignInControls } from "./chat-room/daily-sign-in.js"; export { applyFontSize, bindChatFontSizeControl, CHAT_FONT_SIZE_STORAGE_KEY, restoreChatFontSize } from "./chat-room/font-size.js"; export { bindChatImageUploadControl } from "./chat-room/image-upload.js"; export { bindChatComposerControls } from "./chat-room/composer.js"; export { bindChatToast } from "./chat-room/toast.js"; export { bindFriendPanelControls, closeFriendPanel, friendSearch, loadFriends, openFriendPanel, quickFriendAction } from "./chat-room/friend-panel.js"; export { bindFriendNotificationControls, setupBannerNotification, setupFriendNotification, showFriendBanner } from "./chat-room/friend-notifications.js"; export { closeChatImageLightbox, initChatImageLightboxEvents, openChatImageLightbox } from "./chat-room/lightbox.js"; export { bindLotteryPanelControls, closeLotteryPanel, lotteryPanel, openLotteryPanel, showLotteryMsg } from "./chat-room/lottery-panel.js"; export { bindMobileDrawerControls, closeMobileDrawer, loadMobileRoomList, openMobileDrawer, renderMobileRoomList, renderMobileUserList, scheduleRenderMobileUserList, switchMobileTab, } from "./chat-room/mobile-drawer.js"; export { bindMarriageStatusControls } from "./chat-room/marriage-status.js"; export { bindToolbarControls, runFeatureShortcut, runToolbarAction } from "./chat-room/toolbar.js"; export { bindUserTargetActions, openUserCard, switchTarget } from "./chat-room/user-target-actions.js"; export { bindWelcomeMenuControls } from "./chat-room/welcome-menu.js"; export { bindAdminMenuControls } from "./chat-room/admin-menu.js"; export { bindBaccaratLossCoverAdminControls, closeAdminBaccaratLossCoverModal, closeCurrentBaccaratLossCoverEvent, loadAdminCurrentLossCoverEvent, openAdminBaccaratLossCoverModal, submitBaccaratLossCoverEvent, } from "./chat-room/baccarat-loss-cover-admin.js"; export { bindBaccaratLossCoverControls, claimBaccaratLossCover, closeBaccaratLossCoverModal, openBaccaratLossCoverModal, switchBaccaratLossCoverTab, } from "./chat-room/baccarat-loss-cover.js"; export { bindGameHallControls, closeGameHall, openGameHall } from "./chat-room/game-hall.js"; export { bindGameBootstrapControls, deferChatGameBootstrap } from "./chat-room/game-bootstrap.js"; export { bindGamePanelControls } from "./chat-room/game-panels.js"; export { bindHolidayModalControls, openHolidayRunFromSystemMessage } from "./chat-room/holiday-modal.js"; export { bindChatInitialStateControls } from "./chat-room/initial-state.js"; export { bankAction, bankLoadInfo, bankShowMsg, bindBankControls, closeBankModal, fetchBankRanking, openBankModal, switchBankTab, toggleBankRankSort, } from "./chat-room/bank-modal.js"; export { bindFishingControls } from "./chat-room/fishing.js"; export { bindFortunePanelControls, fortunePanel } from "./chat-room/fortune-panel.js"; export { bindProfileControls } from "./chat-room/profile-controls.js"; export { bindShopControls } from "./chat-room/shop-controls.js"; export { bindSlotMachineControls, slotFab, slotPanel } from "./chat-room/slot-machine.js"; export { bindVipControls } from "./chat-room/vip-controls.js"; export { BLOCKABLE_SYSTEM_SENDERS, BLOCKED_SYSTEM_SENDERS_STORAGE_KEY, CHAT_SOUND_MUTED_STORAGE_KEY, bindBlockMenuControls, bindSoundMuteControl, isSoundMuted, loadBlockedSystemSenders, normalizeChatPreferences, normalizeDailyStatus, parseDailyStatusExpiry, persistBlockedSystemSenders, setSoundMuted, shouldMigrateLocalChatPreferences, } from "./chat-room/preferences-status.js"; export { bindChatRightPanelControls } from "./chat-room/right-panel.js"; export { bindRoomStatusControls, normalizeRoomStatus, renderRoomStatusRow, renderRoomsOnlineStatus, renderRoomsOnlineStatusToContainer, resolveRoomUrl, } from "./chat-room/rooms.js"; export { bindRewardModalControls, openRewardModal } from "./chat-room/reward-modal.js"; export { createMessageQueue } from "./chat-room/message-queue.js"; import { escapeHtml, escapeHtmlWithLineBreaks } from "./chat-room/html.js"; import { bindAppointmentAnnouncementControls, showAppointmentBanner } from "./chat-room/appointment-announcement.js"; import { bindChatBanner } from "./chat-room/banner.js"; import { bindChatBotControls, clearChatBotContext, sendToChatBot } from "./chat-room/chat-bot.js"; import { bindGlobalDialogControls } from "./chat-room/dialog.js"; import { bindDailySignInControls } from "./chat-room/daily-sign-in.js"; import { applyFontSize, bindChatFontSizeControl, CHAT_FONT_SIZE_STORAGE_KEY, restoreChatFontSize } from "./chat-room/font-size.js"; import { bindChatImageUploadControl } from "./chat-room/image-upload.js"; import { bindChatComposerControls } from "./chat-room/composer.js"; import { bindChatToast } from "./chat-room/toast.js"; import { bindFriendPanelControls, closeFriendPanel, friendSearch, loadFriends, openFriendPanel, quickFriendAction } from "./chat-room/friend-panel.js"; import { bindFriendNotificationControls, setupBannerNotification, setupFriendNotification, showFriendBanner } from "./chat-room/friend-notifications.js"; import { closeChatImageLightbox, initChatImageLightboxEvents, openChatImageLightbox } from "./chat-room/lightbox.js"; import { bindLotteryPanelControls, closeLotteryPanel, lotteryPanel, openLotteryPanel, showLotteryMsg } from "./chat-room/lottery-panel.js"; import { bindMobileDrawerControls, closeMobileDrawer, loadMobileRoomList, openMobileDrawer, renderMobileRoomList, renderMobileUserList, scheduleRenderMobileUserList, switchMobileTab, } from "./chat-room/mobile-drawer.js"; import { bindMarriageStatusControls } from "./chat-room/marriage-status.js"; import { bindToolbarControls, runFeatureShortcut, runToolbarAction } from "./chat-room/toolbar.js"; import { bindUserTargetActions, openUserCard, switchTarget } from "./chat-room/user-target-actions.js"; import { bindWelcomeMenuControls } from "./chat-room/welcome-menu.js"; import { bindAdminMenuControls } from "./chat-room/admin-menu.js"; import { bindBaccaratLossCoverAdminControls, closeAdminBaccaratLossCoverModal, closeCurrentBaccaratLossCoverEvent, loadAdminCurrentLossCoverEvent, openAdminBaccaratLossCoverModal, submitBaccaratLossCoverEvent, } from "./chat-room/baccarat-loss-cover-admin.js"; import { bindBaccaratLossCoverControls, claimBaccaratLossCover, closeBaccaratLossCoverModal, openBaccaratLossCoverModal, switchBaccaratLossCoverTab, } from "./chat-room/baccarat-loss-cover.js"; import { bindGameHallControls, closeGameHall, openGameHall } from "./chat-room/game-hall.js"; import { bindGameBootstrapControls, deferChatGameBootstrap } from "./chat-room/game-bootstrap.js"; import { bindGamePanelControls } from "./chat-room/game-panels.js"; import { bindHolidayModalControls, openHolidayRunFromSystemMessage } from "./chat-room/holiday-modal.js"; import { bindChatInitialStateControls } from "./chat-room/initial-state.js"; import { bankAction, bankLoadInfo, bankShowMsg, bindBankControls, closeBankModal, fetchBankRanking, openBankModal, switchBankTab, toggleBankRankSort, } from "./chat-room/bank-modal.js"; import { bindFishingControls } from "./chat-room/fishing.js"; import { bindFortunePanelControls, fortunePanel } from "./chat-room/fortune-panel.js"; import { bindProfileControls } from "./chat-room/profile-controls.js"; import { bindShopControls } from "./chat-room/shop-controls.js"; import { bindSlotMachineControls, slotFab, slotPanel } from "./chat-room/slot-machine.js"; import { bindVipControls } from "./chat-room/vip-controls.js"; import { BLOCKABLE_SYSTEM_SENDERS, BLOCKED_SYSTEM_SENDERS_STORAGE_KEY, CHAT_SOUND_MUTED_STORAGE_KEY, bindBlockMenuControls, bindSoundMuteControl, isSoundMuted, loadBlockedSystemSenders, normalizeChatPreferences, normalizeDailyStatus, parseDailyStatusExpiry, persistBlockedSystemSenders, setSoundMuted, shouldMigrateLocalChatPreferences, } from "./chat-room/preferences-status.js"; import { bindChatRightPanelControls } from "./chat-room/right-panel.js"; import { bindRoomStatusControls, normalizeRoomStatus, renderRoomStatusRow, renderRoomsOnlineStatus, renderRoomsOnlineStatusToContainer, resolveRoomUrl, } from "./chat-room/rooms.js"; import { bindRewardModalControls, openRewardModal } from "./chat-room/reward-modal.js"; import { createMessageQueue } from "./chat-room/message-queue.js"; if (typeof window !== "undefined") { // 保留聚合入口,给新迁移模块、测试和仍在 Blade 内的存量脚本统一读取工具。 window.ChatRoomTools = { escapeHtml, escapeHtmlWithLineBreaks, bindAppointmentAnnouncementControls, showAppointmentBanner, bindChatBanner, bindChatBotControls, clearChatBotContext, sendToChatBot, bindGlobalDialogControls, bindDailySignInControls, bindLotteryPanelControls, closeLotteryPanel, lotteryPanel, openLotteryPanel, showLotteryMsg, applyFontSize, bindChatFontSizeControl, bindChatImageUploadControl, bindChatComposerControls, bindChatToast, bindFriendPanelControls, bindFriendNotificationControls, closeFriendPanel, friendSearch, loadFriends, openFriendPanel, quickFriendAction, setupBannerNotification, setupFriendNotification, showFriendBanner, bindMobileDrawerControls, closeMobileDrawer, loadMobileRoomList, openMobileDrawer, renderMobileRoomList, renderMobileUserList, scheduleRenderMobileUserList, switchMobileTab, bindToolbarControls, runFeatureShortcut, runToolbarAction, bindUserTargetActions, openUserCard, switchTarget, bindWelcomeMenuControls, bindAdminMenuControls, bindBaccaratLossCoverAdminControls, closeAdminBaccaratLossCoverModal, closeCurrentBaccaratLossCoverEvent, bindBaccaratLossCoverControls, claimBaccaratLossCover, closeBaccaratLossCoverModal, openBaccaratLossCoverModal, switchBaccaratLossCoverTab, bindGameHallControls, closeGameHall, openGameHall, bindGameBootstrapControls, deferChatGameBootstrap, bindGamePanelControls, bindHolidayModalControls, openHolidayRunFromSystemMessage, bindChatInitialStateControls, loadAdminCurrentLossCoverEvent, openAdminBaccaratLossCoverModal, submitBaccaratLossCoverEvent, bankAction, bankLoadInfo, bankShowMsg, bindBankControls, closeBankModal, fetchBankRanking, openBankModal, switchBankTab, toggleBankRankSort, bindFishingControls, bindFortunePanelControls, fortunePanel, bindMarriageStatusControls, bindProfileControls, bindShopControls, bindSlotMachineControls, slotFab, slotPanel, bindVipControls, CHAT_FONT_SIZE_STORAGE_KEY, restoreChatFontSize, closeChatImageLightbox, initChatImageLightboxEvents, openChatImageLightbox, BLOCKABLE_SYSTEM_SENDERS, BLOCKED_SYSTEM_SENDERS_STORAGE_KEY, CHAT_SOUND_MUTED_STORAGE_KEY, bindBlockMenuControls, bindSoundMuteControl, isSoundMuted, loadBlockedSystemSenders, normalizeChatPreferences, normalizeDailyStatus, parseDailyStatusExpiry, persistBlockedSystemSenders, setSoundMuted, shouldMigrateLocalChatPreferences, bindChatRightPanelControls, bindRoomStatusControls, normalizeRoomStatus, renderRoomStatusRow, renderRoomsOnlineStatus, renderRoomsOnlineStatusToContainer, resolveRoomUrl, bindRewardModalControls, openRewardModal, createMessageQueue, }; // 直接挂载只服务暂未迁移的 Blade 调用点;新代码优先通过模块导入或 ChatRoomTools 复用。 window.closeChatImageLightbox = closeChatImageLightbox; window.openChatImageLightbox = openChatImageLightbox; window.closeFriendPanel = closeFriendPanel; window.friendSearch = friendSearch; window.openFriendPanel = openFriendPanel; window.quickFriendAction = quickFriendAction; window.setupBannerNotification = setupBannerNotification; window.setupFriendNotification = setupFriendNotification; window.showFriendBanner = showFriendBanner; window.closeMobileDrawer = closeMobileDrawer; window.loadMobileRoomList = loadMobileRoomList; window.openMobileDrawer = openMobileDrawer; window.openUserCard = openUserCard; window.openRewardModal = openRewardModal; window.renderMobileRoomList = renderMobileRoomList; window.renderMobileUserList = renderMobileUserList; window.scheduleRenderMobileUserList = scheduleRenderMobileUserList; window.switchMobileTab = switchMobileTab; window.switchTarget = switchTarget; window.clearChatBotContext = clearChatBotContext; window.sendToChatBot = sendToChatBot; window.slotFab = slotFab; window.slotPanel = slotPanel; window.runFeatureShortcut = runFeatureShortcut; window.runToolbarAction = runToolbarAction; window.openHolidayRunFromSystemMessage = openHolidayRunFromSystemMessage; window.closeAdminBaccaratLossCoverModal = closeAdminBaccaratLossCoverModal; window.closeCurrentBaccaratLossCoverEvent = closeCurrentBaccaratLossCoverEvent; window.claimBaccaratLossCover = claimBaccaratLossCover; window.closeBaccaratLossCoverModal = closeBaccaratLossCoverModal; window.openBaccaratLossCoverModal = openBaccaratLossCoverModal; window.openAdminBaccaratLossCoverModal = openAdminBaccaratLossCoverModal; window.submitBaccaratLossCoverEvent = submitBaccaratLossCoverEvent; window.switchBaccaratLossCoverTab = switchBaccaratLossCoverTab; window.bankAction = bankAction; window.bankLoadInfo = bankLoadInfo; window.bankShowMsg = bankShowMsg; window.closeBankModal = closeBankModal; window.closeGameHall = closeGameHall; window.fetchBankRanking = fetchBankRanking; window.fortunePanel = fortunePanel; window.closeLotteryPanel = closeLotteryPanel; window.deferChatGameBootstrap = deferChatGameBootstrap; window.lotteryPanel = lotteryPanel; window.openGameHall = openGameHall; window.openLotteryPanel = openLotteryPanel; window.openBankModal = openBankModal; window.showLotteryMsg = showLotteryMsg; window.switchBankTab = switchBankTab; window.toggleBankRankSort = toggleBankRankSort; window.applyFontSize = applyFontSize; // 页面加载后立即注册事件委托,具体业务逻辑仍由各子模块负责。 bindChatBanner(); bindChatBotControls(); bindAppointmentAnnouncementControls(); bindGlobalDialogControls(); bindDailySignInControls(); bindLotteryPanelControls(); bindChatFontSizeControl(); bindChatImageUploadControl(); bindChatComposerControls(); bindChatToast(); bindFriendPanelControls(); bindFriendNotificationControls(); bindToolbarControls(); bindUserTargetActions(); bindAdminMenuControls(); bindBaccaratLossCoverAdminControls(); bindBaccaratLossCoverControls(); bindGameHallControls(); bindGameBootstrapControls(); bindGamePanelControls(); bindHolidayModalControls(); bindChatInitialStateControls(); bindBankControls(); bindFishingControls(); bindFortunePanelControls(); bindMarriageStatusControls(); bindProfileControls(); bindShopControls(); bindSlotMachineControls(); bindVipControls(); bindChatRightPanelControls(); bindRoomStatusControls(); bindRewardModalControls(); bindMobileDrawerControls(); bindWelcomeMenuControls(); bindBlockMenuControls(); }