PageSourceSearch

https://herohero.co/assets/C0IVnRHW2.js

js herohero.co collected 2026-09-24 15:25:56 UTC 2,739 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`e2bba6101073785c6480ffad8979069e6f932abc`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`726a3032-4b21-4b59-ba9a-5fc81742f425`,e._sentryDebugIdIdentifier=`sentry-dbid-726a3032-4b21-4b59-ba9a-5fc81742f425`)}catch{}})();import{M as e,Ut as t}from"./DA72t4i4.js";import{b as n,c as r,h as i,m as a,x as o}from"./B_dnD7JI.js";import{f as s,m as c}from"./CvLieaVj.js";import{n as l}from"./COg9AnNZ2.js";import{n as u}from"./BiDBcgyH.js";import"./_bbo8uLw.js";import{a as d,i as f,r as p,s as m}from"./a4l8NqH92.js";import{s as h}from"./CEOg6EMH2.js";function g(){let e=n(),t=s();return()=>{e.invalidateQueries({predicate:e=>e.queryKey[0]===`listCreatorPosts`&&e.queryKey[1]==null});let n=t.currentUser?.path;n&&e.invalidateQueries({queryKey:u(n),refetchType:`all`})}}var _=`following`,v=e=>[_,t(e)],y=e=>[...v(e),`infinite`],b=n=>{let r=c(),a=n.sortDirection??`DESC`;return i({queryKey:e(()=>[...v(n.userId),n.first??20,t(a)]),queryFn:async()=>{let e=t(n.userId);if(!e)throw Error(`User not found`);return r.ListFollowing({first:n.first??20,userId:e,after:null,sortDirection:t(a)})},enabled:e(()=>!!t(n.userId)&&(t(n.enabled)??!0))})},x=n=>{let r=c(),i=n.sortDirection??`DESC`;return a({placeholderData:e(()=>t(n.userId)?o:void 0),queryKey:e(()=>[...y(n.userId),n.first??20,t(i)]),queryFn:async e=>{let a=t(n.userId);if(!a)throw Error(`User not found`);return r.ListFollowing({first:n.first??20,userId:a,after:e.pageParam,sortDirection:t(i)})},initialPageParam:null,getNextPageParam:e=>{let{hasNextPage:t,endCursor:n}=e.following.pageInfo;return t?n:null},enabled:e(()=>!!t(n.userId)&&(t(n.enabled)??!0))})};function S(e,{creatorId:t,creatorPath:n,isFollowing:i}){e.setQueryData(u(n),e=>e&&r(e,e=>{e.user.isFollowing=i,e.user.counts.followers=Math.max(0,e.user.counts.followers+(i?1:-1))})),p(e,t,e=>{e.isFollowing=i}),f(e,t,e=>{e.isFollowing=i}),e.setQueryData(l.creatorForSubscription(t),e=>e&&r(e,e=>{e.user.isFollowing=i})),e.setQueriesData({predicate:e=>e.queryKey[0]===`post-detail-page`},e=>!e||e.post.user.id!==t?e:r(e,e=>{e.post.user.isFollowing=i})),e.invalidateQueries({queryKey:[_]})}function C(e,{creatorId:t,creatorPath:n}){e.invalidateQueries({queryKey:u(n)}),e.invalidateQueries({queryKey:[h]}),e.invalidateQueries({queryKey:[_]}),e.invalidateQueries({queryKey:l.creatorForSubscription(t)});for(let t of d)e.invalidateQueries({queryKey:[t]});e.invalidateQueries({queryKey:[m]}),e.invalidateQueries({predicate:e=>e.queryKey[0]===`post-detail-page`&&e.state.data?.post.user.id===t})}export{b as a,x as i,S as n,g as o,_ as r,C 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.