import{d as F,r as T,D as G,j,o as w,K as D,Y as a,a as y,L as o,c as A,e as $,P as M,Z as q,O as C,U as h,n as H,w as W,_ as re,F as J,$ as Y,M as E,s as P,a0 as me,Q as Z,a1 as _e,a2 as he}from"./@vue-f70ab1bd.js";import{c as ge,a as fe,u as ae,b as ve}from"./vue-router-29025daf.js";import{c as we,u as V}from"./vuex-cc1858c6.js";import{a as ye}from"./axios-707ed124.js";import{_ as ke,N as be,a as le,b as ue,c as Pe,d as Oe,e as ce,f as Le,g as Ae,h as ie,i as Te,j as x,k as Re,u as Ee,l as $e,m as Ce,n as Ie,o as Se,p as Ue,q as Ke,r as Me,s as qe,t as De}from"./naive-ui-ddb574dd.js";import{S as Ne,M as xe,L as Fe,C as Ve,B as ze,P as Be,W as We,a as je,H as X,b as ee,c as te}from"./@vicons-2f3cb6b9.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./evtd-b614532e.js";import"./@css-render-66126308.js";import"./vooks-dfdd6eef.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const n of c)if(n.type==="childList")for(const f of n.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const n={};return c.integrity&&(n.integrity=c.integrity),c.referrerPolicy&&(n.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?n.credentials="include":c.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(c){if(c.ep)return;c.ep=!0;const n=l(c);fetch(c.href,n)}})();const He="modulepreload",Qe=function(e){return"/"+e},oe={},L=function(t,l,i){if(!l||l.length===0)return t();const c=document.getElementsByTagName("link");return Promise.all(l.map(n=>{if(n=Qe(n),n in oe)return;oe[n]=!0;const f=n.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(!!i)for(let k=c.length-1;k>=0;k--){const g=c[k];if(g.href===n&&(!f||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${m}`))return;const v=document.createElement("link");if(v.rel=f?"stylesheet":He,f||(v.as="script",v.crossOrigin=""),v.href=n,document.head.appendChild(v),f)return new Promise((k,g)=>{v.addEventListener("load",k),v.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},Ge=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>L(()=>import("./Home-adef1ded.js"),["assets/Home-adef1ded.js","assets/post-item.vue_vue_type_style_index_0_lang-c48fe5cf.js","assets/content-0b348d1e.js","assets/@vue-f70ab1bd.js","assets/@vicons-2f3cb6b9.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-29a967e9.js","assets/content-cc55174b.css","assets/vuex-cc1858c6.js","assets/vue-router-29025daf.js","assets/formatTime-936c40eb.js","assets/moment-b7869f98.js","assets/post-item-3a63e077.css","assets/post-skeleton-fdf95824.js","assets/post-skeleton-f1900002.css","assets/lodash-3329902d.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/IEnum-ea67d3af.js","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Home-47eb20e2.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"话题详情"},component:()=>L(()=>import("./Post-ea11be7c.js"),["assets/Post-ea11be7c.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/@vue-f70ab1bd.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/vuex-cc1858c6.js","assets/formatTime-936c40eb.js","assets/moment-b7869f98.js","assets/@vicons-2f3cb6b9.js","assets/content-0b348d1e.js","assets/nonesir-video-29a967e9.js","assets/content-cc55174b.css","assets/vue-router-29025daf.js","assets/post-skeleton-fdf95824.js","assets/post-skeleton-f1900002.css","assets/lodash-3329902d.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/IEnum-ea67d3af.js","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Post-03f1477b.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>L(()=>import("./Topic-7bd6ba6c.js"),["assets/Topic-7bd6ba6c.js","assets/@vicons-2f3cb6b9.js","assets/@vue-f70ab1bd.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/vuex-cc1858c6.js","assets/vue-router-29025daf.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Topic-8dbcebb5.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>L(()=>import("./Anouncement-1028ef75.js"),["assets/Anouncement-1028ef75.js","assets/post-skeleton-fdf95824.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/@vue-f70ab1bd.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/vuex-cc1858c6.js","assets/vue-router-29025daf.js","assets/@vicons-2f3cb6b9.js","assets/main-nav-3ef9bae6.css","assets/formatTime-936c40eb.js","assets/moment-b7869f98.js","assets/axios-707ed124.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>L(()=>import("./Profile-b16dccf8.js"),["assets/Profile-b16dccf8.js","assets/post-item.vue_vue_type_style_index_0_lang-c48fe5cf.js","assets/content-0b348d1e.js","assets/@vue-f70ab1bd.js","assets/@vicons-2f3cb6b9.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-29a967e9.js","assets/content-cc55174b.css","assets/vuex-cc1858c6.js","assets/vue-router-29025daf.js","assets/formatTime-936c40eb.js","assets/moment-b7869f98.js","assets/post-item-3a63e077.css","assets/post-skeleton-fdf95824.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Profile-5d71a5c2.css","assets/vfonts-7afd136d.css"])},{path:"/user",name:"user",meta:{title:"用户详情"},component:()=>L(()=>import("./User-63f42059.js"),["assets/User-63f42059.js","assets/post-item.vue_vue_type_style_index_0_lang-c48fe5cf.js","assets/content-0b348d1e.js","assets/@vue-f70ab1bd.js","assets/@vicons-2f3cb6b9.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-29a967e9.js","assets/content-cc55174b.css","assets/vuex-cc1858c6.js","assets/vue-router-29025daf.js","assets/formatTime-936c40eb.js","assets/moment-b7869f98.js","assets/post-item-3a63e077.css","assets/post-skeleton-fdf95824.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/User-4f525d0f.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>L(()=>import("./Messages-b6f6d433.js"),["assets/Messages-b6f6d433.js","assets/@vue-f70ab1bd.js","assets/vue-router-29025daf.js","assets/formatTime-936c40eb.js","assets/moment-b7869f98.js","assets/@vicons-2f3cb6b9.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/vuex-cc1858c6.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Messages-7ed31ecd.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>L(()=>import("./Collection-209a2041.js"),["assets/Collection-209a2041.js","assets/post-item.vue_vue_type_style_index_0_lang-c48fe5cf.js","assets/content-0b348d1e.js","assets/@vue-f70ab1bd.js","assets/@vicons-2f3cb6b9.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-29a967e9.js","assets/content-cc55174b.css","assets/vuex-cc1858c6.js","assets/vue-router-29025daf.js","assets/formatTime-936c40eb.js","assets/moment-b7869f98.js","assets/post-item-3a63e077.css","assets/post-skeleton-fdf95824.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Collection-e1365ea0.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>L(()=>import("./Contacts-d49a42ff.js"),["assets/Contacts-d49a42ff.js","assets/vue-router-29025daf.js","assets/@vue-f70ab1bd.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-fdf95824.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/vuex-cc1858c6.js","assets/@vicons-2f3cb6b9.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Contacts-b60e5e0d.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>L(()=>import("./Wallet-94982dc4.js"),["assets/Wallet-94982dc4.js","assets/post-skeleton-fdf95824.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/@vue-f70ab1bd.js","assets/vueuc-804c4158.js","assets/evtd-b614532e.js","assets/@css-render-66126308.js","assets/vooks-dfdd6eef.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/vuex-cc1858c6.js","assets/vue-router-29025daf.js","assets/@vicons-2f3cb6b9.js","assets/main-nav-3ef9bae6.css","assets/qrcode-23069ad7.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-59d11638.js","assets/formatTime-936c40eb.js","assets/moment-b7869f98.js","assets/axios-707ed124.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>L(()=>import("./Setting-6508bd8c.js"),["assets/Setting-6508bd8c.js","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/vuex-cc1858c6.js","assets/@vue-f70ab1bd.js","assets/vue-router-29025daf.js","assets/vooks-dfdd6eef.js","assets/evtd-b614532e.js","assets/@vicons-2f3cb6b9.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/@css-render-66126308.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>L(()=>import("./404-74e48212.js"),["assets/404-74e48212.js","assets/main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js","assets/vuex-cc1858c6.js","assets/@vue-f70ab1bd.js","assets/vue-router-29025daf.js","assets/vooks-dfdd6eef.js","assets/evtd-b614532e.js","assets/@vicons-2f3cb6b9.js","assets/naive-ui-ddb574dd.js","assets/seemly-76b7b838.js","assets/vueuc-804c4158.js","assets/@css-render-66126308.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],de=ge({history:fe(),routes:Ge});de.beforeEach((e,t,l)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,l()});const Je=we({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",userLogined:!1,userInfo:{id:0,username:"",nickname:""}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:""},e.userLogined=!1}},actions:{},modules:{}}),Q=ye.create({baseURL:"",timeout:3e4});Q.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));Q.interceptors.response.use(e=>{const{data:t={},code:l=0}=(e==null?void 0:e.data)||{};if(+l==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var l;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((l=t==null?void 0:t.data)==null?void 0:l.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function s(e){return Q(e)}const se=e=>s({method:"post",url:"/v1/auth/login",data:e}),Ye=e=>s({method:"post",url:"/v1/auth/register",data:e}),B=(e="")=>s({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),Ze={class:"auth-wrap"},Xe={key:0},et=F({__name:"auth",setup(e){const t=T("true".toLowerCase()==="true"),l=V(),i=T(!1),c=T(),n=G({username:"",password:""}),f=T(),m=G({username:"",password:"",repassword:""}),I={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(g,u)=>!!m.password&&m.password.startsWith(u)&&m.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},v=g=>{var u;g.preventDefault(),g.stopPropagation(),(u=c.value)==null||u.validate(b=>{b||(i.value=!0,se({username:n.username,password:n.password}).then(_=>{const r=(_==null?void 0:_.token)||"";return localStorage.setItem("PAOPAO_TOKEN",r),B(r)}).then(_=>{window.$message.success("登录成功"),i.value=!1,l.commit("updateUserinfo",_),l.commit("triggerAuth",!1),n.username="",n.password=""}).catch(_=>{i.value=!1}))})},k=g=>{var u;g.preventDefault(),g.stopPropagation(),(u=f.value)==null||u.validate(b=>{b||(i.value=!0,Ye({username:m.username,password:m.password}).then(_=>se({username:m.username,password:m.password})).then(_=>{const r=(_==null?void 0:_.token)||"";return localStorage.setItem("PAOPAO_TOKEN",r),B(r)}).then(_=>{window.$message.success("注册成功"),i.value=!1,l.commit("updateUserinfo",_),l.commit("triggerAuth",!1),m.username="",m.password="",m.repassword=""}).catch(_=>{i.value=!1}))})};return j(()=>{const g=localStorage.getItem("PAOPAO_TOKEN")||"";g?B(g).then(u=>{l.commit("updateUserinfo",u),l.commit("triggerAuth",!1)}).catch(u=>{l.commit("userLogout")}):l.commit("userLogout")}),(g,u)=>{const b=ke,_=be,r=le,d=ue,O=Pe,S=Oe,U=ce,R=Le,K=Ae,N=ie,z=Te;return w(),D(z,{show:h(l).state.authModalShow,"onUpdate:show":u[7]||(u[7]=p=>h(l).state.authModalShow=p),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:a(()=>[y("div",Ze,[o(N,{bordered:!1},{default:a(()=>[t.value?C("",!0):(w(),A("div",Xe,[o(r,{justify:"center"},{default:a(()=>[o(_,null,{default:a(()=>[o(b,{type:"success"},{default:a(()=>[$("账号登录")]),_:1})]),_:1})]),_:1}),o(S,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[o(O,{label:"账户",path:"username"},{default:a(()=>[o(d,{value:n.username,"onUpdate:value":u[0]||(u[0]=p=>n.username=p),placeholder:"请输入用户名",onKeyup:M(q(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(O,{label:"密码",path:"password"},{default:a(()=>[o(d,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=p=>n.password=p),placeholder:"请输入账户密码",onKeyup:M(q(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(U,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:v},{default:a(()=>[$(" 登录 ")]),_:1},8,["loading"])])),t.value?(w(),D(K,{key:1,"default-value":h(l).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:a(()=>[o(R,{name:"signin",tab:"登录"},{default:a(()=>[o(S,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[o(O,{label:"账户",path:"username"},{default:a(()=>[o(d,{value:n.username,"onUpdate:value":u[2]||(u[2]=p=>n.username=p),placeholder:"请输入用户名",onKeyup:M(q(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(O,{label:"密码",path:"password"},{default:a(()=>[o(d,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=p=>n.password=p),placeholder:"请输入账户密码",onKeyup:M(q(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(U,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:v},{default:a(()=>[$(" 登录 ")]),_:1},8,["loading"])]),_:1}),o(R,{name:"signup",tab:"注册"},{default:a(()=>[o(S,{ref_key:"registerRef",ref:f,model:m,rules:I},{default:a(()=>[o(O,{label:"用户名",path:"username"},{default:a(()=>[o(d,{value:m.username,"onUpdate:value":u[4]||(u[4]=p=>m.username=p),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),o(O,{label:"密码",path:"password"},{default:a(()=>[o(d,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:m.password,"onUpdate:value":u[5]||(u[5]=p=>m.password=p),onKeyup:M(q(k,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(O,{label:"重复密码",path:"repassword"},{default:a(()=>[o(d,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:m.repassword,"onUpdate:value":u[6]||(u[6]=p=>m.repassword=p),onKeyup:M(q(k,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(U,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:k},{default:a(()=>[$(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):C("",!0)]),_:1})])]),_:1},8,["show"])}}});const pe=(e,t)=>{const l=e.__vccOpts||e;for(const[i,c]of t)l[i]=c;return l},tt=pe(et,[["__scopeId","data-v-52205ad0"]]),Gt=e=>s({method:"get",url:"/v1/posts",params:e}),ot=e=>s({method:"get",url:"/v1/tags",params:e}),Jt=e=>s({method:"get",url:"/v1/post",params:e}),Yt=e=>s({method:"get",url:"/v1/post/star",params:e}),Zt=e=>s({method:"post",url:"/v1/post/star",data:e}),Xt=e=>s({method:"get",url:"/v1/post/collection",params:e}),eo=e=>s({method:"post",url:"/v1/post/collection",data:e}),to=e=>s({method:"get",url:"/v1/post/comments",params:e}),oo=e=>s({method:"get",url:"/v1/user/contacts",params:e}),so=e=>s({method:"post",url:"/v1/post",data:e}),no=e=>s({method:"delete",url:"/v1/post",data:e}),ro=e=>s({method:"post",url:"/v1/post/lock",data:e}),ao=e=>s({method:"post",url:"/v1/post/stick",data:e}),lo=e=>s({method:"post",url:"/v1/post/visibility",data:e}),uo=e=>s({method:"post",url:"/v1/post/comment",data:e}),co=e=>s({method:"delete",url:"/v1/post/comment",data:e}),io=e=>s({method:"post",url:"/v1/post/comment/reply",data:e}),po=e=>s({method:"delete",url:"/v1/post/comment/reply",data:e}),mo=e=>s({method:"post",url:"/v1/topic/stick",data:e}),_o=e=>s({method:"post",url:"/v1/topic/follow",data:e}),ho=e=>s({method:"post",url:"/v1/topic/unfollow",data:e}),st={key:0,class:"rightbar-wrap"},nt={class:"search-wrap"},rt={class:"post-num"},at={class:"post-num"},lt={class:"copyright"},ut=["href"],ct=["href"],it=F({__name:"rightbar",setup(e){const t=T([]),l=T([]),i=T(!1),c=T(""),n=V(),f=ae(),m="2023 paopao.info",I="Roc's Me",v="",k="泡泡(PaoPao)开源社区",g="https://www.paopao.info",u=()=>{i.value=!0,ot({type:"hot_extral",num:12,extral_num:8}).then(d=>{t.value=d.topics,l.value=d.extral_topics??[],r.value=!0,i.value=!1}).catch(d=>{i.value=!1})},b=d=>d>=1e3?(d/1e3).toFixed(1)+"k":d,_=()=>{f.push({name:"home",query:{q:c.value}})},r=H({get:()=>n.state.userLogined&&l.value.length!==0,set:d=>{}});return W(()=>({refreshTopicFollow:n.state.refreshTopicFollow}),(d,O)=>{d.refreshTopicFollow!==O.refreshTopicFollow&&u()}),j(()=>{u()}),(d,O)=>{const S=x,U=ue,R=re("router-link"),K=Re,N=ie,z=le;return h(n).state.collapsedRight?C("",!0):(w(),A("div",st,[y("div",nt,[o(U,{round:"",clearable:"",placeholder:"搜一搜...",value:c.value,"onUpdate:value":O[0]||(O[0]=p=>c.value=p),onKeyup:M(q(_,["prevent"]),["enter"])},{prefix:a(()=>[o(S,{component:h(Ne)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),h(r)?(w(),D(N,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[o(K,{show:i.value},{default:a(()=>[(w(!0),A(J,null,Y(l.value,p=>(w(),A("div",{class:"hot-tag-item",key:p.id},[o(R,{class:"hash-link",to:{name:"home",query:{q:p.tag,t:"tag"}}},{default:a(()=>[$(" #"+E(p.tag),1)]),_:2},1032,["to"]),y("div",rt,E(b(p.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):C("",!0),o(N,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[o(K,{show:i.value},{default:a(()=>[(w(!0),A(J,null,Y(t.value,p=>(w(),A("div",{class:"hot-tag-item",key:p.id},[o(R,{class:"hash-link",to:{name:"home",query:{q:p.tag,t:"tag"}}},{default:a(()=>[$(" #"+E(p.tag),1)]),_:2},1032,["to"]),y("div",at,E(b(p.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),o(N,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:a(()=>[y("div",lt,"© "+E(h(m)),1),y("div",null,[o(z,null,{default:a(()=>[y("a",{href:h(v),target:"_blank",class:"hash-link"},E(h(I)),9,ut),y("a",{href:h(g),target:"_blank",class:"hash-link"},E(h(k)),9,ct)]),_:1})])]),_:1})]))}}});const dt=pe(it,[["__scopeId","data-v-200967dd"]]),go=(e={})=>s({method:"get",url:"/v1/captcha",params:e}),fo=e=>s({method:"post",url:"/v1/captcha",data:e}),vo=e=>s({method:"post",url:"/v1/user/whisper",data:e}),wo=e=>s({method:"post",url:"/v1/friend/requesting",data:e}),yo=e=>s({method:"post",url:"/v1/friend/add",data:e}),ko=e=>s({method:"post",url:"/v1/friend/reject",data:e}),bo=e=>s({method:"post",url:"/v1/friend/delete",data:e}),Po=e=>s({method:"post",url:"/v1/user/phone",data:e}),Oo=e=>s({method:"post",url:"/v1/user/activate",data:e}),Lo=e=>s({method:"post",url:"/v1/user/password",data:e}),Ao=e=>s({method:"post",url:"/v1/user/nickname",data:e}),To=e=>s({method:"post",url:"/v1/user/avatar",data:e}),ne=(e={})=>s({method:"get",url:"/v1/user/msgcount/unread",params:e}),Ro=e=>s({method:"get",url:"/v1/user/messages",params:e}),Eo=e=>s({method:"post",url:"/v1/user/message/read",data:e}),$o=e=>s({method:"get",url:"/v1/user/collections",params:e}),Co=e=>s({method:"get",url:"/v1/user/profile",params:e}),Io=e=>s({method:"get",url:"/v1/user/posts",params:e}),So=e=>s({method:"get",url:"/v1/user/wallet/bills",params:e}),Uo=e=>s({method:"post",url:"/v1/user/recharge",data:e}),Ko=e=>s({method:"get",url:"/v1/user/recharge",params:e}),Mo=e=>s({method:"get",url:"/v1/suggest/users",params:e}),qo=e=>s({method:"get",url:"/v1/suggest/tags",params:e}),Do=e=>s({method:"get",url:"/v1/attachment/precheck",params:e}),No=e=>s({method:"get",url:"/v1/attachment",params:e}),xo=e=>s({method:"post",url:"/v1/admin/user/status",data:e}),pt="/assets/logo-52afee68.png",mt={class:"sidebar-wrap"},_t={class:"logo-wrap"},ht={key:0,class:"user-wrap"},gt={class:"user-info"},ft={class:"nickname"},vt={class:"nickname-txt"},wt={class:"username"},yt={class:"user-mini-wrap"},kt={key:1,class:"user-wrap"},bt={key:0,class:"login-only-wrap"},Pt={key:1,class:"login-wrap"},Ot=F({__name:"sidebar",setup(e){const t=V(),l=ve(),i=ae(),c=T(!1),n=T(l.name||""),f=T(),m=T("true".toLowerCase()==="true");W(l,()=>{n.value=l.name}),W(t.state,()=>{t.state.userInfo.id>0?f.value||(ne().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)}),f.value=setInterval(()=>{ne().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)})},5e3)):f.value&&clearInterval(f.value)}),j(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const I=H(()=>{const r=[{label:"广场",key:"home",icon:()=>P(X),href:"/"},{label:"话题",key:"topic",icon:()=>P(ee),href:"/topic"}];return"false".toLowerCase()==="true"&&r.push({label:"公告",key:"anouncement",icon:()=>P(xe),href:"/anouncement"}),r.push({label:"主页",key:"profile",icon:()=>P(Fe),href:"/profile"}),r.push({label:"消息",key:"messages",icon:()=>P(Ve),href:"/messages"}),r.push({label:"收藏",key:"collection",icon:()=>P(ze),href:"/collection"}),r.push({label:"好友",key:"contacts",icon:()=>P(Be),href:"/contacts"}),"false".toLocaleLowerCase()==="true"&&r.push({label:"钱包",key:"wallet",icon:()=>P(We),href:"/wallet"}),r.push({label:"设置",key:"setting",icon:()=>P(je),href:"/setting"}),t.state.userInfo.id>0?r:[{label:"广场",key:"home",icon:()=>P(X),href:"/"},{label:"话题",key:"topic",icon:()=>P(ee),href:"/topic"}]}),v=r=>"href"in r?P("div",{},r.label):r.label,k=r=>r.key==="messages"?P($e,{dot:!0,show:c.value,processing:!0},{default:()=>P(x,{color:r.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:r.icon})}):P(x,null,{default:r.icon}),g=(r,d={})=>{n.value=r,i.push({name:r})},u=()=>{l.path==="/"&&t.commit("refresh"),g("home")},b=r=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",r)},_=()=>{t.commit("userLogout"),u()};return window.$store=t,window.$message=Ee(),(r,d)=>{const O=Ce,S=Ie,U=Se,R=ce;return w(),A("div",mt,[y("div",_t,[o(O,{class:"logo-img",width:"36",src:h(pt),"preview-disabled":!0,onClick:u},null,8,["src"])]),o(S,{accordion:!0,"icon-size":24,options:h(I),"render-label":v,"render-icon":k,value:n.value,"onUpdate:value":g},null,8,["options","value"]),h(t).state.userInfo.id>0?(w(),A("div",ht,[o(U,{class:"user-avatar",round:"",size:34,src:h(t).state.userInfo.avatar},null,8,["src"]),y("div",gt,[y("div",ft,[y("span",vt,E(h(t).state.userInfo.nickname),1),o(R,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:_},{icon:a(()=>[o(h(x),null,{default:a(()=>[o(h(te))]),_:1})]),_:1})]),y("div",wt,"@"+E(h(t).state.userInfo.username),1)]),y("div",yt,[o(R,{class:"logout",quaternary:"",circle:"",onClick:_},{icon:a(()=>[o(h(x),{size:24},{default:a(()=>[o(h(te))]),_:1})]),_:1})])])):(w(),A("div",kt,[m.value?C("",!0):(w(),A("div",bt,[o(R,{strong:"",secondary:"",round:"",type:"primary",onClick:d[0]||(d[0]=K=>b("signin"))},{default:a(()=>[$(" 登录 ")]),_:1})])),m.value?(w(),A("div",Pt,[o(R,{strong:"",secondary:"",round:"",type:"primary",onClick:d[1]||(d[1]=K=>b("signin"))},{default:a(()=>[$(" 登录 ")]),_:1}),o(R,{strong:"",secondary:"",round:"",type:"info",onClick:d[2]||(d[2]=K=>b("signup"))},{default:a(()=>[$(" 注册 ")]),_:1})])):C("",!0)]))])}}});const Lt={"has-sider":"",class:"main-wrap",position:"static"},At={key:0},Tt={class:"content-wrap"},Rt=F({__name:"App",setup(e){const t=V(),l=H(()=>t.state.theme==="dark"?Ke:null);return(i,c)=>{const n=Ot,f=re("router-view"),m=dt,I=tt,v=Me,k=qe,g=De,u=Ue;return w(),D(u,{theme:h(l)},{default:a(()=>[o(k,null,{default:a(()=>[o(v,null,{default:a(()=>{var b;return[y("div",{class:_e(["app-container",{dark:((b=h(l))==null?void 0:b.name)==="dark"}])},[y("div",Lt,[h(t).state.desktopModelShow?(w(),A("div",At,[o(n)])):C("",!0),y("div",Tt,[o(f,{class:"app-wrap"},{default:a(({Component:_})=>[(w(),D(me,null,[i.$route.meta.keepAlive?(w(),D(Z(_),{key:0})):C("",!0)],1024)),i.$route.meta.keepAlive?C("",!0):(w(),D(Z(_),{key:0}))]),_:1})]),o(m)]),o(I)],2)]}),_:1})]),_:1}),o(g)]),_:1},8,["theme"])}}});he(Rt).use(de).use(Je).mount("#app");export{bo as A,xo as B,yo as C,ko as D,Eo as E,Ro as F,$o as G,Do as H,No as I,oo as J,B as K,So as L,Uo as M,Ko as N,go as O,To as P,Lo as Q,Po as R,Oo as S,Ao as T,fo as U,Ot as V,pe as _,qo as a,Gt as b,so as c,io as d,po as e,co as f,Mo as g,uo as h,Yt as i,Xt as j,no as k,ro as l,eo as m,Jt as n,to as o,Zt as p,mo as q,_o as r,ao as s,ot as t,ho as u,lo as v,Io as w,vo as x,wo as y,Co as z};