You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/Home-0382696a.js

2 lines
21 KiB

import{_ as Te}from"./whisper-d959da10.js";import{_ as Ue,a as Ee}from"./post-item.vue_vue_type_style_index_0_lang-d5631a43.js";import{_ as Ve}from"./post-skeleton-47a1ebec.js";import{d as _e,H as n,c as ce,b as ge,e as d,f as y,bf as B,j as A,k as a,w as l,q as O,Y as k,y as ve,A as L,x as $,F as pe,u as de,E as Ne}from"./@vue-a481fc63.js";import{u as fe}from"./vuex-44de225f.js";import{l as me}from"./lodash-e0b37ac3.js";import{g as xe,a as Re,c as qe,b as Ge,d as Oe,e as Pe,_ as Ye}from"./index-5faa66a7.js";import{p as Fe}from"./content-2d41ca0a.js";import{V as G,P as Q}from"./IEnum-5453a777.js";import{I as Le,V as Se,A as Me,d as Ke,E as We}from"./@vicons-7a4ef312.js";import{o as he,v as je,j as Qe,e as He,w as Ze,x as Je,y as Xe,z as $e,A as et,B as tt,C as at,a as we,D as st,E as ot,F as nt,G as lt,l as it,H as rt,I as ut,k as ct}from"./naive-ui-d8de3dda.js";import{_ as pt}from"./main-nav.vue_vue_type_style_index_0_lang-0888b762.js";import{b as dt,u as vt}from"./vue-router-e5a2430e.js";import{W as mt}from"./v3-infinite-loading-2c58ec2f.js";import{S as _t}from"./@opentiny-d73a2d67.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.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";import"./paopao-video-player-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const gt=H=>{const Y=new FileReader,b=i=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(i),T=()=>{const i=new Uint8Array(Y.result).subarray(0,4);let U="";for(let g=0;g<i.length;g++)U+=i[g].toString(16);switch(U){case"504b0304":case"504b0506":case"504b0708":return b("application/zip");case"504b030414":return b("application/x-zip-compressed");case"504b0508":return b("application/x-zip");case"504b5370":return b("application/octet-stream");default:return!1}};return new Promise((i,U)=>{Y.onloadend=()=>{const g=H.type;i(g===""||g==="application/octet-stream"?T():b(g))},Y.readAsArrayBuffer(H.slice(0,4))})},ft={key:0,class:"compose-wrap"},ht={class:"compose-line"},wt={class:"compose-user"},yt={class:"compose-line compose-options"},kt={class:"attachment"},At={class:"submit-wrap"},bt={class:"attachment-list-wrap"},Ct={key:0,class:"attachment-price-wrap"},zt=A("span",null," 附件价格¥",-1),It={key:0,class:"eye-wrap"},Dt={key:1,class:"link-wrap"},Bt={key:1,class:"compose-wrap"},Tt=A("div",{class:"login-wrap"},[A("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Ut={key:0,class:"login-only-wrap"},Et={key:1,class:"login-wrap"},Vt=_e({__name:"compose",emits:["post-success"],setup(H,{emit:Y}){const b=fe(),T=n([]),i=n(!1),U=n(!1),g=n(!1),P=n(!1),f=n(""),x=n([]),E=n(),V=n(0),m=n("public/image"),I=n([]),v=n([]),h=n([]),C=n([]),D=n(G.PUBLIC),R=n(G.PUBLIC),M="true".toLowerCase()==="true",F=+"400",Z=n("true".toLowerCase()==="true"),J=n("true".toLowerCase()==="true"),ee=n("true".toLowerCase()==="true"),S=n("false".toLowerCase()==="true"),te=n("true".toLowerCase()==="true"),K="/v1/attachment",q=ce(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),X=ce(()=>{let e=[{value:G.PUBLIC,label:"公开"},{value:G.PRIVATE,label:"私密"},{value:G.Following,label:"关注可见"}];return M&&e.push({value:G.FRIEND,label:"好友可见"}),e}),ae=()=>{g.value=!g.value,g.value&&P.value&&(P.value=!1)},W=()=>{P.value=!P.value,P.value&&g.value&&(g.value=!1)},se=me.debounce(e=>{xe({k:e}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),T.value=o,i.value=!1}).catch(t=>{i.value=!1})},200),c=me.debounce(e=>{Re({k:e}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),T.va