1import{b6 as h,c as b,e as w,D as s,P as R,av as k,l as f,co as r,cD as y,cB as B,J as l,K as S,O as D,a1 as E,cE as O,bB as V}from"./DREHXjTd.js";const j={},A={flex:"","flex-col":"","gap-2":"","px-4":"","py-3":""};function H(n,o){return b(),w("div",A,[...o[0]||(o[0]=[s("div",{flex:"","gap-4":""},[s("div",null,[s("div",{"w-12":"","h-12":"","rounded-full":"",class:"skeleton-loading-bg"})]),s("div",{flex:"~ col 1 gap-2",pb2:"","min-w-0":""},[s("div",{flex:"",class:"skeleton-loading-bg","h-5":"","w-20":"",rounded:""}),s("div",{flex:"",class:"skeleton-loading-bg","h-4":"","w-full":"",rounded:""})])],-1)])])}const K=Object.assign(h(j,[["render",H]]),{__name:"SearchResultSkeleton"});function M(n,o={}){const p=l(!1),{client:x}=R(),t=l(!1),u=l([]),c=l([]),d=l([]),v=S(()=>r(n).trim());let i;const g=(e,m=!1)=>{m&&(u.value=[],c.value=[],d.value=[]),u.value=[...u.value,...e.accounts.map(a=>({type:"account",id:a.id,data:a,to:E(a)}))],c.value=[...c.value,...e.hashtags.map(a=>({type:"hashtag",id:`hashtag-${a.name}`,data:a,to:O(a.name)}))],d.value=[...d.value,...e.statuses.map(a=>({type:"status",id:a.id,data:a,to:V(a)}))]};k(()=>r(n),()=>{t.value=!!(v.value&&f.value)}),y(()=>r(n),async()=>{if(!v.value||!f.value)return;t.value=!0,i=x.value.v2.search.list({q:v.value,...r(o),resolve:!!D.value});const e=await i.values().next();p.value=!!e.done,e.done||g(e.value,!0),t.value=!1},{debounce:300});const _=async()=>{if(!v.value||!f.value||!i)return;t.value=!0;const e=await i.values().next();t.value=!1,p.value=!!e.done,e.done||g(e.value)};return{accounts:u,hashtags:c,statuses:d,loading:B(t),next:_}}export{K as _,M as u};
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.