chatlab-cli 0.34.3 → 0.36.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.
Files changed (184) hide show
  1. package/dist/{chat-command-QH7DXCAJ.mjs → chat-command-SXW67RF7.mjs} +9 -9
  2. package/dist/{chunk-AWXHYTD5.mjs → chunk-4YPNYQSP.mjs} +701 -7065
  3. package/dist/chunk-4YPNYQSP.mjs.map +1 -0
  4. package/dist/{chunk-SWUTRDGZ.mjs → chunk-AAGDVTP2.mjs} +2 -2
  5. package/dist/{chunk-ZVGDOSGG.mjs → chunk-BSGLH6G3.mjs} +188 -41
  6. package/dist/chunk-BSGLH6G3.mjs.map +1 -0
  7. package/dist/{chunk-2Q3HHVTS.mjs → chunk-CNEWMCGX.mjs} +18 -18
  8. package/dist/{chunk-3X26JJIP.mjs → chunk-GVW3BDGZ.mjs} +3 -3
  9. package/dist/{chunk-WJVE5Q4Y.mjs → chunk-JHON5FN7.mjs} +2 -2
  10. package/dist/{chunk-JYBPJWE2.mjs → chunk-LZGOIRLV.mjs} +13 -23
  11. package/dist/chunk-LZGOIRLV.mjs.map +1 -0
  12. package/dist/chunk-OWOEWZIC.mjs +19072 -0
  13. package/dist/chunk-OWOEWZIC.mjs.map +1 -0
  14. package/dist/{chunk-XIWVJAXH.mjs → chunk-U2NXHIJK.mjs} +34 -24
  15. package/dist/chunk-U2NXHIJK.mjs.map +1 -0
  16. package/dist/{chunk-6U2QZO3N.mjs → chunk-UNIKQFI5.mjs} +2 -2
  17. package/dist/{chunk-C2PD3BS7.mjs → chunk-VDWI4A4U.mjs} +2 -2
  18. package/dist/{chunk-AWGXYFIC.mjs → chunk-XDF6PMVZ.mjs} +2 -2
  19. package/dist/chunk-YKMQLAVP.mjs +25 -0
  20. package/dist/chunk-YKMQLAVP.mjs.map +1 -0
  21. package/dist/cli.mjs +10 -10
  22. package/dist/contacts-worker.mjs +2 -2
  23. package/dist/global-insight-worker.mjs +136 -4
  24. package/dist/global-insight-worker.mjs.map +1 -1
  25. package/dist/{http-D2F4QTQW.mjs → http-LVOGJFDL.mjs} +13 -13
  26. package/dist/{import-H7X2JU2O.mjs → import-7OU57ZHM.mjs} +8 -8
  27. package/dist/index.mjs +13 -13
  28. package/dist/{mcp-UURXRGDF.mjs → mcp-CUKHTTII.mjs} +9 -9
  29. package/dist/people-relationships-worker.mjs +2 -2
  30. package/dist/semantic-index-worker.mjs +1 -1
  31. package/dist/{src-MHCO4HYY.mjs → src-LORFXAUE.mjs} +121 -97
  32. package/dist/{stream-import-BHXACUCA.mjs → stream-import-7YUWIAD6.mjs} +8 -8
  33. package/dist/{worker-runtime-JOUCP2L4.mjs → worker-runtime-GQ5SY7E3.mjs} +6 -6
  34. package/dist-cli-web/assets/AISettingsTab-BmhNcUEh.js +1 -0
  35. package/dist-cli-web/assets/AboutTab-CFklrZt8.js +1 -0
  36. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-B-dIPvcs.js +110 -0
  37. package/dist-cli-web/assets/Alert-DJzXKcec.js +1 -0
  38. package/dist-cli-web/assets/ApiSettingsTab-DvDm421U.js +2 -0
  39. package/dist-cli-web/assets/BatchManageTab-DhIDH3Q1.js +1 -0
  40. package/dist-cli-web/assets/{BufferResource-Dak23r3B.js → BufferResource-DY3P-dGs.js} +1 -1
  41. package/dist-cli-web/assets/CanvasRenderer-As2MJTWZ.js +1 -0
  42. package/dist-cli-web/assets/ChatRecordDrawer-DHdas7Jp.js +1 -0
  43. package/dist-cli-web/assets/ChatRecordWorkspace-CVDPBmcl.js +11 -0
  44. package/dist-cli-web/assets/ChatRecordWorkspace-D_oJMtqh.css +1 -0
  45. package/dist-cli-web/assets/Checkbox-4F1WAuVF.js +1 -0
  46. package/dist-cli-web/assets/DataDirCleanupNotice-jebQ9il3.js +1 -0
  47. package/dist-cli-web/assets/DatePicker.vue_vue_type_script_setup_true_lang-Cal624eP.js +1 -0
  48. package/dist-cli-web/assets/DebugToolsPanel-BLU6SY8a.js +1 -0
  49. package/dist-cli-web/assets/EChart.vue_vue_type_script_setup_true_lang-CsgJ-Xn3.js +1 -0
  50. package/dist-cli-web/assets/EChartLine.vue_vue_type_script_setup_true_lang-BYhukELX.js +1 -0
  51. package/dist-cli-web/assets/EChartWordcloud-C16xh7Tx.js +1 -0
  52. package/dist-cli-web/assets/{Filter-CHKZVYB3.js → Filter-BEtPORqF.js} +1 -1
  53. package/dist-cli-web/assets/GlobalTaskBar-BvNmFO7q.js +1 -0
  54. package/dist-cli-web/assets/GlobalTaskBar-COW_uBX6.css +1 -0
  55. package/dist-cli-web/assets/GroupRelationshipGalaxyView-DEUIrvgz.js +1 -0
  56. package/dist-cli-web/assets/Label-Dgl3ghzT.js +1 -0
  57. package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-CwDIA0UP.js +1 -0
  58. package/dist-cli-web/assets/MessageExportModal-DYjhBuzO.js +1 -0
  59. package/dist-cli-web/assets/PageHeader-CL9AFfvl.js +1 -0
  60. package/dist-cli-web/assets/PageTabs.vue_vue_type_script_setup_true_lang-C22kOxIK.js +1 -0
  61. package/dist-cli-web/assets/{RelationshipGalaxyCanvas-mJhEPzsY.js → RelationshipGalaxyCanvas-BnkcrIpk.js} +3 -3
  62. package/dist-cli-web/assets/{RelationshipGalaxyThreeCanvas-Bf76yzmQ.js → RelationshipGalaxyThreeCanvas-CqdqveEJ.js} +166 -166
  63. package/dist-cli-web/assets/{RelationshipGalaxyThreeCanvas-CMuibfiA.css → RelationshipGalaxyThreeCanvas-TYGOUDiv.css} +1 -1
  64. package/dist-cli-web/assets/{RenderTargetSystem-1rM7OF-M.js → RenderTargetSystem-CPwnC2X3.js} +1 -1
  65. package/dist-cli-web/assets/RovingFocusItem-j33Nsbbn.js +1 -0
  66. package/dist-cli-web/assets/ScreenCaptureModal-ByKxzNQe.js +1 -0
  67. package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-C6EHKB_i.js +1 -0
  68. package/dist-cli-web/assets/Select-jVtfc_xc.js +1 -0
  69. package/dist-cli-web/assets/SettingsModal-CjVax3I6.css +1 -0
  70. package/dist-cli-web/assets/SettingsModal-Dg27piEO.js +2 -0
  71. package/dist-cli-web/assets/StorageTab-QdcDqA6Q.js +1 -0
  72. package/dist-cli-web/assets/Switch-DYHM64k9.js +1 -0
  73. package/dist-cli-web/assets/Tabs-B6Nzq2NQ.js +1 -0
  74. package/dist-cli-web/assets/Tabs-CRZdCcU4.js +1 -0
  75. package/dist-cli-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-Bsq7gpC0.js +1 -0
  76. package/dist-cli-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-BLpQds4F.js +1 -0
  77. package/dist-cli-web/assets/VisuallyHiddenInput-IQpmK9yR.js +1 -0
  78. package/dist-cli-web/assets/{WebGLRenderer-Y0jQtBvK.js → WebGLRenderer-8JHbnkTc.js} +2 -2
  79. package/dist-cli-web/assets/{WebGPURenderer-BcUvCPhd.js → WebGPURenderer-CLWfB4CC.js} +2 -2
  80. package/dist-cli-web/assets/aiChat-4JvxWGXZ.js +8 -0
  81. package/dist-cli-web/assets/base-D6fxqD_X.js +1 -0
  82. package/dist-cli-web/assets/{browserAll-BsR1UaCC.js → browserAll-Cin6ghNg.js} +2 -2
  83. package/dist-cli-web/assets/chatlabSiteLocale-CrCNb8QP.js +1 -0
  84. package/dist-cli-web/assets/clamp-jFYhBC76.js +1 -0
  85. package/dist-cli-web/assets/cli-web-D7IBc3AX.js +1 -0
  86. package/dist-cli-web/assets/{dateFormat-B6JnNCxp.js → dateFormat-Bu4-Ux3L.js} +1 -1
  87. package/dist-cli-web/assets/{fetch-BAJ_VjWE.js → fetch-1NiXh-_B.js} +1 -1
  88. package/dist-cli-web/assets/{fetch-BNcHe2-O.js → fetch-2QEQPA9q.js} +8 -5
  89. package/dist-cli-web/assets/fetch-B2agy1hy.js +1 -0
  90. package/dist-cli-web/assets/{fetch-CPloHijF.js → fetch-B7kuohCt.js} +1 -1
  91. package/dist-cli-web/assets/{fetch-D7vgaLpy.js → fetch-BR71C0K9.js} +1 -1
  92. package/dist-cli-web/assets/{fetch-bdY0RMM3.js → fetch-Bk-7vxHV.js} +1 -1
  93. package/dist-cli-web/assets/fetch-C8tTTsCm.js +1 -0
  94. package/dist-cli-web/assets/{fetch-DtnhbqTN.js → fetch-CuUeyk0N.js} +1 -1
  95. package/dist-cli-web/assets/{fetch-bhHY8rO7.js → fetch-DPRDSI39.js} +1 -1
  96. package/dist-cli-web/assets/{fetch-DGvqctIb.js → fetch-OnnCjzee.js} +1 -1
  97. package/dist-cli-web/assets/{fetch-Clj_RVUD.js → fetch-_CN1EVMt.js} +1 -1
  98. package/dist-cli-web/assets/index-B4J99zv3.css +1 -0
  99. package/dist-cli-web/assets/index-BBeqtL8d.css +1 -0
  100. package/dist-cli-web/assets/index-BCEk6ZpL.js +64 -0
  101. package/dist-cli-web/assets/index-BIHFuCJK.js +1 -0
  102. package/dist-cli-web/assets/index-BUz_Vl9U.js +2 -0
  103. package/dist-cli-web/assets/index-BWZIoPV3.css +1 -0
  104. package/dist-cli-web/assets/index-BYQV3OA5.js +1 -0
  105. package/dist-cli-web/assets/index-CVVv_6qu.js +2 -0
  106. package/dist-cli-web/assets/index-CacwXQL4.js +1 -0
  107. package/dist-cli-web/assets/{index-DMYFpctK.js → index-Colc58j-.js} +3 -3
  108. package/dist-cli-web/assets/index-DImo7TQN.js +1 -0
  109. package/dist-cli-web/assets/index-DV9zQVPV.js +137 -0
  110. package/dist-cli-web/assets/index-DXKS-q-w.css +1 -0
  111. package/dist-cli-web/assets/index-DZc5A4_J.js +1 -0
  112. package/dist-cli-web/assets/index-DkWTvE7d.js +36 -0
  113. package/dist-cli-web/assets/index-DmEn0PAI.js +1 -0
  114. package/dist-cli-web/assets/index-b9eEQeVt.js +1 -0
  115. package/dist-cli-web/assets/index-waDxab2e.css +1 -0
  116. package/dist-cli-web/assets/insight-time-range-MJxLEu6o.js +1 -0
  117. package/dist-cli-web/assets/people-page-header-DNPjaSt4.js +1 -0
  118. package/dist-cli-web/assets/prompt-BgywZQ_g.js +1 -0
  119. package/dist-cli-web/assets/relationship-galaxy-connections-Cg4G5yYE.js +1 -0
  120. package/dist-cli-web/assets/semantic-index-config-builder-bji_UxYE.js +1 -0
  121. package/dist-cli-web/assets/service-DpU9fa-l.js +1 -0
  122. package/dist-cli-web/assets/useFormControl-De24E2zT.js +1 -0
  123. package/dist-cli-web/assets/useTable-C7BH94MF.js +1 -0
  124. package/dist-cli-web/assets/useToast-CxhJkhXK.js +1 -0
  125. package/dist-cli-web/assets/vendor-echarts-DfAMQxdr.js +11 -0
  126. package/dist-cli-web/assets/{vendor-echarts-wordcloud-Ca8n6qS6.js → vendor-echarts-wordcloud-BsaEJTPY.js} +1 -1
  127. package/dist-cli-web/assets/vendor-zrender-PFmZe1EY.js +8 -0
  128. package/dist-cli-web/assets/{webworkerAll-CfZWlukP.js → webworkerAll-BRnv6GvJ.js} +1 -1
  129. package/dist-cli-web/index.html +2 -2
  130. package/package.json +1 -1
  131. package/dist/chunk-2WYXD5ZP.mjs +0 -9451
  132. package/dist/chunk-2WYXD5ZP.mjs.map +0 -1
  133. package/dist/chunk-AWXHYTD5.mjs.map +0 -1
  134. package/dist/chunk-JYBPJWE2.mjs.map +0 -1
  135. package/dist/chunk-QZCNVAH6.mjs +0 -14
  136. package/dist/chunk-QZCNVAH6.mjs.map +0 -1
  137. package/dist/chunk-XIWVJAXH.mjs.map +0 -1
  138. package/dist/chunk-ZVGDOSGG.mjs.map +0 -1
  139. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-kN3uxTW8.js +0 -110
  140. package/dist-cli-web/assets/CanvasRenderer-Cmjtvski.js +0 -1
  141. package/dist-cli-web/assets/DataDirCleanupNotice-B5tyDzK-.js +0 -1
  142. package/dist-cli-web/assets/EChartWordcloud-Bd3L3G8I.js +0 -1
  143. package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-CKf_gC1k.js +0 -1
  144. package/dist-cli-web/assets/MessageExportModal-ODYCcSnk.js +0 -1
  145. package/dist-cli-web/assets/PageHeader-Bn7Jn8JW.js +0 -1
  146. package/dist-cli-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-CADZpPia.js +0 -1
  147. package/dist-cli-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-I3FYjhfs.js +0 -1
  148. package/dist-cli-web/assets/annual-summary-time-range-BIADd8qE.js +0 -1
  149. package/dist-cli-web/assets/base-BpxxC5Z5.js +0 -1
  150. package/dist-cli-web/assets/cli-web-BiWUOncc.js +0 -1
  151. package/dist-cli-web/assets/fetch-DSxgaVBO.js +0 -1
  152. package/dist-cli-web/assets/index-B6Gq11lw.css +0 -1
  153. package/dist-cli-web/assets/index-BJ2lywiG.js +0 -1
  154. package/dist-cli-web/assets/index-BT3_fSP6.js +0 -2
  155. package/dist-cli-web/assets/index-BVZhP1J5.js +0 -1
  156. package/dist-cli-web/assets/index-Br8r4pu8.js +0 -1
  157. package/dist-cli-web/assets/index-Byok4VaA.css +0 -1
  158. package/dist-cli-web/assets/index-CKnnxOci.js +0 -1
  159. package/dist-cli-web/assets/index-CXnYfvTv.js +0 -137
  160. package/dist-cli-web/assets/index-CsFLLk3T.css +0 -1
  161. package/dist-cli-web/assets/index-CzoOQ7zg.js +0 -1
  162. package/dist-cli-web/assets/index-D-dTTUGj.js +0 -1
  163. package/dist-cli-web/assets/index-DEbvEKzi.js +0 -2
  164. package/dist-cli-web/assets/index-KO7uPd8W.js +0 -64
  165. package/dist-cli-web/assets/index-ZsZwPLWy.css +0 -1
  166. package/dist-cli-web/assets/index-lkmJ6dI7.js +0 -1
  167. package/dist-cli-web/assets/index-y7xPDpsW.js +0 -53
  168. package/dist-cli-web/assets/people-page-header-gjTyODWs.js +0 -1
  169. package/dist-cli-web/assets/vendor-echarts-B-i_56Av.js +0 -11
  170. package/dist-cli-web/assets/vendor-zrender-5DcYjSZk.js +0 -8
  171. /package/dist/{chat-command-QH7DXCAJ.mjs.map → chat-command-SXW67RF7.mjs.map} +0 -0
  172. /package/dist/{chunk-SWUTRDGZ.mjs.map → chunk-AAGDVTP2.mjs.map} +0 -0
  173. /package/dist/{chunk-2Q3HHVTS.mjs.map → chunk-CNEWMCGX.mjs.map} +0 -0
  174. /package/dist/{chunk-3X26JJIP.mjs.map → chunk-GVW3BDGZ.mjs.map} +0 -0
  175. /package/dist/{chunk-WJVE5Q4Y.mjs.map → chunk-JHON5FN7.mjs.map} +0 -0
  176. /package/dist/{chunk-6U2QZO3N.mjs.map → chunk-UNIKQFI5.mjs.map} +0 -0
  177. /package/dist/{chunk-C2PD3BS7.mjs.map → chunk-VDWI4A4U.mjs.map} +0 -0
  178. /package/dist/{chunk-AWGXYFIC.mjs.map → chunk-XDF6PMVZ.mjs.map} +0 -0
  179. /package/dist/{http-D2F4QTQW.mjs.map → http-LVOGJFDL.mjs.map} +0 -0
  180. /package/dist/{import-H7X2JU2O.mjs.map → import-7OU57ZHM.mjs.map} +0 -0
  181. /package/dist/{mcp-UURXRGDF.mjs.map → mcp-CUKHTTII.mjs.map} +0 -0
  182. /package/dist/{src-MHCO4HYY.mjs.map → src-LORFXAUE.mjs.map} +0 -0
  183. /package/dist/{stream-import-BHXACUCA.mjs.map → stream-import-7YUWIAD6.mjs.map} +0 -0
  184. /package/dist/{worker-runtime-JOUCP2L4.mjs.map → worker-runtime-GQ5SY7E3.mjs.map} +0 -0
@@ -1,64 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MessageExportModal-ODYCcSnk.js","assets/index-y7xPDpsW.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-B6Gq11lw.css"])))=>i.map(i=>d[i]);
2
- import{b as V,y as $e,P as Ne,d as z,o,c as I,n as W,C as s,$ as H,a0 as Y,E as h,r as le,a1 as it,A as C,L as rt,Q as de,a as y,aA as ut,w as E,i as ct,F as e,B as S,D as x,v as Q,G as A,J as Ce,H as me,I as K,_ as ve,aS as We,N as X,T as re,aT as dt,ao as Me,aI as mt,ak as je,ay as Ae,V as Fe,Z as ze,x as Ue,aU as vt,aV as pt,aW as Ke,ar as Be,am as He,aX as gt,S as ht,p as Ge,aY as ft,a5 as yt,aB as bt,aq as xt,U as Ee,aC as kt,Y as wt,an as _t,au as $t,av as Ct}from"./index-y7xPDpsW.js";import{b as O,a as ie,c as It,d as Pe,e as Tt,u as St,f as Ye,I as Vt,g as Rt,h as Lt,i as Mt,j as Dt,k as Nt,l as At,m as Ft,n as zt,p as Ut,C as qt,o as Bt,L as Ht,D as Et,M as Pt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang-kN3uxTW8.js";import{u as Qe,y as Ot,j as Je,s as Wt,i as Xe,k as Ze,p as jt,t as Kt,v as Gt}from"./vendor-echarts-B-i_56Av.js";import"./vendor-echarts-wordcloud-Ca8n6qS6.js";import{u as et,_ as oe}from"./LoadingState.vue_vue_type_script_setup_true_lang-CKf_gC1k.js";import{a as Yt}from"./index-DMYFpctK.js";import{_ as Qt}from"./ThemeCard.vue_vue_type_script_setup_true_lang-CADZpPia.js";import{a as te,g as Jt,_ as Xt}from"./base-BpxxC5Z5.js";import{a as De,b as Zt,c as ea}from"./dateFormat-B6JnNCxp.js";import"./vendor-snapdom--nZvo8Sg.js";import"./TimeSelect.vue_vue_type_script_setup_true_lang-I3FYjhfs.js";import"./PageHeader-Bn7Jn8JW.js";import"./vendor-zrender-5DcYjSZk.js";function ta(l,t={}){const{threshold:a=300,containerSelector:n=".overflow-y-auto",scrollLockDuration:r=800}=t,d=V(l[0]?.id||"");let c=!1;const v=V(null);let m=null;function b(){if(c)return;const u=[];l.forEach(g=>{const $=document.getElementById(g.id);if($){const p=$.getBoundingClientRect();u.push({id:g.id,top:Math.round(p.top)})}});let i=0;for(let g=0;g<u.length;g++){if(u[g].top>a){i=Math.max(0,g-1);break}i=g}d.value=l[i]?.id||""}function f(u){const i=document.getElementById(u);i&&(d.value=u,c=!0,i.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{c=!1,b()},r))}return $e(()=>{m=v.value?.closest(n)||null,m&&(m.addEventListener("scroll",b,{passive:!0}),b())}),Ne(()=>{m&&m.removeEventListener("scroll",b)}),{contentRef:v,activeAnchor:d,scrollToAnchor:f,updateActiveAnchor:b}}function be(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 xe(l){return String(l+1).padStart(2,"0")}function aa(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 sa={class:"sticky top-24 space-y-6"},oa={class:"border-l border-gray-200 dark:border-gray-800"},na=["onClick"],la=z({__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,d)=>(o(),I("div",{class:W([l.width,"shrink-0",l.hideOnMobile?"hidden lg:block":""])},[s("div",sa,[s("nav",null,[s("div",oa,[(o(!0),I(H,null,Y(l.anchors,c=>(o(),I("button",{key:c.id,class:W(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[l.activeAnchor===c.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(c.id)},h(c.label),11,na))),128))])]),le(r.$slots,"default")])],2))}}),ue=z({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(l){const t=it(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 d=rt;return o(),C(d,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=c=>t.value=c),items:a,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),pe=z({__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(d,c)=>(o(),I("div",{class:W(l.paddingClass),style:de(r.value)},[le(d.$slots,"default")],6))}}),ia=z({__name:"EChartGraph",props:{data:{},height:{default:400},layout:{default:"circular"},directed:{type:Boolean,default:!1}},setup(l,{expose:t}){Qe([Ot,Je,Wt,Xe]);const a=l,n=y(()=>typeof a.height=="number"?`${a.height}px`:a.height),r=ut(),d=V(null);let c=null;const v=["#ee4567","#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#9a60b4","#fc8452","#3ba272","#ea7ccc","#6e7074","#546570"],m=y(()=>{const w=new Set;return a.data.nodes.filter(k=>w.has(k.name)?!1:(w.add(k.name),!0))}),b=y(()=>{const w=new Map;return m.value.forEach((k,_)=>{w.set(k.name,v[_%v.length])}),w});function f(w,k){return k<=0?1:1+w/k*5}const u=y(()=>{const w=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 _=b.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:_,borderColor:"#fff",borderWidth:2,shadowBlur:5,shadowColor:`${_}66`}}}),links:a.data.links.filter(k=>b.value.has(k.source)&&b.value.has(k.target)).map(k=>{const _=b.value.get(k.source)||v[0];return{source:k.source,target:k.target,value:k.value,lineStyle:{color:_,width:f(k.value||1,w)}}})}]}});function i(){d.value&&(c=Ze(d.value,r.value?"dark":void 0,{renderer:"canvas"}),c.setOption({backgroundColor:"transparent",...u.value}))}function g(){c&&c.setOption({backgroundColor:"transparent",...u.value},{notMerge:!0})}function $(){c?.resize()}function p(){c&&c.dispatchAction({type:"restore"})}return t({resetView:p}),E([()=>a.data,()=>a.layout,()=>a.directed,r],()=>{c?g():i()},{deep:!0}),$e(()=>{i(),window.addEventListener("resize",$)}),Ne(()=>{window.removeEventListener("resize",$),c?.dispose()}),(w,k)=>(o(),I("div",{ref_key:"chartRef",ref:d,style:de({height:n.value,width:"100%"})},null,4))}}),tt=Symbol("ranking-width-mode"),at={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 ge(){const l=ct(tt,null);return y(()=>at[l?.value??"standard"])}function he(l,t){return l.length<=t?l:`${l.slice(0,t)}…`}const ra={class:"px-3 py-2"},Ie=z({__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=ge(),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)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},c=y(()=>{const v=[...n.value].reverse(),m=v.map(i=>he(i.name,a.value.labelMaxLength)),b=v.map(i=>i.value),f=Math.max(...b,1),u=v.map(i=>({value:i.value,itemStyle:{color:d,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 g=i[0];if(!g)return"";const $=n.value.length-1-g.dataIndex,p=n.value[$];return`
3
- <div style="padding: 4px 8px;">
4
- <div style="font-weight: bold; margin-bottom: 4px;">${p.name}</div>
5
- <div>${p.value} ${t.unit} (${p.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,g)=>{const p=n.value.length-1-g+1;return`${p===1?"🥇":p===2?"🥈":p===3?"🥉":`${p}.`} ${i}`}}},series:[{type:"bar",data:u,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const g=n.value.length-1-i.dataIndex;return`${n.value[g].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(pe),{key:0,"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:S(()=>[x(te,{option:c.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:S(()=>[s("div",ra,[x(te,{option:c.value,height:r.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),ua={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"},ca={class:"min-w-0 flex-1"},da={class:"flex items-baseline justify-between gap-3"},ma=["title"],va={class:"flex shrink-0 items-baseline gap-1.5 whitespace-nowrap"},pa={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},ga={class:"text-xs text-gray-500 dark:text-gray-400"},ha={class:"mt-2 flex items-center gap-2.5"},fa={class:"h-1.5 flex-1 overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},ya={class:"w-10 shrink-0 text-right font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},Oe=z({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(l){const{t}=Q(),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 d(c){if(r.value.length===0)return 0;const v=r.value[0].value;return v===0?0:Math.round(r.value[c].value/v*100)}return(c,v)=>(o(),I("div",null,[(o(!0),I(H,null,Y(r.value,(m,b)=>(o(),I("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:W(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",e(be)(b)])},h(e(xe)(b)),3),l.showAvatar?(o(),I("div",ua,h(m.name.slice(0,1)),1)):A("",!0),s("div",ca,[s("div",da,[s("p",{class:"truncate text-sm font-medium text-gray-900 dark:text-white",title:m.name},h(m.name),9,ma),s("div",va,[s("span",pa,h(m.value),1),s("span",ga,h(n.value),1)])]),s("div",ha,[s("div",fa,[s("div",{class:W(["h-full rounded-full bg-linear-to-r transition-all",e(aa)(b)]),style:de({width:`${d(b)}%`})},null,6)]),s("span",ya,h(m.percentage)+"% ",1)])])]))),128))]))}}),ba={class:"flex items-center gap-2"},xa={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"},ka={class:"no-capture"},wa={key:0,class:"no-capture px-3 pb-3 pt-1"},_a={class:"flex items-center gap-1.5"},$a={class:"flex w-full items-center justify-between border-b border-gray-100 px-6 py-5 dark:border-white/5"},Ca={class:"min-w-0"},Ia={class:"truncate text-base font-semibold text-gray-900 dark:text-white"},Ta={class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},Sa={class:"max-h-[70vh] overflow-y-auto"},st=z({__name:"ExpandableListCard",props:{title:{},description:{},showViewAll:{type:Boolean},viewAllLabel:{},countLabel:{}},setup(l){const t=V(!1),a=V(null);return(n,r)=>{const d=ve,c=me,v=Ce;return o(),C(e(O),{title:l.title,description:l.description,"show-divider":!1},{headerRight:S(()=>[s("div",ba,[s("span",xa,h(l.countLabel),1),s("div",ka,[le(n.$slots,"headerRight")])])]),default:S(()=>[s("div",null,[le(n.$slots,"default")]),l.showViewAll?(o(),I("div",wa,[x(v,{open:t.value,"onUpdate:open":r[0]||(r[0]=m=>t.value=m),ui:{content:"md:w-full max-w-4xl"}},{content:S(()=>[s("div",{ref_key:"modalBodyRef",ref:a,class:"section-content flex flex-col overflow-hidden"},[s("div",$a,[s("div",Ca,[s("h3",Ia,h(l.title),1),s("p",Ta,h(l.countLabel),1)]),x(Yt,{size:"xs",type:"element","target-element":a.value},null,8,["target-element"])]),s("div",Sa,[le(n.$slots,"full")])],512)]),default:S(()=>[x(c,{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:S(()=>[s("span",_a,[K(h(l.viewAllLabel)+" ",1),x(d,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5"})])]),_:1})]),_:3},8,["open"])])):A("",!0)]),_:3},8,["title","description"])}}}),Va=z({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(l){const{t}=Q(),a=l,n=y(()=>a.members.slice(0,a.topN)),r=y(()=>a.members.length>a.topN);return(d,c)=>(o(),C(st,{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:S(()=>[le(d.$slots,"headerRight")]),full:S(()=>[x(Oe,{members:l.members,unit:l.unit},null,8,["members","unit"])]),default:S(()=>[x(Oe,{members:n.value,unit:l.unit},null,8,["members","unit"])]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),Ra={key:0},La={class:"px-5 py-8 text-center text-sm text-gray-400"},_e=z({__name:"ListPro",props:{items:{},title:{},description:{},topN:{default:10},countLabel:{}},setup(l){const{t}=Q(),a=l,n=y(()=>a.items.slice(0,a.topN)),r=y(()=>a.items.length>a.topN),d=y(()=>a.countLabel?a.countLabel:t("views.charts.listPro.countTemplate",{count:a.items.length}));return(c,v)=>(o(),C(st,{title:l.title,description:l.description,"show-view-all":r.value,"view-all-label":e(t)("views.charts.listPro.fullRanking"),"count-label":d.value},{headerRight:S(()=>[le(c.$slots,"headerRight")]),full:S(()=>[s("div",null,[(o(!0),I(H,null,Y(l.items,(m,b)=>(o(),I("div",{key:b,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[le(c.$slots,"item",{item:m,index:b})]))),128))])]),default:S(()=>[le(c.$slots,"config"),s("div",null,[(o(!0),I(H,null,Y(n.value,(m,b)=>(o(),I("div",{key:b,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[le(c.$slots,"item",{item:m,index:b})]))),128))]),l.items.length===0?(o(),I("div",Ra,[le(c.$slots,"empty",{},()=>[s("div",La,h(e(t)("views.charts.listPro.empty")),1)])])):A("",!0)]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),Ma={class:"flex h-full flex-col"},Da={class:"flex flex-wrap items-center justify-end px-3 py-2 sm:px-4"},Na={class:"flex flex-wrap items-center justify-end gap-2 sm:gap-4"},Aa={class:"flex items-center gap-2"},Fa={class:"text-xs text-gray-400"},za={class:"inline-flex items-center",role:"group"},Ua={class:"flex items-center gap-2"},qa={class:"text-xs text-gray-400"},Ba={class:"flex-1 min-h-0 relative"},Ha={key:0,class:"absolute inset-0 flex items-center justify-center"},Ea={key:0,class:"h-full"},Pa={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"},Oa={key:1,class:"flex h-full items-center justify-center text-gray-400"},Wa={class:"text-center"},ja={class:"mt-2 text-sm"},Ka=z({__name:"InteractionView",props:{sessionId:{},timeFilter:{}},setup(l){const t=l,{t:a}=Q(),n=V(!0);et(n);const r=V({nodes:[],links:[],maxLinkValue:0}),d=V("circular"),c=V(!1),v=V(null);function m(){v.value?.resetView()}async function b(){if(t.sessionId){n.value=!0;try{const f=await X().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 E(()=>[t.sessionId,t.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(f,u)=>{const i=me,g=We,$=ve;return o(),I("div",Ma,[s("div",Da,[s("div",Na,[s("div",Aa,[s("span",Fa,h(e(a)("views.interaction.layout"))+":",1),s("div",za,[x(i,{size:"xs",color:d.value==="circular"?"primary":"neutral",variant:d.value==="circular"?"solid":"ghost",onClick:u[0]||(u[0]=p=>d.value="circular")},{default:S(()=>[K(h(e(a)("views.interaction.circular")),1)]),_:1},8,["color","variant"]),x(i,{size:"xs",color:d.value==="force"?"primary":"neutral",variant:d.value==="force"?"solid":"ghost",onClick:u[1]||(u[1]=p=>d.value="force")},{default:S(()=>[K(h(e(a)("views.interaction.force")),1)]),_:1},8,["color","variant"])])]),s("div",Ua,[s("span",qa,h(e(a)("views.interaction.directed"))+":",1),x(g,{modelValue:c.value,"onUpdate:modelValue":u[2]||(u[2]=p=>c.value=p),size:"xs"},null,8,["modelValue"])]),x(i,{size:"xs",color:"neutral",variant:"ghost",icon:"i-heroicons-arrow-path",onClick:m},{default:S(()=>[K(h(e(a)("views.interaction.reset")),1)]),_:1})])]),s("div",Ba,[n.value?(o(),I("div",Ha,[x($,{name:"i-heroicons-arrow-path",class:"h-8 w-8 animate-spin text-pink-500"})])):(o(),I(H,{key:1},[r.value.nodes.length>0?(o(),I("div",Ea,[x(e(ia),{ref_key:"graphRef",ref:v,data:r.value,layout:d.value,directed:c.value,height:"100%"},null,8,["data","layout","directed"]),s("div",Pa,h(e(a)("views.interaction.graphHint",{nodes:r.value.nodes.length,links:r.value.links.length})),1)])):(o(),I("div",Oa,[s("div",Wa,[x($,{name:"i-heroicons-user-group",class:"mx-auto h-10 w-10 text-gray-300 dark:text-gray-600"}),s("p",ja,h(e(a)("views.interaction.noInteraction")),1)])]))],64))])])}}}),Ga={class:"main-content mx-auto max-w-3xl p-4 sm:p-6"},Ya=z({__name:"MentionRankingView",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Q(),a=l,n=V(null),r=V(!1);async function d(){if(a.sessionId){r.value=!0;try{n.value=await X().getMentionAnalysis(a.sessionId,a.timeFilter)}catch(i){console.error("加载 @ 互动分析失败:",i)}finally{r.value=!1}}}const c=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=V("mentioners"),b=y(()=>[{label:t("members.relationships.rankModes.mentioners"),value:"mentioners"},{label:t("members.relationships.rankModes.mentioned"),value:"mentioned"}]),f=y(()=>m.value==="mentioners"?c.value:v.value),u=y(()=>m.value==="mentioners"?t("members.relationships.topMentionersDescription"):t("members.relationships.topMentionedDescription"));return E(()=>[a.sessionId,a.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(i,g)=>(o(),I("div",Ga,[r.value?(o(),C(e(oe),{key:0,text:e(t)("members.relationships.loading")},null,8,["text"])):n.value&&n.value.totalMentions>0&&f.value.length>0?(o(),C(e(Va),{key:1,members:f.value,title:e(t)("members.relationships.rankingTitle"),description:u.value,unit:e(t)("members.relationships.times")},{headerRight:S(()=>[x(e(re),{modelValue:m.value,"onUpdate:modelValue":g[0]||(g[0]=$=>m.value=$),items:b.value,size:"sm"},null,8,["modelValue","items"])]),_:1},8,["members","title","description","unit"])):(o(),C(e(O),{key:2,title:e(t)("members.relationships.emptyTitle")},{default:S(()=>[x(e(ie),{text:e(t)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"]))]))}}),Qa={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"},Xa={class:"flex items-center gap-3"},Za={class:"inline-flex items-center",role:"group"},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"},gs={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},hs={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"},Is={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},Ts={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"},Ls={class:"flex-1 overflow-y-auto"},Ms={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"},Fs={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},zs={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Us={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"},Bs={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"},js={class:"font-medium truncate"},Ks={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"},Qs=z({__name:"ClusterView",props:{sessionId:{},timeFilter:{}},setup(l){Qe([jt,Je,Kt,Gt,Xe]);const t=l,{t:a}=Q(),n=dt(),r=y(()=>n.value==="dark"),d=V(!0);et(d);const c=V(null),v=V("matrix"),m=V(null),b=V({lookAhead:3,decaySeconds:120,topEdges:150}),f=V(null);let u=null;async function i(){if(t.sessionId){d.value=!0;try{c.value=await X().getClusterGraph(t.sessionId,t.timeFilter,{lookAhead:b.value.lookAhead,decaySeconds:b.value.decaySeconds,topEdges:b.value.topEdges})}catch(D){console.error("[chart-cluster] 加载小团体关系数据失败:",D),c.value=null}finally{d.value=!1}}}const g=y(()=>{if(!c.value||c.value.nodes.length===0)return null;const{nodes:D,links:U,maxLinkValue:P}=c.value,J=[...D].sort((q,G)=>G.messageCount-q.messageCount).slice(0,20).map(q=>q.name),j=new Map;for(const q of U)j.set(`${q.source}-${q.target}`,q.value),j.set(`${q.target}-${q.source}`,q.value);const N=[];for(let q=0;q<J.length;q++)for(let G=0;G<J.length;G++)if(q===G)N.push([q,G,-1]);else{const fe=j.get(`${J[q]}-${J[G]}`)||0;N.push([q,G,fe])}return{names:J,data:N,maxValue:P}});function $(){if(!g.value)return{graphic:{type:"text",style:{text:a("views.cluster.noData"),fill:"#999"}}};const{names:D,data:U,maxValue:P}=g.value;return{tooltip:{position:"top",formatter:ee=>{const[J,j,N]=ee.data;return N<0?`${D[J]}`:N===0?`${D[J]} ↔ ${D[j]}<br/>暂无关系数据`:`${D[J]} ↔ ${D[j]}<br/>临近度: ${N.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:D,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:r.value?"#ccc":"#333"}},yAxis:{type:"category",data:D,splitArea:{show:!0},axisLabel:{fontSize:10,color:r.value?"#ccc":"#333"}},visualMap:{min:0,max:P||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:U.filter(ee=>ee[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const p=y(()=>c.value?[...c.value.nodes].sort((D,U)=>U.messageCount-D.messageCount):[]),w=y(()=>!c.value||m.value===null?null:c.value.nodes.find(D=>D.id===m.value)||null),k=y(()=>{if(!c.value||!w.value)return[];const D=w.value.name,U=[];for(const P of c.value.links)P.source===D?U.push({otherName:P.target,value:P.value,coOccurrenceCount:P.coOccurrenceCount}):P.target===D&&U.push({otherName:P.source,value:P.value,coOccurrenceCount:P.coOccurrenceCount});return U.sort((P,ee)=>ee.value-P.value),U}),_=y(()=>c.value?c.value.links.slice(0,50):[]);function R(){u&&v.value==="matrix"&&u.setOption($(),{notMerge:!0})}function B(){f.value&&(u=Ze(f.value,r.value?"dark":void 0),R())}function ae(){u?.resize()}return E(v,async(D,U)=>{U==="matrix"&&u&&(u.dispose(),u=null),D==="matrix"&&(await Me(),B())}),E([c,()=>r.value],()=>{v.value==="matrix"&&R()},{deep:!0}),E(d,async(D,U)=>{U&&!D&&v.value==="matrix"&&(u&&(u.dispose(),u=null),await Me(),B())}),E(()=>[t.sessionId,t.timeFilter],()=>i(),{immediate:!0,deep:!0}),$e(()=>{window.addEventListener("resize",ae),v.value==="matrix"&&Me(()=>B())}),Ne(()=>{window.removeEventListener("resize",ae),u?.dispose(),u=null}),(D,U)=>{const P=me,ee=je,J=mt,j=ve;return o(),I("div",Qa,[x(e(Qt),{class:"flex h-full flex-col"},{default:S(()=>[s("div",Ja,[s("div",Xa,[s("div",Za,[x(P,{size:"xs",color:v.value==="matrix"?"primary":"neutral",variant:v.value==="matrix"?"solid":"ghost",onClick:U[0]||(U[0]=N=>v.value="matrix")},{default:S(()=>[K(h(e(a)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),x(P,{size:"xs",color:v.value==="member"?"primary":"neutral",variant:v.value==="member"?"solid":"ghost",onClick:U[1]||(U[1]=N=>v.value="member")},{default:S(()=>[K(h(e(a)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),x(P,{size:"xs",color:v.value==="circle"?"primary":"neutral",variant:v.value==="circle"?"solid":"ghost",onClick:U[2]||(U[2]=N=>v.value="circle")},{default:S(()=>[K(h(e(a)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])])]),s("div",es,[x(J,null,{content:S(()=>[s("div",ts,[s("h4",as,h(e(a)("views.cluster.modelSettings")),1),s("div",ss,[s("div",null,[s("label",os,h(e(a)("views.cluster.lookAhead")),1),x(ee,{modelValue:b.value.lookAhead,"onUpdate:modelValue":U[3]||(U[3]=N=>b.value.lookAhead=N),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),s("p",ns,h(e(a)("views.cluster.lookAheadDesc")),1)]),s("div",null,[s("label",ls,h(e(a)("views.cluster.decaySeconds")),1),x(ee,{modelValue:b.value.decaySeconds,"onUpdate:modelValue":U[4]||(U[4]=N=>b.value.decaySeconds=N),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),s("p",is,h(e(a)("views.cluster.decaySecondsDesc")),1)]),x(P,{size:"xs",color:"primary",class:"w-full mt-2",onClick:i},{default:S(()=>[K(h(e(a)("views.cluster.applySettings")),1)]),_:1})])])]),default:S(()=>[x(P,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),x(P,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:i})])]),s("div",rs,[d.value?(o(),I("div",us,[x(j,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!c.value||c.value.nodes.length===0?(o(),I("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,h(e(a)("views.cluster.noData")),1)])])):v.value==="matrix"?(o(),I("div",ms,[s("div",{ref_key:"chartRef",ref:f,class:"w-full h-full"},null,512)])):v.value==="member"?(o(),I("div",vs,[s("div",ps,[s("div",gs,[s("h3",hs,[x(j,{name:"i-heroicons-users",class:"w-4 h-4"}),K(" "+h(e(a)("views.cluster.selectMember")),1)])]),s("div",fs,[(o(!0),I(H,null,Y(p.value,N=>(o(),I("div",{key:N.id,class:W(["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===N.id}]),onClick:q=>m.value=N.id},[s("div",bs,[s("span",xs,h(N.name),1),s("span",ks,h(N.messageCount),1)])],10,ys))),128))])]),s("div",ws,[w.value?(o(),I(H,{key:1},[s("div",Cs,[s("div",Is,h(w.value.name.charAt(0)),1),s("div",null,[s("div",Ts,h(w.value.name),1),s("div",Ss,h(e(a)("views.cluster.msgCount"))+": "+h(w.value.messageCount)+" | "+h(e(a)("views.cluster.relationCount"))+": "+h(k.value.length),1)])]),s("div",Vs,[s("h3",Rs,[x(j,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),K(" "+h(e(a)("views.cluster.relationsByIntimacy")),1)])]),s("div",Ls,[k.value.length===0?(o(),I("div",Ms,h(e(a)("views.cluster.noRelations")),1)):A("",!0),(o(!0),I(H,null,Y(k.value,(N,q)=>(o(),I("div",{key:N.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:W(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",q<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"])},h(q+1),3),s("div",Ns,[s("div",As,h(N.otherName),1),s("div",Fs,[s("span",null,h(e(a)("views.cluster.intimacy"))+": "+h((N.value*100).toFixed(0))+"%",1),s("span",null,h(e(a)("views.cluster.coOccurrence"))+": "+h(N.coOccurrenceCount)+h(e(a)("views.cluster.times")),1)])]),s("div",zs,[s("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:de({width:`${k.value[0]?.value?N.value/k.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(o(),I("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,h(e(a)("views.cluster.selectMemberHint")),1)])]))])])):(o(),I("div",Us,[s("div",qs,[s("h3",Bs,[x(j,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),K(" "+h(e(a)("views.cluster.interactionRanking")),1)])]),s("div",Hs,[(o(!0),I(H,null,Y(_.value,(N,q)=>(o(),I("div",{key:q,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:W(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",q<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"])},h(q+1),3),s("div",Ps,[s("div",Os,[s("span",Ws,h(N.source),1),U[5]||(U[5]=s("span",{class:"text-gray-400"},"↔",-1)),s("span",js,h(N.target),1)]),s("div",Ks,[s("span",null,h(e(a)("views.cluster.score"))+": "+h(N.value.toFixed(2)),1),s("span",null,h(e(a)("views.cluster.coOccurrence"))+": "+h(N.coOccurrenceCount)+h(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:de({width:`${_.value[0]?.value?N.value/_.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),c.value?(o(),I("div",Ys,[s("span",null,h(e(a)("views.cluster.totalMembers"))+": "+h(c.value.stats.totalMembers),1),s("span",null,h(e(a)("views.cluster.totalMessages"))+": "+h(c.value.stats.totalMessages.toLocaleString()),1),s("span",null,h(e(a)("views.cluster.involvedMembers"))+": "+h(c.value.stats.involvedMembers),1),s("span",null,h(e(a)("views.cluster.edgeCount"))+": "+h(c.value.stats.edgeCount),1)])):A("",!0)]),_:1})])}}}),Js={class:"flex h-full flex-col"},Xs={class:"min-h-0 flex-1 overflow-y-auto"},Zs=z({__name:"GroupRelationships",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Q(),a=l,n=V("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(d,c)=>(o(),I("div",Js,[x(e(Ae),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=v=>n.value=v),items:r.value,"persist-key":"groupRelationshipsTab"},null,8,["modelValue","items"]),s("div",Xs,[x(Fe,{name:"fade",mode:"out-in"},{default:S(()=>[n.value==="mention-graph"?(o(),C(Ka,{key:0,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):n.value==="mention-ranking"?(o(),C(Ya,{key:1,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):n.value==="proximity"?(o(),C(Qs,{key:2,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):A("",!0)]),_:1})])]))}}),eo=ze(Zs,[["__scopeId","data-v-84666257"]]);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=z({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Q(),a=Ue(),n=l,r=V(null),d=V(!1),c=y(()=>r.value?.members??[]),v=y(()=>n.timeFilter?.memberId!=null),m=y(()=>v.value?c.value[0]??null:null),b=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){d.value=!0;try{r.value=await X().getCatchphraseAnalysis(n.sessionId,n.timeFilter)}catch($){console.error("Failed to load catchphrase analysis:",$)}finally{d.value=!1}}}function i($){a.openChatRecordDrawer(to($,n.timeFilter))}function g($){return $.catchphrases.slice(0,5)}return E(()=>[n.sessionId,n.timeFilter],()=>{u()},{immediate:!0,deep:!0}),($,p)=>{const w=ve;return o(),I("div",ao,[d.value?(o(),C(e(oe),{key:0,text:e(t)("quotes.catchphrase.loading")},null,8,["text"])):m.value?(o(),C(e(_e),{key:1,items:m.value.catchphrases,title:b.value,description:f.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.phraseCount",{count:m.value.catchphrases.length})},{item:S(({item:k,index:_})=>[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:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(be)(_)])},h(e(xe)(_)),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},h(k.content),9,oo),s("div",no,[s("span",lo,h(e(t)("quotes.catchphrase.times",{count:k.count})),1),x(w,{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"])):c.value.length>0?(o(),C(e(_e),{key:2,items:c.value,title:b.value,description:f.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.memberCount",{count:c.value.length})},{item:S(({item:k,index:_})=>[s("div",io,[s("span",{class:W(["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(be)(_)])},h(e(xe)(_)),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},h(k.name),9,ro),s("div",uo,[(o(!0),I(H,null,Y(g(k),R=>(o(),I("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:B=>i(R.content)},[s("span",mo," “"+h(R.content)+"” ",1),s("span",vo,h(e(t)("quotes.catchphrase.times",{count:R.count})),1)],8,co))),128))])])]),_:1},8,["items","title","description","count-label"])):(o(),C(e(O),{key:3,title:b.value,description:f.value,"show-divider":!1},{default:S(()=>[x(e(ie),{text:e(t)("quotes.catchphrase.empty.title")},null,8,["text"])]),_:1},8,["title","description"]))])}}}),go={class:"main-content mx-auto max-w-3xl p-6"},ho=["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"},Io=z({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Q(),a=l,n=Ue(),r=V(null),d=V(!1);async function c(){if(a.sessionId){d.value=!0;try{r.value=await X().getRepeatAnalysis(a.sessionId,a.timeFilter)}catch(m){console.error("Failed to load repeat analysis:",m)}finally{d.value=!1}}}function v(m){n.openChatRecordDrawer({scrollToMessageId:m.firstMessageId,highlightKeywords:[m.content]})}return E(()=>[a.sessionId,a.timeFilter],()=>{c()},{immediate:!0,deep:!0}),(m,b)=>{const f=ve;return o(),I("div",go,[d.value?(o(),C(e(oe),{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:S(({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:g=>v(u)},[s("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(be)(i)])},h(e(xe)(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},h(u.content),9,yo),s("div",bo,[s("span",xo,h(u.originatorName),1),b[0]||(b[0]=s("span",{"aria-hidden":"true"},"·",-1)),s("span",ko,h(e(De)(u.lastTs)),1)])]),s("div",wo,[s("div",_o,[s("p",$o,h(e(t)("quotes.hotRepeat.people",{count:u.maxChainLength})),1),s("p",Co,h(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,ho)]),_:1},8,["items","title","description","count-label"])):(o(),C(e(O),{key:2,title:e(t)("quotes.hotRepeat.title")},{default:S(()=>[x(e(ie),{text:e(t)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),To={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},So={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},Vo={class:"p-3 sm:p-5"},Ro={class:"p-3 sm:p-5"},Lo=z({__name:"GroupChatOverview",props:{session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(l){const{t}=Q(),a=l,{dailyChartData:n}=St(()=>a.dailyActivity),r=y(()=>({labels:a.messageTypes.map(c=>Jt(c.type,t)),values:a.messageTypes.map(c=>c.count)})),d=y(()=>{const c=[...a.memberActivity].sort((u,i)=>i.messageCount-u.messageCount),v=c.slice(0,10),m=c.slice(10).reduce((u,i)=>u+i.messageCount,0),b=v.map(u=>u.name),f=v.map(u=>u.messageCount);return m>0&&(b.push(t("analysis.overview.others")),f.push(m)),{labels:b,values:f}});return(c,v)=>(o(),I("div",To,[x(It,{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",So,[x(e(O),{title:e(t)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:S(()=>[s("div",Vo,[x(e(Pe),{data:r.value,height:280},null,8,["data"])])]),_:1},8,["title"]),x(e(O),{title:e(t)("analysis.overview.memberDistribution"),"show-divider":!1},{default:S(()=>[s("div",Ro,[x(e(Pe),{data:d.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"])]))}}),Mo={class:"flex h-full flex-col"},Do={class:"min-h-0 flex-1 overflow-y-auto"},No=z({__name:"GroupChatInsights",props:{sessionId:{},session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(l){const{t}=Q(),a=l,n=y(()=>[{id:"overview",label:t("analysis.tabs.overview"),icon:"i-heroicons-squares-2x2"},{id:"type-analysis",label:t("analysis.subTabs.insights.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:t("analysis.subTabs.insights.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:t("analysis.subTabs.insights.topic"),icon:"i-heroicons-cloud"},{id:"group-relationships",label:t("analysis.subTabs.insights.groupRelationships"),icon:"i-heroicons-heart"}]),r=V("overview"),d=V(null),c=y(()=>({...a.timeFilter,memberId:d.value}));return(v,m)=>(o(),I("div",Mo,[x(e(Ae),{modelValue:r.value,"onUpdate:modelValue":m[1]||(m[1]=b=>r.value=b),items:n.value,"persist-key":"groupInsightsTab"},{right:S(()=>[r.value==="type-analysis"||r.value==="time-analysis"||r.value==="group-relationships"?(o(),C(Ye,{key:0,modelValue:d.value,"onUpdate:modelValue":m[0]||(m[0]=b=>d.value=b),"session-id":a.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),s("div",Do,[x(e(Vt),{"active-key":r.value},{default:S(({viewKey:b})=>[b==="overview"?(o(),C(Lo,{key:0,session:a.session,"member-activity":a.memberActivity,"message-types":a.messageTypes,"hourly-activity":a.hourlyActivity,"daily-activity":a.dailyActivity,"time-range":a.timeRange,"filtered-message-count":a.filteredMessageCount,"filtered-member-count":a.filteredMemberCount,"time-filter":a.timeFilter},null,8,["session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):b==="type-analysis"?(o(),C(Rt,{key:1,"session-id":a.sessionId,"session-name":a.session.name,"time-filter":c.value},null,8,["session-id","session-name","time-filter"])):b==="time-analysis"?(o(),C(Lt,{key:2,"session-id":a.sessionId,"session-name":a.session.name,"time-filter":c.value},null,8,["session-id","session-name","time-filter"])):b==="topic"?(o(),C(e(Mt),{key:3,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):b==="group-relationships"?(o(),C(eo,{key:4,"session-id":a.sessionId,"time-filter":c.value},null,8,["session-id","time-filter"])):A("",!0)]),_:1},8,["active-key"])])]))}}),Ao={class:"border-b border-gray-100 p-4 dark:border-gray-800"},Fo={class:"mb-3 flex flex-wrap items-center gap-2"},zo={class:"text-xs text-gray-500 dark:text-gray-400"},Uo=["onClick"],qo={class:"p-4"},Bo={class:"mb-3 font-semibold text-gray-900 dark:text-white"},Ho={class:"space-y-3"},Eo={class:"mb-1 block text-xs text-gray-500"},Po={class:"mb-1 block text-xs text-gray-500"},Oo={class:"flex flex-wrap items-center gap-2"},Wo={class:"mt-4 flex justify-end gap-2"},jo={class:"flex flex-wrap items-center gap-2"},Ko={class:"mt-1.5 text-xs text-gray-400"},Go={key:0,class:"border-b border-gray-100 px-5 py-4 dark:border-gray-800"},Yo={class:"mb-3 flex items-center justify-between"},Qo={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"},Xo={class:"flex flex-wrap gap-2"},Zo={class:"text-xs text-gray-500"},en={class:"flex items-center gap-3"},tn={class:"w-32 shrink-0"},an={class:"truncate font-medium text-gray-900 dark:text-white"},sn={class:"flex flex-1 items-center"},on={class:"flex h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},nn=["title"],ln={class:"flex shrink-0 items-baseline gap-2"},rn={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},un={class:"text-xs text-gray-500"},cn={key:0,class:"flex h-64 flex-col items-center justify-center text-gray-400"},dn={class:"text-sm"},mn={key:1,class:"h-64"},vn=z({__name:"KeywordRankingTab",props:{sessionId:{},timeFilter:{}},setup(l){const{t}=Q(),a=l,n=vt(),r=V(!1),d={bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},c=[{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(T){if(!r.value)return d;const F=i.value.indexOf(T);if(F>=0)return c[F%c.length];let se=0;for(let ne=0;ne<T.length;ne++)se=se*31+T.charCodeAt(ne)>>>0;return c[se%c.length]}const m=["laugh","sad","praise","slacker","gossip","polite","curious"],b=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 T=n.customKeywordTemplates.map(se=>({...se,isCustom:!0}));return[...b.value.filter(se=>!n.deletedPresetTemplateIds.includes(se.id)),...T]}),u=V("laugh"),i=V([]);E(b,T=>{T.length>0&&i.value.length===0&&(i.value=[...T[0].keywords])},{immediate:!0});const g=y(()=>{const T=f.value.find(F=>F.id===u.value);return T?T.name:""}),$=V(null),p=V(!1);let w=0;const k=V(!1),_=V(null),R=V(""),B=V([]),ae=V(""),D=y(()=>_.value!==null),U=y(()=>D.value?t("quotes.keywords.modal.editTitle"):t("quotes.keywords.modal.createTitle"));function P(){_.value=null,R.value="",B.value=[],ae.value="",k.value=!0}function ee(T){_.value=T.id,R.value=T.name,B.value=[...T.keywords],k.value=!0}function J(){const T=ae.value.trim();T&&!B.value.includes(T)&&(B.value=[...B.value,T]),ae.value=""}function j(T){B.value=B.value.filter(F=>F!==T)}function N(T){u.value=T.id,i.value=[...T.keywords],$.value=null,Z()}function q(){w++,i.value=[],$.value=null,p.value=!1,u.value=""}const G=V("");function fe(){const T=G.value.trim();T&&!i.value.includes(T)&&(i.value=[...i.value,T],Z()),G.value=""}function ke(T){i.value=i.value.filter(F=>F!==T),Z()}function we(T){return m.includes(T)}function Te(){if(R.value.trim()){if(D.value&&_.value)if(we(_.value)){const T={id:`custom_${Date.now()}`,name:R.value.trim(),keywords:[...B.value]};n.addCustomKeywordTemplate(T),u.value=T.id,i.value=[...T.keywords],Z()}else n.updateCustomKeywordTemplate(_.value,{name:R.value.trim(),keywords:[...B.value]}),u.value===_.value&&(i.value=[...B.value],Z());else{const T={id:`custom_${Date.now()}`,name:R.value.trim(),keywords:[...B.value]};n.addCustomKeywordTemplate(T),u.value=T.id,i.value=[...T.keywords],Z()}k.value=!1}}function Se(T){we(T)?n.addDeletedPresetTemplateId(T):n.removeCustomKeywordTemplate(T),u.value===T&&(f.value.length>0?N(f.value[0]):q())}async function Z(){const T=++w;if(!a.sessionId||i.value.length===0){$.value=null,p.value=!1;return}p.value=!0;try{const F=await X().getLaughAnalysis(a.sessionId,a.timeFilter,[...i.value]);if(T!==w)return;$.value=F}catch(F){if(T!==w)return;console.error("Failed to load keyword ranking:",F),$.value=null}finally{T===w&&(p.value=!1)}}const L=y(()=>$.value?$.value.rankByCount.map(T=>({id:T.memberId.toString(),name:T.name,value:T.laughCount,percentage:T.percentage,keywordDistribution:T.keywordDistribution||[]})):[]);function Ve(T){if(L.value.length===0)return 0;const F=L.value[0].value;return F===0?0:Math.round(L.value[T].value/F*100)}function Re(T,F){const se=Ve(F);return!T.keywordDistribution||T.keywordDistribution.length===0?[{keyword:"default",width:se,bg:"bg-amber-400"}]:T.keywordDistribution.map(ne=>({keyword:ne.keyword,width:ne.percentage/100*se,bg:v(ne.keyword).bg}))}return E(()=>[a.sessionId,a.timeFilter],()=>{Z()},{immediate:!0,deep:!0}),(T,F)=>{const se=pt,ne=je,Le=Ke,qe=me,ot=Ce,nt=We,lt=ve;return o(),C(e(_e),{items:L.value,title:e(t)("quotes.keywords.title"),description:e(t)("quotes.keywords.description"),"top-n":10,"count-label":e(t)("quotes.keywords.countTemplate",{count:L.value.length})},{config:S(()=>[s("div",Ao,[s("div",Fo,[s("span",zo,h(e(t)("quotes.keywords.templateLabel")),1),(o(!0),I(H,null,Y(f.value,M=>(o(),C(se,{key:M.id,items:[[{label:e(t)("quotes.keywords.contextMenu.edit"),icon:"i-lucide-pencil",disabled:!M.isCustom,onSelect:()=>ee(M)},{label:e(t)("quotes.keywords.contextMenu.delete"),icon:"i-lucide-trash",color:"error",onSelect:()=>Se(M.id)}]]},{default:S(()=>[s("button",{class:W(["rounded-md border px-2.5 py-1 text-sm transition-all",u.value===M.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:ce=>N(M)},h(M.name),11,Uo)]),_:2},1032,["items"]))),128)),x(ot,{open:k.value,"onUpdate:open":F[3]||(F[3]=M=>k.value=M)},{content:S(()=>[s("div",qo,[s("h3",Bo,h(U.value),1),s("div",Ho,[s("div",null,[s("label",Eo,h(e(t)("quotes.keywords.modal.templateName")),1),x(ne,{modelValue:R.value,"onUpdate:modelValue":F[0]||(F[0]=M=>R.value=M),placeholder:e(t)("quotes.keywords.modal.templateNamePlaceholder")},null,8,["modelValue","placeholder"])]),s("div",null,[s("label",Po,h(e(t)("quotes.keywords.modal.keywords")),1),s("div",Oo,[(o(!0),I(H,null,Y(B.value,M=>(o(),C(Le,{key:M,variant:"soft",class:"cursor-pointer",onClick:ce=>j(M)},{default:S(()=>[K(h(M)+" ",1),F[6]||(F[6]=s("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(ne,{modelValue:ae.value,"onUpdate:modelValue":F[1]||(F[1]=M=>ae.value=M),placeholder:e(t)("quotes.keywords.modal.keywordPlaceholder"),class:"w-full",onKeydown:Be(He(J,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])])])]),s("div",Wo,[x(qe,{variant:"soft",onClick:F[2]||(F[2]=M=>k.value=!1)},{default:S(()=>[K(h(e(t)("common.cancel")),1)]),_:1}),x(qe,{color:"primary",disabled:!R.value.trim()||B.value.length===0,onClick:Te},{default:S(()=>[K(h(D.value?e(t)("quotes.keywords.modal.update"):e(t)("common.save")),1)]),_:1},8,["disabled"])])])]),default:S(()=>[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:P},h(e(t)("quotes.keywords.newTemplate")),1)]),_:1},8,["open"])]),s("div",jo,[(o(!0),I(H,null,Y(i.value,M=>(o(),C(Le,{key:M,class:"cursor-pointer",onClick:ce=>ke(M)},{default:S(()=>[K(h(M)+" ",1),F[7]||(F[7]=s("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(ne,{modelValue:G.value,"onUpdate:modelValue":F[4]||(F[4]=M=>G.value=M),placeholder:e(t)("quotes.keywords.searchPlaceholder"),class:"w-32",onKeydown:Be(He(fe,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),i.value.length>0?(o(),I("button",{key:0,class:"text-sm text-pink-500 hover:text-red-500",onClick:q},h(e(t)("quotes.keywords.clear")),1)):A("",!0)]),s("div",Ko,h(e(t)("quotes.keywords.templateHint")),1)]),$.value&&$.value.typeDistribution.length>0?(o(),I("div",Go,[s("div",Yo,[s("span",Qo,h(g.value?g.value:i.value.length===1?i.value[0]:e(t)("quotes.keywords.keyword"))+h(e(t)("quotes.keywords.ranking")),1),s("label",Jo,[s("span",null,h(e(t)("quotes.keywords.multiColorMode")),1),x(nt,{modelValue:r.value,"onUpdate:modelValue":F[5]||(F[5]=M=>r.value=M),size:"md"},null,8,["modelValue"])])]),s("div",Xo,[(o(!0),I(H,null,Y($.value.typeDistribution,M=>(o(),I("div",{key:M.type,class:W(["flex items-center gap-2 rounded-lg px-2 py-2 text-xs",v(M.type).wrapBg])},[s("span",{class:W(["h-2.5 w-2.5 shrink-0 rounded-full",v(M.type).bg])},null,2),s("span",{class:W(["font-medium",v(M.type).text])},h(M.type),3),s("span",Zo,h(e(t)("quotes.keywords.times",{count:M.count})),1),x(Le,{color:v(M.type).badge,variant:"soft",size:"xs"},{default:S(()=>[K(h(M.percentage)+"%",1)]),_:2},1032,["color"])],2))),128))])])):A("",!0),p.value&&L.value.length===0?(o(),C(e(oe),{key:1,text:e(t)("quotes.keywords.loading")},null,8,["text"])):A("",!0)]),item:S(({item:M,index:ce})=>[s("div",en,[s("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(be)(ce)])},h(e(xe)(ce)),3),s("div",tn,[s("p",an,h(M.name),1)]),s("div",sn,[s("div",on,[(o(!0),I(H,null,Y(Re(M,ce),ye=>(o(),I("div",{key:ye.keyword,class:W(["h-full transition-all first:rounded-l-full last:rounded-r-full",ye.bg]),style:de({width:`${ye.width}%`}),title:`${ye.keyword}: ${ye.width.toFixed(1)}%`},null,14,nn))),128))])]),s("div",ln,[s("span",rn,h(M.value),1),s("span",un,h(e(t)("quotes.keywords.timesWithPercent",{count:M.value,percent:M.percentage})),1)])])]),empty:S(()=>[p.value?(o(),I("div",mn)):(o(),I("div",cn,[x(lt,{name:"i-heroicons-magnifying-glass",class:"mb-2 h-8 w-8 opacity-50"}),s("p",dn,h(e(t)("quotes.keywords.empty")),1)]))]),_:1},8,["items","title","description","count-label"])}}}),pn={class:"flex items-center gap-3"},gn={key:1,class:"py-8 text-center text-sm text-gray-400"},hn=z({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=V(null),n=V(null),r=V(!1),d=V("activity"),c=V(t.globalTopN??10);E(()=>t.globalTopN,p=>{p!==void 0&&(c.value=p)});async function v(){if(t.sessionId){r.value=!0;try{const p=X(),[w,k]=await Promise.all([p.getDragonKingAnalysis(t.sessionId,t.timeFilter),p.getCheckInAnalysis(t.sessionId,t.timeFilter)]);a.value=w,n.value=k}catch(p){console.error("加载活跃数据失败:",p)}finally{r.value=!1}}}const m=y(()=>t.memberActivity.map(p=>({id:p.memberId.toString(),name:p.name,value:p.messageCount,percentage:p.percentage}))),b=y(()=>a.value?a.value.rank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.count,percentage:p.percentage})):[]),f=y(()=>n.value?n.value.loyaltyRank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.totalDays,percentage:p.percentage})):[]),u=y(()=>{switch(d.value){case"activity":return m.value;case"dragon":return b.value;case"loyalty":return f.value;default:return m.value}}),i=y(()=>{switch(d.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),g=y(()=>{switch(d.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),$=y(()=>{switch(d.value){case"activity":return"按消息发送数量排名";case"dragon":return`每天发言最多的人+1(共 ${a.value?.totalDays??0} 天)`;case"loyalty":return`累计发言天数排名(共 ${n.value?.totalDays??0} 天)`;default:return""}});return E(()=>[t.sessionId,t.timeFilter],()=>v(),{immediate:!0,deep:!0}),(p,w)=>(o(),C(e(O),{title:g.value,description:$.value},{headerRight:S(()=>[s("div",pn,[l.showTopNSelect?(o(),C(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":w[0]||(w[0]=k=>c.value=k)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":w[1]||(w[1]=k=>d.value=k),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:S(()=>[r.value&&(d.value==="dragon"||d.value==="loyalty")?(o(),C(e(oe),{key:0,text:"正在加载数据..."})):(o(),I(H,{key:1},[u.value.length>0?(o(),C(e(Ie),{key:0,members:u.value,title:g.value,unit:i.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),I("div",gn,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),fn={key:0},yn={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},bn={class:"px-3 py-2"},xn=z({__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=ge(),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)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},c={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 b=y(()=>{const f=[...n.value].reverse(),u=f.map(p=>he(p.name,a.value.labelMaxLength)),i=f.map(p=>m(p)),g=Math.max(...i,1),$=f.map(p=>({value:m(p),itemStyle:{color:t.mode==="current"||p.currentStreak>0?c:d,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:p=>{const w=p[0];if(!w)return"";const k=n.value.length-1-w.dataIndex,_=n.value[k];if(t.mode==="current")return`
8
- <div style="padding: 4px 8px;">
9
- <div style="font-weight: bold; margin-bottom: 6px;">${_.name}</div>
10
- <div style="color: #fb923c;">🔥 当前连续 <b>${_.currentStreak}</b> 天</div>
11
- <div style="margin-top: 4px; font-size: 12px; color: #9ca3af;">最长记录: ${_.maxStreak} 天</div>
12
- </div>
13
- `;let R=`
14
- <div style="padding: 4px 8px;">
15
- <div style="font-weight: bold; margin-bottom: 6px;">${_.name}</div>
16
- <div style="margin-bottom: 4px;">🔥 最长连续: <b>${_.maxStreak}</b> 天</div>
17
- <div style="font-size: 12px; color: #9ca3af;">${v(_.maxStreakStart,_.maxStreakEnd)}</div>
18
- `;return _.currentStreak>0&&(R+=`<div style="margin-top: 6px; color: #fb923c;">🔥 当前连续 ${_.currentStreak} 天</div>`),R+="</div>",R}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:g*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:(p,w)=>{const _=n.value.length-1-w+1;return`${_===1?"🥇":_===2?"🥈":_===3?"🥉":`${_}.`} ${p}`}}},series:[{type:"bar",data:$,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:p=>{const w=n.value.length-1-p.dataIndex,k=n.value[w],_=m(k),R=t.mode==="current"||k.currentStreak>0?" 🔥":"";return`${_} 天${R}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(249, 115, 22, 0.3)"}}}]}});return(f,u)=>l.bare?(o(),I("div",fn,[x(e(pe),{"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:S(()=>[x(e(te),{option:b.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"]),l.mode==="max"?(o(),I("div",yn,[...u[0]||(u[0]=[gt('<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(O),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},ht({default:S(()=>[s("div",bn,[x(e(te),{option:b.value,height:r.value},null,8,["option","height"])])]),_:2},[l.mode==="max"?{name:"footer",fn:S(()=>[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"]))}}),kn={class:"px-3 py-2"},wn=z({__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 d(v){return`${v.participantCount} 人参战`}const c=y(()=>{const v=[...a.value].reverse(),m=v.map(i=>d(i)),b=v.map(i=>i.totalImages),f=Math.max(...b,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 g=i[0];if(!g)return"";const $=a.value.length-1-g.dataIndex,p=a.value[$],w=p.participants.slice(0,5).map(_=>`<span style="color: #d1d5db;">${_.name}</span> <b>${_.imageCount}</b>张`).join("、"),k=p.participants.length>5?`、+${p.participants.length-5}`:"";return`
19
- <div style="padding: 6px 8px;">
20
- <div style="font-weight: bold; margin-bottom: 8px; font-size: 13px;">
21
- ⚔️ ${De(p.startTime)}
22
- </div>
23
- <div style="margin-bottom: 6px;">
24
- <span style="color: #9ca3af;">参战人数:</span> <b>${p.participantCount}</b> 人
25
- </div>
26
- <div style="margin-bottom: 8px;">
27
- <span style="color: #9ca3af;">总图片数:</span> <b style="color: #f472b6;">${p.totalImages}</b> 张
28
- </div>
29
- <div style="border-top: 1px solid #374151; padding-top: 6px; font-size: 11px;">
30
- ${w}${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,g)=>{const p=a.value.length-1-g+1;return`${p===1?"🥇":p===2?"🥈":p===3?"🥉":`${p}.`} ${i}`}}},series:[{type:"bar",data:u,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const g=a.value.length-1-i.dataIndex,$=a.value[g],p=De($.startTime);return`${$.totalImages} 张 (${p})`},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(pe),{key:0,"content-height":n.value,"max-height-vh":l.maxHeightVh},{default:S(()=>[x(e(te),{option:c.value,height:n.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:S(()=>[s("div",kn,[x(e(te),{option:c.value,height:n.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),_n={class:"px-3 py-2"},$n=z({__name:"EChartTimeRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=ge(),n=y(()=>t.items.slice(0,t.topN)),r=y(()=>{const m=n.value.length*36;return Math.max(m+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f59e0b"},{offset:1,color:"#fbbf24"}]};function c(m){return(m/1e3).toFixed(2)+"s"}const v=y(()=>{if(n.value.length===0)return{};const m=[...n.value].reverse(),b=m.map(i=>he(i.name,a.value.labelMaxLength)),f=n.value[0].avgTimeDiff,u=m.map(i=>({value:Math.round(f/i.avgTimeDiff*100),itemStyle:{color:d,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 g=i[0];if(!g)return"";const $=n.value.length-1-g.dataIndex,p=n.value[$];return`
34
- <div style="padding: 4px 8px;">
35
- <div style="font-weight: bold; margin-bottom: 6px;">${p.name}</div>
36
- <div style="margin-bottom: 4px;">⚡️ 平均反应时间: <b>${c(p.avgTimeDiff)}</b></div>
37
- <div style="font-size: 12px; color: #9ca3af;">参与复读 ${p.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:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(i,g)=>{const p=n.value.length-1-g+1;return`${p===1?"🥇":p===2?"🥈":p===3?"🥉":`${p}.`} ${i}`}}},series:[{type:"bar",data:u,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const g=n.value.length-1-i.dataIndex,$=n.value[g];return`${c($.avgTimeDiff)} · ${$.count}次`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(245, 158, 11, 0.3)"}}}]}});return(m,b)=>l.bare?(o(),C(e(pe),{key:0,"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:S(()=>[x(e(te),{option:v.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:S(()=>[s("div",_n,[x(e(te),{option:v.value,height:r.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Cn={class:"flex items-center gap-3"},In={class:"px-3 py-2"},Tn=z({__name:"EChartDivingRank",props:{items:{},showTopNSelect:{type:Boolean,default:!0},maxHeightVh:{default:60},globalTopN:{}},setup(l){const t=l,a=ge(),n=V("desc"),r=V(t.globalTopN??10);E(()=>t.globalTopN,i=>{i!==void 0&&(r.value=i)});const d=y(()=>[...t.items].sort((g,$)=>n.value==="desc"?$.daysSinceLastMessage-g.daysSinceLastMessage:g.daysSinceLastMessage-$.daysSinceLastMessage).slice(0,r.value)),c=y(()=>n.value==="desc"?"🤿 潜水榜 - 潜水最久":"🤿 潜水榜 - 最近冒泡"),v=y(()=>n.value==="desc"?"距离上次发言时间最久的成员":"最近发言过的成员"),m=y(()=>{const i=d.value.length*36;return Math.max(i+30,180)}),b={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(d.value.length===0)return{};const i=[...d.value].reverse(),g=i.map(w=>he(w.name,a.value.labelMaxLength)),$=Math.max(...d.value.map(w=>w.daysSinceLastMessage),1),p=i.map(w=>({value:w.daysSinceLastMessage,itemStyle:{color:b,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:w=>{const k=w[0];if(!k)return"";const _=d.value.length-1-k.dataIndex,R=d.value[_];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;">最后发言: ${Zt(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:g,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(w,k)=>{const R=d.value.length-1-k+1;return`${R===1?"🥇":R===2?"🥈":R===3?"🥉":`${R}.`} ${w}`}}},series:[{type:"bar",data:p,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:w=>{const k=d.value.length-1-w.dataIndex,_=d.value[k];return f(_.daysSinceLastMessage)},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(0, 0, 0, 0.2)"}}}]}});return(i,g)=>(o(),C(e(O),{title:c.value,description:v.value,scrollable:"","max-height-vh":l.maxHeightVh},{headerRight:S(()=>[s("div",Cn,[l.showTopNSelect?(o(),C(e(ue),{key:0,modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=$=>r.value=$)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:n.value,"onUpdate:modelValue":g[1]||(g[1]=$=>n.value=$),items:[{label:"潜水最久",value:"desc"},{label:"最近冒泡",value:"asc"}],size:"sm"},null,8,["modelValue"])])]),default:S(()=>[s("div",In,[x(e(te),{option:u.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Sn={class:"px-3 py-2"},Vn=z({__name:"EChartConsecutiveRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=ge(),n=y(()=>[...t.items].sort((m,b)=>b.maxConsecutiveDays-m.maxConsecutiveDays).slice(0,t.topN)),r=y(()=>{const m=n.value.length*36;return Math.max(m+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]},c={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(),b=m.map(u=>he(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,g=n.value.length-1-i,$=n.value[g];let p=`
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&&(p+=`<div style="color: #f97316;">🔥 当前连续 ${$.currentStreak} 天</div>`),p+="</div>",p}},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:b,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:d,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,g=n.value[i];return g.currentStreak>0?`${g.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}},{name:"已中断",type:"bar",data:m.map(u=>({value:u.currentStreak===0?u.maxConsecutiveDays:0,itemStyle:{color:c,borderRadius:[0,4,4,0]}})),barWidth:18,label:{show:!0,position:"right",distance:8,formatter:u=>{const i=n.value.length-1-u.dataIndex,g=n.value[i];return g.currentStreak===0?`${g.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(m,b)=>l.bare?(o(),C(e(pe),{key:0,"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:S(()=>[x(e(te),{option:v.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:S(()=>[s("div",Sn,[x(e(te),{option:v.value,height:r.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Rn={class:"px-3 py-2"},Ln=z({__name:"EChartNightOwlRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(l){const t=l,a=ge(),n=y(()=>t.items.slice(0,t.topN)),r=y(()=>{const v=n.value.length*36;return Math.max(v+50,200)}),d={h23:"#8b5cf6",h0:"#3b82f6",h1:"#06b6d4",h2:"#f59e0b",h3to4:"#ef4444"},c=y(()=>{if(n.value.length===0)return{};const v=[...n.value].reverse(),m=v.map(f=>he(f.name,a.value.labelMaxLength)),b=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,g=n.value[i],$=g.hourlyBreakdown;return`
50
- <div style="padding: 6px 8px;">
51
- <div style="font-weight: bold; margin-bottom: 6px;">${g.name}</div>
52
- <div style="margin-bottom: 4px;">
53
- 称号: <b style="color: #f472b6;">${g.title}</b>
54
- </div>
55
- <div style="margin-bottom: 6px;">总发言: <b>${g.totalNightMessages}</b> 条</div>
56
- <div style="border-top: 1px solid #374151; padding-top: 6px;">
57
- <div><span style="color: ${d.h23};">●</span> 23点: ${$.h23} 条</div>
58
- <div><span style="color: ${d.h0};">●</span> 0点: ${$.h0} 条</div>
59
- <div><span style="color: ${d.h1};">●</span> 1点: ${$.h1} 条</div>
60
- <div><span style="color: ${d.h2};">●</span> 2点: ${$.h2} 条</div>
61
- <div><span style="color: ${d.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:b*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 g=n.value.length-1-u+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${f}`}}},series:[{name:"23点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h23),itemStyle:{color:d.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h0),itemStyle:{color:d.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h1),itemStyle:{color:d.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h2),itemStyle:{color:d.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:v.map(f=>f.hourlyBreakdown.h3to4),itemStyle:{color:d.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(pe),{key:0,"content-height":r.value,"max-height-vh":l.maxHeightVh},{default:S(()=>[x(e(te),{option:c.value,height:r.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(O),{key:1,title:l.title,description:l.description,scrollable:"","max-height-vh":l.maxHeightVh},{default:S(()=>[s("div",Rn,[x(e(te),{option:c.value,height:r.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Mn={id:"streak-rank",class:"scroll-mt-24"},Dn={class:"flex items-center gap-3"},Nn=z({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=V(null),n=V(!1),r=V("max"),d=V(t.globalTopN??10);E(()=>t.globalTopN,f=>{f!==void 0&&(d.value=f)});const c=y(()=>r.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),v=y(()=>r.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),m=y(()=>a.value?a.value.streakRank.some(f=>f.currentStreak>0):!1);async function b(){if(t.sessionId){n.value=!0;try{a.value=await X().getCheckInAnalysis(t.sessionId,t.timeFilter)}catch(f){console.error("加载打卡分析失败:",f)}finally{n.value=!1}}}return E(()=>[t.sessionId,t.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(f,u)=>(o(),I("div",Mn,[n.value?(o(),C(e(oe),{key:0,text:"正在分析数据..."})):a.value&&a.value.streakRank.length>0?(o(),C(e(O),{key:1,title:c.value,description:v.value},{headerRight:S(()=>[s("div",Dn,[l.showTopNSelect?(o(),C(e(ue),{key:0,modelValue:d.value,"onUpdate:modelValue":u[0]||(u[0]=i=>d.value=i)},null,8,["modelValue"])):A("",!0),m.value?(o(),C(e(re),{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:S(()=>[x(e(xn),{items:a.value.streakRank,title:c.value,mode:r.value,"top-n":d.value,bare:""},null,8,["items","title","mode","top-n"])]),_:1},8,["title","description"])):(o(),C(e(O),{key:2,title:"🔥 火花榜"},{default:S(()=>[x(e(ie),{text:"暂无连续发言数据"})]),_:1}))]))}}),An={class:"flex items-center gap-3"},Fn={key:1,class:"py-8 text-center text-sm text-gray-400"},zn={key:1,class:"py-8 text-center text-sm text-gray-400"},Un=z({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=V(null),n=V(!1),r=V("count"),d=V(t.globalTopN??10);E(()=>t.globalTopN,g=>{g!==void 0&&(d.value=g)});async function c(){if(t.sessionId){n.value=!0;try{a.value=await X().getMemeBattleAnalysis(t.sessionId,t.timeFilter)}catch(g){console.error("加载斗图分析失败:",g)}finally{n.value=!1}}}const v=y(()=>a.value?a.value.rankByCount.map(g=>({id:g.memberId.toString(),name:g.name,value:g.count,percentage:g.percentage})):[]),m=y(()=>a.value?a.value.rankByImageCount.map(g=>({id:g.memberId.toString(),name:g.name,value:g.count,percentage:g.percentage})):[]),b=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 E(()=>[t.sessionId,t.timeFilter],()=>c(),{immediate:!0,deep:!0}),(g,$)=>n.value?(o(),C(e(oe),{key:0,text:"正在统计斗图数据..."})):a.value?(o(),C(e(O),{key:1,title:u.value,description:i.value},{headerRight:S(()=>[s("div",An,[l.showTopNSelect?(o(),C(e(ue),{key:0,modelValue:d.value,"onUpdate:modelValue":$[0]||($[0]=p=>d.value=p)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:r.value,"onUpdate:modelValue":$[1]||($[1]=p=>r.value=p),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:S(()=>[r.value==="battle"?(o(),I(H,{key:0},[a.value.topBattles.length>0?(o(),C(e(wn),{key:0,battles:a.value.topBattles,title:"","top-n":d.value,bare:""},null,8,["battles","top-n"])):(o(),I("div",Fn,"暂无史诗级战役数据"))],64)):(o(),I(H,{key:1},[b.value.length>0?(o(),C(e(Ie),{key:0,members:b.value,title:u.value,unit:f.value,"top-n":d.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),I("div",zn,"暂无斗图数据"))],64))]),_:1},8,["title","description"])):A("",!0)}}),qn={class:"space-y-6"},Bn={class:"flex items-center gap-3"},Hn={class:"flex items-center gap-3"},En={key:1,class:"px-3 py-2"},Pn=z({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=V(null),n=V(!1),r=V("originator"),d=V("fastest"),c=V(t.globalTopN??10),v=V(t.globalTopN??10);E(()=>t.globalTopN,_=>{_!==void 0&&(c.value=_,v.value=_)});async function m(){if(t.sessionId){n.value=!0;try{a.value=await X().getRepeatAnalysis(t.sessionId,t.timeFilter)}catch(_){console.error("加载复读分析失败:",_)}finally{n.value=!1}}}const b=y(()=>a.value?a.value.originators.map(_=>({id:_.memberId.toString(),name:_.name,value:_.count,percentage:_.percentage})):[]),f=y(()=>a.value?a.value.initiators.map(_=>({id:_.memberId.toString(),name:_.name,value:_.count,percentage:_.percentage})):[]),u=y(()=>a.value?a.value.breakers.map(_=>({id:_.memberId.toString(),name:_.name,value:_.count,percentage:_.percentage})):[]),i=y(()=>{switch(r.value){case"originator":return b.value;case"initiator":return f.value;case"breaker":return u.value;default:return b.value}}),g=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""}}),p=y(()=>{if(!a.value)return{labels:[],values:[]};const _=a.value.chainLengthDistribution;return{labels:_.map(R=>`${R.length}人`),values:_.map(R=>R.count)}}),w=y(()=>d.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),k=y(()=>{if(d.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const _=a.value?.totalRepeatChains??0,R=a.value?.avgChainLength??0;return`共 ${_} 次复读,平均 ${R} 人参与`});return E(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),(_,R)=>(o(),I("div",qn,[n.value?(o(),C(e(oe),{key:0,text:"正在分析复读数据..."})):a.value&&a.value.totalRepeatChains>0?(o(),I(H,{key:1},[x(e(O),{title:g.value,description:$.value},{headerRight:S(()=>[s("div",Bn,[l.showTopNSelect?(o(),C(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=B=>c.value=B)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:r.value,"onUpdate:modelValue":R[1]||(R[1]=B=>r.value=B),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:S(()=>[i.value.length>0?(o(),C(e(Ie),{key:0,members:i.value,title:g.value,unit:"次","top-n":c.value,bare:""},null,8,["members","title","top-n"])):(o(),C(e(ie),{key:1,text:"暂无数据"}))]),_:1},8,["title","description"]),x(e(O),{title:w.value,description:k.value},{headerRight:S(()=>[s("div",Hn,[l.showTopNSelect&&d.value==="fastest"?(o(),C(e(ue),{key:0,modelValue:v.value,"onUpdate:modelValue":R[2]||(R[2]=B=>v.value=B)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":R[3]||(R[3]=B=>d.value=B),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:S(()=>[d.value==="fastest"?(o(),I(H,{key:0},[a.value.fastestRepeaters&&a.value.fastestRepeaters.length>0?(o(),C(e($n),{key:0,items:a.value.fastestRepeaters,"top-n":v.value,title:"",bare:""},null,8,["items","top-n"])):(o(),C(e(ie),{key:1,text:"暂无最快复读数据"}))],64)):(o(),I("div",En,[p.value.labels.length>0?(o(),C(e(Xt),{key:0,data:p.value,height:200},null,8,["data"])):(o(),C(e(ie),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(o(),C(e(O),{key:2,title:"🔁 复读榜"},{default:S(()=>[x(e(ie),{text:"该群组暂无复读记录"})]),_:1}))]))}}),On=z({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(l){const t=l,a=V(null),n=V(!1);async function r(){if(t.sessionId){n.value=!0;try{a.value=await X().getDivingAnalysis(t.sessionId,t.timeFilter)}catch(d){console.error("加载潜水分析失败:",d)}finally{n.value=!1}}}return E(()=>[t.sessionId,t.timeFilter],()=>r(),{immediate:!0,deep:!0}),(d,c)=>n.value?(o(),C(e(oe),{key:0,text:"正在统计潜水数据..."})):a.value&&a.value.rank.length>0?(o(),C(e(Tn),{key:1,items:a.value.rank,"global-top-n":l.globalTopN},null,8,["items","global-top-n"])):A("",!0)}}),Wn={class:"space-y-6"},jn={class:"flex items-center gap-3"},Kn={key:1,class:"py-8 text-center text-sm text-gray-400"},Gn={key:1,class:"py-8 text-center text-sm text-gray-400"},Yn={class:"flex items-center gap-3"},Qn={key:1,class:"py-8 text-center text-sm text-gray-400"},Jn=z({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(l){const t=l,a=V(null),n=V(!1),r=V("first"),d=V("distribution"),c=V(t.globalTopN??10),v=V(t.globalTopN??10);E(()=>t.globalTopN,w=>{w!==void 0&&(c.value=w,v.value=w)});async function m(){if(t.sessionId){n.value=!0;try{a.value=await X().getNightOwlAnalysis(t.sessionId,t.timeFilter)}catch(w){console.error("加载出勤分析失败:",w)}finally{n.value=!1}}}const b=y(()=>a.value?a.value.lastSpeakerRank.map(w=>({id:String(w.memberId),name:w.name,value:w.count,percentage:w.percentage})):[]),f=y(()=>a.value?a.value.firstSpeakerRank.map(w=>({id:String(w.memberId),name:w.name,value:w.count,percentage:w.percentage})):[]),u=y(()=>r.value==="last"?b.value:f.value),i=y(()=>r.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),g=y(()=>{const w=a.value?.totalDays??0;return r.value==="last"?`每天最后一个发言的人(共 ${w} 天)`:`每天第一个发言的人(共 ${w} 天)`}),$=y(()=>d.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),p=y(()=>d.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return E(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),(w,k)=>(o(),I("div",Wn,[n.value?(o(),C(e(oe),{key:0,text:"正在加载出勤分析..."})):a.value?(o(),I(H,{key:1},[x(e(O),{title:$.value,description:p.value},{headerRight:S(()=>[s("div",jn,[l.showTopNSelect?(o(),C(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":k[0]||(k[0]=_=>c.value=_)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":k[1]||(k[1]=_=>d.value=_),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:S(()=>[d.value==="distribution"?(o(),I(H,{key:0},[a.value.nightOwlRank.length>0?(o(),C(e(Ln),{key:0,items:a.value.nightOwlRank,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),I("div",Kn,"暂无深夜发言数据"))],64)):(o(),I(H,{key:1},[a.value.consecutiveRecords.length>0?(o(),C(e(Vn),{key:0,items:a.value.consecutiveRecords,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),I("div",Gn,"暂无连续记录"))],64))]),_:1},8,["title","description"]),x(e(O),{title:i.value,description:g.value},{headerRight:S(()=>[s("div",Yn,[l.showTopNSelect?(o(),C(e(ue),{key:0,modelValue:v.value,"onUpdate:modelValue":k[2]||(k[2]=_=>v.value=_)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:r.value,"onUpdate:modelValue":k[3]||(k[3]=_=>r.value=_),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:S(()=>[u.value.length>0?(o(),C(e(Ie),{key:0,members:u.value,title:i.value,"top-n":v.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(o(),I("div",Qn,"暂无数据"))]),_:1},8,["title","description"])],64)):A("",!0)]))}}),Xn={class:"mb-8 mt-4"},Zn={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"}},el={id:"activity-rank",class:"scroll-mt-24"},tl={id:"meme-battle",class:"scroll-mt-24"},al={id:"repeat",class:"scroll-mt-24"},sl={id:"night-owl",class:"scroll-mt-24"},ol={id:"diving",class:"scroll-mt-24"},nl={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},ll={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},il={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},rl=["onClick"],ul=z({__name:"OverallRankingTab",props:{sessionId:{},timeFilter:{}},setup(l){const t=l,a=V([]),n=V([]);async function r(){if(!t.sessionId)return;const p=X(),[w,k]=await Promise.all([p.getMemberActivity(t.sessionId,t.timeFilter),p.getAvailableYears(t.sessionId)]);a.value=w,n.value=k}E(()=>[t.sessionId,t.timeFilter],()=>r(),{immediate:!0,deep:!0});const d=y(()=>{if(t.timeFilter?.startTs&&t.timeFilter?.endTs){const p=new Date(t.timeFilter.startTs*1e3).getFullYear(),w=new Date(t.timeFilter.endTs*1e3).getFullYear();return p===w?`${p} 赛季`:`${p}-${w} 赛季`}if(n.value.length>0){const p=[...n.value].sort((_,R)=>_-R),w=p[0],k=p[p.length-1];return w===k?`${w} 赛季`:`${w}-${k} 赛季`}return"全部赛季"}),c=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:b,scrollToAnchor:f}=ta(v,{threshold:350}),u=V(10),i=V("standard");Ge(tt,i);const g=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],$=y(()=>at[i.value].contentClass);return(p,w)=>(o(),I("div",{ref_key:"contentRef",ref:m,class:"flex gap-6 p-6"},[s("div",{class:W(["main-content mx-auto min-w-0 flex-1 space-y-6 px-8",$.value])},[s("div",Xn,[s("h1",Zn," 🏆 "+h(d.value),1),w[1]||(w[1]=s("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),s("div",el,[x(e(hn),{"session-id":t.sessionId,"member-activity":a.value,"time-filter":c.value,"global-top-n":u.value},null,8,["session-id","member-activity","time-filter","global-top-n"])]),x(e(Nn),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"]),s("div",tl,[x(e(Un),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",al,[x(e(Pn),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",sl,[x(e(Jn),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"])]),s("div",ol,[x(e(On),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":u.value},null,8,["session-id","time-filter","global-top-n"])]),w[2]||(w[2]=s("div",{class:"h-48 no-capture"},null,-1))],2),x(e(la),{anchors:v,"active-anchor":e(b),onClick:e(f)},{default:S(()=>[s("div",nl,[w[3]||(w[3]=s("div",{class:"mb-2 text-xs text-gray-400"},"显示数量",-1)),x(e(ue),{modelValue:u.value,"onUpdate:modelValue":w[0]||(w[0]=k=>u.value=k)},null,8,["modelValue"])]),s("div",ll,[w[4]||(w[4]=s("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),s("div",il,[(o(),I(H,null,Y(g,k=>s("button",{key:k.value,type:"button",class:W(["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:_=>i.value=k.value},h(k.label),11,rl)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),cl={class:"flex h-full flex-col"},dl={class:"min-h-0 flex-1 overflow-y-auto"},ml={key:1,class:"main-content mx-auto w-full max-w-3xl p-6"},vl=z({__name:"RankingView",props:{sessionId:{},timeFilter:{}},setup(l){const t=l,{t:a,locale:n}=Q(),r=V("overall"),d=V(null),c=y(()=>ft("groupRanking",n.value)),v=y(()=>[...c.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})),b=y(()=>({...m.value,memberId:d.value}));return E(v,f=>{f.some(u=>u.id===r.value)||(r.value=f[0]?.id??"hot-repeat")},{immediate:!0}),(f,u)=>(o(),I("div",cl,[x(e(Ae),{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=i=>r.value=i),items:v.value,"persist-key":"groupRankingTab"},{right:S(()=>[r.value==="catchphrase"?(o(),C(Ye,{key:0,modelValue:d.value,"onUpdate:modelValue":u[0]||(u[0]=i=>d.value=i),"session-id":t.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),s("div",dl,[x(Fe,{name:"fade",mode:"out-in"},{default:S(()=>[r.value==="overall"?(o(),C(ul,{key:0,"session-id":t.sessionId,"time-filter":m.value},null,8,["session-id","time-filter"])):r.value==="keyword"?(o(),I("div",ml,[x(vn,{"session-id":t.sessionId,"time-filter":m.value},null,8,["session-id","time-filter"])])):r.value==="hot-repeat"?(o(),C(e(Io),{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":b.value},null,8,["session-id","time-filter"])):A("",!0)]),_:1})])]))}}),pl=ze(vl,[["__scopeId","data-v-d8d145dc"]]),gl={class:"main-content max-w-5xl p-6"},hl={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},fl={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},yl={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},bl={class:"flex flex-1 flex-wrap items-center gap-2"},xl={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},kl={class:"text-xs text-gray-400"},wl={key:0,class:"text-gray-300 dark:text-gray-600"},_l=z({__name:"NicknameHistory",props:{sessionId:{}},setup(l){const{t}=Q(),a=l,n=V([]),r=V([]),d=V(!1);function c(b){return b.groupNickname||b.accountName||b.platformId}async function v(){if(a.sessionId)try{n.value=await X().getMembers(a.sessionId)}catch(b){console.error("加载成员列表失败:",b)}}async function m(){if(!a.sessionId||n.value.length===0)return;d.value=!0;const b=[];try{const f=n.value.map(i=>X().getMemberNameHistory(a.sessionId,i.id)),u=await Promise.all(f);n.value.forEach((i,g)=>{const $=u[g];$.length>2&&b.push({memberId:i.id,name:c(i),history:$})}),r.value=b}catch(f){console.error("加载昵称变更记录失败:",f)}finally{d.value=!1}}return E(()=>a.sessionId,async()=>{await v()},{immediate:!0}),E(()=>n.value.length,()=>{n.value.length>0&&m()}),$e(async()=>{n.value.length===0&&await v()}),(b,f)=>{const u=Ke;return o(),I("div",gl,[s("p",hl,h(e(t)("members.nicknameHistory.note")),1),x(e(O),{title:e(t)("members.nicknameHistory.title"),description:d.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:S(()=>[!d.value&&r.value.length>0?(o(),I("div",fl,[(o(!0),I(H,null,Y(r.value,i=>(o(),I("div",{key:i.memberId,class:"flex items-start gap-3 px-5 py-3"},[s("div",yl,h(i.name),1),s("div",bl,[(o(!0),I(H,null,Y(i.history,(g,$)=>(o(),I(H,{key:$},[s("div",xl,[s("span",{class:W(["text-sm",g.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},h(g.name),3),g.endTs===null?(o(),C(u,{key:0,color:"primary",variant:"soft",size:"xs"},{default:S(()=>[K(h(e(t)("members.nicknameHistory.current")),1)]),_:1})):A("",!0),s("span",kl,"("+h(e(ea)(g.startTs,g.endTs))+")",1)]),$<i.history.length-1?(o(),I("span",wl,"→")):A("",!0)],64))),128))])]))),128))])):d.value?(o(),C(e(oe),{key:2,text:e(t)("members.nicknameHistory.loadingText")},null,8,["text"])):(o(),C(e(ie),{key:1,text:e(t)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),$l={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Cl={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},Il={class:"text-lg font-semibold text-gray-900 dark:text-white"},Tl={class:"flex-1 overflow-auto"},Sl=z({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(l){const{t}=Q(),a=l,n=V(!1);return(r,d)=>{const c=me,v=Ce;return o(),I(H,null,[x(c,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:d[0]||(d[0]=m=>n.value=!0)},{default:S(()=>[K(h(e(t)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),a.sessionId?(o(),C(v,{key:0,open:n.value,"onUpdate:open":d[2]||(d[2]=m=>n.value=m),ui:{content:"max-w-6xl h-[85vh]"}},{content:S(()=>[s("div",$l,[s("div",Cl,[s("h2",Il,h(e(t)("analysis.subTabs.member.nicknameHistory")),1),x(c,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:d[1]||(d[1]=m=>n.value=!1)})]),s("div",Tl,[x(_l,{"session-id":a.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):A("",!0)],64)}}}),Vl={class:"relative flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},Rl=["aria-label"],Ll={class:"relative flex-1 overflow-y-auto"},Ml={class:"h-full"},Dl={key:2,class:"flex h-full items-center justify-center"},Nl={class:"text-gray-500"},Al={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Fl={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},zl={class:"text-lg font-semibold text-gray-900 dark:text-white"},Ul={class:"text-sm text-gray-500 dark:text-gray-400"},ql={class:"flex items-center gap-2"},Bl={class:"flex-1 overflow-hidden"},Hl=z({__name:"index",setup(l){const t=$t(()=>Ct(()=>import("./MessageExportModal-ODYCcSnk.js"),__vite__mapDeps([0,1,2,3]))),{t:a}=Q(),n=wt(),r=_t(),d=yt(),c=Ue(),v=bt(),{currentSessionId:m}=xt(d),b=V(!1),f=V(!1),u=V(!1),i=V(!1),g=V(!1);function $(){c.openChatRecordDrawer({})}const p=[{id:"insights",labelKey:"analysis.tabs.insights",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"}],w=y(()=>v.debugMode?[...p,{id:"debug",labelKey:"analysis.tabs.debug",icon:"i-heroicons-bug-ant"}]:p),k=y(()=>w.value.map(Z=>Z.id)),{activeTab:_,isLoading:R,isInitialLoad:B,isSessionSwitching:ae,session:D,memberActivity:U,hourlyActivity:P,dailyActivity:ee,messageTypes:J,timeRangeValue:j,fullTimeRange:N,availableYears:q,timeFilter:G,initialTimeState:fe,loadData:ke,handleTimeRangeInitialized:we}=Dt({route:n,router:r,currentSessionId:m,selectSession:d.selectSession,defaultTab:v.defaultSessionTab,validTabIds:k.value});Ge("session-switch-loading",ae);const Te=y(()=>U.value.reduce((Z,L)=>Z+L.messageCount,0)),Se=y(()=>U.value.filter(Z=>Z.messageCount>0).length);return(Z,L)=>{const Ve=me,Re=Ce;return o(),I("div",Vl,[e(ae)?(o(),I("div",{key:0,"data-testid":"group-chat-switch-loading",class:"absolute inset-0 z-20 flex cursor-wait items-center justify-center bg-page-bg/15 backdrop-blur-[1.5px] dark:bg-page-dark/15",style:{paddingTop:"var(--titlebar-area-height)"},role:"status","aria-live":"polite","aria-label":e(a)("common.loading")},[x(Ut)],8,Rl)):A("",!0),e(D)?(o(),I(H,{key:1},[x(Nt,{"active-tab":e(_),"onUpdate:activeTab":L[0]||(L[0]=T=>Ee(_)?_.value=T:null),"time-range-value":e(j),"onUpdate:timeRangeValue":L[1]||(L[1]=T=>Ee(j)?j.value=T:null),title:e(D).name,avatar:e(D).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:w.value,"current-session-id":e(m),"initial-time-state":e(fe),onOpenIncrementalImport:L[2]||(L[2]=T=>u.value=!0),onOpenMemberManagement:L[3]||(L[3]=T=>g.value=!0),onOpenChatRecord:$,"onUpdate:fullRange":L[4]||(L[4]=T=>N.value=T),"onUpdate:availableYears":L[5]||(L[5]=T=>q.value=T),onTimeRangeInitialized:e(we)},null,8,["active-tab","time-range-value","title","avatar","tabs","current-session-id","initial-time-state","onTimeRangeInitialized"]),s("div",Ll,[e(R)&&!e(ae)?(o(),C(e(oe),{key:0,variant:"overlay"})):A("",!0),s("div",Ml,[x(Fe,{name:"tab-slide",mode:"out-in"},{default:S(()=>[e(_)==="insights"?(o(),C(No,{key:"insights-"+e(m),"session-id":e(m),session:e(D),"member-activity":e(U),"message-types":e(J),"hourly-activity":e(P),"daily-activity":e(ee),"time-range":e(N),"filtered-message-count":Te.value,"filtered-member-count":Se.value,"time-filter":e(G)},null,8,["session-id","session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):e(_)==="ranking"?(o(),C(pl,{key:"ranking-"+e(m),"session-id":e(m),"time-filter":e(G)},null,8,["session-id","time-filter"])):e(_)==="ai-chat"?(o(),C(e(qt),{key:"ai-chat-"+e(m),"session-id":e(m),"session-name":e(D).name,"chat-type":"group"},null,8,["session-id","session-name"])):e(_)==="memory"?(o(),C(Bt,{key:"memory-"+e(m),"session-id":e(m),"session-name":e(D).name},null,8,["session-id","session-name"])):e(_)==="lab"?(o(),C(Ht,{key:"lab-"+e(m),"session-id":e(m),"chat-type":"group"},null,8,["session-id"])):e(_)==="debug"?(o(),C(e(Et),{key:"debug-"+e(m),"session-id":e(m)},null,8,["session-id"])):A("",!0)]),_:1})])]),x(At,{onOpenIncrementalImport:L[6]||(L[6]=T=>u.value=!0),onOpenSemanticIndex:L[7]||(L[7]=T=>b.value=!0),onOpenMemberManagement:L[8]||(L[8]=T=>g.value=!0),onOpenChatRecord:$,onOpenMessageExport:L[9]||(L[9]=T=>i.value=!0)})],64)):e(B)?A("",!0):(o(),I("div",Dl,[s("p",Nl,h(e(a)("analysis.groupChat.loadError")),1)])),e(m)&&e(D)?(o(),C(Ft,{key:3,modelValue:b.value,"onUpdate:modelValue":L[10]||(L[10]=T=>b.value=T),"session-id":e(m),"message-count":e(D).messageCount},null,8,["modelValue","session-id","message-count"])):A("",!0),e(m)&&e(D)?(o(),C(kt,{key:4,modelValue:f.value,"onUpdate:modelValue":L[11]||(L[11]=T=>f.value=T),"session-id":e(m),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):A("",!0),e(m)&&e(D)?(o(),C(zt,{key:5,modelValue:u.value,"onUpdate:modelValue":L[12]||(L[12]=T=>u.value=T),"session-id":e(m),"session-name":e(D).name,onImported:L[13]||(L[13]=()=>{e(ke)(),e(d).loadSessions()})},null,8,["modelValue","session-id","session-name"])):A("",!0),e(m)?(o(),C(e(t),{key:6,modelValue:i.value,"onUpdate:modelValue":L[14]||(L[14]=T=>i.value=T)},null,8,["modelValue"])):A("",!0),e(m)?(o(),C(Re,{key:7,open:g.value,"onUpdate:open":L[16]||(L[16]=T=>g.value=T),ui:{content:"max-w-6xl h-[85vh]"}},{content:S(()=>[s("div",Al,[s("div",Fl,[s("div",null,[s("h2",zl,h(e(a)("analysis.tooltip.memberManagement")),1),s("p",Ul,h(e(a)("members.list.description",{count:e(D)?.memberCount??0})),1)]),s("div",ql,[x(Sl,{"session-id":e(m)},null,8,["session-id"]),x(Ve,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:L[15]||(L[15]=T=>g.value=!1)})])]),s("div",Bl,[x(Pt,{"session-id":e(m),"show-header":!1,"chat-type":"group",onDataChanged:e(ke)},null,8,["session-id","onDataChanged"])])])]),_:1},8,["open"])):A("",!0)])}}}),ti=ze(Hl,[["__scopeId","data-v-67649338"]]);export{ti as default};
@@ -1 +0,0 @@
1
- .insight-tab-slide-enter-active[data-v-a94720f4],.insight-tab-slide-leave-active[data-v-a94720f4]{transition:opacity .2s ease,transform .2s ease}.insight-tab-slide-enter-from[data-v-a94720f4]{opacity:0;transform:translateY(10px)}.insight-tab-slide-leave-to[data-v-a94720f4]{opacity:0;transform:translateY(-10px)}
@@ -1 +0,0 @@
1
- import{d as a,v as n,c as o,C as e,D as c,E as r,F as i,o as m,_}from"./index-y7xPDpsW.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"},g=a({__name:"index",setup(d){const{t}=n();return(x,u)=>{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{g as default};