PageSourceSearch

https://souju6.ai/assets/favorites-api-B0LUQkZU.js

js souju6.ai collected 2026-10-05 14:20:40 UTC 1,792 bytes, 1 lines download raw bytes

1import{s as y}from"./library-sync-events-DlVL0kGk.js";import{d as c}from"./main-CtyeVlnq.js";import{b as v}from"./saved-domain-C6FUF2FW.js";import{l as g}from"./library-display-Kdd0PubL.js";import{g as o}from"./movie-card-runtime-BsWugIRi.js";const d=c.injectEndpoints({endpoints:a=>({getFavorites:a.query({query:e=>({url:f("/v1/users/me/favorites",e),auth:"session"}),transformResponse:(e,t)=>{const r=o.parse(e);return{readStartedAt:t==null?void 0:t.requestStartedAt,items:r.items.map(v).filter(S),nextCursor:r.next_cursor,returnedCount:r.meta.returned_count,totalCount:r.meta.total_count,limit:r.meta.limit,kindFacets:r.categories.kind_facets,unclassifiedCount:r.categories.unclassified_count}},providesTags:(e,t,r)=>[n(r)],async onCacheEntryAdded(e,{dispatch:t,cacheEntryRemoved:r}){if(typeof window>"u"||!(e!=null&&e.accountScope))return;let i=!1,s=!1;const l=async()=>{if(s||i)return;s=!0;const u=t(d.util.getRunningQueryThunk("getFavorites",e));u&&await u,s=!1,i||t(c.util.invalidateTags([n(e)]))},m=y(window,e.accountScope,"favorite",()=>{l()});try{await r}finally{i=!0,m()}},keepUnusedDataFor:120})})}),{useGetFavoritesQuery:w,useLazyGetFavoritesQuery:C}=d;function f(a,e){var i,s;const t=new URLSearchParams;t.set("limit",String((e==null?void 0:e.limit)??24)),(i=e==null?void 0:e.cursor)!=null&&i.trim()&&t.set("cursor",e.cursor.trim()),(s=e==null?void 0:e.query)!=null&&s.trim()&&t.set("q",e.query.trim());const r=e!=null&&e.categoryId?g(e.categoryId):void 0;return r&&"kind"in r&&t.set("kind",r.kind),r&&"kind_state"in r&&t.set("kind_state",r.kind_state),`${a}?${t.toString()}`}function S(a){return!!(a.id.trim()&&a.title.trim())}function n(a){return{type:"LibraryFavorites",id:JSON.stringify([a==null?void 0:a.accountScope,f("/v1/users/me/favorites",a)])}}export{C as a,w 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.