import{c as N}from"./chunk-CD6LKOJX.js";import{a as j}from"./chunk-VMNZR6KW.js";import{$a as _,$c as u,B as c,Q as g,Sc as x,Xc as d,Y as E,aa as a,da as w,na as B,nc as v,sh as I,tg as l,wc as D,xh as R,za as O}from"./chunk-GM43ZGTR.js";import{i as n}from"./chunk-SLIYHYWC.js";var h=class h{authHttp=a(u);restExtractor=a(I);restService=a(R);videoService=a(N);list(t,e){let o=this.restService.componentToRestPagination(t),r=new d;return r=this.restService.addRestGetParams(r,o),e&&(r=r.append("search",e)),this.authHttp.get(h.BASE_USER_VIDEOS_HISTORY_URL,{params:r}).pipe(g(i=>this.videoService.extractVideos(i)),c(i=>this.restExtractor.handleError(i)))}deleteElement(t){return this.authHttp.delete(h.BASE_USER_VIDEOS_HISTORY_URL+"/"+t.id).pipe(c(e=>this.restExtractor.handleError(e)))}clearAll(){return this.authHttp.post(h.BASE_USER_VIDEOS_HISTORY_URL+"/remove",{}).pipe(c(t=>this.restExtractor.handleError(t)))}};n(h,"BASE_USER_VIDEOS_HISTORY_URL",l.apiUrl+"/api/v1/users/me/history/videos"),n(h,"\u0275fac",function(e){return new(e||h)}),n(h,"\u0275prov",E({token:h,factory:h.\u0275fac}));var y=h;var p=class p{authHttp=a(u);restService=a(R);restExtractor=a(I);changeOwnership(t,e){let o=p.BASE_VIDEO_CHANGE_OWNERSHIP_URL+t+"/give-ownership",r={username:e};return this.authHttp.post(o,r).pipe(c(i=>this.restExtractor.handleError(i)))}getOwnershipChanges(t,e){let o=p.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership",r=new d;return r=this.restService.addRestGetParams(r,t,e),this.authHttp.get(o,{params:r}).pipe(c(i=>this.restExtractor.handleError(i)))}acceptOwnership(t,e){let o=p.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership/"+t+"/accept";return this.authHttp.post(o,e).pipe(c(r=>this.restExtractor.handleError(r)))}refuseOwnership(t){let e=p.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership/"+t+"/refuse";return this.authHttp.post(e,{}).pipe(c(o=>this.restExtractor.handleError(o)))}};n(p,"BASE_VIDEO_CHANGE_OWNERSHIP_URL",l.apiUrl+"/api/v1/videos/"),n(p,"\u0275fac",function(e){return new(e||p)}),n(p,"\u0275prov",E({token:p,factory:p.\u0275fac}));var L=p;var f=class f{authHttp=a(u);restExtractor=a(I);restService=a(R);listAccountVideoChannelsSyncs(t){let{pagination:e,sort:o,account:r}=t,i=new d;i=this.restService.addRestGetParams(i,e,o);let m=j.BASE_ACCOUNT_URL+r.nameWithHost+"/video-channel-syncs";return this.authHttp.get(m,{params:i}).pipe(c(U=>this.restExtractor.handleError(U)))}createSync(t){return this.authHttp.post(f.BASE_VIDEO_CHANNEL_URL,t).pipe(c(e=>this.restExtractor.handleError(e)))}deleteSync(t){let e=`${f.BASE_VIDEO_CHANNEL_URL}/${t}`;return this.authHttp.delete(e).pipe(c(o=>this.restExtractor.handleError(o)))}};n(f,"BASE_VIDEO_CHANNEL_URL",l.apiUrl+"/api/v1/video-channel-syncs"),n(f,"\u0275fac",function(e){return new(e||f)}),n(f,"\u0275prov",E({token:f,factory:f.\u0275fac,providedIn:"root"}));var T=f;function ct(s){return s.buttons===0||s.detail===0}function pt(s){let t=s.touches&&s.touches[0]||s.changedTouches&&s.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}function ft(s,t,e,o,r){let i=parseInt(v.major),m=parseInt(v.minor);return i>19||i===19&&m>0||i===0&&m===0?s.listen(t,e,o,r):(t.addEventListener(e,o,r),()=>{t.removeEventListener(e,o,r)})}var H;try{H=typeof Intl<"u"&&Intl.v8BreakIterator}catch{H=!1}var It=(()=>{let t=class t{_platformId=a(O);isBrowser=this._platformId?x(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||H)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}};n(t,"\u0275fac",function(r){return new(r||t)}),n(t,"\u0275prov",E({token:t,factory:t.\u0275fac,providedIn:"root"}));let s=t;return s})();var A=new WeakMap,Ht=(()=>{let t=class t{_appRef;_injector=a(B);_environmentInjector=a(w);load(o){let r=this._appRef=this._appRef||this._injector.get(_),i=A.get(r);i||(i={loaders:new Set,refs:[]},A.set(r,i),r.onDestroy(()=>{A.get(r)?.refs.forEach(m=>m.destroy()),A.delete(r)})),i.loaders.has(o)||(i.loaders.add(o),i.refs.push(D(o,{environmentInjector:this._environmentInjector})))}};n(t,"\u0275fac",function(r){return new(r||t)}),n(t,"\u0275prov",E({token:t,factory:t.\u0275fac,providedIn:"root"}));let s=t;return s})();function Bt(s){return Array.isArray(s)?s:[s]}export{ct as a,pt as b,ft as c,It as d,Ht as e,Bt as f,y as g,L as h,T as i};
/**i18n:aa38438cfc6bb6877c9985433629bf5f310ba8cfd6183982ad2c0c8f601d3935*/
//# sourceMappingURL=chunk-B2NWYGN4.js.map
