12345678910111213 |
- import{J as r,K as me,r as ee,o,N as n,a as e,O as L,Q as B,V as le,W as P,X as W,Y as b,b as S,w as H,Z as j,c as At,$ as U,a0 as ds,a1 as O,v as V,d as St,a2 as vs,a3 as ie,H as xt,a4 as It,a5 as Ee,a6 as Te,a7 as ps,a8 as Me,a9 as at,aa as be,ab as hs,ac as gs,ad as Q,ae as st,af as ms,ag as fs,ah as ys,ai as Ge,aj as ws,ak as bt,al as _s,am as ks,an as As,ao as bs}from"./vendor-BfKWghV4.js";import{_ as re}from"./index-DG1VedS9.js";const Cs="/assets/logoa-BfYir6wW.png",Ss="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAyBJREFUWEftlkmojmEUx3//naRYmRVRZIiiDCVTRBky3UwLd8MGa4pcQ7F2bdiQTBnLEBaGUrhFkUth4ZZrXLkb7I733J7v9tzXO9zvpVh46u3re9/nnPN/znPO/3/EX16qGt/MZgP++Lon6V4VX78L4G4IOuc/gD+aATNbDewHVkpqrXK3NRszGwucA/ZIOp/2lVkDZvYGGAW8ANbEIMysPzAeGAdMDQ5bwt5WSV8ygvve15JG9xSAo74IjEkCnZfU4IZm1gxsKcnIYUlbw34/uWfzFbAqK5u5XRBS1+TBzWw5cAzoGwVv8/YL/70dh0ffOoBGSZcTPw5ib95VlrahmU0GHkfOr3l9SPK0dy0z8+vYmexdHL2eIulJUcZ6AuA9MDg4acgqpBQQT7mf2tcHSUMqAzAzP9G+4KD0NFHxxVnbJck7KnMV1cBA4GOwOippc0nxdftsZkeSDGwKLwdJ+pRlXwRgYdJmN4LRDEkP6wQwHXgQbBZJupkLIAhL13dnNTPbDhwA2iUNqyd4dBXvgKHADkkHs+J0ZsDMmpKf3TVDSTKzM05CwBlJ6yoCOJ1wwNqET85KWmtJoMiPM2NTEYCTwPqkv49LaqwIwLljI3BK0oYiADVd74wTrsDZ7FDioE3SiIoA3gaC2iapOfcKspyb2Vzgdvg2LU08ZYACMT0K++ZJulNvF7jofA5G1xJGW1IWNP6eMOjViBUHxCIV7ytkwpT4lLJgVP0xG3aJU10ZiJx9jUSolA1T2tEhqV9R5nqiBa6ElyInR0NndCMmM3Pi8YqvsZ+brABaJH3IA1EmxwckLQunuhKJkvtrB+4HxzMD4dTieMClyUT1HLjuhFZXEUZjlE8y8UASi1PeoTrFx8xcS04A84HvXpBZIH7JQCq4j2RefC+jmnDHk8IzMbx/Bjz1JxYdM5sF+PzQB/gBjExfR95MWBskuwVPtVkvSe7Uqby3pG85fOIgXIg8AzVe6dpaWAPxydPOQ6ZqI9ncounZr6NuOS4jnQDAr8jXhKrje2kb5gH5FwAsCCO3Y7wg6VZZ1ioxYRWn9dj8BApzYTC98kdgAAAAAElFTkSuQmCC",xs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABFNJREFUWEe1V12IVVUU/taeh6keegismEwmGCPP3ntyKMpRoUas6A+xKCoxKmkyLdLChwizP0KiVBSnsohoaKQ/kQiL0hSissCXu9eemPGlUIgiCqa3GWav7rqcO4zjnTlnxtuGy92c++1vfXud9XcJJVeWZQ8R0TYiOsTMG0seK4TRTAhr7UUAHgTwFBG1K1ZEBmKMawqZSwKmFeC9f0BEtgO4POd6C8B6AMuY+YeS/IWwhgK894+JiBrUVUkp3WmM+QXAMDN3FbLOAnCWAO/90yLyRs7Rp+/bWruJiHYCeI6ZX50FfyH0DAHe+60i8lJ+6kVmfkH31to9RPSEiPTGGN8pZJ0FYEJAZ2fnkpTSj3mgbY8xPlvncc59CuBuIlodQjg4C/5C6IQA59wHANY2inLn3NcAbgJwCzPrvmmrJsBau4KIjujeGLOkUqn8NNmCc24/gPs0JZm5v2nWAdQEOOc+q0b7XUQ0EEI4K8frMQBgCzO/3lQB3vuVIvJNTnozM9f3E3accxqM2wD0M7MWpqYtstZuIKK9InIkxriyEbO1NiOiCOAPZr60adb1FXjvd4rIJhF5P8b48HTkzrnvASxNKa0aHBz8vFkiyDn3BYDbieiVEMLWGQTUXoMGawihoafmIkoFDANYCGAdM783HYk2JiLS7OgQkUdjjO/OxeDUMypA8oc9zHxsJlLn3JMAdiuGiG4LIXx5riJUwCkA84no3hDCJ0WEzrmjAG5UHDPP2M6LuGoXcc5pa+0WkY0xxr6iQ1mWLTDG/DYJdzUzV4rOTfe7puHH1RS7pypmovkUkWVZttwY810ddy4xoQJ2ENHmqluPMXNPkfH6711dXW1jY2MfAViex8SR8fHx3WVStNpblqrHjTGntQ7cKiKHlMQYc0mlUvmzrIju7u7zR0ZGdhFR7yRv/AXgaDVIf9bCpR8iuiClNK9a8OYBUG8vVryI/FrvBSc1vQBsYOY3ywqo47z316SUeo0xd4hIW4nzmsKPpJTW1QVo79dJZ4iIukMI/5QgaQjJsuw6IlpmjFmQUro4v/WIiPwuIifUM0S0X0QujDFeURPgvb9KRHTm01U6GOci0lr7IRHpwLs5xrhr8kBS98L/JmLSbHlKRBbHGP8+o5A45w4AWJ3frLAyzsYDzrm1AHTq0iq6JoQwUNtPJXHOnQZwWf68KROQ914H2j258fUhhLfrdhuWUmvtcSK6Pk+VfcaYfSGEE7O5sWI7OjpaW1tbtxDRy7nxZ0IIOybzTFvLnXOPA5gozdX0UiGHR0dHvxoaGvp3JjGLFi1a2NLSsoaI7q8OuVfmxp8PIdSElBKgIGttT7WIvAbg2inntGsOikisNrHBlFK7MaadiNpERF/fCgDn5Wf6jTF9lUrleCPRpbpZHkA6LZUu1QAOiMjeGOO3M3mrlIA6gfd+VUrphrx9z8//uOq3VtLhanSfTCmdNMYMhxAOl4mZ/wA1oMF+HdM3kAAAAABJRU5ErkJggg==",Is="/assets/avter-DUp3luTf.png",Ct="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280866862'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='17804'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='32'%20height='32'%3e%3cpath%20d='M474%20152m8%200l60%200q8%200%208%208l0%20704q0%208-8%208l-60%200q-8%200-8-8l0-704q0-8%208-8Z'%20fill='%2381bdfe'%20p-id='17805'%3e%3c/path%3e%3cpath%20d='M168%20474m8%200l672%200q8%200%208%208l0%2060q0%208-8%208l-672%200q-8%200-8-8l0-60q0-8%208-8Z'%20fill='%2381bdfe'%20p-id='17806'%3e%3c/path%3e%3c/svg%3e",Ds="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280492544'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4326'%20width='32'%20height='32'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M442.514286%2073.142857c82.529524%2064.24381%20140.239238%20126.610286%20173.129143%20187.099429%2031.158857%2057.295238%2043.666286%20115.907048%2037.546666%20175.835428l-1.219047%209.996191%206.095238-4.973715a174.055619%20174.055619%200%200%200%2049.249524-69.607619l2.681904-7.411809%207.704381-23.04c82.285714%2055.734857%20123.440762%20150.064762%20123.440762%20283.062857C841.142857%20823.515429%20665.795048%20950.857143%20521.654857%20950.857143c-144.11581%200-308.224-85.333333-334.750476-263.875048-26.550857-178.541714%2083.480381-261.90019%20158.427429-378.197333C395.288381%20231.253333%20427.690667%20152.697905%20442.514286%2073.142857z%20m33.718857%20154.575238c-17.554286%2041.447619-39.424%2082.407619-65.536%20122.904381l-8.313905%2012.653714c-8.411429%2012.507429-17.310476%2024.941714-28.818286%2040.374858l-40.96%2054.467047c-63.634286%2086.869333-80.944762%20136.021333-68.851809%20217.526857%2017.92%20120.441905%20128.341333%20197.778286%20257.901714%20197.778286%20120.905143%200%20241.785905-110.933333%20241.785905-249.344%200-61.976381-9.825524-111.323429-29.110857-149.699048-8.240762%209.411048-17.237333%2018.285714-26.965334%2026.59962l-159.085714%20130.023619%2026.697143-195.364572c6.41219-46.811429-2.462476-92.208762-27.648-138.483809-13.214476-24.30781-31.98781-49.737143-56.368762-76.166096l-8.338286-8.850285-6.387809%2015.579428z'%20p-id='4327'%20fill='%23ff4d4f'%3e%3c/path%3e%3c/svg%3e",Ts="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735287774232'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1465'%20width='16'%20height='16'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M563.8%20512l262.5-312.9c4.4-5.2%200.7-13.1-6.1-13.1h-79.8c-4.7%200-9.2%202.1-12.3%205.7L511.6%20449.8%20295.1%20191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8%200-10.5%207.9-6.1%2013.1L459.4%20512%20196.9%20824.9c-4.4%205.2-0.7%2013.1%206.1%2013.1h79.8c4.7%200%209.2-2.1%2012.3-5.7l216.5-258.1%20216.5%20258.1c3%203.6%207.5%205.7%2012.3%205.7h79.8c6.8%200%2010.5-7.9%206.1-13.1L563.8%20512z'%20p-id='1466'%3e%3c/path%3e%3c/svg%3e",Ms="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280690063'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8850'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='32'%20height='32'%3e%3cpath%20d='M1022.955204%20556.24776c0%20100.19191-81.516572%20181.698249-181.718715%20181.698249l-185.637977%200c-11.2973%200-20.466124-9.168824-20.466124-20.466124%200-11.307533%209.168824-20.466124%2020.466124-20.466124l185.637977%200c77.628008%200%20140.786467-63.148226%20140.786467-140.766001%200-77.423347-62.841234-140.448776-140.203182-140.766001-0.419556%200.030699-0.828878%200.051165-1.248434%200.061398-5.935176%200.153496-11.665691-2.302439-15.666818-6.702656-4.001127-4.41045-5.884011-10.345626-5.157463-16.250102%201.330298-10.806113%201.944282-19.760043%201.944282-28.192086%200-60.763922-23.658839-117.874641-66.617234-160.833035-42.968627-42.958394-100.089579-66.617234-160.843268-66.617234-47.368844%200-92.742241%2014.449084-131.208321%2041.781592-37.616736%2026.738991-65.952084%2063.700811-81.925894%20106.884332-2.425236%206.54916-8.012488%2011.399631-14.827707%2012.893658-6.815219%201.483794-13.927197-0.603751-18.859533-5.536087-19.289322-19.340487-44.943608-29.982872-72.245418-29.982872-56.322773%200-102.146425%2045.813419-102.146425%20102.125959%200%200.317225%200.040932%200.982374%200.092098%201.627057%200.061398%200.920976%200.122797%201.831718%200.153496%202.762927%200.337691%209.465582-5.863545%2017.928325-15.001669%2020.455891-32.356942%208.943696-61.541635%2028.550243-82.181721%2055.217602-21.305235%2027.516704-32.571836%2060.508096-32.571836%2095.41307%200%2086.244246%2070.188572%20156.422585%20156.443052%20156.422585l169.981393%200c11.2973%200%2020.466124%209.15859%2020.466124%2020.466124%200%2011.2973-9.168824%2020.466124-20.466124%2020.466124l-169.981393%200c-108.828614%200-197.3753-88.536452-197.3753-197.354833%200-44.053332%2014.223956-85.712127%2041.126676-120.473839%2022.809495-29.450752%2053.897537-52.086285%2088.710414-64.816215%205.065366-74.322729%2067.149353-133.2447%20142.751215-133.2447%2028.386514%200%2055.504128%208.217149%2078.651314%2023.52581%2019.657712-39.868009%2048.842405-74.169233%2085.497233-100.212376%2045.434795-32.295544%2099.004875-49.354058%20154.918325-49.354058%2071.692832%200%20139.087778%2027.915793%20189.782368%2078.600149%2050.694589%2050.694589%2078.610382%20118.089535%2078.610382%20189.782368%200%203.704368-0.102331%207.470135-0.296759%2011.368932C952.633602%20386.245901%201022.955204%20463.188294%201022.955204%20556.24776z'%20p-id='8851'%3e%3c/path%3e%3cpath%20d='M629.258611%20589.106122c-3.990894%203.990894-9.230222%205.996574-14.46955%205.996574s-10.478655-2.00568-14.46955-5.996574l-67.087954-67.077721%200%20358.689289c0%2011.307533-9.15859%2020.466124-20.466124%2020.466124-11.307533%200-20.466124-9.15859-20.466124-20.466124l0-358.689289-67.087954%2067.077721c-7.992021%207.992021-20.947078%207.992021-28.939099%200s-7.992021-20.957311%200-28.949332l102.023628-102.013395c7.992021-7.992021%2020.947078-7.992021%2028.939099%200l102.023628%20102.013395C637.250632%20568.148811%20637.250632%20581.114101%20629.258611%20589.106122z'%20p-id='8852'%3e%3c/path%3e%3c/svg%3e",Es="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280632344'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7700'%20width='32'%20height='32'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M924.672%20126.976q36.864%2036.864%2054.784%2082.432t17.92%2093.696-17.92%2093.696-54.784%2082.432l-392.192%20389.12q-36.864%2036.864-90.624%2061.44t-113.664%2028.672-122.368-16.384-115.712-73.728q-52.224-52.224-72.704-113.152t-16.384-121.344%2028.16-113.664%2060.928-90.112l348.16-345.088q9.216-9.216%2027.136-4.608t27.136%2013.824q8.192%209.216%2013.312%2027.136t-4.096%2027.136l-347.136%20344.064q-27.648%2027.648-46.08%2064.512t-21.504%2078.848%2012.288%2084.992%2055.296%2082.944q35.84%2035.84%2079.36%2050.688t86.528%2012.288%2081.92-18.944%2066.56-44.032l391.168-388.096q27.648-27.648%2039.424-57.344t11.264-58.88-13.824-56.832-36.864-51.2q-44.032-43.008-98.816-40.448t-110.08%2057.856l-353.28%20351.232q-23.552%2023.552-23.04%2052.224t18.944%2047.104q22.528%2022.528%2051.712%2018.432t47.616-22.528l320.512-318.464q9.216-9.216%2027.136-4.608t27.136%2013.824%2014.336%2027.136-4.096%2027.136l-321.536%20318.464q-36.864%2036.864-70.656%2051.2t-63.488%2012.8-55.296-15.872-47.104-34.816q-17.408-16.384-31.232-41.984t-15.872-56.32%2010.752-65.536%2049.664-70.656q18.432-18.432%2032.768-33.792%2012.288-13.312%2023.04-23.552t11.776-11.264l285.696-284.672q36.864-36.864%2080.384-57.856t88.576-24.064%2088.576%2012.288%2080.384%2052.224z'%20p-id='7701'%20fill='%231e1e1e'%3e%3c/path%3e%3c/svg%3e",$s="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735280808939'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='15804'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='32'%20height='32'%3e%3cpath%20d='M873.8816%20150.1184C973.9264%20250.2656%201024%20370.8928%201024%20512c0%20141.2096-50.0736%20261.8368-150.1184%20361.8816C773.7344%20973.9264%20653.1072%201024%20512%201024c-141.1072%200-261.7344-50.0736-361.8816-150.1184C50.0736%20773.8368%200%20653.2096%200%20512c0-141.1072%2050.0736-261.7344%20150.1184-361.8816C250.2656%2050.0736%20370.8928%200%20512%200%20653.1072%200%20773.7344%2050.0736%20873.8816%20150.1184zM819.712%20526.7456%20507.0848%20211.6608%20192%20526.7456l56.6272%2054.1696%20219.0336-219.0336%200%20477.4912%2078.7456%200L546.4064%20361.8816l219.0336%20219.0336L819.712%20526.7456z'%20p-id='15805'%20fill='%234096ff'%3e%3c/path%3e%3c/svg%3e",Us="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735295375625'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3239'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M659.748571%20245.272381l-51.687619-51.687619-318.439619%20318.585905%20318.415238%20318.268952%2051.712-51.736381-266.703238-266.556952z'%20p-id='3240'%3e%3c/path%3e%3c/svg%3e",zs="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735295357873'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2254'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M605.086476%20512.146286L338.358857%20245.272381l51.760762-51.687619%20318.415238%20318.585905L390.095238%20830.415238l-51.687619-51.736381z'%20p-id='2255'%3e%3c/path%3e%3c/svg%3e",Ps="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735287324782'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1522'%20width='32'%20height='32'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M616.746667%2085.333333L896%20347.904V853.333333a85.333333%2085.333333%200%200%201-85.333333%2085.333334H213.333333a85.333333%2085.333333%200%200%201-85.333333-85.333334V170.666667a85.333333%2085.333333%200%200%201%2085.333333-85.333334h403.413334z%20m244.352%20295.381334L581.802667%20118.186667v177.237333a85.333333%2085.333333%200%200%200%2085.333333%2085.333333h193.962667z%20m-107.264%2076.373333h-49.152l-79.488%20227.157333-109.354667-227.114666h-13.226667l-110.506666%20226.688-77.824-226.688H265.130667l113.749333%20328.192h13.226667l117.12-239.36%20114.858666%20239.36h13.781334l115.968-328.192z'%20fill='%235197e8'%20p-id='1523'%3e%3c/path%3e%3c/svg%3e",Ls="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1735378230313'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3218'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M784%20371.2c-16-25.6-35.2-44.8-44.8-54.4-9.6-9.6-28.8-9.6-38.4%203.2-9.6%209.6-9.6%2028.8%203.2%2038.4%203.2%203.2%206.4%206.4%209.6%209.6%209.6%209.6%2019.2%2022.4%2025.6%2035.2%2057.6%2086.4%2057.6%20179.2-38.4%20278.4-9.6%209.6-9.6%2028.8%200%2038.4%209.6%209.6%2028.8%209.6%2038.4%200C851.2%20598.4%20851.2%20476.8%20784%20371.2z'%20p-id='3219'%3e%3c/path%3e%3cpath%20d='M896%20246.4c-16-25.6-35.2-48-54.4-70.4-9.6-12.8-19.2-19.2-25.6-25.6-9.6-9.6-28.8-9.6-38.4%203.2-9.6%209.6-9.6%2028.8%203.2%2038.4%203.2%203.2%2012.8%209.6%2022.4%2022.4%2016%2019.2%2032%2038.4%2048%2064%20105.6%20160%20105.6%20336-70.4%20518.4-9.6%209.6-9.6%2028.8%200%2038.4%209.6%209.6%2028.8%209.6%2038.4%200C1014.4%20630.4%201014.4%20425.6%20896%20246.4z'%20p-id='3220'%3e%3c/path%3e%3cpath%20d='M483.2%2086.4l-217.6%20185.6-108.8%200c-57.6%200-108.8%2048-108.8%20108.8l0%20272c0%2060.8%2048%20108.8%20108.8%20108.8l96%200%20230.4%20182.4c54.4%2041.6%20105.6%2016%20105.6-51.2l0-755.2C588.8%2067.2%20534.4%2041.6%20483.2%2086.4zM534.4%20889.6c0%2022.4-3.2%2022.4-19.2%209.6l-236.8-185.6c-3.2-3.2-9.6-6.4-16-6.4l-105.6%200c-28.8%200-54.4-25.6-54.4-54.4l0-272c0-28.8%2025.6-54.4%2054.4-54.4l118.4%200c6.4%200%2012.8-3.2%2016-6.4l224-192c16-12.8%2016-12.8%2016%206.4L531.2%20889.6z'%20p-id='3221'%3e%3c/path%3e%3c/svg%3e",Os="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAUVJREFUOE+l0z8snlEUBvCfxSZhwSpYxGCUGJAYLaSxaDcWg4EYJBKaSAxNDR0sLFIWEV2MTTA0MRrEUq0VSyUWMbknuW/y+vJ9n+JON+fPc57znHMa1H6dmMvudfypFtpQB+AALdn/D+MvAaxgGo+4Qx+Gc9IRztCMRmwme8QrMzjHPm7Rij1cZICe9J8o+T6k2N5KgCt8SckbJapN+X9fss1gAR21GAS1IYxUiPgz2Y8z9WcMQu2oPIZuXGILYd/NlSfzFKbQhd/4EUxCg6g4mPT4nCuE8teI0S1mgLXMph0xkVHMJ5FPygBfcYjo+wazmUlgROVvaEuJoUe0uFwAVGthFQM4zQz68QtL1VooBC7GWIj4MfX9KTu/p8SdWiIWADHG7WJBsrG8iUVc3THG4vzFw1sW6d2rXHkrrz6mSoD/Oucnp3ZSV0/fYroAAAAASUVORK5CYII=",Be="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1736386332100'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3350'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M923.04%20689.226667L515.786667%20281.973333a5.333333%205.333333%200%200%200-7.573334%200l-407.253333%20407.253334a5.333333%205.333333%200%200%200%200%207.573333l45.226667%2045.226667a5.333333%205.333333%200%200%200%207.573333%200l354.453333-354.453334a5.333333%205.333333%200%200%201%207.573334%200l354.453333%20354.453334a5.333333%205.333333%200%200%200%207.573333%200l45.226667-45.226667a5.333333%205.333333%200%200%200%200-7.573333z'%20p-id='3351'%3e%3c/path%3e%3c/svg%3e",We="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1736386047967'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2366'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M545.322667%20615.808L248.021333%20329.258667a33.706667%2033.706667%200%200%200-46.421333%200c-12.8%2012.373333-12.8%2032.384%200%2044.714666L544%20704l342.4-330.026667c12.8-12.373333%2012.8-32.341333%200-44.714666a33.706667%2033.706667%200%200%200-46.421333%200l-294.656%20286.549333z'%20fill='%23000000'%20p-id='2367'%3e%3c/path%3e%3c/svg%3e",Vs={class:"model-config"},Gs=["src"],Bs={class:"config-panel"},Ws={class:"model-list"},Ns={class:"model-header"},qs={class:"model-title"},Js={class:"model-form"},Rs={class:"form-item"},Ks={class:"form-item"},Ys={key:0,class:"form-item"},Fs={class:"form-item"},Qs={class:"form-item"},Hs={class:"action-buttons"},js={__name:"index",setup(y){const v=[{label:"主流模型",options:[{label:"ChatGPT",value:"chatgpt",endpoint:"https://api.openai.com/v1"},{label:"Claude",value:"claude",endpoint:"https://api.anthropic.com"},{label:"GPT-4",value:"gpt4",endpoint:"https://api.openai.com/v1"}]},{label:"开源模型",options:[{label:"DeepSeek",value:"deepseek",endpoint:"https://api.deepseek.com/v1"},{label:"Ollama",value:"ollama",endpoint:"http://localhost:11434"},{label:"ChatGLM",value:"chatglm",endpoint:"https://api.zhipuai.cn/v1"}]},{label:"国内模型",options:[{label:"阿里通义千问",value:"qianwen",endpoint:"https://dashscope.aliyuncs.com/api/v1"},{label:"百度文心一言",value:"wenxin",endpoint:"https://aip.baidubce.com/rpc/2.0/ai_custom/v1"},{label:"讯飞星火",value:"spark",endpoint:"https://spark-api.xf-yun.com/v1"}]},{label:"其他",options:[{label:"自定义模型",value:"custom",endpoint:""}]}],m=r(!1),A=r(!1),p=r(!1),_=r([{type:"",key:"",endpoint:"",name:""}]),l=r([]),k=async()=>{p.value=!0;try{const c=(await O.get("https://aiapi.raycos.com.cn/api/models")).data;if(console.log(c),c.code===2e3){const w=c.data.models.map(x=>({label:x.name,value:x.type,description:x.description||""}));l.value=[{label:"API模型",options:w},...v]}}catch(i){console.error("获取模型列表失败:",i),V.error("获取模型列表失败")}finally{p.value=!1}},Y=i=>({chatgpt:"请输入 OpenAI API Key",gpt4:"请输入 OpenAI API Key",claude:"请输入 Anthropic API Key",deepseek:"请输入 DeepSeek API Key",qianwen:"请输入阿里云 API Key",wenxin:"请输入百度 API Key",spark:"请输入讯飞 API Key",chatglm:"请输入智谱 API Key",ollama:"可选:请输入访问密钥",custom:"请输入 API Key"})[i]||"请输入 API Key",R=(i,c)=>{const w=_.value[c],x=l.value.flatMap(J=>J.options).find(J=>J.value===i);x&&(w.endpoint=x.endpoint,w.name=x.label)},M=()=>{m.value=!m.value},f=()=>{_.value.push({type:"",key:"",endpoint:"",name:""})},g=i=>{if(_.value.length===1){V.warning("至少保留一个模型配置");return}_.value.splice(i,1)},I=i=>!(!i.type||!i.key||i.type==="ollama"&&!i.endpoint||i.type==="custom"&&(!i.name||!i.endpoint)),D=async()=>{if(_.value.some(c=>!I(c))){V.error("请填写完整的模型信息");return}A.value=!0;try{localStorage.setItem("modelConfig",JSON.stringify(_.value)),V.success("配置保存成功")}catch{V.error("配置保存失败")}finally{A.value=!1}},d=()=>{const i=localStorage.getItem("modelConfig");i&&(_.value=JSON.parse(i))};return me(async()=>{d(),await k()}),(i,c)=>{const w=ee("a-button"),x=ee("a-select-option"),J=ee("a-select-opt-group"),ce=ee("a-select"),$e=ee("a-input-password"),fe=ee("a-input");return o(),n("div",Vs,[e("div",{class:"config-header",onClick:M},[c[0]||(c[0]=e("img",{src:Os,alt:"setting",class:"config-icon"},null,-1)),c[1]||(c[1]=e("span",null,"模型配置",-1)),e("img",{src:m.value?L(Be):L(We),alt:"toggle",class:"toggle-icon"},null,8,Gs)]),B(e("div",Bs,[e("div",Ws,[(o(!0),n(P,null,W(_.value,(N,te)=>(o(),n("div",{key:te,class:"model-item"},[e("div",Ns,[e("span",qs,"模型 "+b(te+1),1),S(w,{type:"link",danger:"",size:"small",onClick:z=>g(te)},{default:H(()=>c[2]||(c[2]=[j("删除")])),_:2},1032,["onClick"])]),e("div",Js,[e("div",Rs,[c[3]||(c[3]=e("label",null,"选择模型",-1)),S(ce,{style:{width:"200px"},value:N.type,"onUpdate:value":z=>N.type=z,placeholder:"请选择模型",onChange:z=>R(z,te)},{default:H(()=>[(o(!0),n(P,null,W(l.value,z=>(o(),At(J,{key:z.label,label:z.label},{default:H(()=>[(o(!0),n(P,null,W(z.options,ue=>(o(),At(x,{key:ue.value,value:ue.value},{default:H(()=>[j(b(ue.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["label"]))),128))]),_:2},1032,["value","onUpdate:value","onChange"])]),N.type?(o(),n(P,{key:0},[e("div",Ks,[c[4]||(c[4]=e("label",null,"API Key",-1)),S($e,{value:N.key,"onUpdate:value":z=>N.key=z,placeholder:Y(N.type)},null,8,["value","onUpdate:value","placeholder"])]),N.type==="ollama"?(o(),n("div",Ys,[c[5]||(c[5]=e("label",null,"服务器地址",-1)),S(fe,{value:N.endpoint,"onUpdate:value":z=>N.endpoint=z,placeholder:"例如: http://localhost:11434"},null,8,["value","onUpdate:value"])])):U("",!0),N.type==="custom"?(o(),n(P,{key:1},[e("div",Fs,[c[6]||(c[6]=e("label",null,"模型名称",-1)),S(fe,{value:N.name,"onUpdate:value":z=>N.name=z,placeholder:"请输入自定义模型名称"},null,8,["value","onUpdate:value"])]),e("div",Qs,[c[7]||(c[7]=e("label",null,"服务器地址",-1)),S(fe,{value:N.endpoint,"onUpdate:value":z=>N.endpoint=z,placeholder:"请输入API地址"},null,8,["value","onUpdate:value"])])],64)):U("",!0)],64)):U("",!0)])]))),128))]),S(w,{type:"dashed",block:"",class:"add-model-btn",onClick:f},{default:H(()=>[S(L(ds)),c[8]||(c[8]=j(" 添加模型 "))]),_:1}),e("div",Hs,[S(w,{type:"primary",loading:A.value,onClick:D},{default:H(()=>c[9]||(c[9]=[j(" 保存配置 ")])),_:1},8,["loading"])])],512),[[le,m.value]])])}}},Xs=re(js,[["__scopeId","data-v-e8e9ff38"]]),Zs=St({name:"SearchResults",components:{FileSearchOutlined:vs},props:{searchResults:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},total:{type:Number,default:0},message:{type:String,default:""},enableWebSearch:{type:Boolean,default:!0}},emits:["update:total","update:enableWebSearch"],setup(y,{emit:v}){const m=r([]),A=r(!1),p=r(""),_=r(!1),l=r(y.total),k=r(y.enableWebSearch);ie(()=>y.total,g=>{l.value=g}),ie(()=>y.searchResults,g=>{m.value=g,A.value=m.value.length<y.total},{immediate:!0}),ie(()=>y.message,g=>{g&&y.enableWebSearch&&(p.value=g)}),ie(()=>y.enableWebSearch,g=>{k.value=g,g||M()});const Y=g=>xt(g).format("YYYY-MM-DD"),R=async()=>{if(!(!p.value.trim()||_.value||!y.enableWebSearch)){_.value=!0;try{const g=await O.post("https://aiapi.raycos.com.cn/api/web-search-results/",{query:p.value,num_results:20,page:1,page_size:20,engine:"bing"});console.log("API Response:",g.data),g.data&&g.data.code===200&&(m.value=g.data.data.result||[],console.log("Total Results:",g.data.data.total),l.value=g.data.data.total||0,v("update:total",g.data.data.total||0))}catch(g){console.error("Web search failed:",g),m.value=[],l.value=0,v("update:total",0)}finally{_.value=!1}}},M=()=>{p.value="",m.value=[],l.value=0,v("update:total",0)},f=()=>{k.value=!k.value,v("update:enableWebSearch",k.value)};return{displayResults:m,loading:y.loading,total:l,hasMore:A,formatDate:Y,searchQuery:p,isSearching:_,handleSearch:R,clearSearch:M,isSearchEnabled:k,toggleSearch:f}}}),ea={class:"search-results"},ta={key:0,class:"results-list"},sa={class:"result-title"},aa=["href"],la={class:"result-url"},oa={class:"result-snippet"},na={class:"result-meta"},ia={class:"result-date"},ra={class:"result-source"},ca={key:0,class:"loading-more",ref:"loadingTrigger"},ua={key:0,class:"loading-spinner"},da={key:1},va={key:1,class:"no-results"};function pa(y,v,m,A,p,_){return o(),n("div",ea,[e("div",{class:"results-container",ref:"resultsContainer",onScroll:v[0]||(v[0]=(...l)=>y.handleScroll&&y.handleScroll(...l))},[y.displayResults.length>0?(o(),n("div",ta,[(o(!0),n(P,null,W(y.displayResults,(l,k)=>(o(),n("div",{key:k,class:"result-item"},[e("h3",sa,[e("a",{href:l.link,target:"_blank",rel:"noopener noreferrer"},b(l.title),9,aa)]),e("p",la,b(l.link),1),e("p",oa,b(l.snippet),1),e("div",na,[e("span",ia,b(y.formatDate(l.date)),1),e("span",ra,b(l.source),1)])]))),128)),y.hasMore?(o(),n("div",ca,[y.loading?(o(),n("div",ua)):(o(),n("span",da,"Loading more results..."))],512)):U("",!0)])):(o(),n("div",va))],544)])}const ha=re(Zs,[["render",pa],["__scopeId","data-v-23d582dd"]]),ga="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVZJREFUOE+l079Ll1EUBvDP/b73G9HeIISDUxiOtQTiEGFOCipE0BiELQ0KgoOgk/Rjk5zdGnL2L2hyMRIHocEpaGgsvfrq1feFF339Wni3e885z3mec58T3PCEXvWRJSwkrsy7MhB5h6cYqgEiH/EnMV83bgUoWA086vDymO9NBpEVPEsMZZBLAJHPGEhMYD9SZoBb3D9gNxdFFjGXuBMKpgJTjVnk4if4XSWfART8CNxO9FXv2yUrIXcoma4BjviCo/peM6iKPmTWibeRkVMyy2cAvaZ8IX4vsl/l343s/C9A1l837I9stUnYOP371Cahy0zJTGKw4EXgdejyqjwfWn0G07m+X80hVnlrGE1sFnzqsHvpGwvWAo8Lxv+yV1Puso6vh6x2eYPZQx72MtJwh+kWI2UPTHZ4fsC366w8igcNK2dp7xNj+NnqxOZy3WiZ/nXLTwAE1GVpm7M6FwAAAABJRU5ErkJggg==",ma={class:"voice-config"},fa=["src"],ya={class:"config-panel"},wa={class:"config-item"},_a={class:"voice-select-container"},ka=["value"],Aa={class:"config-item"},ba={class:"slider-container"},Ca={class:"slider-value"},Sa={class:"config-item",style:{display:"flex","justify-content":"space-around"}},xa=["disabled"],Ia=["disabled"],Da={__name:"index",setup(y){const v=It(),m=r(!1),A=r([]),p=Ee({role:"",speed:1,language:"zh"}),_=r(!1),l=r(!1),k=r(null),Y=async()=>{try{const i=(await O.get("https://aiapi.raycos.com.cn/chatbot/current_voice_config")).data.data;if(console.log("Current config:",i),i&&i.voice_name&&A.value.length>0){const c=A.value.find(w=>w.name===i.voice_name);console.log("Matched voice:",c),c&&(p.role=c.id,p.speed=i.speed||1,p.language=c.language,g())}}catch(d){console.error("获取当前语音配置失败:",d)}},R=async()=>{try{const i=(await O.get("https://aiapi.raycos.com.cn/chatbot/list_voices")).data.data.voices;A.value=Object.values(i).flat(),console.log("Voice list:",A.value),await Y()}catch(d){console.error("获取语音列表失败:",d)}},M=d=>({"zh-cn":"中文","en-us":"英文","ja-jp":"日语","ko-kr":"韩语"})[d]||d;me(()=>{R()});const f=()=>{m.value=!m.value},g=()=>{v.commit("updateVoiceConfig",{...p})},I=async()=>{if(p.role){_.value=!0;try{const d=new FormData;d.append("voice_id",p.role),await O.post("https://aiapi.raycos.com.cn/switch_voice_config",d,{headers:{"Content-Type":"multipart/form-data"}})}catch(d){console.error("切换语音失败:",d),alert("语音切换失败")}finally{_.value=!1}}},D=async()=>{if(!(!p.role||l.value))try{l.value=!0;const i=(await O.get(`https://aiapi.raycos.com.cn/get_voice_preview?voice_id=${p.role}`)).data;if(i.code!==200)throw new Error(i.msg||"获取音频失败");k.value&&(k.value.pause(),k.value=null);let c;if(i.audio&&i.audio.startsWith("data:audio"))c=new Audio(i.audio);else if(i.audio_url){const x=i.audio_url.startsWith("http")?i.audio_url:`https://aiapi.raycos.com.cn${i.audio_url}`;c=new Audio(x)}else throw new Error("无效的音频数据");k.value=c,c.onended=()=>{l.value=!1,k.value=null},c.onerror=w=>{console.error("音频播放失败:",w),l.value=!1,k.value=null,alert("试听失败")},c.oncanplaythrough=async()=>{try{await c.play()}catch(w){console.error("播放音频失败:",w),l.value=!1,k.value=null,alert("播放失败")}}}catch(d){console.error("试听失败:",d),l.value=!1,alert(d.message||"试听失败")}};return Te(()=>{k.value&&(k.value.pause(),k.value=null)}),(d,i)=>(o(),n("div",ma,[e("div",{class:"config-header",onClick:f},[i[2]||(i[2]=e("img",{src:ga,alt:"voice",class:"config-icon"},null,-1)),i[3]||(i[3]=e("span",null,"语音配置",-1)),e("img",{src:m.value?L(Be):L(We),alt:"toggle",class:"toggle-icon"},null,8,fa)]),B(e("div",ya,[e("div",wa,[i[4]||(i[4]=e("label",null,"语音角色",-1)),e("div",_a,[B(e("select",{"onUpdate:modelValue":i[0]||(i[0]=c=>p.role=c),onChange:g},[(o(!0),n(P,null,W(A.value,c=>(o(),n("option",{key:c.id,value:c.id},b(c.name+"_"+c.gender)+" ("+b(M(c.language))+") ",9,ka))),128))],544),[[ps,p.role]])])]),e("div",Aa,[i[5]||(i[5]=e("label",null,"语速",-1)),e("div",ba,[B(e("input",{type:"range","onUpdate:modelValue":i[1]||(i[1]=c=>p.speed=c),min:"0.5",max:"2",step:"0.1",onChange:g},null,544),[[Me,p.speed]]),e("span",Ca,b(p.speed)+"x",1)])]),e("div",Sa,[e("button",{class:"preview-button",onClick:D,disabled:l.value},b(l.value?"播放中...":"试听"),9,xa),e("button",{class:"switch-button",onClick:I,disabled:_.value},b(_.value?"切换中...":"切换语音"),9,Ia)])],512),[[le,m.value]])]))}},Ta=re(Da,[["__scopeId","data-v-8bc2e758"]]),Ma="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='64%2064%20896%20896'%20width='16'%20height='16'%20fill='currentColor'%3e%3cpath%20d='M832%2064H192c-17.7%200-32%2014.3-32%2032v832c0%2017.7%2014.3%2032%2032%2032h640c17.7%200%2032-14.3%2032-32V96c0-17.7-14.3-32-32-32zm-260%2072h96v209.9L621.5%20312%20572%20347.4V136zm220%20752H232V136h280v296.9c0%203.3%201%206.6%203%209.3a15.9%2015.9%200%200%200%2022.3%203.7l83.8-59.9%2081.4%2059.4c2.7%202%206%203.1%209.3%203.1%208.8%200%2016-7.2%2016-16V136h64v752z'/%3e%3c/svg%3e",Ea={class:"knowledge-config"},$a=["src"],Ua={class:"config-panel"},za={class:"knowledge-list"},Pa={class:"group-header"},La={class:"checkbox-list"},Oa={class:"item-desc"},Va={class:"action-buttons"},Ga={__name:"index",setup(y){const v=r([]),m=r(!1),A=r(!1),p=Ee({product:[],tech:[],industry:[]}),_=()=>{m.value=!m.value},l=async()=>{A.value=!0;try{localStorage.setItem("knowledgeConfig",JSON.stringify(p)),V.success("知识库配置保存成功")}catch{V.error("知识库配置保存失败")}finally{A.value=!1}},k=()=>{const M=localStorage.getItem("knowledgeConfig");if(M){const f=JSON.parse(M);Object.keys(f).forEach(g=>{p[g]=f[g]})}},Y=async M=>{try{const f=new URLSearchParams;return f.append("page",1),f.append("kb_id",M),f.append("pageSize",9999),(await O.post("https://aiapi.raycos.com.cn/docType/selectTypeList",f,{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`JWT ${localStorage.getItem("token")}`}})).data.data||[]}catch(f){return console.error("获取知识库子项失败:",f),[]}},R=async()=>{try{const f=await O.post("https://aiapi.raycos.com.cn/kbm/selectBucketInfo",{user_id:2},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}}),g=await Promise.all(f.data.data.map(async I=>{const D=await Y(I.id);return console.log(D),{label:I.name,key:I.id,items:D.map(d=>({label:d.name,value:d.id}))}}));v.value=g,v.value.forEach(I=>{p[I.key]||(p[I.key]=[])})}catch(M){V.error("获取知识库信息失败"),console.error("获取知识库信息失败:",M)}};return me(async()=>{await R(),k()}),(M,f)=>{const g=ee("a-checkbox"),I=ee("a-checkbox-group"),D=ee("a-button");return o(),n("div",Ea,[e("div",{class:"config-header",onClick:_},[f[0]||(f[0]=e("img",{src:Ma,alt:"knowledge",class:"config-icon"},null,-1)),f[1]||(f[1]=e("span",null,"知识库配置",-1)),e("img",{src:m.value?L(Be):L(We),alt:"toggle",class:"toggle-icon"},null,8,$a)]),B(e("div",Ua,[e("div",za,[(o(!0),n(P,null,W(v.value,d=>(o(),n("div",{class:"knowledge-group",key:d.label},[e("div",Pa,b(d.label),1),e("div",La,[S(I,{value:p[d.key],"onUpdate:value":i=>p[d.key]=i},{default:H(()=>[(o(!0),n(P,null,W(d.items,i=>(o(),n("div",{key:i.value,class:"checkbox-item"},[S(g,{value:i.value},{default:H(()=>[j(b(i.label)+" ",1),e("span",Oa,b(i.description),1)]),_:2},1032,["value"])]))),128))]),_:2},1032,["value","onUpdate:value"])])]))),128))]),e("div",Va,[S(D,{type:"primary",loading:A.value,onClick:l},{default:H(()=>f[2]||(f[2]=[j(" 保存配置 ")])),_:1},8,["loading"])])],512),[[le,m.value]])])}}},Ba=re(Ga,[["__scopeId","data-v-6b9363c0"]]),Wa="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACVUlEQVR4AayTPUhbURTHX7J06GAttJTSyaGl7yYvCbWDUErTQpdOBXUqtlu3tlD3BkK7VBBKdfBjEkFQFPwYIoIIOviFw8sXDhJx0cUtEMyXvxPN4768hCAYzp977v+c87/n3HfjN27511bQsqy7wWAwHggEfofD4Xvtzm8pGIlEHiPyr1KpnCNy4fP5CqVS6QxuPBQKPYVrah5BCp6DqWKxmKHiJJlM3rFtO24D8eEOy+XyLjlLpmm+Yu8yR5CxekhaJrpON9sUd4C/7A34GPgmvnCgg5yE3++fg9/nWnolJnAEq9XqDMQCyY/o5j9+zSiIMXaOzX3xWWsmOZLLZpT4kFLKxDccQTadJEyyuoxOesEOSBF4AFx2XdOZz+ePJKALFmj9mZAN+IGYzQTDdJJoiBlKKZPYaS6XK0hMFzyh4KWQOhhtjX0cjKTT6UVWl3FYD3e5Xyd1wU1IjyBcO+umw4N6ki64AtkNbmoWXcr91uocQS53FeYhz6eLtZl18ZXf6AHu/Al7izebZq2ZIyg7Wl8EQ+I3wVu4X8Ax7vw7m0Q2m5VnhWu4no2RSqV+wn7k5HesjTbBFNE6ySSv8Qf510gN7pW5OhSK+/jEyWtKKef1Cw/+MPI6q4HYCybZIPdrJpM5Fq4OjyDPZJrEfjBLYZ8k0lkM+EAUTsT24AfIHWN1mUdQoiTOIthPF+N0NSicgK4/w83jDyA+xeqxpoKSJaKM/h7/A6J7YItDvsD1tRIj1/1RhNDBP2OH4ihdTYM58YXTcxr9lh3qiXz9YYHOtfIvAQAA//8HOb/RAAAABklEQVQDAB+FDDjdUQJeAAAAAElFTkSuQmCC",Na={class:"permission-config"},qa=["src"],Ja={class:"config-panel"},Ra={class:"permission-list"},Ka={class:"group-header"},Ya={class:"checkbox-list"},Fa={class:"item-desc"},Qa={class:"action-buttons"},Ha={__name:"index",setup(y){const v=f=>!l[f.key]||!f.items||f.items.length===0?!1:f.items.every(g=>l[f.key].includes(g.value)),m=(f,g)=>{const I=g.target.checked;l[f.key]||(l[f.key]=[]),I?l[f.key]=f.items.map(D=>D.value):l[f.key]=[]},A=r([]),p=r(!1),_=r(!1),l=Ee({}),k=()=>{p.value=!p.value},Y=async()=>{_.value=!0;try{localStorage.setItem("permissionConfig",JSON.stringify(l)),V.success("权限配置保存成功")}catch{V.error("权限配置保存失败")}finally{_.value=!1}},R=()=>{const f=localStorage.getItem("permissionConfig");if(f){const g=JSON.parse(f);Object.keys(g).forEach(I=>{l[I]=g[I]})}},M=async()=>{try{const f=await O.get("https://backend.qicai321.com/api/system/role_menu_button_permission/get_role_menu/?roleId=5",{headers:{authorization:"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzg2Njg0Nzk0LCJpYXQiOjE3NTUxNDg3OTQsImp0aSI6IjdlYTI0Yzg2N2IzNTQ5NDA5Y2RlZGM1NGI5MGMxYWQzIiwidXNlcl9pZCI6MX0._yM1AMRyxVyf2J2-Kz9PlAErkXhEV5bfz9hBVkIg6OQ"}});console.log(f);const D=(d=>{const i={};d.forEach(w=>{i[w.id]={label:w.name,value:w.id,is_catalog:w.is_catalog,isCheck:w.isCheck,children:[]}});const c=[];return d.forEach(w=>{const x=i[w.id];if(w.parent===null)c.push(x);else{const J=i[w.parent];J&&J.children.push(x)}}),c})(f.data.data).map(d=>({label:d.label,key:d.value,is_catalog:d.is_catalog,value:d.isCheck,items:d.children.map(i=>({label:i.label,value:i.value,is_catalog:i.is_catalog,isCheck:i.isCheck}))}));A.value=D,A.value.forEach(d=>{l[d.key]||(l[d.key]=[])})}catch(f){V.error("获取权限信息失败"),console.error("获取权限信息失败:",f)}};return me(async()=>{await M(),R()}),(f,g)=>{const I=ee("a-checkbox"),D=ee("a-checkbox-group"),d=ee("a-button");return o(),n("div",Na,[e("div",{class:"config-header",onClick:k},[g[0]||(g[0]=e("img",{src:Wa,alt:"permission",class:"config-icon"},null,-1)),g[1]||(g[1]=e("span",null,"权限配置",-1)),e("img",{src:p.value?L(Be):L(We),alt:"toggle",class:"toggle-icon"},null,8,qa)]),B(e("div",Ja,[e("div",Ra,[(o(!0),n(P,null,W(A.value,i=>(o(),n("div",{class:"permission-group",key:i.label},[e("div",Ka,[S(I,{value:i.value,checked:v(i),onChange:c=>m(i,c)},{default:H(()=>[j(b(i.label),1)]),_:2},1032,["value","checked","onChange"])]),e("div",Ya,[S(D,{value:l[i.key],"onUpdate:value":c=>l[i.key]=c},{default:H(()=>[(o(!0),n(P,null,W(i.items,c=>(o(),n("div",{key:c.value,class:"checkbox-item"},[S(I,{value:c.value},{default:H(()=>[j(b(c.label)+" ",1),e("span",Fa,b(c.description),1)]),_:2},1032,["value"])]))),128))]),_:2},1032,["value","onUpdate:value"])])]))),128))]),e("div",Qa,[S(d,{type:"primary",loading:_.value,onClick:Y},{default:H(()=>g[2]||(g[2]=[j(" 保存配置 ")])),_:1},8,["loading"])])],512),[[le,p.value]])])}}},ja=re(Ha,[["__scopeId","data-v-85b69715"]]),Xa=St({name:"KnowledgeResults",props:{searchResults:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},total:{type:Number,default:0},message:{type:String,default:""},searchType:{type:String,default:"remote",validator:y=>["remote","local"].includes(y)},showTranslation:{type:Boolean,default:!0}},emits:["update:enableSearch","search","translate"],setup(y,{emit:v}){const m=r(""),A=r(!1),p=r(!1),_=r([]),l=r(1),k=r(20),Y=at(()=>y.searchType==="local"?"搜索本地知识库...":"搜索远程知识库...");ie(()=>y.searchResults,d=>{console.log("New search results:",d),_.value=d.map(i=>({...i,translation:i.translation||""}))}),ie(()=>y.message,d=>{d&&(m.value=d,R())});const R=async()=>{if(!(!m.value.trim()||A.value)){A.value=!0,l.value=1;try{v("search",{query:m.value,page:l.value,pageSize:k.value,type:y.searchType,needTranslation:y.showTranslation})}finally{A.value=!1}}},M=async()=>{if(!(A.value||!p.value)){A.value=!0,l.value+=1;try{v("search",{query:m.value,page:l.value,pageSize:k.value,type:y.searchType})}finally{A.value=!1}}};return{searchQuery:m,isSearching:A,displayResults:_,hasMore:p,handleSearch:R,clearSearch:()=>{m.value="",_.value=[],l.value=1,v("update:enableSearch",!1)},formatDate:d=>xt(d).format("YYYY-MM-DD HH:mm"),handleScroll:d=>{const{scrollTop:i,scrollHeight:c,clientHeight:w}=d.target;c-i-w<50&&!A.value&&p.value&&M()},placeholder:Y,formatContent:d=>{if(!d)return"";const i=m.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return d.replace(new RegExp(i,"gi"),c=>`<span class="highlight">${c}</span>`)}}}}),Za={class:"knowledge-results"},el={class:"result-title"},tl=["href"],sl=["innerHTML"],al={key:0,class:"result-translation"},ll={class:"translation-content"},ol={class:"result-meta"},nl={class:"result-source"},il={class:"result-date"},rl={key:0,class:"load-more"},cl={key:1,class:"loading-state"},ul={key:2,class:"empty-state"};function dl(y,v,m,A,p,_){return o(),n("div",Za,[v[4]||(v[4]=e("div",{class:"search-box"},null,-1)),!y.loading&&y.searchResults.length>0?(o(),n("div",{key:0,class:"results-container",ref:"resultsContainer",onScroll:v[0]||(v[0]=(...l)=>y.handleScroll&&y.handleScroll(...l))},[(o(!0),n(P,null,W(y.displayResults,l=>(o(),n("div",{key:l.id,class:"result-item"},[e("h3",el,[e("a",{href:l.link,target:"_blank",rel:"noopener noreferrer"},b(l.title),9,tl)]),e("div",{class:"result-content",innerHTML:y.formatContent(l.content)},null,8,sl),l.translation?(o(),n("div",al,[v[1]||(v[1]=e("span",{class:"translation-label"},"中文释义:",-1)),e("span",ll,b(l.translation),1)])):U("",!0),e("div",ol,[e("span",nl,"来源: "+b(l.source||"知识库"),1),e("span",il,b(y.formatDate(l.date)),1)])]))),128)),y.hasMore?(o(),n("div",rl,v[2]||(v[2]=[e("div",{class:"loading-spinner"},null,-1),e("span",null,"加载更多...",-1)]))):U("",!0)],544)):y.loading?(o(),n("div",cl,v[3]||(v[3]=[e("div",{class:"loading-spinner"},null,-1),e("p",null,"正在搜索...",-1)]))):(o(),n("div",ul))])}const vl=re(Xa,[["render",dl],["__scopeId","data-v-c3cce166"]]),pl={name:"ChangePasswordDialog",props:{visible:{type:Boolean,default:!1}},data(){return{formData:{old_password:"",new_password:"",confirm_password:""}}},methods:{closeDialog(){this.$emit("update:visible",!1),this.resetForm()},resetForm(){this.formData={old_password:"",new_password:"",confirm_password:""}},async handleSubmit(){var y,v;if(!this.formData.old_password){this.$message.error("请输入原密码");return}if(!this.formData.new_password){this.$message.error("请输入新密码");return}if(!this.formData.confirm_password){this.$message.error("请确认新密码");return}if(this.formData.new_password!==this.formData.confirm_password){this.$message.error("两次输入的新密码不一致");return}try{const m=await O.post("https://aiapi.raycos.com.cn/user/change_password",{old_password:this.formData.old_password,new_password:this.formData.new_password,confirm_password:this.formData.confirm_password},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});if(m.data.code===200){this.$message.success("密码修改成功"),this.closeDialog();try{await O.post("https://aiapi.raycos.com.cn/user/logout",{},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}}),localStorage.removeItem("token"),this.$router.push("/login")}catch(A){console.error("退出登录失败:",A),localStorage.removeItem("token"),this.$router.push("/login")}}else this.$message.error(m.data.message||"密码修改失败")}catch(m){this.$message.error("密码修改失败:"+(((v=(y=m.response)==null?void 0:y.data)==null?void 0:v.message)||m.message))}}}},hl={class:"dialog-content"},gl={class:"dialog-header"},ml={class:"dialog-body"},fl={class:"form-group"},yl={class:"form-group"},wl={class:"form-group"},_l={class:"dialog-footer"};function kl(y,v,m,A,p,_){return m.visible?(o(),n("div",{key:0,class:"dialog-overlay",onClick:v[6]||(v[6]=be((...l)=>_.closeDialog&&_.closeDialog(...l),["self"]))},[e("div",hl,[e("div",gl,[v[7]||(v[7]=e("h3",null,"修改密码",-1)),e("button",{class:"close-button",onClick:v[0]||(v[0]=(...l)=>_.closeDialog&&_.closeDialog(...l))},"×")]),e("div",ml,[e("div",fl,[v[8]||(v[8]=e("label",null,"原密码:",-1)),B(e("input",{type:"password","onUpdate:modelValue":v[1]||(v[1]=l=>p.formData.old_password=l),placeholder:"请输入原密码"},null,512),[[Me,p.formData.old_password]])]),e("div",yl,[v[9]||(v[9]=e("label",null,"新密码:",-1)),B(e("input",{type:"password","onUpdate:modelValue":v[2]||(v[2]=l=>p.formData.new_password=l),placeholder:"请输入新密码"},null,512),[[Me,p.formData.new_password]])]),e("div",wl,[v[10]||(v[10]=e("label",null,"确认密码:",-1)),B(e("input",{type:"password","onUpdate:modelValue":v[3]||(v[3]=l=>p.formData.confirm_password=l),placeholder:"请确认新密码"},null,512),[[Me,p.formData.confirm_password]])])]),e("div",_l,[e("button",{class:"cancel-button",onClick:v[4]||(v[4]=(...l)=>_.closeDialog&&_.closeDialog(...l))},"取消"),e("button",{class:"confirm-button",onClick:v[5]||(v[5]=(...l)=>_.handleSubmit&&_.handleSubmit(...l))},"确认")])])])):U("",!0)}const Al=re(pl,[["render",kl],["__scopeId","data-v-b963ecb7"]]),bl={class:"header"},Cl={class:"user-profile-bar"},Sl={class:"user-info-bar"},xl=["title"],Il={key:1,class:"theme-icon",src:xs,alt:"切换到深色模式"},Dl={class:"user-name"},Tl={class:"user-name",style:{"margin-left":"10px"}},Ml={class:"dropdown-menu"},El=["src"],$l={class:"conversation-list"},Ul=["onClick"],zl={class:"config-container"},Pl={class:"chat"},Ll={key:0,class:"welcome-section",style:{"margin-top":"-220px"}},Ol={class:"suggestion-section"},Vl={class:"cards-container"},Gl={class:"suggestion-card"},Bl={class:"suggestion-items"},Wl=["onClick"],Nl={key:0,class:"thinking-steps-stream"},ql={key:0,class:"typing-indicator"},Jl={class:"message-bubble"},Rl={class:"message-content"},Kl={key:0,class:"thinking-steps"},Yl={key:0,class:"image-preview"},Fl=["src"],Ql={key:1,class:"video-preview"},Hl=["src"],jl={key:2,class:"file-info-display"},Xl=["src"],Zl={class:"file-details"},eo=["title"],to={class:"file-size"},so=["innerHTML"],ao={key:3},lo={key:4,class:"audio-controls"},oo=["onClick"],no={key:0,class:"wave-animation"},io=["src"],ro={class:"input-container"},co={class:"left_item",style:{display:"flex"}},uo={class:"search-toggle-item",style:{width:"33%"}},vo={class:"toggle-content"},po={class:"toggle-switch"},ho=["disabled"],go={class:"search-toggle-item",style:{width:"33%"}},mo={class:"toggle-content"},fo={class:"toggle-switch"},yo={class:"search-toggle-item",style:{width:"33%"}},wo={class:"toggle-content"},_o={class:"toggle-switch"},ko={class:"search-toggle-item"},Ao={class:"toggle-content"},bo=["value","disabled"],Co={key:0,value:""},So={key:1,value:""},xo=["value"],Io={key:0,class:"attachments-panel"},Do={class:"panel-content"},To={key:0,style:{display:"flex","justify-content":"center"}},Mo={key:0,class:"upload-loading"},Eo={key:1},$o={class:"file-list"},Uo={key:0,class:"file-loading"},zo=["src"],Po=["src"],Lo=["src"],Oo=["onClick"],Vo={key:0,class:"file-info"},Go={class:"file-name"},Bo={class:"file-size"},Wo={class:"input-wrapper"},No={key:0,class:"loading-btn"},qo={key:1,src:$s,alt:"send"},Jo={key:0},Ro={style:{height:"91vh",overflow:"auto"},class:"file-list"},Ko={id:"stepsContainer",class:"steps-container"},Yo=["innerHTML"],Fo={class:"right-menu-content"},Qo={class:"panel-container"},Ho={class:"panel-container"},jo={class:"document-preview"},Xo={class:"preview-container"},Zo={key:0,class:"direct-preview"},en={class:"preview-header"},tn={class:"preview-body"},sn=["src"],an=["src"],ln={key:2},on={key:3},nn=["src"],rn={key:5,class:"file-preview"},cn={class:"panel-container"},un=0,dn=800,vn={__name:"report",setup(y){const v=new hs({html:!0,linkify:!0,typographer:!0});r(!1);const m=r(""),A=r(!1),p=r(!1),_=r(null),l=r([]),k=r([]);r(!1);const Y=r(1),R=r(1),M=r(null),f=It(),g=ys(),I=r([{id:1,title:"当前会话",messages:[]}]),D=r(!1),d=r(null),i=r(null),c=r(!1),w=r(null),x=r(null),J=r(!1),ce=r(null),$e=r(!1),fe=r([]),N=r([]);let te=null;const z=r([]),ue=r(!1),Ne=r(0),q=r(!1),se=r(!1),Ce=r(!1),de=r(!1),qe=r([]),Je=r(0),Re=r(!1),Ue=r(""),Ke=r(!1),Dt=r([]),Tt=(s,t)=>{switch(s){case"html_start":Ue.value="";break;case"html_chunk":t&&typeof t.html=="string"&&(Ue.value+=t.html,Ge(()=>{const a=document.getElementById("resultContent");a&&(a.scrollTop=a.scrollHeight)}));break;case"html_end":break;case"init_steps":Ke.value=!0,Mt(t.steps);break;case"step_update":$t(t.step_id,t.status,t.details,t.progress);break;case"final_summary":break;case"stream_end":Ke.value=!1;break;case"error":console.error("SSE错误:",t.message);break}},Mt=s=>{const t=document.getElementById("stepsList");t&&(t.innerHTML="",Dt.value=s,s.forEach(a=>{t.appendChild(Et(a))}))},Et=s=>{const t=document.createElement("div");return t.className=`step ${s.status}`,t.id=`step-${s.step_id}`,t.innerHTML=`
- <div class="step-header">
- <div class="step-header-content">
- <div class="step-icon" style="display: none;">${lt(s.status)}</div>
- <div class="step-name">${s.name||s.step_id}</div>
- </div>
- </div>
- <div class="step-details">${s.details||""}</div>
- <div class="progress-bar">
- <div class="progress-fill" style="width: ${s.progress||0}%"></div>
- </div>
- `,t},$t=(s,t,a,u)=>{const h=document.getElementById(`step-${s}`);h&&(h.className=`step ${t}`,h.querySelector(".step-icon").textContent=lt(t),a&&(h.querySelector(".step-details").textContent=a),u!==void 0&&(h.querySelector(".progress-fill").style.width=`${u}%`))},lt=s=>{switch(s){case"pending":return"⏳";case"running":return"🔄";case"completed":return"✅";case"error":return"❌";default:return"⏳"}},ve=r(!1),ye=()=>{Ce.value=window.innerWidth<=768,Ce.value?(p.value=!0,se.value=!0):(p.value=!1,se.value=!1)};me(()=>{ye(),window.addEventListener("resize",ye)});const pe=r(!1),ot=()=>{console.log(pe.value),pe.value=!pe.value},Ut=()=>{se.value=!se.value,Ce.value&&(document.body.style.overflow=se.value?"auto":"hidden",se.value||(p.value=!0)),document.querySelector(".chat")&&(document.querySelector(".chat").style.left=se.value?"0":"260px")},zt=()=>{p.value=!1,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${E.value}px`)},Pt=async()=>{$e.value=!0;try{const s=await O.get("https://aiapi.raycos.com.cn/api/document/summary?limit=2",{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});console.log("API Response:",s.data),s.data.status===200&&(ce.value=s.data.data,console.log("Document Summary:",ce.value),Lt())}catch(s){console.error("获取文档摘要失败:",s)}finally{$e.value=!1}},Lt=()=>{te&&clearInterval(te);const s=()=>{var t;if(!((t=ce.value)!=null&&t.length)){console.log("没有可用的文档摘要数据");return}try{const a=ce.value[0];if(a!=null&&a.questions){const h=[...a.questions.map(C=>({question:C}))].sort(()=>.5-Math.random());fe.value=h.slice(0,3)}}catch(a){console.error("处理第一篇文档问题失败:",a)}try{const a=ce.value[1];if(a!=null&&a.questions){const h=[...a.questions.map(C=>({question:C}))].sort(()=>.5-Math.random());N.value=h.slice(0,3)}}catch(a){console.error("处理第二篇文档问题失败:",a)}};s(),te=setInterval(s,5e3)},Ot=s=>{console.log("QA clicked:",s),s!=null&&s.question&&(m.value=s.question,Ye())};Te(()=>{te&&clearInterval(te)});const nt=()=>{A.value=!A.value},Vt=s=>{l.value=l.value.filter(t=>t!==s),l.value.length===0?(E.value=0,document.querySelector(".chat")&&(document.querySelector(".chat").style.right="0px")):(E.value=450,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${E.value}px`)),console.log(l.value.length)},it=()=>{var s;J.value||(s=_.value)==null||s.click()},rt=async s=>{try{const t=new FormData;t.append("file",s);const a=await O.post("https://aiapi.raycos.com.cn/upload/file",t,{headers:{"Content-Type":"multipart/form-data"}});if(a.data.status===2e3)return a.data.data.fileUrl;throw new Error(a.data.message||"文件上传失败")}catch(t){throw console.error("文件上传失败:",t),t}},ct=async s=>{const t=Array.from(s.target.files);if(t.length===0)return;const a=10*1024*1024;if(t.filter(h=>!!(we(h)&&h.size>a)).length>0){alert("Video files must not exceed 10MB"),s.target.value="";return}J.value=!0,E.value=450;try{for(const h of t){const C={name:h.name,size:h.size,sizeFormatted:ut(h.size),type:h.type,isUploading:!0};l.value.push(C);try{const T=await rt(h),G=l.value.findIndex(ae=>ae.name===h.name);G!==-1&&l.value.splice(G,1,{...C,url:T,isUploading:!1})}catch(T){l.value=l.value.filter(G=>G.name!==h.name),console.error("单个文件上传失败:",T)}}}catch(h){console.error("文件上传失败:",h)}finally{J.value=!1,s.target.value="",l.value.length>0&&(ne.value="preview",p.value=!1,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${E.value}px`))}t.length>0&&q.value&&(q.value=!1)},ut=s=>{if(!s||isNaN(s))return"0 B";const t=1024,a=["B","KB","MB","GB"],u=Math.floor(Math.log(s)/Math.log(t));return parseFloat((s/Math.pow(t,u)).toFixed(2))+" "+a[u]},dt=s=>s.url&&oe(s)?s.url:Ps,oe=s=>{var u,h,C;const t=["jpg","jpeg","png","gif","webp"],a=((C=(h=(u=s.name)==null?void 0:u.split("."))==null?void 0:h.pop())==null?void 0:C.toLowerCase())||"";return t.includes(a)},we=s=>{var u,h,C;const t=["mp4","webm","ogg"],a=((C=(h=(u=s.name)==null?void 0:u.split("."))==null?void 0:h.pop())==null?void 0:C.toLowerCase())||"";return t.includes(a)},Gt=s=>{const t=s.name.split(".").pop().toLowerCase(),a=["jpg","jpeg","png","gif","webp"],u=["mp4","webm","ogg"];return a.includes(t)?"image":u.includes(t)?"video":"document"},ze=r(""),_e=r(null),Ye=async()=>{var G,ae;const s=localStorage.getItem("token");if(!s){g.push("/login");return}if(D.value){D.value=!1,_e.value&&(_e.value.abort(),_e.value=null),d.value&&(clearTimeout(d.value),d.value=null);return}if(!m.value.trim()&&l.value.length===0||D.value)return;D.value=!0;const t=m.value.trim();m.value="",q.value?(xe.value=t,Bt(t).catch($=>{console.error("Web search failed:",$)})):de.value&&(xe.value=t,mt({query:t,page:1,pageSize:20}));const a=[],u=[],h=[];l.value.forEach($=>{const Z=Gt($);Z==="image"?a.push($.url):Z==="video"?u.push($.url):h.push($.url)});const C={id:Date.now(),role:"user",content:t,displayContent:t,files:l.value.map($=>({name:$.name,size:$.sizeFormatted,type:$.type,url:$.url}))};k.value.push(C);const T={id:Date.now()+1,role:"assistant",content:"思考中...",displayContent:"思考中...",isLoading:!0};k.value.push(T);try{if(_e.value=new AbortController,ve.value){const $={query:t};let Z=null;Ue.value="";try{const F=await fetch("https://aiapi.raycos.com.cn/api/agents/database/streaming/",{method:"POST",headers:{Authorization:`JWT ${s}`,"Content-Type":"application/json"},body:JSON.stringify($)});if(!F.ok)throw new Error("SSE请求失败");Z=F.body.getReader();const Ze=new TextDecoder;let De="",ge="",ke="";for(;;){const{done:et,value:us}=await Z.read();if(et)break;De+=Ze.decode(us,{stream:!0});const _t=De.split(`
- `);De=_t.pop()||"";for(const Ae of _t)if(Ae.startsWith("event:"))ge=Ae.substring(6).trim();else if(Ae.startsWith("data:"))try{const Oe=Ae.substring(5).trim();if(Oe){const kt=JSON.parse(Oe);if(Tt(ge||"message",kt),ge==="final_summary"){k.value=k.value.filter(tt=>tt.id!==T.id);const Ve=Ee({id:Date.now()+2,role:"assistant",content:kt.summary,displayContent:"",audioData:null});D.value=!0,k.value.push(Ve);try{await vt(Ve)}catch(tt){console.error("打字效果出错:",tt),Ve.displayContent=Ve.content}finally{D.value=!1}}}}catch(Oe){console.error("Failed to parse SSE data:",Ae,Oe)}else Ae===""&&(ge="")}}catch(F){throw console.error("请求或处理过程出错:",F),ElMessage.error("请求失败,请稍后重试"),F}finally{if(Z)try{await Z.cancel()}catch(F){console.error("关闭reader时出错:",F)}}}else{const $=q.value?"https://aiapi.raycos.com.cn/api/chat/web-search-llm/":"https://aiapi.raycos.com.cn/api/chat/online/multimodal",Z=await O.post($,{message:t,chat_config_id:"2",user_id:"13365429324",session_id:ze.value,source:"pc",image_urls:a,video_urls:u,documents:h,merchant_id:JSON.parse(localStorage.getItem("userInfo")).merchant.merchant_id,model_type:ft.value.type,model_name:ft.value.name},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`},signal:_e.value.signal});k.value=k.value.filter(et=>et.id!==T.id);const F=q.value?Z.data.data:Z.data,Ze=q.value?F.answer:F.choices[0].message.content,De=q.value?(G=F.audio_info)==null?void 0:G.audio:(ae=F.audio_info)==null?void 0:ae.audio,ge=(q.value,F.session_id);ge&&(ze.value=ge);const ke=Ee({id:Date.now()+2,role:"assistant",content:Ze,displayContent:"",audioData:De||null});k.value.push(ke),ke.audioData&&!c.value&&await yt(ke.audioData,ke.id),await vt(ke)}}catch($){console.error("发送消息失败:",$),k.value=k.value.filter(Z=>Z.id!==T.id),k.value.push({id:Date.now()+2,role:"assistant",content:"发送消息失败,请重试",displayContent:"发送消息失败,请重试"})}finally{D.value=!1,_e.value=null}},Bt=async s=>{ue.value=!0;try{const t=await O.post("https://aiapi.raycos.com.cn/api/web-search-results/",{query:s,num_results:20,page:1,page_size:20,engine:"tavily"});console.log(t),t.data&&t.data.code===200&&(z.value=t.data.data.result||[],console.log(z.value),Ne.value=t.data.data.total||0)}catch(t){console.error("Web search failed:",t),z.value=[],Ne.value=0}finally{ue.value=!1}},vt=async s=>{if(!s||!s.content){console.error("Invalid message or content is missing");return}return new Promise(t=>{let h=0;s.displayContent="";const C=()=>{if(h<s.content.length&&D.value){let T="";const G=s.content[h];if(/[\u4e00-\u9fa5]/.test(G))T=G;else if(/[.,!?;,。!?;]/.test(G))T=G;else if(G===" "&&h+1<s.content.length){let $=h+1;for(;$<s.content.length&&!/[\s\n]/.test(s.content[$]);)$++;T=s.content.substring(h,$)}else T=G;s.displayContent=s.content.substring(0,h)+T,h+=T.length;const ae=T.length>1?50:20;d.value=setTimeout(C,ae)}else D.value||(s.displayContent=s.content),t()};C()})},Wt=()=>{R.value++;const s={id:Date.now(),title:`New Conversation ${R.value}`,messages:[]};I.value.push(s),ze.value="",pt(s.id)},pt=s=>{Y.value=s;const t=I.value.find(a=>a.id===s);k.value=t?t.messages:[],ze.value=""},Nt=async s=>{if(J.value)return;const t=Array.from(s.dataTransfer.files);if(t.length===0)return;const a=10*1024*1024;t.filter(u=>!!(we(u)&&u.size>a)),J.value=!0;try{for(const u of t){const h={name:u.name,size:u.size,sizeFormatted:ut(u.size),type:u.type,isUploading:!0};l.value.push(h);try{const C=await rt(u),T=l.value.findIndex(G=>G.name===u.name);T!==-1&&l.value.splice(T,1,{...h,url:C,isUploading:!1})}catch(C){l.value=l.value.filter(T=>T.name!==u.name),console.error("单个文件上传失败:",C)}}}catch(u){console.error("文件上传失败:",u)}finally{J.value=!1,l.value.length>0&&(ne.value="preview",p.value=!1,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${E.value}px`))}t.length>0&&q.value&&(q.value=!1)},qt=s=>{s.audioData?w.value===s.id?Se():yt(s.audioData,s.id):w.value===s.id?Se():Jt(s.content,s.id)},Jt=async(s,t)=>{try{if(w.value&&w.value!==t&&Se(),w.value===t)return;const a=await O.post("https://aiapi.raycos.com.cn/api/voices/play_text",{text:s},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});if(a.data.code===200){const u=new Audio(`https://aiapi.raycos.com.cn${a.data.audio_url}`);x.value=u,w.value=t,c.value=!0,u.onended=()=>{w.value=null,x.value=null,c.value=!1},u.onerror=h=>{console.error("播放文本失败:",h),V.error("播放失败,请稍后重试"),w.value=null,x.value=null,c.value=!1},await u.play()}}catch(a){console.error("播放文本失败:",a),V.error("播放失败,请稍后重试"),w.value=null,x.value=null,c.value=!1}},Se=()=>{i.value&&(i.value.pause(),i.value.currentTime=0,i.value=null),x.value&&(x.value.pause(),x.value.currentTime=0,x.value=null),c.value=!1,w.value=null};Te(()=>{Se()});const Rt=s=>s?v.render(s):"",E=r(0),ht=s=>{s.preventDefault();const t=s.type==="mousedown"?s.clientX:s.touches[0].clientX,a=E.value,u=C=>{if(p.value)return;const T=C.type==="mousemove"?C.clientX:C.touches[0].clientX,G=t-T;let ae=Math.min(Math.max(a+G,un),dn);E.value=ae,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${ae}px`,ae==800?document.querySelector(".input-container").style.width="97%":document.querySelector(".input-container").style.width="98%")},h=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",u),document.removeEventListener("touchend",h)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",h),document.addEventListener("touchmove",u),document.addEventListener("touchend",h)};r(!0);const xe=r(""),Kt=s=>{console.log(q),q.value=s,s&&(zt(),ne.value="search")},ne=r("search"),Yt=r(!1),Fe=()=>{Yt.value=window.innerWidth<=480};Te(()=>{window.removeEventListener("resize",Fe)});const gt=r(!1),Qe=()=>{gt.value=window.innerWidth<=768};Te(()=>{window.removeEventListener("resize",Qe)});const Ft=at(()=>(ye(),!p.value));ie(ve,s=>{console.log("智能体状态:",s),s?(E.value=450,p.value=!1,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${E.value}px`),de.value=!1,q.value=!1):(p.value=!0,de.value||(E.value=0,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${E.value}px`,document.querySelector(".input-container").style.width="98%")))});const Qt=async s=>{if(s.target.checked){E.value=450,await Ge();const t=document.querySelector(".chat");t?t.style.right=`${E.value}px`:console.warn("未找到聊天容器元素"),q.value=!1,ve.value=!1,ne.value="knowledge",m.value.trim()&&mt({query:m.value,page:1,pageSize:20})}else{E.value=0,await Ge();const t=document.querySelector(".chat");document.querySelector(".input-container").style.width="98%",t?t.style.right=`${E.value}px`:console.warn("未找到聊天容器元素")}},mt=async s=>{if(!(!s.query.trim()||!de.value)){Re.value=!0;try{const t=await O.post("https://aiapi.raycos.com.cn/chataids/mysql_fuzzy_search/",{keywords:s.query,documents:[],document_ids:[],limit:5},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});console.log(t),t.data&&t.data.status===200&&(qe.value=t.data.data.data||[],Je.value=t.data.data.data.total||0)}catch(t){console.error("Knowledge search failed:",t),qe.value=[],Je.value=0}finally{Re.value=!1}}},Ht=s=>{s.target.checked?(E.value=450,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${E.value}px`),de.value=!1,ve.value=!1,ne.value="search",m.value.trim()&&(xe.value=m.value)):(E.value=0,document.querySelector(".chat")&&(document.querySelector(".chat").style.right=`${E.value}px`))},jt="https://aiapi.raycos.com.cn",he=r([]),Ie=r(null),Pe=r(!1),ft=at(()=>{if(!Ie.value||!he.value.length)return{type:"",name:""};const s=he.value.find(t=>t.id===Ie.value);return{type:(s==null?void 0:s.type)||"",name:(s==null?void 0:s.name)||""}}),Xt=async()=>{Pe.value=!0;try{const t=await(await fetch(`${jt}/api/models?merchant_id=${JSON.parse(localStorage.getItem("userInfo")).merchant.merchant_id}`)).json();console.log(t),t.code===2e3&&(he.value=(t.data.models||[]).map(a=>({id:a.id,name:a.name,type:a.type||a.model_type||"default"})),he.value.length>0&&(Ie.value=he.value[0].id))}catch(s){console.error("Failed to fetch models:",s)}finally{Pe.value=!1}},Zt=s=>{Ie.value=s},He=r({name:"",role:""});me(()=>{Qe(),window.addEventListener("resize",Qe),Fe(),window.addEventListener("resize",Fe),ye(),window.addEventListener("resize",ye),Xt(),Pt();const s=localStorage.getItem("userInfo");if(s)try{He.value=JSON.parse(s)}catch(t){console.error("解析用户信息失败:",t)}});const je=r(!1),es=()=>{je.value=!0,pe.value=!1},ts=async()=>{try{await O.post("https://aiapi.raycos.com.cn/user/logout",{},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}}),localStorage.removeItem("token"),localStorage.removeItem("userInfo"),localStorage.removeItem("permissions"),localStorage.removeItem("username"),localStorage.removeItem("mobile"),f.commit("app/setUser",{user:{},permission:[],auth:{}}),pe.value=!1,g.push("/login")}catch(s){console.error("退出登录失败:",s),localStorage.clear(),g.push("/login")}},ss=async()=>{var s,t;try{const a=await O.post("https://aiapi.raycos.com.cn/user/create_invitation",{},{headers:{Authorization:`JWT ${localStorage.getItem("token")}`}});if(console.log(a),a.data.code===200){V.success("创建邀请成功");const u=`${window.location.protocol}//${window.location.host}`;window.location.href=`${u}${a.data.data.invitation_link}`}else V.error(a.data.message||"创建邀请失败")}catch(a){console.error("创建邀请失败:",a),V.error(((t=(s=a.response)==null?void 0:s.data)==null?void 0:t.message)||"创建邀请失败,请稍后重试")}pe.value=!1},yt=async(s,t)=>{try{if(w.value&&w.value!==t&&Se(),w.value===t)return;const a=new Audio(s);x.value=a,w.value=t,c.value=!0,a.onended=()=>{w.value=null,x.value=null,c.value=!1},a.onerror=u=>{console.error("播放音频失败:",u),V.error("播放失败,请稍后重试"),w.value=null,x.value=null,c.value=!1},await a.play()}catch(a){console.error("播放音频失败:",a),V.error("播放失败,请稍后重试"),w.value=null,x.value=null,c.value=!1}},X=r(!1),Xe=s=>{document.documentElement.classList.toggle("dark-theme",s)},as=()=>{X.value=!X.value,localStorage.setItem("theme",X.value?"dark":"light"),Xe(X.value)};me(()=>{document.querySelector(".chat")&&(document.querySelector(".chat").style.right="0px"),ye();const s=localStorage.getItem("theme");s?X.value=s==="dark":X.value=window.matchMedia("(prefers-color-scheme: dark)").matches,Xe(X.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",a=>{localStorage.getItem("theme")||(X.value=a.matches,Xe(a.matches))})});const ls=r({xls:!1,minColLength:15,minRowLength:50,widthOffset:50,heightOffset:30,forceRender:!0,maxSheetLength:10,showGridLines:!0,defaultFontSize:12,defaultRowHeight:24,autoFitColumn:!0,overflowColumns:!0,showToolbar:!0}),wt=()=>{console.log("Excel文件渲染完成"),Ge(()=>{window.dispatchEvent(new Event("resize"))})},os=s=>{console.error("Excel文件渲染失败:",s),V.error("Excel预览失败:"+(s.message||"请尝试下载后查看"))},ns=s=>{var h,C,T;if(!s)return!1;const t=["doc","docx"],a=((T=(C=(h=s.name)==null?void 0:h.split("."))==null?void 0:C.pop())==null?void 0:T.toLowerCase())||"",u=t.includes(a);return u&&s.type?s.type==="application/msword"||s.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document":u},is=s=>{var u,h,C;if(!s)return!1;const t=["xls","xlsx"],a=((C=(h=(u=s.name)==null?void 0:u.split("."))==null?void 0:h.pop())==null?void 0:C.toLowerCase())||"";return t.includes(a)},rs=s=>{var t,a;return s&&((a=(t=s.name)==null?void 0:t.toLowerCase())==null?void 0:a.endsWith(".pdf"))||!1},K=r(null);ie(()=>l.value,s=>{s&&s.length>0?K.value=s[s.length-1]:K.value=null},{immediate:!0,deep:!0});const cs=()=>{K.value=null},Le=r([]);return(s,t)=>(o(),n("div",{class:Q(["layout",{"dark-theme":X.value}])},[S(Al,{visible:je.value,"onUpdate:visible":t[0]||(t[0]=a=>je.value=a)},null,8,["visible"]),e("div",bl,[e("div",Cl,[t[12]||(t[12]=e("div",{class:"logo"},[e("img",{src:Cs,alt:"logo",class:"logo-img"})],-1)),e("div",Sl,[e("div",{class:"theme-switch",onClick:as,title:X.value?"切换到浅色模式":"切换到深色模式"},[S(gs,{name:"theme-icon",mode:"out-in"},{default:H(()=>[X.value?(o(),n("img",{key:X.value,src:Ss,alt:"切换到浅色模式",class:"theme-icon"})):(o(),n("img",Il))]),_:1})],8,xl),Ce.value?U("",!0):(o(),n("div",{key:0,class:"user-info",onClick:ot},[e("div",Dl,"商户名称:"+b(He.value.merchant_name||"未登录用户"),1),e("div",Tl,"当前用户:"+b(He.value.username||"未登录用户"),1)])),e("div",{class:"avatar",onClick:ot},t[8]||(t[8]=[e("img",{src:Is,alt:"用户头像"},null,-1)]))]),B(e("div",Ml,[e("div",{class:"dropdown-item",onClick:es},t[9]||(t[9]=[e("i",{class:"fas fa-key"},null,-1),j(" 修改密码 ")])),e("div",{class:"dropdown-item",onClick:ss},t[10]||(t[10]=[e("i",{class:"fas fa-user-plus"},null,-1),j(" 创建邀请 ")])),e("div",{class:"dropdown-item",onClick:ts},t[11]||(t[11]=[e("i",{class:"fas fa-sign-out-alt"},null,-1),j(" 退出登录 ")]))],512),[[le,pe.value]])])]),e("div",{class:Q(["collapse-left-button",{"menu-collapsed":se.value}]),onClick:Ut},[e("img",{src:se.value?L(zs):L(Us),alt:"toggle",class:"collapse-icon"},null,8,El)],2),e("div",{class:Q(["menu",{collapsed:se.value}])},[e("button",{class:"new-conversation-btn",onClick:Wt},t[13]||(t[13]=[e("img",{class:"tab-icon",src:Ct,alt:""},null,-1),e("span",null,"New Conversation",-1)])),e("div",$l,[(o(!0),n(P,null,W(I.value,a=>(o(),n("div",{key:a.id,class:Q(["conversation-item",{active:Y.value===a.id}]),onClick:u=>pt(a.id)},b(a.title),11,Ul))),128))]),e("div",zl,[S(ja),S(Ba),S(Xs),S(Ta)])],2),e("div",Pl,[t[35]||(t[35]=e("div",{class:"chat-header"},[e("h2",null,"智能运维助手"),e("div",{class:"chat-status"},[e("span",{class:"status-indicator online"}),e("span",null,"在线")])],-1)),k.value.length===0?(o(),n("div",Ll,[e("div",Ol,[t[16]||(t[16]=e("h3",null,"嗨,我是你的智能助手",-1)),e("div",Vl,[e("div",Gl,[t[14]||(t[14]=e("div",{class:"card-header"},[e("img",{src:Ds,alt:"hot topics",class:"tab-icon"}),e("h4",null,"推荐问题")],-1)),t[15]||(t[15]=e("p",{class:"card-subtitle"},"为您精选的热门问题",-1)),e("div",Bl,[(o(!0),n(P,null,W([...fe.value,...N.value],(a,u)=>(o(),n("div",{key:u,class:"suggestion-item",onClick:h=>Ot(a)},b(a.question),9,Wl))),128))])])])])])):(o(),n("div",{key:1,class:"message-list",ref_key:"messageList",ref:M},[Le.value&&Le.value.length>0?(o(),n("div",Nl,[(o(!0),n(P,null,W(Le.value,(a,u)=>(o(),n("div",{key:u,class:Q(["thinking-step-stream",[a.type,{"fade-in":!0}]])},[j(b(a.content)+" ",1),u===Le.value.length-1?(o(),n("div",ql,t[17]||(t[17]=[e("span",null,null,-1),e("span",null,null,-1),e("span",null,null,-1)]))):U("",!0)],2))),128))])):U("",!0),(o(!0),n(P,null,W(k.value,a=>(o(),n("div",{key:a.id,class:Q(["message-item",a.role==="user"?"user":"assistant"])},[e("div",Jl,[e("div",Rl,[a.thinkingSteps&&a.thinkingSteps.length>0?(o(),n("div",Kl,[(o(!0),n(P,null,W(a.thinkingSteps,(u,h)=>(o(),n("div",{key:h,class:Q(["thinking-step",u.type])},b(u.content),3))),128))])):U("",!0),a.role==="user"&&a.files?(o(!0),n(P,{key:1},W(a.files,u=>(o(),n("div",{key:u.name,class:"file-message"},[oe(u)?(o(),n("div",Yl,[e("img",{src:u.url,class:"preview-image"},null,8,Fl)])):we(u)?(o(),n("div",Ql,[e("video",{controls:"",class:"preview-video",src:u.url,preload:"metadata"}," Your browser does not support the video tag. ",8,Hl)])):(o(),n("div",jl,[e("img",{src:dt(u),class:"file-type-icon"},null,8,Xl),e("div",Zl,[e("span",{class:"file-name",title:u.name},b(u.name),9,eo),e("span",to,b(u.size),1)])]))]))),128)):U("",!0),a.role==="assistant"?(o(),n("div",{key:2,class:"message-text",innerHTML:Rt(a.displayContent)},null,8,so)):(o(),n("div",ao,b(a.content),1)),a.role==="assistant"?(o(),n("div",lo,[e("button",{class:"audio-btn",onClick:u=>qt(a)},[w.value===a.id?(o(),n("div",no,t[18]||(t[18]=[e("span",{class:"wave-bar"},null,-1),e("span",{class:"wave-bar"},null,-1),e("span",{class:"wave-bar"},null,-1),e("span",{class:"wave-bar"},null,-1)]))):(o(),n("img",{key:1,src:L(Ls),alt:"播放",class:"audio-icon"},null,8,io))],8,oo)])):U("",!0)])])],2))),128))],512)),e("div",ro,[e("div",{class:Q(["search-toggles",{compact:gt.value}])},[e("div",co,[e("div",uo,[e("div",vo,[S(L(ws)),t[20]||(t[20]=e("span",{class:"toggle-text"},"互联网",-1)),e("div",po,[B(e("input",{type:"checkbox",id:"webSearchToggle","onUpdate:modelValue":t[1]||(t[1]=a=>q.value=a),onChange:Ht,disabled:l.value.length>0,class:"toggle-input"},null,40,ho),[[st,q.value]]),e("label",{for:"webSearchToggle",class:Q(["toggle-label",{disabled:l.value.length>0}])},t[19]||(t[19]=[e("span",{class:"toggle-slider"},null,-1)]),2)])])]),e("div",go,[e("div",mo,[S(L(bt)),t[22]||(t[22]=e("span",{class:"toggle-text"},"知识库",-1)),e("div",fo,[B(e("input",{type:"checkbox",id:"knowledgeSearchToggle","onUpdate:modelValue":t[2]||(t[2]=a=>de.value=a),onChange:Qt,class:"toggle-input"},null,544),[[st,de.value]]),t[21]||(t[21]=e("label",{for:"knowledgeSearchToggle",class:"toggle-label"},[e("span",{class:"toggle-slider"})],-1))])])]),e("div",yo,[e("div",wo,[S(L(bt)),t[24]||(t[24]=e("span",{class:"toggle-text"},"智能体",-1)),e("div",_o,[B(e("input",{type:"checkbox",id:"inferenceModelId","onUpdate:modelValue":t[3]||(t[3]=a=>ve.value=a),class:"toggle-input"},null,512),[[st,ve.value]]),t[23]||(t[23]=e("label",{for:"inferenceModelId",class:"toggle-label"},[e("span",{class:"toggle-slider"})],-1))])])])]),e("div",ko,[e("div",Ao,[e("select",{class:"model-select",value:Ie.value,onChange:t[4]||(t[4]=a=>Zt(a.target.value)),disabled:Pe.value},[Pe.value?(o(),n("option",Co,"加载中...")):he.value.length===0?(o(),n("option",So,"无可用模型")):U("",!0),(o(!0),n(P,null,W(he.value,a=>(o(),n("option",{key:a.id,value:a.id},b(a.name),9,xo))),128))],40,bo)])])],2),A.value?(o(),n("div",Io,[e("div",Do,[e("div",{class:"attachments-header"},[t[26]||(t[26]=e("span",null,"Attachments",-1)),e("button",{class:"close-btn",onClick:nt},t[25]||(t[25]=[e("img",{src:Ts,alt:""},null,-1)]))]),l.value.length===0?(o(),n("div",To,[e("div",{class:Q(["upload-area",{"has-files":l.value.length>0}]),onClick:it,onDrop:be(Nt,["prevent"]),onDragover:t[5]||(t[5]=be(()=>{},["prevent"])),onDragenter:t[6]||(t[6]=be(()=>{},["prevent"]))},[J.value?(o(),n("div",Mo,t[27]||(t[27]=[e("div",{class:"loading-spinner"},null,-1),e("div",{class:"upload-text"},"Uploading...",-1)]))):(o(),n(P,{key:1},[t[28]||(t[28]=e("img",{src:Ms,alt:"upload",class:"upload-icon"},null,-1)),t[29]||(t[29]=e("div",{class:"upload-text"},"Upload files",-1)),t[30]||(t[30]=e("div",{class:"upload-hint"}," Click or drag files to this area to upload ",-1))],64)),e("input",{type:"file",ref_key:"fileInput",ref:_,style:{display:"none"},onChange:ct,multiple:""},null,544)],34)])):U("",!0),l.value.length!==0?(o(),n("div",Eo,[e("div",$o,[(o(!0),n(P,null,W(l.value,a=>(o(),n("div",{key:a.name,class:Q(["file-item",{"is-image":oe(a)}])},[e("div",{class:Q(oe(a)?"file-wrapper":"")},[a.isUploading?(o(),n("div",Uo,t[31]||(t[31]=[e("div",{class:"loading-spinner"},null,-1)]))):oe(a)?(o(),n("img",{key:1,src:a.url,alt:"file",class:"file-icon"},null,8,zo)):we(a)?(o(),n("video",{key:2,src:a.url,class:"file-icon",preload:"metadata"}," Your browser does not support the video tag. ",8,Po)):(o(),n("img",{key:3,src:dt(a),alt:"file",class:Q(oe(a)||we(a)?"file-icon":"")},null,10,Lo)),a.isUploading?U("",!0):(o(),n("button",{key:4,class:"remove-btn",onClick:be(u=>Vt(a),["stop"])}," × ",8,Oo))],2),oe(a)?U("",!0):(o(),n("div",Vo,[e("span",Go,b(a.name),1),e("span",Bo,b(a.sizeFormatted),1)]))],2))),128)),e("button",{class:"add-more-btn",onClick:be(it,["stop"])},t[32]||(t[32]=[e("img",{src:Ct,alt:"add"},null,-1)]))]),e("input",{type:"file",ref_key:"fileInput",ref:_,style:{display:"none"},onChange:ct,multiple:""},null,544)])):U("",!0)])])):U("",!0),e("div",Wo,[e("button",{class:"attachment-btn",onClick:nt},t[33]||(t[33]=[e("img",{src:Es,alt:"attachment",class:"tab-icon"},null,-1)])),B(e("input",{type:"text",class:"message-input","onUpdate:modelValue":t[7]||(t[7]=a=>m.value=a),onKeyup:ms(Ye,["enter"]),placeholder:"Type a message..."},null,544),[[Me,m.value]]),e("button",{class:"send-btn",onClick:Ye},[D.value?(o(),n("span",No,t[34]||(t[34]=[e("span",{class:"loading-square"},null,-1)]))):(o(),n("img",qo))])])])]),Ce.value?U("",!0):(o(),n("div",{key:0,class:Q(["right_menu",{collapsed:!Ft.value}]),style:fs({width:E.value+"px"})},[ve.value?(o(),n("div",Jo,[e("div",Ro,[B(e("div",Ko,t[36]||(t[36]=[e("h3",{class:"steps-title"},"📋 处理步骤",-1),e("div",{id:"stepsList"},null,-1)]),512),[[le,Ke.value]]),e("div",{id:"resultContent",innerHTML:Ue.value},null,8,Yo)])])):U("",!0),e("div",{class:"resize-handle",onMousedown:ht,onTouchstart:ht},null,32),e("div",Fo,[B(e("div",Qo,[S(ha,{searchResults:z.value,loading:ue.value,total:Ne.value,enableWebSearch:q.value,message:xe.value,"onUpdate:enableWebSearch":Kt},null,8,["searchResults","loading","total","enableWebSearch","message"])],512),[[le,ne.value==="search"]]),B(e("div",Ho,[t[38]||(t[38]=e("div",{class:"preview-header"},[e("span",null,"文档预览")],-1)),e("div",jo,[e("div",Xo,[K.value?(o(),n("div",Zo,[e("div",en,[e("span",null,b(K.value.name),1),e("button",{class:"close-btn",onClick:cs},[S(L(_s))])]),e("div",tn,[oe(K.value)?(o(),n("img",{key:0,src:K.value.url,class:"preview-image",alt:"preview"},null,8,sn)):we(K.value)?(o(),n("video",{key:1,src:K.value.url,controls:"",class:"preview-video"},null,8,an)):ns(K.value)?(o(),n("div",ln,[S(L(ks),{src:K.value.url,class:"doc-preview",onRendered:wt,onError:s.handleError},null,8,["src","onError"])])):is(K.value)?(o(),n("div",on,[S(L(As),{options:ls.value,onRendered:wt,onError:os,src:K.value.url,class:"doc-preview"},null,8,["options","src"])])):rs(K.value)?(o(),n("iframe",{key:4,src:K.value.url,style:{width:"100%",height:"100%"},frameborder:"0"},null,8,nn)):(o(),n("div",rn,[S(L(bs),{class:"large-icon"}),t[37]||(t[37]=e("p",null,"该文件类型暂不支持预览",-1))]))])])):U("",!0)])])],512),[[le,ne.value==="preview"]]),B(e("div",cn,[S(vl,{searchResults:qe.value,loading:Re.value,total:Je.value,message:xe.value},null,8,["searchResults","loading","total","message"])],512),[[le,ne.value==="knowledge"]])])],6))],2))}},gn=re(vn,[["__scopeId","data-v-97f2e7cf"]]);export{gn as default};
|