chatlab-cli 0.34.3 → 0.35.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 (174) hide show
  1. package/dist/{chat-command-QH7DXCAJ.mjs → chat-command-24RYGJAS.mjs} +8 -8
  2. package/dist/{chunk-2WYXD5ZP.mjs → chunk-22YJOBA3.mjs} +474 -99
  3. package/dist/chunk-22YJOBA3.mjs.map +1 -0
  4. package/dist/{chunk-AWXHYTD5.mjs → chunk-4GWWKHWA.mjs} +42 -14
  5. package/dist/chunk-4GWWKHWA.mjs.map +1 -0
  6. package/dist/{chunk-ZVGDOSGG.mjs → chunk-7IGBPZMI.mjs} +38 -18
  7. package/dist/chunk-7IGBPZMI.mjs.map +1 -0
  8. package/dist/{chunk-WJVE5Q4Y.mjs → chunk-BRZ6YIBR.mjs} +2 -2
  9. package/dist/{chunk-XIWVJAXH.mjs → chunk-DC7IUDNV.mjs} +10 -18
  10. package/dist/chunk-DC7IUDNV.mjs.map +1 -0
  11. package/dist/{chunk-JYBPJWE2.mjs → chunk-DEFEU567.mjs} +10 -18
  12. package/dist/chunk-DEFEU567.mjs.map +1 -0
  13. package/dist/{chunk-C2PD3BS7.mjs → chunk-GQMCDWZQ.mjs} +2 -2
  14. package/dist/{chunk-AWGXYFIC.mjs → chunk-KIMJXKZO.mjs} +2 -2
  15. package/dist/{chunk-SWUTRDGZ.mjs → chunk-KXDJ7N6N.mjs} +2 -2
  16. package/dist/{chunk-3X26JJIP.mjs → chunk-QKEARRFH.mjs} +3 -3
  17. package/dist/{chunk-6U2QZO3N.mjs → chunk-U36TQMAF.mjs} +2 -2
  18. package/dist/{chunk-2Q3HHVTS.mjs → chunk-ZBPPLXM4.mjs} +12 -12
  19. package/dist/cli.mjs +9 -9
  20. package/dist/contacts-worker.mjs +2 -2
  21. package/dist/global-insight-worker.mjs +1 -1
  22. package/dist/{http-D2F4QTQW.mjs → http-3K4YMWDE.mjs} +12 -12
  23. package/dist/{import-H7X2JU2O.mjs → import-D4LV565A.mjs} +7 -7
  24. package/dist/index.mjs +12 -12
  25. package/dist/{mcp-UURXRGDF.mjs → mcp-KL22FKQ2.mjs} +8 -8
  26. package/dist/people-relationships-worker.mjs +2 -2
  27. package/dist/semantic-index-worker.mjs +1 -1
  28. package/dist/{src-MHCO4HYY.mjs → src-COIB6Z4P.mjs} +8 -6
  29. package/dist/{stream-import-BHXACUCA.mjs → stream-import-FSXCFG4M.mjs} +7 -7
  30. package/dist/{worker-runtime-JOUCP2L4.mjs → worker-runtime-DPS2LURI.mjs} +5 -5
  31. package/dist-cli-web/assets/AISettingsTab-rQC2ocFH.js +1 -0
  32. package/dist-cli-web/assets/AboutTab-DMPziKjj.js +1 -0
  33. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-CnRLt_1j.js +110 -0
  34. package/dist-cli-web/assets/Alert--bTQXRcZ.js +1 -0
  35. package/dist-cli-web/assets/ApiSettingsTab-CtXl4I28.js +2 -0
  36. package/dist-cli-web/assets/BatchManageTab-1KaCPweN.js +1 -0
  37. package/dist-cli-web/assets/{BufferResource-Dak23r3B.js → BufferResource-BXSJADxx.js} +1 -1
  38. package/dist-cli-web/assets/CanvasRenderer-Cq--8UQ_.js +1 -0
  39. package/dist-cli-web/assets/ChatRecordDrawer-BC0F7ok1.js +11 -0
  40. package/dist-cli-web/assets/ChatRecordDrawer-Tt6UduRC.css +1 -0
  41. package/dist-cli-web/assets/Checkbox-CwajNPGF.js +1 -0
  42. package/dist-cli-web/assets/DataDirCleanupNotice-D0Oruka2.js +1 -0
  43. package/dist-cli-web/assets/DatePicker.vue_vue_type_script_setup_true_lang-C4CsoIlq.js +1 -0
  44. package/dist-cli-web/assets/DebugToolsPanel-DVDwS-wz.js +1 -0
  45. package/dist-cli-web/assets/EChartWordcloud-KV0MdsDE.js +1 -0
  46. package/dist-cli-web/assets/{Filter-CHKZVYB3.js → Filter-DVaqcFmI.js} +1 -1
  47. package/dist-cli-web/assets/GlobalTaskBar-COW_uBX6.css +1 -0
  48. package/dist-cli-web/assets/GlobalTaskBar-DpPMX0jx.js +1 -0
  49. package/dist-cli-web/assets/GroupRelationshipGalaxyView-CLnO3phW.js +1 -0
  50. package/dist-cli-web/assets/Label-Bt2U4lGy.js +1 -0
  51. package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-Cnshyn0f.js +1 -0
  52. package/dist-cli-web/assets/MessageExportModal-BozaR9UZ.js +1 -0
  53. package/dist-cli-web/assets/PageHeader-CEe0xTl3.js +1 -0
  54. package/dist-cli-web/assets/PageTabs.vue_vue_type_script_setup_true_lang-D2DZrrnv.js +1 -0
  55. package/dist-cli-web/assets/{RelationshipGalaxyCanvas-mJhEPzsY.js → RelationshipGalaxyCanvas-6EamagxG.js} +3 -3
  56. package/dist-cli-web/assets/{RelationshipGalaxyThreeCanvas-Bf76yzmQ.js → RelationshipGalaxyThreeCanvas-B6GB4PWS.js} +166 -166
  57. package/dist-cli-web/assets/{RelationshipGalaxyThreeCanvas-CMuibfiA.css → RelationshipGalaxyThreeCanvas-TYGOUDiv.css} +1 -1
  58. package/dist-cli-web/assets/{RenderTargetSystem-1rM7OF-M.js → RenderTargetSystem-mYuj4uBS.js} +1 -1
  59. package/dist-cli-web/assets/RovingFocusItem-B2y6BG1a.js +1 -0
  60. package/dist-cli-web/assets/ScreenCaptureModal-BvAtSNNR.js +1 -0
  61. package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-ueEF4zHE.js +1 -0
  62. package/dist-cli-web/assets/Select-Cm4I8u9n.js +1 -0
  63. package/dist-cli-web/assets/SettingsModal-CjVax3I6.css +1 -0
  64. package/dist-cli-web/assets/SettingsModal-Cwshzj7i.js +2 -0
  65. package/dist-cli-web/assets/StorageTab-D7HzH16Y.js +1 -0
  66. package/dist-cli-web/assets/Switch-BVw4e_19.js +1 -0
  67. package/dist-cli-web/assets/Tabs-Dqwkh3Ea.js +1 -0
  68. package/dist-cli-web/assets/Tabs-OrJkANIA.js +1 -0
  69. package/dist-cli-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-DPIvbq75.js +1 -0
  70. package/dist-cli-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-dEdo6CqM.js +1 -0
  71. package/dist-cli-web/assets/VisuallyHiddenInput-BOdkR_GC.js +1 -0
  72. package/dist-cli-web/assets/{WebGLRenderer-Y0jQtBvK.js → WebGLRenderer-BB8ukBI_.js} +2 -2
  73. package/dist-cli-web/assets/{WebGPURenderer-BcUvCPhd.js → WebGPURenderer-DDOzF1Kc.js} +2 -2
  74. package/dist-cli-web/assets/aiChat-CzFSFuOJ.js +8 -0
  75. package/dist-cli-web/assets/annual-summary-time-range-CmrAqcuj.js +1 -0
  76. package/dist-cli-web/assets/base-CawUl6ET.js +1 -0
  77. package/dist-cli-web/assets/{browserAll-BsR1UaCC.js → browserAll-BRqlnNxq.js} +2 -2
  78. package/dist-cli-web/assets/chatlabSiteLocale-CrCNb8QP.js +1 -0
  79. package/dist-cli-web/assets/clamp-jFYhBC76.js +1 -0
  80. package/dist-cli-web/assets/cli-web-ClAJ6Tao.js +1 -0
  81. package/dist-cli-web/assets/{dateFormat-B6JnNCxp.js → dateFormat-DXuDxIye.js} +1 -1
  82. package/dist-cli-web/assets/fetch-3_xX8Yi8.js +1 -0
  83. package/dist-cli-web/assets/{fetch-DGvqctIb.js → fetch-Bcy2T8Fe.js} +1 -1
  84. package/dist-cli-web/assets/{fetch-BAJ_VjWE.js → fetch-CGu53cxT.js} +1 -1
  85. package/dist-cli-web/assets/{fetch-bdY0RMM3.js → fetch-CP1afnT0.js} +1 -1
  86. package/dist-cli-web/assets/{fetch-Clj_RVUD.js → fetch-DWAIk_6_.js} +1 -1
  87. package/dist-cli-web/assets/{fetch-DtnhbqTN.js → fetch-DijSOvop.js} +1 -1
  88. package/dist-cli-web/assets/{fetch-D7vgaLpy.js → fetch-Dy38lkAa.js} +1 -1
  89. package/dist-cli-web/assets/{fetch-bhHY8rO7.js → fetch-DzKlTaLz.js} +1 -1
  90. package/dist-cli-web/assets/{fetch-CPloHijF.js → fetch-LY-yerw1.js} +1 -1
  91. package/dist-cli-web/assets/{fetch-BNcHe2-O.js → fetch-q480XYZQ.js} +1 -1
  92. package/dist-cli-web/assets/index-0dp58uL4.css +1 -0
  93. package/dist-cli-web/assets/index-1X7zdLgJ.css +1 -0
  94. package/dist-cli-web/assets/index-4enwdBcq.css +1 -0
  95. package/dist-cli-web/assets/index-AudHHbMs.js +1 -0
  96. package/dist-cli-web/assets/{index-DMYFpctK.js → index-BRV_D8dv.js} +3 -3
  97. package/dist-cli-web/assets/index-CF4DTbvD.js +1 -0
  98. package/dist-cli-web/assets/index-CMLoht5R.js +1 -0
  99. package/dist-cli-web/assets/index-CMPHZH6B.css +1 -0
  100. package/dist-cli-web/assets/index-CNzv7aBW.js +1 -0
  101. package/dist-cli-web/assets/index-CXUTiy-V.js +1 -0
  102. package/dist-cli-web/assets/index-D5m0P4ss.js +36 -0
  103. package/dist-cli-web/assets/index-Di6FmCdk.js +64 -0
  104. package/dist-cli-web/assets/index-DkOrt7_X.js +2 -0
  105. package/dist-cli-web/assets/index-Dlb6fC68.js +1 -0
  106. package/dist-cli-web/assets/index-IA7YUjQX.js +2 -0
  107. package/dist-cli-web/assets/index-kzU381y1.js +1 -0
  108. package/dist-cli-web/assets/index-z8Vogc-b.js +137 -0
  109. package/dist-cli-web/assets/lazy-overlay-visibility-Bd9ZFOgR.js +1 -0
  110. package/dist-cli-web/assets/member-select-utils-BXZ3oHct.js +1 -0
  111. package/dist-cli-web/assets/people-page-header-Bh3KXD4g.js +1 -0
  112. package/dist-cli-web/assets/prompt-DcAcgQiB.js +1 -0
  113. package/dist-cli-web/assets/relationship-galaxy-connections-Cg4G5yYE.js +1 -0
  114. package/dist-cli-web/assets/semantic-index-config-builder-CK6v64Y1.js +1 -0
  115. package/dist-cli-web/assets/service-YZnJyEMq.js +1 -0
  116. package/dist-cli-web/assets/useFormControl-B-aXrJZN.js +1 -0
  117. package/dist-cli-web/assets/useTable-DPEMaGby.js +1 -0
  118. package/dist-cli-web/assets/useToast-B36MzFFy.js +1 -0
  119. package/dist-cli-web/assets/vendor-echarts-DfAMQxdr.js +11 -0
  120. package/dist-cli-web/assets/{vendor-echarts-wordcloud-Ca8n6qS6.js → vendor-echarts-wordcloud-BsaEJTPY.js} +1 -1
  121. package/dist-cli-web/assets/vendor-zrender-PFmZe1EY.js +8 -0
  122. package/dist-cli-web/assets/{webworkerAll-CfZWlukP.js → webworkerAll-Dwqmy_YO.js} +1 -1
  123. package/dist-cli-web/index.html +2 -2
  124. package/package.json +1 -1
  125. package/dist/chunk-2WYXD5ZP.mjs.map +0 -1
  126. package/dist/chunk-AWXHYTD5.mjs.map +0 -1
  127. package/dist/chunk-JYBPJWE2.mjs.map +0 -1
  128. package/dist/chunk-XIWVJAXH.mjs.map +0 -1
  129. package/dist/chunk-ZVGDOSGG.mjs.map +0 -1
  130. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-kN3uxTW8.js +0 -110
  131. package/dist-cli-web/assets/CanvasRenderer-Cmjtvski.js +0 -1
  132. package/dist-cli-web/assets/DataDirCleanupNotice-B5tyDzK-.js +0 -1
  133. package/dist-cli-web/assets/EChartWordcloud-Bd3L3G8I.js +0 -1
  134. package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-CKf_gC1k.js +0 -1
  135. package/dist-cli-web/assets/MessageExportModal-ODYCcSnk.js +0 -1
  136. package/dist-cli-web/assets/PageHeader-Bn7Jn8JW.js +0 -1
  137. package/dist-cli-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-CADZpPia.js +0 -1
  138. package/dist-cli-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-I3FYjhfs.js +0 -1
  139. package/dist-cli-web/assets/annual-summary-time-range-BIADd8qE.js +0 -1
  140. package/dist-cli-web/assets/base-BpxxC5Z5.js +0 -1
  141. package/dist-cli-web/assets/cli-web-BiWUOncc.js +0 -1
  142. package/dist-cli-web/assets/fetch-DSxgaVBO.js +0 -1
  143. package/dist-cli-web/assets/index-B6Gq11lw.css +0 -1
  144. package/dist-cli-web/assets/index-BJ2lywiG.js +0 -1
  145. package/dist-cli-web/assets/index-BT3_fSP6.js +0 -2
  146. package/dist-cli-web/assets/index-BVZhP1J5.js +0 -1
  147. package/dist-cli-web/assets/index-Br8r4pu8.js +0 -1
  148. package/dist-cli-web/assets/index-Byok4VaA.css +0 -1
  149. package/dist-cli-web/assets/index-CKnnxOci.js +0 -1
  150. package/dist-cli-web/assets/index-CXnYfvTv.js +0 -137
  151. package/dist-cli-web/assets/index-CsFLLk3T.css +0 -1
  152. package/dist-cli-web/assets/index-CzoOQ7zg.js +0 -1
  153. package/dist-cli-web/assets/index-D-dTTUGj.js +0 -1
  154. package/dist-cli-web/assets/index-DEbvEKzi.js +0 -2
  155. package/dist-cli-web/assets/index-KO7uPd8W.js +0 -64
  156. package/dist-cli-web/assets/index-lkmJ6dI7.js +0 -1
  157. package/dist-cli-web/assets/index-y7xPDpsW.js +0 -53
  158. package/dist-cli-web/assets/people-page-header-gjTyODWs.js +0 -1
  159. package/dist-cli-web/assets/vendor-echarts-B-i_56Av.js +0 -11
  160. package/dist-cli-web/assets/vendor-zrender-5DcYjSZk.js +0 -8
  161. /package/dist/{chat-command-QH7DXCAJ.mjs.map → chat-command-24RYGJAS.mjs.map} +0 -0
  162. /package/dist/{chunk-WJVE5Q4Y.mjs.map → chunk-BRZ6YIBR.mjs.map} +0 -0
  163. /package/dist/{chunk-C2PD3BS7.mjs.map → chunk-GQMCDWZQ.mjs.map} +0 -0
  164. /package/dist/{chunk-AWGXYFIC.mjs.map → chunk-KIMJXKZO.mjs.map} +0 -0
  165. /package/dist/{chunk-SWUTRDGZ.mjs.map → chunk-KXDJ7N6N.mjs.map} +0 -0
  166. /package/dist/{chunk-3X26JJIP.mjs.map → chunk-QKEARRFH.mjs.map} +0 -0
  167. /package/dist/{chunk-6U2QZO3N.mjs.map → chunk-U36TQMAF.mjs.map} +0 -0
  168. /package/dist/{chunk-2Q3HHVTS.mjs.map → chunk-ZBPPLXM4.mjs.map} +0 -0
  169. /package/dist/{http-D2F4QTQW.mjs.map → http-3K4YMWDE.mjs.map} +0 -0
  170. /package/dist/{import-H7X2JU2O.mjs.map → import-D4LV565A.mjs.map} +0 -0
  171. /package/dist/{mcp-UURXRGDF.mjs.map → mcp-KL22FKQ2.mjs.map} +0 -0
  172. /package/dist/{src-MHCO4HYY.mjs.map → src-COIB6Z4P.mjs.map} +0 -0
  173. /package/dist/{stream-import-BHXACUCA.mjs.map → stream-import-FSXCFG4M.mjs.map} +0 -0
  174. /package/dist/{worker-runtime-JOUCP2L4.mjs.map → worker-runtime-DPS2LURI.mjs.map} +0 -0
@@ -0,0 +1,64 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GroupRelationshipGalaxyView-CLnO3phW.js","assets/index-D5m0P4ss.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-CMPHZH6B.css","assets/LoadingState.vue_vue_type_script_setup_true_lang-Cnshyn0f.js","assets/RelationshipGalaxyThreeCanvas-B6GB4PWS.js","assets/relationship-galaxy-connections-Cg4G5yYE.js","assets/relationship-galaxy-viewport-Cwfa51ER.js","assets/RelationshipGalaxyThreeCanvas-TYGOUDiv.css","assets/MessageExportModal-BozaR9UZ.js","assets/useToast-B36MzFFy.js","assets/Tabs-Dqwkh3Ea.js","assets/Tabs-OrJkANIA.js","assets/RovingFocusItem-B2y6BG1a.js"])))=>i.map(i=>d[i]);
2
+ import{r as S,B as De,C as ze,a as B,o,i as I,n as W,l as a,F as z,q as G,v as f,e as ne,W as st,c as k,an as he,g as y,j as ot,f as e,b as C,D as x,a0 as Z,s as A,a4 as $e,a2 as be,a3 as Q,_ as xe,a1 as Ne,w as E,ac as X,b8 as Pe,b9 as Ee,cp as lt,ag as Oe,aR as qe,aS as Fe,cq as nt,Y as it,p as We,b1 as rt,H as Me,aI as ut,au as Ke,cr as dt,ad as je,af as ct,a5 as mt,aq as vt,av as Be,at as pt,ao as gt}from"./index-D5m0P4ss.js";import{b as O,a as ie,c as ht,d as Ue,e as ft,u as yt,f as Ge,I as bt,g as xt,h as kt,i as wt,j as _t,k as $t,l as Tt,m as It,n as Ct,C as St,o as Rt,L as Vt,D as Mt,M as Lt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang-CnRLt_1j.js";import{_ as Ye}from"./SectionTabs.vue_vue_type_script_setup_true_lang-ueEF4zHE.js";import"./vendor-echarts-wordcloud-BsaEJTPY.js";import{a as te,g as Dt,_ as Nt}from"./base-CawUl6ET.js";import{_ as oe,u as At,L as qt}from"./LoadingState.vue_vue_type_script_setup_true_lang-Cnshyn0f.js";import{a as Ft}from"./index-BRV_D8dv.js";import{a as Le,b as Bt,c as Ut}from"./dateFormat-DXuDxIye.js";import{_ as Ht}from"./Switch-BVw4e_19.js";import{a as Qe}from"./Tabs-OrJkANIA.js";import{u as zt}from"./prompt-DcAcgQiB.js";import{_ as Pt}from"./Select-Cm4I8u9n.js";import{T as re}from"./Tabs-Dqwkh3Ea.js";import{_ as Et}from"./ThemeCard.vue_vue_type_script_setup_true_lang-DPIvbq75.js";import{u as Ot,p as Wt,j as Kt,t as jt,v as Gt,i as Yt,k as Qt}from"./vendor-echarts-DfAMQxdr.js";import{_ as Jt}from"./useTable-DPEMaGby.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Checkbox-CwajNPGF.js";import"./useFormControl-B-aXrJZN.js";import"./VisuallyHiddenInput-BOdkR_GC.js";import"./RovingFocusItem-B2y6BG1a.js";import"./Label-Bt2U4lGy.js";import"./useToast-B36MzFFy.js";import"./service-YZnJyEMq.js";import"./aiChat-CzFSFuOJ.js";import"./chatlabSiteLocale-CrCNb8QP.js";import"./semantic-index-config-builder-CK6v64Y1.js";import"./member-select-utils-BXZ3oHct.js";import"./TimeSelect.vue_vue_type_script_setup_true_lang-dEdo6CqM.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-C4CsoIlq.js";import"./PageHeader-CEe0xTl3.js";import"./PageTabs.vue_vue_type_script_setup_true_lang-D2DZrrnv.js";import"./Alert--bTQXRcZ.js";import"./vendor-zrender-PFmZe1EY.js";import"./clamp-jFYhBC76.js";function Xt(i,t={}){const{threshold:s=300,containerSelector:l=".overflow-y-auto",scrollLockDuration:u=800}=t,d=S(i[0]?.id||"");let c=!1;const p=S(null);let m=null;function b(){if(c)return;const r=[];i.forEach(v=>{const w=document.getElementById(v.id);if(w){const g=w.getBoundingClientRect();r.push({id:v.id,top:Math.round(g.top)})}});let n=0;for(let v=0;v<r.length;v++){if(r[v].top>s){n=Math.max(0,v-1);break}n=v}d.value=i[n]?.id||""}function h(r){const n=document.getElementById(r);n&&(d.value=r,c=!0,n.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{c=!1,b()},u))}return De(()=>{m=p.value?.closest(l)||null,m&&(m.addEventListener("scroll",b,{passive:!0}),b())}),ze(()=>{m&&m.removeEventListener("scroll",b)}),{contentRef:p,activeAnchor:d,scrollToAnchor:h,updateActiveAnchor:b}}function fe(i){return i===0?"text-amber-500 dark:text-amber-400":i===1?"text-gray-500 dark:text-gray-300":i===2?"text-orange-600 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}function ye(i){return String(i+1).padStart(2,"0")}function Zt(i){return i===0?"from-amber-400 to-orange-500":i===1?"from-gray-300 to-gray-400":i===2?"from-orange-400 to-amber-600":"from-primary-300 to-primary-500"}const ea={class:"sticky top-24 space-y-6"},ta={class:"border-l border-gray-200 dark:border-gray-800"},aa=["onClick"],sa=B({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(i,{emit:t}){const s=t;function l(u){s("click",u)}return(u,d)=>(o(),I("div",{class:W([i.width,"shrink-0",i.hideOnMobile?"hidden lg:block":""])},[a("div",ea,[a("nav",null,[a("div",ta,[(o(!0),I(z,null,G(i.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",[i.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:p=>l(c.id)},f(c.label),11,aa))),128))])]),ne(u.$slots,"default")])],2))}}),ue=B({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(i){const t=st(i,"modelValue"),s=[{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(l,u)=>{const d=Pt;return o(),k(d,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=c=>t.value=c),items:s,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),ce=B({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(i){const t=i,s=y(()=>typeof window>"u"?500:Math.round(window.innerHeight*t.maxHeightVh/100)),l=y(()=>t.contentHeight>s.value),u=y(()=>({maxHeight:`${t.maxHeightVh}vh`,overflowY:l.value?"auto":"hidden"}));return(d,c)=>(o(),I("div",{class:W(i.paddingClass),style:he(u.value)},[ne(d.$slots,"default")],6))}}),Je=Symbol("ranking-width-mode"),Xe={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 me(){const i=ot(Je,null);return y(()=>Xe[i?.value??"standard"])}function ve(i,t){return i.length<=t?i:`${i.slice(0,t)}…`}const oa={class:"px-3 py-2"},Te=B({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.members.slice(0,t.topN)),u=y(()=>{if(t.height!=="auto")return t.height;const p=l.value.length*36;return Math.max(p+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 p=[...l.value].reverse(),m=p.map(n=>ve(n.name,s.value.labelMaxLength)),b=p.map(n=>n.value),h=Math.max(...b,1),r=p.map(n=>({value:n.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:n=>{const v=n[0];if(!v)return"";const w=l.value.length-1-v.dataIndex,g=l.value[w];return`
3
+ <div style="padding: 4px 8px;">
4
+ <div style="font-weight: bold; margin-bottom: 4px;">${g.name}</div>
5
+ <div>${g.value} ${t.unit} (${g.percentage}%)</div>
6
+ </div>
7
+ `}},grid:{left:s.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:h*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:(n,v)=>{const g=l.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=l.value.length-1-n.dataIndex;return`${l.value[v].value} ${t.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:C(()=>[x(te,{option:c.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:C(()=>[a("div",oa,[x(te,{option:c.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),la={key:0,class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-sm font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},na={class:"min-w-0 flex-1"},ia={class:"flex items-baseline justify-between gap-3"},ra=["title"],ua={class:"flex shrink-0 items-baseline gap-1.5 whitespace-nowrap"},da={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},ca={class:"text-xs text-gray-500 dark:text-gray-400"},ma={class:"mt-2 flex items-center gap-2.5"},va={class:"h-1.5 flex-1 overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},pa={class:"w-10 shrink-0 text-right font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},He=B({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(i){const{t}=Z(),s=i,l=y(()=>s.unit||t("views.charts.rankList.unit")),u=y(()=>s.rankLimit>0?s.members.slice(0,s.rankLimit):s.members);function d(c){if(u.value.length===0)return 0;const p=u.value[0].value;return p===0?0:Math.round(u.value[c].value/p*100)}return(c,p)=>(o(),I("div",null,[(o(!0),I(z,null,G(u.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"},[a("span",{class:W(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",e(fe)(b)])},f(e(ye)(b)),3),i.showAvatar?(o(),I("div",la,f(m.name.slice(0,1)),1)):A("",!0),a("div",na,[a("div",ia,[a("p",{class:"truncate text-sm font-medium text-gray-900 dark:text-white",title:m.name},f(m.name),9,ra),a("div",ua,[a("span",da,f(m.value),1),a("span",ca,f(l.value),1)])]),a("div",ma,[a("div",va,[a("div",{class:W(["h-full rounded-full bg-linear-to-r transition-all",e(Zt)(b)]),style:he({width:`${d(b)}%`})},null,6)]),a("span",pa,f(m.percentage)+"% ",1)])])]))),128))]))}}),ga={class:"flex items-center gap-2"},ha={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"},fa={class:"no-capture"},ya={key:0,class:"no-capture px-3 pb-3 pt-1"},ba={class:"flex items-center gap-1.5"},xa={class:"flex w-full items-center justify-between border-b border-gray-100 px-6 py-5 dark:border-white/5"},ka={class:"min-w-0"},wa={class:"truncate text-base font-semibold text-gray-900 dark:text-white"},_a={class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},$a={class:"max-h-[70vh] overflow-y-auto"},Ze=B({__name:"ExpandableListCard",props:{title:{},description:{},showViewAll:{type:Boolean},viewAllLabel:{},countLabel:{}},setup(i){const t=S(!1),s=S(null);return(l,u)=>{const d=xe,c=be,p=$e;return o(),k(e(O),{title:i.title,description:i.description,"show-divider":!1},{headerRight:C(()=>[a("div",ga,[a("span",ha,f(i.countLabel),1),a("div",fa,[ne(l.$slots,"headerRight")])])]),default:C(()=>[a("div",null,[ne(l.$slots,"default")]),i.showViewAll?(o(),I("div",ya,[x(p,{open:t.value,"onUpdate:open":u[0]||(u[0]=m=>t.value=m),ui:{content:"md:w-full max-w-4xl"}},{content:C(()=>[a("div",{ref_key:"modalBodyRef",ref:s,class:"section-content flex flex-col overflow-hidden"},[a("div",xa,[a("div",ka,[a("h3",wa,f(i.title),1),a("p",_a,f(i.countLabel),1)]),x(Ft,{size:"xs",type:"element","target-element":s.value},null,8,["target-element"])]),a("div",$a,[ne(l.$slots,"full")])],512)]),default:C(()=>[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:C(()=>[a("span",ba,[Q(f(i.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"])}}}),Ta=B({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(i){const{t}=Z(),s=i,l=y(()=>s.members.slice(0,s.topN)),u=y(()=>s.members.length>s.topN);return(d,c)=>(o(),k(Ze,{title:i.title,description:i.description,"show-view-all":u.value,"view-all-label":e(t)("views.charts.rankListPro.fullRanking"),"count-label":e(t)("views.charts.rankListPro.memberCount",{count:i.members.length})},{headerRight:C(()=>[ne(d.$slots,"headerRight")]),full:C(()=>[x(He,{members:i.members,unit:i.unit},null,8,["members","unit"])]),default:C(()=>[x(He,{members:l.value,unit:i.unit},null,8,["members","unit"])]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),Ia={key:0},Ca={class:"px-5 py-8 text-center text-sm text-gray-400"},_e=B({__name:"ListPro",props:{items:{},title:{},description:{},topN:{default:10},countLabel:{}},setup(i){const{t}=Z(),s=i,l=y(()=>s.items.slice(0,s.topN)),u=y(()=>s.items.length>s.topN),d=y(()=>s.countLabel?s.countLabel:t("views.charts.listPro.countTemplate",{count:s.items.length}));return(c,p)=>(o(),k(Ze,{title:i.title,description:i.description,"show-view-all":u.value,"view-all-label":e(t)("views.charts.listPro.fullRanking"),"count-label":d.value},{headerRight:C(()=>[ne(c.$slots,"headerRight")]),full:C(()=>[a("div",null,[(o(!0),I(z,null,G(i.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"},[ne(c.$slots,"item",{item:m,index:b})]))),128))])]),default:C(()=>[ne(c.$slots,"config"),a("div",null,[(o(!0),I(z,null,G(l.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"},[ne(c.$slots,"item",{item:m,index:b})]))),128))]),i.items.length===0?(o(),I("div",Ia,[ne(c.$slots,"empty",{},()=>[a("div",Ca,f(e(t)("views.charts.listPro.empty")),1)])])):A("",!0)]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}});function Sa(i,t){return{keywords:[i],...t?.memberId!=null?{memberId:t.memberId}:{}}}const Ra={class:"main-content mx-auto max-w-3xl p-6"},Va=["aria-label","onClick"],Ma=["title"],La={class:"flex shrink-0 items-center gap-3 pl-2"},Da={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Na={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)]"},Aa=["title"],qa={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"},Fa=["title","aria-label","onClick"],Ba={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"},Ua={class:"shrink-0 font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},Ha=B({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=Z(),s=Ne(),l=i,u=S(null),d=S(!1),c=y(()=>u.value?.members??[]),p=y(()=>l.timeFilter?.memberId!=null),m=y(()=>p.value?c.value[0]??null:null),b=y(()=>m.value?t("quotes.catchphrase.memberTitle",{name:m.value.name}):t("quotes.catchphrase.title")),h=y(()=>p.value?t("quotes.catchphrase.memberDescription"):t("quotes.catchphrase.description"));async function r(){if(l.sessionId){d.value=!0;try{u.value=await X().getCatchphraseAnalysis(l.sessionId,l.timeFilter)}catch(w){console.error("Failed to load catchphrase analysis:",w)}finally{d.value=!1}}}function n(w){s.openChatRecordDrawer(Sa(w,l.timeFilter))}function v(w){return w.catchphrases.slice(0,5)}return E(()=>[l.sessionId,l.timeFilter],()=>{r()},{immediate:!0,deep:!0}),(w,g)=>{const _=xe;return o(),I("div",Ra,[d.value?(o(),k(e(oe),{key:0,text:e(t)("quotes.catchphrase.loading")},null,8,["text"])):m.value?(o(),k(e(_e),{key:1,items:m.value.catchphrases,title:b.value,description:h.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.phraseCount",{count:m.value.catchphrases.length})},{item:C(({item:R,index:$})=>[a("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")}: ${R.content}`,onClick:V=>n(R.content)},[a("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)($)])},f(e(ye)($)),3),a("p",{class:"line-clamp-2 min-w-0 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:R.content},f(R.content),9,Ma),a("div",La,[a("span",Da,f(e(t)("quotes.catchphrase.times",{count:R.count})),1),x(_,{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,Va)]),_:1},8,["items","title","description","count-label"])):c.value.length>0?(o(),k(e(_e),{key:2,items:c.value,title:b.value,description:h.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.memberCount",{count:c.value.length})},{item:C(({item:R,index:$})=>[a("div",Na,[a("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(fe)($)])},f(e(ye)($)),3),a("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:R.name},f(R.name),9,Aa),a("div",qa,[(o(!0),I(z,null,G(v(R),V=>(o(),I("button",{key:V.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:V.content,"aria-label":`${e(t)("quotes.catchphrase.viewChat")}: ${V.content}`,onClick:H=>n(V.content)},[a("span",Ba," “"+f(V.content)+"” ",1),a("span",Ua,f(e(t)("quotes.catchphrase.times",{count:V.count})),1)],8,Fa))),128))])])]),_:1},8,["items","title","description","count-label"])):(o(),k(e(O),{key:3,title:b.value,description:h.value,"show-divider":!1},{default:C(()=>[x(e(ie),{text:e(t)("quotes.catchphrase.empty.title")},null,8,["text"])]),_:1},8,["title","description"]))])}}}),za={class:"main-content mx-auto max-w-3xl p-6"},Pa=["aria-label","onClick"],Ea={class:"min-w-0"},Oa=["title"],Wa={class:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},Ka={class:"truncate"},ja={class:"shrink-0"},Ga={class:"flex shrink-0 items-center gap-3 pl-2"},Ya={class:"text-right"},Qa={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Ja={class:"mt-0.5 text-[11px] text-gray-400 dark:text-gray-500"},Xa=B({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=Z(),s=i,l=Ne(),u=S(null),d=S(!1);async function c(){if(s.sessionId){d.value=!0;try{u.value=await X().getRepeatAnalysis(s.sessionId,s.timeFilter)}catch(m){console.error("Failed to load repeat analysis:",m)}finally{d.value=!1}}}function p(m){l.openChatRecordDrawer({scrollToMessageId:m.firstMessageId,highlightKeywords:[m.content]})}return E(()=>[s.sessionId,s.timeFilter],()=>{c()},{immediate:!0,deep:!0}),(m,b)=>{const h=xe;return o(),I("div",za,[d.value?(o(),k(e(oe),{key:0,text:e(t)("quotes.hotRepeat.loading")},null,8,["text"])):u.value&&u.value.hotContents.length>0?(o(),k(e(_e),{key:1,items:u.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:u.value.hotContents.length})},{item:C(({item:r,index:n})=>[a("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")}: ${r.content}`,onClick:v=>p(r)},[a("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)(n)])},f(e(ye)(n)),3),a("div",Ea,[a("p",{class:"line-clamp-2 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:r.content},f(r.content),9,Oa),a("div",Wa,[a("span",Ka,f(r.originatorName),1),b[0]||(b[0]=a("span",{"aria-hidden":"true"},"·",-1)),a("span",ja,f(e(Le)(r.lastTs)),1)])]),a("div",Ga,[a("div",Ya,[a("p",Qa,f(e(t)("quotes.hotRepeat.people",{count:r.maxChainLength})),1),a("p",Ja,f(e(t)("quotes.hotRepeat.times",{count:r.count})),1)]),x(h,{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,Pa)]),_:1},8,["items","title","description","count-label"])):(o(),k(e(O),{key:2,title:e(t)("quotes.hotRepeat.title")},{default:C(()=>[x(e(ie),{text:e(t)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),Za={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},es={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},ts={class:"p-3 sm:p-5"},as={class:"p-3 sm:p-5"},ss=B({__name:"GroupChatOverview",props:{session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(i){const{t}=Z(),s=i,{dailyChartData:l}=yt(()=>s.dailyActivity),u=y(()=>({labels:s.messageTypes.map(c=>Dt(c.type,t)),values:s.messageTypes.map(c=>c.count)})),d=y(()=>{const c=[...s.memberActivity].sort((r,n)=>n.messageCount-r.messageCount),p=c.slice(0,10),m=c.slice(10).reduce((r,n)=>r+n.messageCount,0),b=p.map(r=>r.name),h=p.map(r=>r.messageCount);return m>0&&(b.push(t("analysis.overview.others")),h.push(m)),{labels:b,values:h}});return(c,p)=>(o(),I("div",Za,[x(ht,{session:i.session,"daily-activity":i.dailyActivity,"message-types":i.messageTypes,"hourly-activity":i.hourlyActivity,"time-range":i.timeRange,"filtered-message-count":i.filteredMessageCount,"filtered-member-count":i.filteredMemberCount,"time-filter":i.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),a("div",es,[x(e(O),{title:e(t)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:C(()=>[a("div",ts,[x(e(Ue),{data:u.value,height:280},null,8,["data"])])]),_:1},8,["title"]),x(e(O),{title:e(t)("analysis.overview.memberDistribution"),"show-divider":!1},{default:C(()=>[a("div",as,[x(e(Ue),{data:d.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),x(ft,{"daily-activity":i.dailyActivity,"daily-chart-data":e(l)},null,8,["daily-activity","daily-chart-data"])]))}}),os={class:"flex h-full flex-col"},ls={class:"min-h-0 flex-1 overflow-y-auto"},ns=B({__name:"GroupChatInsights",props:{sessionId:{},session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(i){const t=Pe(()=>Ee(()=>import("./GroupRelationshipGalaxyView-CLnO3phW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),{t:s}=Z(),l=i,u=y(()=>[{id:"overview",label:s("analysis.tabs.overview"),icon:"i-heroicons-squares-2x2"},{id:"type-analysis",label:s("analysis.subTabs.insights.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:s("analysis.subTabs.insights.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:s("analysis.subTabs.insights.topic"),icon:"i-heroicons-cloud"},{id:"relationship",label:s("analysis.subTabs.insights.relationship"),icon:"i-heroicons-heart"}]),d=S("overview"),c=S(null),p=y(()=>({...l.timeFilter,memberId:c.value}));return(m,b)=>(o(),I("div",os,[x(e(Ye),{modelValue:d.value,"onUpdate:modelValue":b[1]||(b[1]=h=>d.value=h),items:u.value,"persist-key":"groupInsightsTab"},{right:C(()=>[d.value==="type-analysis"||d.value==="time-analysis"?(o(),k(Ge,{key:0,modelValue:c.value,"onUpdate:modelValue":b[0]||(b[0]=h=>c.value=h),"session-id":l.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),a("div",ls,[x(e(bt),{"active-key":d.value},{default:C(({viewKey:h})=>[h==="overview"?(o(),k(ss,{key:0,session:l.session,"member-activity":l.memberActivity,"message-types":l.messageTypes,"hourly-activity":l.hourlyActivity,"daily-activity":l.dailyActivity,"time-range":l.timeRange,"filtered-message-count":l.filteredMessageCount,"filtered-member-count":l.filteredMemberCount,"time-filter":l.timeFilter},null,8,["session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):h==="type-analysis"?(o(),k(xt,{key:1,"session-id":l.sessionId,"session-name":l.session.name,"time-filter":p.value},null,8,["session-id","session-name","time-filter"])):h==="time-analysis"?(o(),k(kt,{key:2,"session-id":l.sessionId,"session-name":l.session.name,"time-filter":p.value},null,8,["session-id","session-name","time-filter"])):h==="topic"?(o(),k(e(wt),{key:3,"session-id":l.sessionId,"time-filter":l.timeFilter},null,8,["session-id","time-filter"])):h==="relationship"?(o(),k(e(t),{key:4,"session-id":l.sessionId,"time-filter":l.timeFilter},null,8,["session-id","time-filter"])):A("",!0)]),_:1},8,["active-key"])])]))}}),is={class:"border-b border-gray-100 p-4 dark:border-gray-800"},rs={class:"mb-3 flex flex-wrap items-center gap-2"},us={class:"text-xs text-gray-500 dark:text-gray-400"},ds=["onClick"],cs={class:"p-4"},ms={class:"mb-3 font-semibold text-gray-900 dark:text-white"},vs={class:"space-y-3"},ps={class:"mb-1 block text-xs text-gray-500"},gs={class:"mb-1 block text-xs text-gray-500"},hs={class:"flex flex-wrap items-center gap-2"},fs={class:"mt-4 flex justify-end gap-2"},ys={class:"flex flex-wrap items-center gap-2"},bs={class:"mt-1.5 text-xs text-gray-400"},xs={key:0,class:"border-b border-gray-100 px-5 py-4 dark:border-gray-800"},ks={class:"mb-3 flex items-center justify-between"},ws={class:"text-base font-medium text-gray-700 dark:text-gray-300"},_s={class:"flex cursor-pointer items-center gap-1.5 text-xs text-gray-500"},$s={class:"flex flex-wrap gap-2"},Ts={class:"text-xs text-gray-500"},Is={class:"flex items-center gap-3"},Cs={class:"w-32 shrink-0"},Ss={class:"truncate font-medium text-gray-900 dark:text-white"},Rs={class:"flex flex-1 items-center"},Vs={class:"flex h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},Ms=["title"],Ls={class:"flex shrink-0 items-baseline gap-2"},Ds={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},Ns={class:"text-xs text-gray-500"},As={key:0,class:"flex h-64 flex-col items-center justify-center text-gray-400"},qs={class:"text-sm"},Fs={key:1,class:"h-64"},Bs=B({__name:"KeywordRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=Z(),s=i,l=zt(),u=S(!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 p(T){if(!u.value)return d;const q=n.value.indexOf(T);if(q>=0)return c[q%c.length];let se=0;for(let le=0;le<T.length;le++)se=se*31+T.charCodeAt(le)>>>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")}]),h=y(()=>{const T=l.customKeywordTemplates.map(se=>({...se,isCustom:!0}));return[...b.value.filter(se=>!l.deletedPresetTemplateIds.includes(se.id)),...T]}),r=S("laugh"),n=S([]);E(b,T=>{T.length>0&&n.value.length===0&&(n.value=[...T[0].keywords])},{immediate:!0});const v=y(()=>{const T=h.value.find(q=>q.id===r.value);return T?T.name:""}),w=S(null),g=S(!1);let _=0;const R=S(!1),$=S(null),V=S(""),H=S([]),ae=S(""),D=y(()=>$.value!==null),F=y(()=>D.value?t("quotes.keywords.modal.editTitle"):t("quotes.keywords.modal.createTitle"));function P(){$.value=null,V.value="",H.value=[],ae.value="",R.value=!0}function ee(T){$.value=T.id,V.value=T.name,H.value=[...T.keywords],R.value=!0}function Y(){const T=ae.value.trim();T&&!H.value.includes(T)&&(H.value=[...H.value,T]),ae.value=""}function K(T){H.value=H.value.filter(q=>q!==T)}function N(T){r.value=T.id,n.value=[...T.keywords],w.value=null,J()}function U(){_++,n.value=[],w.value=null,g.value=!1,r.value=""}const j=S("");function pe(){const T=j.value.trim();T&&!n.value.includes(T)&&(n.value=[...n.value,T],J()),j.value=""}function ke(T){n.value=n.value.filter(q=>q!==T),J()}function we(T){return m.includes(T)}function Ie(){if(V.value.trim()){if(D.value&&$.value)if(we($.value)){const T={id:`custom_${Date.now()}`,name:V.value.trim(),keywords:[...H.value]};l.addCustomKeywordTemplate(T),r.value=T.id,n.value=[...T.keywords],J()}else l.updateCustomKeywordTemplate($.value,{name:V.value.trim(),keywords:[...H.value]}),r.value===$.value&&(n.value=[...H.value],J());else{const T={id:`custom_${Date.now()}`,name:V.value.trim(),keywords:[...H.value]};l.addCustomKeywordTemplate(T),r.value=T.id,n.value=[...T.keywords],J()}R.value=!1}}function Ce(T){we(T)?l.addDeletedPresetTemplateId(T):l.removeCustomKeywordTemplate(T),r.value===T&&(h.value.length>0?N(h.value[0]):U())}async function J(){const T=++_;if(!s.sessionId||n.value.length===0){w.value=null,g.value=!1;return}g.value=!0;try{const q=await X().getLaughAnalysis(s.sessionId,s.timeFilter,[...n.value]);if(T!==_)return;w.value=q}catch(q){if(T!==_)return;console.error("Failed to load keyword ranking:",q),w.value=null}finally{T===_&&(g.value=!1)}}const M=y(()=>w.value?w.value.rankByCount.map(T=>({id:T.memberId.toString(),name:T.name,value:T.laughCount,percentage:T.percentage,keywordDistribution:T.keywordDistribution||[]})):[]);function Se(T){if(M.value.length===0)return 0;const q=M.value[0].value;return q===0?0:Math.round(M.value[T].value/q*100)}function Re(T,q){const se=Se(q);return!T.keywordDistribution||T.keywordDistribution.length===0?[{keyword:"default",width:se,bg:"bg-amber-400"}]:T.keywordDistribution.map(le=>({keyword:le.keyword,width:le.percentage/100*se,bg:p(le.keyword).bg}))}return E(()=>[s.sessionId,s.timeFilter],()=>{J()},{immediate:!0,deep:!0}),(T,q)=>{const se=lt,le=Oe,Ve=Qe,Ae=be,et=$e,tt=Ht,at=xe;return o(),k(e(_e),{items:M.value,title:e(t)("quotes.keywords.title"),description:e(t)("quotes.keywords.description"),"top-n":10,"count-label":e(t)("quotes.keywords.countTemplate",{count:M.value.length})},{config:C(()=>[a("div",is,[a("div",rs,[a("span",us,f(e(t)("quotes.keywords.templateLabel")),1),(o(!0),I(z,null,G(h.value,L=>(o(),k(se,{key:L.id,items:[[{label:e(t)("quotes.keywords.contextMenu.edit"),icon:"i-lucide-pencil",disabled:!L.isCustom,onSelect:()=>ee(L)},{label:e(t)("quotes.keywords.contextMenu.delete"),icon:"i-lucide-trash",color:"error",onSelect:()=>Ce(L.id)}]]},{default:C(()=>[a("button",{class:W(["rounded-md border px-2.5 py-1 text-sm transition-all",r.value===L.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:de=>N(L)},f(L.name),11,ds)]),_:2},1032,["items"]))),128)),x(et,{open:R.value,"onUpdate:open":q[3]||(q[3]=L=>R.value=L)},{content:C(()=>[a("div",cs,[a("h3",ms,f(F.value),1),a("div",vs,[a("div",null,[a("label",ps,f(e(t)("quotes.keywords.modal.templateName")),1),x(le,{modelValue:V.value,"onUpdate:modelValue":q[0]||(q[0]=L=>V.value=L),placeholder:e(t)("quotes.keywords.modal.templateNamePlaceholder")},null,8,["modelValue","placeholder"])]),a("div",null,[a("label",gs,f(e(t)("quotes.keywords.modal.keywords")),1),a("div",hs,[(o(!0),I(z,null,G(H.value,L=>(o(),k(Ve,{key:L,variant:"soft",class:"cursor-pointer",onClick:de=>K(L)},{default:C(()=>[Q(f(L)+" ",1),q[6]||(q[6]=a("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(le,{modelValue:ae.value,"onUpdate:modelValue":q[1]||(q[1]=L=>ae.value=L),placeholder:e(t)("quotes.keywords.modal.keywordPlaceholder"),class:"w-full",onKeydown:qe(Fe(Y,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])])])]),a("div",fs,[x(Ae,{variant:"soft",onClick:q[2]||(q[2]=L=>R.value=!1)},{default:C(()=>[Q(f(e(t)("common.cancel")),1)]),_:1}),x(Ae,{color:"primary",disabled:!V.value.trim()||H.value.length===0,onClick:Ie},{default:C(()=>[Q(f(D.value?e(t)("quotes.keywords.modal.update"):e(t)("common.save")),1)]),_:1},8,["disabled"])])])]),default:C(()=>[a("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},f(e(t)("quotes.keywords.newTemplate")),1)]),_:1},8,["open"])]),a("div",ys,[(o(!0),I(z,null,G(n.value,L=>(o(),k(Ve,{key:L,class:"cursor-pointer",onClick:de=>ke(L)},{default:C(()=>[Q(f(L)+" ",1),q[7]||(q[7]=a("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(le,{modelValue:j.value,"onUpdate:modelValue":q[4]||(q[4]=L=>j.value=L),placeholder:e(t)("quotes.keywords.searchPlaceholder"),class:"w-32",onKeydown:qe(Fe(pe,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),n.value.length>0?(o(),I("button",{key:0,class:"text-sm text-pink-500 hover:text-red-500",onClick:U},f(e(t)("quotes.keywords.clear")),1)):A("",!0)]),a("div",bs,f(e(t)("quotes.keywords.templateHint")),1)]),w.value&&w.value.typeDistribution.length>0?(o(),I("div",xs,[a("div",ks,[a("span",ws,f(v.value?v.value:n.value.length===1?n.value[0]:e(t)("quotes.keywords.keyword"))+f(e(t)("quotes.keywords.ranking")),1),a("label",_s,[a("span",null,f(e(t)("quotes.keywords.multiColorMode")),1),x(tt,{modelValue:u.value,"onUpdate:modelValue":q[5]||(q[5]=L=>u.value=L),size:"md"},null,8,["modelValue"])])]),a("div",$s,[(o(!0),I(z,null,G(w.value.typeDistribution,L=>(o(),I("div",{key:L.type,class:W(["flex items-center gap-2 rounded-lg px-2 py-2 text-xs",p(L.type).wrapBg])},[a("span",{class:W(["h-2.5 w-2.5 shrink-0 rounded-full",p(L.type).bg])},null,2),a("span",{class:W(["font-medium",p(L.type).text])},f(L.type),3),a("span",Ts,f(e(t)("quotes.keywords.times",{count:L.count})),1),x(Ve,{color:p(L.type).badge,variant:"soft",size:"xs"},{default:C(()=>[Q(f(L.percentage)+"%",1)]),_:2},1032,["color"])],2))),128))])])):A("",!0),g.value&&M.value.length===0?(o(),k(e(oe),{key:1,text:e(t)("quotes.keywords.loading")},null,8,["text"])):A("",!0)]),item:C(({item:L,index:de})=>[a("div",Is,[a("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)(de)])},f(e(ye)(de)),3),a("div",Cs,[a("p",Ss,f(L.name),1)]),a("div",Rs,[a("div",Vs,[(o(!0),I(z,null,G(Re(L,de),ge=>(o(),I("div",{key:ge.keyword,class:W(["h-full transition-all first:rounded-l-full last:rounded-r-full",ge.bg]),style:he({width:`${ge.width}%`}),title:`${ge.keyword}: ${ge.width.toFixed(1)}%`},null,14,Ms))),128))])]),a("div",Ls,[a("span",Ds,f(L.value),1),a("span",Ns,f(e(t)("quotes.keywords.timesWithPercent",{count:L.value,percent:L.percentage})),1)])])]),empty:C(()=>[g.value?(o(),I("div",Fs)):(o(),I("div",As,[x(at,{name:"i-heroicons-magnifying-glass",class:"mb-2 h-8 w-8 opacity-50"}),a("p",qs,f(e(t)("quotes.keywords.empty")),1)]))]),_:1},8,["items","title","description","count-label"])}}}),Us={class:"flex items-center gap-3"},Hs={key:1,class:"py-8 text-center text-sm text-gray-400"},zs=B({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(null),u=S(!1),d=S("activity"),c=S(t.globalTopN??10);E(()=>t.globalTopN,g=>{g!==void 0&&(c.value=g)});async function p(){if(t.sessionId){u.value=!0;try{const g=X(),[_,R]=await Promise.all([g.getDragonKingAnalysis(t.sessionId,t.timeFilter),g.getCheckInAnalysis(t.sessionId,t.timeFilter)]);s.value=_,l.value=R}catch(g){console.error("加载活跃数据失败:",g)}finally{u.value=!1}}}const m=y(()=>t.memberActivity.map(g=>({id:g.memberId.toString(),name:g.name,value:g.messageCount,percentage:g.percentage}))),b=y(()=>s.value?s.value.rank.map(g=>({id:g.memberId.toString(),name:g.name,value:g.count,percentage:g.percentage})):[]),h=y(()=>l.value?l.value.loyaltyRank.map(g=>({id:g.memberId.toString(),name:g.name,value:g.totalDays,percentage:g.percentage})):[]),r=y(()=>{switch(d.value){case"activity":return m.value;case"dragon":return b.value;case"loyalty":return h.value;default:return m.value}}),n=y(()=>{switch(d.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),v=y(()=>{switch(d.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),w=y(()=>{switch(d.value){case"activity":return"按消息发送数量排名";case"dragon":return`每天发言最多的人+1(共 ${s.value?.totalDays??0} 天)`;case"loyalty":return`累计发言天数排名(共 ${l.value?.totalDays??0} 天)`;default:return""}});return E(()=>[t.sessionId,t.timeFilter],()=>p(),{immediate:!0,deep:!0}),(g,_)=>(o(),k(e(O),{title:v.value,description:w.value},{headerRight:C(()=>[a("div",Us,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":_[0]||(_[0]=R=>c.value=R)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=R=>d.value=R),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:C(()=>[u.value&&(d.value==="dragon"||d.value==="loyalty")?(o(),k(e(oe),{key:0,text:"正在加载数据..."})):(o(),I(z,{key:1},[r.value.length>0?(o(),k(e(Te),{key:0,members:r.value,title:v.value,unit:n.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),I("div",Hs,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),Ps={key:0},Es={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},Os={class:"px-3 py-2"},Ws=B({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.mode==="current"?t.items.filter(h=>h.currentStreak>0).sort((h,r)=>r.currentStreak-h.currentStreak).slice(0,t.topN):t.items.slice(0,t.topN)),u=y(()=>{const h=l.value.length*36;return Math.max(h+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 p(h,r){return`${h} ~ ${r}`}function m(h){return t.mode==="current"?h.currentStreak:h.maxStreak}const b=y(()=>{const h=[...l.value].reverse(),r=h.map(g=>ve(g.name,s.value.labelMaxLength)),n=h.map(g=>m(g)),v=Math.max(...n,1),w=h.map(g=>({value:m(g),itemStyle:{color:t.mode==="current"||g.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:g=>{const _=g[0];if(!_)return"";const R=l.value.length-1-_.dataIndex,$=l.value[R];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 V=`
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;">${p($.maxStreakStart,$.maxStreakEnd)}</div>
18
+ `;return $.currentStreak>0&&(V+=`<div style="margin-top: 6px; color: #fb923c;">🔥 当前连续 ${$.currentStreak} 天</div>`),V+="</div>",V}},grid:{left:s.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:v*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:r,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(g,_)=>{const $=l.value.length-1-_+1;return`${$===1?"🥇":$===2?"🥈":$===3?"🥉":`${$}.`} ${g}`}}},series:[{type:"bar",data:w,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:g=>{const _=l.value.length-1-g.dataIndex,R=l.value[_],$=m(R),V=t.mode==="current"||R.currentStreak>0?" 🔥":"";return`${$} 天${V}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(249, 115, 22, 0.3)"}}}]}});return(h,r)=>i.bare?(o(),I("div",Ps,[x(e(ce),{"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:C(()=>[x(e(te),{option:b.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"]),i.mode==="max"?(o(),I("div",Es,[...r[0]||(r[0]=[nt('<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(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},it({default:C(()=>[a("div",Os,[x(e(te),{option:b.value,height:u.value},null,8,["option","height"])])]),_:2},[i.mode==="max"?{name:"footer",fn:C(()=>[r[1]||(r[1]=a("div",{class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},[a("div",{class:"flex items-center gap-1.5"},[a("div",{class:"h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"}),a("span",{class:"text-xs text-gray-500"},"当前连续中 🔥")]),a("div",{class:"flex items-center gap-1.5"},[a("div",{class:"h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"}),a("span",{class:"text-xs text-gray-500"},"已中断")])],-1))]),key:"0"}:void 0]),1032,["title","description","max-height-vh"]))}}),Ks={class:"px-3 py-2"},js=B({__name:"EChartBattleRank",props:{battles:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=y(()=>t.battles.slice(0,t.topN)),l=y(()=>{const p=s.value.length*36;return Math.max(p+30,180)}),u={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]};function d(p){return`${p.participantCount} 人参战`}const c=y(()=>{const p=[...s.value].reverse(),m=p.map(n=>d(n)),b=p.map(n=>n.totalImages),h=Math.max(...b,1),r=p.map(n=>({value:n.totalImages,itemStyle:{color:u,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:n=>{const v=n[0];if(!v)return"";const w=s.value.length-1-v.dataIndex,g=s.value[w],_=g.participants.slice(0,5).map($=>`<span style="color: #d1d5db;">${$.name}</span> <b>${$.imageCount}</b>张`).join("、"),R=g.participants.length>5?`、+${g.participants.length-5}`:"";return`
19
+ <div style="padding: 6px 8px;">
20
+ <div style="font-weight: bold; margin-bottom: 8px; font-size: 13px;">
21
+ ⚔️ ${Le(g.startTime)}
22
+ </div>
23
+ <div style="margin-bottom: 6px;">
24
+ <span style="color: #9ca3af;">参战人数:</span> <b>${g.participantCount}</b> 人
25
+ </div>
26
+ <div style="margin-bottom: 8px;">
27
+ <span style="color: #9ca3af;">总图片数:</span> <b style="color: #f472b6;">${g.totalImages}</b> 张
28
+ </div>
29
+ <div style="border-top: 1px solid #374151; padding-top: 6px; font-size: 11px;">
30
+ ${_}${R}
31
+ </div>
32
+ </div>
33
+ `}},grid:{left:95,right:125,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:h*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:(n,v)=>{const g=s.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=s.value.length-1-n.dataIndex,w=s.value[v],g=Le(w.startTime);return`${w.totalImages} 张 (${g})`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":l.value,"max-height-vh":i.maxHeightVh},{default:C(()=>[x(e(te),{option:c.value,height:l.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:C(()=>[a("div",Ks,[x(e(te),{option:c.value,height:l.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Gs={class:"px-3 py-2"},Ys=B({__name:"EChartTimeRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.items.slice(0,t.topN)),u=y(()=>{const m=l.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 p=y(()=>{if(l.value.length===0)return{};const m=[...l.value].reverse(),b=m.map(n=>ve(n.name,s.value.labelMaxLength)),h=l.value[0].avgTimeDiff,r=m.map(n=>({value:Math.round(h/n.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:n=>{const v=n[0];if(!v)return"";const w=l.value.length-1-v.dataIndex,g=l.value[w];return`
34
+ <div style="padding: 4px 8px;">
35
+ <div style="font-weight: bold; margin-bottom: 6px;">${g.name}</div>
36
+ <div style="margin-bottom: 4px;">⚡️ 平均反应时间: <b>${c(g.avgTimeDiff)}</b></div>
37
+ <div style="font-size: 12px; color: #9ca3af;">参与复读 ${g.count} 次</div>
38
+ </div>
39
+ `}},grid:{left:s.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:(n,v)=>{const g=l.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=l.value.length-1-n.dataIndex,w=l.value[v];return`${c(w.avgTimeDiff)} · ${w.count}次`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(245, 158, 11, 0.3)"}}}]}});return(m,b)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:C(()=>[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:C(()=>[a("div",Gs,[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Qs={class:"flex items-center gap-3"},Js={class:"px-3 py-2"},Xs=B({__name:"EChartDivingRank",props:{items:{},showTopNSelect:{type:Boolean,default:!0},maxHeightVh:{default:60},globalTopN:{}},setup(i){const t=i,s=me(),l=S("desc"),u=S(t.globalTopN??10);E(()=>t.globalTopN,n=>{n!==void 0&&(u.value=n)});const d=y(()=>[...t.items].sort((v,w)=>l.value==="desc"?w.daysSinceLastMessage-v.daysSinceLastMessage:v.daysSinceLastMessage-w.daysSinceLastMessage).slice(0,u.value)),c=y(()=>l.value==="desc"?"🤿 潜水榜 - 潜水最久":"🤿 潜水榜 - 最近冒泡"),p=y(()=>l.value==="desc"?"距离上次发言时间最久的成员":"最近发言过的成员"),m=y(()=>{const n=d.value.length*36;return Math.max(n+30,180)}),b={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#06b6d4"},{offset:1,color:"#22d3ee"}]};function h(n){return n===0?"今天":n===1?"昨天":`${n} 天前`}const r=y(()=>{if(d.value.length===0)return{};const n=[...d.value].reverse(),v=n.map(_=>ve(_.name,s.value.labelMaxLength)),w=Math.max(...d.value.map(_=>_.daysSinceLastMessage),1),g=n.map(_=>({value:_.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:_=>{const R=_[0];if(!R)return"";const $=d.value.length-1-R.dataIndex,V=d.value[$];return`
40
+ <div style="padding: 4px 8px;">
41
+ <div style="font-weight: bold; margin-bottom: 6px;">${V.name}</div>
42
+ <div style="margin-bottom: 4px;">🤿 ${h(V.daysSinceLastMessage)}</div>
43
+ <div style="font-size: 12px; color: #9ca3af;">最后发言: ${Bt(V.lastMessageTs)}</div>
44
+ </div>
45
+ `}},grid:{left:s.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:w*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:v,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(_,R)=>{const V=d.value.length-1-R+1;return`${V===1?"🥇":V===2?"🥈":V===3?"🥉":`${V}.`} ${_}`}}},series:[{type:"bar",data:g,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:_=>{const R=d.value.length-1-_.dataIndex,$=d.value[R];return h($.daysSinceLastMessage)},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(0, 0, 0, 0.2)"}}}]}});return(n,v)=>(o(),k(e(O),{title:c.value,description:p.value,scrollable:"","max-height-vh":i.maxHeightVh},{headerRight:C(()=>[a("div",Qs,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=w=>u.value=w)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:l.value,"onUpdate:modelValue":v[1]||(v[1]=w=>l.value=w),items:[{label:"潜水最久",value:"desc"},{label:"最近冒泡",value:"asc"}],size:"sm"},null,8,["modelValue"])])]),default:C(()=>[a("div",Js,[x(e(te),{option:r.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Zs={class:"px-3 py-2"},eo=B({__name:"EChartConsecutiveRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>[...t.items].sort((m,b)=>b.maxConsecutiveDays-m.maxConsecutiveDays).slice(0,t.topN)),u=y(()=>{const m=l.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"}]},p=y(()=>{if(l.value.length===0)return{};const m=[...l.value].reverse(),b=m.map(r=>ve(r.name,s.value.labelMaxLength)),h=Math.max(...l.value.map(r=>r.maxConsecutiveDays),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:r=>{if(!r||r.length===0)return"";const n=r[0].dataIndex,v=l.value.length-1-n,w=l.value[v];let g=`
46
+ <div style="padding: 6px 8px;">
47
+ <div style="font-weight: bold; margin-bottom: 6px;">${w.name}</div>
48
+ <div>最长连续: <b style="color: #f472b6;">${w.maxConsecutiveDays}</b> 天</div>
49
+ `;return w.currentStreak>0&&(g+=`<div style="color: #f97316;">🔥 当前连续 ${w.currentStreak} 天</div>`),g+="</div>",g}},legend:{show:!1},grid:{left:s.value.gridLeft,right:75,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:h*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:(r,n)=>{const w=l.value.length-1-n+1;return`${w===1?"🥇":w===2?"🥈":w===3?"🥉":`${w}.`} ${r}`}}},series:[{name:"当前连续",type:"bar",data:m.map(r=>({value:r.currentStreak>0?r.maxConsecutiveDays:0,itemStyle:{color:d,borderRadius:[0,4,4,0]}})),barWidth:18,barGap:"-100%",label:{show:!0,position:"right",distance:8,formatter:r=>{const n=l.value.length-1-r.dataIndex,v=l.value[n];return v.currentStreak>0?`${v.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}},{name:"已中断",type:"bar",data:m.map(r=>({value:r.currentStreak===0?r.maxConsecutiveDays:0,itemStyle:{color:c,borderRadius:[0,4,4,0]}})),barWidth:18,label:{show:!0,position:"right",distance:8,formatter:r=>{const n=l.value.length-1-r.dataIndex,v=l.value[n];return v.currentStreak===0?`${v.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(m,b)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:C(()=>[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:C(()=>[a("div",Zs,[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),to={class:"px-3 py-2"},ao=B({__name:"EChartNightOwlRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.items.slice(0,t.topN)),u=y(()=>{const p=l.value.length*36;return Math.max(p+50,200)}),d={h23:"#8b5cf6",h0:"#3b82f6",h1:"#06b6d4",h2:"#f59e0b",h3to4:"#ef4444"},c=y(()=>{if(l.value.length===0)return{};const p=[...l.value].reverse(),m=p.map(h=>ve(h.name,s.value.labelMaxLength)),b=Math.max(...l.value.map(h=>h.totalNightMessages),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:h=>{if(!h||h.length===0)return"";const r=h[0].dataIndex,n=l.value.length-1-r,v=l.value[n],w=v.hourlyBreakdown;return`
50
+ <div style="padding: 6px 8px;">
51
+ <div style="font-weight: bold; margin-bottom: 6px;">${v.name}</div>
52
+ <div style="margin-bottom: 4px;">
53
+ 称号: <b style="color: #f472b6;">${v.title}</b>
54
+ </div>
55
+ <div style="margin-bottom: 6px;">总发言: <b>${v.totalNightMessages}</b> 条</div>
56
+ <div style="border-top: 1px solid #374151; padding-top: 6px;">
57
+ <div><span style="color: ${d.h23};">●</span> 23点: ${w.h23} 条</div>
58
+ <div><span style="color: ${d.h0};">●</span> 0点: ${w.h0} 条</div>
59
+ <div><span style="color: ${d.h1};">●</span> 1点: ${w.h1} 条</div>
60
+ <div><span style="color: ${d.h2};">●</span> 2点: ${w.h2} 条</div>
61
+ <div><span style="color: ${d.h3to4};">●</span> 3-4点: ${w.h3to4} 条</div>
62
+ </div>
63
+ </div>
64
+ `}},legend:{show:!0,bottom:0,itemWidth:12,itemHeight:12,textStyle:{color:"#6b7280",fontSize:10}},grid:{left:s.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:(h,r)=>{const v=l.value.length-1-r+1;return`${v===1?"🥇":v===2?"🥈":v===3?"🥉":`${v}.`} ${h}`}}},series:[{name:"23点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h23),itemStyle:{color:d.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h0),itemStyle:{color:d.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h1),itemStyle:{color:d.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h2),itemStyle:{color:d.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h3to4),itemStyle:{color:d.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:h=>{const r=l.value.length-1-h.dataIndex;return`${l.value[r].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:C(()=>[x(e(te),{option:c.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:C(()=>[a("div",to,[x(e(te),{option:c.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),so={id:"streak-rank",class:"scroll-mt-24"},oo={class:"flex items-center gap-3"},lo=B({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("max"),d=S(t.globalTopN??10);E(()=>t.globalTopN,h=>{h!==void 0&&(d.value=h)});const c=y(()=>u.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),p=y(()=>u.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),m=y(()=>s.value?s.value.streakRank.some(h=>h.currentStreak>0):!1);async function b(){if(t.sessionId){l.value=!0;try{s.value=await X().getCheckInAnalysis(t.sessionId,t.timeFilter)}catch(h){console.error("加载打卡分析失败:",h)}finally{l.value=!1}}}return E(()=>[t.sessionId,t.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(h,r)=>(o(),I("div",so,[l.value?(o(),k(e(oe),{key:0,text:"正在分析数据..."})):s.value&&s.value.streakRank.length>0?(o(),k(e(O),{key:1,title:c.value,description:p.value},{headerRight:C(()=>[a("div",oo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=n=>d.value=n)},null,8,["modelValue"])):A("",!0),m.value?(o(),k(e(re),{key:1,modelValue:u.value,"onUpdate:modelValue":r[1]||(r[1]=n=>u.value=n),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):A("",!0)])]),default:C(()=>[x(e(Ws),{items:s.value.streakRank,title:c.value,mode:u.value,"top-n":d.value,bare:""},null,8,["items","title","mode","top-n"])]),_:1},8,["title","description"])):(o(),k(e(O),{key:2,title:"🔥 火花榜"},{default:C(()=>[x(e(ie),{text:"暂无连续发言数据"})]),_:1}))]))}}),no={class:"flex items-center gap-3"},io={key:1,class:"py-8 text-center text-sm text-gray-400"},ro={key:1,class:"py-8 text-center text-sm text-gray-400"},uo=B({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("count"),d=S(t.globalTopN??10);E(()=>t.globalTopN,v=>{v!==void 0&&(d.value=v)});async function c(){if(t.sessionId){l.value=!0;try{s.value=await X().getMemeBattleAnalysis(t.sessionId,t.timeFilter)}catch(v){console.error("加载斗图分析失败:",v)}finally{l.value=!1}}}const p=y(()=>s.value?s.value.rankByCount.map(v=>({id:v.memberId.toString(),name:v.name,value:v.count,percentage:v.percentage})):[]),m=y(()=>s.value?s.value.rankByImageCount.map(v=>({id:v.memberId.toString(),name:v.name,value:v.count,percentage:v.percentage})):[]),b=y(()=>u.value==="count"?p.value:m.value),h=y(()=>u.value==="count"?"场":"张"),r=y(()=>{switch(u.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),n=y(()=>{switch(u.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return E(()=>[t.sessionId,t.timeFilter],()=>c(),{immediate:!0,deep:!0}),(v,w)=>l.value?(o(),k(e(oe),{key:0,text:"正在统计斗图数据..."})):s.value?(o(),k(e(O),{key:1,title:r.value,description:n.value},{headerRight:C(()=>[a("div",no,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=g=>d.value=g)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":w[1]||(w[1]=g=>u.value=g),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:C(()=>[u.value==="battle"?(o(),I(z,{key:0},[s.value.topBattles.length>0?(o(),k(e(js),{key:0,battles:s.value.topBattles,title:"","top-n":d.value,bare:""},null,8,["battles","top-n"])):(o(),I("div",io,"暂无史诗级战役数据"))],64)):(o(),I(z,{key:1},[b.value.length>0?(o(),k(e(Te),{key:0,members:b.value,title:r.value,unit:h.value,"top-n":d.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),I("div",ro,"暂无斗图数据"))],64))]),_:1},8,["title","description"])):A("",!0)}}),co={class:"space-y-6"},mo={class:"flex items-center gap-3"},vo={class:"flex items-center gap-3"},po={key:1,class:"px-3 py-2"},go=B({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("originator"),d=S("fastest"),c=S(t.globalTopN??10),p=S(t.globalTopN??10);E(()=>t.globalTopN,$=>{$!==void 0&&(c.value=$,p.value=$)});async function m(){if(t.sessionId){l.value=!0;try{s.value=await X().getRepeatAnalysis(t.sessionId,t.timeFilter)}catch($){console.error("加载复读分析失败:",$)}finally{l.value=!1}}}const b=y(()=>s.value?s.value.originators.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),h=y(()=>s.value?s.value.initiators.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),r=y(()=>s.value?s.value.breakers.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),n=y(()=>{switch(u.value){case"originator":return b.value;case"initiator":return h.value;case"breaker":return r.value;default:return b.value}}),v=y(()=>{switch(u.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),w=y(()=>{switch(u.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),g=y(()=>{if(!s.value)return{labels:[],values:[]};const $=s.value.chainLengthDistribution;return{labels:$.map(V=>`${V.length}人`),values:$.map(V=>V.count)}}),_=y(()=>d.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),R=y(()=>{if(d.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const $=s.value?.totalRepeatChains??0,V=s.value?.avgChainLength??0;return`共 ${$} 次复读,平均 ${V} 人参与`});return E(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),($,V)=>(o(),I("div",co,[l.value?(o(),k(e(oe),{key:0,text:"正在分析复读数据..."})):s.value&&s.value.totalRepeatChains>0?(o(),I(z,{key:1},[x(e(O),{title:v.value,description:w.value},{headerRight:C(()=>[a("div",mo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":V[0]||(V[0]=H=>c.value=H)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":V[1]||(V[1]=H=>u.value=H),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:C(()=>[n.value.length>0?(o(),k(e(Te),{key:0,members:n.value,title:v.value,unit:"次","top-n":c.value,bare:""},null,8,["members","title","top-n"])):(o(),k(e(ie),{key:1,text:"暂无数据"}))]),_:1},8,["title","description"]),x(e(O),{title:_.value,description:R.value},{headerRight:C(()=>[a("div",vo,[i.showTopNSelect&&d.value==="fastest"?(o(),k(e(ue),{key:0,modelValue:p.value,"onUpdate:modelValue":V[2]||(V[2]=H=>p.value=H)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":V[3]||(V[3]=H=>d.value=H),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:C(()=>[d.value==="fastest"?(o(),I(z,{key:0},[s.value.fastestRepeaters&&s.value.fastestRepeaters.length>0?(o(),k(e(Ys),{key:0,items:s.value.fastestRepeaters,"top-n":p.value,title:"",bare:""},null,8,["items","top-n"])):(o(),k(e(ie),{key:1,text:"暂无最快复读数据"}))],64)):(o(),I("div",po,[g.value.labels.length>0?(o(),k(e(Nt),{key:0,data:g.value,height:200},null,8,["data"])):(o(),k(e(ie),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(o(),k(e(O),{key:2,title:"🔁 复读榜"},{default:C(()=>[x(e(ie),{text:"该群组暂无复读记录"})]),_:1}))]))}}),ho=B({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1);async function u(){if(t.sessionId){l.value=!0;try{s.value=await X().getDivingAnalysis(t.sessionId,t.timeFilter)}catch(d){console.error("加载潜水分析失败:",d)}finally{l.value=!1}}}return E(()=>[t.sessionId,t.timeFilter],()=>u(),{immediate:!0,deep:!0}),(d,c)=>l.value?(o(),k(e(oe),{key:0,text:"正在统计潜水数据..."})):s.value&&s.value.rank.length>0?(o(),k(e(Xs),{key:1,items:s.value.rank,"global-top-n":i.globalTopN},null,8,["items","global-top-n"])):A("",!0)}}),fo={class:"space-y-6"},yo={class:"flex items-center gap-3"},bo={key:1,class:"py-8 text-center text-sm text-gray-400"},xo={key:1,class:"py-8 text-center text-sm text-gray-400"},ko={class:"flex items-center gap-3"},wo={key:1,class:"py-8 text-center text-sm text-gray-400"},_o=B({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("first"),d=S("distribution"),c=S(t.globalTopN??10),p=S(t.globalTopN??10);E(()=>t.globalTopN,_=>{_!==void 0&&(c.value=_,p.value=_)});async function m(){if(t.sessionId){l.value=!0;try{s.value=await X().getNightOwlAnalysis(t.sessionId,t.timeFilter)}catch(_){console.error("加载出勤分析失败:",_)}finally{l.value=!1}}}const b=y(()=>s.value?s.value.lastSpeakerRank.map(_=>({id:String(_.memberId),name:_.name,value:_.count,percentage:_.percentage})):[]),h=y(()=>s.value?s.value.firstSpeakerRank.map(_=>({id:String(_.memberId),name:_.name,value:_.count,percentage:_.percentage})):[]),r=y(()=>u.value==="last"?b.value:h.value),n=y(()=>u.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),v=y(()=>{const _=s.value?.totalDays??0;return u.value==="last"?`每天最后一个发言的人(共 ${_} 天)`:`每天第一个发言的人(共 ${_} 天)`}),w=y(()=>d.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),g=y(()=>d.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return E(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),(_,R)=>(o(),I("div",fo,[l.value?(o(),k(e(oe),{key:0,text:"正在加载出勤分析..."})):s.value?(o(),I(z,{key:1},[x(e(O),{title:w.value,description:g.value},{headerRight:C(()=>[a("div",yo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=$=>c.value=$)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":R[1]||(R[1]=$=>d.value=$),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:C(()=>[d.value==="distribution"?(o(),I(z,{key:0},[s.value.nightOwlRank.length>0?(o(),k(e(ao),{key:0,items:s.value.nightOwlRank,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),I("div",bo,"暂无深夜发言数据"))],64)):(o(),I(z,{key:1},[s.value.consecutiveRecords.length>0?(o(),k(e(eo),{key:0,items:s.value.consecutiveRecords,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),I("div",xo,"暂无连续记录"))],64))]),_:1},8,["title","description"]),x(e(O),{title:n.value,description:v.value},{headerRight:C(()=>[a("div",ko,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:p.value,"onUpdate:modelValue":R[2]||(R[2]=$=>p.value=$)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":R[3]||(R[3]=$=>u.value=$),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:C(()=>[r.value.length>0?(o(),k(e(Te),{key:0,members:r.value,title:n.value,"top-n":p.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(o(),I("div",wo,"暂无数据"))]),_:1},8,["title","description"])],64)):A("",!0)]))}}),$o={class:"mb-8 mt-4"},To={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"}},Io={id:"activity-rank",class:"scroll-mt-24"},Co={id:"meme-battle",class:"scroll-mt-24"},So={id:"repeat",class:"scroll-mt-24"},Ro={id:"night-owl",class:"scroll-mt-24"},Vo={id:"diving",class:"scroll-mt-24"},Mo={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},Lo={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},Do={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},No=["onClick"],Ao=B({__name:"OverallRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const t=i,s=S([]),l=S([]);async function u(){if(!t.sessionId)return;const g=X(),[_,R]=await Promise.all([g.getMemberActivity(t.sessionId,t.timeFilter),g.getAvailableYears(t.sessionId)]);s.value=_,l.value=R}E(()=>[t.sessionId,t.timeFilter],()=>u(),{immediate:!0,deep:!0});const d=y(()=>{if(t.timeFilter?.startTs&&t.timeFilter?.endTs){const g=new Date(t.timeFilter.startTs*1e3).getFullYear(),_=new Date(t.timeFilter.endTs*1e3).getFullYear();return g===_?`${g} 赛季`:`${g}-${_} 赛季`}if(l.value.length>0){const g=[...l.value].sort(($,V)=>$-V),_=g[0],R=g[g.length-1];return _===R?`${_} 赛季`:`${_}-${R} 赛季`}return"全部赛季"}),c=y(()=>({startTs:t.timeFilter?.startTs,endTs:t.timeFilter?.endTs})),p=[{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:h}=Xt(p,{threshold:350}),r=S(10),n=S("standard");We(Je,n);const v=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],w=y(()=>Xe[n.value].contentClass);return(g,_)=>(o(),I("div",{ref_key:"contentRef",ref:m,class:"flex gap-6 p-6"},[a("div",{class:W(["main-content mx-auto min-w-0 flex-1 space-y-6 px-8",w.value])},[a("div",$o,[a("h1",To," 🏆 "+f(d.value),1),_[1]||(_[1]=a("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),a("div",Io,[x(e(zs),{"session-id":t.sessionId,"member-activity":s.value,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","member-activity","time-filter","global-top-n"])]),x(e(lo),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"]),a("div",Co,[x(e(uo),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",So,[x(e(go),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",Ro,[x(e(_o),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",Vo,[x(e(ho),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),_[2]||(_[2]=a("div",{class:"h-48 no-capture"},null,-1))],2),x(e(sa),{anchors:p,"active-anchor":e(b),onClick:e(h)},{default:C(()=>[a("div",Mo,[_[3]||(_[3]=a("div",{class:"mb-2 text-xs text-gray-400"},"显示数量",-1)),x(e(ue),{modelValue:r.value,"onUpdate:modelValue":_[0]||(_[0]=R=>r.value=R)},null,8,["modelValue"])]),a("div",Lo,[_[4]||(_[4]=a("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),a("div",Do,[(o(),I(z,null,G(v,R=>a("button",{key:R.value,type:"button",class:W(["rounded-md px-2 py-1 transition",n.value===R.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:$=>n.value=R.value},f(R.label),11,No)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),qo={class:"main-content mx-auto max-w-3xl p-4 sm:p-6"},Fo=B({__name:"InteractionRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=Z(),s=i,l=S(null),u=S(!1);async function d(){if(s.sessionId){u.value=!0;try{l.value=await X().getMentionAnalysis(s.sessionId,s.timeFilter)}catch(n){console.error("加载 @ 互动分析失败:",n)}finally{u.value=!1}}}const c=y(()=>l.value?l.value.topMentioners.map(n=>({id:n.memberId.toString(),name:n.name,value:n.count,percentage:n.percentage})):[]),p=y(()=>l.value?l.value.topMentioned.map(n=>({id:n.memberId.toString(),name:n.name,value:n.count,percentage:n.percentage})):[]),m=S("mentioners"),b=y(()=>[{label:t("members.relationships.rankModes.mentioners"),value:"mentioners"},{label:t("members.relationships.rankModes.mentioned"),value:"mentioned"}]),h=y(()=>m.value==="mentioners"?c.value:p.value),r=y(()=>m.value==="mentioners"?t("members.relationships.topMentionersDescription"):t("members.relationships.topMentionedDescription"));return E(()=>[s.sessionId,s.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(n,v)=>(o(),I("div",qo,[u.value?(o(),k(e(oe),{key:0,text:e(t)("members.relationships.loading")},null,8,["text"])):l.value&&l.value.totalMentions>0&&h.value.length>0?(o(),k(e(Ta),{key:1,members:h.value,title:e(t)("members.relationships.rankingTitle"),description:r.value,unit:e(t)("members.relationships.times")},{headerRight:C(()=>[x(e(re),{modelValue:m.value,"onUpdate:modelValue":v[0]||(v[0]=w=>m.value=w),items:b.value,size:"sm"},null,8,["modelValue","items"])]),_:1},8,["members","title","description","unit"])):(o(),k(e(O),{key:2,title:e(t)("members.relationships.emptyTitle")},{default:C(()=>[x(e(ie),{text:e(t)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"]))]))}}),Bo={class:"mx-auto h-full max-w-[920px] p-2 sm:p-4"},Uo={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"},Ho={class:"flex items-center gap-3"},zo={class:"inline-flex items-center",role:"group"},Po={class:"flex items-center gap-3"},Eo={class:"p-3 w-64"},Oo={class:"text-sm font-medium mb-3"},Wo={class:"space-y-3"},Ko={class:"text-xs text-gray-500 mb-1 block"},jo={class:"text-xs text-gray-400 mt-1"},Go={class:"text-xs text-gray-500 mb-1 block"},Yo={class:"text-xs text-gray-400 mt-1"},Qo={class:"flex-1 min-h-0 overflow-hidden"},Jo={key:0,class:"h-full flex items-center justify-center"},Xo={key:1,class:"h-full flex items-center justify-center"},Zo={class:"text-center text-gray-400"},el={key:2,class:"h-full"},tl={key:3,class:"h-full flex overflow-hidden"},al={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},sl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},ol={class:"text-sm font-medium flex items-center gap-2"},ll={class:"flex-1 overflow-y-auto"},nl=["onClick"],il={class:"flex items-center justify-between"},rl={class:"text-sm truncate"},ul={class:"text-xs text-gray-400"},dl={class:"flex-1 overflow-hidden flex flex-col"},cl={key:0,class:"flex-1 flex items-center justify-center"},ml={class:"text-center text-gray-400"},vl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},pl={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},gl={class:"font-medium"},hl={class:"text-xs text-gray-400"},fl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},yl={class:"text-sm font-medium flex items-center gap-2"},bl={class:"flex-1 overflow-y-auto"},xl={key:0,class:"p-4 text-center text-gray-400"},kl={class:"flex items-center gap-3"},wl={class:"flex-1 min-w-0"},_l={class:"text-sm font-medium truncate"},$l={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},Tl={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Il={key:4,class:"h-full flex flex-col overflow-hidden"},Cl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Sl={class:"text-sm font-medium flex items-center gap-2"},Rl={class:"flex-1 overflow-y-auto"},Vl={class:"flex items-center gap-3"},Ml={class:"flex-1 min-w-0"},Ll={class:"flex items-center gap-2 text-sm"},Dl={class:"font-medium truncate"},Nl={class:"font-medium truncate"},Al={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},ql={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Fl={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"},Bl=B({__name:"ProximityRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){Ot([Wt,Kt,jt,Gt,Yt]);const t=i,{t:s}=Z(),l=rt(),u=y(()=>l.value==="dark"),d=S(!0);At(d);const c=S(null),p=S("matrix"),m=S(null),b=S({lookAhead:3,decaySeconds:120,topEdges:150}),h=S(null);let r=null;async function n(){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 v=y(()=>{if(!c.value||c.value.nodes.length===0)return null;const{nodes:D,links:F,maxLinkValue:P}=c.value,Y=[...D].sort((U,j)=>j.messageCount-U.messageCount).slice(0,20).map(U=>U.name),K=new Map;for(const U of F)K.set(`${U.source}-${U.target}`,U.value),K.set(`${U.target}-${U.source}`,U.value);const N=[];for(let U=0;U<Y.length;U++)for(let j=0;j<Y.length;j++)if(U===j)N.push([U,j,-1]);else{const pe=K.get(`${Y[U]}-${Y[j]}`)||0;N.push([U,j,pe])}return{names:Y,data:N,maxValue:P}});function w(){if(!v.value)return{graphic:{type:"text",style:{text:s("views.cluster.noData"),fill:"#999"}}};const{names:D,data:F,maxValue:P}=v.value;return{tooltip:{position:"top",formatter:ee=>{const[Y,K,N]=ee.data;return N<0?`${D[Y]}`:N===0?`${D[Y]} ↔ ${D[K]}<br/>暂无关系数据`:`${D[Y]} ↔ ${D[K]}<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:u.value?"#ccc":"#333"}},yAxis:{type:"category",data:D,splitArea:{show:!0},axisLabel:{fontSize:10,color:u.value?"#ccc":"#333"}},visualMap:{min:0,max:P||1,calculable:!0,orient:"horizontal",left:"center",bottom:10,inRange:{color:u.value?["#1a1a2e","#16213e","#0f3460","#e94560"]:["#f7f7f7","#fce4ec","#f8bbd9","#ee4567"]},textStyle:{color:u.value?"#ccc":"#333"}},series:[{type:"heatmap",data:F.filter(ee=>ee[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const g=y(()=>c.value?[...c.value.nodes].sort((D,F)=>F.messageCount-D.messageCount):[]),_=y(()=>!c.value||m.value===null?null:c.value.nodes.find(D=>D.id===m.value)||null),R=y(()=>{if(!c.value||!_.value)return[];const D=_.value.name,F=[];for(const P of c.value.links)P.source===D?F.push({otherName:P.target,value:P.value,coOccurrenceCount:P.coOccurrenceCount}):P.target===D&&F.push({otherName:P.source,value:P.value,coOccurrenceCount:P.coOccurrenceCount});return F.sort((P,ee)=>ee.value-P.value),F}),$=y(()=>c.value?c.value.links.slice(0,50):[]);function V(){r&&p.value==="matrix"&&r.setOption(w(),{notMerge:!0})}function H(){h.value&&(r=Qt(h.value,u.value?"dark":void 0),V())}function ae(){r?.resize()}return E(p,async(D,F)=>{F==="matrix"&&r&&(r.dispose(),r=null),D==="matrix"&&(await Me(),H())}),E([c,()=>u.value],()=>{p.value==="matrix"&&V()},{deep:!0}),E(d,async(D,F)=>{F&&!D&&p.value==="matrix"&&(r&&(r.dispose(),r=null),await Me(),H())}),E(()=>[t.sessionId,t.timeFilter],()=>n(),{immediate:!0,deep:!0}),De(()=>{window.addEventListener("resize",ae),p.value==="matrix"&&Me(()=>H())}),ze(()=>{window.removeEventListener("resize",ae),r?.dispose(),r=null}),(D,F)=>{const P=be,ee=Oe,Y=ut,K=xe;return o(),I("div",Bo,[x(e(Et),{class:"flex h-full flex-col"},{default:C(()=>[a("div",Uo,[a("div",Ho,[a("div",zo,[x(P,{size:"xs",color:p.value==="matrix"?"primary":"neutral",variant:p.value==="matrix"?"solid":"ghost",onClick:F[0]||(F[0]=N=>p.value="matrix")},{default:C(()=>[Q(f(e(s)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),x(P,{size:"xs",color:p.value==="member"?"primary":"neutral",variant:p.value==="member"?"solid":"ghost",onClick:F[1]||(F[1]=N=>p.value="member")},{default:C(()=>[Q(f(e(s)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),x(P,{size:"xs",color:p.value==="circle"?"primary":"neutral",variant:p.value==="circle"?"solid":"ghost",onClick:F[2]||(F[2]=N=>p.value="circle")},{default:C(()=>[Q(f(e(s)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])])]),a("div",Po,[x(Y,null,{content:C(()=>[a("div",Eo,[a("h4",Oo,f(e(s)("views.cluster.modelSettings")),1),a("div",Wo,[a("div",null,[a("label",Ko,f(e(s)("views.cluster.lookAhead")),1),x(ee,{modelValue:b.value.lookAhead,"onUpdate:modelValue":F[3]||(F[3]=N=>b.value.lookAhead=N),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),a("p",jo,f(e(s)("views.cluster.lookAheadDesc")),1)]),a("div",null,[a("label",Go,f(e(s)("views.cluster.decaySeconds")),1),x(ee,{modelValue:b.value.decaySeconds,"onUpdate:modelValue":F[4]||(F[4]=N=>b.value.decaySeconds=N),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),a("p",Yo,f(e(s)("views.cluster.decaySecondsDesc")),1)]),x(P,{size:"xs",color:"primary",class:"w-full mt-2",onClick:n},{default:C(()=>[Q(f(e(s)("views.cluster.applySettings")),1)]),_:1})])])]),default:C(()=>[x(P,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),x(P,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:n})])]),a("div",Qo,[d.value?(o(),I("div",Jo,[x(K,{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",Xo,[a("div",Zo,[x(K,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),a("p",null,f(e(s)("views.cluster.noData")),1)])])):p.value==="matrix"?(o(),I("div",el,[a("div",{ref_key:"chartRef",ref:h,class:"w-full h-full"},null,512)])):p.value==="member"?(o(),I("div",tl,[a("div",al,[a("div",sl,[a("h3",ol,[x(K,{name:"i-heroicons-users",class:"w-4 h-4"}),Q(" "+f(e(s)("views.cluster.selectMember")),1)])]),a("div",ll,[(o(!0),I(z,null,G(g.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:U=>m.value=N.id},[a("div",il,[a("span",rl,f(N.name),1),a("span",ul,f(N.messageCount),1)])],10,nl))),128))])]),a("div",dl,[_.value?(o(),I(z,{key:1},[a("div",vl,[a("div",pl,f(_.value.name.charAt(0)),1),a("div",null,[a("div",gl,f(_.value.name),1),a("div",hl,f(e(s)("views.cluster.msgCount"))+": "+f(_.value.messageCount)+" | "+f(e(s)("views.cluster.relationCount"))+": "+f(R.value.length),1)])]),a("div",fl,[a("h3",yl,[x(K,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),Q(" "+f(e(s)("views.cluster.relationsByIntimacy")),1)])]),a("div",bl,[R.value.length===0?(o(),I("div",xl,f(e(s)("views.cluster.noRelations")),1)):A("",!0),(o(!0),I(z,null,G(R.value,(N,U)=>(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"},[a("div",kl,[a("span",{class:W(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",U<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"])},f(U+1),3),a("div",wl,[a("div",_l,f(N.otherName),1),a("div",$l,[a("span",null,f(e(s)("views.cluster.intimacy"))+": "+f((N.value*100).toFixed(0))+"%",1),a("span",null,f(e(s)("views.cluster.coOccurrence"))+": "+f(N.coOccurrenceCount)+f(e(s)("views.cluster.times")),1)])]),a("div",Tl,[a("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:he({width:`${R.value[0]?.value?N.value/R.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(o(),I("div",cl,[a("div",ml,[x(K,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),a("p",null,f(e(s)("views.cluster.selectMemberHint")),1)])]))])])):(o(),I("div",Il,[a("div",Cl,[a("h3",Sl,[x(K,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),Q(" "+f(e(s)("views.cluster.interactionRanking")),1)])]),a("div",Rl,[(o(!0),I(z,null,G($.value,(N,U)=>(o(),I("div",{key:U,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[a("div",Vl,[a("span",{class:W(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",U<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"])},f(U+1),3),a("div",Ml,[a("div",Ll,[a("span",Dl,f(N.source),1),F[5]||(F[5]=a("span",{class:"text-gray-400"},"↔",-1)),a("span",Nl,f(N.target),1)]),a("div",Al,[a("span",null,f(e(s)("views.cluster.score"))+": "+f(N.value.toFixed(2)),1),a("span",null,f(e(s)("views.cluster.coOccurrence"))+": "+f(N.coOccurrenceCount)+f(e(s)("views.cluster.times")),1)])]),a("div",ql,[a("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:he({width:`${$.value[0]?.value?N.value/$.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),c.value?(o(),I("div",Fl,[a("span",null,f(e(s)("views.cluster.totalMembers"))+": "+f(c.value.stats.totalMembers),1),a("span",null,f(e(s)("views.cluster.totalMessages"))+": "+f(c.value.stats.totalMessages.toLocaleString()),1),a("span",null,f(e(s)("views.cluster.involvedMembers"))+": "+f(c.value.stats.involvedMembers),1),a("span",null,f(e(s)("views.cluster.edgeCount"))+": "+f(c.value.stats.edgeCount),1)])):A("",!0)]),_:1})])}}}),Ul={class:"flex h-full flex-col"},Hl={class:"min-h-0 flex-1 overflow-y-auto"},zl={key:3,class:"main-content mx-auto w-full max-w-3xl p-6"},Pl=B({__name:"RankingView",props:{sessionId:{},timeFilter:{},visibleTabIds:{}},setup(i){const t=i,{t:s,locale:l}=Z(),u=S("overall"),d=S(null),c=y(()=>dt("groupRanking",l.value)),p=r=>!t.visibleTabIds||t.visibleTabIds.includes(r),m=y(()=>[...c.value&&p("overall")?[{id:"overall",label:s("analysis.subTabs.ranking.overall"),icon:"i-heroicons-trophy"}]:[],{id:"interaction",label:s("analysis.subTabs.ranking.interaction"),icon:"i-heroicons-heart"},{id:"proximity",label:s("analysis.subTabs.ranking.proximity"),icon:"i-heroicons-user-group"},{id:"hot-repeat",label:s("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-sparkles"},{id:"catchphrase",label:s("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"},{id:"keyword",label:s("analysis.subTabs.ranking.keyword"),icon:"i-heroicons-magnifying-glass"}].filter(n=>p(n.id))),b=y(()=>({startTs:t.timeFilter?.startTs,endTs:t.timeFilter?.endTs})),h=y(()=>({...b.value,memberId:d.value}));return E(m,r=>{r.some(n=>n.id===u.value)||(u.value=r[0]?.id??"hot-repeat")},{immediate:!0}),(r,n)=>(o(),I("div",Ul,[x(e(Ye),{modelValue:u.value,"onUpdate:modelValue":n[1]||(n[1]=v=>u.value=v),items:m.value,"persist-key":"groupRankingTab"},{right:C(()=>[u.value==="catchphrase"?(o(),k(Ge,{key:0,modelValue:d.value,"onUpdate:modelValue":n[0]||(n[0]=v=>d.value=v),"session-id":t.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),a("div",Hl,[x(Ke,{name:"fade",mode:"out-in"},{default:C(()=>[u.value==="overall"?(o(),k(Ao,{key:0,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="interaction"?(o(),k(Fo,{key:1,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="proximity"?(o(),k(Bl,{key:2,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="keyword"?(o(),I("div",zl,[x(Bs,{"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])])):u.value==="hot-repeat"?(o(),k(e(Xa),{key:4,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="catchphrase"?(o(),k(e(Ha),{key:5,"session-id":t.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):A("",!0)]),_:1})])]))}}),El=je(Pl,[["__scopeId","data-v-616e92db"]]),Ol={class:"main-content max-w-5xl p-6"},Wl={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},Kl={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},jl={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},Gl={class:"flex flex-1 flex-wrap items-center gap-2"},Yl={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},Ql={class:"text-xs text-gray-400"},Jl={key:0,class:"text-gray-300 dark:text-gray-600"},Xl=B({__name:"NicknameHistory",props:{sessionId:{}},setup(i){const{t}=Z(),s=i,l=S([]),u=S([]),d=S(!1);function c(b){return b.groupNickname||b.accountName||b.platformId}async function p(){if(s.sessionId)try{l.value=await X().getMembers(s.sessionId)}catch(b){console.error("加载成员列表失败:",b)}}async function m(){if(!s.sessionId||l.value.length===0)return;d.value=!0;const b=[];try{const h=l.value.map(n=>X().getMemberNameHistory(s.sessionId,n.id)),r=await Promise.all(h);l.value.forEach((n,v)=>{const w=r[v];w.length>2&&b.push({memberId:n.id,name:c(n),history:w})}),u.value=b}catch(h){console.error("加载昵称变更记录失败:",h)}finally{d.value=!1}}return E(()=>s.sessionId,async()=>{await p()},{immediate:!0}),E(()=>l.value.length,()=>{l.value.length>0&&m()}),De(async()=>{l.value.length===0&&await p()}),(b,h)=>{const r=Qe;return o(),I("div",Ol,[a("p",Wl,f(e(t)("members.nicknameHistory.note")),1),x(e(O),{title:e(t)("members.nicknameHistory.title"),description:d.value?e(t)("members.nicknameHistory.loading"):u.value.length>0?e(t)("members.nicknameHistory.hasChanges",{count:u.value.length}):e(t)("members.nicknameHistory.noChanges")},{default:C(()=>[!d.value&&u.value.length>0?(o(),I("div",Kl,[(o(!0),I(z,null,G(u.value,n=>(o(),I("div",{key:n.memberId,class:"flex items-start gap-3 px-5 py-3"},[a("div",jl,f(n.name),1),a("div",Gl,[(o(!0),I(z,null,G(n.history,(v,w)=>(o(),I(z,{key:w},[a("div",Yl,[a("span",{class:W(["text-sm",v.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},f(v.name),3),v.endTs===null?(o(),k(r,{key:0,color:"primary",variant:"soft",size:"xs"},{default:C(()=>[Q(f(e(t)("members.nicknameHistory.current")),1)]),_:1})):A("",!0),a("span",Ql,"("+f(e(Ut)(v.startTs,v.endTs))+")",1)]),w<n.history.length-1?(o(),I("span",Jl,"→")):A("",!0)],64))),128))])]))),128))])):d.value?(o(),k(e(oe),{key:2,text:e(t)("members.nicknameHistory.loadingText")},null,8,["text"])):(o(),k(e(ie),{key:1,text:e(t)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),Zl={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},en={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},tn={class:"text-lg font-semibold text-gray-900 dark:text-white"},an={class:"flex-1 overflow-auto"},sn=B({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(i){const{t}=Z(),s=i,l=S(!1);return(u,d)=>{const c=be,p=$e;return o(),I(z,null,[x(c,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:d[0]||(d[0]=m=>l.value=!0)},{default:C(()=>[Q(f(e(t)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),s.sessionId?(o(),k(p,{key:0,open:l.value,"onUpdate:open":d[2]||(d[2]=m=>l.value=m),ui:{content:"max-w-6xl h-[85vh]"}},{content:C(()=>[a("div",Zl,[a("div",en,[a("h2",tn,f(e(t)("analysis.subTabs.member.nicknameHistory")),1),x(c,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:d[1]||(d[1]=m=>l.value=!1)})]),a("div",an,[x(Xl,{"session-id":s.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):A("",!0)],64)}}}),on={class:"relative flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},ln=["aria-label"],nn={class:"relative flex-1 overflow-y-auto"},rn={class:"h-full"},un={key:2,class:"flex h-full items-center justify-center"},dn={class:"text-gray-500"},cn={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},mn={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},vn={class:"text-lg font-semibold text-gray-900 dark:text-white"},pn={class:"text-sm text-gray-500 dark:text-gray-400"},gn={class:"flex items-center gap-2"},hn={class:"flex-1 overflow-hidden"},fn=B({__name:"index",setup(i){const t=Pe(()=>Ee(()=>import("./MessageExportModal-BozaR9UZ.js"),__vite__mapDeps([9,1,2,3,10,11,12,13]))),{t:s}=Z(),l=pt(),u=gt(),d=ct(),c=Ne(),p=mt(),{currentSessionId:m}=vt(d),b=S(!1),h=S(!1),r=S(!1),n=S(!1),v=S(!1);function w(){c.openChatRecordDrawer({})}const g=[{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"}],_=y(()=>p.debugMode?[...g,{id:"debug",labelKey:"analysis.tabs.debug",icon:"i-heroicons-bug-ant"}]:g),R=y(()=>_.value.map(J=>J.id)),{activeTab:$,isLoading:V,isInitialLoad:H,isSessionSwitching:ae,session:D,memberActivity:F,hourlyActivity:P,dailyActivity:ee,messageTypes:Y,timeRangeValue:K,fullTimeRange:N,availableYears:U,timeFilter:j,initialTimeState:pe,loadData:ke,handleTimeRangeInitialized:we}=_t({route:l,router:u,currentSessionId:m,selectSession:d.selectSession,defaultTab:p.defaultSessionTab,validTabIds:R.value});We("session-switch-loading",ae);const Ie=y(()=>F.value.reduce((J,M)=>J+M.messageCount,0)),Ce=y(()=>F.value.filter(J=>J.messageCount>0).length);return(J,M)=>{const Se=be,Re=$e;return o(),I("div",on,[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 dark:bg-page-dark",style:{paddingTop:"var(--titlebar-area-height)"},role:"status","aria-live":"polite","aria-label":e(s)("common.loading")},[x(e(qt))],8,ln)):A("",!0),e(D)?(o(),I(z,{key:1},[x($t,{"active-tab":e($),"onUpdate:activeTab":M[0]||(M[0]=T=>Be($)?$.value=T:null),"time-range-value":e(K),"onUpdate:timeRangeValue":M[1]||(M[1]=T=>Be(K)?K.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:_.value,"current-session-id":e(m),"initial-time-state":e(pe),onOpenIncrementalImport:M[2]||(M[2]=T=>r.value=!0),onOpenMemberManagement:M[3]||(M[3]=T=>v.value=!0),onOpenChatRecord:w,"onUpdate:fullRange":M[4]||(M[4]=T=>N.value=T),"onUpdate:availableYears":M[5]||(M[5]=T=>U.value=T),onTimeRangeInitialized:e(we)},null,8,["active-tab","time-range-value","title","avatar","tabs","current-session-id","initial-time-state","onTimeRangeInitialized"]),a("div",nn,[e(V)&&!e(ae)?(o(),k(e(oe),{key:0,variant:"overlay",text:e(s)("common.loading")},null,8,["text"])):A("",!0),a("div",rn,[x(Ke,{name:"tab-slide",mode:"out-in"},{default:C(()=>[e($)==="insights"?(o(),k(ns,{key:"insights-"+e(m),"session-id":e(m),session:e(D),"member-activity":e(F),"message-types":e(Y),"hourly-activity":e(P),"daily-activity":e(ee),"time-range":e(N),"filtered-message-count":Ie.value,"filtered-member-count":Ce.value,"time-filter":e(j)},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(),k(El,{key:"ranking-"+e(m),"session-id":e(m),"time-filter":e(j)},null,8,["session-id","time-filter"])):e($)==="ai-chat"?(o(),k(e(St),{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(),k(Rt,{key:"memory-"+e(m),"session-id":e(m),"session-name":e(D).name},null,8,["session-id","session-name"])):e($)==="lab"?(o(),k(Vt,{key:"lab-"+e(m),"session-id":e(m),"chat-type":"group"},null,8,["session-id"])):e($)==="debug"?(o(),k(e(Mt),{key:"debug-"+e(m),"session-id":e(m)},null,8,["session-id"])):A("",!0)]),_:1})])]),x(Tt,{onOpenIncrementalImport:M[6]||(M[6]=T=>r.value=!0),onOpenSemanticIndex:M[7]||(M[7]=T=>b.value=!0),onOpenMemberManagement:M[8]||(M[8]=T=>v.value=!0),onOpenChatRecord:w,onOpenMessageExport:M[9]||(M[9]=T=>n.value=!0)})],64)):e(H)?A("",!0):(o(),I("div",un,[a("p",dn,f(e(s)("analysis.groupChat.loadError")),1)])),e(m)&&e(D)?(o(),k(It,{key:3,modelValue:b.value,"onUpdate:modelValue":M[10]||(M[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(),k(Jt,{key:4,modelValue:h.value,"onUpdate:modelValue":M[11]||(M[11]=T=>h.value=T),"session-id":e(m),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):A("",!0),e(m)&&e(D)?(o(),k(Ct,{key:5,modelValue:r.value,"onUpdate:modelValue":M[12]||(M[12]=T=>r.value=T),"session-id":e(m),"session-name":e(D).name,onImported:M[13]||(M[13]=()=>{e(ke)(),e(d).loadSessions()})},null,8,["modelValue","session-id","session-name"])):A("",!0),e(m)?(o(),k(e(t),{key:6,modelValue:n.value,"onUpdate:modelValue":M[14]||(M[14]=T=>n.value=T)},null,8,["modelValue"])):A("",!0),e(m)?(o(),k(Re,{key:7,open:v.value,"onUpdate:open":M[16]||(M[16]=T=>v.value=T),ui:{content:"max-w-6xl h-[85vh]"}},{content:C(()=>[a("div",cn,[a("div",mn,[a("div",null,[a("h2",vn,f(e(s)("analysis.tooltip.memberManagement")),1),a("p",pn,f(e(s)("members.list.description",{count:e(D)?.memberCount??0})),1)]),a("div",gn,[x(sn,{"session-id":e(m)},null,8,["session-id"]),x(Se,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:M[15]||(M[15]=T=>v.value=!1)})])]),a("div",hn,[x(Lt,{"session-id":e(m),"show-header":!1,"chat-type":"group",onDataChanged:e(ke)},null,8,["session-id","onDataChanged"])])])]),_:1},8,["open"])):A("",!0)])}}}),Zn=je(fn,[["__scopeId","data-v-e2f57a2f"]]);export{Zn as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MessageExportModal-BozaR9UZ.js","assets/index-D5m0P4ss.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-CMPHZH6B.css","assets/useToast-B36MzFFy.js","assets/Tabs-Dqwkh3Ea.js","assets/Tabs-OrJkANIA.js","assets/RovingFocusItem-B2y6BG1a.js"])))=>i.map(i=>d[i]);
2
+ import{a as K,a0 as Y,a6 as ve,w as X,B as xe,C as he,o as n,c as V,f as t,b as J,i as d,l as e,v as o,F as O,q as G,n as F,s as L,D as j,_ as ee,an as pe,g as k,r as U,a1 as Re,ac as Ce,ah as Le,e as Be,a2 as De,a3 as $e,V as Ne,af as Ve,a5 as Fe,aq as Oe,av as Pe,au as Ue,a4 as Ee,b8 as We,at as He,ao as Je,b9 as Ge,p as Ke,ad as Ye}from"./index-D5m0P4ss.js";import{_ as Se,a as Me,b as re,c as Qe,d as Te,e as Xe,u as Ze,f as et,I as tt,g as at,h as st,i as nt,j as it,k as ot,l as rt,m as lt,n as ct,C as ut,o as dt,L as mt,D as gt,M as pt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang-CnRLt_1j.js";import{_ as vt}from"./SectionTabs.vue_vue_type_script_setup_true_lang-ueEF4zHE.js";import{_ as xt}from"./Select-Cm4I8u9n.js";import{_ as fe,L as ht}from"./LoadingState.vue_vue_type_script_setup_true_lang-Cnshyn0f.js";import{T as qe}from"./Tabs-Dqwkh3Ea.js";import{a as Ie,g as ft}from"./base-CawUl6ET.js";import"./vendor-echarts-wordcloud-BsaEJTPY.js";import{u as be,x as bt,j as ye,i as ke,k as se,n as Ae,t as ze,s as yt,m as kt}from"./vendor-echarts-DfAMQxdr.js";import{_ as _e}from"./ThemeCard.vue_vue_type_script_setup_true_lang-DPIvbq75.js";import{_ as _t}from"./useTable-DPEMaGby.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Checkbox-CwajNPGF.js";import"./useFormControl-B-aXrJZN.js";import"./VisuallyHiddenInput-BOdkR_GC.js";import"./RovingFocusItem-B2y6BG1a.js";import"./Label-Bt2U4lGy.js";import"./useToast-B36MzFFy.js";import"./index-BRV_D8dv.js";import"./service-YZnJyEMq.js";import"./prompt-DcAcgQiB.js";import"./aiChat-CzFSFuOJ.js";import"./chatlabSiteLocale-CrCNb8QP.js";import"./Tabs-OrJkANIA.js";import"./semantic-index-config-builder-CK6v64Y1.js";import"./dateFormat-DXuDxIye.js";import"./member-select-utils-BXZ3oHct.js";import"./TimeSelect.vue_vue_type_script_setup_true_lang-dEdo6CqM.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-C4CsoIlq.js";import"./PageHeader-CEe0xTl3.js";import"./PageTabs.vue_vue_type_script_setup_true_lang-D2DZrrnv.js";import"./Alert--bTQXRcZ.js";import"./clamp-jFYhBC76.js";import"./vendor-zrender-PFmZe1EY.js";const wt={key:0,class:"relative z-10 flex flex-col h-full"},$t={class:"flex flex-col sm:flex-row items-center sm:items-start gap-6 px-6 pt-8 pb-4 sm:px-8"},Ct={class:"w-full flex-1 min-w-0"},St={class:"flex items-center gap-x-2 sm:gap-x-3 mb-6 sm:mb-8"},Mt={class:"text-2xl sm:text-4xl font-black tracking-tight text-blue-600 dark:text-blue-400 truncate"},jt={class:"text-2xl sm:text-4xl font-black tracking-tight text-pink-600 dark:text-pink-400 truncate"},Pt={class:"grid grid-cols-2 gap-4 sm:gap-10"},Tt={class:"text-[10px] font-bold uppercase tracking-widest text-gray-400 dark:text-gray-500"},It={class:"flex flex-col gap-2.5"},Rt=["title","onClick"],Dt={class:"shrink-0 text-[10px] sm:text-xs font-semibold tabular-nums text-gray-400/80"},qt={key:0,class:"text-xs sm:text-sm font-medium text-gray-400"},At={class:"hidden shrink-0 sm:block"},zt={class:"px-6 pb-6 pt-2 sm:px-8 mt-auto"},Lt={class:"mb-3 flex items-center justify-between"},Bt={class:"text-[10px] font-bold uppercase tracking-widest text-gray-400 dark:text-gray-500"},Nt={class:"grid grid-cols-1 sm:grid-cols-3 gap-4"},Vt={class:"mb-4 flex items-center gap-2.5"},Ft={class:"text-sm font-bold tracking-wide text-gray-900 dark:text-white"},Ot={class:"flex items-center justify-between mb-4 w-full"},Ut={class:"flex flex-col flex-1 min-w-0"},Et={class:"truncate text-[10px] font-bold uppercase tracking-wider text-gray-400 mb-1"},Wt={class:"flex flex-col flex-1 min-w-0 items-end text-right"},Ht={class:"truncate text-[10px] font-bold uppercase tracking-wider text-gray-400 mb-1"},Jt={class:"mt-auto pt-3 border-t border-gray-100 dark:border-white/5 flex flex-col"},Gt={key:0,class:"flex items-start justify-between gap-2 mb-2 min-h-[24px]"},Kt={class:"flex flex-1 flex-nowrap overflow-hidden gap-1"},Yt={key:0,class:"text-[11px] text-gray-400"},Qt={class:"flex flex-1 flex-nowrap overflow-hidden gap-1 justify-end"},Xt={key:0,class:"text-[11px] text-gray-400"},Zt={key:1,class:"flex flex-nowrap overflow-hidden items-center gap-x-1.5 mb-2 min-h-[24px]"},ea=["onClick"],ta={key:0,class:"shrink-0 text-gray-300 dark:text-gray-600 font-normal"},aa={key:0,class:"text-[11px] text-gray-400"},sa={class:"text-[10px] leading-relaxed text-gray-500 dark:text-gray-400"},na={class:"flex items-center justify-between px-6 pb-4 opacity-40 mix-blend-luminosity dark:opacity-30 sm:px-8 sm:pb-5"},ia={class:"flex items-center gap-1.5"},oa={class:"text-[9px] font-medium uppercase tracking-widest"},ra=K({__name:"LanguagePreferenceCard",props:{data:{},enableRecordNavigation:{type:Boolean,default:!0}},emits:["wordClick"],setup(_,{emit:s}){be([bt,ye,ke]);const{t:a}=Y(),$=ve(),i=_,v=s,R=k(()=>i.data.members[0]),f=k(()=>i.data.members[1]);function g(l,u){return l.length<=u?l:l.slice(0,u)+"…"}function C(l){const u=l.posDistribution,r=u.noun+u.verb+u.adjective+u.adverb+u.modalParticle+u.interjection+u.other;return r===0?a("quotes.languagePreference.pos.styleBalanced"):u.noun/r>.5?a("quotes.languagePreference.pos.styleEncyclopedia"):u.verb/r>.45?a("quotes.languagePreference.pos.styleAction"):u.adjective/r>.3?a("quotes.languagePreference.pos.styleExpressive"):a("quotes.languagePreference.pos.styleBalanced")}function N(l){const r=[["ellipsis",l.ellipsis],["exclamation",l.exclamation],["question",l.question],["tilde",l.tilde],["noPunct",l.noPunct],["period",l.period]].reduce((y,P)=>y[1]>=P[1]?y:P);return{ellipsis:a("quotes.languagePreference.punctuation.personalityDeep"),exclamation:a("quotes.languagePreference.punctuation.personalityPassionate"),question:a("quotes.languagePreference.punctuation.personalityCurious"),tilde:a("quotes.languagePreference.punctuation.personalityCheerful"),noPunct:a("quotes.languagePreference.punctuation.personalityFreeflow"),period:a("quotes.languagePreference.punctuation.personalityPrecise")}[r[0]]||"-"}function A(l,u=5){return[["...",l.ellipsis],["!",l.exclamation],["?",l.question],["~",l.tilde],["。",l.period]].filter(([,c])=>c>0).sort((c,y)=>y[1]-c[1]).slice(0,u).map(([c])=>c)}const M=["#6366f1","#ec4899","#f97316","#22c55e","#3b82f6","#8b5cf6","#14b8a6","#f43f5e","#eab308","#06b6d4"],b=k(()=>{const l=R.value,u=f.value;if(!l||!u)return[];const r=i.data.sharedWords.slice(0,6).map((c,y)=>({word:c.word,color:M[y%M.length]}));return[{icon:"i-heroicons-book-open",iconBgClass:"bg-blue-100 dark:bg-blue-500/20",iconColorClass:"text-blue-600 dark:text-blue-400",title:a("quotes.languagePreference.card.diversityTitle"),leftName:l.name,leftValue:`${l.lexicalDiversity}%`,rightName:u.name,rightValue:`${u.lexicalDiversity}%`,valueClass:"text-lg text-blue-600 dark:text-blue-400",detail:{kind:"tags-single",tags:r},desc:a("quotes.languagePreference.card.diversityDesc")},{icon:"i-heroicons-sparkles",iconBgClass:"bg-violet-100 dark:bg-violet-500/20",iconColorClass:"text-violet-600 dark:text-violet-400",title:a("quotes.languagePreference.card.styleTitle"),leftName:l.name,leftValue:C(l),rightName:u.name,rightValue:C(u),valueClass:"text-xs text-violet-600 dark:text-violet-400",detail:{kind:"tags-vs",leftTags:l.modalParticles.slice(0,4).map(c=>c.word),rightTags:u.modalParticles.slice(0,4).map(c=>c.word)},desc:a("quotes.languagePreference.card.styleDesc")},{icon:"i-heroicons-finger-print",iconBgClass:"bg-orange-100 dark:bg-orange-500/20",iconColorClass:"text-orange-600 dark:text-orange-400",title:a("quotes.languagePreference.card.punctTitle"),leftName:l.name,leftValue:N(l.punctuation),rightName:u.name,rightValue:N(u.punctuation),valueClass:"text-xs text-orange-600 dark:text-orange-400",detail:{kind:"tags-vs",leftTags:A(l.punctuation,4),rightTags:A(u.punctuation,4)},desc:a("quotes.languagePreference.card.punctDesc")}]}),q=U(null);let w=null;function S(){q.value&&(w=se(q.value,void 0,{renderer:"canvas"}),h())}function h(){if(!w||!R.value||!f.value)return;const l=R.value.posDistribution,u=f.value.posDistribution,r=[{name:a("quotes.languagePreference.card.radarFactual"),max:0},{name:a("quotes.languagePreference.card.radarActive"),max:0},{name:a("quotes.languagePreference.card.radarDescriptive"),max:0},{name:a("quotes.languagePreference.card.radarAffable"),max:0},{name:a("quotes.languagePreference.card.radarIntense"),max:0}],c=[l.noun,l.verb,l.adjective,l.modalParticle+l.interjection,l.adverb],y=[u.noun,u.verb,u.adjective,u.modalParticle+u.interjection,u.adverb];for(let W=0;W<r.length;W++)r[W].max=Math.max(c[W],y[W],1)*1.3;const P=$.value?"#9ca3af":"#6b7280";w.setOption({backgroundColor:"transparent",tooltip:{trigger:"item"},legend:{bottom:0,itemWidth:10,itemHeight:10,textStyle:{fontSize:10,color:P},data:[R.value.name,f.value.name]},radar:{indicator:r,radius:"60%",center:["50%","50%"],splitArea:{areaStyle:{color:$.value?["rgba(255,255,255,0.02)","rgba(255,255,255,0.04)"]:["rgba(0,0,0,0.01)","rgba(0,0,0,0.03)"]}},axisName:{color:P,fontSize:10},splitLine:{lineStyle:{color:$.value?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"}},axisLine:{lineStyle:{color:$.value?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.08)"}}},series:[{type:"radar",data:[{value:c,name:R.value.name,lineStyle:{color:"#3b82f6",width:2},areaStyle:{color:"rgba(59,130,246,0.15)"},itemStyle:{color:"#3b82f6"},symbol:"circle",symbolSize:4},{value:y,name:f.value.name,lineStyle:{color:"#ec4899",width:2},areaStyle:{color:"rgba(236,72,153,0.15)"},itemStyle:{color:"#ec4899"},symbol:"circle",symbolSize:4}]}]},{notMerge:!0})}function m(){w?.resize()}return X(()=>i.data,()=>h(),{deep:!0}),X($,()=>{w?.dispose(),S()}),xe(()=>{S(),window.addEventListener("resize",m)}),he(()=>{window.removeEventListener("resize",m),w?.dispose()}),(l,u)=>{const r=ee;return n(),V(t(Se),null,{default:J(()=>[R.value&&f.value?(n(),d("div",wt,[e("div",$t,[e("div",Ct,[e("div",St,[e("span",Mt,o(R.value.name),1),u[0]||(u[0]=e("span",{class:"text-sm sm:text-lg font-black text-gray-300 dark:text-gray-600 italic px-1 sm:px-2 shrink-0"}," VS ",-1)),e("span",jt,o(f.value.name),1)]),e("div",Pt,[(n(!0),d(O,null,G([R.value,f.value],(c,y)=>(n(),d("div",{key:c.memberId,class:"flex flex-col gap-3"},[e("div",Tt,o(t(a)("quotes.languagePreference.card.topCatchphrases")),1),e("div",It,[(n(!0),d(O,null,G(c.catchphrases.slice(0,3),(P,W)=>(n(),d("div",{key:W,class:"flex items-center gap-2 group"},[e("span",{class:F(["text-xs sm:text-sm font-black font-mono opacity-40 transition-opacity group-hover:opacity-100",y===0?"text-blue-600 dark:text-blue-400":"text-pink-600 dark:text-pink-400"])}," #"+o(W+1),3),e("span",{class:F(["truncate text-sm font-bold text-gray-700 transition-opacity dark:text-gray-200 sm:text-base",i.enableRecordNavigation?"cursor-pointer hover:opacity-70":""]),title:P.content,onClick:H=>i.enableRecordNavigation&&v("wordClick",P.content)}," 「"+o(g(P.content,12))+"」 ",11,Rt),e("span",Dt," ×"+o(P.count),1)]))),128)),c.catchphrases.length===0?(n(),d("div",qt,"-")):L("",!0)])]))),128))])]),e("div",At,[e("div",{ref_key:"radarRef",ref:q,style:{width:"250px",height:"230px"},class:"-mt-4 sm:-mr-4"},null,512)])]),e("div",zt,[e("div",Lt,[e("span",Bt,o(t(a)("quotes.languagePreference.card.languageProfiles")),1)]),e("div",Nt,[(n(!0),d(O,null,G(b.value,c=>(n(),d("div",{key:c.title,class:"flex min-w-0 flex-col p-4"},[e("div",Vt,[e("div",{class:F(["flex h-8 w-8 shrink-0 items-center justify-center rounded-lg",c.iconBgClass])},[j(r,{name:c.icon,class:F(["h-4 w-4",c.iconColorClass])},null,8,["name","class"])],2),e("span",Ft,o(c.title),1)]),e("div",Ot,[e("div",Ut,[e("span",Et,o(c.leftName),1),e("span",{class:F(["truncate text-xl font-black font-mono leading-none",c.valueClass])},o(c.leftValue),3)]),u[1]||(u[1]=e("div",{class:"px-2 shrink-0"},[e("span",{class:"text-[10px] font-black text-gray-300 dark:text-gray-600 italic"},"VS")],-1)),e("div",Wt,[e("span",Ht,o(c.rightName),1),e("span",{class:F(["truncate text-xl font-black font-mono leading-none",c.valueClass])},o(c.rightValue),3)])]),e("div",Jt,[c.detail.kind==="tags-vs"?(n(),d("div",Gt,[e("div",Kt,[(n(!0),d(O,null,G(c.detail.leftTags,y=>(n(),d("span",{key:y,class:"shrink-0 px-1.5 py-0.5 rounded-md text-[10px] font-semibold font-mono bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400"},o(y),1))),128)),c.detail.leftTags.length===0?(n(),d("span",Yt,"-")):L("",!0)]),e("div",Qt,[(n(!0),d(O,null,G(c.detail.rightTags,y=>(n(),d("span",{key:y,class:"shrink-0 px-1.5 py-0.5 rounded-md text-[10px] font-semibold font-mono bg-pink-50 text-pink-600 dark:bg-pink-500/10 dark:text-pink-400"},o(y),1))),128)),c.detail.rightTags.length===0?(n(),d("span",Xt,"-")):L("",!0)])])):c.detail.kind==="tags-single"?(n(),d("div",Zt,[(n(!0),d(O,null,G(c.detail.tags.slice(0,6),(y,P)=>(n(),d(O,{key:y.word},[e("span",{class:F(["shrink-0 text-[11px] font-bold transition-opacity",i.enableRecordNavigation?"cursor-pointer hover:opacity-80":""]),style:pe({color:y.color}),onClick:W=>i.enableRecordNavigation&&v("wordClick",y.word)},o(y.word),15,ea),P<c.detail.tags.slice(0,6).length-1?(n(),d("span",ta," · ")):L("",!0)],64))),128)),c.detail.tags.length===0?(n(),d("span",aa,"-")):L("",!0)])):L("",!0),e("p",sa,o(c.desc),1)])]))),128))])]),e("div",na,[e("div",ia,[j(r,{name:"i-heroicons-chat-bubble-left-right-solid",class:"h-3.5 w-3.5"}),u[2]||(u[2]=e("span",{class:"text-[10px] font-bold uppercase tracking-wider"},"ChatLab",-1))]),e("span",oa,o(t(a)("quotes.languagePreference.card.watermark")),1)])])):L("",!0)]),_:1})}}}),la={class:"px-5 py-4 sm:px-6"},ca={class:"mb-4 flex items-center justify-between"},ua={class:"flex items-center gap-2"},da={class:"text-[15px] font-black tracking-tight text-gray-900 dark:text-white"},ma={key:0,class:"rounded-full bg-pink-100 px-2 py-0.5 text-[10px] font-bold text-pink-600 dark:bg-pink-900/30 dark:text-pink-400"},ga={key:0,class:"grid grid-cols-2 gap-6"},pa={class:"mb-3 text-center"},va={class:"text-sm font-semibold text-blue-600 dark:text-blue-400"},xa={class:"flex flex-wrap gap-2"},ha=["title","onClick"],fa={class:"text-[10px] font-semibold opacity-60"},ba={class:"mb-3 text-center"},ya={class:"text-sm font-semibold text-pink-600 dark:text-pink-400"},ka={class:"flex flex-wrap gap-2"},_a=["title","onClick"],wa={class:"text-[10px] font-semibold opacity-60"},$a={key:1,class:"mt-4 text-center text-xs text-gray-500 dark:text-gray-400"},Ca=K({__name:"CatchphrasePKSection",props:{members:{},enableRecordNavigation:{type:Boolean,default:!0}},emits:["wordClick"],setup(_,{emit:s}){const{t:a}=Y(),$=_,i=s,v=U(20),R=[{label:"10",value:10},{label:"20",value:20},{label:"30",value:30}],f=k(()=>$.members[0]),g=k(()=>$.members[1]),C=k(()=>f.value?.catchphrases.slice(0,v.value)??[]),N=k(()=>g.value?.catchphrases.slice(0,v.value)??[]),A=k(()=>{if(!f.value||!g.value)return new Set;const w=new Set(f.value.catchphrases.map(h=>h.content)),S=new Set(g.value.catchphrases.map(h=>h.content));return new Set([...w].filter(h=>S.has(h)))}),M=[{bg:"bg-amber-50 text-amber-600 ring-1 ring-amber-500/20 dark:bg-amber-500/10 dark:text-amber-400 dark:ring-amber-500/30",text:"text-amber-700 dark:text-amber-400 font-bold",badge:"bg-amber-500 text-white dark:bg-amber-600"},{bg:"bg-slate-50 text-slate-600 ring-1 ring-slate-500/20 dark:bg-slate-500/10 dark:text-slate-400 dark:ring-slate-500/30",text:"text-slate-700 dark:text-slate-300 font-bold",badge:"bg-slate-400 text-white dark:bg-slate-500"},{bg:"bg-orange-50 text-orange-600 ring-1 ring-orange-500/20 dark:bg-orange-500/10 dark:text-orange-400 dark:ring-orange-500/30",text:"text-orange-700 dark:text-orange-400 font-bold",badge:"bg-orange-400 text-white dark:bg-orange-500"}];function b(w){return w<M.length?M[w]:{bg:"bg-gray-50/50 text-gray-600 ring-1 ring-gray-900/5 dark:bg-gray-800/30 dark:text-gray-400 dark:ring-white/10",text:"text-gray-600 dark:text-gray-400",badge:"bg-transparent text-gray-400"}}function q(w,S=20){return w.length<=S?w:w.slice(0,S)+"..."}return(w,S)=>{const h=ee;return n(),V(t(_e),null,{default:J(()=>[e("div",la,[e("div",ca,[e("div",ua,[j(h,{name:"i-heroicons-chat-bubble-bottom-center-text",class:"h-4 w-4 text-indigo-500"}),e("span",da,o(t(a)("quotes.languagePreference.catchphrasePK.title")),1),A.value.size>0?(n(),d("span",ma,o(t(a)("quotes.languagePreference.catchphrasePK.sharedCount",{count:A.value.size})),1)):L("",!0)]),j(t(qe),{modelValue:v.value,"onUpdate:modelValue":S[0]||(S[0]=m=>v.value=m),size:"xs",items:R},null,8,["modelValue"])]),f.value&&g.value?(n(),d("div",ga,[e("div",null,[e("div",pa,[e("span",va,o(f.value.name),1)]),e("div",xa,[(n(!0),d(O,null,G(C.value,(m,l)=>(n(),d("div",{key:m.content,class:F(["inline-flex items-center gap-1.5 rounded-full px-3 py-1 transition-opacity",[$.enableRecordNavigation?"cursor-pointer hover:opacity-75":"",A.value.has(m.content)?"bg-pink-50 text-pink-600 ring-1 ring-pink-500/20 dark:bg-pink-500/10 dark:text-pink-400 dark:ring-pink-500/30 shadow-sm":b(l).bg]]),title:m.content,onClick:u=>$.enableRecordNavigation&&i("wordClick",m.content)},[l<3?(n(),d("span",{key:0,class:F(["flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-[10px] font-bold",b(l).badge])},o(l+1),3)):L("",!0),e("span",{class:F(["text-[13px] font-medium",A.value.has(m.content)?"font-bold":b(l).text])},o(q(m.content)),3),e("span",fa,"×"+o(m.count),1)],10,ha))),128))])]),e("div",null,[e("div",ba,[e("span",ya,o(g.value.name),1)]),e("div",ka,[(n(!0),d(O,null,G(N.value,(m,l)=>(n(),d("div",{key:m.content,class:F(["inline-flex items-center gap-1.5 rounded-full px-3 py-1 transition-opacity",[$.enableRecordNavigation?"cursor-pointer hover:opacity-75":"",A.value.has(m.content)?"bg-pink-50 text-pink-600 ring-1 ring-pink-500/20 dark:bg-pink-500/10 dark:text-pink-400 dark:ring-pink-500/30 shadow-sm":b(l).bg]]),title:m.content,onClick:u=>$.enableRecordNavigation&&i("wordClick",m.content)},[l<3?(n(),d("span",{key:0,class:F(["flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-[10px] font-bold",b(l).badge])},o(l+1),3)):L("",!0),e("span",{class:F(["text-[13px] font-medium",A.value.has(m.content)?"font-bold":b(l).text])},o(q(m.content)),3),e("span",wa,"×"+o(m.count),1)],10,_a))),128))])])])):L("",!0),$.enableRecordNavigation?(n(),d("p",$a,o(t(a)("quotes.languagePreference.catchphrasePK.hint")),1)):L("",!0)])]),_:1})}}}),Sa={class:"px-5 py-4 sm:px-6"},Ma={class:"mb-4 flex items-center gap-2"},ja={class:"text-[15px] font-black tracking-tight text-gray-900 dark:text-white"},Pa={class:"flex flex-col gap-4 lg:flex-row lg:gap-6"},Ta={class:"flex-1"},Ia={key:0,class:"flex shrink-0 flex-col gap-3 lg:w-48"},Ra={class:"min-w-0"},Da={class:"truncate text-xs font-semibold text-gray-500 dark:text-gray-400"},qa=K({__name:"PosPortraitSection",props:{members:{}},setup(_){be([Ae,ze,ye,yt,ke]);const{t:s}=Y(),a=ve(),$=_,i=k(()=>$.members[0]),v=k(()=>$.members[1]);function R(M){const b=M.posDistribution,q=b.noun+b.verb+b.adjective+b.adverb+b.modalParticle+b.interjection+b.other;if(q===0)return{label:s("quotes.languagePreference.pos.styleBalanced"),icon:"i-heroicons-scale-solid",colorClass:"text-cyan-600 dark:text-cyan-400"};const w=b.noun/q,S=b.verb/q,h=b.adjective/q;return w>.5?{label:s("quotes.languagePreference.pos.styleEncyclopedia"),icon:"i-heroicons-book-open-solid",colorClass:"text-indigo-600 dark:text-indigo-400"}:S>.45?{label:s("quotes.languagePreference.pos.styleAction"),icon:"i-heroicons-rocket-launch-solid",colorClass:"text-orange-600 dark:text-orange-400"}:h>.3?{label:s("quotes.languagePreference.pos.styleExpressive"),icon:"i-heroicons-paint-brush-solid",colorClass:"text-pink-600 dark:text-pink-400"}:{label:s("quotes.languagePreference.pos.styleBalanced"),icon:"i-heroicons-scale-solid",colorClass:"text-cyan-600 dark:text-cyan-400"}}const f=U(null);let g=null;function C(){f.value&&(g=se(f.value,void 0,{renderer:"canvas"}),N())}function N(){if(!g||!i.value||!v.value)return;const M=i.value.posDistribution,b=v.value.posDistribution,q=[s("quotes.languagePreference.card.radarNoun"),s("quotes.languagePreference.card.radarVerb"),s("quotes.languagePreference.card.radarAdj"),s("quotes.languagePreference.card.radarModal"),s("quotes.languagePreference.card.radarAdv")],w=[M.noun,M.verb,M.adjective,M.modalParticle+M.interjection,M.adverb],S=[b.noun,b.verb,b.adjective,b.modalParticle+b.interjection,b.adverb],h=a.value?"#9ca3af":"#6b7280";g.setOption({backgroundColor:"transparent",tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:[i.value.name,v.value.name],top:0,textStyle:{fontSize:11,color:h}},grid:{left:80,right:20,top:36,bottom:10},xAxis:{type:"value",show:!1},yAxis:{type:"category",data:q,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:11,color:h}},series:[{name:i.value.name,type:"bar",data:w,itemStyle:{color:"#3b82f6",borderRadius:[0,4,4,0]},barGap:"20%",barCategoryGap:"40%"},{name:v.value.name,type:"bar",data:S,itemStyle:{color:"#ec4899",borderRadius:[0,4,4,0]}}]},{notMerge:!0})}function A(){g?.resize()}return X(()=>$.members,()=>N(),{deep:!0}),X(a,()=>{g?.dispose(),C()}),xe(()=>{C(),window.addEventListener("resize",A)}),he(()=>{window.removeEventListener("resize",A),g?.dispose()}),(M,b)=>{const q=ee;return n(),V(t(_e),null,{default:J(()=>[e("div",Sa,[e("div",Ma,[j(q,{name:"i-heroicons-chart-bar",class:"h-4 w-4 text-violet-500"}),e("span",ja,o(t(s)("quotes.languagePreference.pos.title")),1)]),e("div",Pa,[e("div",Ta,[e("div",{ref_key:"chartRef",ref:f,style:{width:"100%",height:"220px"}},null,512)]),i.value&&v.value?(n(),d("div",Ia,[(n(!0),d(O,null,G([i.value,v.value],w=>(n(),d("div",{key:w.memberId,class:"flex min-w-0 items-center gap-3 px-1 py-3"},[j(q,{name:R(w).icon,class:F(["h-5 w-5 shrink-0",R(w).colorClass])},null,8,["name","class"]),e("div",Ra,[e("div",Da,o(w.name),1),e("div",{class:F(["truncate text-sm font-bold",R(w).colorClass])},o(R(w).label),3)])]))),128))])):L("",!0)])])]),_:1})}}}),Aa={class:"px-5 py-4 sm:px-6"},za={class:"mb-4 flex items-center gap-2"},La={class:"text-[15px] font-black tracking-tight text-gray-900 dark:text-white"},Ba={key:0,class:"grid grid-cols-1 gap-6 md:grid-cols-2"},Na={class:"mb-2 flex items-center justify-between"},Va={key:1,class:"flex h-[200px] items-center justify-center text-sm text-gray-400"},Fa=K({__name:"ModalParticleSection",props:{members:{}},setup(_){be([Ae,ze,ye,ke]);const{t:s}=Y(),a=ve(),$=_,i=k(()=>$.members[0]),v=k(()=>$.members[1]),R=new Set(["呀","哒","滴","啦","哇","耶"]),f=new Set(["呢","吗","嘛"]),g=new Set(["吧","喔","噢","嘛"]),C=new Set(["嗯","哦","额","呃"]);function N(m){const l={label:s("quotes.languagePreference.modal.toneMixed"),colorClass:"bg-gray-50 text-gray-600 ring-1 ring-gray-900/5 dark:bg-gray-800/50 dark:text-gray-400 dark:ring-white/10"};if(m.modalParticles.length===0)return l;let u=0,r=0,c=0,y=0,P=0;for(const H of m.modalParticles)P+=H.count,R.has(H.word)&&(u+=H.count),f.has(H.word)&&(r+=H.count),g.has(H.word)&&(c+=H.count),C.has(H.word)&&(y+=H.count);if(P===0)return l;const W=Math.max(u,r,c,y);return W===u&&u/P>.3?{label:s("quotes.languagePreference.modal.toneSoft"),colorClass:"bg-pink-50 text-pink-600 ring-1 ring-pink-500/20 dark:bg-pink-500/10 dark:text-pink-400 dark:ring-pink-500/30"}:W===r&&r/P>.3?{label:s("quotes.languagePreference.modal.toneCurious"),colorClass:"bg-violet-50 text-violet-600 ring-1 ring-violet-500/20 dark:bg-violet-500/10 dark:text-violet-400 dark:ring-violet-500/30"}:W===c&&c/P>.3?{label:s("quotes.languagePreference.modal.toneCasual"),colorClass:"bg-emerald-50 text-emerald-600 ring-1 ring-emerald-500/20 dark:bg-emerald-500/10 dark:text-emerald-400 dark:ring-emerald-500/30"}:W===y&&y/P>.3?{label:s("quotes.languagePreference.modal.toneCalm"),colorClass:"bg-blue-50 text-blue-600 ring-1 ring-blue-500/20 dark:bg-blue-500/10 dark:text-blue-400 dark:ring-blue-500/30"}:l}const A=U(null),M=U(null);let b=null,q=null;function w(m,l){const u=m.modalParticles.slice(0,8),r=a.value?"#9ca3af":"#6b7280";return{backgroundColor:"transparent",tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:40,right:20,top:4,bottom:4},xAxis:{type:"value",show:!1},yAxis:{type:"category",data:u.map(c=>c.word).reverse(),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:r},inverse:!1},series:[{type:"bar",data:u.map(c=>c.count).reverse(),itemStyle:{color:l,borderRadius:[0,4,4,0]},barWidth:"50%",label:{show:!0,position:"right",fontSize:10,color:r,formatter:"{c}"}}]}}function S(){A.value&&i.value&&(b=se(A.value,void 0,{renderer:"canvas"}),b.setOption(w(i.value,"#3b82f6"),{notMerge:!0})),M.value&&v.value&&(q=se(M.value,void 0,{renderer:"canvas"}),q.setOption(w(v.value,"#ec4899"),{notMerge:!0}))}function h(){b?.resize(),q?.resize()}return X(()=>$.members,()=>{b&&i.value&&b.setOption(w(i.value,"#3b82f6"),{notMerge:!0}),q&&v.value&&q.setOption(w(v.value,"#ec4899"),{notMerge:!0})},{deep:!0}),X(a,()=>{b?.dispose(),q?.dispose(),S()}),xe(()=>{S(),window.addEventListener("resize",h)}),he(()=>{window.removeEventListener("resize",h),b?.dispose(),q?.dispose()}),(m,l)=>{const u=ee;return n(),V(t(_e),null,{default:J(()=>[e("div",Aa,[e("div",za,[j(u,{name:"i-heroicons-chat-bubble-oval-left-ellipsis",class:"h-4 w-4 text-pink-500"}),e("span",La,o(t(s)("quotes.languagePreference.modal.title")),1)]),i.value&&v.value?(n(),d("div",Ba,[(n(!0),d(O,null,G([i.value,v.value],(r,c)=>(n(),d("div",{key:r.memberId},[e("div",Na,[e("span",{class:F(["text-sm font-semibold",c===0?"text-blue-600 dark:text-blue-400":"text-pink-600 dark:text-pink-400"])},o(r.name),3),e("span",{class:F(["rounded-full px-2 py-0.5 text-[10px] font-bold",N(r).colorClass])},o(N(r).label),3)]),r.modalParticles.length>0?(n(),d("div",{key:0,ref_for:!0,ref:y=>{c===0?A.value=y:M.value=y},style:{width:"100%",height:"200px"}},null,512)):(n(),d("div",Va,o(t(s)("quotes.languagePreference.modal.empty")),1))]))),128))])):L("",!0)])]),_:1})}}}),Oa={class:"px-5 py-4 sm:px-6"},Ua={class:"mb-4 flex items-center gap-2"},Ea={class:"text-[15px] font-black tracking-tight text-gray-900 dark:text-white"},Wa={key:0,class:"grid grid-cols-1 gap-6 md:grid-cols-2"},Ha={class:"mb-2 flex items-center gap-2"},Ja={key:1,class:"flex h-[200px] items-center justify-center text-sm text-gray-400"},Ga=K({__name:"PunctuationSection",props:{members:{}},setup(_){be([kt,ye,ke]);const{t:s}=Y(),a=ve(),$=_,i=k(()=>$.members[0]),v=k(()=>$.members[1]),R=["#6366f1","#ec4899","#f97316","#22c55e","#06b6d4","#8b5cf6"];function f(S){const m=[["ellipsis",S.ellipsis],["exclamation",S.exclamation],["question",S.question],["tilde",S.tilde],["noPunct",S.noPunct],["period",S.period]].reduce((u,r)=>u[1]>=r[1]?u:r);return{ellipsis:{label:s("quotes.languagePreference.punctuation.personalityDeep"),colorClass:"bg-indigo-50 text-indigo-600 ring-1 ring-indigo-500/20 dark:bg-indigo-500/10 dark:text-indigo-400 dark:ring-indigo-500/30"},exclamation:{label:s("quotes.languagePreference.punctuation.personalityPassionate"),colorClass:"bg-rose-50 text-rose-600 ring-1 ring-rose-500/20 dark:bg-rose-500/10 dark:text-rose-400 dark:ring-rose-500/30"},question:{label:s("quotes.languagePreference.punctuation.personalityCurious"),colorClass:"bg-amber-50 text-amber-600 ring-1 ring-amber-500/20 dark:bg-amber-500/10 dark:text-amber-400 dark:ring-amber-500/30"},tilde:{label:s("quotes.languagePreference.punctuation.personalityCheerful"),colorClass:"bg-pink-50 text-pink-600 ring-1 ring-pink-500/20 dark:bg-pink-500/10 dark:text-pink-400 dark:ring-pink-500/30"},noPunct:{label:s("quotes.languagePreference.punctuation.personalityFreeflow"),colorClass:"bg-emerald-50 text-emerald-600 ring-1 ring-emerald-500/20 dark:bg-emerald-500/10 dark:text-emerald-400 dark:ring-emerald-500/30"},period:{label:s("quotes.languagePreference.punctuation.personalityPrecise"),colorClass:"bg-blue-50 text-blue-600 ring-1 ring-blue-500/20 dark:bg-blue-500/10 dark:text-blue-400 dark:ring-blue-500/30"}}[m[0]]||{label:"-",colorClass:"bg-gray-50 text-gray-600 ring-1 ring-gray-900/5 dark:bg-gray-800/50 dark:text-gray-400 dark:ring-white/10"}}function g(S){return[{name:"...",value:S.ellipsis},{name:"!",value:S.exclamation},{name:"?",value:S.question},{name:"~",value:S.tilde},{name:"。",value:S.period},{name:s("quotes.languagePreference.punctuation.none"),value:S.noPunct}].filter(h=>h.value>0)}const C=U(null),N=U(null);let A=null,M=null;function b(S){return{backgroundColor:"transparent",tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},series:[{type:"pie",radius:["45%","75%"],center:["50%","50%"],avoidLabelOverlap:!1,padAngle:2,itemStyle:{borderRadius:4},label:{show:!0,fontSize:10,color:a.value?"#9ca3af":"#6b7280",formatter:"{b}"},emphasis:{label:{show:!0,fontWeight:"bold"},scaleSize:4},data:S.map((h,m)=>({...h,itemStyle:{color:R[m%R.length]}}))}]}}function q(){C.value&&i.value&&(A=se(C.value,void 0,{renderer:"canvas"}),A.setOption(b(g(i.value.punctuation)),{notMerge:!0})),N.value&&v.value&&(M=se(N.value,void 0,{renderer:"canvas"}),M.setOption(b(g(v.value.punctuation)),{notMerge:!0}))}function w(){A?.resize(),M?.resize()}return X(()=>$.members,()=>{A&&i.value&&A.setOption(b(g(i.value.punctuation)),{notMerge:!0}),M&&v.value&&M.setOption(b(g(v.value.punctuation)),{notMerge:!0})},{deep:!0}),X(a,()=>{A?.dispose(),M?.dispose(),q()}),xe(()=>{q(),window.addEventListener("resize",w)}),he(()=>{window.removeEventListener("resize",w),A?.dispose(),M?.dispose()}),(S,h)=>{const m=ee;return n(),V(t(_e),null,{default:J(()=>[e("div",Oa,[e("div",Ua,[j(m,{name:"i-heroicons-ellipsis-horizontal",class:"h-4 w-4 text-orange-500"}),e("span",Ea,o(t(s)("quotes.languagePreference.punctuation.title")),1)]),i.value&&v.value?(n(),d("div",Wa,[(n(!0),d(O,null,G([i.value,v.value],(l,u)=>(n(),d("div",{key:l.memberId,class:"flex flex-col items-center"},[e("div",Ha,[e("span",{class:F(["text-sm font-semibold",u===0?"text-blue-600 dark:text-blue-400":"text-pink-600 dark:text-pink-400"])},o(l.name),3),e("span",{class:F(["rounded-full px-2 py-0.5 text-[10px] font-bold",f(l.punctuation).colorClass])},o(f(l.punctuation).label),3)]),l.punctuation.total>0?(n(),d("div",{key:0,ref_for:!0,ref:r=>{u===0?C.value=r:N.value=r},style:{width:"100%",height:"200px"}},null,512)):(n(),d("div",Ja,o(t(s)("quotes.languagePreference.punctuation.empty")),1))]))),128))])):L("",!0)])]),_:1})}}}),Ka={class:"main-content mx-auto max-w-[920px] space-y-6 p-4 sm:p-6"},Ya=K({__name:"LanguagePreferenceTab",props:{sessionId:{},timeFilter:{},enableRecordNavigation:{type:Boolean,default:!0}},setup(_){const{t:s,locale:a}=Y(),$=Re(),i=_,v=U(null),R=U(!1),f=k(()=>v.value&&v.value.members.length>=2);async function g(){if(i.sessionId){R.value=!0;try{v.value=await Ce().getLanguagePreferenceAnalysis(i.sessionId,a.value,i.timeFilter)}catch(N){console.error("[LanguagePreferenceTab] Failed to load:",N)}finally{R.value=!1}}}function C(N){i.enableRecordNavigation&&$.openChatRecordDrawer({keywords:[N]})}return X(()=>[i.sessionId,i.timeFilter],()=>g(),{immediate:!0,deep:!0}),(N,A)=>(n(),d("div",Ka,[R.value?(n(),V(t(fe),{key:0,text:t(s)("quotes.languagePreference.loading")},null,8,["text"])):f.value?v.value?(n(),d(O,{key:2},[j(ra,{data:v.value,"enable-record-navigation":i.enableRecordNavigation,onWordClick:C},null,8,["data","enable-record-navigation"]),j(Ca,{members:v.value.members,"enable-record-navigation":i.enableRecordNavigation,onWordClick:C},null,8,["members","enable-record-navigation"]),j(qa,{members:v.value.members},null,8,["members"]),j(Fa,{members:v.value.members},null,8,["members"]),j(Ga,{members:v.value.members},null,8,["members"])],64)):L("",!0):(n(),V(t(Me),{key:1,text:t(s)("quotes.languagePreference.empty")},null,8,["text"]))]))}}),Qa={class:"flex min-w-0 flex-col p-4"},Xa={class:"mb-2 min-h-8"},Za={class:"flex items-center justify-between gap-2"},es={class:"flex min-w-0 items-center gap-2"},ts={class:"truncate text-xs font-bold tracking-wide text-gray-900 dark:text-white"},as={key:0,class:"shrink-0"},ss={class:"flex h-full flex-col"},ns={class:"grid grid-cols-2 gap-2"},is={class:"flex min-w-0 flex-col items-center px-1 py-1.5 text-center"},os=["title"],rs={class:"flex min-w-0 flex-col items-center px-1 py-1.5 text-center"},ls=["title"],cs={class:"mt-auto pt-3 min-h-8 text-[10px] leading-relaxed text-gray-500 dark:text-gray-400 sm:min-h-6"},ge=K({__name:"RelationshipMetricCard",props:{title:{},iconName:{},iconBgClass:{},iconColorClass:{},leftName:{default:"—"},leftValue:{default:"--"},rightName:{default:"—"},rightValue:{default:"--"},valueClass:{default:"text-gray-700 dark:text-gray-200"},description:{default:""}},setup(_){const s=Le(),a=k(()=>!!s["header-extra"]);return($,i)=>{const v=ee;return n(),d("div",Qa,[e("div",Xa,[e("div",Za,[e("div",es,[e("div",{class:F(["flex h-6 w-6 shrink-0 items-center justify-center rounded-full",_.iconBgClass])},[j(v,{name:_.iconName,class:F(["h-3.5 w-3.5",_.iconColorClass])},null,8,["name","class"])],2),e("span",ts,o(_.title),1)]),a.value?(n(),d("div",as,[Be($.$slots,"header-extra")])):L("",!0)])]),e("div",ss,[e("div",ns,[e("div",is,[e("div",{class:"w-full truncate text-[10px] font-semibold tracking-wide text-gray-500 dark:text-gray-400",title:_.leftName},o(_.leftName),9,os),e("div",{class:F(["mt-2 font-black font-mono leading-none tabular-nums",_.valueClass])},o(_.leftValue),3)]),e("div",rs,[e("div",{class:"w-full truncate text-[10px] font-semibold tracking-wide text-gray-500 dark:text-gray-400",title:_.rightName},o(_.rightName),9,ls),e("div",{class:F(["mt-2 font-black font-mono leading-none tabular-nums",_.valueClass])},o(_.rightValue),3)])]),e("p",cs,o(_.description),1)])])}}}),us={key:1,class:"main-content mx-auto max-w-[920px] space-y-6 p-4 sm:p-6"},ds={class:"space-y-6"},ms={class:"relative z-10 flex flex-col items-center justify-center gap-10 px-6 pt-10 pb-6 sm:px-8 lg:flex-row lg:items-start lg:justify-between lg:gap-8 xl:gap-12"},gs={class:"flex min-w-0 max-w-full flex-1 flex-col items-center justify-center lg:items-start"},ps={class:"flex flex-col text-[15px] leading-relaxed text-gray-600 dark:text-gray-300"},vs={class:"mb-2 text-sm font-medium tracking-wide text-gray-500 dark:text-gray-400"},xs={class:"mb-4 flex min-w-0 flex-wrap items-baseline gap-2"},hs={class:"text-xl font-medium text-gray-700 dark:text-gray-300"},fs={class:"font-black text-5xl tracking-tight text-gray-900 dark:text-white"},bs={class:"text-xl font-medium text-gray-700 dark:text-gray-300"},ys={class:"flex min-w-0 max-w-full flex-wrap items-baseline gap-x-1.5 gap-y-1"},ks={class:"text-base font-medium text-gray-600 dark:text-gray-300"},_s={class:"font-black text-3xl text-pink-500 dark:text-pink-400"},ws={class:"text-base font-medium text-gray-600 dark:text-gray-300"},$s={class:"max-w-full break-all text-xl font-bold leading-snug text-gray-900 dark:text-white"},Cs={class:"text-base font-medium text-gray-600 dark:text-gray-300"},Ss={class:"mt-8 flex w-full max-w-[320px] items-center justify-between gap-4"},Ms={class:"flex flex-1 flex-col items-center overflow-hidden"},js=["title"],Ps={class:"mt-1 text-2xl font-black text-blue-500 dark:text-blue-400"},Ts={class:"mt-0.5 text-[10px] font-medium text-gray-400"},Is={class:"flex flex-1 flex-col items-center overflow-hidden"},Rs=["title"],Ds={class:"mt-1 text-2xl font-black text-pink-500 dark:text-pink-400"},qs={class:"mt-0.5 text-[10px] font-medium text-gray-400"},As={key:0,class:"flex min-w-0 w-full max-w-[400px] flex-1 flex-col justify-center lg:max-w-[460px]"},zs={class:"mb-2 flex items-center justify-between px-1"},Ls={class:"text-sm font-bold text-gray-900 dark:text-white"},Bs={class:"text-[10px] font-medium text-gray-500 dark:text-gray-400"},Ns={class:"w-full"},Vs={class:"h-[200px] w-full"},Fs={class:"relative z-10 grid grid-cols-2 gap-3 p-4 pt-2 sm:p-6 sm:pt-2 lg:grid-cols-4"},Os={class:"relative z-10 flex items-center justify-between px-6 pb-4 opacity-40 mix-blend-luminosity dark:opacity-30 sm:px-8 sm:pb-5"},Us={class:"flex items-center gap-1.5"},Es={class:"text-[9px] font-medium uppercase tracking-widest"},Ws={class:"px-4 pb-5 sm:px-6 sm:pb-6"},Hs={key:0,class:"mt-6"},Js={class:"mb-3 text-xs font-semibold tracking-wide text-gray-400 uppercase dark:text-gray-500"},Gs={class:"grid gap-x-8 gap-y-4 sm:grid-cols-3"},Ks={class:"min-w-0"},Ys={class:"text-xs font-medium text-gray-500 dark:text-gray-400"},Qs=["title"],Xs={class:"mt-0.5 text-xs text-gray-500 dark:text-gray-400"},Zs={class:"mt-5 flex justify-center"},en={key:1,class:"mt-3 overflow-x-auto rounded-lg border border-gray-200/80 dark:border-white/10"},tn={class:"min-w-full text-left text-sm"},an={class:"bg-gray-50/80 text-xs text-gray-500 dark:bg-white/[0.03] dark:text-gray-400"},sn={scope:"col",class:"px-4 py-2.5 font-medium"},nn={scope:"col",class:"px-4 py-2.5 text-right font-medium"},on={scope:"col",class:"px-4 py-2.5 text-right font-medium"},rn={scope:"col",class:"max-w-[180px] truncate px-4 py-2.5 text-right font-medium"},ln={scope:"col",class:"max-w-[180px] truncate px-4 py-2.5 text-right font-medium"},cn={class:"divide-y divide-gray-100 dark:divide-white/5"},un={class:"whitespace-nowrap px-4 py-2.5 font-medium text-gray-700 dark:text-gray-300"},dn={class:"px-4 py-2.5 text-right tabular-nums text-gray-600 dark:text-gray-400"},mn={class:"px-4 py-2.5 text-right tabular-nums text-gray-600 dark:text-gray-400"},gn={class:"whitespace-nowrap px-4 py-2.5 text-right tabular-nums text-gray-600 dark:text-gray-400"},pn={class:"whitespace-nowrap px-4 py-2.5 text-right tabular-nums text-gray-600 dark:text-gray-400"},vn={class:"px-4 py-2.5 text-right tabular-nums text-gray-600 dark:text-gray-400"},xn={class:"px-4 py-2.5 text-right tabular-nums text-gray-600 dark:text-gray-400"},hn=K({__name:"PrivateRelationshipView",props:{sessionId:{},timeFilter:{}},setup(_){const{t:s,locale:a}=Y(),$=_,i=U(null),v=U(!1),R=U(!1),f=U("activity"),g=U(!1),C=U(300);async function N(x){if(!$.sessionId)return;const p=x?.localOnly==="perseverance";p?R.value=!0:v.value=!0;try{i.value=await Ce().getRelationshipStats($.sessionId,$.timeFilter,{perseveranceThreshold:C.value})}catch(z){console.error("Failed to load relationship stats:",z)}finally{p?R.value=!1:v.value=!1}}X(()=>[$.sessionId,$.timeFilter],()=>N(),{immediate:!0,deep:!0});const A=[{label:"1m",value:60},{label:"3m",value:180},{label:"5m",value:300},{label:"10m",value:600},{label:"30m",value:1800}];function M(x){C.value!==x&&(C.value=x,N({localOnly:"perseverance"}))}const b=k({get:()=>C.value,set:x=>M(x)});function q(x){return s("views.relationship.perseverance.thresholdMinutes",{n:Math.round(x/60)})}const w=k(()=>s("views.relationship.perseverance.hintWithThreshold",{threshold:q(C.value)})),S=k(()=>i.value?.hasSessionIndex&&i.value.totalSessions>0),h=k(()=>i.value?.members[0]),m=k(()=>i.value?.members[1]),l=k(()=>{if(!h.value||!i.value)return 50;const x=(h.value.totalInitiateCount??0)+(m.value?.totalInitiateCount??0);return x===0?50:Math.round(h.value.totalInitiateCount/x*100)}),u=k(()=>{if(!i.value||i.value.months.length===0)return"";const x=[...i.value.months].sort((D,I)=>D.month.localeCompare(I.month)),p=x[0].month.replace("-","/"),z=x[x.length-1].month.replace("-","/");return p===z?p:`${p} – ${z}`}),r=k(()=>a.value.startsWith("en")?"max-w-[420px]":"max-w-[320px]"),c=k(()=>{if(!i.value||i.value.months.length===0||!h.value)return{};const x=[...i.value.months].sort((B,te)=>B.month.localeCompare(te.month)),p=x.map(B=>P(B.month)),z=h.value.name,D=m.value?.name??"—",I=x.map(B=>{const te=B.members.find(me=>me.memberId===h.value.memberId);return!te||B.totalSessions===0?50:Math.round(te.initiateCount/B.totalSessions*100)});return{tooltip:{trigger:"axis",formatter(B){const te=B[0],me=te.value;return`${te.axisValue}<br/>${z}: ${me}%<br/>${D}: ${100-me}%`}},grid:{left:40,right:20,top:20,bottom:30},xAxis:{type:"category",data:p,axisLabel:{fontSize:11}},yAxis:{type:"value",min:0,max:100,axisLabel:{formatter:"{value}%",fontSize:11},splitLine:{lineStyle:{type:"dashed"}}},series:[{type:"line",data:I,smooth:!0,symbol:"circle",symbolSize:6,lineStyle:{width:2,color:"#3b82f6"},itemStyle:{color:"#3b82f6"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(59, 130, 246, 0.15)"},{offset:1,color:"rgba(59, 130, 246, 0)"}]}},markLine:{silent:!0,data:[{yAxis:50,lineStyle:{type:"dashed",color:"#9ca3af"}}],label:{show:!1},symbol:"none"}}]}});function y(x){const[p,z]=x.split("-");return s("views.relationship.monthFormat",{year:p,month:Number.parseInt(z,10)})}function P(x){const p=x.split("-");return s("views.relationship.monthShortFormat",{month:Number.parseInt(p[1],10)})}function W(x){return!x||!i.value?.iceBreakers?.length?0:i.value.iceBreakers.filter(p=>p.memberId===x).reduce((p,z)=>p+z.count,0)}function H(x){if(!x||!i.value?.responseLatency?.length)return null;const p=i.value.responseLatency.find(z=>z.memberId===x);return p?p.avgResponseTime:null}function ne(x){return!x||!i.value?.perseverance?.length?0:i.value.perseverance.find(z=>z.memberId===x)?.totalDoubleTexts??0}function le(x){const p=H(x);return p!=null?T(p):"--"}function ce(x){return i.value?.monthlyResponseLatency?.find(p=>p.month===x)?.members??[]}function ue(x){return i.value?.monthlyPerseverance?.find(p=>p.month===x)?.members??[]}function ie(x,p){return p?ce(x).find(D=>D.memberId===p)?.avgResponseTime??null:null}function de(x,p){const z=ie(x,p);return z==null?"—":T(z)}function ae(x,p){return p?ue(x).find(D=>D.memberId===p)?.doubleTextCount??0:0}function oe(x){return i.value?.iceBreakers?.filter(p=>p.month===x).reduce((p,z)=>p+z.count,0)??0}function Q(x){const p=ce(x),z=p.reduce((D,I)=>D+I.responseCount,0);return z===0?null:p.reduce((D,I)=>D+I.avgResponseTime*I.responseCount,0)/z}function T(x){const p=Math.max(0,Math.round(x));if(p<60)return s("views.relationship.responseLatency.seconds",{n:p});if(p<3600){const I=Math.floor(p/60),B=p%60;return s("views.relationship.responseLatency.minutesSeconds",{m:I,s:B})}const z=Math.floor(p/3600),D=Math.floor(p%3600/60);return D===0?s("views.relationship.responseLatency.hours",{n:z}):s("views.relationship.responseLatency.hoursMinutes",{h:z,m:D})}const Z=k(()=>[...i.value?.months??[]].sort((x,p)=>x.month.localeCompare(p.month))),we=k(()=>[{label:s("views.relationship.trajectory.metrics.activity"),value:"activity"},{label:s("views.relationship.trajectory.metrics.response"),value:"response"},{label:s("views.relationship.trajectory.metrics.perseverance"),value:"perseverance"}]),E=k(()=>{const x=Z.value,p=new Set(x.map(I=>I.month.slice(0,4))).size>1,z=x.map(I=>p?I.month.replace("-","/"):P(I.month)),D={color:["#3b82f6","#ec4899"],tooltip:{trigger:"axis"},legend:{top:4,textStyle:{fontSize:11}},grid:{left:52,right:24,top:44,bottom:34},xAxis:{type:"category",data:z,axisTick:{show:!1},axisLabel:{fontSize:11}},yAxis:{type:"value",min:0,minInterval:1,axisLabel:{fontSize:11},splitLine:{lineStyle:{type:"dashed"}}}};return f.value==="activity"?{...D,series:[{name:s("views.relationship.trajectory.conversations"),type:"bar",data:x.map(I=>I.totalSessions),barMaxWidth:32,itemStyle:{borderRadius:[4,4,0,0]}},{name:s("views.relationship.trajectory.iceBreaks"),type:"line",data:x.map(I=>oe(I.month)),smooth:!0,symbolSize:7,lineStyle:{width:2}}]}:f.value==="response"?{...D,tooltip:{trigger:"axis",valueFormatter(I){return typeof I=="number"?T(I):String(I??"—")}},yAxis:{type:"value",min:0,axisLabel:{fontSize:11,formatter(I){return T(I)}},splitLine:{lineStyle:{type:"dashed"}}},series:[{name:h.value?.name??"—",type:"line",data:x.map(I=>ie(I.month,h.value?.memberId)),connectNulls:!1,smooth:!0,symbolSize:7,lineStyle:{width:2}},{name:m.value?.name??"—",type:"line",data:x.map(I=>ie(I.month,m.value?.memberId)),connectNulls:!1,smooth:!0,symbolSize:7,lineStyle:{width:2}}]}:{...D,series:[{name:h.value?.name??"—",type:"bar",data:x.map(I=>ae(I.month,h.value?.memberId)),barMaxWidth:24,itemStyle:{borderRadius:[4,4,0,0]}},{name:m.value?.name??"—",type:"bar",data:x.map(I=>ae(I.month,m.value?.memberId)),barMaxWidth:24,itemStyle:{borderRadius:[4,4,0,0]}}]}}),je=k(()=>{const x=Z.value.reduce((D,I)=>!D||I.totalSessions>D.totalSessions?I:D,null),p=Z.value.map(D=>({month:D.month,count:oe(D.month)})).filter(D=>D.count>0).sort((D,I)=>I.count-D.count)[0],z=Z.value.map(D=>({month:D.month,value:Q(D.month)})).filter(D=>D.value!=null).sort((D,I)=>D.value-I.value)[0];return[x&&x.totalSessions>0?{icon:"i-heroicons-chart-bar-square-solid",iconClass:"bg-blue-50 text-blue-500 dark:bg-blue-500/10 dark:text-blue-400",title:s("views.relationship.trajectory.activityPeak"),month:y(x.month),detail:s("views.relationship.trajectory.activityPeakDetail",{count:x.totalSessions})}:null,p?{icon:"i-heroicons-fire-solid",iconClass:"bg-pink-50 text-pink-500 dark:bg-pink-500/10 dark:text-pink-400",title:s("views.relationship.trajectory.iceBreakPeak"),month:y(p.month),detail:s("views.relationship.trajectory.iceBreakPeakDetail",{count:p.count})}:null,z?{icon:"i-heroicons-clock-solid",iconClass:"bg-blue-50 text-blue-500 dark:bg-blue-500/10 dark:text-blue-400",title:s("views.relationship.trajectory.fastestResponse"),month:y(z.month),detail:s("views.relationship.trajectory.fastestResponseDetail",{duration:T(z.value)})}:null].filter(D=>D!=null)});return(x,p)=>{const z=xt,D=ee,I=De;return n(),d("div",{class:F(v.value?"h-full":"")},[v.value?(n(),V(t(fe),{key:0,variant:"page",text:t(s)("common.loading")},null,8,["text"])):(n(),d("div",us,[i.value&&!S.value?(n(),V(t(Me),{key:0,icon:"i-heroicons-heart",title:t(s)("views.relationship.empty.title"),description:t(s)("views.relationship.empty.description")},null,8,["title","description"])):i.value&&S.value?(n(),d(O,{key:1},[e("div",ds,[j(t(Se),{id:"shareable-poster"},{default:J(()=>[e("div",ms,[e("div",gs,[e("div",{class:F(["flex w-fit min-w-0 flex-col items-start text-left",r.value])},[e("div",ps,[e("p",vs,o(u.value),1),e("div",xs,[e("span",hs,o(t(s)("views.relationship.hero.totalSessionsPrefix")),1),e("span",fs,o(i.value.totalSessions),1),e("span",bs,o(t(s)("views.relationship.hero.totalSessionsSuffix")),1)]),e("div",ys,[e("span",ks,o(t(s)("views.relationship.hero.initiativePrefix")),1),e("span",_s,o(l.value>=50?l.value:100-l.value)+"% ",1),e("span",ws,o(t(s)("views.relationship.hero.initiativeByPrefix")),1),e("span",$s,o(l.value>=50?h.value?.name:m.value?.name),1),e("span",Cs,o(t(s)("views.relationship.hero.initiativeBySuffix")),1)])]),e("div",Ss,[e("div",Ms,[e("div",{class:"w-full truncate text-center text-xs font-bold text-gray-500 dark:text-gray-400",title:h.value?.name},o(h.value?.name),9,js),e("div",Ps,o(h.value?.totalInitiateCount),1),e("div",Ts,o(t(s)("views.relationship.hero.initiateTimes")),1)]),p[3]||(p[3]=e("div",{class:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-gray-100 font-black text-[10px] italic text-gray-400 shadow-inner dark:bg-page-dark/80 dark:text-gray-500"}," VS ",-1)),e("div",Is,[e("div",{class:"w-full truncate text-center text-xs font-bold text-gray-500 dark:text-gray-400",title:m.value?.name},o(m.value?.name),9,Rs),e("div",Ds,o(m.value?.totalInitiateCount),1),e("div",qs,o(t(s)("views.relationship.hero.initiateTimes")),1)])])],2)]),i.value.months.length>=2?(n(),d("div",As,[e("div",zs,[e("span",Ls,o(t(s)("views.relationship.trend.title")),1),e("span",Bs,o(t(s)("views.relationship.trend.hint",{name:h.value?.name??""})),1)]),e("div",Ns,[e("div",Vs,[j(t(Ie),{option:c.value,height:200},null,8,["option"])])])])):L("",!0)]),e("div",Fs,[j(ge,{title:t(s)("views.relationship.closerTitle"),"icon-name":"i-heroicons-hand-raised-solid","icon-bg-class":"bg-blue-100 dark:bg-blue-500/20","icon-color-class":"text-blue-600 dark:text-blue-400","left-name":h.value?.name,"left-value":h.value?.totalCloseCount??0,"right-name":m.value?.name,"right-value":m.value?.totalCloseCount??0,"value-class":"text-lg text-blue-600 dark:text-blue-400",description:t(s)("views.relationship.closerHint")},null,8,["title","left-name","left-value","right-name","right-value","description"]),j(ge,{title:t(s)("views.relationship.iceBreaker.title"),"icon-name":"i-heroicons-fire-solid","icon-bg-class":"bg-pink-100 dark:bg-pink-500/20","icon-color-class":"text-pink-600 dark:text-pink-400","left-name":h.value?.name,"left-value":W(h.value?.memberId),"right-name":m.value?.name,"right-value":W(m.value?.memberId),"value-class":"text-lg text-pink-600 dark:text-pink-400",description:t(s)("views.relationship.iceBreaker.hint")},null,8,["title","left-name","left-value","right-name","right-value","description"]),j(ge,{title:t(s)("views.relationship.responseLatency.title"),"icon-name":"i-heroicons-clock-solid","icon-bg-class":"bg-amber-100 dark:bg-amber-500/20","icon-color-class":"text-amber-600 dark:text-amber-400","left-name":h.value?.name,"left-value":le(h.value?.memberId),"right-name":m.value?.name,"right-value":le(m.value?.memberId),"value-class":"text-base text-amber-600 dark:text-amber-400",description:t(s)("views.relationship.responseLatency.hint")},null,8,["title","left-name","left-value","right-name","right-value","description"]),j(ge,{title:t(s)("views.relationship.perseverance.title"),"icon-name":"i-heroicons-arrow-path-solid","icon-bg-class":"bg-purple-100 dark:bg-purple-500/20","icon-color-class":"text-purple-600 dark:text-purple-400","left-name":h.value?.name,"left-value":ne(h.value?.memberId),"right-name":m.value?.name,"right-value":ne(m.value?.memberId),"value-class":"text-lg text-purple-600 dark:text-purple-400",description:w.value},{"header-extra":J(()=>[j(z,{modelValue:b.value,"onUpdate:modelValue":p[0]||(p[0]=B=>b.value=B),items:A,"value-key":"value",size:"xs",class:"relative z-[120] w-16",ui:{content:"z-[121]"},disabled:R.value},null,8,["modelValue","disabled"])]),_:1},8,["title","left-name","left-value","right-name","right-value","description"])]),e("div",Os,[e("div",Us,[j(D,{name:"i-heroicons-chat-bubble-left-right-solid",class:"h-3.5 w-3.5"}),p[4]||(p[4]=e("span",{class:"text-[10px] font-bold uppercase tracking-wider"},"ChatLab",-1))]),e("span",Es,o(t(s)("views.relationship.watermarkReport")),1)])]),_:1})]),j(t(re),{title:t(s)("views.relationship.trajectory.title"),description:t(s)("views.relationship.trajectory.description"),"show-divider":!1},{headerRight:J(()=>[j(t(qe),{modelValue:f.value,"onUpdate:modelValue":p[1]||(p[1]=B=>f.value=B),items:we.value,size:"sm",class:"max-w-[58vw] sm:max-w-none"},null,8,["modelValue","items"])]),default:J(()=>[e("div",Ws,[j(t(Ie),{option:E.value,height:280},null,8,["option"]),je.value.length>0?(n(),d("div",Hs,[e("p",Js,o(t(s)("views.relationship.trajectory.keyMoments")),1),e("div",Gs,[(n(!0),d(O,null,G(je.value,B=>(n(),d("div",{key:B.title,class:"flex min-w-0 items-start gap-3 py-1"},[e("div",{class:F(["flex h-8 w-8 shrink-0 items-center justify-center rounded-lg",B.iconClass])},[j(D,{name:B.icon,class:"h-4 w-4"},null,8,["name"])],2),e("div",Ks,[e("p",Ys,o(B.title),1),e("p",{class:"mt-0.5 truncate text-sm font-semibold text-gray-900 dark:text-white",title:B.month},o(B.month),9,Qs),e("p",Xs,o(B.detail),1)])]))),128))])])):L("",!0),e("div",Zs,[j(I,{color:"neutral",variant:"ghost",size:"sm",icon:g.value?"i-heroicons-chevron-up":"i-heroicons-chevron-down",onClick:p[2]||(p[2]=B=>g.value=!g.value)},{default:J(()=>[$e(o(g.value?t(s)("views.relationship.trajectory.hideAll"):t(s)("views.relationship.trajectory.showAll")),1)]),_:1},8,["icon"])]),g.value?(n(),d("div",en,[e("table",tn,[e("thead",an,[e("tr",null,[e("th",sn,o(t(s)("views.relationship.trajectory.month")),1),f.value==="activity"?(n(),d(O,{key:0},[e("th",nn,o(t(s)("views.relationship.trajectory.conversations")),1),e("th",on,o(t(s)("views.relationship.trajectory.iceBreaks")),1)],64)):(n(),d(O,{key:1},[e("th",rn,o(h.value?.name),1),e("th",ln,o(m.value?.name),1)],64))])]),e("tbody",cn,[(n(!0),d(O,null,G([...Z.value].reverse(),B=>(n(),d("tr",{key:B.month},[e("td",un,o(y(B.month)),1),f.value==="activity"?(n(),d(O,{key:0},[e("td",dn,o(B.totalSessions),1),e("td",mn,o(oe(B.month)),1)],64)):f.value==="response"?(n(),d(O,{key:1},[e("td",gn,o(de(B.month,h.value?.memberId)),1),e("td",pn,o(de(B.month,m.value?.memberId)),1)],64)):(n(),d(O,{key:2},[e("td",vn,o(ae(B.month,h.value?.memberId)),1),e("td",xn,o(ae(B.month,m.value?.memberId)),1)],64))]))),128))])])])):L("",!0)])]),_:1},8,["title","description"])],64)):L("",!0)]))],2)}}}),fn={class:"relative z-10 px-6 pt-8 pb-5 sm:px-8 sm:pt-10"},bn={class:"flex flex-col gap-8 lg:flex-row lg:items-center lg:justify-between lg:gap-12"},yn={class:"min-w-0 flex-1"},kn={class:"text-sm font-medium tracking-wide text-gray-500 dark:text-gray-400"},_n={class:"mt-3 flex flex-wrap items-baseline gap-x-2 gap-y-1"},wn={class:"text-xl font-medium text-gray-700 dark:text-gray-300"},$n={class:"text-4xl font-black tracking-tight text-gray-900 dark:text-white sm:text-5xl"},Cn={class:"mt-3 max-w-xl text-sm leading-6 text-gray-500 dark:text-gray-400"},Sn={class:"w-full min-w-0 lg:max-w-[380px]"},Mn={class:"mb-3 flex items-center justify-between gap-4"},jn={class:"text-xs font-bold tracking-wide text-gray-700 dark:text-gray-300"},Pn={class:"text-[10px] font-medium text-gray-400 dark:text-gray-500"},Tn=["title"],In={class:"mt-2 flex justify-between text-[10px] font-medium text-gray-400 dark:text-gray-500"},Rn={class:"relative z-10 grid grid-cols-2 gap-x-3 gap-y-4 px-4 pt-2 pb-6 sm:px-6 lg:grid-cols-4"},Dn={class:"min-w-0"},qn={class:"mt-1 truncate text-[10px] font-semibold text-gray-600 dark:text-gray-300"},An={class:"mt-0.5 line-clamp-2 text-[9px] leading-4 text-gray-400 dark:text-gray-500"},zn={class:"relative z-10 flex items-center justify-between px-6 pb-4 opacity-40 mix-blend-luminosity dark:opacity-30 sm:px-8 sm:pb-5"},Ln={class:"flex items-center gap-1.5"},Bn={class:"text-[9px] font-medium uppercase tracking-widest"},Nn=K({__name:"JourneyReportCard",props:{stats:{},filtered:{type:Boolean}},setup(_){const s=_,{t:a,locale:$}=Y(),i=k(()=>new Intl.NumberFormat($.value)),v=k(()=>new Intl.DateTimeFormat($.value,{year:"numeric",month:"short",day:"numeric"})),R=k(()=>new Intl.DateTimeFormat($.value,{year:"numeric",month:"short"})),f=k(()=>s.stats.range),g=k(()=>Math.max(...s.stats.months.map(m=>m.messageCount),1)),C=k(()=>({gridTemplateColumns:`repeat(${s.stats.months.length}, minmax(2px, 1fr))`,gap:s.stats.months.length>96?"1px":"2px"})),N=k(()=>{const m=f.value.spanDays;if(m<30)return a("views.journey.duration.days",{count:m});const l=Math.floor(m/365),u=Math.floor(m%365/30);return l>0?u>0?a("views.journey.duration.yearsMonths",{years:l,months:u}):a("views.journey.duration.years",{count:l}):a("views.journey.duration.months",{count:Math.max(1,u)})}),A=k(()=>[{icon:"i-heroicons-sparkles-solid",colorClass:"text-pink-500 dark:text-pink-400",label:a("views.journey.metrics.peakMonth"),value:s.stats.peakMonth?q(s.stats.peakMonth.month):"—",subtext:s.stats.peakMonth?a("views.journey.metrics.messagesAndDays",{messages:M(s.stats.peakMonth.messageCount),days:M(s.stats.peakMonth.activeDays)}):"—"},{icon:"i-heroicons-calendar-days-solid",colorClass:"text-indigo-500 dark:text-indigo-400",label:a("views.journey.metrics.activeMonths"),value:a("views.journey.metrics.monthsRatio",{active:M(f.value.activeMonths),total:M(f.value.spanMonths)}),subtext:a("views.journey.metrics.activeDays",{count:M(f.value.activeDays)})},{icon:"i-heroicons-chat-bubble-left-right-solid",colorClass:"text-blue-500 dark:text-blue-400",label:a("views.journey.metrics.longestConversation"),value:s.stats.longestSegment?w(s.stats.longestSegment.durationSeconds):"—",subtext:s.stats.longestSegment?a("views.journey.metrics.conversationDetail",{date:b(s.stats.longestSegment.startTs),count:M(s.stats.longestSegment.messageCount)}):a("views.journey.metrics.noIndex")},{icon:"i-heroicons-moon-solid",colorClass:"text-violet-500 dark:text-violet-400",label:a("views.journey.metrics.longestSilence"),value:s.stats.longestSilence?w(s.stats.longestSilence.durationSeconds):"—",subtext:s.stats.longestSilence?s.stats.longestSilence.reopenedBy?a("views.journey.metrics.reopenedBy",{name:s.stats.longestSilence.reopenedBy.name}):a("views.journey.metrics.reopened"):s.stats.hasSessionIndex?a("views.journey.metrics.noSilence"):a("views.journey.metrics.noIndex")}]);function M(m){return i.value.format(m)}function b(m){return v.value.format(m*1e3)}function q(m){const[l,u]=m.split("-").map(Number);return R.value.format(new Date(l,u-1,1))}function w(m){const l=Math.max(0,Math.round(m/60));if(l<1)return a("views.journey.duration.lessThanMinute");if(l<60)return a("views.journey.duration.minutes",{count:l});const u=Math.floor(l/60);if(u<24){const y=l%60;return y>0?a("views.journey.duration.hoursMinutes",{hours:u,minutes:y}):a("views.journey.duration.hours",{count:u})}const r=Math.floor(u/24),c=u%24;return c>0?a("views.journey.duration.daysHours",{days:r,hours:c}):a("views.journey.duration.days",{count:r})}function S(m){if(m===0)return"4px";const l=Math.sqrt(m/g.value);return`${Math.round(10+l*50)}px`}function h(m,l){return a("views.journey.hero.monthTooltip",{month:q(m),count:M(l)})}return(m,l)=>{const u=ee;return n(),V(t(Se),null,{default:J(()=>[e("div",fn,[e("div",bn,[e("div",yn,[e("p",kn,o(b(f.value.firstMessageTs))+" – "+o(b(f.value.lastMessageTs)),1),e("div",_n,[e("span",wn,o(t(a)("views.journey.hero.prefix")),1),e("span",$n,o(N.value),1)]),e("p",Cn,o(t(a)(_.filtered?"views.journey.hero.filteredSummary":"views.journey.hero.summary",{activeMonths:M(f.value.activeMonths),activeDays:M(f.value.activeDays)})),1)]),e("div",Sn,[e("div",Mn,[e("p",jn,o(t(a)("views.journey.hero.footprint")),1),e("p",Pn,o(t(a)("views.journey.hero.monthCount",{count:M(f.value.spanMonths)})),1)]),e("div",{class:"grid h-16 items-end overflow-hidden rounded-xl bg-gray-50/80 px-3 py-2 dark:bg-white/[0.035]",style:pe(C.value)},[(n(!0),d(O,null,G(_.stats.months,r=>(n(),d("div",{key:r.month,class:F(["min-w-0 rounded-t-sm",r.messageCount>0?"bg-pink-400/80 dark:bg-pink-400/75":"bg-gray-200 dark:bg-white/10"]),style:pe({height:S(r.messageCount)}),title:h(r.month,r.messageCount)},null,14,Tn))),128))],4),e("div",In,[e("span",null,o(q(_.stats.months[0].month)),1),e("span",null,o(q(_.stats.months[_.stats.months.length-1].month)),1)])])])]),e("div",Rn,[(n(!0),d(O,null,G(A.value,r=>(n(),d("div",{key:r.label,class:"flex min-w-0 items-start gap-2.5 px-2 py-1"},[j(u,{name:r.icon,class:F(["mt-0.5 h-4 w-4 shrink-0",r.colorClass])},null,8,["name","class"]),e("div",Dn,[e("p",{class:F(["truncate text-sm font-black leading-tight tabular-nums",r.colorClass])},o(r.value),3),e("p",qn,o(r.label),1),e("p",An,o(r.subtext),1)])]))),128))]),e("div",zn,[e("div",Ln,[j(u,{name:"i-heroicons-chat-bubble-left-right-solid",class:"h-3.5 w-3.5"}),l[0]||(l[0]=e("span",{class:"text-[10px] font-bold uppercase tracking-wider"},"ChatLab",-1))]),e("span",Bn,o(t(a)("views.journey.watermark")),1)])]),_:1})}}}),Vn={key:1,class:"main-content mx-auto max-w-[920px] space-y-6 p-4 sm:p-6"},Fn={class:"grid gap-4 px-5 pb-6 sm:grid-cols-2 sm:px-6 lg:grid-cols-3"},On={class:"min-w-0"},Un={class:"text-xs font-medium text-gray-500 dark:text-gray-400"},En={class:"mt-0.5 text-sm font-semibold text-gray-900 dark:text-white"},Wn={class:"mt-1 text-xs leading-5 text-gray-500 dark:text-gray-400"},Hn={class:"space-y-3 px-5 pb-5 sm:px-6 sm:pb-6"},Jn={class:"font-mono text-xl font-black tabular-nums text-gray-900 dark:text-white"},Gn={class:"min-w-0"},Kn={class:"h-1.5 overflow-hidden rounded-full bg-gray-200/80 dark:bg-white/10"},Yn={class:"mt-2 text-xs text-gray-500 dark:text-gray-400"},Qn={key:0,class:"text-left sm:min-w-28 sm:text-right"},Xn={class:"text-xs font-semibold text-gray-700 dark:text-gray-300"},Zn={class:"mt-0.5 text-[10px] text-gray-400 dark:text-gray-500"},ei=K({__name:"JourneyView",props:{sessionId:{},timeFilter:{},timeRange:{}},setup(_){const s=_,{t:a,locale:$}=Y(),i=U(null),v=U(!1),R=U(!1),f=k(()=>new Intl.NumberFormat($.value)),g=k(()=>new Intl.DateTimeFormat($.value,{year:"numeric",month:"short",day:"numeric"})),C=k(()=>new Intl.DateTimeFormat($.value,{year:"numeric",month:"short"})),N=k(()=>s.timeRange?s.timeFilter?.startTs!=null&&s.timeFilter.startTs>s.timeRange.start||s.timeFilter?.endTs!=null&&s.timeFilter.endTs<s.timeRange.end:!1),A=k(()=>i.value?.range!=null),M=k(()=>Math.max(...i.value?.years.map(r=>r.messageCount)??[],1)),b=k(()=>{if(!i.value?.range)return[];const r=[{id:"start",order:0,timestamp:i.value.range.firstMessageTs,icon:"i-heroicons-play-solid",iconClass:"bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400",title:a("views.journey.milestones.start"),date:S(i.value.range.firstMessageTs),detail:a("views.journey.milestones.startDetail")}];return i.value.peakMonth&&r.push({id:"peak",order:1,timestamp:m(i.value.peakMonth.month),icon:"i-heroicons-sparkles-solid",iconClass:"bg-pink-50 text-pink-600 dark:bg-pink-500/10 dark:text-pink-400",title:a("views.journey.milestones.peak"),date:h(i.value.peakMonth.month),detail:a("views.journey.milestones.peakDetail",{count:w(i.value.peakMonth.messageCount)})}),i.value.longestSegment&&r.push({id:"conversation",order:2,timestamp:i.value.longestSegment.startTs,icon:"i-heroicons-chat-bubble-left-right-solid",iconClass:"bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",title:a("views.journey.milestones.longestConversation"),date:S(i.value.longestSegment.startTs),detail:a("views.journey.milestones.conversationDetail",{duration:l(i.value.longestSegment.durationSeconds),count:w(i.value.longestSegment.messageCount)})}),i.value.longestSilence&&r.push({id:"silence",order:3,timestamp:i.value.longestSilence.endTs,icon:"i-heroicons-moon-solid",iconClass:"bg-violet-50 text-violet-600 dark:bg-violet-500/10 dark:text-violet-400",title:a("views.journey.milestones.longestSilence"),date:a("views.journey.milestones.silenceRange",{start:S(i.value.longestSilence.startTs),end:S(i.value.longestSilence.endTs)}),detail:i.value.longestSilence.reopenedBy?a("views.journey.milestones.silenceDetailWithMember",{duration:l(i.value.longestSilence.durationSeconds),name:i.value.longestSilence.reopenedBy.name}):a("views.journey.milestones.silenceDetail",{duration:l(i.value.longestSilence.durationSeconds)})}),r.push({id:"end",order:4,timestamp:i.value.range.lastMessageTs,icon:"i-heroicons-flag-solid",iconClass:"bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400",title:a("views.journey.milestones.end"),date:S(i.value.range.lastMessageTs),detail:a(N.value?"views.journey.milestones.filteredEndDetail":"views.journey.milestones.endDetail")}),r.sort((c,y)=>c.timestamp-y.timestamp||c.order-y.order)});X(()=>[s.sessionId,s.timeFilter],()=>q(),{immediate:!0,deep:!0});async function q(){if(s.sessionId){v.value=!0,R.value=!1;try{i.value=await Ce().getJourneyStats(s.sessionId,s.timeFilter)}catch(r){i.value=null,R.value=!0;const c=r instanceof Error?r.message:String(r);console.error("Failed to load journey stats:",r),Ne(`Journey stats load failed: ${c}`,r instanceof Error?r.stack:void 0)}finally{v.value=!1}}}function w(r){return f.value.format(r)}function S(r){return g.value.format(r*1e3)}function h(r){const[c,y]=r.split("-").map(Number);return C.value.format(new Date(c,y-1,1))}function m(r){const[c,y]=r.split("-").map(Number);return Math.floor(new Date(c,y-1,1).getTime()/1e3)}function l(r){const c=Math.max(0,Math.round(r/60));if(c<1)return a("views.journey.duration.lessThanMinute");if(c<60)return a("views.journey.duration.minutes",{count:c});const y=Math.floor(c/60);if(y<24){const H=c%60;return H>0?a("views.journey.duration.hoursMinutes",{hours:y,minutes:H}):a("views.journey.duration.hours",{count:y})}const P=Math.floor(y/24),W=y%24;return W>0?a("views.journey.duration.daysHours",{days:P,hours:W}):a("views.journey.duration.days",{count:P})}function u(r){return r===0?"0%":`${Math.max(4,Math.round(r/M.value*100))}%`}return(r,c)=>{const y=ee;return n(),d("div",{class:F(v.value?"h-full":"")},[v.value?(n(),V(t(fe),{key:0,variant:"page",text:t(a)("common.loading")},null,8,["text"])):(n(),d("div",Vn,[A.value?i.value?(n(),d(O,{key:1},[j(Nn,{stats:i.value,filtered:N.value},null,8,["stats","filtered"]),j(t(re),{title:t(a)("views.journey.milestones.title"),description:t(a)("views.journey.milestones.description"),"show-divider":!1},{default:J(()=>[e("div",Fn,[(n(!0),d(O,null,G(b.value,P=>(n(),d("div",{key:P.id,class:"flex min-w-0 items-start gap-3 py-1"},[e("div",{class:F(["flex h-9 w-9 shrink-0 items-center justify-center rounded-xl",P.iconClass])},[j(y,{name:P.icon,class:"h-4 w-4"},null,8,["name"])],2),e("div",On,[e("p",Un,o(P.title),1),e("p",En,o(P.date),1),e("p",Wn,o(P.detail),1)])]))),128))])]),_:1},8,["title","description"]),j(t(re),{title:t(a)("views.journey.years.title"),description:t(a)("views.journey.years.description"),"show-divider":!1},{default:J(()=>[e("div",Hn,[(n(!0),d(O,null,G(i.value.years,P=>(n(),d("div",{key:P.year,class:"grid gap-3 rounded-xl bg-gray-50/70 px-4 py-3 dark:bg-white/[0.025] sm:grid-cols-[72px_minmax(0,1fr)_auto] sm:items-center"},[e("div",Jn,o(P.year),1),e("div",Gn,[e("div",Kn,[e("div",{class:"h-full rounded-full bg-pink-400 dark:bg-pink-400/80",style:pe({width:u(P.messageCount)})},null,4)]),e("p",Yn,[P.messageCount>0?(n(),d(O,{key:0},[$e(o(t(a)("views.journey.years.summary",{messages:w(P.messageCount),days:w(P.activeDays),months:w(P.activeMonths)})),1)],64)):(n(),d(O,{key:1},[$e(o(t(a)("views.journey.years.quiet")),1)],64))])]),P.messageCount>0?(n(),d("div",Qn,[e("p",Xn,o(h(P.peakMonth)),1),e("p",Zn,o(t(a)("views.journey.years.peak",{count:w(P.peakMonthMessageCount)})),1)])):L("",!0)]))),128))])]),_:1},8,["title","description"])],64)):L("",!0):(n(),V(t(Me),{key:0,icon:"🗓️",text:t(a)(R.value?"views.journey.loadError":"views.journey.empty"),padding:"lg"},null,8,["text"]))]))],2)}}}),ti={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},ai={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},si={class:"p-3 sm:p-5"},ni={class:"p-3 sm:p-5"},ii=K({__name:"PrivateChatOverview",props:{session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(_){const{t:s}=Y(),a=_,{dailyChartData:$}=Ze(()=>a.dailyActivity),i=k(()=>({labels:a.messageTypes.map(f=>ft(f.type,s)),values:a.messageTypes.map(f=>f.count)})),v=k(()=>{if(a.memberActivity.length<2)return null;const g=[...a.memberActivity].sort((N,A)=>A.messageCount-N.messageCount).slice(0,2),C=g[0].messageCount+g[1].messageCount;return{member1:{name:g[0].name,avatar:g[0].avatar,count:g[0].messageCount,percentage:C>0?Math.round(g[0].messageCount/C*100):0},member2:{name:g[1].name,avatar:g[1].avatar,count:g[1].messageCount,percentage:C>0?Math.round(g[1].messageCount/C*100):0},total:C}}),R=k(()=>v.value?{labels:[v.value.member1.name,v.value.member2.name],values:[v.value.member1.count,v.value.member2.count]}:{labels:[],values:[]});return(f,g)=>(n(),d("div",ti,[j(Qe,{session:_.session,"daily-activity":_.dailyActivity,"message-types":_.messageTypes,"hourly-activity":_.hourlyActivity,"time-range":_.timeRange,"filtered-message-count":_.filteredMessageCount,"filtered-member-count":_.filteredMemberCount,"time-filter":_.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),e("div",ai,[j(t(re),{title:t(s)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:J(()=>[e("div",si,[j(t(Te),{data:i.value,height:280},null,8,["data"])])]),_:1},8,["title"]),v.value?(n(),V(t(re),{key:0,title:t(s)("analysis.overview.memberComparison"),"show-divider":!1},{default:J(()=>[e("div",ni,[j(t(Te),{data:R.value,height:280},null,8,["data"])])]),_:1},8,["title"])):L("",!0)]),j(Xe,{"daily-activity":_.dailyActivity,"daily-chart-data":t($)},null,8,["daily-activity","daily-chart-data"])]))}}),oi={class:"flex h-full flex-col"},ri={class:"min-h-0 flex-1 overflow-auto"},li=K({__name:"PrivateChatInsights",props:{sessionId:{},session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(_){const{t:s}=Y(),a=_,$=k(()=>[{id:"overview",label:s("analysis.tabs.overview"),icon:"i-heroicons-squares-2x2"},{id:"relationship",label:s("analysis.subTabs.insights.relationship"),icon:"i-heroicons-heart"},{id:"journey",label:s("analysis.subTabs.insights.journey"),icon:"i-heroicons-map"},{id:"type-analysis",label:s("analysis.subTabs.insights.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:s("analysis.subTabs.insights.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:s("analysis.subTabs.insights.topic"),icon:"i-heroicons-cloud"},{id:"language-preference",label:s("analysis.subTabs.insights.languagePreference"),icon:"i-heroicons-language"}]),i=U("overview"),v=U(null),R=k(()=>({...a.timeFilter,memberId:v.value}));return(f,g)=>(n(),d("div",oi,[j(t(vt),{modelValue:i.value,"onUpdate:modelValue":g[1]||(g[1]=C=>i.value=C),items:$.value,"persist-key":"privateInsightsTab"},{right:J(()=>[i.value==="type-analysis"||i.value==="time-analysis"?(n(),V(et,{key:0,modelValue:v.value,"onUpdate:modelValue":g[0]||(g[0]=C=>v.value=C),"session-id":a.sessionId},null,8,["modelValue","session-id"])):L("",!0)]),_:1},8,["modelValue","items"]),e("div",ri,[j(t(tt),{"active-key":i.value},{default:J(({viewKey:C})=>[C==="overview"?(n(),V(ii,{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"])):C==="type-analysis"?(n(),V(at,{key:1,"session-id":a.sessionId,"session-name":a.session.name,"time-filter":R.value},null,8,["session-id","session-name","time-filter"])):C==="time-analysis"?(n(),V(st,{key:2,"session-id":a.sessionId,"session-name":a.session.name,"time-filter":R.value},null,8,["session-id","session-name","time-filter"])):C==="relationship"?(n(),V(hn,{key:3,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):C==="journey"?(n(),V(ei,{key:4,"session-id":a.sessionId,"time-filter":a.timeFilter,"time-range":a.timeRange},null,8,["session-id","time-filter","time-range"])):C==="topic"?(n(),V(t(nt),{key:5,"session-id":a.sessionId,"time-filter":a.timeFilter,"show-shared-topics":!0},null,8,["session-id","time-filter"])):C==="language-preference"?(n(),V(t(Ya),{key:6,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):L("",!0)]),_:1},8,["active-key"])])]))}}),ci={class:"relative flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},ui=["aria-label"],di={class:"relative flex-1 overflow-y-auto"},mi={class:"h-full"},gi={key:2,class:"flex h-full items-center justify-center"},pi={class:"text-gray-500"},vi={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},xi={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},hi={class:"text-lg font-semibold text-gray-900 dark:text-white"},fi={class:"text-sm text-gray-500 dark:text-gray-400"},bi={class:"flex-1 overflow-hidden"},yi=K({__name:"index",setup(_){const s=We(()=>Ge(()=>import("./MessageExportModal-BozaR9UZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),{t:a}=Y(),$=He(),i=Je(),v=Ve(),R=Re(),f=Fe(),{currentSessionId:g}=Oe(v),C=U(!1),N=U(!1),A=U(!1),M=U(!1),b=U(!1);function q(){R.openChatRecordDrawer({})}const w=[{id:"insights",labelKey:"analysis.tabs.insights",icon:"i-heroicons-presentation-chart-bar"},{id:"ai-chat",labelKey:"analysis.tabs.aiChat",icon:"i-heroicons-chat-bubble-left-ellipsis"},{id:"lab",labelKey:"analysis.tabs.lab",icon:"i-heroicons-beaker"}],S=k(()=>f.debugMode?[...w,{id:"debug",labelKey:"analysis.tabs.debug",icon:"i-heroicons-bug-ant"}]:w),{activeTab:h,isLoading:m,isInitialLoad:l,isSessionSwitching:u,session:r,memberActivity:c,hourlyActivity:y,dailyActivity:P,messageTypes:W,timeRangeValue:H,fullTimeRange:ne,timeFilter:le,initialTimeState:ce,loadAnalysisData:ue,handleTimeRangeInitialized:ie}=it({route:$,router:i,currentSessionId:g,selectSession:v.selectSession,defaultTab:f.defaultSessionTab,validTabIds:S.value.map(Q=>Q.id)});Ke("session-switch-loading",u);const de=k(()=>c.value.reduce((Q,T)=>Q+T.messageCount,0)),ae=k(()=>c.value.filter(Q=>Q.messageCount>0).length),oe=k(()=>{if(!r.value)return null;if(r.value.memberAvatar)return r.value.memberAvatar;if(c.value.length===0)return null;if(r.value.ownerId){const T=c.value.find(Z=>Z.platformId!==r.value?.ownerId);if(T?.avatar)return T.avatar}const Q=c.value.find(T=>T.name===r.value?.name);return Q?.avatar?Q.avatar:(c.value.length,null)});return(Q,T)=>{const Z=De,we=Ee;return n(),d("div",ci,[t(u)?(n(),d("div",{key:0,"data-testid":"private-chat-switch-loading",class:"absolute inset-0 z-20 flex cursor-wait items-center justify-center bg-page-bg dark:bg-page-dark",style:{paddingTop:"var(--titlebar-area-height)"},role:"status","aria-live":"polite","aria-label":t(a)("common.loading")},[j(t(ht))],8,ui)):L("",!0),t(r)?(n(),d(O,{key:1},[j(ot,{"active-tab":t(h),"onUpdate:activeTab":T[0]||(T[0]=E=>Pe(h)?h.value=E:null),"time-range-value":t(H),"onUpdate:timeRangeValue":T[1]||(T[1]=E=>Pe(H)?H.value=E:null),title:t(r).name,avatar:oe.value,icon:"i-heroicons-user","icon-class":"bg-pink-600 text-white dark:bg-pink-500 dark:text-white",tabs:S.value,"current-session-id":t(g),"initial-time-state":t(ce),onOpenIncrementalImport:T[2]||(T[2]=E=>A.value=!0),onOpenMemberManagement:T[3]||(T[3]=E=>b.value=!0),onOpenChatRecord:q,"onUpdate:fullRange":T[4]||(T[4]=E=>ne.value=E),onTimeRangeInitialized:t(ie)},null,8,["active-tab","time-range-value","title","avatar","tabs","current-session-id","initial-time-state","onTimeRangeInitialized"]),e("div",di,[t(m)&&!t(u)?(n(),V(t(fe),{key:0,variant:"overlay",text:t(a)("common.loading")},null,8,["text"])):L("",!0),e("div",mi,[j(Ue,{name:"tab-slide",mode:"out-in"},{default:J(()=>[t(h)==="insights"?(n(),V(li,{key:"insights-"+t(g),"session-id":t(g),session:t(r),"member-activity":t(c),"message-types":t(W),"hourly-activity":t(y),"daily-activity":t(P),"time-range":t(ne),"filtered-message-count":de.value,"filtered-member-count":ae.value,"time-filter":t(le)},null,8,["session-id","session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):t(h)==="ai-chat"?(n(),V(t(ut),{key:"ai-chat-"+t(g),"session-id":t(g),"session-name":t(r).name,"chat-type":"private"},null,8,["session-id","session-name"])):t(h)==="memory"?(n(),V(dt,{key:"memory-"+t(g),"session-id":t(g),"session-name":t(r).name},null,8,["session-id","session-name"])):t(h)==="lab"?(n(),V(mt,{key:"lab-"+t(g),"session-id":t(g),"chat-type":"private"},null,8,["session-id"])):t(h)==="debug"?(n(),V(t(gt),{key:"debug-"+t(g),"session-id":t(g)},null,8,["session-id"])):L("",!0)]),_:1})])]),j(rt,{onOpenIncrementalImport:T[5]||(T[5]=E=>A.value=!0),onOpenSemanticIndex:T[6]||(T[6]=E=>C.value=!0),onOpenMemberManagement:T[7]||(T[7]=E=>b.value=!0),onOpenChatRecord:q,onOpenMessageExport:T[8]||(T[8]=E=>M.value=!0)})],64)):t(l)?L("",!0):(n(),d("div",gi,[e("p",pi,o(t(a)("analysis.privateChat.loadError")),1)])),t(g)&&t(r)?(n(),V(lt,{key:3,modelValue:C.value,"onUpdate:modelValue":T[9]||(T[9]=E=>C.value=E),"session-id":t(g),"message-count":t(r).messageCount},null,8,["modelValue","session-id","message-count"])):L("",!0),t(g)&&t(r)?(n(),V(_t,{key:4,modelValue:N.value,"onUpdate:modelValue":T[10]||(T[10]=E=>N.value=E),"session-id":t(g),"chat-type":"private","auto-check":""},null,8,["modelValue","session-id"])):L("",!0),t(g)&&t(r)?(n(),V(ct,{key:5,modelValue:A.value,"onUpdate:modelValue":T[11]||(T[11]=E=>A.value=E),"session-id":t(g),"session-name":t(r).name,onImported:T[12]||(T[12]=()=>{t(ue)(),t(v).loadSessions()})},null,8,["modelValue","session-id","session-name"])):L("",!0),t(g)?(n(),V(t(s),{key:6,modelValue:M.value,"onUpdate:modelValue":T[13]||(T[13]=E=>M.value=E)},null,8,["modelValue"])):L("",!0),t(g)?(n(),V(we,{key:7,open:b.value,"onUpdate:open":T[15]||(T[15]=E=>b.value=E),ui:{content:"max-w-6xl h-[85vh]"}},{content:J(()=>[e("div",vi,[e("div",xi,[e("div",null,[e("h2",hi,o(t(a)("analysis.tooltip.memberManagement")),1),e("p",fi,o(t(a)("members.private.description",{count:t(r)?.memberCount??0})),1)]),j(Z,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:T[14]||(T[14]=E=>b.value=!1)})]),e("div",bi,[j(pt,{"session-id":t(g),"show-header":!1,"chat-type":"private",onDataChanged:t(ue)},null,8,["session-id","onDataChanged"])])])]),_:1},8,["open"])):L("",!0)])}}}),to=Ye(yi,[["__scopeId","data-v-b200beb8"]]);export{to as default};
@@ -0,0 +1 @@
1
+ import{a,a0 as n,i as o,l as e,D as c,v as r,f as i,o as m,_}from"./index-D5m0P4ss.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(x){const{t}=n();return(d,f)=>{const s=_;return m(),o("main",p,[e("div",l,[c(s,{name:"i-lucide-git-compare-arrows",class:"mx-auto mb-3 h-8 w-8 text-pink-500"}),e("p",null,r(i(t)("insight.reserved")),1)])])}}});export{g as default};