import{a as P,b as w,c as M}from"./chunk-FP2TC45H.js";import{a as E}from"./chunk-CF2P3W6Y.js";import{a as n}from"./chunk-V2OSPR2Q.js";import"./chunk-U7VEW6UJ.js";import"./chunk-E6USL474.js";import"./chunk-QFIVKWN7.js";import"./chunk-YER5DYR4.js";import"./chunk-ZIJO4HO5.js";import{c as F,g as C,h as A}from"./chunk-PQP6QKSV.js";import"./chunk-IM4DWJIQ.js";import"./chunk-LW6EJSDY.js";import"./chunk-GLLGOTKA.js";import"./chunk-QLNUO5M7.js";import"./chunk-SY45KLBX.js";import"./chunk-WNIAPW4N.js";import"./chunk-UTEWCFAL.js";import"./chunk-WQEVKAAT.js";import"./chunk-D44Y6ICR.js";import"./chunk-Q2RMO77J.js";import"./chunk-3DWZH7C4.js";import"./chunk-KUGXJVP2.js";import"./chunk-Q27U5NFH.js";import"./chunk-F327JUCN.js";import"./chunk-EVTGC7G6.js";import{c as O}from"./chunk-6MIIW7HE.js";import"./chunk-UJ3D6FHR.js";import"./chunk-74PB44RO.js";import"./chunk-2VIKQKFK.js";import"./chunk-PPCIMEI5.js";import"./chunk-LCBJQMGS.js";import"./chunk-23B6OW6U.js";import"./chunk-KVMFLJKE.js";import"./chunk-7NI2GBG4.js";import"./chunk-5HYDCLPP.js";import"./chunk-L26R6QLO.js";import"./chunk-3BLHHGXR.js";import"./chunk-WVXLVXI4.js";import"./chunk-6LNMEHUC.js";import"./chunk-AZDDTWAU.js";import"./chunk-CFJ5N37G.js";import"./chunk-XJZQBBLJ.js";import"./chunk-LNGYW555.js";import{Aa as S,Fh as k,K as p,Ka as f,Kh as y,Q as u,S as m,Th as _,Uh as V,aa as o,eb as b,fb as v,gb as h,hb as g,hi as I,m as l,vb as T}from"./chunk-O5L4E6JZ.js";import{a as c,b as a,i as d}from"./chunk-ISBQGYOJ.js";var R=(()=>{let r=class r{authService=o(k);userSubscription=o(n);hooks=o(I);videoService=o(O);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"\u7BA1\u7406",iconName:"cog"}];disabled=!1;feedToken;getVideosObservable(e,i){let t=a(c({},i.toVideosAPIObject()),{videoPagination:e,skipCount:!0});return this.hooks.wrapObsFun(this.userSubscription.getUserSubscriptionVideos.bind(this.userSubscription),t,"common","filter:api.user-subscriptions-videos.videos.list.params","filter:api.user-subscriptions-videos.videos.list.result");}getSyndicationItems(){return this.loadFeedToken().then(()=>{let e=this.authService.getUser();return this.videoService.getVideoSubscriptionFeedUrls(e.account.id,this.feedToken);});}disableForReuse(){this.disabled=!0;}enabledForReuse(){this.disabled=!1;}loadFeedToken(){if(this.feedToken)return Promise.resolve(this.feedToken);let e=this.authService.userInformationLoaded.pipe(p(),u(()=>this.scopedTokensService.getScopedTokens()),m(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",f({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="\u767B\u9332\u30C1\u30E3\u30F3\u30CD\u30EB\u304B\u3089\u306E\u52D5\u753B",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(v(0,"h1",1),T(1,0),h(),g(2,"my-videos-list",2)),i&2&&(S(2),b("getVideosObservableFunction",t.getVideosObservableFunction)("getSyndicationItemsFunction",t.getSyndicationItemsFunction)("defaultSort",t.defaultSort)("disabled",t.disabled)("headerActions",t.actions));},dependencies:[E],encapsulation:2}));let s=r;return s;})();var te=[{path:"",providers:[P,n,F,A,C],children:[{path:"overview",component:w,data:{meta:{title:"\u30C7\u30A3\u30B9\u30AB\u30D0\u30FC"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+o(_).getDefaultTrendingSort()},{path:"recently-added",redirectTo:"browse?scope=federated&sort=-publishedAt"},{path:"local",redirectTo:"browse?scope=local&sort=-publishedAt"},{path:"browse",component:M,data:{reuse:{enabled:!0,key:"videos-list"}}},{path:"subscriptions",canActivate:[V],component:R,data:{meta:{title:"\u767B\u9332\u30C1\u30E3\u30F3\u30CD\u30EB"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:4d96fbbe8a02868f1b15225bb74dfc1273beaf38b7ce36e9c53048b85eee2d05*///# sourceMappingURL=chunk-ADMFIFEW.js.map