import{u as M}from"./vue-i18n-90d534a9.js";import{u as D}from"./vue-router-7f882520.js";import{z as y,A as N,o as B,_ as S}from"./index-ae60edf9.js";import{N as U}from"./index-597402db.js";import{f as C}from"./moments-b220a7da.js";import{b as L}from"./background-07f14e35.js";import{c as q}from"./@vueuse-19adab01.js";import{d as A}from"./dayjs-4460abc8.js";import{d as Y,b as E,l as g,ar as R,j as K,k as X,o as c,c as i,$ as x,bj as F,a as s,u as p,aX as d,F as w,aI as k,P as T,aD as z,aA as V}from"./@vue-cb50a1c4.js";import"./@intlify-1c0af683.js";import"./open-im-sdk-wasm-f19f04ec.js";import"./pinia-de4079f2.js";import"./axios-7d5a0a64.js";import"./form-data-497f8b5e.js";import"./@amap-aca98dec.js";import"./uuid-a960c1f4.js";import"./date-fns-f56f60e6.js";import"./@babel-7fd5df1e.js";import"./mitt-f7ef348c.js";import"./livekit-client-ca552de3.js";import"./@livekit-3058dbe8.js";import"./loglevel-e40a507a.js";import"./rxjs-2154ddb2.js";import"./tslib-8dbab242.js";import"./@vuemap-5ebdc63e.js";import"./lodash-es-91418b19.js";const O="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAZCAYAAAA8CX6UAAAAAXNSR0IArs4c6QAAAdJJREFUSEudlD9IllEUxn8PLVZTCGF/DEwa2ixqqK2lHCIUIodMgoqipaAt4guCoAKJIJQaKgjBFhcR0yVoaXAQ3aShiNIIoq1a4onz8b5xu6bv+3XHwzk/7r3P8xzxn8f2U6AHWATOqlWO7b3AFNCVzI62BLJ9DrgJdCaQn1GrDbL9BOgDtiSQL8B9SXcqQba3A9NAN7A5gXwErkiaiNq6INsngWFgV/aXC0CvpM9lfU2Q7bvAENCRQL4BE5LO5yKtAtmO678E9gObsqc0JIXsq85fINuHgRfAzqzzA3BU0tJadvkDsn0NuJpBfgAzkvqr/NYEFS49lT1lGbgn6UEVpKma7XFgIGsOSJ+kuTqQEhTNB5KBT8BBSSt1ISXoMXAhGwrYGUmv6sLKPxqNBANtmf0fSWrUgaWqXQZuANuSwe/Aa+C4pF/rAXMf7QMmgR3ZUOTqhKT5Sh+VDbY3ALPAIWBjMhhK3pY0UunstMH2LeAisDWpf434SBqszFoGOwI8/8dT3wLHJL0r++vso/aICRArNg3x+xBH0ljTR3WkLWIUFokNma6VMO0zSddrgwrYaSD2VKpqBLvREqiA7S721Z7kNQ9bBiU2iZv1Am8kXfoNjsGRH5CzPFMAAAAASUVORK5CYII=",Q=m=>(z("data-v-b21c284e"),m=m(),V(),m),J={class:"page_container !bg-white"},j=["src"],G={class:"relative"},W=["src"],H={class:"!absolute right-[14px] bottom-[-58px] flex h-[48px] items-center justify-center nickname"},P={class:"mt-16"},Z=["onClick"],$={class:"flex w-[60px] justify-center font-semibold"},tt={key:0},et={key:0,class:"mb-2 flex flex-1 flex-row px-3"},st=["src"],ot={class:"ml-2 flex h-[90px] flex-1 flex-col items-start justify-between"},at={class:"w-full overflow-hidden break-all line-clamp-3"},rt={class:"text-sm text-sub-text"},nt={key:1,class:"mb-2 flex flex-1 flex-row overflow-hidden px-3"},ct={class:"w-full bg-[#E8EAEF] px-2 py-3"},it={class:"w-full overflow-hidden break-all line-clamp-2"},lt=Q(()=>s("div",{class:"h-10"},null,-1)),dt=Y({__name:"index",setup(m){const u=E(null),l=g({userID:"",nickname:"",faceURL:""}),{t:f}=M(),_=D();R(()=>{const t=history.state;l.userID=t.userID,l.nickname=t.nickname,l.faceURL=t.faceURL}),K(()=>{h()}),q(u,()=>{h()},{distance:50});const o=g({workMoments:[],loading:!1,hasMore:!0,current:1}),v=X(()=>{const t=new Map,r=A().format("YYYY-MM-DD");return o.workMoments.forEach(n=>{const a=A.unix(n.createTime/1e3);if(a.format("YYYY-MM-DD")===r){const e=f("date.today");t.has(e)||t.set(e,[]),t.get(e).push(n)}else if(a.add(1,"day").format("YYYY-MM-DD")===r){const e=f("date.yesterday");t.has(e)||t.set(e,[]),t.get(e).push(n)}else{const e=a.format("MM-DD");t.has(e)||t.set(e,[]),t.get(e).push(n)}}),Array.from(t,([n,a])=>({date:n,objects:a}))}),h=async()=>{var r;if(console.log("fetchData"),!o.hasMore||o.loading)return;o.loading=!0,y({message:f("loading"),forbidClick:!0,duration:0});const{data:t}=await C(o.current,l.userID+"");o.workMoments=[...o.workMoments,...t.workMoments??[]],o.current++,o.hasMore=((r=t.workMoments)==null?void 0:r.length)===20,o.loading=!1,N()},b=t=>{_.push({path:"/momentsDetails",query:{workMomentID:t}})};return(t,r)=>{const n=U;return c(),i("div",J,[x(n,{title:"",placeholder:"",fixed:"","left-arrow":"",clickable:!1,border:!1,onClickLeft:r[0]||(r[0]=a=>p(_).back())},{left:F(()=>[s("img",{class:"h-5 w-3",src:p(O),alt:""},null,8,j)]),_:1}),s("div",{class:"overflow-hidden overflow-y-auto",ref_key:"el",ref:u},[s("div",G,[s("img",{class:"mt-[-46px]",src:p(L),alt:""},null,8,W),x(B,{class:"!absolute bottom-[-18px] right-4",size:48,src:l.faceURL,desc:l.nickname},null,8,["src","desc"]),s("div",H,d(l.nickname),1)]),(c(!0),i(w,null,k(p(v),a=>(c(),i("div",P,[(c(!0),i(w,null,k(a.objects,(e,I)=>(c(),i("div",{class:"flex items-start",onClick:mt=>b(e.workMomentID)},[s("div",$,[I===0?(c(),i("span",tt,d(a.date),1)):T("",!0)]),e.content.metas.length>0?(c(),i("div",et,[s("img",{class:"h-[90px] w-[90px]",src:e.content.metas[0].thumb},null,8,st),s("view",ot,[s("span",at,d(e.content.text),1),s("span",rt,d(t.$t("momentsTips.total",{total:e.content.metas.length})),1)])])):(c(),i("div",nt,[s("div",ct,[s("span",it,d(e.content.text),1)])]))],8,Z))),256))]))),256)),lt],512)])}}});const Kt=S(dt,[["__scopeId","data-v-b21c284e"]]);export{Kt as default};
