1import{o as e}from"./rolldown-runtime-CoV_I8sK.js";import{Mt as t,_t as n}from"./currentUser-ZLh-7H7g.js";import{i as r,n as i,r as a}from"./queryClient-0BdSowcN.js";import{t as o}from"./react-CpBNgyEA.js";import{t as s}from"./experiments-B2660v-v.js";var c=class extends t{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:r()},t)}getOptimisticResult(e){return e.behavior=r(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:i(t,n.data),hasPreviousPage:a(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function l(e,t){return n(e,c,t)}var u=e(o()),d=e=>{let{hasNextPage:t,isFetching:n,isError:r,fetchNextPage:i}=e;(0,u.useEffect)(()=>{t&&!n&&!r&&i()},[t,n,r,i])},f=e=>e.flatMap(e=>e.results),p=()=>s(`short_pages`)?5:200,m=(e,t)=>{if(e.results.length!==0&&t.reduce((e,t)=>e+t.results.length,0)<(e.totalCount??0))return t.length};export{l as a,d as i,m as n,f as r,p as t};
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.