import{J as Je,m as mt,P as P$1}from'./chunk-DBkcRelE.js';import{J as Ji}from'./chunk-BKFzbMVd.js';import{B}from'./chunk-C8m0Xc8q.js';import'./chunk-DmAsi_9m.js';import'./chunk-3vLuVr6f.js';import'./chunk-D8k0e5mQ.js';import'./chunk-BeORjHTo.js';import'./chunk-DKL7x6EW.js';import{H as Ht,D as Dt,N as Nt}from'./chunk-D-Jqsism.js';import'./chunk-sjVbQlUC.js';import'./chunk-ChTAcsy3.js';import{d7 as ak,g,dm as Oi,aQ as Xe,a_ as Lk,aC as x,dd as sg,av as E,ao as D,dG as ze,a9 as Oe,br as lt,fB as Zn,b as Pa,s as sp,y as yV,u as ub,e as Pp,z as zB,a3 as B0}from'./main-BiUBeaMj.js';import'./chunk-C06z98JN.js';import'./chunk-CVz8lsM6.js';import'./chunk-F7sai10S.js';var P=(()=>{class r{authService=g(Xe);userSubscription=g(B);hooks=g(Lk);videoService=g(x);scopedTokensService=g(sg);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"\u7BA1\u7406",iconName:"cog"}];disabled=false;feedToken;getVideosObservable(e,i){let t=E(D({},i.toVideosAPIObject()),{videoPagination:e,skipCount:true});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=true;}enabledForReuse(){this.disabled=false;}loadFeedToken(){if(this.feedToken)return Promise.resolve(this.feedToken);let e=this.authService.userInformationLoaded.pipe(ze(),Oe(()=>this.scopedTokensService.getScopedTokens()),lt(i=>this.feedToken=i.feedToken));return Zn(e);}static ɵfac=function(i){return new(i||r)();};static ɵcmp=Pa({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="\u6765\u81EA\u4F60\u7684\u8BA2\u9605\u7684\u89C6\u9891",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(sp(0,"h1",1),yV(1,0),ub(),Pp(2,"my-videos-list",2)),i&2&&(zB(2),B0("getVideosObservableFunction",t.getVideosObservableFunction)("getSyndicationItemsFunction",t.getSyndicationItemsFunction)("defaultSort",t.defaultSort)("disabled",t.disabled)("headerActions",t.actions));},dependencies:[Ji],encapsulation:2,changeDetection:1});}return r;})();var oe=[{path:"",providers:[P$1,B,Ht,Dt,Nt],children:[{path:"overview",component:Je,data:{meta:{title:"\u63A2\u7D22\u89C6\u9891"},reuse:{enabled:true,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+g(Oi).getDefaultTrendingSort()},{path:"recently-added",redirectTo:"browse?scope=federated&sort=-publishedAt"},{path:"local",redirectTo:"browse?scope=local&sort=-publishedAt"},{path:"browse",component:mt,data:{reuse:{enabled:true,key:"videos-list"}}},{path:"subscriptions",canActivate:[ak],component:P,data:{meta:{title:"\u8BA2\u9605"},reuse:{enabled:true,key:"subscription-videos-list"}}}]}];/**i18n:fad79908930cbb4c308e7550a5fe49bb3841dbb330066a6429aebaa006173605*/export{oe as default};//# sourceMappingURL=chunk-DoD-Tim_.js.map