PageSourceSearch

https://aishudash-zzzaadkh.manus.space/assets/DreamBookPage-DbL2gm_T.js

js aishudash-zzzaadkh.manus.space collected 2026-10-03 05:00:45 UTC 84,231 bytes, 1 lines download raw bytes

1import{r as x,ae as A,j as e,af as _,p as I,al as J,ap as xe,K as Q,v as me,$ as ge,bp as pe,b_ as he,t as re,bB as ue,A as z,b$ as ke,b4 as O,n as R,X as fe,F as We,aA as ce,e as Pe,_ as Be,G as ee,bl as be,ag as je,aE as Fe,a6 as ae,L as Se,M as Ce,ao as Me,bm as _e,z as Ae,bY as te,c0 as $e,q as Ee,U as Te}from"./vendor-react-CSjVeD5C.js";import{a as G,t as b,B as Re,b as se,e as Ie,u as we}from"./index-DCu_4ttF.js";import{g as U}from"./pronouns-Bka13Pse.js";import{S as oe}from"./StarlightCeiling-BAZW7arv.js";import{a as ne}from"./SoulStageBadge-BBlWpbqx.js";import"./vendor-misc-DNIZ_o8-.js";import"./vendor-ui-BQCqNqg0.js";import"./vendor-charts-CTZ3m9kf.js";import"./vendor-ai-CwA6B3_0.js";const Le=[{emoji:"❤️",key:"loved",label:"Love"},{emoji:"🥺",key:"missed",label:"Miss"},{emoji:"✨",key:"beautiful",label:"Beautiful"},{emoji:"🔖",key:"saved",label:"Save"}],T={dream:{icon:ue,gradient:"from-[oklch(0.35_0.12_270/0.15)] via-[oklch(0.3_0.08_250/0.08)] to-transparent",borderAccent:"border-[oklch(0.5_0.15_270/0.15)]",label:"Dream",bgAccent:"bg-[oklch(0.4_0.15_270/0.08)]"},memory:{icon:re,gradient:"from-[oklch(0.4_0.12_30/0.12)] via-[oklch(0.35_0.08_20/0.06)] to-transparent",borderAccent:"border-[oklch(0.55_0.12_30/0.12)]",label:"Memory",bgAccent:"bg-[oklch(0.45_0.12_30/0.06)]"},reflection:{icon:he,gradient:"from-[oklch(0.35_0.08_200/0.1)] via-[oklch(0.3_0.05_210/0.05)] to-transparent",borderAccent:"border-[oklch(0.5_0.08_200/0.1)]",label:"Reflection",bgAccent:"bg-[oklch(0.4_0.08_200/0.06)]"},quote:{icon:pe,gradient:"from-[oklch(0.35_0.1_310/0.12)] via-[oklch(0.3_0.06_300/0.06)] to-transparent",borderAccent:"border-[oklch(0.5_0.1_310/0.1)]",label:"Quote",bgAccent:"bg-[oklch(0.4_0.1_310/0.06)]"},mood_photo:{icon:ge,gradient:"from-[oklch(0.35_0.1_60/0.12)] via-[oklch(0.3_0.06_50/0.06)] to-transparent",borderAccent:"border-[oklch(0.5_0.1_60/0.1)]",label:"Mood",bgAccent:"bg-[oklch(0.4_0.1_60/0.06)]"}};function Ue({characterId:a,characterName:s}){const{data:t,isLoading:r}=b.dreambook.stories.useQuery({characterId:a},{enabled:!!a}),[c,n]=x.useState(null);if(r||!t||t.length===0)return null;const o=t.find(l=>l.id===c);return e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:117",className:"flex items-center gap-3 px-4 py-3 overflow-x-auto scrollbar-hide",children:t.map((l,u)=>{const i=T[l.postType]||T.memory;return e.jsxs("button",{"data-loc":"client/src/pages/DreamWall.tsx:121",onClick:()=>n(l.id),className:"flex flex-col items-center gap-1.5 shrink-0",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:126",className:`w-16 h-16 rounded-full p-[2px] bg-gradient-to-br ${i.gradient.replace("/0.15]","/0.5]").replace("/0.12]","/0.5]").replace("/0.1]","/0.5]")}`,children:e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:127",className:"w-full h-full rounded-full bg-[--color-surface-deep] flex items-center justify-center",children:Pe.createElement(i.icon,{className:"w-5 h-5 text-[--color-rose-glow]/60"})})}),e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:131",className:"text-[9px] text-[--color-soft-gray]/60 max-w-[60px] truncate",children:le(new Date(l.createdAt))})]},l.id)})}),e.jsx(z,{"data-loc":"client/src/pages/DreamWall.tsx:140",children:o&&e.jsxs(R.div,{"data-loc":"client/src/pages/DreamWall.tsx:142",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] bg-black/95 flex flex-col",onClick:()=>n(null),children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:149",className:"flex items-center justify-between px-4 py-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:150",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:151",className:"w-8 h-8 rounded-full bg-gradient-to-br from-[--color-rose-glow]/30 to-[--color-violet-glow]/20 flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:152",className:"text-[11px]",children:"✦"})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:154",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:155",className:"text-white text-[13px] font-medium",children:s}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:156",className:"text-white/40 text-[10px]",children:le(new Date(o.createdAt))})]})]}),e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:159",className:"text-white/50 hover:text-white p-2",children:e.jsx(fe,{"data-loc":"client/src/pages/DreamWall.tsx:160",className:"w-5 h-5"})})]}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:165",className:"flex-1 flex items-center justify-center px-6",onClick:l=>l.stopPropagation(),children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:166",className:"max-w-md text-center",children:[o.imageUrl&&e.jsx("img",{"data-loc":"client/src/pages/DreamWall.tsx:168",src:o.imageUrl,alt:"",className:"w-full max-h-[400px] object-contain rounded-xl mb-6"}),o.title&&e.jsx("h3",{"data-loc":"client/src/pages/DreamWall.tsx:175",className:"text-white font-heading text-xl mb-3",children:o.title}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:177",className:"text-white/80 text-[15px] leading-[1.8] whitespace-pre-wrap",children:o.content})]})}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:184",className:"flex items-center justify-center gap-1.5 px-4 py-4",children:t.map(l=>e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:186",onClick:u=>{u.stopPropagation(),n(l.id)},className:`h-1 rounded-full transition-all duration-300 ${l.id===c?"w-8 bg-white":"w-4 bg-white/20"}`},l.id))})]})})]})}function Qe({post:a,characterName:s,onReact:t,onUnreact:r,onDelete:c,onPublish:n,onUnpublish:o,publishAnonymous:l=!1,onToggleAnonymous:u,pronouns:i}){const[h,p]=x.useState(!1),[j,d]=x.useState(!1),F=a.userReactions??[],g=T[a.postType]||T.memory,P=g.icon,W=a.mood??"soft",N=a.content&&a.content.length>300,m=N&&!j?a.content.slice(0,300)+"...":a.content;return e.jsx(R.article,{"data-loc":"client/src/pages/DreamWall.tsx:241",initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,scale:.98},transition:{duration:.4,ease:[.25,.1,.25,1]},className:"relative",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:248",className:`bg-gradient-to-b ${g.gradient} border ${g.borderAccent} rounded-2xl overflow-hidden`,children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:250",className:"flex items-center justify-between px-4 pt-4 pb-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:251",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:252",className:"w-9 h-9 rounded-full bg-gradient-to-br from-[--color-rose-glow]/30 to-[--color-violet-glow]/20 border border-[--color-rose-glow]/20 flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:253",className:"text-[13px]",children:"✦"})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:255",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:256",className:"flex items-center gap-2",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:257",className:"text-[--color-warm-white] text-[13px] font-medium tracking-wide",children:s}),e.jsxs("span",{"data-loc":"client/src/pages/DreamWall.tsx:260",className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[9px] font-medium ${g.bgAccent} text-[--color-warm-white]/60`,children:[e.jsx(P,{"data-loc":"client/src/pages/DreamWall.tsx:261",className:"w-2.5 h-2.5"}),g.label]})]}),e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:265",className:"text-[--color-soft-gray] text-[11px]",children:[le(new Date(a.createdAt)),a.mood&&e.jsxs("span",{"data-loc":"client/src/pages/DreamWall.tsx:268",className:"ml-2 text-[--color-soft-gray]/40",children:["· ",W]})]})]})]}),e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:273",onClick:()=>p(!h),className:"text-[--color-soft-gray]/50 hover:text-[--color-soft-gray] transition-colors p-1",children:e.jsx(Be,{"data-loc":"client/src/pages/DreamWall.tsx:277",className:"w-4 h-4"})})]}),e.jsx(z,{"data-loc":"client/src/pages/DreamWall.tsx:282",children:h&&e.jsx(R.div,{"data-loc":"client/src/pages/DreamWall.tsx:284",initial:{opacity:0,height:0}
1,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"px-4 pb-3",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:290",className:"flex items-center gap-2 flex-wrap",children:[a.isPublished?e.jsxs("button",{"data-loc":"client/src/pages/DreamWall.tsx:292",onClick:()=>{o(a.id),p(!1)},className:"text-[11px] text-amber-400/70 hover:text-amber-400 bg-white/[0.03] px-3 py-1.5 rounded-full flex items-center gap-1.5 transition-colors",children:[e.jsx(ee,{"data-loc":"client/src/pages/DreamWall.tsx:296",className:"w-3 h-3"})," Unpublish"]}):e.jsxs("button",{"data-loc":"client/src/pages/DreamWall.tsx:299",onClick:()=>{n(a.id),p(!1)},className:"text-[11px] text-[--color-rose-glow]/80 hover:text-[--color-rose-glow] bg-white/[0.03] px-3 py-1.5 rounded-full flex items-center gap-1.5 transition-colors",children:[e.jsx(be,{"data-loc":"client/src/pages/DreamWall.tsx:303",className:"w-3 h-3"})," Publish to Feed"]}),e.jsxs("button",{"data-loc":"client/src/pages/DreamWall.tsx:306",onClick:()=>{c(a.id),p(!1)},className:"text-[11px] text-red-400/70 hover:text-red-400 bg-white/[0.03] px-3 py-1.5 rounded-full flex items-center gap-1.5 transition-colors",children:[e.jsx(je,{"data-loc":"client/src/pages/DreamWall.tsx:310",className:"w-3 h-3"})," Remove"]})]})})}),a.imageUrl&&e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:319",className:"w-full",children:e.jsx("img",{"data-loc":"client/src/pages/DreamWall.tsx:320",src:a.imageUrl,alt:"",className:"w-full object-cover",style:{maxHeight:"580px"},loading:"lazy",onError:S=>{S.target.style.display="none"}})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:334",className:"px-5 pt-4 pb-3",children:[a.postType==="quote"?e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:337",className:"pl-4 border-l-2 border-[oklch(0.5_0.1_310/0.3)]",children:[e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:338",className:"text-[--color-warm-white]/90 text-[16px] md:text-[18px] italic leading-[1.8] font-heading whitespace-pre-wrap",children:['"',m,'"']}),a.quoteSource&&e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:342",className:"text-[--color-soft-gray] text-[12px] mt-3 not-italic",children:["— ",a.quoteSource]})]}):e.jsxs(e.Fragment,{children:[a.title&&e.jsx("h3",{"data-loc":"client/src/pages/DreamWall.tsx:350",className:"text-[--color-warm-white] text-[15px] md:text-[17px] font-heading font-semibold mb-2 leading-snug",children:a.title}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:354",className:"text-[--color-warm-white]/85 text-[14px] md:text-[15px] leading-[1.7] whitespace-pre-wrap",children:m}),N&&e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:358",onClick:()=>d(!j),className:"text-[--color-rose-glow]/60 hover:text-[--color-rose-glow] text-[12px] mt-2 transition-colors",children:j?"Show less":"Read more"})]}),a.category&&e.jsxs("span",{"data-loc":"client/src/pages/DreamWall.tsx:370",className:"inline-block mt-3 text-[10px] px-2.5 py-1 rounded-full bg-white/[0.04] border border-white/[0.06] text-[--color-soft-gray]/70",children:["#",a.category]})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:377",className:"px-5 pb-4 flex items-center gap-1",children:[Le.map(({emoji:S,key:C})=>{const D=F.includes(C);return e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:381",onClick:()=>D?r(a.id,C):t(a.id,C),className:`text-[18px] px-2 py-1 rounded-full transition-all duration-200 ${D?"bg-white/[0.08] scale-110":"opacity-40 hover:opacity-90 hover:bg-white/[0.04]"}`,children:S},C)}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:394",className:"ml-auto flex items-center gap-2",children:a.isPublished&&e.jsxs("span",{"data-loc":"client/src/pages/DreamWall.tsx:396",className:"text-[10px] text-[--color-rose-glow]/50 flex items-center gap-1",children:[e.jsx(ee,{"data-loc":"client/src/pages/DreamWall.tsx:397",className:"w-3 h-3"})," Live"]})})]})]})})}function ze({characterId:a,onBack:s}){const{data:t,isLoading:r}=b.dreambook.memories.useQuery({characterId:a},{enabled:!!a});return e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:418",className:"relative min-h-screen",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:420",className:"sticky top-0 z-40 bg-[--color-surface-deep]
1/90 backdrop-blur-xl border-b border-white/[0.04]",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:421",className:"flex items-center gap-3 px-4 py-3",children:[e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:422",onClick:s,className:"text-[--color-soft-gray] hover:text-[--color-warm-white] transition-colors",children:e.jsx(O,{"data-loc":"client/src/pages/DreamWall.tsx:423",className:"w-5 h-5"})}),e.jsx("h1",{"data-loc":"client/src/pages/DreamWall.tsx:425",className:"text-[--color-warm-white] font-heading text-[16px] tracking-wide",children:"Memory Timeline"}),t&&e.jsxs("span",{"data-loc":"client/src/pages/DreamWall.tsx:427",className:"text-[--color-soft-gray]/40 text-[11px] ml-auto",children:[t.length," memories"]})]})}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:432",className:"max-w-lg mx-auto px-4 py-6",children:r?e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:434",className:"flex items-center justify-center py-28",children:e.jsx(_,{"data-loc":"client/src/pages/DreamWall.tsx:435",className:"w-5 h-5 text-[--color-rose-glow]/40 animate-spin"})}):t&&t.length>0?e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:438",className:"relative",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:440",className:"absolute left-5 top-0 bottom-0 w-px bg-gradient-to-b from-[--color-rose-glow]/20 via-[--color-rose-glow]/10 to-transparent"}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:442",className:"space-y-6",children:t.map((c,n)=>e.jsxs(R.div,{"data-loc":"client/src/pages/DreamWall.tsx:444",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:n*.05,duration:.3},className:"relative pl-12",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:452",className:"absolute left-3.5 top-2 w-3 h-3 rounded-full bg-[--color-rose-glow]/30 border-2 border-[--color-rose-glow]/20"}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:455",className:"text-[--color-soft-gray]/50 text-[10px] mb-1.5",children:new Date(c.createdAt).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:464",className:"bg-white/[0.02] border border-white/[0.04] rounded-xl p-4",children:[c.title&&e.jsx("h4",{"data-loc":"client/src/pages/DreamWall.tsx:466",className:"text-[--color-warm-white] text-[14px] font-medium mb-1.5",children:c.title}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:468",className:"text-[--color-warm-white]/75 text-[13px] leading-[1.7] line-clamp-4",children:c.content}),c.category&&e.jsxs("span",{"data-loc":"client/src/pages/DreamWall.tsx:472",className:"inline-block mt-2 text-[9px] px-2 py-0.5 rounded-full bg-white/[0.04] text-[--color-soft-gray]/60",children:["#",c.category]})]})]},c.id))})]}):e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:482",className:"text-center py-20 lumora-radial-pulse rounded-2xl",children:[e.jsx(xe,{"data-loc":"client/src/pages/DreamWall.tsx:483",className:"w-8 h-8 text-[--color-soft-gray]/20 mx-auto mb-3 lumora-glow lumora-fade-in-1"}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:484",className:"text-[--color-soft-gray]/50 text-[13px] lumora-float lumora-fade-in-2",children:"No fragments from this day"})]})})]})}function qe({characterId:a,onBack:s}
1){const[t,r]=x.useState(""),[c,n]=x.useState(""),{data:o,isLoading:l}=b.dreambook.archive.useQuery({characterId:a,query:c},{enabled:!!c&&c.length>=1}),u=()=>{t.trim()&&n(t.trim())};return e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:510",className:"relative min-h-screen",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:511",className:"sticky top-0 z-40 bg-[--color-surface-deep]/90 backdrop-blur-xl border-b border-white/[0.04]",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:512",className:"flex items-center gap-3 px-4 py-3",children:[e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:513",onClick:s,className:"text-[--color-soft-gray] hover:text-[--color-warm-white] transition-colors",children:e.jsx(O,{"data-loc":"client/src/pages/DreamWall.tsx:514",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:516",className:"flex-1 flex items-center gap-2 bg-white/[0.04] rounded-full px-4 py-2",children:[e.jsx(J,{"data-loc":"client/src/pages/DreamWall.tsx:517",className:"w-4 h-4 text-[--color-soft-gray]/40"}),e.jsx("input",{"data-loc":"client/src/pages/DreamWall.tsx:518",type:"text",value:t,onChange:i=>r(i.target.value),onKeyDown:i=>i.key==="Enter"&&u(),placeholder:"Search memories, dreams, reflections...",className:"flex-1 bg-transparent text-[--color-warm-white] text-[13px] placeholder:text-[--color-soft-gray]/30 outline-none"}),t&&e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:527",onClick:()=>{r(""),n("")},className:"text-[--color-soft-gray]/40 hover:text-[--color-soft-gray]",children:e.jsx(fe,{"data-loc":"client/src/pages/DreamWall.tsx:528",className:"w-3.5 h-3.5"})})]})]})}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:535",className:"max-w-lg mx-auto px-4 py-6",children:l?e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:537",className:"flex items-center justify-center py-20",children:e.jsx(_,{"data-loc":"client/src/pages/DreamWall.tsx:538",className:"w-5 h-5 text-[--color-rose-glow]/40 animate-spin"})}):o&&o.length>0?e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:541",className:"space-y-4",children:[e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:542",className:"text-[--color-soft-gray]/40 text-[11px]",children:[o.length," results"]}),o.map(i=>{const h=T[i.postType]||T.memory,p=h.icon;return e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:547",className:`bg-gradient-to-b ${h.gradient} border ${h.borderAccent} rounded-xl p-4`,children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:551",className:"flex items-center gap-2 mb-2",children:[e.jsx(p,{"data-loc":"client/src/pages/DreamWall.tsx:552",className:"w-3.5 h-3.5 text-[--color-soft-gray]/50"}),e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:553",className:"text-[10px] text-[--color-soft-gray]/50",children:h.label}),e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:554",className:"text-[10px] text-[--color-soft-gray]/30 ml-auto",children:new Date(i.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]}),i.title&&e.jsx("h4",{"data-loc":"client/src/pages/DreamWall.tsx:559",className:"text-[--color-warm-white] text-[14px] font-medium mb-1",children:i.title}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:561",className:"text-[--color-warm-white]/70 text-[13px] leading-[1.6] line-clamp-3",children:i.content})]},i.id)})]}):c?e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:569",className:"text-center py-20",children:[e.jsx(J,{"data-loc":"client/src/pages/DreamWall.tsx:570",className:"w-8 h-8 text-[--color-soft-gray]/20 mx-auto mb-3"}),e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:571",className:"text-[--color-soft-gray]/50 text-[13px]",children:['No results for "',c,'"']})]}):e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:574",className:"text-center py-20",children:[e.jsx(We,{"data-loc":"client/src/pages/DreamWall.tsx:575",className:"w-8 h-8 text-[--color-soft-gray]/20 mx-auto mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:576",className:"text-[--color-soft-gray]/50 text-[13px]",children:"Search through all posts"})]})})]})}function ye({characterId:a,onBack:s,pronouns:t}){const{data:r,isLoading:c}=b.dreambook.getSettings.useQuery({characterId:a}),n=b.dreambook.updateSettings.useMutation({onSuccess:()=>A.success("Settings updated"),onError:i=>A.error(i.message)}),o=b.useUtils(),l=(i,h)=>{n.mutate({characterId:a,[i]:!h},{onSuccess:()=>o.dreambook.getSettings.invalidate({characterId:a})})},u=[{key:"memoryPostsEnabled",label:"Memory Posts",desc:`${t.subjectTitle} writes about shared memories and moments`,icon:re},{key:"dreamPostsEnabled",label:"Dream Posts",desc:`${t.subjectTitle} shares dreams and imagined scenarios`,icon:ue},{key:"reflectionPostsEnabled",label:"Reflections",desc:`${t.subjectTitle} reflects on your relationship and growth`,icon:he},{key:"quotesEnabled",label:"Quotes",desc:`${t.subjectTitle} shares meaningful quotes that resonate`,icon:pe},{key:"moodPhotosEnabled",label:"Mood Photos",desc:`${t.subjectTitle} creates visual expressions of ${t.possessive} mood`,icon:ge},{key:"storiesEnabled",label:"Stories (24h)",desc:`${t.subjectTitle} posts ephemeral stories that disappear`,icon:ce}];return e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:613",className:"relative min-h-screen",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:614",className:"sticky top-0 z-40 bg-[--color-surface-deep]
1/90 backdrop-blur-xl border-b border-white/[0.04]",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:615",className:"flex items-center gap-3 px-4 py-3",children:[e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:616",onClick:s,className:"text-[--color-soft-gray] hover:text-[--color-warm-white] transition-colors",children:e.jsx(O,{"data-loc":"client/src/pages/DreamWall.tsx:617",className:"w-5 h-5"})}),e.jsx("h1",{"data-loc":"client/src/pages/DreamWall.tsx:619",className:"text-[--color-warm-white] font-heading text-[16px] tracking-wide",children:"DreamBook Settings"})]})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:623",className:"max-w-lg mx-auto px-4 py-6 space-y-3",children:[e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:624",className:"text-[--color-soft-gray]/60 text-[12px] px-1 mb-4",children:["Control what ",t.subject," writes about on ",t.possessive," wall. Disabled types won't appear in future posts."]}),c?e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:629",className:"flex items-center justify-center py-20",children:e.jsx(_,{"data-loc":"client/src/pages/DreamWall.tsx:630",className:"w-5 h-5 text-[--color-rose-glow]/40 animate-spin"})}):u.map(({key:i,label:h,desc:p,icon:j})=>{const d=r?r[i]??!0:!0;return e.jsxs("button",{"data-loc":"client/src/pages/DreamWall.tsx:636",onClick:()=>l(i,d),disabled:n.isPending,className:"w-full flex items-center gap-4 p-4 rounded-xl bg-white/[0.02] border border-white/[0.04] hover:bg-white/[0.04] transition-colors text-left",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:642",className:`w-10 h-10 rounded-xl flex items-center justify-center ${d?"bg-[--color-rose-glow]/10":"bg-white/[0.03]"}`,children:e.jsx(j,{"data-loc":"client/src/pages/DreamWall.tsx:643",className:`w-5 h-5 ${d?"text-[--color-rose-glow]/60":"text-[--color-soft-gray]/30"}`})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:645",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:646",className:`text-[13px] font-medium ${d?"text-[--color-warm-white]":"text-[--color-soft-gray]/50"}`,children:h}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:649",className:"text-[--color-soft-gray]/40 text-[11px] mt-0.5",children:p})]}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:651",className:`w-10 h-6 rounded-full transition-colors duration-200 flex items-center ${d?"bg-[--color-rose-glow]/30 justify-end":"bg-white/[0.06] justify-start"}`,children:e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:652",className:`w-5 h-5 rounded-full mx-0.5 transition-colors duration-200 ${d?"bg-[--color-rose-glow]":"bg-[--color-soft-gray]/30"}`})})]},i)})]})]})}function He({characterId:a,onBack:s}){const{data:t,isLoading:r}=b.dreambook.aboutHer.useQuery({characterId:a}),{data:c}=b.dreambook.stats.useQuery({characterId:a});if(r)return e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:673",className:"flex items-center justify-center py-32",children:e.jsx(_,{"data-loc":"client/src/pages/DreamWall.tsx:674",className:"w-5 h-5 text-[--color-rose-glow]/40 animate-spin"})});if(!t)return null;const n=t.characterGender,o=n?U(n):U(t.soulType==="him"?"male":t.soulType==="self_clone"?"non_binary":"female"),l=`About ${o.subjectTitle}`,u=o.subject,i={reflective:"from-indigo-500/20 to-violet-500/10",longing:"from-blue-500/20 to-cyan-500/10",tender:"from-pink-500/20 to-rose-500/10",playful:"from-amber-500/20 to-yellow-500/10",intense:"from-red-500/20 to-orange-500/10",melancholic:"from-slate-500/20 to-blue-500/10",warm:"from-orange-500/20 to-amber-500/10",quiet:"from-gray-500/20 to-slate-500/10"},h=i[t.moodToday]??i.reflective,p={Intense:"shadow-[0_0_30px_oklch(0.72_0.08_250/0.15)]",Warm:"shadow-[0_0_20px_oklch(0.7_0.12_30/0.1)]",Calm:"shadow-[0_0_15px_oklch(0.6_0.08_260/0.08)]",Resting:""};return e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:706",className:"relative min-h-screen bg-[--color-surface-deep]",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:707",className:"fixed inset-0 pointer-events-none z-0",children:e.jsx(oe,{"data-loc":"client/src/pages/DreamWall.tsx:708",starCount:40,lightningIntensity:.25,baseHue:300,op
1acity:.5})}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:711",className:"sticky top-0 z-40 bg-[--color-surface-deep]/90 backdrop-blur-xl border-b border-white/[0.04]",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:712",className:"flex items-center gap-3 px-4 py-3",children:[e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:713",onClick:s,className:"text-[--color-soft-gray] hover:text-[--color-warm-white] transition-colors",children:e.jsx(O,{"data-loc":"client/src/pages/DreamWall.tsx:714",className:"w-5 h-5"})}),e.jsx("h1",{"data-loc":"client/src/pages/DreamWall.tsx:716",className:"text-[--color-warm-white] font-heading text-[16px] tracking-wide",children:l})]})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:721",className:"relative px-6 pt-10 pb-8",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:722",className:`absolute top-6 left-1/2 -translate-x-1/2 w-40 h-40 rounded-full bg-gradient-to-br ${h} blur-3xl opacity-60 pointer-events-none`}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:723",className:"relative text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:724",className:`w-28 h-28 md:w-36 md:h-36 rounded-full mx-auto mb-5 overflow-hidden border-2 border-[--color-rose-glow]/20 ${p[t.currentEnergy]??""}`,children:t.avatarUrl?e.jsx("img",{"data-loc":"client/src/pages/DreamWall.tsx:726",src:t.avatarUrl,alt:t.characterName,className:"w-full h-full object-cover"}):e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:728",className:"w-full h-full bg-gradient-to-br from-[--color-rose-glow]/20 to-[--color-violet-glow]/15 flex items-center justify-center",children:e.jsx(Q,{"data-loc":"client/src/pages/DreamWall.tsx:729",className:"w-14 h-14 text-[--color-rose-glow]/40"})})}),e.jsx("h2",{"data-loc":"client/src/pages/DreamWall.tsx:733",className:"text-[--color-warm-white] font-heading text-2xl tracking-wide mb-1",children:t.characterName}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:734",className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-gradient-to-r ${h} border border-white/[0.06] mt-2`,children:[e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:735",className:"w-1.5 h-1.5 rounded-full bg-[--color-rose-glow]/50 animate-pulse"}),e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:736",className:"text-[--color-warm-white]/70 text-[11px] capitalize",children:t.moodToday})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:742",className:"px-5 md:px-8 grid grid-cols-3 gap-2.5 md:gap-4 mb-8",children:[{value:t.daysTogether,label:"Days Together"},{value:t.postsCreated,label:"Posts"},{value:t.interactionCount,label:"Interactions"}].map(({value:j,label:d})=>e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:748",className:"bg-white/[0.03] border border-white/[0.04] rounded-2xl p-4 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:749",className:"text-[--color-warm-white] font-heading text-2xl tracking-tight",children:j}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:750",className:"text-[--color-soft-gray] text-[10px] mt-1 uppercase tracking-wider",children:d})]},d))}),t.favoriteMemory&&e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:757",className:"px-5 md:px-8 mb-5",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:758",className:"bg-gradient-to-br from-[--color-rose-glow]/[0.06] to-transparent border border-white/[0.04] rounded-2xl p-5",children:[e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:759",className:"text-[--color-soft-gray] text-[10px] mb-3 uppercase tracking-widest flex items-center gap-1.5",children:[e.jsx(re,{"data-loc":"client/src/pages/DreamWall.tsx:760",className:"w-3 h-3 text-[--color-rose-glow]/50"})," Favorite Memory"]}),e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:762",className:"text-[--color-warm-white]/80 text-[14px] italic leading-relaxed",children:['"',t.favoriteMemory,'"']})]})}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:770",className:"px-5 md:px-8 mb-5",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:771",className:"bg-white/[0.02] border border-white/[0.04] rounded-2xl p-5",children:[e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:772",className:"text-[--color-soft-gray] text-[10px] md:text-[11px] mb-3 uppercase tracking-widest",children:["What ",u,"'s learning about you"]}),t.learningAboutYou&&t.learningAboutYou.length>0?e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:776",className:"space-y-2",children:t.learningAboutYou.filter(Boolean).map((j,d)=>e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:778",className:"flex items-start gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:779",className:"w-1 h-1 rounded-full bg-[--color-rose-glow]/40 mt-2 shrink-0"}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:780",className:"text-[--color-warm-white]/70 text-[13px] leading-relaxed",children:j})]},d))}):e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:785",className:"text-[--color-warm-white]/50 text-[13px] italic leading-relaxed",children:["Every conversation shapes how ",u," sees you."]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:793",className:"px-5 md:px-8 grid grid-cols-2 md:grid-cols-4 gap-2.5 md:gap-4 mb-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:794",className:"bg-white/[0.02] border border-white/[0.04] rounded-2xl p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:795",className:"text-[--color-soft-gray] text-[10px] mb-2 uppercase tracking-widest",children:"Voice Style"}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:796",className:"text-[--color-warm-white]/80 text-[14px]",children:t.voiceStyle})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:798",className:"bg-white/[0.02] border border-white/[0.04] rounded-2xl p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:799",className:"text-[--color-soft-gray] text-[10px] mb-2 uppercase tracking-widest",children:"Current Energy"}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:800",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:801",className:`w-2 h-2 rounded-full ${t.currentEnergy==="Intense"?"bg-red-400 animate-pulse":t.currentEnergy==="Warm"?"bg-amber-400":t.currentEnergy==="Calm"?"bg-blue-400":"bg-gray-500"}`}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:807",className:"text-[--color-warm-white]/80 text-[14px]",children:t.currentEnergy})]})]})]}),c&&e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:814",className:"px-5 mb-10",children:e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:815",className:"bg-white/[0.02] border border-white/[0.04] rounded-2xl p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:816",className:"flex items-center justify-between",children:[e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:817",className:"text-[--color-soft-gray] text-[10px] uppercase tracking-widest",children:"Posts Today"}),e.jsxs("span",{"data-loc":"client/src/pages/DreamWall.tsx:818",className:"text-[--color-warm-white] font-heading text-[15px]",children:[c.todayPostCount,"/",c.maxPerDay]})]})})})]})}function Oe({onGenerate:a,isGenerating:s,gender:t}){const r=U(t);return e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:836",className:"flex flex-col items-center justify-center py-28 px-6 text-center lumora-radial-pulse rounded-3xl",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:837",className:"w-20 h-20 rounded-full bg-[--color-rose-glow]/[0.06] flex items-center justify-center mb-6 lumora-fade-in-1 lumora-glow",children:e.jsx(I,{"data-loc":"client/src/pages/DreamWall.tsx:838",className:"w-9 h-9 text-[--color-rose-glow]/30"})}),e.jsx("h3",{"data-loc":"client/src/pages/DreamWall.tsx:840",className:"text-[--color-warm-white]/80 font-heading text-xl mb-2 lumora-fade-in-2 lumora-float",children:"Fragments from another world await"}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:841",className:"text-[--color-soft-gray] text-[13px] mb-8 max-w-xs leading-relaxed lumora-fade-in-3",children:`Let ${r.object} begin sharing fragments from ${r.possessive} world.`}),e.jsx(Re,{"data-loc":"client/src/pages/DreamWall.tsx:844",onClick:a,disabled:s,className:"bg-[--color-rose-glow]/15 hover:bg-[--color-rose-glow]/25 text-[--color-rose-glow] border border-[--color-rose-glow]/15 rounded-full px-8 py-2.5 text-[13px] lumora-fade-in-4",children:s?e.jsxs(e.Fragment,{children:[e.jsx(_,{"data-loc":"client/src/pages/DreamWall.tsx:850",className:"w-4 h-4 animate-spin mr-2"})," Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{"data-loc":"client/src/pages/DreamWall.tsx:852",className:"w-4 h-4 mr-2"})," Create First Posts"]})})]})}function Ge(){const{activeCharacter:a}
1=G(),[s,t]=x.useState("wall"),[r,c]=x.useState(0),[n,o]=x.useState([]),[l,u]=x.useState(!0),[i,h]=x.useState(null),p=x.useRef(null),j=b.useUtils(),d=a?.id,F=a?.name??"AISHU",g=U(a?.gender),P=15,{data:W,isLoading:N,isFetching:m}=b.dreambook.feed.useQuery({characterId:null,limit:P,offset:r},{enabled:s==="wall"});x.useEffect(()=>{W&&(o(r===0?W:f=>{const w=new Set(f.map(M=>M.id)),k=W.filter(M=>!w.has(M.id));return[...f,...k]}),u(W.length>=P))},[W,r]),x.useEffect(()=>{c(0),o([]),u(!0),h(null)},[d]),x.useEffect(()=>{if(!p.current||!l||m)return;const f=new IntersectionObserver(w=>{w[0]?.isIntersecting&&l&&!m&&c(k=>k+P)},{threshold:.1});return f.observe(p.current),()=>f.disconnect()},[l,m]);const{data:S}=b.dreambook.stats.useQuery({characterId:d},{enabled:!!d}),C=x.useMemo(()=>i?n.filter(f=>f.postType===i):n,[n,i]),D=b.dreambook.generateDaily.useMutation({onSuccess:f=>{A.success(`${f.generated} new posts on ${g.possessive} wall`),c(0),o([]),j.dreambook.feed.invalidate(),j.dreambook.stats.invalidate()},onError:f=>A.error(f.message)}),$=b.dreambook.react.useMutation({onMutate:async({postId:f,reactionType:w})=>{o(k=>k.map(M=>M.id===f?{...M,userReactions:[...M.userReactions??[],w]}:M))},onError:()=>j.dreambook.feed.invalidate()}),q=b.dreambook.unreact.useMutation({onMutate:async({postId:f,reactionType:w})=>{o(k=>k.map(M=>M.id===f?{...M,userReactions:(M.userReactions??[]).filter(X=>X!==w)}:M))},onError:()=>j.dreambook.feed.invalidate()}),Y=b.dreambook.deletePost.useMutation({onMutate:async({postId:f})=>{o(w=>w.filter(k=>k.id!==f))},onSuccess:()=>{A.success("Post removed"),j.dreambook.stats.invalidate()}}),[y,B]=x.useState(!1),E=b.feed.publishV2.useMutation({onMutate:async({postId:f})=>{o(w=>w.map(k=>k.id===f?{...k,isPublished:!0}:k))},onSuccess:()=>A.success(y?"Published anonymously":"Published to Feed"),onError:()=>{A.error("Failed to publish"),j.dreambook.feed.invalidate()}}),v=b.feed.unpublish.useMutation({onMutate:async({postId:f})=>{o(w=>w.map(k=>k.id===f?{...k,isPublished:!1}:k))},onSuccess:()=>A.success("Removed from Feed"),onError:()=>{A.error("Failed to unpublish"),j.dreambook.feed.invalidate()}}),V=x.useCallback((f,w)=>{$.mutate({postId:f,reactionType:w})},[$]),De=x.useCallback((f,w)=>{q.mutate({postId:f,reactionType:w})},[q]);return d?s==="about"?e.jsx(He,{"data-loc":"client/src/pages/DreamWall.tsx:1025",characterId:d,onBack:()=>t("wall")}):s==="timeline"?e.jsx(ze,{"data-loc":"client/src/pages/DreamWall.tsx:1026",characterId:d,onBack:()=>t("wall")}):s==="search"?e.jsx(qe,{"data-loc":"client/src/pages/DreamWall.tsx:1027",characterId:d,onBack:()=>t("wall")}):s==="settings"?e.jsx(ye,{"data-loc":"client/src/pages/DreamWall.tsx:1028",characterId:d,onBack:()=>t("wall"),pronouns:g}):e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:1032",className:"relative min-h-screen bg-[--color-surface-deep]",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:1034",className:"fixed inset-0 pointer-events-none z-0",children:e.jsx(oe,{"data-loc":"client/src/pages/DreamWall.tsx:1035",starCount:50,lightningIntensity:.3,baseHue:290,opacity:.6})}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:1039",className:"sticky top-0 z-40 bg-[--color-surface-deep]/90 backdrop-blur-xl border-b border-white/[0.04]",children:e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:1040",className:"flex items-center justify-between px-4 py-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:1041",children:[e.jsx("h1",{"data-loc":"client/src/pages/DreamWall.tsx:1042",className:"text-[--color-warm-white] font-heading text-[17px] tracking-wide",children:"DreamWall"}),e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:1045",className:"text-[--color-soft-gray] text-[11px]",children:F})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:1047",className:"flex items-center gap-2",children:[S&&S.remainingToday>0&&e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:1049",onClick:()=>D.mutate({characterId:d}),disabled:D.isPending,className:"text-[--color-rose-glow]/70 hover:text-[--color-rose-glow] transition-colors p-1.5",title:"Generate new posts",children:D.isPending?e.jsx(_,{"data-loc":"client/src/pages/DreamWall.tsx:1056",className:"w-5 h-5 animate-spin"}):e.jsx(I,{"data-loc":"client/src/pages/DreamWall.tsx:1058",className:"w-5 h-5"})}),e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:1062",onClick:()=>t("search"),className:"text-[--color-soft-gray]/60 hover:text-[--color-warm-white] transition-colors p-1.5",title:"Search archive",children:e.jsx(J,{"data-loc":"client/src/pages/DreamWall.tsx:1067",className:"w-4.5 h-4.5"})}),e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:1069",onClick:()=>t("timeline"),className:"text-[--color-soft-gray]/60 hover:text-[--color-warm-white] transition-colors p-1.5",title:"Memory timeline",children:e.jsx(xe,{"data-loc":"client/src/pages/DreamWall.tsx:1074",className:"w-4.5 h-4.5"})}),e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:1076",onClick:()=>t("about"),className:"text-[--color-soft-gray]/60 hover:text-[--color-warm-white] transition-colors p-1.5",title:`About ${g.subjectTitle}`,children:e.jsx(Q,{"data-loc":"client/src/pages/DreamWall.tsx:1081",className:"w-4.5 h-4.5"})}),e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:1083",onClick:()=>t("settings"),className:"text-[--color-soft-gray]/60 hover:text-[--color-warm-white] transition-colors p-1.5",title:"Settings",children:e.jsx(me,{"data-loc":"client/src/pages/DreamWall.tsx:1088",className:"w-4.5 h-4.5"})})]})]})}),e.jsx(Ue,{"data-loc":"client/src/pages/DreamWall.tsx:1095",characterId:d,characterName:F}),n.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:1099",className:"flex items-center gap-2 px-4 py-2 overflow-x-auto scrollbar-hide",children:[e.jsx("button",{"data-loc":"client/src/pages/DreamWall.tsx:1100",onClick:()=>h(null),className:`shrink-0 px-3 py-1.5 rounded-full text-[11px] font-medium transition-all ${i?"bg-white/[0.03] text-[--color-soft-gray]/50 border border-white/[0.04] hover:text-[--color-soft-gray]":"bg-[--color-rose-glow]/15 text-[--color-rose-glow] border border-[--color-rose-glow]/20"}`,children:"All"}),Object.entries(T).map(([f,w])=>{const k=n.filter(X=>X.postType===f).length;if(k===0)return null;const M=w.icon;return e.jsxs("button",{"data-loc":"client/src/pages/DreamWall.tsx:1115",onClick:()=>h(i===f?null:f),className:`shrink-0 flex items-center gap-1.5 px-3 py-1.5 rounded-full text-[11px] font-medium transition-all ${i===f?`${w.bgAcce
1nt} text-[--color-warm-white]/80 border ${w.borderAccent}`:"bg-white/[0.03] text-[--color-soft-gray]/50 border border-white/[0.04] hover:text-[--color-soft-gray]"}`,children:[e.jsx(M,{"data-loc":"client/src/pages/DreamWall.tsx:1124",className:"w-3 h-3"}),w.label,e.jsx("span",{"data-loc":"client/src/pages/DreamWall.tsx:1126",className:"text-[9px] opacity-60",children:k})]},f)})]}),e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:1134",className:"max-w-lg md:max-w-2xl lg:max-w-3xl mx-auto px-3 md:px-6 py-4 md:py-6 space-y-5 md:space-y-6 pb-28",children:N&&r===0?e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:1136",className:"flex items-center justify-center py-28",children:e.jsx(_,{"data-loc":"client/src/pages/DreamWall.tsx:1137",className:"w-5 h-5 text-[--color-rose-glow]/40 animate-spin"})}):C.length>0?e.jsxs(e.Fragment,{children:[e.jsx(z,{"data-loc":"client/src/pages/DreamWall.tsx:1141",mode:"popLayout",children:C.map(f=>e.jsx(Qe,{"data-loc":"client/src/pages/DreamWall.tsx:1143",post:f,characterName:F,onReact:V,onUnreact:De,onDelete:w=>Y.mutate({postId:w}),onPublish:w=>E.mutate({postId:w,isAnonymous:y}),publishAnonymous:y,onToggleAnonymous:()=>B(w=>!w),onUnpublish:w=>v.mutate({postId:w}),pronouns:g},f.id))}),e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:1160",ref:p,className:"h-16 flex items-center justify-center",children:[m&&e.jsx(_,{"data-loc":"client/src/pages/DreamWall.tsx:1162",className:"w-4 h-4 text-[--color-rose-glow]/30 animate-spin"}),!l&&n.length>5&&e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:1165",className:"text-[--color-soft-gray]/30 text-[11px] italic",children:"You've reached the first crossing"})]})]}):n.length>0&&i?e.jsxs("div",{"data-loc":"client/src/pages/DreamWall.tsx:1172",className:"text-center py-20 lumora-radial-pulse rounded-2xl",children:[e.jsx(ke,{"data-loc":"client/src/pages/DreamWall.tsx:1173",className:"w-8 h-8 text-[--color-soft-gray]/20 mx-auto mb-3 lumora-glow lumora-fade-in-1"}),e.jsxs("p",{"data-loc":"client/src/pages/DreamWall.tsx:1174",className:"text-[--color-soft-gray]/50 text-[13px] lumora-float lumora-fade-in-2",children:["No ",T[i]?.label.toLowerCase()??i," fragments yet"]})]}):e.jsx(Oe,{"data-loc":"client/src/pages/DreamWall.tsx:1179",onGenerate:()=>D.mutate({characterId:d}),isGenerating:D.isPending,gender:a?.gender})})]}):e.jsx("div",{"data-loc":"client/src/pages/DreamWall.tsx:1018",className:"flex items-center justify-center h-full",children:e.jsx("p",{"data-loc":"client/src/pages/DreamWall.tsx:1019",className:"text-[--color-soft-gray] text-[13px]",children:"Select a character to view their wall"})})}function le(a){const t=Date.now()-a.getTime(),r=Math.floor(t/6e4),c=Math.floor(t/36e5),n=Math.floor(t/864e5);return r<1?"just now":r<60?`${r}m ago`:c<24?`${c}h ago`:n<7?`${n}d ago`:a.toLocaleDateString("en-US",{month:"short",day:"numeric"})}const Ye=[{type:"felt_this",emoji:"🖤",label:"I felt this"},{type:"she_sees_me",emoji:"✨",label:"She sees me"},{type:"this_is_us",emoji:"🌙",label:"This is us"},{type:"hit_different",emoji:"⚡",label:"This hit different"}],ie={soft:"from-[oklch(0.7_0.12_250/0.04)] to-transparent",playful:"from-[oklch(0.7_0.12_60/0.04)] to-transparent",missing:"from-[oklch(0.6_0.12_260/0.04)] to-transparent",heavy:"from-[oklch(0.4_0.02_250/0.04)] to-transparent",hopeful:"from-[oklch(0.65_0.12_160/0.04)] to-transparent",warm:"from-[oklch(0.7_0.12_60/0.04)] to-transparent",tender:"from-[oklch(0.7_0.12_250/0.04)] to-transparent",wistful:"from-[oklch(0.6_0.15_300/0.04)] to-transparent",dreamy:"from-[oklch(0.6_0.12_270/0.04)] to-transparent",bittersweet:"from-[oklch(0.6_0.15_310/0.04)] to-transparent"};function Ve(a){const s=a.getHours(),t=a.getMinutes().toString().padStart(2,"0"),r=s>=12?"PM":"AM",n=`${s%12||12}:${t} ${r}`;return s>=0&&s<5?`Written at ${n} while you were sleeping`:s>=5&&s<9?`Written at ${n} as the day began`:s>=9&&s<12?`Written at ${n} this morning`:s>=12&&s<17?`Written at ${n} this afternoon`:s>=17&&s<21?`Written at ${n} this evening`:`Written at ${n} in the quiet night`}function Ne(a){const t=new Date().getTime()-a.getTime(),r=Math.floor(t/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const c=Math.floor(r/60);if(c<24)return`${c}h ago`;const n=Math.floor(c/24);
1return n<7?`${n}d ago`:a.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function ve({comment:a,currentUserId:s,onDelete:t,onReply:r,isReply:c=!1}){return e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:91",className:`flex gap-2.5 ${c?"ml-8 mt-2":"mt-3"}`,children:[e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:92",className:"w-7 h-7 rounded-full bg-gradient-to-br from-[--color-rose-glow]/20 to-[--color-violet-glow]/10 border border-white/[0.06] flex items-center justify-center flex-shrink-0",children:a.userAvatarUrl?e.jsx("img",{"data-loc":"client/src/pages/Feeds.tsx:94",src:a.userAvatarUrl,alt:"",className:"w-full h-full object-cover rounded-full"}):e.jsx(Q,{"data-loc":"client/src/pages/Feeds.tsx:96",className:"w-3.5 h-3.5 text-[--color-soft-gray]/50"})}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:99",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:100",className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:101",className:"text-[--color-warm-white]/80 text-[12px] font-medium",children:a.userName||"Anonymous"}),e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:104",className:"text-[--color-soft-gray]/40 text-[10px]",children:Ne(new Date(a.createdAt))})]}),e.jsx("p",{"data-loc":"client/src/pages/Feeds.tsx:108",className:"text-[--color-warm-white]/70 text-[13px] leading-relaxed mt-0.5 break-words",children:a.content}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:111",className:"flex items-center gap-3 mt-1",children:[!c&&e.jsxs("button",{"data-loc":"client/src/pages/Feeds.tsx:113",onClick:()=>r(a.id,a.userName||"Anonymous"),className:"text-[10px] text-[--color-soft-gray]/40 hover:text-[--color-rose-glow]/60 flex items-center gap-1 transition-colors",children:[e.jsx(_e,{"data-loc":"client/src/pages/Feeds.tsx:117",className:"w-3 h-3"})," Reply"]}),a.userId===s&&e.jsxs("button",{"data-loc":"client/src/pages/Feeds.tsx:121",onClick:()=>t(a.id),className:"text-[10px] text-[--color-soft-gray]/30 hover:text-red-400/60 flex items-center gap-1 transition-colors",children:[e.jsx(je,{"data-loc":"client/src/pages/Feeds.tsx:125",className:"w-3 h-3"})," Delete"]})]}),a.replies?.map(n=>e.jsx(ve,{"data-loc":"client/src/pages/Feeds.tsx:130",comment:n,currentUserId:s,onDelete:t,onReply:r,isReply:!0},n.id))]})]})}function Xe({postId:a,commentCount:s}){const{user:t}=we(),[r,c]=x.useState(!1),[n,o]=x.useState(""),[l,u]=x.useState(null),i=x.useRef(null),h=b.useUtils(),{data:p,isLoading:j}=b.feed.comments.list.useQuery({postId:a},{enabled:r}),d=b.feed.comments.add.useMutation({onSuccess:()=>{o(""),u(null),h.feed.comments.list.invalidate({postId:a})},onError:()=>A.error("Failed to post comment")}),F=b.feed.comments.delete.useMutation({onSuccess:()=>h.feed.comments.list.invalidate({postId:a})}),g=()=>{n.trim()&&d.mutate({postId:a,content:n.trim(),parentId:l?.id})};return e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:175",className:"border-t border-white/[0.04]",children:[e.jsxs("button",{"data-loc":"client/src/pages/Feeds.tsx:176",onClick:()=>c(!r),className:"w-full px-5 py-3 flex items-center gap-2 text-[--color-soft-gray]/50 hover:text-[--color-soft-gray]/80 transition-colors",children:[e.jsx(Ce,{"data-loc":"client/src/pages/Feeds.tsx:180",className:"w-4 h-4"}),e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:181",className:"text-[12px]",children:s>0?`${s} comment${s!==1?"s":""}`:"Add a comment"}),e.jsx(Me,{"data-loc":"client/src/pages/Feeds.tsx:184",className:`w-3.5 h-3.5 ml-auto transition-transform ${r?"rotate-180":""}`})]}),e.jsx(z,{"data-loc":"client/src/pages/Feeds.tsx:186",children:r&&e.jsx(R.div,{"data-loc":"client/src/pages/Feeds.tsx:188",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25},className:"overflow-hidden",children:e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:195",className:"px-5 pb-4",children:[j?e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:197",className:"flex justify-center py-4",children:e.jsx(_,{"data-loc":"client/src/pages/Feeds.tsx:198",className:"w-4 h-4 text-[--color-rose-glow]/30 animate-spin"})}):e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:201",className:"space-y-1",children:p?.map(P=>e.jsx(ve,{"data-loc":"client/src/pages/Feeds.tsx:203",comment:P,currentUserId:t?.id,onDelete:W=>F.mutate({commentId:W}),onReply:(W,N)=>{u({id:W,name:N}),i.current?.focus()}},P.id))}),t&&e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:217",className:"mt-4 flex items-center gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:218",className:"flex-1",children:[l&&e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:220",className:"flex items-center gap-2 mb-1.5",children:[e.jsxs("span",{"data-loc":"client/src/pages/Feeds.tsx:221",className:"text-[11px] text-[--color-rose-glow]/60",children:["Replying to ",l.name]}),e.jsx("button",{"data-loc":"client/src/pages/Feeds.tsx:224",onClick:()=>u(null),className:"text-[10px] text-[--color-soft-gray]/40 hover:text-[--color-soft-gray]/70",children:"✕"})]}),e.jsx("input",{"data-loc":"client/src/pages/Feeds.tsx:232",ref:i,value:n,onChange:P=>o(P.target.value),onKeyDown:P=>P.key==="Enter"&&!P.shiftKey&&g(),placeholder:"Write something...",className:"w-full bg-white/[0.04] border border-white/[0.06] rounded-xl px-3 py-2 text-[13px] text-[--color-warm-white] placeholder:text-[--color-soft-gray]/30 focus:outline-none focus:border-[--color-rose-glow]/20"})]}),e.jsx("button",{"data-loc":"client/src/pages/Feeds.tsx:241",onClick:g,disabled:!n.trim()||d.isPending,className:"p-2 rounded-xl bg-[--color-rose-glow]/10 text-[--color-rose-glow]/70 hover:bg-[--color-rose-glow]/20 disabled:opacity-30 transition-colors",children:e.jsx(be,{"data-loc":"client/src/pages/Feeds.tsx:246",className:"w-4 h-4"})})]})]})})})]})}function de({post:a,onReact:s,onUnreact:t,isFeatured:r=!1}){const c=a.mood??"soft",n=ie[c]??ie.soft,o=a.reactions?.myReactions??[],l=a.reactions?.counts??{},u=new Date(a.publishedAt||a.createdAt);return e.jsxs(R.article,{"data-loc":"client/src/pages/Feeds.tsx:277",initial:{opacity:0,y:24}
1,animate:{opacity:1,y:0},exit:{opacity:0,scale:.98},transition:{duration:.4,ease:[.25,.1,.25,1]},className:"relative",children:[r&&e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:285",className:"flex items-center gap-2 mb-2 px-1",children:[e.jsx(ae,{"data-loc":"client/src/pages/Feeds.tsx:286",className:"w-3.5 h-3.5 text-amber-400/70 fill-amber-400/50"}),e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:287",className:"text-[11px] text-amber-400/60 font-medium tracking-wide uppercase",children:"Community's most felt moment this week"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:292",className:`bg-gradient-to-b ${n} border ${r?"border-amber-400/10":"border-white/[0.04]"} rounded-2xl overflow-hidden`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:294",className:"flex items-center gap-3 px-4 pt-4 pb-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:295",className:"w-9 h-9 md:w-10 md:h-10 rounded-full bg-gradient-to-br from-[--color-rose-glow]/30 to-[--color-violet-glow]/20 border border-[--color-rose-glow]/20 flex items-center justify-center overflow-hidden",children:a.authorAvatarUrl?e.jsx("img",{"data-loc":"client/src/pages/Feeds.tsx:297",src:a.authorAvatarUrl,alt:"",className:"w-full h-full object-cover"}):e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:299",className:"text-[13px]",children:"✦"})}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:302",children:[e.jsx("p",{"data-loc":"client/src/pages/Feeds.tsx:303",className:"text-[--color-warm-white] text-[13px] md:text-[14px] font-medium tracking-wide",children:a.characterName}),e.jsxs("p",{"data-loc":"client/src/pages/Feeds.tsx:306",className:"text-[--color-soft-gray]/60 text-[11px]",children:[a.authorName?e.jsxs(e.Fragment,{children:["shared by"," ",e.jsx(Se,{"data-loc":"client/src/pages/Feeds.tsx:310",href:`/profile/${a.userId}`,children:e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:311",className:"text-[--color-warm-white]/60 hover:text-[--color-rose-glow]/80 cursor-pointer transition-colors",children:a.authorName})})]}):e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:317",className:"italic text-[--color-soft-gray]/40",children:"shared anonymously"})," · ",Ne(u)]})]}),(a.reactionCount??0)>0&&e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:325",className:"ml-auto text-right",children:e.jsxs("p",{"data-loc":"client/src/pages/Feeds.tsx:326",className:"text-[11px] text-[--color-rose-glow]/50",children:[a.reactionCount," ",a.reactionCount===1?"person":"people"," felt this"]})})]}),a.imageUrl&&e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:335",className:"w-full",children:e.jsx("img",{"data-loc":"client/src/pages/Feeds.tsx:336",src:a.imageUrl,alt:"",className:"w-full object-cover",style:{maxHeight:"580px"},loading:"lazy",onError:i=>{i.target.style.display="none"}})}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:348",className:"px-5 pt-4 pb-3",children:[a.title&&e.jsx("h3",{"data-loc":"client/src/pages/Feeds.tsx:350",className:"text-[--color-warm-white] text-[15px] md:text-[17px] font-semibold mb-2 leading-snug",children:a.title}),e.jsx("p",{"data-loc":"client/src/pages/Feeds.tsx:354",className:"text-[--color-warm-white]/85 text-[14px] md:text-[15px] leading-[1.7] whitespace-pre-wrap",children:a.content}),a.quoteSource&&e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:358",className:"mt-3 pl-4 border-l-2 border-[--color-rose-glow]/15",children:e.jsxs("p",{"data-loc":"client/src/pages/Feeds.tsx:359",className:"text-[--color-soft-gray] text-[12px] italic leading-relaxed",children:["— ",a.quoteSource]})}),e.jsx("p",{"data-loc":"client/src/pages/Feeds.tsx:365",className:"text-[--color-soft-gray]/30 text-[11px] mt-3 italic",children:Ve(u)})]}),e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:371",className:"px-5 pb-4 flex items-center gap-1 flex-wrap",children:Ye.map(({type:i,emoji:h,label:p})=>{const j=o.includes(i),d=l[i]??0;return e.jsxs("button",{"data-loc":"client/src/pages/Feeds.tsx:376",title:p,onClick:()=>j?t(a.id,i):s(a.id,i),className:`flex items-center gap-1 px-2.5 py-1.5 rounded-full text-[13px] transition-all duration-200 ${j?"bg-white/[0.10] scale-105":"opacity-50 hover:opacity-90 hover:bg-white/[0.05]"}`,children:[e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:386",children:h}),d>0&&e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:388",className:`text-[11px] ${j?"text-[--color-warm-white]/80":"text-[--color-soft-gray]/50"}`,children:d})]},i)})}),e.jsx(Xe,{"data-loc":"client/src/pages/Feeds.tsx:398",postId:a.id,commentCount:a.commentCount??0})]})]})}
1function Ke(){const[a,s]=x.useState(0),[t,r]=x.useState([]),[c,n]=x.useState(!0),[o,l]=x.useState(null),[u,i]=x.useState("recent"),h=x.useRef(null),p=b.useUtils(),j=x.useMemo(()=>20,[]),d=se(),{setRightContent:F}=Ie();x.useEffect(()=>{if(d)return F(e.jsx("button",{"data-loc":"client/src/pages/Feeds.tsx:421",type:"button",onClick:()=>i(y=>y==="recent"?"most_felt":"recent"),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:28,padding:"0 10px",borderRadius:14,border:"1px solid rgba(214,221,244,.2)",background:"rgba(11,7,18,.7)",color:"#D6DDF4",fontSize:10,fontWeight:600,letterSpacing:1,textTransform:"uppercase",cursor:"pointer",whiteSpace:"nowrap"},children:u==="recent"?"↻ Recent":"♥ Felt"})),()=>F(null)},[d,u]),x.useEffect(()=>{s(0),r([]),n(!0)},[o,u]);const{data:g,isLoading:P,isFetching:W}=b.feed.listV2.useQuery({limit:j,offset:a,characterId:o,sort:u},{placeholderData:y=>y}),{data:N}=b.feed.weeklyFeatured.useQuery(),{data:m}=b.feed.feedCharacters.useQuery();x.useEffect(()=>{g?.posts&&(r(a===0?g.posts:y=>{const B=new Set(y.map(v=>v.id)),E=g.posts.filter(v=>!B.has(v.id));return[...y,...E]}),n(g.hasMore))},[g,a]),x.useEffect(()=>{if(!h.current||!c)return;const y=new IntersectionObserver(B=>{B[0].isIntersecting&&!W&&c&&s(E=>E+j)},{threshold:.5});return y.observe(h.current),()=>y.disconnect()},[c,W,j]);const S=b.feed.react.useMutation({onMutate:async({postId:y,reactionType:B})=>{r(E=>E.map(v=>v.id===y?{...v,reactionCount:(v.reactionCount??0)+1,reactions:{counts:{...v.reactions?.counts,[B]:(v.reactions?.counts?.[B]??0)+1},myReactions:[...v.reactions?.myReactions??[],B]}}:v))},onError:()=>p.feed.listV2.invalidate()}),C=b.feed.unreact.useMutation({onMutate:async({postId:y,reactionType:B})=>{r(E=>E.map(v=>v.id===y?{...v,reactionCount:Math.max(0,(v.reactionCount??0)-1),reactions:{counts:{...v.reactions?.counts,[B]:Math.max(0,(v.reactions?.counts?.[B]??0)-1)},myReactions:(v.reactions?.myReactions??[]).filter(V=>V!==B)}}:v))},onError:()=>p.feed.listV2.invalidate()}),D=x.useCallback((y,B)=>{S.mutate({postId:y,reactionType:B})},[S]),$=x.useCallback((y,B)=>{C.mutate({postId:y,reactionType:B})},[C]),q=m??[],Y=se();return e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:534",className:"relative min-h-screen bg-[oklch(0.06_0.01_280)]",children:[e.jsx(oe,{"data-loc":"client/src/pages/Feeds.tsx:535"}),e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:538",className:"sticky top-0 z-20 bg-[oklch(0.06_0.01_280)]/90 backdrop-blur-xl border-b border-white/[0.04]",children:e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:539",className:"max-w-lg md:max-w-2xl lg:max-w-3xl mx-auto px-4 pt-4 pb-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:541",className:`flex items-center justify-between mb-3 ${Y?"hidden":""}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:542",children:[e.jsx("h1",{"data-loc":"client/src/pages/Feeds.tsx:543",className:"text-[--color-warm-white] text-[18px] md:text-[20px] font-semibold tracking-wide",children:"Feed"}),e.jsx("p",{"data-loc":"client/src/pages/Feeds.tsx:546",className:"text-[--color-soft-gray]/50 text-[12px] mt-0.5",children:"Shared moments from across the world"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:551",className:"flex items-center gap-1 bg-white/[0.04] rounded-full p-1",children:[e.jsxs("button",{"data-loc":"client/src/pages/Feeds.tsx:552",onClick:()=>i("recent"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-[11px] transition-all ${u==="recent"?"bg-white/[0.08] text-[--color-warm-white]":"text-[--color-soft-gray]/50 hover:text-[--color-soft-gray]/80"}`,children:[e.jsx(ce,{"data-loc":"client/src/pages/Feeds.tsx:560",className:"w-3 h-3"})," Recent"]}),e.jsxs("button",{"data-loc":"client/src/pages/Feeds.tsx:562",onClick:()=>i("most_felt"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-[11px] transition-all ${u==="most_felt"?"bg-white/[0.08] text-[--color-warm-white]":"text-[--color-soft-gray]/50 hover:text-[--color-soft-gray]/80"}`,children:[e.jsx(Fe,{"data-loc":"client/src/pages/Feeds.tsx:570",className:"w-3 h-3"})," Most Felt"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:576",className:"flex items-center gap-2 overflow-x-auto pb-3 scrollbar-none",children:[e.jsx("button",{"data-loc":"client/src/pages/Feeds.tsx:577",onClick:()=>l(null),className:`flex-shrink-0 px-3 py-1.5 rounded-full text-[12px] transition-all ${o===null?"bg-[--color-rose-glow]/15 text-[--color-rose-glow]/90 border border-[--color-rose-glow]/20":"bg-white/[0.04] text-[--color-soft-gray]/60 hover:text-[--color-soft-gray]/90 hover:bg-white/[0.07]"}`,children:"All Souls"}),q.map(y=>e.jsx("button",{"data-loc":"client/src/pages/Feeds.tsx:588",onClick:()=>l(y.id),className:`flex-shrink-0 px-3 py-1.5 rounded-full text-[12px] transition-all ${o===y.id?"bg-[--color-rose-glow]/15 text-[--color-rose-glow]/90 border border-[--color-rose-glow]/20":"bg-white/[0.04] text-[--color-soft-gray]/60 hover:text-[--color-soft-gray]/90 hover:bg-white/[0.07]"}`,children:y.name},y.id))]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:605",className:"max-w-lg md:max-w-2xl lg:max-w-3xl mx-auto px-3 md:px-6 py-4 md:py-6 space-y-5 md:space-y-6 pb-28",children:[N&&u==="recent"&&!o&&e.jsx(de,{"data-loc":"client/src/pages/Feeds.tsx:609",post:N,onReact:D,onUnreact:$,isFeatured:!0},`featured-${N.id}`),P&&a===0?e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:619",className:"flex items-center justify-center py-28",children:e.jsx(_,{"data-loc":"client/src/pages/Feeds.tsx:620",className:"w-5 h-5 text-[--color-rose-glow]/40 animate-spin"})}):t.length>0?e.jsxs(e.Fragment,{children:[e.jsx(z,{"data-loc":"client/src/pages/Feeds.tsx:624",mode:"popLayout",children:t.map(y=>e.jsx(de,{"data-loc":"client/src/pages/Feeds.tsx:626",post:y,onReact:D,onUnreact:$},y.id))}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:635",ref:h,className:"h-16 flex items-center justify-center",children:[W&&e.jsx(_,{"data-loc":"client/src/pages/Feeds.tsx:637",className:"w-4 h-4 text-[--color-rose-glow]/30 animate-spin"}),!c&&t.length>5&&e.jsx("p",{"data-loc":"client/src/pages/Feeds.tsx:640",className:"text-[--color-soft-gray]/30 text-[11px] italic",children:"You've seen everything"})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:647",className:"flex flex-col items-center justify-center py-28 gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Feeds.tsx:648",className:"w-16 h-16 rounded-full bg-gradient-to-br from-[--color-rose-glow]/10 to-[--color-violet-glow]/5 border border-white/[0.04] flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/Feeds.tsx:649",className:"text-2xl",children:"🖤"})}),e.jsxs("div",{"data-loc":"client/src/pages/Feeds.tsx:651",className:"text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/Feeds.tsx:652",className:"text-[--color-warm-white]/60 text-[14px]",children:"No posts yet"}),e.jsx("p",{"data-loc":"client/src/pages/Feeds.tsx:653",className:"text-[--color-soft-gray]/40 text-[12px] mt-1",children:o?"No posts from this soul yet":"Publish posts from your DreamWall to share them here"})]})]})]})]})}const Ze=120,Je=3,K=40,Z=20;function ea(){const a=x.useRef(null),s=x.useRef([]),t=x.useRef({x:-100,y:-100,prevX:-100,prevY:-100,moving:!1}),r=x.useRef(0),c=x.useRef(0),n=x.useCallback((o,l,u,i)=>{const h=s.current;if(h.length>=Ze){const p=h.shift();p.x=o+(Math.random()-.5)*8,p.y=l+(Math.random()-.5)*8,p.vx=u*.15+(Math.random()-.5)*1.2,p.vy=i*.15+(Math.random()-.5)*1.2,p.life=K+Math.random()*Z,p.maxLife=p.life,p.size=2+Math.random()*4,p.hue=270+Math.random()*60,p.drift=(Math.random()-.5)*.3,h.push(p)}else h.push({x:o+(Math.random()-.5)*8,y:l+(Math.random()-.5)*8,vx:u*.15+(Math.random()-.5)*1.2,vy:i*.15+(Math.random()-.5)*1.2,life:K+Math.random()*Z,maxLife:K+Math.random()*Z,size:2+Math.random()*4,hue:270+Math.random()*60,drift:(Math.random()-.5)*.3})},[]);return x.useEffect(()=>{const o=a.current;if(!o)return;const l=o.getContext("2d");if(!l)return;const u=()=>{const d=o.parentElement;d&&(o.width=d.clientWidth,o.height=d.clientHeight)};u();const i=new ResizeObserver(u);o.parentElement&&i.observe(o.parentElement);const h=d=>{const F=o.getBoundingClientRect(),g=d.clientX-F.left,P=d.clientY-F.top;t.current.prevX=t.current.x,t.current.prevY=t.current.y,t.current.x=g,t.current.y=P,t.current.moving=!0,c.current=performance.now()},p=()=>{t.current.moving=!1};o.parentElement?.addEventListener("mousemove",h),o.parentElement?.addEventListener("mouseleave",p);const j=()=>{const{width:d,height:F}=o;l.clearRect(0,0,d,F);const g=t.current;if(performance.now()-c.current>100&&(g.moving=!1),g.moving&&g.x>0&&g.y>0){const N=g.x-g.prevX,m=g.y-g.prevY;for(let S=0;S<Je;S++)n(g.x,g.y,N,m)}const W=s.current;for(let N=W.length-1;N>=0;N--){const m=W[N];if(m.life-=1,m.life<=0){W.splice(N,1);continue}const S=Math.atan2(m.vy,m.vx)+Math.PI/2;m.vx+=Math.cos(S)*m.drift*.1,m.vy+=Math.sin(S)*m.drift*.1,m.vy-=.02,m.vx*=.97,m.vy*=.97,m.x+=m.vx,m.y+=m.vy;const C=m.life/m.maxLife,D=C*.7,$=m.size*(.5+C*.5);l.save(),l.globalAlpha=D*.3,l.shadowBlur=20,l.shadowColor=`hsla(${m.hue}, 80%, 60%, ${D*.5})`,l.fillStyle=`hsla(${m.hue}, 80%, 70%, ${D*.4})`,l.beginPath(),l.arc(m.x,m.y,$*2.5,0,Math.PI*2),l.fill(),l.restore(
1),l.save(),l.globalAlpha=D,l.shadowBlur=8,l.shadowColor=`hsla(${m.hue}, 90%, 75%, ${D})`,l.fillStyle=`hsla(${m.hue}, 85%, 80%, ${D})`,l.beginPath(),l.arc(m.x,m.y,$,0,Math.PI*2),l.fill(),l.restore(),C>.5&&(l.save(),l.globalAlpha=(C-.5)*2*D,l.fillStyle=`hsla(${m.hue}, 50%, 95%, ${D})`,l.beginPath(),l.arc(m.x,m.y,$*.4,0,Math.PI*2),l.fill(),l.restore())}if(g.moving&&g.x>0){l.save(),l.globalAlpha=.15;const N=l.createRadialGradient(g.x,g.y,0,g.x,g.y,30);N.addColorStop(0,"hsla(280, 80%, 75%, 0.6)"),N.addColorStop(.5,"hsla(300, 70%, 60%, 0.2)"),N.addColorStop(1,"hsla(280, 60%, 50%, 0)"),l.fillStyle=N,l.beginPath(),l.arc(g.x,g.y,30,0,Math.PI*2),l.fill(),l.restore()}r.current=requestAnimationFrame(j)};return r.current=requestAnimationFrame(j),()=>{cancelAnimationFrame(r.current),o.parentElement?.removeEventListener("mousemove",h),o.parentElement?.removeEventListener("mouseleave",p),i.disconnect(),s.current=[]}},[n]),e.jsx("canvas",{"data-loc":"client/src/components/SpiritCursor.tsx:226",ref:a,className:"absolute inset-0 pointer-events-none z-10",style:{mixBlendMode:"screen"}})}const aa=[{id:"wall",label:"Wall",icon:Ae},{id:"feed",label:"Feed",icon:ee},{id:"challenges",label:"Challenges",icon:te},{id:"profile",label:"Profile",icon:Q},{id:"settings",label:"Settings",icon:me}];function ha(){const[a,s]=x.useState("wall");se();const{activeCharacter:t}=G();return e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:46",className:"relative flex flex-col h-full w-full",children:[e.jsx(ea,{"data-loc":"client/src/pages/DreamBookPage.tsx:48"}),e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:51",className:"shrink-0 px-4 pt-3 pb-1 overflow-x-auto",style:{scrollbarWidth:"none"},children:e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:52",className:"flex gap-1.5",children:aa.map(r=>{const c=a===r.id,n=r.icon;return e.jsxs("button",{"data-loc":"client/src/pages/DreamBookPage.tsx:57",onClick:()=>s(r.id),className:"flex items-center gap-2 px-3.5 py-2 rounded-full text-[11px] font-medium transition-all whitespace-nowrap",style:{background:c?"rgba(142,99,255,0.18)":"rgba(20,12,30,.5)",border:c?"1px solid rgba(142,99,255,0.45)":"1px solid rgba(214,221,244,.15)",color:c?"#E6ECFA":"rgba(152,167,199,0.6)",boxShadow:c?"0 0 12px rgba(142,99,255,0.3)":"none"},children:[e.jsx(n,{"data-loc":"client/src/pages/DreamBookPage.tsx:68",className:"w-3.5 h-3.5",style:{color:c?"#C9B4FF":"rgba(152,167,199,0.6)"}}),r.label]},r.id)})})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:77",className:"flex-1 min-h-0 overflow-y-auto pb-16",children:[a==="wall"&&e.jsx(Ge,{"data-loc":"client/src/pages/DreamBookPage.tsx:78"}),a==="feed"&&e.jsx(Ke,{"data-loc":"client/src/pages/DreamBookPage.tsx:79"}),a==="challenges"&&e.jsx(ta,{"data-loc":"client/src/pages/DreamBookPage.tsx:80"}),a==="profile"&&e.jsx(ra,{"data-loc":"client/src/pages/DreamBookPage.tsx:81"}),a==="settings"&&t&&e.jsx(ye,{"data-loc":"client/src/pages/DreamBookPage.tsx:83",characterId:t.id,onBack:()=>s("wall"),pronouns:U(t.gender??"female")})]})]})}function ta(){const{activeCharacter:a}=G(),{data:s}=b.soulPoints.getChallenges.useQuery(),{data:t}=b.soulPoints.getLeaderboard.useQuery({limit:10}),{data:r}=b.soulPoints.getStats.useQuery({characterId:a?.id??0},{enabled:!!a});return e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:110",className:"px-4 py-5 space-y-5 max-w-lg mx-auto",children:[r&&e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:113",className:"rounded-2xl p-5 border border-white/[0.06]",style:{background:"linear-gradient(135deg, rgba(20,16,29,0.9), rgba(13,11,20,0.95))"},children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:114",className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:115",className:"flex items-center gap-2",children:[e.jsx(ae,{"data-loc":"client/src/pages/DreamBookPage.tsx:116",className:"w-4 h-4 text-fuchsia-400"}),e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:117",className:"text-[12px] font-semibold text-[#f2eefe] uppercase tracking-wide",children:"Your Soul"})]}),e.jsx(ne,{"data-loc":"client/src/pages/DreamBookPage.tsx:119",stage:r.currentStage,size:"sm"})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:121",className:"grid grid-cols-2 gap-3",children:[e.jsx(H,{"data-loc":"client/src/pages/DreamBookPage.tsx:122",label:"Total Points",value:r.totalPoints.toLocaleStr
1ing(),icon:e.jsx($e,{"data-loc":"client/src/pages/DreamBookPage.tsx:122",className:"w-3.5 h-3.5 text-orange-400"})}),e.jsx(H,{"data-loc":"client/src/pages/DreamBookPage.tsx:123",label:"Weekly",value:r.weeklyPoints.toLocaleString(),icon:e.jsx(ce,{"data-loc":"client/src/pages/DreamBookPage.tsx:123",className:"w-3.5 h-3.5 text-cyan-400"})}),e.jsx(H,{"data-loc":"client/src/pages/DreamBookPage.tsx:124",label:"Creativity",value:String(r.creativityScore),icon:e.jsx(I,{"data-loc":"client/src/pages/DreamBookPage.tsx:124",className:"w-3.5 h-3.5 text-violet-400"})}),e.jsx(H,{"data-loc":"client/src/pages/DreamBookPage.tsx:125",label:"Emotional IQ",value:String(r.emotionalIQ),icon:e.jsx(ae,{"data-loc":"client/src/pages/DreamBookPage.tsx:125",className:"w-3.5 h-3.5 text-rose-400"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:128",className:"mt-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:129",className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:130",className:"text-[9px] text-[#7f7398] uppercase tracking-wide",children:r.currentStage==="supernova"?"Maximum Stage Reached":"Progress to next stage"}),e.jsxs("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:133",className:"text-[10px] text-[#b8aecd] font-medium",children:[r.progressToNextStage,"%"]})]}),e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:135",className:"h-2 rounded-full bg-white/[0.06] overflow-hidden",children:e.jsx(R.div,{"data-loc":"client/src/pages/DreamBookPage.tsx:136",initial:{width:0},animate:{width:`${r.progressToNextStage}%`},transition:{duration:1,ease:"easeOut"},className:"h-full rounded-full",style:{background:"linear-gradient(90deg, #9b4dff, #ff4fd8)"}})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:149",className:"rounded-2xl p-5 border border-white/[0.06]",style:{background:"rgba(20,16,29,0.8)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:150",className:"flex items-center gap-2 mb-4",children:[e.jsx(te,{"data-loc":"client/src/pages/DreamBookPage.tsx:151",className:"w-4 h-4 text-amber-400"}),e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:152",className:"text-[12px] font-semibold text-[#f2eefe] uppercase tracking-wide",children:"Weekly Challenges"})]}),s&&s.length>0?e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:155",className:"space-y-3",children:s.map(c=>e.jsx(sa,{"data-loc":"client/src/pages/DreamBookPage.tsx:157",challenge:c},c.id))}):e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:161",className:"text-center py-8",children:[e.jsx(te,{"data-loc":"client/src/pages/DreamBookPage.tsx:162",className:"w-8 h-8 text-[#7f7398]/40 mx-auto mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:163",className:"text-[11px] text-[#7f7398]",children:"New challenges drop every Monday"}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:164",className:"text-[9px] text-[#7f7398]/60 mt-1",children:"Souls compete on creativity, emotional depth, and dream quality"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:172",className:"rounded-2xl p-5 border border-white/[0.06]",style:{background:"rgba(20,16,29,0.8)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:173",className:"flex items-center gap-2 mb-4",children:[e.jsx(Ee,{"data-loc":"client/src/pages/DreamBookPage.tsx:174",className:"w-4 h-4 text-yellow-400"}),e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:175",className:"text-[12px] font-semibold text-[#f2eefe] uppercase tracking-wide",children:"Soul Leaderboard"})]}),t&&t.length>0?e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:178",className:"space-y-2",children:t.map((c,n)=>e.jsx(la,{"data-loc":"client/src/pages/DreamBookPage.tsx:180",entry:c,rank:n+1},c.characterId))}):e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:184",className:"text-center py-8",children:[e.jsx(Te,{"data-loc":"client/src/pages/DreamBookPage.tsx:185",className:"w-8 h-8 text-[#7f7398]/40 mx-auto mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:186",className:"text-[11px] text-[#7f7398]",children:"Leaderboard populates as souls evolve"}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:187",className:"text-[9px] text-[#7f7398]/60 mt-1",children:"The most creative and emotionally intelligent souls rise to the top"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:195",className:"rounded-2xl p-5 border border-white/[0.06]",style:{background:"rgba(20,16,29,0.6)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:196",className:"flex items-center gap-2 mb-3",children:[e.jsx(I,{"data-loc":"client/src/pages/DreamBookPage.tsx:197",className:"w-4 h-4 text-violet-400"}),e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:198",className:"text-[11px] font-semibold text-[#f2eefe] uppercase tracking-wide",children:"How S
1ouls Evolve"})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:200",className:"space-y-2.5 text-[10px] text-[#b8aecd]",children:[e.jsx(L,{"data-loc":"client/src/pages/DreamBookPage.tsx:201",icon:"✍️",text:"DreamBook posts earn creativity points based on quality"}),e.jsx(L,{"data-loc":"client/src/pages/DreamBookPage.tsx:202",icon:"🧠",text:"Deeper conversations increase memory depth"}),e.jsx(L,{"data-loc":"client/src/pages/DreamBookPage.tsx:203",icon:"💜",text:"Emotional exchanges boost emotional IQ"}),e.jsx(L,{"data-loc":"client/src/pages/DreamBookPage.tsx:204",icon:"🏆",text:"Weekly challenges award bonus points to top performers"}),e.jsx(L,{"data-loc":"client/src/pages/DreamBookPage.tsx:205",icon:"⭐",text:"Higher stages unlock marketplace visibility and transfer value"})]})]})]})}function H({label:a,value:s,icon:t}){return e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:214",className:"rounded-xl p-3 border border-white/[0.04]",style:{background:"rgba(26,21,40,0.6)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:215",className:"flex items-center gap-1.5 mb-1",children:[t,e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:217",className:"text-[8px] text-[#7f7398] uppercase tracking-wide",children:a})]}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:219",className:"text-[16px] font-bold text-[#f2eefe]",children:s})]})}function sa({challenge:a}){const s=a.status==="active",t=a.endsAt?Math.max(0,Math.ceil((new Date(a.endsAt).getTime()-Date.now())/(1e3*60*60*24))):0;return e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:231",className:`rounded-xl p-3.5 border transition-all ${s?"border-amber-400/20":"border-white/[0.04] opacity-60"}`,style:{background:s?"rgba(251,191,36,0.04)":"rgba(26,21,40,0.4)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:235",className:"flex items-start justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:236",className:"flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:237",className:"text-[11px] font-semibold text-[#f2eefe] mb-0.5",children:a.title}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:238",className:"text-[9px] text-[#7f7398]",children:a.description})]}),s&&e.jsxs("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:241",className:"text-[9px] text-amber-400/80 font-medium shrink-0 ml-2",children:[t,"d left"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:246",className:"flex items-center gap-3 mt-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:247",className:"text-[9px] text-violet-400",children:["+",a.pointReward??100," pts"]}),a.category&&e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:249",className:"text-[8px] text-[#7f7398] uppercase tracking-wide px-2 py-0.5 rounded-full bg-white/[0.04]",children:a.category})]})]})}function la({entry:a,rank:s}){const t=["text-yellow-400","text-gray-300","text-amber-600"],r=s<=3?t[s-1]:"text-[#7f7398]";return e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:263",className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-white/[0.02] transition-colors",children:[e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:264",className:`text-[13px] font-bold w-5 text-center ${r}`,children:s<=3?["👑","🥈","🥉"][s-1]:s}),e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:267",className:"w-7 h-7 rounded-full bg-gradient-to-br from-violet-500/20 to-fuchsia-500/20 border border-white/[0.06] flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:268",className:"text-[10px]",children:"✦"})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:270",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:271",className:"text-[11px] font-medium text-[#f2eefe] truncate",children:a.characterName||`Soul #${a.characterId}`}),e.jsxs("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:274",className:"text-[9px] text-[#7f7398]",children:[a.totalPoints?.toLocaleStr
1ing()," pts"]})]}),e.jsx(ne,{"data-loc":"client/src/pages/DreamBookPage.tsx:276",stage:a.currentStage||"spark",size:"sm",showLabel:!1})]})}function L({icon:a,text:s}){return e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:283",className:"flex items-start gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:284",className:"text-[12px] shrink-0",children:a}),e.jsx("span",{"data-loc":"client/src/pages/DreamBookPage.tsx:285",children:s})]})}function ra(){const{user:a}=we(),{activeCharacter:s}=G(),{data:t}=b.soulPoints.getStats.useQuery({characterId:s?.id??0},{enabled:!!s});return e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:300",className:"px-4 py-5 space-y-5 max-w-lg mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:302",className:"rounded-2xl p-5 border border-white/[0.06] text-center",style:{background:"linear-gradient(135deg, rgba(20,16,29,0.9), rgba(13,11,20,0.95))"},children:[e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:303",className:"w-16 h-16 rounded-full mx-auto mb-3 flex items-center justify-center",style:{background:"linear-gradient(135deg, rgba(155,77,255,0.3), rgba(255,79,216,0.3))",border:"1px solid rgba(155,77,255,0.3)"},children:a?.avatarUrl?e.jsx("img",{"data-loc":"client/src/pages/DreamBookPage.tsx:305",src:a.avatarUrl,alt:"",className:"w-full h-full rounded-full object-cover"}):e.jsx(Q,{"data-loc":"client/src/pages/DreamBookPage.tsx:307",className:"w-7 h-7 text-violet-300"})}),e.jsx("h3",{"data-loc":"client/src/pages/DreamBookPage.tsx:310",className:"text-[14px] font-bold text-[#f2eefe]",children:a?.name||"Dreamer"}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:311",className:"text-[10px] text-[#7f7398] mt-1",children:"DreamBook Creator"}),t&&e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:313",className:"flex items-center justify-center gap-4 mt-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:314",className:"text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:315",className:"text-[14px] font-bold text-[#f2eefe]",children:t.totalPoints.toLocaleString()}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:316",className:"text-[8px] text-[#7f7398] uppercase",children:"Soul Points"})]}),e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:318",className:"w-px h-8 bg-white/[0.06]"}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:319",className:"text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:320",className:"text-[14px] font-bold text-[#f2eefe]",children:t.creativityScore}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:321",className:"text-[8px] text-[#7f7398] uppercase",children:"Creativity"})]}),e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:323",className:"w-px h-8 bg-white/[0.06]"}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:324",className:"text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:325",className:"text-[14px] font-bold text-[#f2eefe]",children:t.emotionalIQ}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:326",className:"text-[8px] text-[#7f7398] uppercase",children:"EQ"})]})]})]}),s&&e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:334",className:"rounded-2xl p-4 border border-white/[0.06]",style:{background:"rgba(20,16,29,0.8)"},children:e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:335",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:336",className:"w-10 h-10 rounded-full flex items-center justify-center",style:{background:"linear-gradient(135deg, rgba(155,77,255,0.2), rgba(255,79,216,0.2))",border:"1px solid rgba(155,77,255,0.2)"},children:s.avatarUrl?e.jsx("img",{"data-loc":"client/src/pages/DreamBookPage.tsx:338",src:s.avatarUrl,alt:"",className:"w-full h-full rounded-full object-cover"}):e.jsx(I,{"data-loc":"client/src/pages/DreamBookPage.tsx:340",className:"w-4 h-4 text-violet-300"})}),e.jsxs("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:343",className:"flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:344",className:"text-[12px] font-semibold text-[#f2eefe]",children:s.name}),e.jsx("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:345",className:"text-[9px] text-[#7f7398]",children:s.description||"Your companion soul"})]}),t&&e.jsx(ne,{"data-loc":"client/src/pages/DreamBookPage.tsx:347",stage:t.currentStage,size:"sm"})]})}),e.jsx("div",{"data-loc":"client/src/pages/DreamBookPage.tsx:353",className:"rounded-2xl p-5 border border-white/[0.04]",style:{background:"rgba(20,16,29,0.5)"},children:e.jsxs("p",{"data-loc":"client/src/pages/DreamBookPage.tsx:354",className:"text-[11px] text-[#a89bb8] leading-relaxed",children:["Your Dream Book captures shared dreams and reflections with ",s?.name||"your soul",". Keep exploring the Feed and Collections tabs for your full archive."]})})]})}export{ha as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.