chatlab-cli 0.31.3 → 0.33.0
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 +2 -1
- package/dist/{chat-command-ZIXKNLSE.mjs → chat-command-IHRNO7J4.mjs} +8 -8
- package/dist/{chunk-3J7WTUEE.mjs → chunk-4V6UP7EW.mjs} +2 -2
- package/dist/{chunk-YVNZ73O5.mjs → chunk-C3B7RXES.mjs} +3919 -3773
- package/dist/chunk-C3B7RXES.mjs.map +1 -0
- package/dist/{chunk-FDLLEDNW.mjs → chunk-HGV4MUIW.mjs} +4 -4
- package/dist/{chunk-75FZ26HM.mjs → chunk-KWJ5FZ74.mjs} +1196 -1045
- package/dist/chunk-KWJ5FZ74.mjs.map +1 -0
- package/dist/{chunk-DV4U34MR.mjs → chunk-NHTOSDYI.mjs} +2 -2
- package/dist/{chunk-UIUEG7JB.mjs → chunk-NSWFHMBZ.mjs} +112 -16
- package/dist/chunk-NSWFHMBZ.mjs.map +1 -0
- package/dist/{chunk-EINCXXWY.mjs → chunk-RHA534GU.mjs} +3 -3
- package/dist/{chunk-23AIEWCD.mjs → chunk-S7YPBKQ3.mjs} +2 -2
- package/dist/{chunk-BLOBEOCG.mjs → chunk-U4F6BNGZ.mjs} +2 -2
- package/dist/{chunk-MFOCDGCC.mjs → chunk-ZERQIKI4.mjs} +121 -19
- package/dist/chunk-ZERQIKI4.mjs.map +1 -0
- package/dist/{chunk-GZO3NAHC.mjs → chunk-ZTMZ7S7T.mjs} +65 -16
- package/dist/chunk-ZTMZ7S7T.mjs.map +1 -0
- package/dist/cli.mjs +8 -8
- package/dist/contacts-worker.mjs +2 -2
- package/dist/global-insight-worker.mjs +1 -1
- package/dist/{http-WDG2OHOV.mjs → http-Y2WC2UK4.mjs} +11 -11
- package/dist/{import-4BDC37F7.mjs → import-4HF2UNQI.mjs} +7 -7
- package/dist/index.mjs +11 -11
- package/dist/{mcp-4KUVRGFF.mjs → mcp-DJPDRFTW.mjs} +8 -8
- package/dist/people-relationships-worker.mjs +2 -2
- package/dist/semantic-index-worker.mjs +1 -1
- package/dist/{src-ZOCLFBCJ.mjs → src-R7MZLKXQ.mjs} +17 -9
- package/dist/{stream-import-ERTT7U6V.mjs → stream-import-DX57ANUL.mjs} +7 -7
- package/dist/{worker-runtime-2TUZHV7W.mjs → worker-runtime-QMN7OKOZ.mjs} +5 -5
- package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-hwRVh048.js +110 -0
- package/{dist-web/assets/BufferResource-DgKoy0Ii.js → dist-cli-web/assets/BufferResource-DwfMBlAa.js} +1 -1
- package/dist-cli-web/assets/CanvasRenderer-q312LRsp.js +1 -0
- package/dist-cli-web/assets/DataDirCleanupNotice--ee1dY0d.js +1 -0
- package/dist-cli-web/assets/EChartWordcloud-BaMgUl0Y.js +1 -0
- package/{dist-web/assets/Filter-D32zqY5x.js → dist-cli-web/assets/Filter-BOb5cLBx.js} +1 -1
- package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-DK2z0Jrh.js +1 -0
- package/dist-cli-web/assets/MessageExportModal-CFbovWh1.js +1 -0
- package/dist-cli-web/assets/PageHeader-B3-W9mvh.js +1 -0
- package/{dist-web/assets/RelationshipGalaxyCanvas-DsMOubHV.js → dist-cli-web/assets/RelationshipGalaxyCanvas-GEpsKHxV.js} +4 -4
- package/{dist-web/assets/RelationshipGalaxyThreeCanvas-Dh5HjVHr.js → dist-cli-web/assets/RelationshipGalaxyThreeCanvas-DHOU66Gj.js} +2 -2
- package/{dist-web/assets/RenderTargetSystem-CovK4x_D.js → dist-cli-web/assets/RenderTargetSystem-PEnnW2yb.js} +1 -1
- package/dist-cli-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-sNw3hP4c.js +1 -0
- package/dist-cli-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-BtUvMehe.js +1 -0
- package/{dist-web/assets/WebGLRenderer-CawhbcYU.js → dist-cli-web/assets/WebGLRenderer-BjP_1do7.js} +2 -2
- package/{dist-web/assets/WebGPURenderer-B7P1D2sA.js → dist-cli-web/assets/WebGPURenderer-ldVv92u7.js} +2 -2
- package/dist-cli-web/assets/annual-summary-time-range-BHClzNvd.js +1 -0
- package/dist-cli-web/assets/base-DBJ95yXf.js +1 -0
- package/{dist-web/assets/browserAll-CtQkc1DF.js → dist-cli-web/assets/browserAll-CPoMOLKh.js} +1 -1
- package/dist-cli-web/assets/cli-web-B5VYO-Dh.js +1 -0
- package/{dist-web/assets/dateFormat-Cfb89ZjM.js → dist-cli-web/assets/dateFormat-Cf2xuaE-.js} +1 -1
- package/dist-cli-web/assets/fetch-80O3EH4a.js +1 -0
- package/dist-cli-web/assets/fetch-B1km2u3N.js +1 -0
- package/dist-cli-web/assets/fetch-BFDKzf1P.js +1 -0
- package/dist-cli-web/assets/fetch-BuWxo6oK.js +1 -0
- package/{dist-web/assets/fetch-DkfUUq-R.js → dist-cli-web/assets/fetch-C0HHT1Yn.js} +3 -3
- package/dist-cli-web/assets/fetch-CXIdj2-_.js +1 -0
- package/{dist-web/assets/fetch-DVGCzZ0E.js → dist-cli-web/assets/fetch-CtyVktRW.js} +3 -3
- package/{dist-web/assets/fetch-D2hvh7lO.js → dist-cli-web/assets/fetch-DGi_9my2.js} +2 -2
- package/dist-cli-web/assets/fetch-Dr41uuXL.js +1 -0
- package/dist-cli-web/assets/fetch-J67jyI2k.js +1 -0
- package/dist-cli-web/assets/index-5UdyJtVU.js +1 -0
- package/dist-cli-web/assets/index-7jm3YI9u.js +53 -0
- package/dist-cli-web/assets/index-B7R74Yp7.js +1 -0
- package/dist-cli-web/assets/index-BGiTw98l.js +1 -0
- package/dist-cli-web/assets/index-Ba21yU86.js +1 -0
- package/{dist-web/assets/index-CuPE4SSh.js → dist-cli-web/assets/index-Bf3gFaid.js} +4 -4
- package/dist-cli-web/assets/index-ByQSR8Bj.js +2 -0
- package/dist-cli-web/assets/index-CPZYydbc.js +2 -0
- package/dist-cli-web/assets/index-D8Q3U-6e.js +1 -0
- package/dist-cli-web/assets/index-DGtDxRCd.js +173 -0
- package/{dist-web/assets/index-DBb03wVF.css → dist-cli-web/assets/index-DTxnpQiv.css} +1 -1
- package/dist-cli-web/assets/index-DmrrdYXH.css +1 -0
- package/dist-cli-web/assets/index-DtlTo3nt.js +1 -0
- package/dist-cli-web/assets/index-DzQT-qXF.js +1 -0
- package/dist-cli-web/assets/index-gpTDI3sq.js +64 -0
- package/{dist-web/assets/index-D8Uq3_Dc.css → dist-cli-web/assets/index-lwhCMqhd.css} +1 -1
- package/dist-cli-web/assets/index-qsbWn8VP.css +1 -0
- package/dist-cli-web/assets/people-page-header-BvQy1GQj.js +1 -0
- package/{dist-web/assets/webworkerAll-BzRoT-6m.js → dist-cli-web/assets/webworkerAll-DgKQKbNn.js} +1 -1
- package/{dist-web → dist-cli-web}/index.html +2 -4
- package/package.json +4 -4
- package/dist/chunk-75FZ26HM.mjs.map +0 -1
- package/dist/chunk-GZO3NAHC.mjs.map +0 -1
- package/dist/chunk-MFOCDGCC.mjs.map +0 -1
- package/dist/chunk-UIUEG7JB.mjs.map +0 -1
- package/dist/chunk-YVNZ73O5.mjs.map +0 -1
- package/dist-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-GgQ5ueMX.js +0 -110
- package/dist-web/assets/CanvasRenderer-CKpp71xg.js +0 -1
- package/dist-web/assets/EChartWordcloud-CSOuFvyM.js +0 -1
- package/dist-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-DUAtrSZD.js +0 -1
- package/dist-web/assets/MessageExportModal-BYLw4vZ8.js +0 -1
- package/dist-web/assets/PageHeader-Dmu6cdAk.js +0 -1
- package/dist-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-DhUfYrEx.js +0 -1
- package/dist-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-CaumhCAS.js +0 -1
- package/dist-web/assets/annual-summary-time-range-Bya4h2j6.js +0 -1
- package/dist-web/assets/base-ClGWE9aq.js +0 -1
- package/dist-web/assets/electron-Brd7jS6W.js +0 -1
- package/dist-web/assets/electron-DGxVMsvC.js +0 -1
- package/dist-web/assets/electron-hcWiB7Gg.js +0 -1
- package/dist-web/assets/fetch-BJ3lnhzK.js +0 -1
- package/dist-web/assets/fetch-BoB63ns8.js +0 -1
- package/dist-web/assets/fetch-BtK7YvLp.js +0 -1
- package/dist-web/assets/fetch-CeREJiFL.js +0 -1
- package/dist-web/assets/fetch-DWoMmOlr.js +0 -1
- package/dist-web/assets/fetch-Dr_Fjtvp.js +0 -1
- package/dist-web/assets/fetch-u7ivV7Uy.js +0 -1
- package/dist-web/assets/index-BHnQaeQY.js +0 -1
- package/dist-web/assets/index-BKFGuwJu.css +0 -1
- package/dist-web/assets/index-BXaKyn8J.js +0 -2
- package/dist-web/assets/index-BzH9cnfy.js +0 -1
- package/dist-web/assets/index-D-qNxFxp.js +0 -173
- package/dist-web/assets/index-D494nYee.js +0 -64
- package/dist-web/assets/index-DJ8kB4US.js +0 -2
- package/dist-web/assets/index-DNMWR2Vj.js +0 -1
- package/dist-web/assets/index-DSPls1YV.js +0 -1
- package/dist-web/assets/index-DcAqhCpS.js +0 -1
- package/dist-web/assets/index-DnkaYOFI.js +0 -1
- package/dist-web/assets/index-_UKteDZB.js +0 -25
- package/dist-web/assets/index-gi0wgh0M.css +0 -1
- package/dist-web/assets/index-w_1EjXiF.js +0 -1
- package/dist-web/assets/people-page-header-YGQM9G53.js +0 -1
- package/dist-web/assets/types-CZnACqaB.js +0 -1
- package/dist-web/assets/vendor-nuxt-ui-DmkGVKod.js +0 -15
- package/dist-web/assets/vendor-reka-ui-BkhadcDj.js +0 -15
- package/dist-web/assets/web-zXxtk2KZ.js +0 -1
- /package/dist/{chat-command-ZIXKNLSE.mjs.map → chat-command-IHRNO7J4.mjs.map} +0 -0
- /package/dist/{chunk-3J7WTUEE.mjs.map → chunk-4V6UP7EW.mjs.map} +0 -0
- /package/dist/{chunk-FDLLEDNW.mjs.map → chunk-HGV4MUIW.mjs.map} +0 -0
- /package/dist/{chunk-DV4U34MR.mjs.map → chunk-NHTOSDYI.mjs.map} +0 -0
- /package/dist/{chunk-EINCXXWY.mjs.map → chunk-RHA534GU.mjs.map} +0 -0
- /package/dist/{chunk-23AIEWCD.mjs.map → chunk-S7YPBKQ3.mjs.map} +0 -0
- /package/dist/{chunk-BLOBEOCG.mjs.map → chunk-U4F6BNGZ.mjs.map} +0 -0
- /package/dist/{http-WDG2OHOV.mjs.map → http-Y2WC2UK4.mjs.map} +0 -0
- /package/dist/{import-4BDC37F7.mjs.map → import-4HF2UNQI.mjs.map} +0 -0
- /package/dist/{mcp-4KUVRGFF.mjs.map → mcp-DJPDRFTW.mjs.map} +0 -0
- /package/dist/{src-ZOCLFBCJ.mjs.map → src-R7MZLKXQ.mjs.map} +0 -0
- /package/dist/{stream-import-ERTT7U6V.mjs.map → stream-import-DX57ANUL.mjs.map} +0 -0
- /package/dist/{worker-runtime-2TUZHV7W.mjs.map → worker-runtime-QMN7OKOZ.mjs.map} +0 -0
- /package/{dist-web → dist-cli-web}/assets/ActionToolsPanel-Dp-ojXjO.css +0 -0
- /package/{dist-web → dist-cli-web}/assets/PageHeader-XIXMTomn.css +0 -0
- /package/{dist-web → dist-cli-web}/assets/RelationshipGalaxyThreeCanvas-BluPHjCR.css +0 -0
- /package/{dist-web → dist-cli-web}/assets/index-BfO_LpDv.css +0 -0
- /package/{dist-web → dist-cli-web}/assets/index-ByUaiVQK.css +0 -0
- /package/{dist-web → dist-cli-web}/assets/index-ZsZwPLWy.css +0 -0
- /package/{dist-web → dist-cli-web}/assets/logo-DXIuG_WE.svg +0 -0
- /package/{dist-web → dist-cli-web}/assets/relationship-galaxy-viewport-Cwfa51ER.js +0 -0
- /package/{dist-web → dist-cli-web}/assets/vendor-echarts-B-i_56Av.js +0 -0
- /package/{dist-web → dist-cli-web}/assets/vendor-echarts-wordcloud-Ca8n6qS6.js +0 -0
- /package/{dist-web → dist-cli-web}/assets/vendor-snapdom--nZvo8Sg.js +0 -0
- /package/{dist-web → dist-cli-web}/assets/vendor-zrender-5DcYjSZk.js +0 -0
- /package/{dist-web → dist-cli-web}/favicon.ico +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.fade-enter-active[data-v-
|
|
1
|
+
.fade-enter-active[data-v-b5e97ca6],.fade-leave-active[data-v-b5e97ca6]{transition:opacity .15s ease}.fade-enter-from[data-v-b5e97ca6],.fade-leave-to[data-v-b5e97ca6]{opacity:0}.fade-enter-active[data-v-ddbcce42],.fade-leave-active[data-v-ddbcce42]{transition:opacity .15s ease}.fade-enter-from[data-v-ddbcce42],.fade-leave-to[data-v-ddbcce42]{opacity:0}.fade-enter-active[data-v-d8d145dc],.fade-leave-active[data-v-d8d145dc]{transition:opacity .15s ease}.fade-enter-from[data-v-d8d145dc],.fade-leave-to[data-v-d8d145dc]{opacity:0}.tab-slide-enter-active[data-v-d9741d3c],.tab-slide-leave-active[data-v-d9741d3c]{transition:opacity .2s ease,transform .2s ease}.tab-slide-enter-from[data-v-d9741d3c]{opacity:0;transform:translateY(10px)}.tab-slide-leave-to[data-v-d9741d3c]{opacity:0;transform:translateY(-10px)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.language-select-modal[data-v-6045af6c],.agreement-modal[data-v-f8f9103f]{-webkit-app-region:no-drag}.agreement-content[data-v-f8f9103f]{font-size:.875rem;line-height:1.6;color:var(--color-gray-600)}:root.dark .agreement-content[data-v-f8f9103f]{color:var(--color-gray-300)}.agreement-content[data-v-f8f9103f] h2{font-size:.95rem;font-weight:600;color:var(--color-gray-900);margin-top:1.25rem;margin-bottom:.5rem;padding-bottom:.25rem;border-bottom:1px solid var(--color-gray-200)}:root.dark .agreement-content[data-v-f8f9103f] h2{color:var(--color-gray-100);border-bottom-color:var(--color-gray-700)}.agreement-content[data-v-f8f9103f] h2:first-child{margin-top:0}.agreement-content[data-v-f8f9103f] ul{margin:.5rem 0;padding-left:1.25rem;list-style:none}.agreement-content[data-v-f8f9103f] li{position:relative;margin-bottom:.375rem;padding-left:.5rem}.agreement-content[data-v-f8f9103f] li:before{content:"•";position:absolute;left:-.75rem;color:var(--color-pink-500);font-weight:700}.agreement-content[data-v-f8f9103f] strong{font-weight:600;color:var(--color-gray-800)}:root.dark .agreement-content[data-v-f8f9103f] strong{color:var(--color-gray-200)}.agreement-content[data-v-f8f9103f] p{margin:.5rem 0}.agreement-content[data-v-f8f9103f] a{color:var(--color-pink-500);text-decoration:none}.agreement-content[data-v-f8f9103f] a:hover{text-decoration:underline}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a,A as n,c as o,f as e,g as c,t as r,G as i,o as m,_}from"./index-7jm3YI9u.js";import"./vendor-snapdom--nZvo8Sg.js";const p={class:"flex min-h-0 flex-1 items-center justify-center px-6 py-12"},l={class:"text-center text-sm text-gray-500 dark:text-gray-400"},h=a({__name:"index",setup(d){const{t}=n();return(x,f)=>{const s=_;return m(),o("main",p,[e("div",l,[c(s,{name:"i-lucide-git-compare-arrows",class:"mx-auto mb-3 h-8 w-8 text-pink-500"}),e("p",null,r(i(t)("insight.reserved")),1)])])}}});export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as v,A as _,c as b,g as t,F as n,G as e,o as l,Q as y,R as k,E as c,S as x,U as w,V as S,W as V,a as u,X as R,Y as C}from"./index-7jm3YI9u.js";import{P as I}from"./PageHeader-B3-W9mvh.js";import{_ as B}from"./TimeSelect.vue_vue_type_script_setup_true_lang-BtUvMehe.js";import{p as A}from"./annual-summary-time-range-BHClzNvd.js";import"./vendor-snapdom--nZvo8Sg.js";import"./dateFormat-Cf2xuaE-.js";const E={class:"flex h-full flex-col text-gray-900 dark:bg-page-dark dark:text-gray-100",style:{"padding-top":"var(--titlebar-area-height)"}},P=v({__name:"index",setup(T){const{t:a}=_(),r=R(),d=A(),{modelValue:i,componentKey:g,initialState:p,rangeSource:h}=d,s=u(()=>r.name==="insight-time-investment"?"time-investment":r.name==="insight-relationship-changes"?"relationship-changes":"annual-summary"),f=u(()=>[{id:"annual-summary",label:a("insight.tabs.annualSummary"),icon:"i-lucide-calendar-range",to:{name:"insight-annual-summary"}},{id:"time-investment",label:a("insight.tabs.timeInvestment"),icon:"i-lucide-clock-3",to:{name:"insight-time-investment"}},{id:"relationship-changes",label:a("insight.tabs.relationshipChanges"),icon:"i-lucide-git-compare-arrows",to:{name:"insight-relationship-changes"}}]);return(U,m)=>(l(),b("div",E,[t(I,{title:e(a)("insight.title"),icon:"i-heroicons-presentation-chart-bar","icon-class":"bg-pink-600 text-white dark:bg-pink-500 dark:text-white",size:"compact"},{default:n(()=>[t(e(y),{class:"mt-3 pb-1.5","model-value":s.value,items:f.value,"aria-label":e(a)("insight.tabs.nav")},k({_:2},[s.value==="annual-summary"?{name:"right",fn:n(()=>[(l(),c(B,{key:e(g),modelValue:e(i),"onUpdate:modelValue":m[0]||(m[0]=o=>x(i)?i.value=o:null),"range-source":e(h),"allowed-modes":["recent","year"],"allowed-recent-days":[365],"initial-state":e(p)},null,8,["modelValue","range-source","initial-state"]))]),key:"0"}:void 0]),1032,["model-value","items","aria-label"])]),_:1},8,["title"]),t(e(V),null,{default:n(({Component:o})=>[t(w,{name:"insight-tab-slide",mode:"out-in"},{default:n(()=>[(l(),c(S(o),{key:s.value}))]),_:2},1024)]),_:1})]))}}),K=C(P,[["__scopeId","data-v-a94720f4"]]);export{K as default};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MessageExportModal-CFbovWh1.js","assets/index-7jm3YI9u.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-qsbWn8VP.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{b as S,C as $e,O as Ae,d as U,o,c as T,n as K,f as s,Z as q,$ as X,t as g,r as oe,a0 as nt,E as C,K as lt,P as ve,a as y,aA as it,w as z,i as rt,G as e,F as I,g as x,A as Z,h as A,J as Ce,H as pe,I as Y,_ as he,aT as Oe,aU as We,M as Q,T as ie,aV as ut,an as De,aI as ct,aj as Ke,ay as Ue,U as Te,Y as Ie,B as Fe,aW as dt,aX as mt,aY as je,ar as qe,al as ze,aZ as vt,R as pt,p as ht,a_ as gt,a4 as ft,aB as yt,ap as bt,S as He,aC as xt,X as kt,am as wt,au as _t,av as $t}from"./index-7jm3YI9u.js";import{c as E,b as Ct,d as Ee,e as Tt,u as It,a as le,f as Ge,g as St,h as Vt,i as Rt,j as Mt,k as Lt,l as Dt,m as Nt,n as At,C as Ut,o as Ft,L as Bt,D as qt,M as zt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang-hwRVh048.js";import{a as te,g as Ht,_ as Et}from"./base-DBJ95yXf.js";import"./vendor-echarts-wordcloud-Ca8n6qS6.js";import{u as Ye,y as Pt,j as Xe,s as Ot,i as Ze,k as Je,p as Wt,t as Kt,v as jt}from"./vendor-echarts-B-i_56Av.js";import{_ as ae}from"./LoadingState.vue_vue_type_script_setup_true_lang-DK2z0Jrh.js";import{a as Gt}from"./index-Bf3gFaid.js";import{_ as Yt}from"./ThemeCard.vue_vue_type_script_setup_true_lang-sNw3hP4c.js";import{a as Ne,b as Xt,c as Zt}from"./dateFormat-Cf2xuaE-.js";import"./vendor-snapdom--nZvo8Sg.js";import"./TimeSelect.vue_vue_type_script_setup_true_lang-BtUvMehe.js";import"./PageHeader-B3-W9mvh.js";import"./vendor-zrender-5DcYjSZk.js";function Jt(l,t={}){const{threshold:a=300,containerSelector:n=".overflow-y-auto",scrollLockDuration:r=800}=t,c=S(l[0]?.id||"");let d=!1;const v=S(null);let m=null;function _(){if(d)return;const u=[];l.forEach(p=>{const $=document.getElementById(p.id);if($){const h=$.getBoundingClientRect();u.push({id:p.id,top:Math.round(h.top)})}});let i=0;for(let p=0;p<u.length;p++){if(u[p].top>a){i=Math.max(0,p-1);break}i=p}c.value=l[i]?.id||""}function f(u){const i=document.getElementById(u);i&&(c.value=u,d=!0,i.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{d=!1,_()},r))}return $e(()=>{m=v.value?.closest(n)||null,m&&(m.addEventListener("scroll",_,{passive:!0}),_())}),Ae(()=>{m&&m.removeEventListener("scroll",_)}),{contentRef:v,activeAnchor:c,scrollToAnchor:f,updateActiveAnchor:_}}function xe(l){return l===0?"text-amber-500 dark:text-amber-400":l===1?"text-gray-500 dark:text-gray-300":l===2?"text-orange-600 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}function ke(l){return String(l+1).padStart(2,"0")}function Qt(l){return l===0?"from-amber-400 to-orange-500":l===1?"from-gray-300 to-gray-400":l===2?"from-orange-400 to-amber-600":"from-primary-300 to-primary-500"}const ea={class:"sticky top-24 space-y-6"},ta={class:"border-l border-gray-200 dark:border-gray-800"},aa=["onClick"],sa=U({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(l,{emit:t}){const a=t;function n(r){a("click",r)}return(r,c)=>(o(),T("div",{class:K([l.width,"shrink-0",l.hideOnMobile?"hidden lg:block":""])},[s("div",ea,[s("nav",null,[s("div",ta,[(o(!0),T(q,null,X(l.anchors,d=>(o(),T("button",{key:d.id,class:K(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[l.activeAnchor===d.id?"border-pink-500 font-medium text-pink-600 dark:text-pink-400":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"]]),onClick:v=>n(d.id)},g(d.label),11,aa))),128))])]),oe(r.$slots,"default")])],2))}}),re=U({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(l){const t=nt(l,"modelValue"),a=[{label:"Top 5",value:5},{label:"Top 10",value:10},{label:"Top 20",value:20},{label:"Top 30",value:30},{label:"Top 50",value:50},{label:"Top 100",value:100}];return(n,r)=>{const c=lt;return o(),C(c,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=d=>t.value=d),items:a,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),ge=U({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(l){const t=l,a=y(()=>typeof window>"u"?500:Math.round(window.innerHeight*t.maxHeightVh/100)),n=y(()=>t.contentHeight>a.value),r=y(()=>({maxHeight:`${t.maxHeightVh}vh`,overflowY:n.value?"auto":"hidden"}));return(c,d)=>(o(),T("div",{class:K(l.paddingClass),style:ve(r.value)},[oe(c.$slots,"default")],6))}}),oa=U({__name:"EChartGraph",props:{data:{},height:{default:400},layout:{default:"circular"},directed:{type:Boolean,default:!1}},setup(l,{expose:t}){Ye([Pt,Xe,Ot,Ze]);const a=l,n=y(()=>typeof a.height=="number"?`${a.height}px`:a.height),r=it(),c=S(null);let d=null;const v=["#ee4567","#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#9a60b4","#fc8452","#3ba272","#ea7ccc","#6e7074","#546570"],m=y(()=>{const b=new Set;return a.data.nodes.filter(k=>b.has(k.name)?!1:(b.add(k.name),!0))}),_=y(()=>{const b=new Map;return m.value.forEach((k,w)=>{b.set(k.name,v[w%v.length])}),b});function f(b,k){return k<=0?1:1+b/k*5}const u=y(()=>{const b=a.data.maxLinkValue||Math.max(...a.data.links.map(k=>k.value||1),1);return{tooltip:{trigger:"item",backgroundColor:r.value?"rgba(30, 30, 30, 0.9)":"rgba(255, 255, 255, 0.95)",borderColor:r.value?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.1)",textStyle:{color:r.value?"#e5e7eb":"#374151"},formatter:k=>k.dataType==="node"?`<b>${k.data.name}</b><br/>消息数: ${k.data.value||0}`:k.dataType==="edge"?`${k.data.source} → ${k.data.target}<br/>艾特次数: ${k.data.value||0}`:""},animationDuration:1e3,animationDurationUpdate:500,animationEasingUpdate:"quinticInOut",series:[{type:"graph",layout:a.layout,circular:a.layout==="circular"?{rotateLabel:!0}:void 0,force:a.layout==="force"?{repulsion:300,gravity:.1,edgeLength:[80,200],friction:.6}:void 0,roam:!0,scaleLimit:{min:.3,max:3},draggable:!0,label:{show:!0,position:"right",formatter:"{b}",color:r.value?"#e5e7eb":"#374151",fontSize:11,fontWeight:500},edgeSymbol:a.directed?["none","arrow"]:["none","none"],edgeSymbolSize:a.directed?[0,10]:[0,0],lineStyle:{curveness:.3,opacity:.5},emphasis:{focus:"adjacency",label:{show:!0,fontSize:13,fontWeight:600},lineStyle:{width:4,opacity:.9},itemStyle:{shadowBlur:15,shadowColor:"rgba(0, 0, 0, 0.3)"}},data:m.value.map(k=>{const w=_.value.get(k.name)||v[0];return{name:k.name,value:k.value,symbolSize:k.symbolSize||30,label:{show:a.layout==="circular"?!0:(k.symbolSize||30)>30},itemStyle:{color:w,borderColor:"#fff",borderWidth:2,shadowBlur:5,shadowColor:`${w}66`}}}),links:a.data.links.filter(k=>_.value.has(k.source)&&_.value.has(k.target)).map(k=>{const w=_.value.get(k.source)||v[0];return{source:k.source,target:k.target,value:k.value,lineStyle:{color:w,width:f(k.value||1,b)}}})}]}});function i(){c.value&&(d=Je(c.value,r.value?"dark":void 0,{renderer:"canvas"}),d.setOption({backgroundColor:"transparent",...u.value}))}function p(){d&&d.setOption({backgroundColor:"transparent",...u.value},{notMerge:!0})}function $(){d?.resize()}function h(){d&&d.dispatchAction({type:"restore"})}return t({resetView:h}),z([()=>a.data,()=>a.layout,()=>a.directed,r],()=>{d?p():i()},{deep:!0}),$e(()=>{i(),window.addEventListener("resize",$)}),Ae(()=>{window.removeEventListener("resize",$),d?.dispose()}),(b,k)=>(o(),T("div",{ref_key:"chartRef",ref:c,style:ve({height:n.value,width:"100%"})},null,4))}}),Qe=Symbol("ranking-width-mode"),et={standard:{contentClass:"max-w-3xl",gridLeft:110,labelMaxLength:8},wide:{contentClass:"max-w-5xl",gridLeft:180,labelMaxLength:16},full:{contentClass:"max-w-none",gridLeft:260,labelMaxLength:28}};function fe(){const l=rt(Qe,null);return y(()=>et[l?.value??"standard"])}function ye(l,t){return l.length<=t?l:`${l.slice(0,t)}…`}const na={class:"px-3 py-2"},Se=U({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=fe(),n=y(()=>t.members.slice(0,t.topN)),r=y(()=>{if(t.height!=="auto")return t.height;const v=n.value.length*36;return Math.max(v+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},d=y(()=>{const v=[...n.value].reverse(),m=v.map(i=>ye(i.name,a.value.labelMaxLength)),_=v.map(i=>i.value),f=Math.max(..._,1),u=v.map(i=>({value:i.value,itemStyle:{color:c,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:i=>{const p=i[0];if(!p)return"";const $=n.value.length-1-p.dataIndex,h=n.value[$];return`
|
|
3
|
+
<div style="padding: 4px 8px;">
|
|
4
|
+
<div style="font-weight: bold; margin-bottom: 4px;">${h.name}</div>
|
|
5
|
+
<div>${h.value} ${t.unit} (${h.percentage}%)</div>
|
|
6
|
+
</div>
|
|
7
|
+
`}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:f*1.1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(i,p)=>{const h=n.value.length-1-p+1;return`${h===1?"🥇":h===2?"🥈":h===3?"🥉":`${h}.`} ${i}`}}},series:[{type:"bar",data:u,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const p=n.value.length-1-i.dataIndex;return`${n.value[p].value} ${t.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(v,m)=>l.bare?(o(),C(e(ge),{key:0,"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:I(()=>[x(te,{option:d.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:I(()=>[s("div",na,[x(te,{option:d.value,height:r.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),la={key:0,class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-sm font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},ia={class:"min-w-0 flex-1"},ra={class:"flex items-baseline justify-between gap-3"},ua=["title"],ca={class:"flex shrink-0 items-baseline gap-1.5 whitespace-nowrap"},da={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},ma={class:"text-xs text-gray-500 dark:text-gray-400"},va={class:"mt-2 flex items-center gap-2.5"},pa={class:"h-1.5 flex-1 overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},ha={class:"w-10 shrink-0 text-right font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},Pe=U({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(l){const{t}=Z(),a=l,n=y(()=>a.unit||t("views.charts.rankList.unit")),r=y(()=>a.rankLimit>0?a.members.slice(0,a.rankLimit):a.members);function c(d){if(r.value.length===0)return 0;const v=r.value[0].value;return v===0?0:Math.round(r.value[d].value/v*100)}return(d,v)=>(o(),T("div",null,[(o(!0),T(q,null,X(r.value,(m,_)=>(o(),T("div",{key:m.id,class:"flex items-start gap-3 px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[s("span",{class:K(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",e(xe)(_)])},g(e(ke)(_)),3),l.showAvatar?(o(),T("div",la,g(m.name.slice(0,1)),1)):A("",!0),s("div",ia,[s("div",ra,[s("p",{class:"truncate text-sm font-medium text-gray-900 dark:text-white",title:m.name},g(m.name),9,ua),s("div",ca,[s("span",da,g(m.value),1),s("span",ma,g(n.value),1)])]),s("div",va,[s("div",pa,[s("div",{class:K(["h-full rounded-full bg-linear-to-r transition-all",e(Qt)(_)]),style:ve({width:`${c(_)}%`})},null,6)]),s("span",ha,g(m.percentage)+"% ",1)])])]))),128))]))}}),ga={class:"flex items-center gap-2"},fa={class:"shrink-0 whitespace-nowrap rounded-full bg-gray-100 px-2.5 py-1 text-[11px] font-medium text-gray-500 dark:bg-white/5 dark:text-gray-400"},ya={class:"no-capture"},ba={key:0,class:"no-capture px-3 pb-3 pt-1"},xa={class:"flex items-center gap-1.5"},ka={class:"flex w-full items-center justify-between border-b border-gray-100 px-6 py-5 dark:border-white/5"},wa={class:"min-w-0"},_a={class:"truncate text-base font-semibold text-gray-900 dark:text-white"},$a={class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},Ca={class:"max-h-[70vh] overflow-y-auto"},tt=U({__name:"ExpandableListCard",props:{title:{},description:{},showViewAll:{type:Boolean},viewAllLabel:{},countLabel:{}},setup(l){const t=S(!1),a=S(null);return(n,r)=>{const c=he,d=pe,v=Ce;return o(),C(e(E),{title:l.title,description:l.description,"show-divider":!1},{headerRight:I(()=>[s("div",ga,[s("span",fa,g(l.countLabel),1),s("div",ya,[oe(n.$slots,"headerRight")])])]),default:I(()=>[s("div",null,[oe(n.$slots,"default")]),l.showViewAll?(o(),T("div",ba,[x(v,{open:t.value,"onUpdate:open":r[0]||(r[0]=m=>t.value=m),ui:{content:"md:w-full max-w-4xl"}},{content:I(()=>[s("div",{ref_key:"modalBodyRef",ref:a,class:"section-content flex flex-col overflow-hidden"},[s("div",ka,[s("div",wa,[s("h3",_a,g(l.title),1),s("p",$a,g(l.countLabel),1)]),x(Gt,{size:"xs",type:"element","target-element":a.value},null,8,["target-element"])]),s("div",Ca,[oe(n.$slots,"full")])],512)]),default:I(()=>[x(d,{color:"neutral",variant:"ghost",class:"w-full justify-center rounded-lg py-2.5 text-xs font-medium text-gray-500 dark:text-gray-400"},{default:I(()=>[s("span",xa,[Y(g(l.viewAllLabel)+" ",1),x(c,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5"})])]),_:1})]),_:3},8,["open"])])):A("",!0)]),_:3},8,["title","description"])}}}),Ta=U({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(l){const{t}=Z(),a=l,n=y(()=>a.members.slice(0,a.topN)),r=y(()=>a.members.length>a.topN);return(c,d)=>(o(),C(tt,{title:l.title,description:l.description,"show-view-all":r.value,"view-all-label":e(t)("views.charts.rankListPro.fullRanking"),"count-label":e(t)("views.charts.rankListPro.memberCount",{count:l.members.length})},{headerRight:I(()=>[oe(c.$slots,"headerRight")]),full:I(()=>[x(Pe,{members:l.members,unit:l.unit},null,8,["members","unit"])]),default:I(()=>[x(Pe,{members:n.value,unit:l.unit},null,8,["members","unit"])]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),Ia={key:0},Sa={class:"px-5 py-8 text-center text-sm text-gray-400"},_e=U({__name:"ListPro",props:{items:{},title:{},description:{},topN:{default:10},countLabel:{}},setup(l){const{t}=Z(),a=l,n=y(()=>a.items.slice(0,a.topN)),r=y(()=>a.items.length>a.topN),c=y(()=>a.countLabel?a.countLabel:t("views.charts.listPro.countTemplate",{count:a.items.length}));return(d,v)=>(o(),C(tt,{title:l.title,description:l.description,"show-view-all":r.value,"view-all-label":e(t)("views.charts.listPro.fullRanking"),"count-label":c.value},{headerRight:I(()=>[oe(d.$slots,"headerRight")]),full:I(()=>[s("div",null,[(o(!0),T(q,null,X(l.items,(m,_)=>(o(),T("div",{key:_,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[oe(d.$slots,"item",{item:m,index:_})]))),128))])]),default:I(()=>[oe(d.$slots,"config"),s("div",null,[(o(!0),T(q,null,X(n.value,(m,_)=>(o(),T("div",{key:_,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[oe(d.$slots,"item",{item:m,index:_})]))),128))]),l.items.length===0?(o(),T("div",Ia,[oe(d.$slots,"empty",{},()=>[s("div",Sa,g(e(t)("views.charts.listPro.empty")),1)])])):A("",!0)]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),Va={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},Ra={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},Ma={class:"p-3 sm:p-5"},La={class:"p-3 sm:p-5"},Da=U({__name:"OverviewTab",props:{session:{},memberActivity:{},topMembers:{},bottomMembers:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(l){const{t}=Z(),a=l,{dailyChartData:n}=It(()=>a.dailyActivity),r=y(()=>({labels:a.messageTypes.map(d=>Ht(d.type,t)),values:a.messageTypes.map(d=>d.count)})),c=y(()=>{const d=[...a.memberActivity].sort((u,i)=>i.messageCount-u.messageCount),v=d.slice(0,10),m=d.slice(10).reduce((u,i)=>u+i.messageCount,0),_=v.map(u=>u.name),f=v.map(u=>u.messageCount);return m>0&&(_.push(t("analysis.overview.others")),f.push(m)),{labels:_,values:f}});return(d,v)=>(o(),T("div",Va,[x(Ct,{session:l.session,"daily-activity":l.dailyActivity,"message-types":l.messageTypes,"hourly-activity":l.hourlyActivity,"time-range":l.timeRange,"filtered-message-count":l.filteredMessageCount,"filtered-member-count":l.filteredMemberCount,"time-filter":l.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),s("div",Ra,[x(e(E),{title:e(t)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:I(()=>[s("div",Ma,[x(e(Ee),{data:r.value,height:280},null,8,["data"])])]),_:1},8,["title"]),x(e(E),{title:e(t)("analysis.overview.memberDistribution"),"show-divider":!1},{default:I(()=>[s("div",La,[x(e(Ee),{data:c.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),x(Tt,{"daily-activity":l.dailyActivity,"daily-chart-data":e(n)},null,8,["daily-activity","daily-chart-data"])]))}}),Na={class:"flex h-full flex-col"},Aa={class:"flex flex-wrap items-center justify-end px-3 py-2 sm:px-4"},Ua={class:"flex flex-wrap items-center justify-end gap-2 sm:gap-4"},Fa={class:"flex items-center gap-2"},Ba={class:"text-xs text-gray-400"},qa={class:"flex items-center gap-2"},za={class:"text-xs text-gray-400"},Ha={class:"flex-1 min-h-0 relative"},Ea={key:0,class:"absolute inset-0 flex items-center justify-center"},Pa={key:0,class:"h-full"},Oa={class:"absolute bottom-2 left-1/2 -translate-x-1/2 rounded-full bg-gray-100/80 px-3 py-1 text-xs text-gray-500 backdrop-blur-sm dark:bg-gray-800/80 dark:text-gray-400"},Wa={key:1,class:"flex h-full items-center justify-center text-gray-400"},Ka={class:"text-center"},ja={class:"mt-2 text-sm"},Ga=U({__name:"InteractionView",props:{sessionId:{},timeFilter:{}},setup(l){const t=l,{t:a}=Z(),n=S(!0),r=S({nodes:[],links:[],maxLinkValue:0}),c=S("circular"),d=S(!1),v=S(null);function m(){v.value?.resetView()}async function _(){if(t.sessionId){n.value=!0;try{const f=await Q().getMentionGraph(t.sessionId,t.timeFilter);r.value={nodes:f.nodes,links:f.links,maxLinkValue:f.maxLinkValue}}catch(f){console.error("[chart-interaction] 加载互动关系图数据失败:",f)}finally{n.value=!1}}}return z(()=>[t.sessionId,t.timeFilter],()=>{_()},{immediate:!0,deep:!0}),(f,u)=>{const i=pe,p=Oe("UButtonGroup"),$=We,h=he;return o(),T("div",Na,[s("div",Aa,[s("div",Ua,[s("div",Fa,[s("span",Ba,g(e(a)("views.interaction.layout"))+":",1),x(p,{size:"xs"},{default:I(()=>[x(i,{color:c.value==="circular"?"primary":"neutral",variant:c.value==="circular"?"solid":"ghost",onClick:u[0]||(u[0]=b=>c.value="circular")},{default:I(()=>[Y(g(e(a)("views.interaction.circular")),1)]),_:1},8,["color","variant"]),x(i,{color:c.value==="force"?"primary":"neutral",variant:c.value==="force"?"solid":"ghost",onClick:u[1]||(u[1]=b=>c.value="force")},{default:I(()=>[Y(g(e(a)("views.interaction.force")),1)]),_:1},8,["color","variant"])]),_:1})]),s("div",qa,[s("span",za,g(e(a)("views.interaction.directed"))+":",1),x($,{modelValue:d.value,"onUpdate:modelValue":u[2]||(u[2]=b=>d.value=b),size:"xs"},null,8,["modelValue"])]),x(i,{size:"xs",color:"neutral",variant:"ghost",icon:"i-heroicons-arrow-path",onClick:m},{default:I(()=>[Y(g(e(a)("views.interaction.reset")),1)]),_:1})])]),s("div",Ha,[n.value?(o(),T("div",Ea,[x(h,{name:"i-heroicons-arrow-path",class:"h-8 w-8 animate-spin text-pink-500"})])):(o(),T(q,{key:1},[r.value.nodes.length>0?(o(),T("div",Pa,[x(e(oa),{ref_key:"graphRef",ref:v,data:r.value,layout:c.value,directed:d.value,height:"100%"},null,8,["data","layout","directed"]),s("div",Oa,g(e(a)("views.interaction.graphHint",{nodes:r.value.nodes.length,links:r.value.links.length})),1)])):(o(),T("div",Wa,[s("div",Ka,[x(h,{name:"i-heroicons-user-group",class:"mx-auto h-10 w-10 text-gray-300 dark:text-gray-600"}),s("p",ja,g(e(a)("views.interaction.noInteraction")),1)])]))],64))])])}}}),Ya={class:"main-content mx-auto max-w-3xl p-4 sm:p-6"},Xa=U({__name:"MentionRankingView",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Z(),a=l,n=S(null),r=S(!1);async function c(){if(a.sessionId){r.value=!0;try{n.value=await Q().getMentionAnalysis(a.sessionId,a.timeFilter)}catch(i){console.error("加载 @ 互动分析失败:",i)}finally{r.value=!1}}}const d=y(()=>n.value?n.value.topMentioners.map(i=>({id:i.memberId.toString(),name:i.name,value:i.count,percentage:i.percentage})):[]),v=y(()=>n.value?n.value.topMentioned.map(i=>({id:i.memberId.toString(),name:i.name,value:i.count,percentage:i.percentage})):[]),m=S("mentioners"),_=y(()=>[{label:t("members.relationships.rankModes.mentioners"),value:"mentioners"},{label:t("members.relationships.rankModes.mentioned"),value:"mentioned"}]),f=y(()=>m.value==="mentioners"?d.value:v.value),u=y(()=>m.value==="mentioners"?t("members.relationships.topMentionersDescription"):t("members.relationships.topMentionedDescription"));return z(()=>[a.sessionId,a.timeFilter],()=>{c()},{immediate:!0,deep:!0}),(i,p)=>(o(),T("div",Ya,[r.value?(o(),C(e(ae),{key:0,text:e(t)("members.relationships.loading")},null,8,["text"])):n.value&&n.value.totalMentions>0&&f.value.length>0?(o(),C(e(Ta),{key:1,members:f.value,title:e(t)("members.relationships.rankingTitle"),description:u.value,unit:e(t)("members.relationships.times")},{headerRight:I(()=>[x(e(ie),{modelValue:m.value,"onUpdate:modelValue":p[0]||(p[0]=$=>m.value=$),items:_.value,size:"sm"},null,8,["modelValue","items"])]),_:1},8,["members","title","description","unit"])):(o(),C(e(E),{key:2,title:e(t)("members.relationships.emptyTitle")},{default:I(()=>[x(e(le),{text:e(t)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"]))]))}}),Za={class:"mx-auto h-full max-w-[920px] p-2 sm:p-4"},Ja={class:"flex flex-wrap items-center justify-between gap-2 border-b border-gray-200 bg-gray-50 px-3 py-3 dark:border-gray-700 dark:bg-page-dark/50 sm:px-4"},Qa={class:"flex items-center gap-3"},es={class:"flex items-center gap-3"},ts={class:"p-3 w-64"},as={class:"text-sm font-medium mb-3"},ss={class:"space-y-3"},os={class:"text-xs text-gray-500 mb-1 block"},ns={class:"text-xs text-gray-400 mt-1"},ls={class:"text-xs text-gray-500 mb-1 block"},is={class:"text-xs text-gray-400 mt-1"},rs={class:"flex-1 min-h-0 overflow-hidden"},us={key:0,class:"h-full flex items-center justify-center"},cs={key:1,class:"h-full flex items-center justify-center"},ds={class:"text-center text-gray-400"},ms={key:2,class:"h-full"},vs={key:3,class:"h-full flex overflow-hidden"},ps={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},hs={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},gs={class:"text-sm font-medium flex items-center gap-2"},fs={class:"flex-1 overflow-y-auto"},ys=["onClick"],bs={class:"flex items-center justify-between"},xs={class:"text-sm truncate"},ks={class:"text-xs text-gray-400"},ws={class:"flex-1 overflow-hidden flex flex-col"},_s={key:0,class:"flex-1 flex items-center justify-center"},$s={class:"text-center text-gray-400"},Cs={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},Ts={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},Is={class:"font-medium"},Ss={class:"text-xs text-gray-400"},Vs={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Rs={class:"text-sm font-medium flex items-center gap-2"},Ms={class:"flex-1 overflow-y-auto"},Ls={key:0,class:"p-4 text-center text-gray-400"},Ds={class:"flex items-center gap-3"},Ns={class:"flex-1 min-w-0"},As={class:"text-sm font-medium truncate"},Us={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},Fs={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Bs={key:4,class:"h-full flex flex-col overflow-hidden"},qs={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},zs={class:"text-sm font-medium flex items-center gap-2"},Hs={class:"flex-1 overflow-y-auto"},Es={class:"flex items-center gap-3"},Ps={class:"flex-1 min-w-0"},Os={class:"flex items-center gap-2 text-sm"},Ws={class:"font-medium truncate"},Ks={class:"font-medium truncate"},js={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},Gs={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Ys={key:0,class:"px-4 py-2 border-t border-gray-200 dark:border-gray-700 text-xs text-gray-400 flex items-center gap-4 bg-gray-50 dark:bg-page-dark/50"},Xs=U({__name:"ClusterView",props:{sessionId:{},timeFilter:{}},setup(l){Ye([Wt,Xe,Kt,jt,Ze]);const t=l,{t:a}=Z(),n=ut(),r=y(()=>n.value==="dark"),c=S(!0),d=S(null),v=S("matrix"),m=S(null),_=S({lookAhead:3,decaySeconds:120,topEdges:150}),f=S(null);let u=null;async function i(){if(t.sessionId){c.value=!0;try{d.value=await Q().getClusterGraph(t.sessionId,t.timeFilter,{lookAhead:_.value.lookAhead,decaySeconds:_.value.decaySeconds,topEdges:_.value.topEdges})}catch(F){console.error("[chart-cluster] 加载小团体关系数据失败:",F),d.value=null}finally{c.value=!1}}}const p=y(()=>{if(!d.value||d.value.nodes.length===0)return null;const{nodes:F,links:B,maxLinkValue:H}=d.value,G=[...F].sort((L,W)=>W.messageCount-L.messageCount).slice(0,20).map(L=>L.name),ee=new Map;for(const L of B)ee.set(`${L.source}-${L.target}`,L.value),ee.set(`${L.target}-${L.source}`,L.value);const j=[];for(let L=0;L<G.length;L++)for(let W=0;W<G.length;W++)if(L===W)j.push([L,W,-1]);else{const de=ee.get(`${G[L]}-${G[W]}`)||0;j.push([L,W,de])}return{names:G,data:j,maxValue:H}});function $(){if(!p.value)return{graphic:{type:"text",style:{text:a("views.cluster.noData"),fill:"#999"}}};const{names:F,data:B,maxValue:H}=p.value;return{tooltip:{position:"top",formatter:se=>{const[G,ee,j]=se.data;return j<0?`${F[G]}`:j===0?`${F[G]} ↔ ${F[ee]}<br/>暂无关系数据`:`${F[G]} ↔ ${F[ee]}<br/>临近度: ${j.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:F,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:r.value?"#ccc":"#333"}},yAxis:{type:"category",data:F,splitArea:{show:!0},axisLabel:{fontSize:10,color:r.value?"#ccc":"#333"}},visualMap:{min:0,max:H||1,calculable:!0,orient:"horizontal",left:"center",bottom:10,inRange:{color:r.value?["#1a1a2e","#16213e","#0f3460","#e94560"]:["#f7f7f7","#fce4ec","#f8bbd9","#ee4567"]},textStyle:{color:r.value?"#ccc":"#333"}},series:[{type:"heatmap",data:B.filter(se=>se[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const h=y(()=>d.value?[...d.value.nodes].sort((F,B)=>B.messageCount-F.messageCount):[]),b=y(()=>!d.value||m.value===null?null:d.value.nodes.find(F=>F.id===m.value)||null),k=y(()=>{if(!d.value||!b.value)return[];const F=b.value.name,B=[];for(const H of d.value.links)H.source===F?B.push({otherName:H.target,value:H.value,coOccurrenceCount:H.coOccurrenceCount}):H.target===F&&B.push({otherName:H.source,value:H.value,coOccurrenceCount:H.coOccurrenceCount});return B.sort((H,se)=>se.value-H.value),B}),w=y(()=>d.value?d.value.links.slice(0,50):[]);function R(){u&&v.value==="matrix"&&u.setOption($(),{notMerge:!0})}function P(){f.value&&(u=Je(f.value,r.value?"dark":void 0),R())}function O(){u?.resize()}return z(v,async(F,B)=>{B==="matrix"&&u&&(u.dispose(),u=null),F==="matrix"&&(await De(),P())}),z([d,()=>r.value],()=>{v.value==="matrix"&&R()},{deep:!0}),z(c,async(F,B)=>{B&&!F&&v.value==="matrix"&&(u&&(u.dispose(),u=null),await De(),P())}),z(()=>[t.sessionId,t.timeFilter],()=>i(),{immediate:!0,deep:!0}),$e(()=>{window.addEventListener("resize",O),v.value==="matrix"&&De(()=>P())}),Ae(()=>{window.removeEventListener("resize",O),u?.dispose(),u=null}),(F,B)=>{const H=pe,se=Oe("UButtonGroup"),G=Ke,ee=ct,j=he;return o(),T("div",Za,[x(e(Yt),{class:"flex h-full flex-col"},{default:I(()=>[s("div",Ja,[s("div",Qa,[x(se,{size:"xs"},{default:I(()=>[x(H,{color:v.value==="matrix"?"primary":"neutral",variant:v.value==="matrix"?"solid":"ghost",onClick:B[0]||(B[0]=L=>v.value="matrix")},{default:I(()=>[Y(g(e(a)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),x(H,{color:v.value==="member"?"primary":"neutral",variant:v.value==="member"?"solid":"ghost",onClick:B[1]||(B[1]=L=>v.value="member")},{default:I(()=>[Y(g(e(a)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),x(H,{color:v.value==="circle"?"primary":"neutral",variant:v.value==="circle"?"solid":"ghost",onClick:B[2]||(B[2]=L=>v.value="circle")},{default:I(()=>[Y(g(e(a)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])]),_:1})]),s("div",es,[x(ee,null,{content:I(()=>[s("div",ts,[s("h4",as,g(e(a)("views.cluster.modelSettings")),1),s("div",ss,[s("div",null,[s("label",os,g(e(a)("views.cluster.lookAhead")),1),x(G,{modelValue:_.value.lookAhead,"onUpdate:modelValue":B[3]||(B[3]=L=>_.value.lookAhead=L),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),s("p",ns,g(e(a)("views.cluster.lookAheadDesc")),1)]),s("div",null,[s("label",ls,g(e(a)("views.cluster.decaySeconds")),1),x(G,{modelValue:_.value.decaySeconds,"onUpdate:modelValue":B[4]||(B[4]=L=>_.value.decaySeconds=L),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),s("p",is,g(e(a)("views.cluster.decaySecondsDesc")),1)]),x(H,{size:"xs",color:"primary",class:"w-full mt-2",onClick:i},{default:I(()=>[Y(g(e(a)("views.cluster.applySettings")),1)]),_:1})])])]),default:I(()=>[x(H,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),x(H,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:i})])]),s("div",rs,[c.value?(o(),T("div",us,[x(j,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!d.value||d.value.nodes.length===0?(o(),T("div",cs,[s("div",ds,[x(j,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),s("p",null,g(e(a)("views.cluster.noData")),1)])])):v.value==="matrix"?(o(),T("div",ms,[s("div",{ref_key:"chartRef",ref:f,class:"w-full h-full"},null,512)])):v.value==="member"?(o(),T("div",vs,[s("div",ps,[s("div",hs,[s("h3",gs,[x(j,{name:"i-heroicons-users",class:"w-4 h-4"}),Y(" "+g(e(a)("views.cluster.selectMember")),1)])]),s("div",fs,[(o(!0),T(q,null,X(h.value,L=>(o(),T("div",{key:L.id,class:K(["px-4 py-2 cursor-pointer border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",{"bg-primary-50 dark:bg-primary-900/30":m.value===L.id}]),onClick:W=>m.value=L.id},[s("div",bs,[s("span",xs,g(L.name),1),s("span",ks,g(L.messageCount),1)])],10,ys))),128))])]),s("div",ws,[b.value?(o(),T(q,{key:1},[s("div",Cs,[s("div",Ts,g(b.value.name.charAt(0)),1),s("div",null,[s("div",Is,g(b.value.name),1),s("div",Ss,g(e(a)("views.cluster.msgCount"))+": "+g(b.value.messageCount)+" | "+g(e(a)("views.cluster.relationCount"))+": "+g(k.value.length),1)])]),s("div",Vs,[s("h3",Rs,[x(j,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),Y(" "+g(e(a)("views.cluster.relationsByIntimacy")),1)])]),s("div",Ms,[k.value.length===0?(o(),T("div",Ls,g(e(a)("views.cluster.noRelations")),1)):A("",!0),(o(!0),T(q,null,X(k.value,(L,W)=>(o(),T("div",{key:L.otherName,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[s("div",Ds,[s("span",{class:K(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",W<3?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"])},g(W+1),3),s("div",Ns,[s("div",As,g(L.otherName),1),s("div",Us,[s("span",null,g(e(a)("views.cluster.intimacy"))+": "+g((L.value*100).toFixed(0))+"%",1),s("span",null,g(e(a)("views.cluster.coOccurrence"))+": "+g(L.coOccurrenceCount)+g(e(a)("views.cluster.times")),1)])]),s("div",Fs,[s("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:ve({width:`${k.value[0]?.value?L.value/k.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(o(),T("div",_s,[s("div",$s,[x(j,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),s("p",null,g(e(a)("views.cluster.selectMemberHint")),1)])]))])])):(o(),T("div",Bs,[s("div",qs,[s("h3",zs,[x(j,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),Y(" "+g(e(a)("views.cluster.interactionRanking")),1)])]),s("div",Hs,[(o(!0),T(q,null,X(w.value,(L,W)=>(o(),T("div",{key:W,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[s("div",Es,[s("span",{class:K(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",W<3?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"])},g(W+1),3),s("div",Ps,[s("div",Os,[s("span",Ws,g(L.source),1),B[5]||(B[5]=s("span",{class:"text-gray-400"},"↔",-1)),s("span",Ks,g(L.target),1)]),s("div",js,[s("span",null,g(e(a)("views.cluster.score"))+": "+g(L.value.toFixed(2)),1),s("span",null,g(e(a)("views.cluster.coOccurrence"))+": "+g(L.coOccurrenceCount)+g(e(a)("views.cluster.times")),1)])]),s("div",Gs,[s("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:ve({width:`${w.value[0]?.value?L.value/w.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),d.value?(o(),T("div",Ys,[s("span",null,g(e(a)("views.cluster.totalMembers"))+": "+g(d.value.stats.totalMembers),1),s("span",null,g(e(a)("views.cluster.totalMessages"))+": "+g(d.value.stats.totalMessages.toLocaleString()),1),s("span",null,g(e(a)("views.cluster.involvedMembers"))+": "+g(d.value.stats.involvedMembers),1),s("span",null,g(e(a)("views.cluster.edgeCount"))+": "+g(d.value.stats.edgeCount),1)])):A("",!0)]),_:1})])}}}),Zs={class:"flex h-full flex-col"},Js={class:"min-h-0 flex-1 overflow-y-auto"},Qs=U({__name:"GroupRelationships",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Z(),a=l,n=S("mention-graph"),r=y(()=>[{id:"mention-graph",label:t("analysis.subTabs.groupRelationships.mentionGraph"),icon:"i-heroicons-arrows-right-left"},{id:"mention-ranking",label:t("analysis.subTabs.groupRelationships.mentionRanking"),icon:"i-heroicons-heart"},{id:"proximity",label:t("analysis.subTabs.groupRelationships.proximity"),icon:"i-heroicons-user-group"}]);return(c,d)=>(o(),T("div",Zs,[x(e(Ue),{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=v=>n.value=v),items:r.value,"persist-key":"groupRelationshipsTab"},null,8,["modelValue","items"]),s("div",Js,[x(Te,{name:"fade",mode:"out-in"},{default:I(()=>[n.value==="mention-graph"?(o(),C(Ga,{key:0,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):n.value==="mention-ranking"?(o(),C(Xa,{key:1,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):n.value==="proximity"?(o(),C(Xs,{key:2,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):A("",!0)]),_:1})])]))}}),eo=Ie(Qs,[["__scopeId","data-v-b5e97ca6"]]);function to(l,t){return{keywords:[l],...t?.memberId!=null?{memberId:t.memberId}:{}}}const ao={class:"main-content mx-auto max-w-3xl p-6"},so=["aria-label","onClick"],oo=["title"],no={class:"flex shrink-0 items-center gap-3 pl-2"},lo={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},io={class:"grid w-full grid-cols-[2rem_minmax(0,1fr)] items-start gap-x-3 sm:grid-cols-[2rem_minmax(7.5rem,0.65fr)_minmax(0,1.35fr)]"},ro=["title"],uo={class:"col-start-2 row-start-2 mt-1.5 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1.5 sm:col-start-3 sm:row-start-1 sm:mt-0"},co=["title","aria-label","onClick"],mo={class:"max-w-40 truncate text-sm text-gray-700 transition-colors group-hover/phrase:text-primary-600 dark:text-gray-200 dark:group-hover/phrase:text-primary-400"},vo={class:"shrink-0 font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},po=U({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Z(),a=Fe(),n=l,r=S(null),c=S(!1),d=y(()=>r.value?.members??[]),v=y(()=>n.timeFilter?.memberId!=null),m=y(()=>v.value?d.value[0]??null:null),_=y(()=>m.value?t("quotes.catchphrase.memberTitle",{name:m.value.name}):t("quotes.catchphrase.title")),f=y(()=>v.value?t("quotes.catchphrase.memberDescription"):t("quotes.catchphrase.description"));async function u(){if(n.sessionId){c.value=!0;try{r.value=await Q().getCatchphraseAnalysis(n.sessionId,n.timeFilter)}catch($){console.error("Failed to load catchphrase analysis:",$)}finally{c.value=!1}}}function i($){a.openChatRecordDrawer(to($,n.timeFilter))}function p($){return $.catchphrases.slice(0,5)}return z(()=>[n.sessionId,n.timeFilter],()=>{u()},{immediate:!0,deep:!0}),($,h)=>{const b=he;return o(),T("div",ao,[c.value?(o(),C(e(ae),{key:0,text:e(t)("quotes.catchphrase.loading")},null,8,["text"])):m.value?(o(),C(e(_e),{key:1,items:m.value.catchphrases,title:_.value,description:f.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.phraseCount",{count:m.value.catchphrases.length})},{item:I(({item:k,index:w})=>[s("button",{type:"button",class:"group/item grid w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40","aria-label":`${e(t)("quotes.catchphrase.viewChat")}: ${k.content}`,onClick:R=>i(k.content)},[s("span",{class:K(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(xe)(w)])},g(e(ke)(w)),3),s("p",{class:"line-clamp-2 min-w-0 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:k.content},g(k.content),9,oo),s("div",no,[s("span",lo,g(e(t)("quotes.catchphrase.times",{count:k.count})),1),x(b,{name:"i-heroicons-chevron-right",class:"h-4 w-4 text-gray-300 transition-colors group-hover/item:text-gray-500 dark:text-gray-600 dark:group-hover/item:text-gray-400"})])],8,so)]),_:1},8,["items","title","description","count-label"])):d.value.length>0?(o(),C(e(_e),{key:2,items:d.value,title:_.value,description:f.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.memberCount",{count:d.value.length})},{item:I(({item:k,index:w})=>[s("div",io,[s("span",{class:K(["row-span-2 w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums sm:row-span-1",e(xe)(w)])},g(e(ke)(w)),3),s("p",{class:"col-start-2 row-start-1 min-w-0 truncate pt-0.5 text-sm font-semibold text-gray-900 dark:text-white",title:k.name},g(k.name),9,ro),s("div",uo,[(o(!0),T(q,null,X(p(k),R=>(o(),T("button",{key:R.content,type:"button",class:"group/phrase inline-flex max-w-full items-baseline gap-1 rounded text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40",title:R.content,"aria-label":`${e(t)("quotes.catchphrase.viewChat")}: ${R.content}`,onClick:P=>i(R.content)},[s("span",mo," “"+g(R.content)+"” ",1),s("span",vo,g(e(t)("quotes.catchphrase.times",{count:R.count})),1)],8,co))),128))])])]),_:1},8,["items","title","description","count-label"])):(o(),C(e(E),{key:3,title:_.value,description:f.value,"show-divider":!1},{default:I(()=>[x(e(le),{text:e(t)("quotes.catchphrase.empty.title")},null,8,["text"])]),_:1},8,["title","description"]))])}}}),ho={class:"main-content mx-auto max-w-3xl p-6"},go=["aria-label","onClick"],fo={class:"min-w-0"},yo=["title"],bo={class:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},xo={class:"truncate"},ko={class:"shrink-0"},wo={class:"flex shrink-0 items-center gap-3 pl-2"},_o={class:"text-right"},$o={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Co={class:"mt-0.5 text-[11px] text-gray-400 dark:text-gray-500"},To=U({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Z(),a=l,n=Fe(),r=S(null),c=S(!1);async function d(){if(a.sessionId){c.value=!0;try{r.value=await Q().getRepeatAnalysis(a.sessionId,a.timeFilter)}catch(m){console.error("Failed to load repeat analysis:",m)}finally{c.value=!1}}}function v(m){n.openChatRecordDrawer({scrollToMessageId:m.firstMessageId,highlightKeywords:[m.content]})}return z(()=>[a.sessionId,a.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(m,_)=>{const f=he;return o(),T("div",ho,[c.value?(o(),C(e(ae),{key:0,text:e(t)("quotes.hotRepeat.loading")},null,8,["text"])):r.value&&r.value.hotContents.length>0?(o(),C(e(_e),{key:1,items:r.value.hotContents,title:e(t)("quotes.hotRepeat.title"),description:e(t)("quotes.hotRepeat.description"),"top-n":10,"count-label":e(t)("quotes.hotRepeat.countTemplate",{count:r.value.hotContents.length})},{item:I(({item:u,index:i})=>[s("button",{type:"button",class:"group/item grid w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40","aria-label":`${e(t)("quotes.hotRepeat.viewChat")}: ${u.content}`,onClick:p=>v(u)},[s("span",{class:K(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(xe)(i)])},g(e(ke)(i)),3),s("div",fo,[s("p",{class:"line-clamp-2 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:u.content},g(u.content),9,yo),s("div",bo,[s("span",xo,g(u.originatorName),1),_[0]||(_[0]=s("span",{"aria-hidden":"true"},"·",-1)),s("span",ko,g(e(Ne)(u.lastTs)),1)])]),s("div",wo,[s("div",_o,[s("p",$o,g(e(t)("quotes.hotRepeat.people",{count:u.maxChainLength})),1),s("p",Co,g(e(t)("quotes.hotRepeat.times",{count:u.count})),1)]),x(f,{name:"i-heroicons-chevron-right",class:"h-4 w-4 text-gray-300 transition-colors group-hover/item:text-gray-500 dark:text-gray-600 dark:group-hover/item:text-gray-400"})])],8,go)]),_:1},8,["items","title","description","count-label"])):(o(),C(e(E),{key:2,title:e(t)("quotes.hotRepeat.title")},{default:I(()=>[x(e(le),{text:e(t)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),Io={class:"flex h-full flex-col"},So={class:"flex-1 min-h-0 overflow-y-auto"},Vo=U({__name:"ViewTab",props:{sessionId:{},sessionName:{},timeFilter:{}},setup(l){const{t}=Z(),a=l,n=y(()=>[{id:"type-analysis",label:t("analysis.subTabs.view.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:t("analysis.subTabs.view.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:t("analysis.subTabs.view.topic"),icon:"i-heroicons-cloud"},{id:"group-relationships",label:t("analysis.subTabs.view.groupRelationships"),icon:"i-heroicons-heart"}]),r=S("type-analysis"),c=S(null),d=y(()=>({...a.timeFilter,memberId:c.value}));return(v,m)=>(o(),T("div",Io,[x(e(Ue),{modelValue:r.value,"onUpdate:modelValue":m[1]||(m[1]=_=>r.value=_),items:n.value,"persist-key":"groupViewTab"},{right:I(()=>[r.value!=="topic"?(o(),C(Ge,{key:0,modelValue:c.value,"onUpdate:modelValue":m[0]||(m[0]=_=>c.value=_),"session-id":a.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),s("div",So,[x(Te,{name:"fade",mode:"out-in"},{default:I(()=>[r.value==="type-analysis"?(o(),C(St,{key:0,"session-id":a.sessionId,"session-name":a.sessionName,"time-filter":d.value},null,8,["session-id","session-name","time-filter"])):r.value==="time-analysis"?(o(),C(Vt,{key:1,"session-id":a.sessionId,"session-name":a.sessionName,"time-filter":d.value},null,8,["session-id","session-name","time-filter"])):r.value==="topic"?(o(),C(e(Rt),{key:2,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):r.value==="group-relationships"?(o(),C(eo,{key:3,"session-id":a.sessionId,"time-filter":d.value},null,8,["session-id","time-filter"])):A("",!0)]),_:1})])]))}}),Ro=Ie(Vo,[["__scopeId","data-v-ddbcce42"]]),Mo={class:"border-b border-gray-100 p-4 dark:border-gray-800"},Lo={class:"mb-3 flex flex-wrap items-center gap-2"},Do={class:"text-xs text-gray-500 dark:text-gray-400"},No=["onClick"],Ao={class:"p-4"},Uo={class:"mb-3 font-semibold text-gray-900 dark:text-white"},Fo={class:"space-y-3"},Bo={class:"mb-1 block text-xs text-gray-500"},qo={class:"mb-1 block text-xs text-gray-500"},zo={class:"flex flex-wrap items-center gap-2"},Ho={class:"mt-4 flex justify-end gap-2"},Eo={class:"flex flex-wrap items-center gap-2"},Po={class:"mt-1.5 text-xs text-gray-400"},Oo={key:0,class:"border-b border-gray-100 px-5 py-4 dark:border-gray-800"},Wo={class:"mb-3 flex items-center justify-between"},Ko={class:"text-base font-medium text-gray-700 dark:text-gray-300"},jo={class:"flex cursor-pointer items-center gap-1.5 text-xs text-gray-500"},Go={class:"flex flex-wrap gap-2"},Yo={class:"text-xs text-gray-500"},Xo={class:"flex items-center gap-3"},Zo={class:"w-32 shrink-0"},Jo={class:"truncate font-medium text-gray-900 dark:text-white"},Qo={class:"flex flex-1 items-center"},en={class:"flex h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},tn=["title"],an={class:"flex shrink-0 items-baseline gap-2"},sn={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},on={class:"text-xs text-gray-500"},nn={key:0,class:"flex h-64 flex-col items-center justify-center text-gray-400"},ln={class:"text-sm"},rn={key:1,class:"h-64"},un=U({__name:"KeywordRankingTab",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Z(),a=l,n=dt(),r=S(!1),c={bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},d=[{bg:"bg-amber-400",text:"text-amber-700",badge:"amber",wrapBg:"bg-amber-50 dark:bg-amber-900/20"},{bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},{bg:"bg-blue-400",text:"text-blue-700",badge:"blue",wrapBg:"bg-blue-50 dark:bg-blue-900/20"},{bg:"bg-green-400",text:"text-green-700",badge:"green",wrapBg:"bg-green-50 dark:bg-green-900/20"},{bg:"bg-purple-400",text:"text-purple-700",badge:"purple",wrapBg:"bg-purple-50 dark:bg-purple-900/20"},{bg:"bg-red-400",text:"text-red-700",badge:"red",wrapBg:"bg-red-50 dark:bg-red-900/20"},{bg:"bg-cyan-400",text:"text-cyan-700",badge:"cyan",wrapBg:"bg-cyan-50 dark:bg-cyan-900/20"},{bg:"bg-orange-400",text:"text-orange-700",badge:"orange",wrapBg:"bg-orange-50 dark:bg-orange-900/20"}];function v(V){if(!r.value)return c;const M=i.value.indexOf(V);return d[M%d.length]}const m=["laugh","sad","praise","slacker","gossip","polite","curious"],_=y(()=>[{id:"laugh",name:t("quotes.keywords.templates.laugh.name"),keywords:t("quotes.keywords.templates.laugh.keywords").split(","),description:t("quotes.keywords.templates.laugh.description")},{id:"sad",name:t("quotes.keywords.templates.sad.name"),keywords:t("quotes.keywords.templates.sad.keywords").split(","),description:t("quotes.keywords.templates.sad.description")},{id:"praise",name:t("quotes.keywords.templates.praise.name"),keywords:t("quotes.keywords.templates.praise.keywords").split(","),description:t("quotes.keywords.templates.praise.description")},{id:"slacker",name:t("quotes.keywords.templates.slacker.name"),keywords:t("quotes.keywords.templates.slacker.keywords").split(","),description:t("quotes.keywords.templates.slacker.description")},{id:"gossip",name:t("quotes.keywords.templates.gossip.name"),keywords:t("quotes.keywords.templates.gossip.keywords").split(","),description:t("quotes.keywords.templates.gossip.description")},{id:"polite",name:t("quotes.keywords.templates.polite.name"),keywords:t("quotes.keywords.templates.polite.keywords").split(","),description:t("quotes.keywords.templates.polite.description")},{id:"curious",name:t("quotes.keywords.templates.curious.name"),keywords:t("quotes.keywords.templates.curious.keywords").split(","),description:t("quotes.keywords.templates.curious.description")}]),f=y(()=>{const V=n.customKeywordTemplates.map(ue=>({...ue,isCustom:!0}));return[..._.value.filter(ue=>!n.deletedPresetTemplateIds.includes(ue.id)),...V]}),u=S("laugh"),i=S([]);z(_,V=>{V.length>0&&i.value.length===0&&(i.value=[...V[0].keywords])},{immediate:!0});const p=y(()=>{const V=f.value.find(M=>M.id===u.value);return V?V.name:""}),$=S(null),h=S(!1),b=S(!1),k=S(null),w=S(""),R=S([]),P=S(""),O=y(()=>k.value!==null),F=y(()=>O.value?t("quotes.keywords.modal.editTitle"):t("quotes.keywords.modal.createTitle"));function B(){k.value=null,w.value="",R.value=[],P.value="",b.value=!0}function H(V){k.value=V.id,w.value=V.name,R.value=[...V.keywords],b.value=!0}function se(){const V=P.value.trim();V&&!R.value.includes(V)&&(R.value=[...R.value,V]),P.value=""}function G(V){R.value=R.value.filter(M=>M!==V)}function ee(V){u.value=V.id,i.value=[...V.keywords],$.value=null,ne()}function j(){i.value=[],$.value=null,u.value=""}const L=S("");function W(){const V=L.value.trim();V&&!i.value.includes(V)&&(i.value=[...i.value,V],ne()),L.value=""}function de(V){i.value=i.value.filter(M=>M!==V),ne()}function we(V){return m.includes(V)}function Ve(){if(w.value.trim()){if(O.value&&k.value)if(we(k.value)){const V={id:`custom_${Date.now()}`,name:w.value.trim(),keywords:[...R.value]};n.addCustomKeywordTemplate(V),u.value=V.id,i.value=[...V.keywords],ne()}else n.updateCustomKeywordTemplate(k.value,{name:w.value.trim(),keywords:[...R.value]}),u.value===k.value&&(i.value=[...R.value],ne());else{const V={id:`custom_${Date.now()}`,name:w.value.trim(),keywords:[...R.value]};n.addCustomKeywordTemplate(V),u.value=V.id,i.value=[...V.keywords],ne()}b.value=!1}}function Re(V){we(V)?n.addDeletedPresetTemplateId(V):n.removeCustomKeywordTemplate(V),u.value===V&&(f.value.length>0?ee(f.value[0]):j())}async function ne(){if(!a.sessionId||i.value.length===0){$.value=null;return}h.value=!0;try{$.value=await Q().getLaughAnalysis(a.sessionId,a.timeFilter,[...i.value])}catch(V){console.error("Failed to load keyword ranking:",V),$.value=null}finally{h.value=!1}}const J=y(()=>$.value?$.value.rankByCount.map(V=>({id:V.memberId.toString(),name:V.name,value:V.laughCount,percentage:V.percentage,keywordDistribution:V.keywordDistribution||[]})):[]);function N(V){if(J.value.length===0)return 0;const M=J.value[0].value;return M===0?0:Math.round(J.value[V].value/M*100)}function Me(V,M){const ue=N(M);return!V.keywordDistribution||V.keywordDistribution.length===0?[{keyword:"default",width:ue,bg:"bg-amber-400"}]:V.keywordDistribution.map(ce=>({keyword:ce.keyword,width:ce.percentage/100*ue,bg:v(ce.keyword).bg}))}return z(()=>[a.sessionId,a.timeFilter],()=>{ne()},{immediate:!0,deep:!0}),(V,M)=>{const ue=mt,ce=Ke,Le=je,Be=pe,at=Ce,st=We,ot=he;return o(),C(e(_e),{items:J.value,title:e(t)("quotes.keywords.title"),description:e(t)("quotes.keywords.description"),"top-n":10,"count-label":e(t)("quotes.keywords.countTemplate",{count:J.value.length})},{config:I(()=>[s("div",Mo,[s("div",Lo,[s("span",Do,g(e(t)("quotes.keywords.templateLabel")),1),(o(!0),T(q,null,X(f.value,D=>(o(),C(ue,{key:D.id,items:[[{label:e(t)("quotes.keywords.contextMenu.edit"),icon:"i-lucide-pencil",disabled:!D.isCustom,onSelect:()=>H(D)},{label:e(t)("quotes.keywords.contextMenu.delete"),icon:"i-lucide-trash",color:"error",onSelect:()=>Re(D.id)}]]},{default:I(()=>[s("button",{class:K(["rounded-md border px-2.5 py-1 text-sm transition-all",u.value===D.id?"border-pink-500 bg-pink-50 text-pink-600 dark:border-pink-400 dark:bg-pink-900/20 dark:text-pink-400":"border-gray-200 text-gray-600 hover:border-gray-300 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-600"]),onClick:me=>ee(D)},g(D.name),11,No)]),_:2},1032,["items"]))),128)),x(at,{open:b.value,"onUpdate:open":M[3]||(M[3]=D=>b.value=D)},{content:I(()=>[s("div",Ao,[s("h3",Uo,g(F.value),1),s("div",Fo,[s("div",null,[s("label",Bo,g(e(t)("quotes.keywords.modal.templateName")),1),x(ce,{modelValue:w.value,"onUpdate:modelValue":M[0]||(M[0]=D=>w.value=D),placeholder:e(t)("quotes.keywords.modal.templateNamePlaceholder")},null,8,["modelValue","placeholder"])]),s("div",null,[s("label",qo,g(e(t)("quotes.keywords.modal.keywords")),1),s("div",zo,[(o(!0),T(q,null,X(R.value,D=>(o(),C(Le,{key:D,variant:"soft",class:"cursor-pointer",onClick:me=>G(D)},{default:I(()=>[Y(g(D)+" ",1),M[6]||(M[6]=s("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(ce,{modelValue:P.value,"onUpdate:modelValue":M[1]||(M[1]=D=>P.value=D),placeholder:e(t)("quotes.keywords.modal.keywordPlaceholder"),class:"w-full",onKeydown:qe(ze(se,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])])])]),s("div",Ho,[x(Be,{variant:"soft",onClick:M[2]||(M[2]=D=>b.value=!1)},{default:I(()=>[Y(g(e(t)("common.cancel")),1)]),_:1}),x(Be,{color:"primary",disabled:!w.value.trim()||R.value.length===0,onClick:Ve},{default:I(()=>[Y(g(O.value?e(t)("quotes.keywords.modal.update"):e(t)("common.save")),1)]),_:1},8,["disabled"])])])]),default:I(()=>[s("button",{class:"rounded-md border border-dashed border-gray-300 px-2.5 py-1 text-sm text-gray-500 transition-all hover:border-pink-400 hover:text-pink-500 dark:border-gray-600",onClick:B},g(e(t)("quotes.keywords.newTemplate")),1)]),_:1},8,["open"])]),s("div",Eo,[(o(!0),T(q,null,X(i.value,D=>(o(),C(Le,{key:D,class:"cursor-pointer",onClick:me=>de(D)},{default:I(()=>[Y(g(D)+" ",1),M[7]||(M[7]=s("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(ce,{modelValue:L.value,"onUpdate:modelValue":M[4]||(M[4]=D=>L.value=D),placeholder:e(t)("quotes.keywords.searchPlaceholder"),class:"w-32",onKeydown:qe(ze(W,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),i.value.length>0?(o(),T("button",{key:0,class:"text-sm text-pink-500 hover:text-red-500",onClick:j},g(e(t)("quotes.keywords.clear")),1)):A("",!0)]),s("div",Po,g(e(t)("quotes.keywords.templateHint")),1)]),$.value&&$.value.typeDistribution.length>0?(o(),T("div",Oo,[s("div",Wo,[s("span",Ko,g(p.value?p.value:i.value.length===1?i.value[0]:e(t)("quotes.keywords.keyword"))+g(e(t)("quotes.keywords.ranking")),1),s("label",jo,[s("span",null,g(e(t)("quotes.keywords.multiColorMode")),1),x(st,{modelValue:r.value,"onUpdate:modelValue":M[5]||(M[5]=D=>r.value=D),size:"md"},null,8,["modelValue"])])]),s("div",Go,[(o(!0),T(q,null,X($.value.typeDistribution,D=>(o(),T("div",{key:D.type,class:K(["flex items-center gap-2 rounded-lg px-2 py-2 text-xs",v(D.type).wrapBg])},[s("span",{class:K(["h-2.5 w-2.5 shrink-0 rounded-full",v(D.type).bg])},null,2),s("span",{class:K(["font-medium",v(D.type).text])},g(D.type),3),s("span",Yo,g(e(t)("quotes.keywords.times",{count:D.count})),1),x(Le,{color:v(D.type).badge,variant:"soft",size:"xs"},{default:I(()=>[Y(g(D.percentage)+"%",1)]),_:2},1032,["color"])],2))),128))])])):A("",!0),h.value&&J.value.length===0?(o(),C(e(ae),{key:1,text:e(t)("quotes.keywords.loading")},null,8,["text"])):A("",!0)]),item:I(({item:D,index:me})=>[s("div",Xo,[s("span",{class:K(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(xe)(me)])},g(e(ke)(me)),3),s("div",Zo,[s("p",Jo,g(D.name),1)]),s("div",Qo,[s("div",en,[(o(!0),T(q,null,X(Me(D,me),be=>(o(),T("div",{key:be.keyword,class:K(["h-full transition-all first:rounded-l-full last:rounded-r-full",be.bg]),style:ve({width:`${be.width}%`}),title:`${be.keyword}: ${be.width.toFixed(1)}%`},null,14,tn))),128))])]),s("div",an,[s("span",sn,g(D.value),1),s("span",on,g(e(t)("quotes.keywords.timesWithPercent",{count:D.value,percent:D.percentage})),1)])])]),empty:I(()=>[h.value?(o(),T("div",rn)):(o(),T("div",nn,[x(ot,{name:"i-heroicons-magnifying-glass",class:"mb-2 h-8 w-8 opacity-50"}),s("p",ln,g(e(t)("quotes.keywords.empty")),1)]))]),_:1},8,["items","title","description","count-label"])}}}),cn={class:"flex items-center gap-3"},dn={key:1,class:"py-8 text-center text-sm text-gray-400"},mn=U({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=S(null),n=S(null),r=S(!1),c=S("activity"),d=S(t.globalTopN??10);z(()=>t.globalTopN,h=>{h!==void 0&&(d.value=h)});async function v(){if(t.sessionId){r.value=!0;try{const h=Q(),[b,k]=await Promise.all([h.getDragonKingAnalysis(t.sessionId,t.timeFilter),h.getCheckInAnalysis(t.sessionId,t.timeFilter)]);a.value=b,n.value=k}catch(h){console.error("加载活跃数据失败:",h)}finally{r.value=!1}}}const m=y(()=>t.memberActivity.map(h=>({id:h.memberId.toString(),name:h.name,value:h.messageCount,percentage:h.percentage}))),_=y(()=>a.value?a.value.rank.map(h=>({id:h.memberId.toString(),name:h.name,value:h.count,percentage:h.percentage})):[]),f=y(()=>n.value?n.value.loyaltyRank.map(h=>({id:h.memberId.toString(),name:h.name,value:h.totalDays,percentage:h.percentage})):[]),u=y(()=>{switch(c.value){case"activity":return m.value;case"dragon":return _.value;case"loyalty":return f.value;default:return m.value}}),i=y(()=>{switch(c.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),p=y(()=>{switch(c.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),$=y(()=>{switch(c.value){case"activity":return"按消息发送数量排名";case"dragon":return`每天发言最多的人+1(共 ${a.value?.totalDays??0} 天)`;case"loyalty":return`累计发言天数排名(共 ${n.value?.totalDays??0} 天)`;default:return""}});return z(()=>[t.sessionId,t.timeFilter],()=>v(),{immediate:!0,deep:!0}),(h,b)=>(o(),C(e(E),{title:p.value,description:$.value},{headerRight:I(()=>[s("div",cn,[l.showTopNSelect?(o(),C(e(re),{key:0,modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=k=>d.value=k)},null,8,["modelValue"])):A("",!0),x(e(ie),{modelValue:c.value,"onUpdate:modelValue":b[1]||(b[1]=k=>c.value=k),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[r.value&&(c.value==="dragon"||c.value==="loyalty")?(o(),C(e(ae),{key:0,text:"正在加载数据..."})):(o(),T(q,{key:1},[u.value.length>0?(o(),C(e(Se),{key:0,members:u.value,title:p.value,unit:i.value,"top-n":d.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),T("div",dn,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),vn={key:0},pn={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},hn={class:"px-3 py-2"},gn=U({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=fe(),n=y(()=>t.mode==="current"?t.items.filter(f=>f.currentStreak>0).sort((f,u)=>u.currentStreak-f.currentStreak).slice(0,t.topN):t.items.slice(0,t.topN)),r=y(()=>{const f=n.value.length*36;return Math.max(f+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]};function v(f,u){return`${f} ~ ${u}`}function m(f){return t.mode==="current"?f.currentStreak:f.maxStreak}const _=y(()=>{const f=[...n.value].reverse(),u=f.map(h=>ye(h.name,a.value.labelMaxLength)),i=f.map(h=>m(h)),p=Math.max(...i,1),$=f.map(h=>({value:m(h),itemStyle:{color:t.mode==="current"||h.currentStreak>0?d:c,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:h=>{const b=h[0];if(!b)return"";const k=n.value.length-1-b.dataIndex,w=n.value[k];if(t.mode==="current")return`
|
|
8
|
+
<div style="padding: 4px 8px;">
|
|
9
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${w.name}</div>
|
|
10
|
+
<div style="color: #fb923c;">🔥 当前连续 <b>${w.currentStreak}</b> 天</div>
|
|
11
|
+
<div style="margin-top: 4px; font-size: 12px; color: #9ca3af;">最长记录: ${w.maxStreak} 天</div>
|
|
12
|
+
</div>
|
|
13
|
+
`;let R=`
|
|
14
|
+
<div style="padding: 4px 8px;">
|
|
15
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${w.name}</div>
|
|
16
|
+
<div style="margin-bottom: 4px;">🔥 最长连续: <b>${w.maxStreak}</b> 天</div>
|
|
17
|
+
<div style="font-size: 12px; color: #9ca3af;">${v(w.maxStreakStart,w.maxStreakEnd)}</div>
|
|
18
|
+
`;return w.currentStreak>0&&(R+=`<div style="margin-top: 6px; color: #fb923c;">🔥 当前连续 ${w.currentStreak} 天</div>`),R+="</div>",R}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:p*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:u,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(h,b)=>{const w=n.value.length-1-b+1;return`${w===1?"🥇":w===2?"🥈":w===3?"🥉":`${w}.`} ${h}`}}},series:[{type:"bar",data:$,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:h=>{const b=n.value.length-1-h.dataIndex,k=n.value[b],w=m(k),R=t.mode==="current"||k.currentStreak>0?" 🔥":"";return`${w} 天${R}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(249, 115, 22, 0.3)"}}}]}});return(f,u)=>l.bare?(o(),T("div",vn,[x(e(ge),{"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:I(()=>[x(e(te),{option:_.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"]),l.mode==="max"?(o(),T("div",pn,[...u[0]||(u[0]=[vt('<div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"></div><span class="text-xs text-gray-500">当前连续中 🔥</span></div><div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"></div><span class="text-xs text-gray-500">已中断</span></div>',2)])])):A("",!0)])):(o(),C(e(E),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},pt({default:I(()=>[s("div",hn,[x(e(te),{option:_.value,height:r.value},null,8,["option","height"])])]),_:2},[l.mode==="max"?{name:"footer",fn:I(()=>[u[1]||(u[1]=s("div",{class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},[s("div",{class:"flex items-center gap-1.5"},[s("div",{class:"h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"}),s("span",{class:"text-xs text-gray-500"},"当前连续中 🔥")]),s("div",{class:"flex items-center gap-1.5"},[s("div",{class:"h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"}),s("span",{class:"text-xs text-gray-500"},"已中断")])],-1))]),key:"0"}:void 0]),1032,["title","description","max-height-vh"]))}}),fn={class:"px-3 py-2"},yn=U({__name:"EChartBattleRank",props:{battles:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=y(()=>t.battles.slice(0,t.topN)),n=y(()=>{const v=a.value.length*36;return Math.max(v+30,180)}),r={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]};function c(v){return`${v.participantCount} 人参战`}const d=y(()=>{const v=[...a.value].reverse(),m=v.map(i=>c(i)),_=v.map(i=>i.totalImages),f=Math.max(..._,1),u=v.map(i=>({value:i.totalImages,itemStyle:{color:r,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},extraCssText:"max-width: 300px;",formatter:i=>{const p=i[0];if(!p)return"";const $=a.value.length-1-p.dataIndex,h=a.value[$],b=h.participants.slice(0,5).map(w=>`<span style="color: #d1d5db;">${w.name}</span> <b>${w.imageCount}</b>张`).join("、"),k=h.participants.length>5?`、+${h.participants.length-5}`:"";return`
|
|
19
|
+
<div style="padding: 6px 8px;">
|
|
20
|
+
<div style="font-weight: bold; margin-bottom: 8px; font-size: 13px;">
|
|
21
|
+
⚔️ ${Ne(h.startTime)}
|
|
22
|
+
</div>
|
|
23
|
+
<div style="margin-bottom: 6px;">
|
|
24
|
+
<span style="color: #9ca3af;">参战人数:</span> <b>${h.participantCount}</b> 人
|
|
25
|
+
</div>
|
|
26
|
+
<div style="margin-bottom: 8px;">
|
|
27
|
+
<span style="color: #9ca3af;">总图片数:</span> <b style="color: #f472b6;">${h.totalImages}</b> 张
|
|
28
|
+
</div>
|
|
29
|
+
<div style="border-top: 1px solid #374151; padding-top: 6px; font-size: 11px;">
|
|
30
|
+
${b}${k}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
`}},grid:{left:95,right:125,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:f*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:11,color:"#4b5563",margin:12,formatter:(i,p)=>{const h=a.value.length-1-p+1;return`${h===1?"🥇":h===2?"🥈":h===3?"🥉":`${h}.`} ${i}`}}},series:[{type:"bar",data:u,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const p=a.value.length-1-i.dataIndex,$=a.value[p],h=Ne($.startTime);return`${$.totalImages} 张 (${h})`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(v,m)=>l.bare?(o(),C(e(ge),{key:0,"content-height":n.value,"max-height-vh":l.maxHeightVh},{default:I(()=>[x(e(te),{option:d.value,height:n.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:I(()=>[s("div",fn,[x(e(te),{option:d.value,height:n.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),bn={class:"px-3 py-2"},xn=U({__name:"EChartTimeRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=fe(),n=y(()=>t.items.slice(0,t.topN)),r=y(()=>{const m=n.value.length*36;return Math.max(m+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f59e0b"},{offset:1,color:"#fbbf24"}]};function d(m){return(m/1e3).toFixed(2)+"s"}const v=y(()=>{if(n.value.length===0)return{};const m=[...n.value].reverse(),_=m.map(i=>ye(i.name,a.value.labelMaxLength)),f=n.value[0].avgTimeDiff,u=m.map(i=>({value:Math.round(f/i.avgTimeDiff*100),itemStyle:{color:c,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:i=>{const p=i[0];if(!p)return"";const $=n.value.length-1-p.dataIndex,h=n.value[$];return`
|
|
34
|
+
<div style="padding: 4px 8px;">
|
|
35
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${h.name}</div>
|
|
36
|
+
<div style="margin-bottom: 4px;">⚡️ 平均反应时间: <b>${d(h.avgTimeDiff)}</b></div>
|
|
37
|
+
<div style="font-size: 12px; color: #9ca3af;">参与复读 ${h.count} 次</div>
|
|
38
|
+
</div>
|
|
39
|
+
`}},grid:{left:a.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:105,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:_,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(i,p)=>{const h=n.value.length-1-p+1;return`${h===1?"🥇":h===2?"🥈":h===3?"🥉":`${h}.`} ${i}`}}},series:[{type:"bar",data:u,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const p=n.value.length-1-i.dataIndex,$=n.value[p];return`${d($.avgTimeDiff)} · ${$.count}次`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(245, 158, 11, 0.3)"}}}]}});return(m,_)=>l.bare?(o(),C(e(ge),{key:0,"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:I(()=>[x(e(te),{option:v.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:I(()=>[s("div",bn,[x(e(te),{option:v.value,height:r.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),kn={class:"flex items-center gap-3"},wn={class:"px-3 py-2"},_n=U({__name:"EChartDivingRank",props:{items:{},showTopNSelect:{type:Boolean,default:!0},maxHeightVh:{default:60},globalTopN:{}},setup(l){const t=l,a=fe(),n=S("desc"),r=S(t.globalTopN??10);z(()=>t.globalTopN,i=>{i!==void 0&&(r.value=i)});const c=y(()=>[...t.items].sort((p,$)=>n.value==="desc"?$.daysSinceLastMessage-p.daysSinceLastMessage:p.daysSinceLastMessage-$.daysSinceLastMessage).slice(0,r.value)),d=y(()=>n.value==="desc"?"🤿 潜水榜 - 潜水最久":"🤿 潜水榜 - 最近冒泡"),v=y(()=>n.value==="desc"?"距离上次发言时间最久的成员":"最近发言过的成员"),m=y(()=>{const i=c.value.length*36;return Math.max(i+30,180)}),_={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#06b6d4"},{offset:1,color:"#22d3ee"}]};function f(i){return i===0?"今天":i===1?"昨天":`${i} 天前`}const u=y(()=>{if(c.value.length===0)return{};const i=[...c.value].reverse(),p=i.map(b=>ye(b.name,a.value.labelMaxLength)),$=Math.max(...c.value.map(b=>b.daysSinceLastMessage),1),h=i.map(b=>({value:b.daysSinceLastMessage,itemStyle:{color:_,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:b=>{const k=b[0];if(!k)return"";const w=c.value.length-1-k.dataIndex,R=c.value[w];return`
|
|
40
|
+
<div style="padding: 4px 8px;">
|
|
41
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${R.name}</div>
|
|
42
|
+
<div style="margin-bottom: 4px;">🤿 ${f(R.daysSinceLastMessage)}</div>
|
|
43
|
+
<div style="font-size: 12px; color: #9ca3af;">最后发言: ${Xt(R.lastMessageTs)}</div>
|
|
44
|
+
</div>
|
|
45
|
+
`}},grid:{left:a.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:$*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:p,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(b,k)=>{const R=c.value.length-1-k+1;return`${R===1?"🥇":R===2?"🥈":R===3?"🥉":`${R}.`} ${b}`}}},series:[{type:"bar",data:h,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:b=>{const k=c.value.length-1-b.dataIndex,w=c.value[k];return f(w.daysSinceLastMessage)},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(0, 0, 0, 0.2)"}}}]}});return(i,p)=>(o(),C(e(E),{title:d.value,description:v.value,scrollable:"","max-height-vh":l.maxHeightVh},{headerRight:I(()=>[s("div",kn,[l.showTopNSelect?(o(),C(e(re),{key:0,modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=$=>r.value=$)},null,8,["modelValue"])):A("",!0),x(e(ie),{modelValue:n.value,"onUpdate:modelValue":p[1]||(p[1]=$=>n.value=$),items:[{label:"潜水最久",value:"desc"},{label:"最近冒泡",value:"asc"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[s("div",wn,[x(e(te),{option:u.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),$n={class:"px-3 py-2"},Cn=U({__name:"EChartConsecutiveRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=fe(),n=y(()=>[...t.items].sort((m,_)=>_.maxConsecutiveDays-m.maxConsecutiveDays).slice(0,t.topN)),r=y(()=>{const m=n.value.length*36;return Math.max(m+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]},d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ec4899"},{offset:1,color:"#f472b6"}]},v=y(()=>{if(n.value.length===0)return{};const m=[...n.value].reverse(),_=m.map(u=>ye(u.name,a.value.labelMaxLength)),f=Math.max(...n.value.map(u=>u.maxConsecutiveDays),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:u=>{if(!u||u.length===0)return"";const i=u[0].dataIndex,p=n.value.length-1-i,$=n.value[p];let h=`
|
|
46
|
+
<div style="padding: 6px 8px;">
|
|
47
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${$.name}</div>
|
|
48
|
+
<div>最长连续: <b style="color: #f472b6;">${$.maxConsecutiveDays}</b> 天</div>
|
|
49
|
+
`;return $.currentStreak>0&&(h+=`<div style="color: #f97316;">🔥 当前连续 ${$.currentStreak} 天</div>`),h+="</div>",h}},legend:{show:!1},grid:{left:a.value.gridLeft,right:75,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:f*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:_,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(u,i)=>{const $=n.value.length-1-i+1;return`${$===1?"🥇":$===2?"🥈":$===3?"🥉":`${$}.`} ${u}`}}},series:[{name:"当前连续",type:"bar",data:m.map(u=>({value:u.currentStreak>0?u.maxConsecutiveDays:0,itemStyle:{color:c,borderRadius:[0,4,4,0]}})),barWidth:18,barGap:"-100%",label:{show:!0,position:"right",distance:8,formatter:u=>{const i=n.value.length-1-u.dataIndex,p=n.value[i];return p.currentStreak>0?`${p.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}},{name:"已中断",type:"bar",data:m.map(u=>({value:u.currentStreak===0?u.maxConsecutiveDays:0,itemStyle:{color:d,borderRadius:[0,4,4,0]}})),barWidth:18,label:{show:!0,position:"right",distance:8,formatter:u=>{const i=n.value.length-1-u.dataIndex,p=n.value[i];return p.currentStreak===0?`${p.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(m,_)=>l.bare?(o(),C(e(ge),{key:0,"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:I(()=>[x(e(te),{option:v.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:I(()=>[s("div",$n,[x(e(te),{option:v.value,height:r.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Tn={class:"px-3 py-2"},In=U({__name:"EChartNightOwlRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=fe(),n=y(()=>t.items.slice(0,t.topN)),r=y(()=>{const v=n.value.length*36;return Math.max(v+50,200)}),c={h23:"#8b5cf6",h0:"#3b82f6",h1:"#06b6d4",h2:"#f59e0b",h3to4:"#ef4444"},d=y(()=>{if(n.value.length===0)return{};const v=[...n.value].reverse(),m=v.map(f=>ye(f.name,a.value.labelMaxLength)),_=Math.max(...n.value.map(f=>f.totalNightMessages),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:f=>{if(!f||f.length===0)return"";const u=f[0].dataIndex,i=n.value.length-1-u,p=n.value[i],$=p.hourlyBreakdown;return`
|
|
50
|
+
<div style="padding: 6px 8px;">
|
|
51
|
+
<div style="font-weight: bold; margin-bottom: 6px;">${p.name}</div>
|
|
52
|
+
<div style="margin-bottom: 4px;">
|
|
53
|
+
称号: <b style="color: #f472b6;">${p.title}</b>
|
|
54
|
+
</div>
|
|
55
|
+
<div style="margin-bottom: 6px;">总发言: <b>${p.totalNightMessages}</b> 条</div>
|
|
56
|
+
<div style="border-top: 1px solid #374151; padding-top: 6px;">
|
|
57
|
+
<div><span style="color: ${c.h23};">●</span> 23点: ${$.h23} 条</div>
|
|
58
|
+
<div><span style="color: ${c.h0};">●</span> 0点: ${$.h0} 条</div>
|
|
59
|
+
<div><span style="color: ${c.h1};">●</span> 1点: ${$.h1} 条</div>
|
|
60
|
+
<div><span style="color: ${c.h2};">●</span> 2点: ${$.h2} 条</div>
|
|
61
|
+
<div><span style="color: ${c.h3to4};">●</span> 3-4点: ${$.h3to4} 条</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`}},legend:{show:!0,bottom:0,itemWidth:12,itemHeight:12,textStyle:{color:"#6b7280",fontSize:10}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:35,containLabel:!1},xAxis:{type:"value",max:_*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(f,u)=>{const p=n.value.length-1-u+1;return`${p===1?"🥇":p===2?"🥈":p===3?"🥉":`${p}.`} ${f}`}}},series:[{name:"23点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h23),itemStyle:{color:c.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h0),itemStyle:{color:c.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h1),itemStyle:{color:c.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h2),itemStyle:{color:c.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h3to4),itemStyle:{color:c.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:f=>{const u=n.value.length-1-f.dataIndex;return`${n.value[u].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(v,m)=>l.bare?(o(),C(e(ge),{key:0,"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:I(()=>[x(e(te),{option:d.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:I(()=>[s("div",Tn,[x(e(te),{option:d.value,height:r.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Sn={id:"streak-rank",class:"scroll-mt-24"},Vn={class:"flex items-center gap-3"},Rn=U({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=S(null),n=S(!1),r=S("max"),c=S(t.globalTopN??10);z(()=>t.globalTopN,f=>{f!==void 0&&(c.value=f)});const d=y(()=>r.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),v=y(()=>r.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),m=y(()=>a.value?a.value.streakRank.some(f=>f.currentStreak>0):!1);async function _(){if(t.sessionId){n.value=!0;try{a.value=await Q().getCheckInAnalysis(t.sessionId,t.timeFilter)}catch(f){console.error("加载打卡分析失败:",f)}finally{n.value=!1}}}return z(()=>[t.sessionId,t.timeFilter],()=>{_()},{immediate:!0,deep:!0}),(f,u)=>(o(),T("div",Sn,[n.value?(o(),C(e(ae),{key:0,text:"正在分析数据..."})):a.value&&a.value.streakRank.length>0?(o(),C(e(E),{key:1,title:d.value,description:v.value},{headerRight:I(()=>[s("div",Vn,[l.showTopNSelect?(o(),C(e(re),{key:0,modelValue:c.value,"onUpdate:modelValue":u[0]||(u[0]=i=>c.value=i)},null,8,["modelValue"])):A("",!0),m.value?(o(),C(e(ie),{key:1,modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=i=>r.value=i),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):A("",!0)])]),default:I(()=>[x(e(gn),{items:a.value.streakRank,title:d.value,mode:r.value,"top-n":c.value,bare:""},null,8,["items","title","mode","top-n"])]),_:1},8,["title","description"])):(o(),C(e(E),{key:2,title:"🔥 火花榜"},{default:I(()=>[x(e(le),{text:"暂无连续发言数据"})]),_:1}))]))}}),Mn={class:"flex items-center gap-3"},Ln={key:1,class:"py-8 text-center text-sm text-gray-400"},Dn={key:1,class:"py-8 text-center text-sm text-gray-400"},Nn=U({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=S(null),n=S(!1),r=S("count"),c=S(t.globalTopN??10);z(()=>t.globalTopN,p=>{p!==void 0&&(c.value=p)});async function d(){if(t.sessionId){n.value=!0;try{a.value=await Q().getMemeBattleAnalysis(t.sessionId,t.timeFilter)}catch(p){console.error("加载斗图分析失败:",p)}finally{n.value=!1}}}const v=y(()=>a.value?a.value.rankByCount.map(p=>({id:p.memberId.toString(),name:p.name,value:p.count,percentage:p.percentage})):[]),m=y(()=>a.value?a.value.rankByImageCount.map(p=>({id:p.memberId.toString(),name:p.name,value:p.count,percentage:p.percentage})):[]),_=y(()=>r.value==="count"?v.value:m.value),f=y(()=>r.value==="count"?"场":"张"),u=y(()=>{switch(r.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),i=y(()=>{switch(r.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return z(()=>[t.sessionId,t.timeFilter],()=>d(),{immediate:!0,deep:!0}),(p,$)=>n.value?(o(),C(e(ae),{key:0,text:"正在统计斗图数据..."})):a.value?(o(),C(e(E),{key:1,title:u.value,description:i.value},{headerRight:I(()=>[s("div",Mn,[l.showTopNSelect?(o(),C(e(re),{key:0,modelValue:c.value,"onUpdate:modelValue":$[0]||($[0]=h=>c.value=h)},null,8,["modelValue"])):A("",!0),x(e(ie),{modelValue:r.value,"onUpdate:modelValue":$[1]||($[1]=h=>r.value=h),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[r.value==="battle"?(o(),T(q,{key:0},[a.value.topBattles.length>0?(o(),C(e(yn),{key:0,battles:a.value.topBattles,title:"","top-n":c.value,bare:""},null,8,["battles","top-n"])):(o(),T("div",Ln,"暂无史诗级战役数据"))],64)):(o(),T(q,{key:1},[_.value.length>0?(o(),C(e(Se),{key:0,members:_.value,title:u.value,unit:f.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),T("div",Dn,"暂无斗图数据"))],64))]),_:1},8,["title","description"])):A("",!0)}}),An={class:"space-y-6"},Un={class:"flex items-center gap-3"},Fn={class:"flex items-center gap-3"},Bn={key:1,class:"px-3 py-2"},qn=U({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=S(null),n=S(!1),r=S("originator"),c=S("fastest"),d=S(t.globalTopN??10),v=S(t.globalTopN??10);z(()=>t.globalTopN,w=>{w!==void 0&&(d.value=w,v.value=w)});async function m(){if(t.sessionId){n.value=!0;try{a.value=await Q().getRepeatAnalysis(t.sessionId,t.timeFilter)}catch(w){console.error("加载复读分析失败:",w)}finally{n.value=!1}}}const _=y(()=>a.value?a.value.originators.map(w=>({id:w.memberId.toString(),name:w.name,value:w.count,percentage:w.percentage})):[]),f=y(()=>a.value?a.value.initiators.map(w=>({id:w.memberId.toString(),name:w.name,value:w.count,percentage:w.percentage})):[]),u=y(()=>a.value?a.value.breakers.map(w=>({id:w.memberId.toString(),name:w.name,value:w.count,percentage:w.percentage})):[]),i=y(()=>{switch(r.value){case"originator":return _.value;case"initiator":return f.value;case"breaker":return u.value;default:return _.value}}),p=y(()=>{switch(r.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),$=y(()=>{switch(r.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),h=y(()=>{if(!a.value)return{labels:[],values:[]};const w=a.value.chainLengthDistribution;return{labels:w.map(R=>`${R.length}人`),values:w.map(R=>R.count)}}),b=y(()=>c.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),k=y(()=>{if(c.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const w=a.value?.totalRepeatChains??0,R=a.value?.avgChainLength??0;return`共 ${w} 次复读,平均 ${R} 人参与`});return z(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),(w,R)=>(o(),T("div",An,[n.value?(o(),C(e(ae),{key:0,text:"正在分析复读数据..."})):a.value&&a.value.totalRepeatChains>0?(o(),T(q,{key:1},[x(e(E),{title:p.value,description:$.value},{headerRight:I(()=>[s("div",Un,[l.showTopNSelect?(o(),C(e(re),{key:0,modelValue:d.value,"onUpdate:modelValue":R[0]||(R[0]=P=>d.value=P)},null,8,["modelValue"])):A("",!0),x(e(ie),{modelValue:r.value,"onUpdate:modelValue":R[1]||(R[1]=P=>r.value=P),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[i.value.length>0?(o(),C(e(Se),{key:0,members:i.value,title:p.value,unit:"次","top-n":d.value,bare:""},null,8,["members","title","top-n"])):(o(),C(e(le),{key:1,text:"暂无数据"}))]),_:1},8,["title","description"]),x(e(E),{title:b.value,description:k.value},{headerRight:I(()=>[s("div",Fn,[l.showTopNSelect&&c.value==="fastest"?(o(),C(e(re),{key:0,modelValue:v.value,"onUpdate:modelValue":R[2]||(R[2]=P=>v.value=P)},null,8,["modelValue"])):A("",!0),x(e(ie),{modelValue:c.value,"onUpdate:modelValue":R[3]||(R[3]=P=>c.value=P),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[c.value==="fastest"?(o(),T(q,{key:0},[a.value.fastestRepeaters&&a.value.fastestRepeaters.length>0?(o(),C(e(xn),{key:0,items:a.value.fastestRepeaters,"top-n":v.value,title:"",bare:""},null,8,["items","top-n"])):(o(),C(e(le),{key:1,text:"暂无最快复读数据"}))],64)):(o(),T("div",Bn,[h.value.labels.length>0?(o(),C(e(Et),{key:0,data:h.value,height:200},null,8,["data"])):(o(),C(e(le),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(o(),C(e(E),{key:2,title:"🔁 复读榜"},{default:I(()=>[x(e(le),{text:"该群组暂无复读记录"})]),_:1}))]))}}),zn=U({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(l){const t=l,a=S(null),n=S(!1);async function r(){if(t.sessionId){n.value=!0;try{a.value=await Q().getDivingAnalysis(t.sessionId,t.timeFilter)}catch(c){console.error("加载潜水分析失败:",c)}finally{n.value=!1}}}return z(()=>[t.sessionId,t.timeFilter],()=>r(),{immediate:!0,deep:!0}),(c,d)=>n.value?(o(),C(e(ae),{key:0,text:"正在统计潜水数据..."})):a.value&&a.value.rank.length>0?(o(),C(e(_n),{key:1,items:a.value.rank,"global-top-n":l.globalTopN},null,8,["items","global-top-n"])):A("",!0)}}),Hn={class:"space-y-6"},En={class:"flex items-center gap-3"},Pn={key:1,class:"py-8 text-center text-sm text-gray-400"},On={key:1,class:"py-8 text-center text-sm text-gray-400"},Wn={class:"flex items-center gap-3"},Kn={key:1,class:"py-8 text-center text-sm text-gray-400"},jn=U({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=S(null),n=S(!1),r=S("first"),c=S("distribution"),d=S(t.globalTopN??10),v=S(t.globalTopN??10);z(()=>t.globalTopN,b=>{b!==void 0&&(d.value=b,v.value=b)});async function m(){if(t.sessionId){n.value=!0;try{a.value=await Q().getNightOwlAnalysis(t.sessionId,t.timeFilter)}catch(b){console.error("加载出勤分析失败:",b)}finally{n.value=!1}}}const _=y(()=>a.value?a.value.lastSpeakerRank.map(b=>({id:String(b.memberId),name:b.name,value:b.count,percentage:b.percentage})):[]),f=y(()=>a.value?a.value.firstSpeakerRank.map(b=>({id:String(b.memberId),name:b.name,value:b.count,percentage:b.percentage})):[]),u=y(()=>r.value==="last"?_.value:f.value),i=y(()=>r.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),p=y(()=>{const b=a.value?.totalDays??0;return r.value==="last"?`每天最后一个发言的人(共 ${b} 天)`:`每天第一个发言的人(共 ${b} 天)`}),$=y(()=>c.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),h=y(()=>c.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return z(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),(b,k)=>(o(),T("div",Hn,[n.value?(o(),C(e(ae),{key:0,text:"正在加载出勤分析..."})):a.value?(o(),T(q,{key:1},[x(e(E),{title:$.value,description:h.value},{headerRight:I(()=>[s("div",En,[l.showTopNSelect?(o(),C(e(re),{key:0,modelValue:d.value,"onUpdate:modelValue":k[0]||(k[0]=w=>d.value=w)},null,8,["modelValue"])):A("",!0),x(e(ie),{modelValue:c.value,"onUpdate:modelValue":k[1]||(k[1]=w=>c.value=w),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[c.value==="distribution"?(o(),T(q,{key:0},[a.value.nightOwlRank.length>0?(o(),C(e(In),{key:0,items:a.value.nightOwlRank,"top-n":d.value,title:"",bare:""},null,8,["items","top-n"])):(o(),T("div",Pn,"暂无深夜发言数据"))],64)):(o(),T(q,{key:1},[a.value.consecutiveRecords.length>0?(o(),C(e(Cn),{key:0,items:a.value.consecutiveRecords,"top-n":d.value,title:"",bare:""},null,8,["items","top-n"])):(o(),T("div",On,"暂无连续记录"))],64))]),_:1},8,["title","description"]),x(e(E),{title:i.value,description:p.value},{headerRight:I(()=>[s("div",Wn,[l.showTopNSelect?(o(),C(e(re),{key:0,modelValue:v.value,"onUpdate:modelValue":k[2]||(k[2]=w=>v.value=w)},null,8,["modelValue"])):A("",!0),x(e(ie),{modelValue:r.value,"onUpdate:modelValue":k[3]||(k[3]=w=>r.value=w),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[u.value.length>0?(o(),C(e(Se),{key:0,members:u.value,title:i.value,"top-n":v.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(o(),T("div",Kn,"暂无数据"))]),_:1},8,["title","description"])],64)):A("",!0)]))}}),Gn={class:"mb-8 mt-4"},Yn={class:"text-5xl tracking-wider",style:{"font-weight":"800",background:"linear-gradient(to right, #f59e0b, #ec4899, #9333ea)","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}},Xn={id:"activity-rank",class:"scroll-mt-24"},Zn={id:"meme-battle",class:"scroll-mt-24"},Jn={id:"repeat",class:"scroll-mt-24"},Qn={id:"night-owl",class:"scroll-mt-24"},el={id:"diving",class:"scroll-mt-24"},tl={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},al={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},sl={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},ol=["onClick"],nl=U({__name:"OverallRankingTab",props:{sessionId:{},timeFilter:{}},setup(l){const t=l,a=S([]),n=S([]);async function r(){if(!t.sessionId)return;const h=Q(),[b,k]=await Promise.all([h.getMemberActivity(t.sessionId,t.timeFilter),h.getAvailableYears(t.sessionId)]);a.value=b,n.value=k}z(()=>[t.sessionId,t.timeFilter],()=>r(),{immediate:!0,deep:!0});const c=y(()=>{if(t.timeFilter?.startTs&&t.timeFilter?.endTs){const h=new Date(t.timeFilter.startTs*1e3).getFullYear(),b=new Date(t.timeFilter.endTs*1e3).getFullYear();return h===b?`${h} 赛季`:`${h}-${b} 赛季`}if(n.value.length>0){const h=[...n.value].sort((w,R)=>w-R),b=h[0],k=h[h.length-1];return b===k?`${b} 赛季`:`${b}-${k} 赛季`}return"全部赛季"}),d=y(()=>({startTs:t.timeFilter?.startTs,endTs:t.timeFilter?.endTs})),v=[{id:"activity-rank",label:"🏆 活跃榜"},{id:"streak-rank",label:"🔥 火花榜"},{id:"meme-battle",label:"⚔️ 斗图榜"},{id:"repeat",label:"🔁 复读榜"},{id:"night-owl",label:"⏰ 出勤榜"},{id:"diving",label:"🤿 潜水榜"}],{contentRef:m,activeAnchor:_,scrollToAnchor:f}=Jt(v,{threshold:350}),u=S(10),i=S("standard");ht(Qe,i);const p=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],$=y(()=>et[i.value].contentClass);return(h,b)=>(o(),T("div",{ref_key:"contentRef",ref:m,class:"flex gap-6 p-6"},[s("div",{class:K(["main-content mx-auto min-w-0 flex-1 space-y-6 px-8",$.value])},[s("div",Gn,[s("h1",Yn," 🏆 "+g(c.value),1),b[1]||(b[1]=s("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),s("div",Xn,[x(e(mn),{"session-id":t.sessionId,"member-activity":a.value,"time-filter":d.value,"global-top-n":u.value},null,8,["session-id","member-activity","time-filter","global-top-n"])]),x(e(Rn),{"session-id":t.sessionId,"time-filter":d.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"]),s("div",Zn,[x(e(Nn),{"session-id":t.sessionId,"time-filter":d.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",Jn,[x(e(qn),{"session-id":t.sessionId,"time-filter":d.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",Qn,[x(e(jn),{"session-id":t.sessionId,"time-filter":d.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",el,[x(e(zn),{"session-id":t.sessionId,"time-filter":d.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"])]),b[2]||(b[2]=s("div",{class:"h-48 no-capture"},null,-1))],2),x(e(sa),{anchors:v,"active-anchor":e(_),onClick:e(f)},{default:I(()=>[s("div",tl,[b[3]||(b[3]=s("div",{class:"mb-2 text-xs text-gray-400"},"显示数量",-1)),x(e(re),{modelValue:u.value,"onUpdate:modelValue":b[0]||(b[0]=k=>u.value=k)},null,8,["modelValue"])]),s("div",al,[b[4]||(b[4]=s("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),s("div",sl,[(o(),T(q,null,X(p,k=>s("button",{key:k.value,type:"button",class:K(["rounded-md px-2 py-1 transition",i.value===k.value?"bg-pink-500 text-white shadow-sm":"text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800"]),onClick:w=>i.value=k.value},g(k.label),11,ol)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),ll={class:"flex h-full flex-col"},il={class:"min-h-0 flex-1 overflow-y-auto"},rl={key:1,class:"main-content mx-auto w-full max-w-3xl p-6"},ul=U({__name:"RankingView",props:{sessionId:{},timeFilter:{}},setup(l){const t=l,{t:a,locale:n}=Z(),r=S("overall"),c=S(null),d=y(()=>gt("groupRanking",n.value)),v=y(()=>[...d.value?[{id:"overall",label:a("analysis.subTabs.ranking.overall"),icon:"i-heroicons-trophy"}]:[],{id:"hot-repeat",label:a("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-sparkles"},{id:"catchphrase",label:a("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"},{id:"keyword",label:a("analysis.subTabs.ranking.keyword"),icon:"i-heroicons-magnifying-glass"}]),m=y(()=>({startTs:t.timeFilter?.startTs,endTs:t.timeFilter?.endTs})),_=y(()=>({...m.value,memberId:c.value}));return z(v,f=>{f.some(u=>u.id===r.value)||(r.value=f[0]?.id??"hot-repeat")},{immediate:!0}),(f,u)=>(o(),T("div",ll,[x(e(Ue),{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=i=>r.value=i),items:v.value,"persist-key":"groupRankingTab"},{right:I(()=>[r.value==="catchphrase"?(o(),C(Ge,{key:0,modelValue:c.value,"onUpdate:modelValue":u[0]||(u[0]=i=>c.value=i),"session-id":t.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),s("div",il,[x(Te,{name:"fade",mode:"out-in"},{default:I(()=>[r.value==="overall"?(o(),C(nl,{key:0,"session-id":t.sessionId,"time-filter":m.value},null,8,["session-id","time-filter"])):r.value==="keyword"?(o(),T("div",rl,[x(un,{"session-id":t.sessionId,"time-filter":m.value},null,8,["session-id","time-filter"])])):r.value==="hot-repeat"?(o(),C(e(To),{key:2,"session-id":t.sessionId,"time-filter":m.value},null,8,["session-id","time-filter"])):r.value==="catchphrase"?(o(),C(e(po),{key:3,"session-id":t.sessionId,"time-filter":_.value},null,8,["session-id","time-filter"])):A("",!0)]),_:1})])]))}}),cl=Ie(ul,[["__scopeId","data-v-d8d145dc"]]),dl={class:"main-content max-w-5xl p-6"},ml={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},vl={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},pl={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},hl={class:"flex flex-1 flex-wrap items-center gap-2"},gl={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},fl={class:"text-xs text-gray-400"},yl={key:0,class:"text-gray-300 dark:text-gray-600"},bl=U({__name:"NicknameHistory",props:{sessionId:{}},setup(l){const{t}=Z(),a=l,n=S([]),r=S([]),c=S(!1);function d(_){return _.groupNickname||_.accountName||_.platformId}async function v(){if(a.sessionId)try{n.value=await Q().getMembers(a.sessionId)}catch(_){console.error("加载成员列表失败:",_)}}async function m(){if(!a.sessionId||n.value.length===0)return;c.value=!0;const _=[];try{const f=n.value.map(i=>Q().getMemberNameHistory(a.sessionId,i.id)),u=await Promise.all(f);n.value.forEach((i,p)=>{const $=u[p];$.length>2&&_.push({memberId:i.id,name:d(i),history:$})}),r.value=_}catch(f){console.error("加载昵称变更记录失败:",f)}finally{c.value=!1}}return z(()=>a.sessionId,async()=>{await v()},{immediate:!0}),z(()=>n.value.length,()=>{n.value.length>0&&m()}),$e(async()=>{n.value.length===0&&await v()}),(_,f)=>{const u=je;return o(),T("div",dl,[s("p",ml,g(e(t)("members.nicknameHistory.note")),1),x(e(E),{title:e(t)("members.nicknameHistory.title"),description:c.value?e(t)("members.nicknameHistory.loading"):r.value.length>0?e(t)("members.nicknameHistory.hasChanges",{count:r.value.length}):e(t)("members.nicknameHistory.noChanges")},{default:I(()=>[!c.value&&r.value.length>0?(o(),T("div",vl,[(o(!0),T(q,null,X(r.value,i=>(o(),T("div",{key:i.memberId,class:"flex items-start gap-3 px-5 py-3"},[s("div",pl,g(i.name),1),s("div",hl,[(o(!0),T(q,null,X(i.history,(p,$)=>(o(),T(q,{key:$},[s("div",gl,[s("span",{class:K(["text-sm",p.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},g(p.name),3),p.endTs===null?(o(),C(u,{key:0,color:"primary",variant:"soft",size:"xs"},{default:I(()=>[Y(g(e(t)("members.nicknameHistory.current")),1)]),_:1})):A("",!0),s("span",fl,"("+g(e(Zt)(p.startTs,p.endTs))+")",1)]),$<i.history.length-1?(o(),T("span",yl,"→")):A("",!0)],64))),128))])]))),128))])):c.value?(o(),C(e(ae),{key:2,text:e(t)("members.nicknameHistory.loadingText")},null,8,["text"])):(o(),C(e(le),{key:1,text:e(t)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),xl={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},kl={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},wl={class:"text-lg font-semibold text-gray-900 dark:text-white"},_l={class:"flex-1 overflow-auto"},$l=U({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(l){const{t}=Z(),a=l,n=S(!1);return(r,c)=>{const d=pe,v=Ce;return o(),T(q,null,[x(d,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:c[0]||(c[0]=m=>n.value=!0)},{default:I(()=>[Y(g(e(t)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),a.sessionId?(o(),C(v,{key:0,open:n.value,"onUpdate:open":c[2]||(c[2]=m=>n.value=m),ui:{content:"max-w-6xl h-[85vh]"}},{content:I(()=>[s("div",xl,[s("div",kl,[s("h2",wl,g(e(t)("analysis.subTabs.member.nicknameHistory")),1),x(d,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:c[1]||(c[1]=m=>n.value=!1)})]),s("div",_l,[x(bl,{"session-id":a.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):A("",!0)],64)}}}),Cl={class:"flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},Tl={class:"relative flex-1 overflow-y-auto"},Il={class:"h-full"},Sl={key:2,class:"flex h-full items-center justify-center"},Vl={class:"text-gray-500"},Rl={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Ml={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},Ll={class:"text-lg font-semibold text-gray-900 dark:text-white"},Dl={class:"text-sm text-gray-500 dark:text-gray-400"},Nl={class:"flex items-center gap-2"},Al={class:"flex-1 overflow-hidden"},Ul=U({__name:"index",setup(l){const t=_t(()=>$t(()=>import("./MessageExportModal-CFbovWh1.js"),__vite__mapDeps([0,1,2,3]))),{t:a}=Z(),n=kt(),r=wt(),c=ft(),d=Fe(),v=yt(),{currentSessionId:m}=bt(c),_=S(!1),f=S(!1),u=S(!1),i=S(!1),p=S(!1);function $(){d.openChatRecordDrawer({})}const h=[{id:"overview",labelKey:"analysis.tabs.overview",icon:"i-heroicons-chart-pie"},{id:"view",labelKey:"analysis.tabs.view",icon:"i-heroicons-presentation-chart-bar"},{id:"ranking",labelKey:"analysis.tabs.ranking",icon:"i-heroicons-trophy"},{id:"ai-chat",labelKey:"analysis.tabs.aiChat",icon:"i-heroicons-chat-bubble-left-ellipsis"},{id:"lab",labelKey:"analysis.tabs.lab",icon:"i-heroicons-beaker"}],b=y(()=>v.debugMode?[...h,{id:"debug",labelKey:"analysis.tabs.debug",icon:"i-heroicons-bug-ant"}]:h),k=y(()=>b.value.map(J=>J.id)),{activeTab:w,isLoading:R,isInitialLoad:P,session:O,memberActivity:F,hourlyActivity:B,dailyActivity:H,messageTypes:se,timeRangeValue:G,fullTimeRange:ee,availableYears:j,timeFilter:L,initialTimeState:W,loadData:de}=Mt({route:n,router:r,currentSessionId:m,selectSession:c.selectSession,defaultTab:v.defaultSessionTab,validTabIds:k.value}),we=y(()=>F.value.slice(0,3)),Ve=y(()=>F.value.length<=1?[]:[...F.value].sort((J,N)=>J.messageCount-N.messageCount).slice(0,1)),Re=y(()=>F.value.reduce((J,N)=>J+N.messageCount,0)),ne=y(()=>F.value.filter(J=>J.messageCount>0).length);return(J,N)=>{const Me=pe,V=Ce;return o(),T("div",Cl,[e(P)?(o(),C(ae,{key:0,variant:"page",text:e(a)("analysis.groupChat.loading")},null,8,["text"])):e(O)?(o(),T(q,{key:1},[x(Lt,{"active-tab":e(w),"onUpdate:activeTab":N[0]||(N[0]=M=>He(w)?w.value=M:null),"time-range-value":e(G),"onUpdate:timeRangeValue":N[1]||(N[1]=M=>He(G)?G.value=M:null),title:e(O).name,avatar:e(O).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:b.value,"current-session-id":e(m),"initial-time-state":e(W),onOpenIncrementalImport:N[2]||(N[2]=M=>u.value=!0),onOpenMemberManagement:N[3]||(N[3]=M=>p.value=!0),onOpenChatRecord:$,"onUpdate:fullRange":N[4]||(N[4]=M=>ee.value=M),"onUpdate:availableYears":N[5]||(N[5]=M=>j.value=M)},null,8,["active-tab","time-range-value","title","avatar","tabs","current-session-id","initial-time-state"]),s("div",Tl,[e(R)?(o(),C(ae,{key:0,variant:"overlay"})):A("",!0),s("div",Il,[x(Te,{name:"tab-slide",mode:"out-in"},{default:I(()=>[e(w)==="overview"?(o(),C(Da,{key:"overview-"+e(m),session:e(O),"member-activity":e(F),"top-members":we.value,"bottom-members":Ve.value,"message-types":e(se),"hourly-activity":e(B),"daily-activity":e(H),"time-range":e(ee),"filtered-message-count":Re.value,"filtered-member-count":ne.value,"time-filter":e(L)},null,8,["session","member-activity","top-members","bottom-members","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):e(w)==="view"?(o(),C(Ro,{key:"view-"+e(m),"session-id":e(m),"session-name":e(O).name,"time-filter":e(L)},null,8,["session-id","session-name","time-filter"])):e(w)==="ranking"?(o(),C(cl,{key:"ranking-"+e(m),"session-id":e(m),"time-filter":e(L)},null,8,["session-id","time-filter"])):e(w)==="ai-chat"?(o(),C(e(Ut),{key:"ai-chat-"+e(m),"session-id":e(m),"session-name":e(O).name,"chat-type":"group"},null,8,["session-id","session-name"])):e(w)==="memory"?(o(),C(Ft,{key:"memory-"+e(m),"session-id":e(m),"session-name":e(O).name},null,8,["session-id","session-name"])):e(w)==="lab"?(o(),C(Bt,{key:"lab-"+e(m),"session-id":e(m),"chat-type":"group"},null,8,["session-id"])):e(w)==="debug"?(o(),C(e(qt),{key:"debug-"+e(m),"session-id":e(m)},null,8,["session-id"])):A("",!0)]),_:1})])]),x(Dt,{onOpenIncrementalImport:N[6]||(N[6]=M=>u.value=!0),onOpenSemanticIndex:N[7]||(N[7]=M=>_.value=!0),onOpenMemberManagement:N[8]||(N[8]=M=>p.value=!0),onOpenChatRecord:$,onOpenMessageExport:N[9]||(N[9]=M=>i.value=!0)})],64)):(o(),T("div",Sl,[s("p",Vl,g(e(a)("analysis.groupChat.loadError")),1)])),e(m)&&e(O)?(o(),C(Nt,{key:3,modelValue:_.value,"onUpdate:modelValue":N[10]||(N[10]=M=>_.value=M),"session-id":e(m),"message-count":e(O).messageCount},null,8,["modelValue","session-id","message-count"])):A("",!0),e(m)&&e(O)?(o(),C(xt,{key:4,modelValue:f.value,"onUpdate:modelValue":N[11]||(N[11]=M=>f.value=M),"session-id":e(m),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):A("",!0),e(m)&&e(O)?(o(),C(At,{key:5,modelValue:u.value,"onUpdate:modelValue":N[12]||(N[12]=M=>u.value=M),"session-id":e(m),"session-name":e(O).name,onImported:N[13]||(N[13]=()=>{e(de)(),e(c).loadSessions()})},null,8,["modelValue","session-id","session-name"])):A("",!0),e(m)?(o(),C(e(t),{key:6,modelValue:i.value,"onUpdate:modelValue":N[14]||(N[14]=M=>i.value=M)},null,8,["modelValue"])):A("",!0),e(m)?(o(),C(V,{key:7,open:p.value,"onUpdate:open":N[16]||(N[16]=M=>p.value=M),ui:{content:"max-w-6xl h-[85vh]"}},{content:I(()=>[s("div",Rl,[s("div",Ml,[s("div",null,[s("h2",Ll,g(e(a)("analysis.tooltip.memberManagement")),1),s("p",Dl,g(e(a)("members.list.description",{count:e(O)?.memberCount??0})),1)]),s("div",Nl,[x($l,{"session-id":e(m)},null,8,["session-id"]),x(Me,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:N[15]||(N[15]=M=>p.value=!1)})])]),s("div",Al,[x(zt,{"session-id":e(m),"show-header":!1,"chat-type":"group",onDataChanged:e(de)},null,8,["session-id","onDataChanged"])])])]),_:1},8,["open"])):A("",!0)])}}}),Xl=Ie(Ul,[["__scopeId","data-v-d9741d3c"]]);export{Xl as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.fade-enter-active[data-v-
|
|
1
|
+
.fade-enter-active[data-v-777ccdbf],.fade-leave-active[data-v-777ccdbf]{transition:opacity .15s ease}.fade-enter-from[data-v-777ccdbf],.fade-leave-to[data-v-777ccdbf]{opacity:0}.tab-slide-enter-active[data-v-4d6acacd],.tab-slide-leave-active[data-v-4d6acacd]{transition:opacity .2s ease,transform .2s ease}.tab-slide-enter-from[data-v-4d6acacd]{opacity:0;transform:translateY(10px)}.tab-slide-leave-to[data-v-4d6acacd]{opacity:0;transform:translateY(-10px)}
|