PageSourceSearch

https://read.cash/_app/immutable/chunks/Cm_62S1d.js

js read.cash collected 2026-09-24 17:46:59 UTC 12,524 bytes, 1 lines download raw bytes

1import"./Bzak7iHL.js";import{t as I,i as b,w as H,k as e,m as s,v as i,n as r,u as d,x as Me,p as ye,f as ke,g as we,j as Te,q as _,C as ne,A as Xe,L as Le,y as q,B as W,I as je}from"./B9yhDCp5.js";import{i as X}from"./D8jxXwFw.js";import{e as Ce}from"./Ce9Z-EY7.js";import{a as et}from"./BIAFaxXB.js";import{b as M,s as v,a as Ee,f as oe}from"./Cr-AEsyU.js";import{S as tt}from"./uRjgAbFx.js";import{A as at}from"./D277X-W0.js";import{p as ue}from"./COrlVrLe.js";import{s as pe,aO as he,bc as Ae,bd as De,a5 as rt,be as Y,bf as Ne}from"./JmJe-QpO.js";import{s as st,z as ot,o as nt}from"./DLW8wAAZ.js";import{t as k}from"./XxsWNSZS.js";import{g as it,a as lt,b as dt}from"./DLWEqhiV.js";import{p as G}from"./T4glfVoP.js";import{s as ct}from"./BoonklZT.js";import{b as Ue}from"./CwO2gEUd.js";var vt=H("<span></span>");function _e(P,a){let y=G(a,"class",3,"");var f=vt();I(()=>M(f,1,`skeleton block animate-pulse rounded bg-line ${y()}`)),b(P,f)}var ut=H('<div><!> <div class="min-w-0 flex-1"><!> <!></div></div>'),pt=H('<div role="status" aria-busy="true"></div>');function Ve(P,a){let y=G(a,"count",3,3),f=G(a,"avatar",3,"h-10 w-10"),l=G(a,"divided",3,!0),x=G(a,"compact",3,!1),T=G(a,"rowClass",3,"px-4 py-3");const u=d(()=>Array.from({length:y()},(B,p)=>p));var S=pt();Ce(S,20,()=>e(u),B=>B,(B,p)=>{var h=ut(),U=s(h);{let $=d(()=>`shrink-0 rounded-full ${f()}`);_e(U,{get class(){return e($)}})}var A=i(U,2),V=s(A);{let $=d(()=>`h-3.5 ${p%2?"w-1/2":"w-3/4"}`);_e(V,{get class(){return e($)}})}var ee=i(V,2);{var Z=$=>{_e($,{class:"mt-2 h-3 w-1/3"})};X(ee,$=>{x()||$(Z)})}r(A),r(h),I(()=>M(h,1,`flex items-center gap-3 ${T()} ${l()?"border-b border-line last:border-b-0":""}`)),b(B,h)}),r(S),I(()=>{v(S,"aria-label",a.label),v(S,"data-testid",a.testid)}),b(P,S)}const We=[{bg:"#d1fae5",fg:"#047857"},{bg:"#ede9fe",fg:"#6d28d9"},{bg:"#fef3c7",fg:"#b45309"},{bg:"#ffe4e6",fg:"#be123c"},{bg:"#dbeafe",fg:"#1d4ed8"},{bg:"#fce7f3",fg:"#be185d"}];function ht(P){let a=0;for(const y of P)a=a*31+y.charCodeAt(0)|0;return We[Math.abs(a)%We.length]}var mt=H('<button type="button"> </button>');function Ge(P,a){ye(a,!0);let y=G(a,"class",3,"");var f=ke(),l=we(f);{var x=T=>{var u=mt(),S=s(u,!0);r(u),I(B=>{M(u,1,`cursor-pointer text-left text-[13px] font-medium text-link hover:underline ${y()}`),v(u,"data-testid",a.testid),v(u,"data-remaining",a.remaining),_(S,B)},[()=>k("post.showNMore",{n:a.next})]),ne("click",u,function(...B){var p;(p=a.onmore)==null||p.apply(this,B)}),b(T,u)};X(l,T=>{a.next>0&&T(x)})}b(P,f),Te()}Me(["click"]);var ft=H('<div class="pane relative h-full svelte-1cn84eo"><div class="scroller h-full overflow-y-auto svelte-1cn84eo"><!></div> <div aria-hidden="true"><span class="thumb absolute right-1 w-[3px] rounded-full svelte-1cn84eo"></span></div></div>');function gt(P,a){ye(a,!0);let y=G(a,"id",3,""),f=G(a,"railTestid",3,""),l=q(void 0),x=q(void 0),T=q(0),u=q(0),S=q(!1),B=q(!1),p=q(!1),h=0,U;const A=24;function V(){if(!e(l)||!e(x))return;const c=e(l).scrollHeight-e(l).clientHeight;if(W(S,c>1),!e(S))return;const m=e(x).clientHeight;W(u,Math.max(A,e(l).clientHeight/e(l).scrollHeight*m),!0),W(T,e(l).scrollTop/c*(m-e(u)))}function ee(){V(),W(B,!0),clearTimeout(U),U=setTimeout(()=>W(B,!1),900)}Xe(()=>{if(!e(l))return;const c=new ResizeObserver(V);return c.observe(e(l)),e(l).firstElementChild&&c.observe(e(l).firstElementChild),V(),()=>{c.disconnect(),clearTimeout(U)}});function Z(c){if(!e(l)||!e(x))return;const m=e(x).getBoundingClientRect(),ae=m.height-e(u),R=e(l).scrollHeight-e(l).clientHeight;if(ae<=0||R<=0)return;const de=Math.min(Math.max(c-m.top-h,0),ae);e(l).scrollTop=de/ae*R}function $(c){if(!e(S)||!e(x))return;const m=c.clientY-e(x).getBoundingClientRect().top;h=m>=e(T)&&m<=e(T)+e(u)?m-e(T):e(u)/2,W(p,!0),e(x).setPointerCapture(c.pointerId),Z(c.clientY),c.preventDefault()}function me(c){e(p)&&Z(c.clientY)}function J(c){var m;e(p)&&(W(p,!1),(m=e(x))==null||m.releasePointerCapture(c.pointerId))}var ie=ft(),D=s(ie),te=s(D);ct(te,()=>a.children),r(D),Ue(D,c=>W(l,c),()=>e(l));var w=i(D,2);let le;var F=s(w);r(w),Ue(w,c=>W(x,c),()=>e(x)),r(ie),I(()=>{v(D,"id",y()),le=M(w,1,"rail absolute inset-y-1.5 right-0.5 w-2.5 svelte-1cn84eo",null,le,{on:e(B)||e(p),none:!e(S)}),v(w,"data-testid",f()),Ee(F,`top:${e(T)}px;height:${e(u)}px`)}),Le("scroll",D,ee),ne("pointerdown",w,$),ne("pointermove",w,me),ne("pointerup",w,J),Le("pointercancel",w,J),b(P,ie),Te()}Me(["pointerdown","pointermove","pointerup"]);const Re=(P,a=je,y=je)=>{var f=bt();I(l=>{M(f,1,`ml-auto h-2 w-2 shrink-0 rounded-full ${a()?"bg-link":"bg-line"}`),v(f,"title",l),v(f,"data-new",a())},[()=>a()?k("misc.newPostsIn",{what:y()}):k("misc.caughtUp")]),b(P,f)};var bt=H("<span></span>"),xt=H('<span class="ml-auto flex h-4 min-w-4 items-center justify-center rounded-full bg-danger px-1 text-[10px] leading-none font-bold text-white" data-testid="sidebar-dms-badge"> </span>'),_t=H('<a><span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-[13px] font-bold"> </span> <span> </span> <!></a>'),kt=H('<a href="/groups" class="px-3 text-[13px] text-muted hover:text-ink"> </a>'),wt=H('<button class="mb-1.5 ml-14 block cursor-pointer text-left text-[12px] text-muted underline decoration-dotted underline-offset-2 hover:text-brand"> </button>'),Ct=H("<div><a><!> <span> <!></span> <!></a> <!></div>"),Mt=H('<span class="px-3 text-[13px] text-muted"> </span>'),yt=H('<aside class="flex flex-col gap-6 px-3 py-4" data-testid="sidebar"><nav class="flex flex-col gap-0.5"><a href="/" data-testid="sidebar-home"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 10.5 12 3l9 7.5V21a1 1 0 0 1-1 1h-5v-7h-6v7H4a1 1 0 0 1-1-1z"></path></svg> </a> <a href="/search" data-testid="sidebar-search"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> </a> <a href="/map" data-testid="sidebar-map"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 4 6 2.5L21 4v15l-6 2.5L9 19l-6 2.5V6z"></path><path d="M9 4v15M15 6.5v15"></path></svg> </a> <a href="/dm" data-testid="sidebar-dms"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg> <!></a> <a href="/bookmarks" data-testid="sidebar-bookmarks"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg> </a></nav> <div><h3 class="mb-1.5 flex items-center justify-between px-3 text-[13px] font-bold"> <a href="/groups" class="font-semibold text-link hover:underline" data-testid="sidebar-all-groups"> </a></h3> <div class="flex flex-col gap-0.5" data-testid="sidebar-groups"><!> <!></div></div> <div><h3 class="mb-1.5 px-3 text-[13px] font-bold"> </h3> <div class="flex flex-col gap-0.5" data-testid="sidebar-people"><!> <!></div></div></aside>'),Tt=H('<div class="sticky top-16 hidden h-[calc(100vh-4rem)] w-[264px] shrink-0 border-r border-line bg-surface lg:block"><!></div>');function Rt(P,a){ye(a,!0);const y=d(()=>he.people),f=d(()=>he.groups),l=d(()=>e(f).slice(0,Y.groups)),x=d(()=>e(y).slice(0,Y.people)),T=d(()=>Math.max(0,e(f).length-Y.groups)),u=d(()=>Math.max(0,e(y).length-Y.people)),S=d(()=>Math.min(Ne(Y.groups)-Y.groups,e(T))),B=d(()=>Math.min(Ne(Y.people)-Y.people,e(u))),p=d(()=>ue.url.pathname),h=d(()=>e(p)==="/"?"home":e(p).startsWith("/search")?"search":e(p).startsWith("/dm")?"dm":e(p).startsWith("/bookmarks")?"bookmarks":e(p).startsWith("/map")?"map":""),U="flex h-11 items-center gap-3 rounded-xl px-3";function A(J){return J?`${U} bg-brandsoft font-semibold text-brand`:`${U} cursor-pointer font-medium hover:bg-canvas`}const V=d(()=>ue.route.id??""),ee=d(()=>e(V).startsWith("/@[handle]")?ue.params.handle:void 0),Z=d(()=>e(V).startsWith("/g/[slug]")?ue.params.slug:void 0);var $=Tt(),me=s($);gt(me,{id:"sidebar-scroll",railTestid:"sidebar-rail",children:(J,ie)=>
1{var D=yt(),te=s(D),w=s(te),le=i(s(w));r(w);var F=i(w,2),c=i(s(F));r(F);var m=i(F,2),ae=i(s(m));r(m);var R=i(m,2),de=i(s(R)),Ke=i(de);{var Ye=g=>{var t=xt(),j=s(t,!0);r(t),I(()=>_(j,pe.unreadDms)),b(g,t)};X(Ke,g=>{pe.unreadDms>0&&g(Ye)})}r(R);var ce=i(R,2),Fe=i(s(ce));r(ce),r(te);var fe=i(te,2),ge=s(fe),Se=s(ge),Be=i(Se),Oe=s(Be,!0);r(Be),r(ge);var He=i(ge,2),Pe=s(He);Ce(Pe,17,()=>e(l),g=>g.slug,(g,t)=>{const j=d(()=>ht(e(t).slug)),z=d(()=>e(t).slug===e(Z)),L=d(()=>dt(e(t).slug,e(t).name,e(t).emblem));var o=_t(),n=s(o),N=s(n,!0);r(n);var C=i(n,2),Q=s(C,!0);r(C);var re=i(C,2);Re(re,()=>e(t).hasNew,()=>e(L)),r(o),et(o,(O,se)=>{var ve;return(ve=it)==null?void 0:ve(O,se)},()=>({slug:e(t).slug,field:"name",text:e(t).name,preloaded:e(t).nameTranslation})),I(O=>{v(o,"href",`/g/${e(t).slug}`),M(o,1,`flex h-10 cursor-pointer items-center gap-3 rounded-xl px-3 ${e(z)?"bg-brandsoft":"hover:bg-canvas"}`),v(o,"data-testid",`sidebar-group-${e(t).slug}`),v(o,"data-active",e(z)),Ee(n,`background:${e(j).bg};color:${e(j).fg}`),_(N,O),M(C,1,`truncate ${e(z)?"font-semibold text-brand":"font-medium"}`),_(Q,e(L))},[()=>lt(e(t).slug,e(t).name)]),b(g,o)},g=>{var t=ke(),j=we(t);{var z=o=>{{let n=d(()=>k("misc.loadingGroups"));Ve(o,{get count(){return Ae},avatar:"h-8 w-8",divided:!1,compact:!0,rowClass:"h-10 px-3",get label(){return e(n)},testid:"sidebar-groups-skeleton"})}},L=o=>{var n=kt(),N=s(n,!0);r(n),I(C=>_(N,C),[()=>k("misc.noGroups")]),b(o,n)};X(j,o=>{he.loaded?o(L,-1):o(z)})}b(g,t)});var qe=i(Pe,2);Ge(qe,{get next(){return e(S)},get remaining(){return e(T)},onmore:()=>De("groups"),testid:"sidebar-groups-more",class:"mt-1 px-3"}),r(He),r(fe);var $e=i(fe,2),be=s($e),Ze=s(be,!0);r(be);var Ie=i(be,2),ze=s(Ie);Ce(ze,17,()=>e(x),g=>g.handle,(g,t,j)=>{const z=d(()=>{var E,K;return st({theirCenti:e(t).ktCenti,myCenti:(E=pe.me)==null?void 0:E.ktCenti,related:!0,isSelf:((K=pe.me)==null?void 0:K.handle)===e(t).handle})}),L=d(()=>rt(e(t).handle,e(ee)));var o=Ct(),n=s(o),N=s(n);at(N,{get handle(){return e(t).handle},get url(){return e(t).avatarUrl},size:32});var C=i(N,2),Q=s(C),re=i(Q);tt(re,{get handle(){return e(t).handle}}),r(C);var O=i(C,2);{let E=d(()=>k("misc.personPosts",{handle:e(t).handle}));Re(O,()=>e(t).hasNew,()=>e(E))}r(n);var se=i(n,2);{var ve=E=>{var K=wt(),Qe=s(K,!0);r(K),I(xe=>{v(K,"data-testid",`sidebar-zero-kt-${e(t).handle}`),_(Qe,xe)},[()=>ot()]),ne("click",K,()=>nt(e(t).handle,{avatarUrl:e(t).avatarUrl,rescue:!0,onSent:xe=>e(t).ktCenti=xe})),b(E,K)};X(se,E=>{e(z)&&E(ve)})}r(o),I(()=>{M(o,1,`rounded-xl ${e(L)?"bg-brandsoft":"hover:bg-canvas"}`),v(n,"href",`/@${e(t).handle}`),M(n,1,`flex cursor-pointer items-center gap-3 px-3 ${e(z)?"h-9":"h-10"}`),v(n,"data-testid",`sidebar-person-${e(t).handle}`),v(n,"data-active",e(L)),M(C,1,`truncate ${e(L)?"font-semibold text-brand":"font-medium"}`),_(Q,`@${e(t).handle??""}`)}),b(g,o)},g=>{var t=ke(),j=we(t);{var z=o=>{{let n=d(()=>k("misc.loadingPeople"));Ve(o,{get count(){return Ae},avatar:"h-8 w-8",divided:!1,compact:!0,rowClass:"h-10 px-3",get label(){return e(n)},testid:"sidebar-people-skeleton"})}},L=o=>{var n=Mt(),N=s(n,!0);r(n),I(C=>_(N,C),[()=>k("misc.noPeople")]),b(o,n)};X(j,o=>{he.loaded?o(L,-1):o(z)})}b(g,t)});var Je=i(ze,2);Ge(Je,{get next(){return e(B)},get remaining(){return e(u)},onmore:()=>De("people"),testid:"sidebar-people-more",class:"mt-1 px-3"}),r(Ie),r($e),r(D),I((g,t,j,z,L,o,n,N,C,Q,re,O,se)=>{M(w,1,g),v(w,"data-active",e(h)==="home"),_(le,` ${t??""}`),M(F,1,j),v(F,"data-active",e(h)==="search"),_(c,` ${z??""}`),M(m,1,L),v(m,"data-active",e(h)==="map"),_(ae,` ${o??""}`),M(R,1,n),v(R,"data-active",e(h)==="dm"),_(de,` ${N??""} `),M(ce,1,C),v(ce,"data-active",e(h)==="bookmarks"),_(Fe,` ${Q??""}`),_(Se,`${re??""} `),_(Oe,O),_(Ze,se)},[()=>oe(A(e(h)==="home")),()=>k("misc.home"),()=>oe(A(e(h)==="search")),()=>k("misc.search"),()=>oe(A(e(h)==="map")),()=>k("misc.map"),()=>oe(A(e(h)==="dm")),()=>k("misc.messages"),()=>oe(A(e(h)==="bookmarks")),()=>k("misc.saved"),()=>k("misc.groups"),()=>k("misc.allGroups"),()=>k("misc.people")]),b(J,D)},$$slots:{default:!0}}),r($),b(P,$),Te()}Me(["click"]);export{Ve as L,Rt as S,gt as V,_e as a,Ge as b,ht as g};

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.