hermes-web-ui 0.2.4 → 0.2.5
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/dist/assets/{Button-sJ2BpaPl.js → Button-DBOPt_s1.js} +1 -1
- package/dist/assets/{ChannelsView-C2h4_vNn.css → ChannelsView-BU9QAub-.css} +1 -1
- package/dist/assets/ChannelsView-CIZXL3vY.js +1 -0
- package/dist/assets/ChatView-D1SaZAvQ.css +1 -0
- package/dist/assets/ChatView-DvAYfM24.js +142 -0
- package/dist/assets/{Close-2w73mIOt.js → Close-Ck11Jegf.js} +1 -1
- package/dist/assets/{FormItem-XpOdWzQ0.js → FormItem-De01hN-G.js} +1 -1
- package/dist/assets/{Input-BzhYBEbH.js → Input-CyvPny5v.js} +1 -1
- package/dist/assets/{InputNumber-8txyKuLX.js → InputNumber-v7Tkrv97.js} +1 -1
- package/dist/assets/{JobsView-C-1FgnDL.js → JobsView-Cch6Sv2Y.js} +2 -2
- package/dist/assets/{JobsView-OYrxaGgM.css → JobsView-DARa8llR.css} +1 -1
- package/dist/assets/LoginView-Cp-xfwtv.css +1 -0
- package/dist/assets/{LoginView-BD15AZNF.js → LoginView-DsClZpVT.js} +1 -1
- package/dist/assets/{LogsView-DmQ4ttpe.js → LogsView-BgmSycD4.js} +1 -1
- package/dist/assets/LogsView-COSQTXoG.css +1 -0
- package/dist/assets/MarkdownRenderer-Bd-nS4jK.css +1 -0
- package/dist/assets/{MarkdownRenderer-DJm5zGZj.js → MarkdownRenderer-z5xC7cOw.js} +1 -1
- package/dist/assets/{MemoryView-DBtvO2X2.js → MemoryView-BUZGXC60.js} +2 -2
- package/dist/assets/MemoryView-CL5H-3mE.css +1 -0
- package/dist/assets/{Modal-D421R1s7.js → Modal-BLLYorfc.js} +1 -1
- package/dist/assets/{ModelsView-Dt3deKCr.js → ModelsView-ByryHyh7.js} +1 -1
- package/dist/assets/{ModelsView-Dm1vBT2p.css → ModelsView-DCR-0I10.css} +1 -1
- package/dist/assets/{Popover-pOQtxFC1.js → Popover-ZzeCeChJ.js} +1 -1
- package/dist/assets/{Select-rOqAn7Lj.js → Select-CPQQRbMt.js} +1 -1
- package/dist/assets/{SettingRow-CndAlF8Z.js → SettingRow-BvAmImkg.js} +1 -1
- package/dist/assets/SettingRow-Dwpo-tP0.css +1 -0
- package/dist/assets/{SettingsView-CxEQl8Fh.js → SettingsView-B_5pGI0B.js} +2 -2
- package/dist/assets/SettingsView-Y2Et1YHr.css +1 -0
- package/dist/assets/SkillsView-Blcv_g2_.js +1 -0
- package/dist/assets/{SkillsView-4FLTf1XD.css → SkillsView-CREfL6dQ.css} +1 -1
- package/dist/assets/{Spin-CaLC5eru.js → Spin-DiwsqMEC.js} +1 -1
- package/dist/assets/{Suffix-C1X_jn5E.js → Suffix-La8FFPWu.js} +1 -1
- package/dist/assets/{Switch-BeZgnVyD.js → Switch-Ce0Tgpcj.js} +1 -1
- package/dist/assets/{Tag-DFrN7AVl.js → Tag-BUJuCRNX.js} +1 -1
- package/dist/assets/{Tooltip-ClSL1Ac2.js → Tooltip-C65FWX0W.js} +1 -1
- package/dist/assets/UsageView-CKMaJ5W0.css +1 -0
- package/dist/assets/{UsageView-BvGRIGlC.js → UsageView-MZGY4EKW.js} +1 -1
- package/dist/assets/{_plugin-vue_export-helper-DQGaK6t5.js → _plugin-vue_export-helper-DkLSTLBi.js} +1 -1
- package/dist/assets/app-DVSCPXta.js +1 -0
- package/dist/assets/app-DtII96CF.js +1 -0
- package/dist/assets/{browser-Bf2Q3p4g.js → browser-oMT2KRlV.js} +1 -1
- package/dist/assets/chat-nPd2Ount.js +6 -0
- package/dist/assets/context-DRBiUHq_.js +1 -0
- package/dist/assets/index-8v0lZOmS.css +1 -0
- package/dist/assets/index-DNNVWa6r.js +306 -0
- package/dist/assets/{jobs-QM3wEm9o.js → jobs-fIgcRW5v.js} +1 -1
- package/dist/assets/{pinia-bZ6_VpBU.js → pinia-D41F8A9y.js} +1 -1
- package/dist/assets/{router-Ddepf70Q.js → router-B0PaAFys.js} +2 -2
- package/dist/assets/{sessions-r2FX4lYx.js → sessions-Dsqr5aLA.js} +1 -1
- package/dist/assets/{skills-DtNdlEJd.js → skills-COmQAkb0.js} +1 -1
- package/dist/assets/{use-message-DAtcV1hg.js → use-message-CG8KB3t0.js} +1 -1
- package/dist/index.html +19 -19
- package/package.json +1 -1
- package/dist/assets/ChannelsView-CD_79lUP.js +0 -1
- package/dist/assets/ChatView-CLIjlJ1x.js +0 -142
- package/dist/assets/ChatView-CX_ZYhvz.css +0 -1
- package/dist/assets/LoginView-BHThbj0n.css +0 -1
- package/dist/assets/LogsView-DzYGlYxF.css +0 -1
- package/dist/assets/MarkdownRenderer-CrMwC_5d.css +0 -1
- package/dist/assets/MemoryView-WR7DvkW0.css +0 -1
- package/dist/assets/SettingRow-HrI0c-1s.css +0 -1
- package/dist/assets/SettingsView-CIcrKeJw.css +0 -1
- package/dist/assets/SkillsView-BopVAaC6.js +0 -1
- package/dist/assets/UsageView-Bdck_cnA.css +0 -1
- package/dist/assets/app-DHhjDueA.js +0 -1
- package/dist/assets/app-DqRfMAIZ.js +0 -1
- package/dist/assets/chat-B0V07VGa.js +0 -6
- package/dist/assets/context-Bm7UPqDk.js +0 -1
- package/dist/assets/index-BR3ulF5g.css +0 -1
- package/dist/assets/index-Bdq3IZmO.js +0 -306
- /package/dist/assets/{logo-CiQBpLPw.js → logo-Cd-t_oGE.js} +0 -0
- /package/dist/assets/{omit-QZj0aLfU.js → omit-C6t0n7Zy.js} +0 -0
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import{A as e,C as t,D as n,E as r,F as i,G as a,K as o,N as s,O as c,Q as l,R as u,T as d,U as f,W as p,Y as m,Z as h,b as g,c as _,ct as v,d as y,gt as b,it as x,j as S,l as C,mt as w,ot as T,p as E,pt as D,t as O,w as k,y as A}from"./router-Ddepf70Q.js";import{t as j}from"./pinia-bZ6_VpBU.js";import{n as M,r as N,t as P}from"./_plugin-vue_export-helper-DQGaK6t5.js";import{B as F,Q as ee,V as te,Y as ne,a as re,at as I,c as L,ct as R,d as ie,dt as z,et as ae,f as oe,ht as se,lt as B,n as V,o as ce,ot as H,r as le,s as ue,u as de,z as U}from"./browser-Bf2Q3p4g.js";import{I as W,l as G,u as fe}from"./Popover-pOQtxFC1.js";import{b as pe,c as me,i as he,n as ge}from"./Suffix-C1X_jn5E.js";import{a as _e,c as ve,d as ye,f as be,i as xe,l as K,m as Se,n as Ce,o as we,p as Te,r as Ee,s as De,t as Oe,u as ke}from"./Modal-D421R1s7.js";import{t as Ae}from"./Close-2w73mIOt.js";import{t as je}from"./Select-rOqAn7Lj.js";import{i as Me}from"./Button-sJ2BpaPl.js";import{t as q}from"./omit-QZj0aLfU.js";import{n as Ne,t as Pe}from"./context-Bm7UPqDk.js";import"./logo-CiQBpLPw.js";import{t as J}from"./app-DHhjDueA.js";import{t as Fe}from"./chat-B0V07VGa.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ie={login:{title:`Login`,description:`Enter your access token to continue. Find it in the server startup logs.`,placeholder:`Access token`,submit:`Login`,tokenRequired:`Please enter your access token`,invalidToken:`Invalid token`,connectionFailed:`Cannot connect to server`},common:{loading:`Loading...`,cancel:`Cancel`,delete:`Delete`,edit:`Edit`,save:`Save`,saved:`Saved`,update:`Update`,create:`Create`,saveFailed:`Save failed`,ok:`OK`,copied:`Copied`,copy:`Copy`,noData:`No data`,fetch:`Fetch`,add:`Add`,enable:`Enable`,disable:`Disable`,configured:`Configured`,notConfigured:`Not configured`},sidebar:{chat:`Chat`,jobs:`Jobs`,models:`Models`,skills:`Skills`,memory:`Memory`,logs:`Logs`,usage:`Usage`,channels:`Channels`,settings:`Settings`,connected:`Connected`,disconnected:`Disconnected`},chat:{emptyState:`Start a conversation with Hermes Agent`,inputPlaceholder:`Type a message... (Enter to send, Shift+Enter for new line)`,attachFiles:`Attach files`,stop:`Stop`,send:`Send`,contextUsed:`Context used:`,sessions:`Sessions`,noSessions:`No sessions`,newChat:`New Chat`,deleteSession:`Delete this session?`,sessionDeleted:`Session deleted`,rename:`Rename`,copySessionId:`Copy Session ID`,renamed:`Renamed`,renameFailed:`Rename failed`,renameSession:`Rename Session`,enterNewTitle:`Enter new title`,other:`Other`,runFailed:`Run failed`,tool:`Tool`,error:`error`,arguments:`Arguments`,result:`Result`,truncated:`... (truncated)`},jobs:{title:`Scheduled Jobs`,createJob:`Create Job`,editJob:`Edit Job`,noJobs:`No scheduled jobs yet. Create one to get started.`,name:`Name`,namePlaceholder:`Job name`,schedule:`Schedule (Cron Expression)`,schedulePlaceholder:`e.g. 0 9 * * *`,quickPresets:`Quick Presets`,selectPreset:`Select a preset...`,presetEveryMinute:`Every minute`,presetEvery5Min:`Every 5 minutes`,presetEveryHour:`Every hour`,presetEveryDay:`Every day at 00:00`,presetEveryDay9:`Every day at 09:00`,presetEveryMonday:`Every Monday at 09:00`,presetEveryMonth:`Every month 1st at 09:00`,prompt:`Prompt`,promptPlaceholder:`The prompt to execute`,deliverTarget:`Deliver Target`,origin:`Origin`,local:`Local`,repeatCount:`Repeat Count (optional)`,repeatPlaceholder:`Leave empty for infinite`,jobCreated:`Job created`,jobUpdated:`Job updated`,nameRequired:`Name is required`,scheduleRequired:`Schedule is required`,loadFailed:`Failed to load job`,jobPaused:`Job paused`,jobResumed:`Job resumed`,jobTriggered:`Job triggered`,jobDeleted:`Job deleted`,status:{running:`Running`,paused:`Paused`,disabled:`Disabled`,scheduled:`Scheduled`},info:{schedule:`Schedule`,lastRun:`Last Run`,nextRun:`Next Run`,deliver:`Deliver`,repeat:`Repeat`},action:{pause:`Pause`,pauseJob:`Pause job`,resume:`Resume`,resumeJob:`Resume job`,runNow:`Run Now`,triggerImmediately:`Trigger immediately`}},skills:{title:`Skills`,searchPlaceholder:`Search skills...`,noMatch:`No skills match your search`,noSkills:`No skills found`,backTo:`Back to`,attachedFiles:`Attached Files`,loadFailed:`Failed to load skill`,fileLoadFailed:`Failed to load file`,toggleFailed:`Failed to toggle skill`},memory:{title:`Memory`,refresh:`Refresh`,loadFailed:`Failed to load memory`,myNotes:`My Notes`,noNotes:`No notes yet.`,notesPlaceholder:`Write your notes...`,userProfile:`User Profile`,noProfile:`No profile yet.`,profilePlaceholder:`Write your profile...`},models:{title:`Models`,addProvider:`Add Provider`,providerType:`Provider Type`,preset:`Preset`,custom:`Custom`,selectProvider:`Select Provider`,chooseProvider:`Choose a provider...`,name:`Name`,autoGeneratedName:`Auto-generated from Base URL`,baseUrl:`Base URL`,baseUrlPlaceholder:`e.g. https://api.example.com/v1`,apiKey:`API Key`,apiKeyPlaceholder:`sk-...`,defaultModel:`Default Model`,selectModel:`Select a model...`,providerAdded:`Provider added`,providerDeleted:`Provider deleted`,deleteProvider:`Delete Provider`,deleteConfirm:`Are you sure you want to delete "{name}"?`,noProviders:`No providers found. Add a custom provider to get started.`,builtIn:`Built-in`,customType:`Custom`,provider:`Provider`,local:`Local ({host})`,selectProviderRequired:`Please select a provider`,baseUrlRequired:`Base URL is required`,apiKeyRequired:`API Key is required`,modelRequired:`Default Model is required`,enterBaseUrl:`Please enter Base URL first`,unexpectedFormat:`Unexpected response format`,foundModels:`Found {count} models`,fetchFailed:`Failed to fetch models`},logs:{title:`Logs`,all:`All`,searchPlaceholder:`Search...`,refresh:`Refresh`,noEntries:`No log entries`},settings:{title:`Settings`,saved:`Saved`,saveFailed:`Save failed`,tabs:{display:`Display`,agent:`Agent`,memory:`Memory`,session:`Session`,privacy:`Privacy`,apiServer:`API Server`},display:{streaming:`Stream Responses`,streamingHint:`Show AI replies in real-time`,compact:`Compact Mode`,compactHint:`Reduce message spacing`,showReasoning:`Show Reasoning`,showReasoningHint:`Show model thinking process`,showCost:`Show Cost`,showCostHint:`Show token usage in replies`,inlineDiffs:`Inline Diffs`,inlineDiffsHint:`Show code changes inline`,bellOnComplete:`Completion Sound`,bellOnCompleteHint:`Play sound when AI finishes`,busyInputMode:`Busy Input Mode`,busyInputModeHint:`Allow input while AI is processing`},agent:{maxTurns:`Max Turns`,maxTurnsHint:`Maximum interaction rounds per conversation`,gatewayTimeout:`Gateway Timeout`,gatewayTimeoutHint:`Request timeout in seconds`,restartDrainTimeout:`Restart Drain Timeout`,restartDrainTimeoutHint:`Drain timeout before restart in seconds`,toolEnforcement:`Tool Enforcement`,toolEnforcementHint:`Control tool call execution mode`,auto:`Auto`,always:`Always`,never:`Never`},memory:{enabled:`Enable Memory`,enabledHint:`Allow AI to remember conversation context`,userProfile:`User Profile`,userProfileHint:`Allow AI to remember user preferences`,charLimit:`Memory Char Limit`,charLimitHint:`Max characters for MEMORY.md`,userCharLimit:`User Profile Char Limit`,userCharLimitHint:`Max characters for USER.md`},session:{mode:`Reset Mode`,modeHint:`Trigger condition for session reset`,modeBoth:`Idle + Scheduled`,modeIdle:`Idle Only`,modeHourly:`Scheduled Only`,idleMinutes:`Idle Timeout`,idleMinutesHint:`Wait time before auto-reset (minutes)`,atHour:`Scheduled Reset Time`,atHourHint:`Reset session at this hour daily`},privacy:{redactPii:`Redact PII`,redactPiiHint:`Auto-detect and hide sensitive info (passwords, keys, etc.)`},apiServer:{enable:`Enable`,enableHint:`Enable API server`,host:`Host`,hostHint:`Listen address`,port:`Port`,portHint:`Listen port`,key:`Key`,keyHint:`API access key`,cors:`CORS Origins`,corsHint:`Allowed cross-origin sources`}},platform:{requireMention:`Require {'@'}Mention`,requireMentionGroup:`Require {'@'}mention in groups to respond`,requireMentionChannel:`Require {'@'}mention in channels to respond`,requireMentionRoom:`Require {'@'}mention in rooms to respond`,reactions:`Reactions`,reactionsHint:`React to messages with emoji`,freeResponseChats:`Free Response Chats`,freeResponseChatsHint:`Chat IDs that respond without {'@'}mention (comma-separated)`,freeResponseChannels:`Free Response Channels`,freeResponseChannelsHint:`Channel IDs that respond without {'@'}mention (comma-separated)`,freeResponseRooms:`Free Response Rooms`,freeResponseRoomsHint:`Room IDs that respond without {'@'}mention (comma-separated)`,mentionPatterns:`Custom Mention Patterns`,mentionPatternsHint:`Additional trigger patterns`,autoThread:`Auto Thread`,autoThreadHint:`Auto-create reply threads after {'@'}mention`,autoThreadHintRoom:`Auto-create reply threads in rooms`,dmMentionThreads:`DM Mention Threads`,dmMentionThreadsHint:`Use thread replies for mentions in DMs`,allowBots:`Allow Bot Messages`,allowBotsHint:`Respond to messages from other bots`,allowedChannels:`Allowed Channels`,allowedChannelsHint:`Whitelist channel IDs (comma-separated)`,ignoredChannels:`Ignored Channels`,ignoredChannelsHint:`Channels where bot never responds (comma-separated)`,noThreadChannels:`No-Thread Channels`,noThreadChannelsHint:`Channels where bot responds without threads (comma-separated)`,botToken:`Bot Token`,botTokenHint:`Bot token from developer portal`,accessToken:`Access Token`,accessTokenHint:`Matrix access token`,homeserver:`Homeserver URL`,homeserverHint:`Matrix homeserver URL`,appId:`App ID`,appIdHint:`Feishu App ID`,appSecret:`App Secret`,appSecretHint:`Feishu App Secret`,clientId:`Client ID`,clientIdHint:`DingTalk Client ID`,clientSecret:`Client Secret`,clientSecretHint:`DingTalk Client Secret`,botId:`Bot ID`,botIdHint:`WeCom Bot ID`,wecomSecretHint:`WeCom Bot Secret`,waEnabled:`Enable WhatsApp`,waEnabledHint:`Enable WhatsApp via QR code pairing`,weixinToken:`Weixin Token`,weixinTokenHint:`From weixin CLI QR login (hermes weixin)`,accountId:`Account ID`,accountIdHint:`Weixin account ID`,qrLogin:`QR Login`,qrRelogin:`Re-login`,qrFetching:`Fetching QR code...`,qrScanHint:`Scan with WeChat to login`,qrScanedHint:`Scaned, please confirm on phone...`},language:{label:`Language`,zh:`中文`,en:`English`},usage:{title:`Usage Statistics`,refresh:`Refresh`,totalTokens:`Total Tokens`,inputTokens:`Input`,outputTokens:`Output`,totalSessions:`Total Sessions`,avgPerDay:`~{n}/day avg`,estimatedCost:`Est. Cost`,cacheHitRate:`Cache Hit Rate`,modelBreakdown:`Model Breakdown`,dailyTrend:`Daily Usage (Last 30 Days)`,date:`Date`,tokens:`Tokens`,cache:`Cache`,sessions:`Sessions`,cost:`Cost`,noData:`No usage data`}},Le={login:{title:`登录`,description:`输入访问令牌以继续。令牌在服务端启动日志中查看。`,placeholder:`访问令牌`,submit:`登录`,tokenRequired:`请输入访问令牌`,invalidToken:`令牌无效`,connectionFailed:`无法连接到服务器`},common:{loading:`加载中...`,cancel:`取消`,delete:`删除`,edit:`编辑`,save:`保存`,saved:`已保存`,saveFailed:`保存失败`,ok:`确定`,copied:`已复制`,copy:`复制`,update:`更新`,create:`创建`,noData:`暂无数据`,fetch:`获取`,add:`添加`,enable:`启用`,disable:`禁用`,configured:`已配置`,notConfigured:`未配置`},sidebar:{chat:`对话`,jobs:`任务`,models:`模型`,skills:`技能`,memory:`记忆`,logs:`日志`,usage:`用量`,channels:`频道`,settings:`设置`,connected:`已连接`,disconnected:`未连接`},chat:{emptyState:`开始与 Hermes Agent 对话`,inputPlaceholder:`输入消息... (Enter 发送,Shift+Enter 换行)`,attachFiles:`添加附件`,stop:`停止`,send:`发送`,contextUsed:`上下文已用:`,sessions:`会话`,noSessions:`暂无会话`,newChat:`新建对话`,deleteSession:`确定删除此会话?`,sessionDeleted:`会话已删除`,rename:`重命名`,copySessionId:`复制会话 ID`,renamed:`已重命名`,renameFailed:`重命名失败`,renameSession:`重命名会话`,enterNewTitle:`输入新标题`,other:`其他`,runFailed:`运行失败`,tool:`工具`,error:`错误`,arguments:`参数`,result:`结果`,truncated:`... (已截断)`},jobs:{title:`定时任务`,createJob:`创建任务`,editJob:`编辑任务`,noJobs:`暂无定时任务,创建一个开始吧。`,name:`名称`,namePlaceholder:`任务名称`,schedule:`调度表达式 (Cron)`,schedulePlaceholder:`例如 0 9 * * *`,quickPresets:`快速预设`,selectPreset:`选择预设...`,presetEveryMinute:`每分钟`,presetEvery5Min:`每 5 分钟`,presetEveryHour:`每小时`,presetEveryDay:`每天 00:00`,presetEveryDay9:`每天 09:00`,presetEveryMonday:`每周一 09:00`,presetEveryMonth:`每月 1 日 09:00`,prompt:`提示词`,promptPlaceholder:`要执行的内容`,deliverTarget:`投递目标`,origin:`来源`,local:`本地`,repeatCount:`重复次数(可选)`,repeatPlaceholder:`留空表示无限重复`,jobCreated:`任务已创建`,jobUpdated:`任务已更新`,nameRequired:`名称为必填项`,scheduleRequired:`调度表达式为必填项`,loadFailed:`加载任务失败`,jobPaused:`任务已暂停`,jobResumed:`任务已恢复`,jobTriggered:`任务已触发`,jobDeleted:`任务已删除`,status:{running:`运行中`,paused:`已暂停`,disabled:`已禁用`,scheduled:`已调度`},info:{schedule:`调度`,lastRun:`上次运行`,nextRun:`下次运行`,deliver:`投递`,repeat:`重复`},action:{pause:`暂停`,pauseJob:`暂停任务`,resume:`恢复`,resumeJob:`恢复任务`,runNow:`立即运行`,triggerImmediately:`立即触发`}},skills:{title:`技能`,searchPlaceholder:`搜索技能...`,noMatch:`没有匹配的技能`,noSkills:`暂无技能`,backTo:`返回`,attachedFiles:`附件文件`,loadFailed:`加载技能失败`,fileLoadFailed:`加载文件失败`,toggleFailed:`切换技能状态失败`},memory:{title:`记忆`,refresh:`刷新`,loadFailed:`加载记忆失败`,myNotes:`我的笔记`,noNotes:`暂无笔记。`,notesPlaceholder:`输入笔记内容...`,userProfile:`用户画像`,noProfile:`暂无画像。`,profilePlaceholder:`输入用户画像...`},models:{title:`模型`,addProvider:`添加 Provider`,providerType:`Provider 类型`,preset:`预设`,custom:`自定义`,selectProvider:`选择 Provider`,chooseProvider:`选择一个 provider...`,name:`名称`,autoGeneratedName:`根据 Base URL 自动生成`,baseUrl:`Base URL`,baseUrlPlaceholder:`例如 https://api.example.com/v1`,apiKey:`API Key`,apiKeyPlaceholder:`sk-...`,defaultModel:`默认模型`,selectModel:`选择模型...`,providerAdded:`Provider 已添加`,providerDeleted:`Provider 已删除`,deleteProvider:`删除 Provider`,deleteConfirm:`确定删除 "{name}" 吗?`,noProviders:`暂无 Provider,添加一个开始吧。`,builtIn:`内置`,customType:`自定义`,provider:`Provider`,local:`本地 ({host})`,selectProviderRequired:`请选择 Provider`,baseUrlRequired:`Base URL 为必填项`,apiKeyRequired:`API Key 为必填项`,modelRequired:`默认模型为必填项`,enterBaseUrl:`请先输入 Base URL`,unexpectedFormat:`响应格式异常`,foundModels:`找到 {count} 个模型`,fetchFailed:`获取模型失败`},logs:{title:`日志`,all:`全部`,searchPlaceholder:`搜索...`,refresh:`刷新`,noEntries:`暂无日志`},settings:{title:`设置`,saved:`已保存`,saveFailed:`保存失败`,tabs:{display:`显示`,agent:`代理`,memory:`记忆`,session:`会话`,privacy:`隐私`,apiServer:`API 服务器`},display:{streaming:`流式响应`,streamingHint:`实时显示 AI 回复`,compact:`紧凑模式`,compactHint:`减少消息间距`,showReasoning:`显示推理过程`,showReasoningHint:`展示模型思考过程`,showCost:`显示费用`,showCostHint:`在回复中显示 token 使用量`,inlineDiffs:`内联差异`,inlineDiffsHint:`代码变更以内联方式显示`,bellOnComplete:`完成提示音`,bellOnCompleteHint:`AI 回复完成时播放提示音`,busyInputMode:`忙碌输入模式`,busyInputModeHint:`AI 处理中仍可输入`},agent:{maxTurns:`最大轮次`,maxTurnsHint:`单次对话最大交互轮数`,gatewayTimeout:`网关超时`,gatewayTimeoutHint:`单次请求超时时间(秒)`,restartDrainTimeout:`重启排空超时`,restartDrainTimeoutHint:`重启前排空请求的超时时间(秒)`,toolEnforcement:`工具执行策略`,toolEnforcementHint:`控制工具调用的执行模式`,auto:`自动`,always:`始终`,never:`从不`},memory:{enabled:`启用记忆`,enabledHint:`允许 AI 记住对话上下文`,userProfile:`用户画像`,userProfileHint:`允许 AI 记住用户偏好信息`,charLimit:`记忆字符上限`,charLimitHint:`MEMORY.md 最大字符数`,userCharLimit:`用户画像字符上限`,userCharLimitHint:`USER.md 最大字符数`},session:{mode:`重置模式`,modeHint:`会话重置的触发条件`,modeBoth:`空闲 + 定时`,modeIdle:`仅空闲`,modeHourly:`仅定时`,idleMinutes:`空闲超时`,idleMinutesHint:`无操作后自动重置的等待时间(分钟)`,atHour:`定时重置时间`,atHourHint:`每天在指定小时重置会话`},privacy:{redactPii:`脱敏 PII`,redactPiiHint:`自动检测并隐藏敏感信息(密码、密钥等)`},apiServer:{enable:`启用`,enableHint:`启用 API 服务器`,host:`主机`,hostHint:`监听地址`,port:`端口`,portHint:`监听端口`,key:`密钥`,keyHint:`API 访问密钥`,cors:`CORS 来源`,corsHint:`允许的跨域来源`}},platform:{requireMention:`需要 {'@'}提及`,requireMentionGroup:`群组中需要 {'@'}机器人 才会响应`,requireMentionChannel:`频道中需要 {'@'}机器人 才会响应`,requireMentionRoom:`房间中需要 {'@'}机器人 才会响应`,reactions:`表情回应`,reactionsHint:`对消息添加表情回应`,freeResponseChats:`自由响应聊天`,freeResponseChatsHint:`不需要 {'@'}提及即响应的聊天 ID(逗号分隔)`,freeResponseChannels:`自由响应频道`,freeResponseChannelsHint:`不需要 {'@'}提及即响应的频道 ID(逗号分隔)`,freeResponseRooms:`自由响应房间`,freeResponseRoomsHint:`不需要 {'@'}提及即响应的房间 ID(逗号分隔)`,mentionPatterns:`自定义提及模式`,mentionPatternsHint:`额外的触发模式列表`,autoThread:`自动创建线程`,autoThreadHint:`{'@'}提及 后自动创建回复线程`,autoThreadHintRoom:`在房间中自动创建回复线程`,dmMentionThreads:`DM 提及线程`,dmMentionThreadsHint:`在私聊中也使用线程回复提及`,allowBots:`允许机器人消息`,allowBotsHint:`响应其他机器人发送的消息`,allowedChannels:`允许的频道`,allowedChannelsHint:`白名单频道 ID(逗号分隔)`,ignoredChannels:`忽略的频道`,ignoredChannelsHint:`不响应的频道 ID(逗号分隔)`,noThreadChannels:`无线程频道`,noThreadChannelsHint:`不创建线程的频道 ID(逗号分隔)`,botToken:`Bot Token`,botTokenHint:`开发者门户获取的 Bot Token`,accessToken:`Access Token`,accessTokenHint:`Matrix Access Token`,homeserver:`Homeserver URL`,homeserverHint:`Matrix 服务器地址`,appId:`App ID`,appIdHint:`飞书 App ID`,appSecret:`App Secret`,appSecretHint:`飞书 App Secret`,clientId:`Client ID`,clientIdHint:`钉钉 Client ID`,clientSecret:`Client Secret`,clientSecretHint:`钉钉 Client Secret`,botId:`Bot ID`,botIdHint:`企业微信 Bot ID`,wecomSecretHint:`企业微信 Bot Secret`,waEnabled:`启用 WhatsApp`,waEnabledHint:`通过二维码配对启用 WhatsApp`,weixinToken:`微信 Token`,weixinTokenHint:`通过 weixin CLI 扫码登录获取 (hermes weixin)`,accountId:`Account ID`,accountIdHint:`微信 Account ID`,qrLogin:`扫码登录`,qrRelogin:`重新登录`,qrFetching:`正在获取二维码...`,qrScanHint:`使用微信扫描二维码登录`,qrScanedHint:`已扫描,请在手机上确认...`},language:{label:`语言`,zh:`中文`,en:`English`},usage:{title:`用量统计`,refresh:`刷新`,totalTokens:`总 Token 数`,inputTokens:`输入`,outputTokens:`输出`,totalSessions:`总会话数`,avgPerDay:`日均 ~{n}`,estimatedCost:`预估费用`,cacheHitRate:`缓存命中率`,modelBreakdown:`模型分布`,dailyTrend:`每日用量(近 30 天)`,date:`日期`,tokens:`Token`,cache:`缓存`,sessions:`会话`,cost:`费用`,noData:`暂无用量数据`}},Re=localStorage.getItem(`hermes_locale`),ze=navigator.language.slice(0,2),Be=M({legacy:!1,locale:Re||(ze===`zh`?`zh`:`en`),fallbackLocale:`en`,messages:{en:Ie,zh:Le}}),{cubicBezierEaseInOut:Y,cubicBezierEaseOut:Ve,cubicBezierEaseIn:He}=de;function Ue({overflow:e=`hidden`,duration:t=`.3s`,originalTransition:n=``,leavingDelay:r=`0s`,foldPadding:i=!1,enterToProps:a=void 0,leaveToProps:o=void 0,reverse:s=!1}={}){let c=s?`leave`:`enter`,l=s?`enter`:`leave`;return[I(`&.fade-in-height-expand-transition-${l}-from,
|
|
2
|
-
&.fade-in-height-expand-transition-${c}-to`,Object.assign(Object.assign({},a),{opacity:1})),I(`&.fade-in-height-expand-transition-${l}-to,
|
|
3
|
-
&.fade-in-height-expand-transition-${c}-from`,Object.assign(Object.assign({},o),{opacity:0,marginTop:`0 !important`,marginBottom:`0 !important`,paddingTop:i?`0 !important`:void 0,paddingBottom:i?`0 !important`:void 0})),I(`&.fade-in-height-expand-transition-${l}-active`,`
|
|
4
|
-
overflow: ${e};
|
|
5
|
-
transition:
|
|
6
|
-
max-height ${t} ${Y} ${r},
|
|
7
|
-
opacity ${t} ${Ve} ${r},
|
|
8
|
-
margin-top ${t} ${Y} ${r},
|
|
9
|
-
margin-bottom ${t} ${Y} ${r},
|
|
10
|
-
padding-top ${t} ${Y} ${r},
|
|
11
|
-
padding-bottom ${t} ${Y} ${r}
|
|
12
|
-
${n?`,${n}`:``}
|
|
13
|
-
`),I(`&.fade-in-height-expand-transition-${c}-active`,`
|
|
14
|
-
overflow: ${e};
|
|
15
|
-
transition:
|
|
16
|
-
max-height ${t} ${Y},
|
|
17
|
-
opacity ${t} ${He},
|
|
18
|
-
margin-top ${t} ${Y},
|
|
19
|
-
margin-bottom ${t} ${Y},
|
|
20
|
-
padding-top ${t} ${Y},
|
|
21
|
-
padding-bottom ${t} ${Y}
|
|
22
|
-
${n?`,${n}`:``}
|
|
23
|
-
`)]}var We=S({name:`ConfigProvider`,alias:[`App`],props:{abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:`div`},hljs:Object,katex:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,preflightStyleDisabled:Boolean,styleMountTarget:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(ne(`config-provider`,"`as` is deprecated, please use `tag` instead."),!0),default:void 0}},setup(e){let n=i(te,null),r=t(()=>{let{theme:t}=e;if(t===null)return;let r=n?.mergedThemeRef.value;return t===void 0?r:r===void 0?t:Object.assign({},r,t)}),a=t(()=>{let{themeOverrides:t}=e;if(t!==null){if(t===void 0)return n?.mergedThemeOverridesRef.value;{let e=n?.mergedThemeOverridesRef.value;return e===void 0?t:oe({},e,t)}}}),s=ae(()=>{let{namespace:t}=e;return t===void 0?n?.mergedNamespaceRef.value:t}),c=ae(()=>{let{bordered:t}=e;return t===void 0?n?.mergedBorderedRef.value:t}),l=t(()=>{let{icons:t}=e;return t===void 0?n?.mergedIconsRef.value:t}),u=t(()=>{let{componentOptions:t}=e;return t===void 0?n?.mergedComponentPropsRef.value:t}),d=t(()=>{let{clsPrefix:t}=e;return t===void 0?n?n.mergedClsPrefixRef.value:`n`:t}),f=t(()=>{var t;let{rtl:r}=e;if(r===void 0)return n?.mergedRtlRef.value;let i={};for(let e of r)i[e.name]=x(e),(t=e.peers)==null||t.forEach(e=>{e.name in i||(i[e.name]=x(e))});return i}),p=t(()=>e.breakpoints||n?.mergedBreakpointsRef.value),m=e.inlineThemeDisabled||n?.inlineThemeDisabled,h=e.preflightStyleDisabled||n?.preflightStyleDisabled,g=e.styleMountTarget||n?.styleMountTarget;return o(te,{mergedThemeHashRef:t(()=>{let{value:e}=r,{value:t}=a,n=t&&Object.keys(t).length!==0,i=e?.name;return i?n?`${i}-${se(JSON.stringify(a.value))}`:i:n?se(JSON.stringify(a.value)):``}),mergedBreakpointsRef:p,mergedRtlRef:f,mergedIconsRef:l,mergedComponentPropsRef:u,mergedBorderedRef:c,mergedNamespaceRef:s,mergedClsPrefixRef:d,mergedLocaleRef:t(()=>{let{locale:t}=e;if(t!==null)return t===void 0?n?.mergedLocaleRef.value:t}),mergedDateLocaleRef:t(()=>{let{dateLocale:t}=e;if(t!==null)return t===void 0?n?.mergedDateLocaleRef.value:t}),mergedHljsRef:t(()=>{let{hljs:t}=e;return t===void 0?n?.mergedHljsRef.value:t}),mergedKatexRef:t(()=>{let{katex:t}=e;return t===void 0?n?.mergedKatexRef.value:t}),mergedThemeRef:r,mergedThemeOverridesRef:a,inlineThemeDisabled:m||!1,preflightStyleDisabled:h||!1,styleMountTarget:g}),{mergedClsPrefix:d,mergedBordered:c,mergedNamespace:s,mergedTheme:r,mergedThemeOverrides:a}},render(){var e,t;return this.abstract?(t=this.$slots).default?.call(t):s(this.as||this.tag,{class:`${this.mergedClsPrefix||`n`}-config-provider`},(e=this.$slots).default?.call(e))}}),Ge=Object.assign(Object.assign({},xe),{onAfterEnter:Function,onAfterLeave:Function,transformOrigin:String,blockScroll:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},internalStyle:[String,Object],maskClosable:{type:Boolean,default:!0},zIndex:Number,onPositiveClick:Function,onNegativeClick:Function,onClose:Function,onMaskClick:Function,draggable:[Boolean,Object]}),Ke=S({name:`DialogEnvironment`,props:Object.assign(Object.assign({},Ge),{internalKey:{type:String,required:!0},to:[String,Object],onInternalAfterLeave:{type:Function,required:!0}}),setup(e){let t=v(!0);function n(){let{onInternalAfterLeave:t,internalKey:n,onAfterLeave:r}=e;t&&t(n),r&&r()}function r(t){let{onPositiveClick:n}=e;n?Promise.resolve(n(t)).then(e=>{e!==!1&&c()}):c()}function i(t){let{onNegativeClick:n}=e;n?Promise.resolve(n(t)).then(e=>{e!==!1&&c()}):c()}function a(){let{onClose:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&c()}):c()}function o(t){let{onMaskClick:n,maskClosable:r}=e;n&&(n(t),r&&c())}function s(){let{onEsc:t}=e;t&&t()}function c(){t.value=!1}function l(e){t.value=e}return{show:t,hide:c,handleUpdateShow:l,handleAfterLeave:n,handleCloseClick:a,handleNegativeClick:i,handlePositiveClick:r,handleMaskClick:o,handleEsc:s}},render(){let{handlePositiveClick:e,handleUpdateShow:t,handleNegativeClick:n,handleCloseClick:r,handleAfterLeave:i,handleMaskClick:a,handleEsc:o,to:c,zIndex:l,maskClosable:u,show:d}=this;return s(Oe,{show:d,onUpdateShow:t,onMaskClick:a,onEsc:o,to:c,zIndex:l,maskClosable:u,onAfterEnter:this.onAfterEnter,onAfterLeave:i,closeOnEsc:this.closeOnEsc,blockScroll:this.blockScroll,autoFocus:this.autoFocus,transformOrigin:this.transformOrigin,draggable:this.draggable,internalAppear:!0,internalDialog:!0},{default:({draggableClass:t})=>s(Ce,Object.assign({},fe(this.$props,Ee),{titleClass:w([this.titleClass,t]),style:this.internalStyle,onClose:r,onNegativeClick:n,onPositiveClick:e}))})}}),qe=S({name:`DialogProvider`,props:{injectionKey:String,to:[String,Object]},setup(){let e=v([]),t={};function n(n={}){let r=W(),i=T(Object.assign(Object.assign({},n),{key:r,destroy:()=>{var e;(e=t[`n-dialog-${r}`])==null||e.hide()}}));return e.value.push(i),i}let r=[`info`,`success`,`warning`,`error`].map(e=>t=>n(Object.assign(Object.assign({},t),{type:e})));function i(t){let{value:n}=e;n.splice(n.findIndex(e=>e.key===t),1)}function a(){Object.values(t).forEach(e=>{e?.hide()})}let s={create:n,destroyAll:a,info:r[0],success:r[1],warning:r[2],error:r[3]};return o(_e,s),o(we,{clickedRef:Te(64),clickedPositionRef:Se()}),o(De,e),Object.assign(Object.assign({},s),{dialogList:e,dialogInstRefs:t,handleAfterLeave:i})},render(){var e;return s(A,null,[this.dialogList.map(e=>s(Ke,q(e,[`destroy`,`style`],{internalStyle:e.style,to:this.to,ref:t=>{t===null?delete this.dialogInstRefs[`n-dialog-${e.key}`]:this.dialogInstRefs[`n-dialog-${e.key}`]=t},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave}))),(e=this.$slots).default?.call(e)])}}),Je={margin:`0 0 8px 0`,padding:`10px 20px`,maxWidth:`720px`,minWidth:`420px`,iconMargin:`0 10px 0 0`,closeMargin:`0 0 0 10px`,closeSize:`20px`,closeIconSize:`16px`,iconSize:`20px`,fontSize:`14px`};function Ye(e){let{textColor2:t,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:i,infoColor:a,successColor:o,errorColor:s,warningColor:c,popoverColor:l,boxShadow2:u,primaryColor:d,lineHeight:f,borderRadius:p,closeColorHover:m,closeColorPressed:h}=e;return Object.assign(Object.assign({},Je),{closeBorderRadius:p,textColor:t,textColorInfo:t,textColorSuccess:t,textColorError:t,textColorWarning:t,textColorLoading:t,color:l,colorInfo:l,colorSuccess:l,colorError:l,colorWarning:l,colorLoading:l,boxShadow:u,boxShadowInfo:u,boxShadowSuccess:u,boxShadowError:u,boxShadowWarning:u,boxShadowLoading:u,iconColor:t,iconColorInfo:a,iconColorSuccess:o,iconColorWarning:c,iconColorError:s,iconColorLoading:d,closeColorHover:m,closeColorPressed:h,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:i,closeColorHoverInfo:m,closeColorPressedInfo:h,closeIconColorInfo:n,closeIconColorHoverInfo:r,closeIconColorPressedInfo:i,closeColorHoverSuccess:m,closeColorPressedSuccess:h,closeIconColorSuccess:n,closeIconColorHoverSuccess:r,closeIconColorPressedSuccess:i,closeColorHoverError:m,closeColorPressedError:h,closeIconColorError:n,closeIconColorHoverError:r,closeIconColorPressedError:i,closeColorHoverWarning:m,closeColorPressedWarning:h,closeIconColorWarning:n,closeIconColorHoverWarning:r,closeIconColorPressedWarning:i,closeColorHoverLoading:m,closeColorPressedLoading:h,closeIconColorLoading:n,closeIconColorHoverLoading:r,closeIconColorPressedLoading:i,loadingColor:d,lineHeight:f,borderRadius:p,border:`0`})}var Xe={name:`Message`,common:V,self:Ye},Ze={icon:Function,type:{type:String,default:`info`},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,spinProps:Object,onClose:Function,onMouseenter:Function,onMouseleave:Function},Qe=I([H(`message-wrapper`,`
|
|
24
|
-
margin: var(--n-margin);
|
|
25
|
-
z-index: 0;
|
|
26
|
-
transform-origin: top center;
|
|
27
|
-
display: flex;
|
|
28
|
-
`,[Ue({overflow:`visible`,originalTransition:`transform .3s var(--n-bezier)`,enterToProps:{transform:`scale(1)`},leaveToProps:{transform:`scale(0.85)`}})]),H(`message`,`
|
|
29
|
-
box-sizing: border-box;
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
transition:
|
|
33
|
-
color .3s var(--n-bezier),
|
|
34
|
-
box-shadow .3s var(--n-bezier),
|
|
35
|
-
background-color .3s var(--n-bezier),
|
|
36
|
-
opacity .3s var(--n-bezier),
|
|
37
|
-
transform .3s var(--n-bezier),
|
|
38
|
-
margin-bottom .3s var(--n-bezier);
|
|
39
|
-
padding: var(--n-padding);
|
|
40
|
-
border-radius: var(--n-border-radius);
|
|
41
|
-
border: var(--n-border);
|
|
42
|
-
flex-wrap: nowrap;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
max-width: var(--n-max-width);
|
|
45
|
-
color: var(--n-text-color);
|
|
46
|
-
background-color: var(--n-color);
|
|
47
|
-
box-shadow: var(--n-box-shadow);
|
|
48
|
-
`,[R(`content`,`
|
|
49
|
-
display: inline-block;
|
|
50
|
-
line-height: var(--n-line-height);
|
|
51
|
-
font-size: var(--n-font-size);
|
|
52
|
-
`),R(`icon`,`
|
|
53
|
-
position: relative;
|
|
54
|
-
margin: var(--n-icon-margin);
|
|
55
|
-
height: var(--n-icon-size);
|
|
56
|
-
width: var(--n-icon-size);
|
|
57
|
-
font-size: var(--n-icon-size);
|
|
58
|
-
flex-shrink: 0;
|
|
59
|
-
`,[[`default`,`info`,`success`,`warning`,`error`,`loading`].map(e=>B(`${e}-type`,[I(`> *`,`
|
|
60
|
-
color: var(--n-icon-color-${e});
|
|
61
|
-
transition: color .3s var(--n-bezier);
|
|
62
|
-
`)])),I(`> *`,`
|
|
63
|
-
position: absolute;
|
|
64
|
-
left: 0;
|
|
65
|
-
top: 0;
|
|
66
|
-
right: 0;
|
|
67
|
-
bottom: 0;
|
|
68
|
-
`,[re()])]),R(`close`,`
|
|
69
|
-
margin: var(--n-close-margin);
|
|
70
|
-
transition:
|
|
71
|
-
background-color .3s var(--n-bezier),
|
|
72
|
-
color .3s var(--n-bezier);
|
|
73
|
-
flex-shrink: 0;
|
|
74
|
-
`,[I(`&:hover`,`
|
|
75
|
-
color: var(--n-close-icon-color-hover);
|
|
76
|
-
`),I(`&:active`,`
|
|
77
|
-
color: var(--n-close-icon-color-pressed);
|
|
78
|
-
`)])]),H(`message-container`,`
|
|
79
|
-
z-index: 6000;
|
|
80
|
-
position: fixed;
|
|
81
|
-
height: 0;
|
|
82
|
-
overflow: visible;
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-direction: column;
|
|
85
|
-
align-items: center;
|
|
86
|
-
`,[B(`top`,`
|
|
87
|
-
top: 12px;
|
|
88
|
-
left: 0;
|
|
89
|
-
right: 0;
|
|
90
|
-
`),B(`top-left`,`
|
|
91
|
-
top: 12px;
|
|
92
|
-
left: 12px;
|
|
93
|
-
right: 0;
|
|
94
|
-
align-items: flex-start;
|
|
95
|
-
`),B(`top-right`,`
|
|
96
|
-
top: 12px;
|
|
97
|
-
left: 0;
|
|
98
|
-
right: 12px;
|
|
99
|
-
align-items: flex-end;
|
|
100
|
-
`),B(`bottom`,`
|
|
101
|
-
bottom: 4px;
|
|
102
|
-
left: 0;
|
|
103
|
-
right: 0;
|
|
104
|
-
justify-content: flex-end;
|
|
105
|
-
`),B(`bottom-left`,`
|
|
106
|
-
bottom: 4px;
|
|
107
|
-
left: 12px;
|
|
108
|
-
right: 0;
|
|
109
|
-
justify-content: flex-end;
|
|
110
|
-
align-items: flex-start;
|
|
111
|
-
`),B(`bottom-right`,`
|
|
112
|
-
bottom: 4px;
|
|
113
|
-
left: 0;
|
|
114
|
-
right: 12px;
|
|
115
|
-
justify-content: flex-end;
|
|
116
|
-
align-items: flex-end;
|
|
117
|
-
`)])]),$e={info:()=>s(ke,null),success:()=>s(K,null),warning:()=>s(ve,null),error:()=>s(ye,null),default:()=>null},et=S({name:`Message`,props:Object.assign(Object.assign({},Ze),{render:Function}),setup(e){let{inlineThemeDisabled:n,mergedRtlRef:r}=F(e),{props:a,mergedClsPrefixRef:o}=i(Ne),s=ie(`Message`,r,o),c=L(`Message`,`-message`,Qe,Xe,a,o),l=t(()=>{let{type:t}=e,{common:{cubicBezierEaseInOut:n},self:{padding:r,margin:i,maxWidth:a,iconMargin:o,closeMargin:s,closeSize:l,iconSize:u,fontSize:d,lineHeight:f,borderRadius:p,border:m,iconColorInfo:h,iconColorSuccess:g,iconColorWarning:_,iconColorError:v,iconColorLoading:y,closeIconSize:b,closeBorderRadius:x,[z(`textColor`,t)]:S,[z(`boxShadow`,t)]:C,[z(`color`,t)]:w,[z(`closeColorHover`,t)]:T,[z(`closeColorPressed`,t)]:E,[z(`closeIconColor`,t)]:D,[z(`closeIconColorPressed`,t)]:O,[z(`closeIconColorHover`,t)]:k}}=c.value;return{"--n-bezier":n,"--n-margin":i,"--n-padding":r,"--n-max-width":a,"--n-font-size":d,"--n-icon-margin":o,"--n-icon-size":u,"--n-close-icon-size":b,"--n-close-border-radius":x,"--n-close-size":l,"--n-close-margin":s,"--n-text-color":S,"--n-color":w,"--n-box-shadow":C,"--n-icon-color-info":h,"--n-icon-color-success":g,"--n-icon-color-warning":_,"--n-icon-color-error":v,"--n-icon-color-loading":y,"--n-close-color-hover":T,"--n-close-color-pressed":E,"--n-close-icon-color":D,"--n-close-icon-color-pressed":O,"--n-close-icon-color-hover":k,"--n-line-height":f,"--n-border-radius":p,"--n-border":m}}),u=n?U(`message`,t(()=>e.type[0]),l,{}):void 0;return{mergedClsPrefix:o,rtlEnabled:s,messageProviderProps:a,handleClose(){var t;(t=e.onClose)==null||t.call(e)},cssVars:n?void 0:l,themeClass:u?.themeClass,onRender:u?.onRender,placement:a.placement}},render(){let{render:e,type:t,closable:n,content:r,mergedClsPrefix:i,cssVars:a,themeClass:o,onRender:c,icon:l,handleClose:u,showIcon:d}=this;c?.();let f;return s(`div`,{class:[`${i}-message-wrapper`,o],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith(`top`)?`flex-start`:`flex-end`},a]},e?e(this.$props):s(`div`,{class:[`${i}-message ${i}-message--${t}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(f=tt(l,t,i,this.spinProps))&&d?s(`div`,{class:`${i}-message__icon ${i}-message__icon--${t}-type`},s(ce,null,{default:()=>f})):null,s(`div`,{class:`${i}-message__content`},G(r)),n?s(Ae,{clsPrefix:i,class:`${i}-message__close`,onClick:u,absolute:!0}):null))}});function tt(e,t,n,r){if(typeof e==`function`)return e();{let e=t===`loading`?s(le,Object.assign({clsPrefix:n,strokeWidth:24,scale:.85},r)):$e[t]();return e?s(me,{clsPrefix:n,key:t},{default:()=>e}):null}}var nt=S({name:`MessageEnvironment`,props:Object.assign(Object.assign({},Ze),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(e){let t=null,n=v(!0);f(()=>{r()});function r(){let{duration:n}=e;n&&(t=window.setTimeout(o,n))}function i(e){e.currentTarget===e.target&&t!==null&&(window.clearTimeout(t),t=null)}function a(e){e.currentTarget===e.target&&r()}function o(){let{onHide:r}=e;n.value=!1,t&&=(window.clearTimeout(t),null),r&&r()}function s(){let{onClose:t}=e;t&&t(),o()}function c(){let{onAfterLeave:t,onInternalAfterLeave:n,onAfterHide:r,internalKey:i}=e;t&&t(),n&&n(i),r&&r()}function l(){o()}return{show:n,hide:o,handleClose:s,handleAfterLeave:c,handleMouseleave:a,handleMouseenter:i,deactivate:l}},render(){return s(Me,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?s(et,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,spinProps:this.spinProps,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),rt=S({name:`MessageProvider`,props:Object.assign(Object.assign({},L.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:`top`},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),setup(e){let{mergedClsPrefixRef:t}=F(e),n=v([]),r=v({}),i={create(e,t){return a(e,Object.assign({type:`default`},t))},info(e,t){return a(e,Object.assign(Object.assign({},t),{type:`info`}))},success(e,t){return a(e,Object.assign(Object.assign({},t),{type:`success`}))},warning(e,t){return a(e,Object.assign(Object.assign({},t),{type:`warning`}))},error(e,t){return a(e,Object.assign(Object.assign({},t),{type:`error`}))},loading(e,t){return a(e,Object.assign(Object.assign({},t),{type:`loading`}))},destroyAll:c};o(Ne,{props:e,mergedClsPrefixRef:t}),o(Pe,i);function a(t,i){let a=W(),o=T(Object.assign(Object.assign({},i),{content:t,key:a,destroy:()=>{var e;(e=r.value[a])==null||e.hide()}})),{max:s}=e;return s&&n.value.length>=s&&n.value.shift(),n.value.push(o),o}function s(e){n.value.splice(n.value.findIndex(t=>t.key===e),1),delete r.value[e]}function c(){Object.values(r.value).forEach(e=>{e.hide()})}return Object.assign({mergedClsPrefix:t,messageRefs:r,messageList:n,handleAfterLeave:s},i)},render(){var e;return s(A,null,(e=this.$slots).default?.call(e),this.messageList.length?s(g,{to:this.to??`body`},s(`div`,{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:`message-container`,style:this.containerStyle},this.messageList.map(e=>s(nt,Object.assign({ref:t=>{t&&(this.messageRefs[e.key]=t)},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave},q(e,[`destroy`],void 0),{duration:e.duration===void 0?this.duration:e.duration,keepAliveOnHover:e.keepAliveOnHover===void 0?this.keepAliveOnHover:e.keepAliveOnHover,closable:e.closable===void 0?this.closable:e.closable}))))):null)}}),it={closeMargin:`16px 12px`,closeSize:`20px`,closeIconSize:`16px`,width:`365px`,padding:`16px`,titleFontSize:`16px`,metaFontSize:`12px`,descriptionFontSize:`12px`};function at(e){let{textColor2:t,successColor:n,infoColor:r,warningColor:i,errorColor:a,popoverColor:o,closeIconColor:s,closeIconColorHover:c,closeIconColorPressed:l,closeColorHover:u,closeColorPressed:d,textColor1:f,textColor3:p,borderRadius:m,fontWeightStrong:h,boxShadow2:g,lineHeight:_,fontSize:v}=e;return Object.assign(Object.assign({},it),{borderRadius:m,lineHeight:_,fontSize:v,headerFontWeight:h,iconColor:t,iconColorSuccess:n,iconColorInfo:r,iconColorWarning:i,iconColorError:a,color:o,textColor:t,closeIconColor:s,closeIconColorHover:c,closeIconColorPressed:l,closeBorderRadius:m,closeColorHover:u,closeColorPressed:d,headerTextColor:f,descriptionTextColor:p,actionTextColor:t,boxShadow:g})}var ot=ue({name:`Notification`,common:V,peers:{Scrollbar:he},self:at}),X=ee(`n-notification-provider`),st=S({name:`NotificationContainer`,props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){let{mergedThemeRef:e,mergedClsPrefixRef:t,wipTransitionCountRef:n}=i(X),r=v(null);return h(()=>{var e,t;n.value>0?(e=r?.value)==null||e.classList.add(`transitioning`):(t=r?.value)==null||t.classList.remove(`transitioning`)}),{selfRef:r,mergedTheme:e,mergedClsPrefix:t,transitioning:n}},render(){let{$slots:e,scrollable:t,mergedClsPrefix:n,mergedTheme:r,placement:i}=this;return s(`div`,{ref:`selfRef`,class:[`${n}-notification-container`,t&&`${n}-notification-container--scrollable`,`${n}-notification-container--${i}`]},t?s(ge,{theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,contentStyle:{overflow:`hidden`}},e):e)}}),ct={info:()=>s(ke,null),success:()=>s(K,null),warning:()=>s(ve,null),error:()=>s(ye,null),default:()=>null},Z={closable:{type:Boolean,default:!0},type:{type:String,default:`default`},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},lt=be(Z),ut=S({name:`Notification`,props:Z,setup(e){let{mergedClsPrefixRef:n,mergedThemeRef:r,props:a}=i(X),{inlineThemeDisabled:o,mergedRtlRef:s}=F(),c=ie(`Notification`,s,n),l=t(()=>{let{type:t}=e,{self:{color:n,textColor:i,closeIconColor:a,closeIconColorHover:o,closeIconColorPressed:s,headerTextColor:c,descriptionTextColor:l,actionTextColor:u,borderRadius:d,headerFontWeight:f,boxShadow:p,lineHeight:m,fontSize:h,closeMargin:g,closeSize:_,width:v,padding:y,closeIconSize:b,closeBorderRadius:x,closeColorHover:S,closeColorPressed:C,titleFontSize:w,metaFontSize:T,descriptionFontSize:E,[z(`iconColor`,t)]:D},common:{cubicBezierEaseOut:O,cubicBezierEaseIn:k,cubicBezierEaseInOut:A}}=r.value,{left:j,right:M,top:N,bottom:P}=pe(y);return{"--n-color":n,"--n-font-size":h,"--n-text-color":i,"--n-description-text-color":l,"--n-action-text-color":u,"--n-title-text-color":c,"--n-title-font-weight":f,"--n-bezier":A,"--n-bezier-ease-out":O,"--n-bezier-ease-in":k,"--n-border-radius":d,"--n-box-shadow":p,"--n-close-border-radius":x,"--n-close-color-hover":S,"--n-close-color-pressed":C,"--n-close-icon-color":a,"--n-close-icon-color-hover":o,"--n-close-icon-color-pressed":s,"--n-line-height":m,"--n-icon-color":D,"--n-close-margin":g,"--n-close-size":_,"--n-close-icon-size":b,"--n-width":v,"--n-padding-left":j,"--n-padding-right":M,"--n-padding-top":N,"--n-padding-bottom":P,"--n-title-font-size":w,"--n-meta-font-size":T,"--n-description-font-size":E}}),u=o?U(`notification`,t(()=>e.type[0]),l,a):void 0;return{mergedClsPrefix:n,showAvatar:t(()=>e.avatar||e.type!==`default`),handleCloseClick(){e.onClose()},rtlEnabled:c,cssVars:o?void 0:l,themeClass:u?.themeClass,onRender:u?.onRender}},render(){var e;let{mergedClsPrefix:t}=this;return(e=this.onRender)==null||e.call(this),s(`div`,{class:[`${t}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},s(`div`,{class:[`${t}-notification`,this.rtlEnabled&&`${t}-notification--rtl`,this.themeClass,{[`${t}-notification--closable`]:this.closable,[`${t}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?s(`div`,{class:`${t}-notification__avatar`},this.avatar?G(this.avatar):this.type===`default`?null:s(me,{clsPrefix:t},{default:()=>ct[this.type]()})):null,this.closable?s(Ae,{clsPrefix:t,class:`${t}-notification__close`,onClick:this.handleCloseClick}):null,s(`div`,{ref:`bodyRef`,class:`${t}-notification-main`},this.title?s(`div`,{class:`${t}-notification-main__header`},G(this.title)):null,this.description?s(`div`,{class:`${t}-notification-main__description`},G(this.description)):null,this.content?s(`pre`,{class:`${t}-notification-main__content`},G(this.content)):null,this.meta||this.action?s(`div`,{class:`${t}-notification-main-footer`},this.meta?s(`div`,{class:`${t}-notification-main-footer__meta`},G(this.meta)):null,this.action?s(`div`,{class:`${t}-notification-main-footer__action`},G(this.action)):null):null)))}}),dt=Object.assign(Object.assign({},Z),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),ft=S({name:`NotificationEnvironment`,props:Object.assign(Object.assign({},dt),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(e){let{wipTransitionCountRef:t}=i(X),n=v(!0),r=null;function a(){n.value=!1,r&&window.clearTimeout(r)}function o(e){t.value++,u(()=>{e.style.height=`${e.offsetHeight}px`,e.style.maxHeight=`0`,e.style.transition=`none`,e.offsetHeight,e.style.transition=``,e.style.maxHeight=e.style.height})}function s(n){t.value--,n.style.height=``,n.style.maxHeight=``;let{onAfterEnter:r,onAfterShow:i}=e;r&&r(),i&&i()}function c(e){t.value++,e.style.maxHeight=`${e.offsetHeight}px`,e.style.height=`${e.offsetHeight}px`,e.offsetHeight}function l(t){let{onHide:n}=e;n&&n(),t.style.maxHeight=`0`,t.offsetHeight}function d(){t.value--;let{onAfterLeave:n,onInternalAfterLeave:r,onAfterHide:i,internalKey:a}=e;n&&n(),r(a),i&&i()}function p(){let{duration:t}=e;t&&(r=window.setTimeout(a,t))}function m(e){e.currentTarget===e.target&&r!==null&&(window.clearTimeout(r),r=null)}function h(e){e.currentTarget===e.target&&p()}function g(){let{onClose:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&a()}):a()}return f(()=>{e.duration&&(r=window.setTimeout(a,e.duration))}),{show:n,hide:a,handleClose:g,handleAfterLeave:d,handleLeave:l,handleBeforeLeave:c,handleAfterEnter:s,handleBeforeEnter:o,handleMouseenter:m,handleMouseleave:h}},render(){return s(y,{name:`notification-transition`,appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?s(ut,Object.assign({},fe(this.$props,lt),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),pt=I([H(`notification-container`,`
|
|
118
|
-
z-index: 4000;
|
|
119
|
-
position: fixed;
|
|
120
|
-
overflow: visible;
|
|
121
|
-
display: flex;
|
|
122
|
-
flex-direction: column;
|
|
123
|
-
align-items: flex-end;
|
|
124
|
-
`,[I(`>`,[H(`scrollbar`,`
|
|
125
|
-
width: initial;
|
|
126
|
-
overflow: visible;
|
|
127
|
-
height: -moz-fit-content !important;
|
|
128
|
-
height: fit-content !important;
|
|
129
|
-
max-height: 100vh !important;
|
|
130
|
-
`,[I(`>`,[H(`scrollbar-container`,`
|
|
131
|
-
height: -moz-fit-content !important;
|
|
132
|
-
height: fit-content !important;
|
|
133
|
-
max-height: 100vh !important;
|
|
134
|
-
`,[H(`scrollbar-content`,`
|
|
135
|
-
padding-top: 12px;
|
|
136
|
-
padding-bottom: 33px;
|
|
137
|
-
`)])])])]),B(`top, top-right, top-left`,`
|
|
138
|
-
top: 12px;
|
|
139
|
-
`,[I(`&.transitioning >`,[H(`scrollbar`,[I(`>`,[H(`scrollbar-container`,`
|
|
140
|
-
min-height: 100vh !important;
|
|
141
|
-
`)])])])]),B(`bottom, bottom-right, bottom-left`,`
|
|
142
|
-
bottom: 12px;
|
|
143
|
-
`,[I(`>`,[H(`scrollbar`,[I(`>`,[H(`scrollbar-container`,[H(`scrollbar-content`,`
|
|
144
|
-
padding-bottom: 12px;
|
|
145
|
-
`)])])])]),H(`notification-wrapper`,`
|
|
146
|
-
display: flex;
|
|
147
|
-
align-items: flex-end;
|
|
148
|
-
margin-bottom: 0;
|
|
149
|
-
margin-top: 12px;
|
|
150
|
-
`)]),B(`top, bottom`,`
|
|
151
|
-
left: 50%;
|
|
152
|
-
transform: translateX(-50%);
|
|
153
|
-
`,[H(`notification-wrapper`,[I(`&.notification-transition-enter-from, &.notification-transition-leave-to`,`
|
|
154
|
-
transform: scale(0.85);
|
|
155
|
-
`),I(`&.notification-transition-leave-from, &.notification-transition-enter-to`,`
|
|
156
|
-
transform: scale(1);
|
|
157
|
-
`)])]),B(`top`,[H(`notification-wrapper`,`
|
|
158
|
-
transform-origin: top center;
|
|
159
|
-
`)]),B(`bottom`,[H(`notification-wrapper`,`
|
|
160
|
-
transform-origin: bottom center;
|
|
161
|
-
`)]),B(`top-right, bottom-right`,[H(`notification`,`
|
|
162
|
-
margin-left: 28px;
|
|
163
|
-
margin-right: 16px;
|
|
164
|
-
`)]),B(`top-left, bottom-left`,[H(`notification`,`
|
|
165
|
-
margin-left: 16px;
|
|
166
|
-
margin-right: 28px;
|
|
167
|
-
`)]),B(`top-right`,`
|
|
168
|
-
right: 0;
|
|
169
|
-
`,[Q(`top-right`)]),B(`top-left`,`
|
|
170
|
-
left: 0;
|
|
171
|
-
`,[Q(`top-left`)]),B(`bottom-right`,`
|
|
172
|
-
right: 0;
|
|
173
|
-
`,[Q(`bottom-right`)]),B(`bottom-left`,`
|
|
174
|
-
left: 0;
|
|
175
|
-
`,[Q(`bottom-left`)]),B(`scrollable`,[B(`top-right`,`
|
|
176
|
-
top: 0;
|
|
177
|
-
`),B(`top-left`,`
|
|
178
|
-
top: 0;
|
|
179
|
-
`),B(`bottom-right`,`
|
|
180
|
-
bottom: 0;
|
|
181
|
-
`),B(`bottom-left`,`
|
|
182
|
-
bottom: 0;
|
|
183
|
-
`)]),H(`notification-wrapper`,`
|
|
184
|
-
margin-bottom: 12px;
|
|
185
|
-
`,[I(`&.notification-transition-enter-from, &.notification-transition-leave-to`,`
|
|
186
|
-
opacity: 0;
|
|
187
|
-
margin-top: 0 !important;
|
|
188
|
-
margin-bottom: 0 !important;
|
|
189
|
-
`),I(`&.notification-transition-leave-from, &.notification-transition-enter-to`,`
|
|
190
|
-
opacity: 1;
|
|
191
|
-
`),I(`&.notification-transition-leave-active`,`
|
|
192
|
-
transition:
|
|
193
|
-
background-color .3s var(--n-bezier),
|
|
194
|
-
color .3s var(--n-bezier),
|
|
195
|
-
opacity .3s var(--n-bezier),
|
|
196
|
-
transform .3s var(--n-bezier-ease-in),
|
|
197
|
-
max-height .3s var(--n-bezier),
|
|
198
|
-
margin-top .3s linear,
|
|
199
|
-
margin-bottom .3s linear,
|
|
200
|
-
box-shadow .3s var(--n-bezier);
|
|
201
|
-
`),I(`&.notification-transition-enter-active`,`
|
|
202
|
-
transition:
|
|
203
|
-
background-color .3s var(--n-bezier),
|
|
204
|
-
color .3s var(--n-bezier),
|
|
205
|
-
opacity .3s var(--n-bezier),
|
|
206
|
-
transform .3s var(--n-bezier-ease-out),
|
|
207
|
-
max-height .3s var(--n-bezier),
|
|
208
|
-
margin-top .3s linear,
|
|
209
|
-
margin-bottom .3s linear,
|
|
210
|
-
box-shadow .3s var(--n-bezier);
|
|
211
|
-
`)]),H(`notification`,`
|
|
212
|
-
background-color: var(--n-color);
|
|
213
|
-
color: var(--n-text-color);
|
|
214
|
-
transition:
|
|
215
|
-
background-color .3s var(--n-bezier),
|
|
216
|
-
color .3s var(--n-bezier),
|
|
217
|
-
opacity .3s var(--n-bezier),
|
|
218
|
-
box-shadow .3s var(--n-bezier);
|
|
219
|
-
font-family: inherit;
|
|
220
|
-
font-size: var(--n-font-size);
|
|
221
|
-
font-weight: 400;
|
|
222
|
-
position: relative;
|
|
223
|
-
display: flex;
|
|
224
|
-
overflow: hidden;
|
|
225
|
-
flex-shrink: 0;
|
|
226
|
-
padding-left: var(--n-padding-left);
|
|
227
|
-
padding-right: var(--n-padding-right);
|
|
228
|
-
width: var(--n-width);
|
|
229
|
-
max-width: calc(100vw - 16px - 16px);
|
|
230
|
-
border-radius: var(--n-border-radius);
|
|
231
|
-
box-shadow: var(--n-box-shadow);
|
|
232
|
-
box-sizing: border-box;
|
|
233
|
-
opacity: 1;
|
|
234
|
-
`,[R(`avatar`,[H(`icon`,`
|
|
235
|
-
color: var(--n-icon-color);
|
|
236
|
-
`),H(`base-icon`,`
|
|
237
|
-
color: var(--n-icon-color);
|
|
238
|
-
`)]),B(`show-avatar`,[H(`notification-main`,`
|
|
239
|
-
margin-left: 40px;
|
|
240
|
-
width: calc(100% - 40px);
|
|
241
|
-
`)]),B(`closable`,[H(`notification-main`,[I(`> *:first-child`,`
|
|
242
|
-
padding-right: 20px;
|
|
243
|
-
`)]),R(`close`,`
|
|
244
|
-
position: absolute;
|
|
245
|
-
top: 0;
|
|
246
|
-
right: 0;
|
|
247
|
-
margin: var(--n-close-margin);
|
|
248
|
-
transition:
|
|
249
|
-
background-color .3s var(--n-bezier),
|
|
250
|
-
color .3s var(--n-bezier);
|
|
251
|
-
`)]),R(`avatar`,`
|
|
252
|
-
position: absolute;
|
|
253
|
-
top: var(--n-padding-top);
|
|
254
|
-
left: var(--n-padding-left);
|
|
255
|
-
width: 28px;
|
|
256
|
-
height: 28px;
|
|
257
|
-
font-size: 28px;
|
|
258
|
-
display: flex;
|
|
259
|
-
align-items: center;
|
|
260
|
-
justify-content: center;
|
|
261
|
-
`,[H(`icon`,`transition: color .3s var(--n-bezier);`)]),H(`notification-main`,`
|
|
262
|
-
padding-top: var(--n-padding-top);
|
|
263
|
-
padding-bottom: var(--n-padding-bottom);
|
|
264
|
-
box-sizing: border-box;
|
|
265
|
-
display: flex;
|
|
266
|
-
flex-direction: column;
|
|
267
|
-
margin-left: 8px;
|
|
268
|
-
width: calc(100% - 8px);
|
|
269
|
-
`,[H(`notification-main-footer`,`
|
|
270
|
-
display: flex;
|
|
271
|
-
align-items: center;
|
|
272
|
-
justify-content: space-between;
|
|
273
|
-
margin-top: 12px;
|
|
274
|
-
`,[R(`meta`,`
|
|
275
|
-
font-size: var(--n-meta-font-size);
|
|
276
|
-
transition: color .3s var(--n-bezier-ease-out);
|
|
277
|
-
color: var(--n-description-text-color);
|
|
278
|
-
`),R(`action`,`
|
|
279
|
-
cursor: pointer;
|
|
280
|
-
transition: color .3s var(--n-bezier-ease-out);
|
|
281
|
-
color: var(--n-action-text-color);
|
|
282
|
-
`)]),R(`header`,`
|
|
283
|
-
font-weight: var(--n-title-font-weight);
|
|
284
|
-
font-size: var(--n-title-font-size);
|
|
285
|
-
transition: color .3s var(--n-bezier-ease-out);
|
|
286
|
-
color: var(--n-title-text-color);
|
|
287
|
-
`),R(`description`,`
|
|
288
|
-
margin-top: 8px;
|
|
289
|
-
font-size: var(--n-description-font-size);
|
|
290
|
-
white-space: pre-wrap;
|
|
291
|
-
word-wrap: break-word;
|
|
292
|
-
transition: color .3s var(--n-bezier-ease-out);
|
|
293
|
-
color: var(--n-description-text-color);
|
|
294
|
-
`),R(`content`,`
|
|
295
|
-
line-height: var(--n-line-height);
|
|
296
|
-
margin: 12px 0 0 0;
|
|
297
|
-
font-family: inherit;
|
|
298
|
-
white-space: pre-wrap;
|
|
299
|
-
word-wrap: break-word;
|
|
300
|
-
transition: color .3s var(--n-bezier-ease-out);
|
|
301
|
-
color: var(--n-text-color);
|
|
302
|
-
`,[I(`&:first-child`,`margin: 0;`)])])])])]);function Q(e){return H(`notification-wrapper`,[I(`&.notification-transition-enter-from, &.notification-transition-leave-to`,`
|
|
303
|
-
transform: translate(${e.split(`-`)[1]===`left`?`calc(-100%)`:`calc(100%)`}, 0);
|
|
304
|
-
`),I(`&.notification-transition-leave-from, &.notification-transition-enter-to`,`
|
|
305
|
-
transform: translate(0, 0);
|
|
306
|
-
`)])}var mt=ee(`n-notification-api`),ht=S({name:`NotificationProvider`,props:Object.assign(Object.assign({},L.props),{containerClass:String,containerStyle:[String,Object],to:[String,Object],scrollable:{type:Boolean,default:!0},max:Number,placement:{type:String,default:`top-right`},keepAliveOnHover:Boolean}),setup(e){let{mergedClsPrefixRef:t}=F(e),n=v([]),r={},i=new Set;function a(t){let a=W(),o=()=>{i.add(a),r[a]&&r[a].hide()},s=T(Object.assign(Object.assign({},t),{key:a,destroy:o,hide:o,deactivate:o})),{max:c}=e;if(c&&n.value.length-i.size>=c){let e=!1,t=0;for(let a of n.value){if(!i.has(a.key)){r[a.key]&&(a.destroy(),e=!0);break}t++}e||n.value.splice(t,1)}return n.value.push(s),s}let s=[`info`,`success`,`warning`,`error`].map(e=>t=>a(Object.assign(Object.assign({},t),{type:e})));function c(e){i.delete(e),n.value.splice(n.value.findIndex(t=>t.key===e),1)}let l=L(`Notification`,`-notification`,pt,ot,e,t),u={create:a,info:s[0],success:s[1],warning:s[2],error:s[3],open:f,destroyAll:p},d=v(0);o(mt,u),o(X,{props:e,mergedClsPrefixRef:t,mergedThemeRef:l,wipTransitionCountRef:d});function f(e){return a(e)}function p(){Object.values(n.value).forEach(e=>{e.hide()})}return Object.assign({mergedClsPrefix:t,notificationList:n,notificationRefs:r,handleAfterLeave:c},u)},render(){var e;let{placement:t}=this;return s(A,null,(e=this.$slots).default?.call(e),this.notificationList.length?s(g,{to:this.to??`body`},s(st,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&t!==`top`&&t!==`bottom`,placement:t},{default:()=>this.notificationList.map(e=>s(ft,Object.assign({ref:t=>{let n=e.key;t===null?delete this.notificationRefs[n]:this.notificationRefs[n]=t}},q(e,[`destroy`,`hide`,`deactivate`]),{internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:e.keepAliveOnHover===void 0?this.keepAliveOnHover:e.keepAliveOnHover})))})):null)}}),gt={common:{primaryColor:`#333333`,primaryColorHover:`#1a1a1a`,primaryColorPressed:`#000000`,primaryColorSuppl:`#333333`,bodyColor:`#fafafa`,cardColor:`#ffffff`,modalColor:`#ffffff`,popoverColor:`#ffffff`,tableColor:`#ffffff`,inputColor:`#ffffff`,actionColor:`#f0f0f0`,textColorBase:`#1a1a1a`,textColor1:`#1a1a1a`,textColor2:`#666666`,textColor3:`#999999`,dividerColor:`#e0e0e0`,borderColor:`#e0e0e0`,hoverColor:`rgba(0, 0, 0, 0.04)`,borderRadius:`8px`,borderRadiusSmall:`6px`,fontSize:`14px`,fontSizeMedium:`14px`,heightMedium:`36px`,fontFamily:`Inter, system-ui, -apple-system, sans-serif`,fontFamilyMono:`JetBrains Mono, Fira Code, Consolas, monospace`},Layout:{color:`#fafafa`,siderColor:`#f5f5f5`,headerColor:`#fafafa`},Menu:{itemTextColorActive:`#1a1a1a`,itemTextColorActiveHover:`#1a1a1a`,itemTextColorChildActive:`#1a1a1a`,itemIconColorActive:`#1a1a1a`,itemIconColorActiveHover:`#000000`,itemColorActive:`rgba(0, 0, 0, 0.06)`,itemColorActiveHover:`rgba(0, 0, 0, 0.1)`,arrowColorActive:`#1a1a1a`},Button:{textColorPrimary:`#ffffff`,colorPrimary:`#333333`,colorHoverPrimary:`#1a1a1a`,colorPressedPrimary:`#000000`},Input:{color:`#ffffff`,colorFocus:`#ffffff`,border:`1px solid #e0e0e0`,borderHover:`1px solid #999999`,borderFocus:`1px solid #333333`,placeholderColor:`#999999`,caretColor:`#1a1a1a`},Card:{color:`#ffffff`,borderColor:`#e0e0e0`},Modal:{color:`#ffffff`},Tag:{borderRadius:`6px`}},_t={class:`model-selector`},vt=P(S({__name:`ModelSelector`,setup(r){let i=J(),o=t(()=>i.modelGroups.map(e=>({label:e.label,type:`group`,key:e.provider,children:e.models.map(e=>({label:e,value:e}))})));function s(e){typeof e==`string`&&i.switchModel(e)}return(t,r)=>(a(),n(`div`,_t,[r[0]||=k(`div`,{class:`model-label`},`Model`,-1),e(D(je),{value:D(i).selectedModel,options:o.value,size:`small`,"onUpdate:value":s},null,8,[`value`,`options`])]))}}),[[`__scopeId`,`data-v-00830782`]]),yt=S({__name:`LanguageSwitch`,setup(e){let{locale:n,availableLocales:r}=N(),i=t(()=>r.map(e=>({label:e===`zh`?`中文`:`English`,value:e})));function o(e){n.value=e,localStorage.setItem(`hermes_locale`,e)}return(e,t)=>(a(),d(D(je),{value:D(n),options:i.value,size:`tiny`,"consistent-menu-width":!1,style:{width:`90px`},"onUpdate:value":o},null,8,[`value`,`options`]))}}),bt=`/assets/dance-gGRu7JHG.mp4`,xt={class:`sidebar`},St={class:`sidebar-nav`},Ct={class:`sidebar-footer`},wt={class:`status-row`},Tt={class:`status-text`},Et={class:`version-info`},Dt=P(S({__name:`AppSidebar`,setup(r){let{t:i}=N(),o=_(),s=C(),l=J(),u=v(),d=t(()=>o.name);f(()=>{let e=u.value;if(!e)return;let t=e.getContext(`2d`);if(!t)return;let n=document.createElement(`video`);n.src=bt,n.muted=!0,n.playsInline=!0,n.autoplay=!0,n.addEventListener(`loadeddata`,()=>{e.width=n.videoWidth,e.height=n.videoHeight});function r(){n.readyState>=2&&t&&e&&t.drawImage(n,0,0,e.width,e.height),n.currentTime>=n.duration-.05&&(n.currentTime=0),requestAnimationFrame(r)}n.addEventListener(`canplay`,()=>{r()}),n.play();let i=()=>{document.visibilityState===`visible`&&n.paused&&n.play()};document.addEventListener(`visibilitychange`,i),p(()=>{document.removeEventListener(`visibilitychange`,i)})});function m(e){s.push({name:e})}return(t,r)=>(a(),n(`aside`,xt,[k(`div`,{class:`sidebar-logo`,onClick:r[0]||=e=>D(s).push(`/chat`)},[r[10]||=k(`img`,{src:`/logo.png`,alt:`Hermes`,class:`logo-img`},null,-1),r[11]||=k(`span`,{class:`logo-text`},`Hermes`,-1),k(`canvas`,{ref_key:`canvasRef`,ref:u,class:`logo-dance`},null,512)]),k(`nav`,St,[k(`button`,{class:w([`nav-item`,{active:d.value===`chat`}]),onClick:r[1]||=e=>m(`chat`)},[r[12]||=k(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[k(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`})],-1),k(`span`,null,b(D(i)(`sidebar.chat`)),1)],2),k(`button`,{class:w([`nav-item`,{active:d.value===`jobs`}]),onClick:r[2]||=e=>m(`jobs`)},[r[13]||=c(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-afd7c4c4><rect x="3" y="4" width="18" height="18" rx="2" ry="2" data-v-afd7c4c4></rect><line x1="16" y1="2" x2="16" y2="6" data-v-afd7c4c4></line><line x1="8" y1="2" x2="8" y2="6" data-v-afd7c4c4></line><line x1="3" y1="10" x2="21" y2="10" data-v-afd7c4c4></line></svg>`,1),k(`span`,null,b(D(i)(`sidebar.jobs`)),1)],2),k(`button`,{class:w([`nav-item`,{active:d.value===`models`}]),onClick:r[3]||=e=>m(`models`)},[r[14]||=c(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-afd7c4c4><circle cx="12" cy="12" r="3" data-v-afd7c4c4></circle><path d="M12 1v4" data-v-afd7c4c4></path><path d="M12 19v4" data-v-afd7c4c4></path><path d="M1 12h4" data-v-afd7c4c4></path><path d="M19 12h4" data-v-afd7c4c4></path><path d="M4.22 4.22l2.83 2.83" data-v-afd7c4c4></path><path d="M16.95 16.95l2.83 2.83" data-v-afd7c4c4></path><path d="M4.22 19.78l2.83-2.83" data-v-afd7c4c4></path><path d="M16.95 7.05l2.83-2.83" data-v-afd7c4c4></path></svg>`,1),k(`span`,null,b(D(i)(`sidebar.models`)),1)],2),k(`button`,{class:w([`nav-item`,{active:d.value===`channels`}]),onClick:r[4]||=e=>m(`channels`)},[r[15]||=k(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[k(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`})],-1),k(`span`,null,b(D(i)(`sidebar.channels`)),1)],2),k(`button`,{class:w([`nav-item`,{active:d.value===`skills`}]),onClick:r[5]||=e=>m(`skills`)},[r[16]||=k(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[k(`polygon`,{points:`12 2 2 7 12 12 22 7 12 2`}),k(`polyline`,{points:`2 17 12 22 22 17`}),k(`polyline`,{points:`2 12 12 17 22 12`})],-1),k(`span`,null,b(D(i)(`sidebar.skills`)),1)],2),k(`button`,{class:w([`nav-item`,{active:d.value===`memory`}]),onClick:r[6]||=e=>m(`memory`)},[r[17]||=k(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[k(`path`,{d:`M9 18h6`}),k(`path`,{d:`M10 22h4`}),k(`path`,{d:`M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2z`})],-1),k(`span`,null,b(D(i)(`sidebar.memory`)),1)],2),k(`button`,{class:w([`nav-item`,{active:d.value===`logs`}]),onClick:r[7]||=e=>m(`logs`)},[r[18]||=c(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-afd7c4c4><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-afd7c4c4></path><polyline points="14 2 14 8 20 8" data-v-afd7c4c4></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-afd7c4c4></line><line x1="16" y1="17" x2="8" y2="17" data-v-afd7c4c4></line><polyline points="10 9 9 9 8 9" data-v-afd7c4c4></polyline></svg>`,1),k(`span`,null,b(D(i)(`sidebar.logs`)),1)],2),k(`button`,{class:w([`nav-item`,{active:d.value===`usage`}]),onClick:r[8]||=e=>m(`usage`)},[r[19]||=k(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[k(`rect`,{x:`3`,y:`12`,width:`4`,height:`9`,rx:`1`}),k(`rect`,{x:`10`,y:`7`,width:`4`,height:`14`,rx:`1`}),k(`rect`,{x:`17`,y:`3`,width:`4`,height:`18`,rx:`1`})],-1),k(`span`,null,b(D(i)(`sidebar.usage`)),1)],2),k(`button`,{class:w([`nav-item`,{active:d.value===`settings`}]),onClick:r[9]||=e=>m(`settings`)},[r[20]||=k(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[k(`circle`,{cx:`12`,cy:`12`,r:`3`}),k(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z`})],-1),k(`span`,null,b(D(i)(`sidebar.settings`)),1)],2)]),e(vt),k(`div`,Ct,[k(`div`,wt,[k(`div`,{class:w([`status-indicator`,{connected:D(l).connected,disconnected:!D(l).connected}])},[r[21]||=k(`span`,{class:`status-dot`},null,-1),k(`span`,Tt,b(D(l).connected?D(i)(`sidebar.connected`):D(i)(`sidebar.disconnected`)),1)],2),e(yt)]),k(`div`,Et,` Hermes `+b(D(l).serverVersion||`v0.1.0`),1)])]))}}),[[`__scopeId`,`data-v-afd7c4c4`]]);function Ot(){let e=C(),t=Fe();function n(n){let r=n.ctrlKey||n.metaKey;if(r&&n.key===`n`&&(n.preventDefault(),t.newChat()),r&&n.key===`j`&&(n.preventDefault(),e.push({name:`jobs`})),n.key===`Escape`){let e=document.querySelector(`.n-modal-mask`);e&&e.querySelector(`.n-base-close`)?.click()}}f(()=>{window.addEventListener(`keydown`,n)}),p(()=>{window.removeEventListener(`keydown`,n)})}var kt={class:`app-main`},At=P(S({__name:`App`,setup(i){let o=J(),s=_(),c=C(),u=v(!1),h=t(()=>s.name===`login`);return c.isReady().then(()=>{u.value=!0}),f(()=>{h.value||(o.loadModels(),o.startHealthPolling())}),p(()=>{o.stopHealthPolling()}),Ot(),(t,i)=>{let o=m(`router-view`);return a(),d(D(We),{"theme-overrides":D(gt)},{default:l(()=>[e(D(rt),null,{default:l(()=>[e(D(qe),null,{default:l(()=>[e(D(ht),null,{default:l(()=>[u.value?(a(),n(`div`,{key:0,class:w([`app-layout`,{"no-sidebar":h.value}])},[h.value?r(``,!0):(a(),d(Dt,{key:0})),k(`main`,kt,[e(o)])],2)):r(``,!0)]),_:1})]),_:1})]),_:1})]),_:1},8,[`theme-overrides`])}}}),[[`__scopeId`,`data-v-ff8c112e`]]),jt=new URLSearchParams(window.location.search),Mt=window.location.hash.split(`?`)[1],Nt=jt.get(`token`)||(Mt?new URLSearchParams(Mt).get(`token`):null);Nt&&(window.__LOGIN_TOKEN__=Nt);var $=E(At);$.use(j()),$.use(Be),$.use(O),$.mount(`#app`);
|
|
File without changes
|
|
File without changes
|