import{a as P,b as w,c as M}from"./chunk-CIFPXHK6.js";import{a as E}from"./chunk-SWENKIWK.js";import{a as n}from"./chunk-ZF3OGIA3.js";import"./chunk-KBDPH4TY.js";import"./chunk-6ZU52M3E.js";import{b as O}from"./chunk-RQ52E722.js";import"./chunk-U3HOYEKV.js";import{d as F,h as C,i as A}from"./chunk-RX3EF5GN.js";import"./chunk-D45KGMZA.js";import"./chunk-WF5AJKEK.js";import"./chunk-XNOLFZYT.js";import"./chunk-FWHL545W.js";import"./chunk-OIEOFAIP.js";import"./chunk-RIY6TV27.js";import"./chunk-RKRMUKID.js";import"./chunk-Z6WPIXSW.js";import"./chunk-RLXQZ4PH.js";import"./chunk-7RMPQKFN.js";import"./chunk-E3OCJRNK.js";import{c as I}from"./chunk-J43WKQQR.js";import"./chunk-AGFYL5ES.js";import"./chunk-SIWG7NMF.js";import"./chunk-VTWEWKDW.js";import"./chunk-MBFHDGAY.js";import"./chunk-DU6G6LVZ.js";import"./chunk-PD6W4HLC.js";import"./chunk-NYZ42FWV.js";import"./chunk-KKUBL5J2.js";import"./chunk-ZWI4MO3D.js";import"./chunk-QD3YVVNU.js";import"./chunk-AC4LFYGD.js";import"./chunk-O5TKOBXI.js";import"./chunk-TTGK6TLE.js";import"./chunk-VJQ4W2DU.js";import"./chunk-H4LJ3V42.js";import"./chunk-FM26JV5X.js";import"./chunk-PRXU2OAW.js";import"./chunk-7SD3KVG7.js";import"./chunk-222RFNKA.js";import"./chunk-TRZEVFVP.js";import"./chunk-53W3MT4O.js";import"./chunk-345A5FS4.js";import{Ah as y,Ha as m,Jh as k,Kh as V,Q as p,S as u,Sa as S,Zh as _,aa as o,eb as v,m as l,nb as b,ob as f,pb as h,vh as T,xb as g}from"./chunk-RAOXHQSQ.js";import{a as c,b as a,i as d}from"./chunk-SLIYHYWC.js";var R=(()=>{let r=class r{authService=o(T);userSubscription=o(n);hooks=o(_);videoService=o(I);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Qu\u1EA3n l\xFD",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(()=>this.scopedTokensService.getScopedTokens()),u(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",S({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="Video t\u1EEB c\xE1c k\xEAnh b\u1EA1n \u0111\u0103ng k\xFD",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(b(0,"h1",1),g(1,0),f(),h(2,"my-videos-list",2)),i&2&&(m(2),v("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,O,F,A,C],children:[{path:"overview",component:w,data:{meta:{title:"Kh\xE1m ph\xE1"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+o(k).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:"K\xEAnh \u0111\u0103ng k\xFD"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:aa38438cfc6bb6877c9985433629bf5f310ba8cfd6183982ad2c0c8f601d3935*///# sourceMappingURL=chunk-HG72M2NA.js.map