import{c as H}from"./chunk-DUP5W6EX.js";import{c as x}from"./chunk-4OFCYKML.js";import{Bf as l,C as d,Pc as j,R as S,Z as f,_a as D,ba as s,ea as g,hd as T,ih as E,ka as B,nd as m,nh as I,qd as u,xa as w}from"./chunk-ZSQR4KTU.js";import{i}from"./chunk-IQVXR75E.js";var c=class c{authHttp=s(u);restExtractor=s(E);restService=s(I);videoService=s(H);list(t,o){let a=this.restService.componentToRestPagination(t),r=new m;return r=this.restService.addRestGetParams(r,a),o&&(r=r.append("search",o)),this.authHttp.get(c.BASE_USER_VIDEOS_HISTORY_URL,{params:r}).pipe(S(n=>this.videoService.extractVideos(n)),d(n=>this.restExtractor.handleError(n)))}deleteElement(t){return this.authHttp.delete(c.BASE_USER_VIDEOS_HISTORY_URL+"/"+t.id).pipe(d(o=>this.restExtractor.handleError(o)))}clearAll(){return this.authHttp.post(c.BASE_USER_VIDEOS_HISTORY_URL+"/remove",{}).pipe(d(t=>this.restExtractor.handleError(t)))}};i(c,"BASE_USER_VIDEOS_HISTORY_URL",l.apiUrl+"/api/v1/users/me/history/videos"),i(c,"\u0275fac",function(o){return new(o||c)}),i(c,"\u0275prov",f({token:c,factory:c.\u0275fac}));var y=c;var p=class p{authHttp=s(u);restExtractor=s(E);restService=s(I);listByAccount(t){let{pagination:o,sort:a,account:r,includeCollaborations:n}=t,h=new m;h=this.restService.addRestGetParams(h,o,a),n&&(h=h.append("includeCollaborations","true"));let L=x.BASE_ACCOUNT_URL+r.nameWithHost+"/video-channel-syncs";return this.authHttp.get(L,{params:h}).pipe(d(N=>this.restExtractor.handleError(N)))}create(t){return this.authHttp.post(p.BASE_VIDEO_CHANNEL_URL,t).pipe(d(o=>this.restExtractor.handleError(o)))}delete(t){let o=`${p.BASE_VIDEO_CHANNEL_URL}/${t}`;return this.authHttp.delete(o).pipe(d(a=>this.restExtractor.handleError(a)))}};i(p,"BASE_VIDEO_CHANNEL_URL",l.apiUrl+"/api/v1/video-channel-syncs"),i(p,"\u0275fac",function(o){return new(o||p)}),i(p,"\u0275prov",f({token:p,factory:p.\u0275fac,providedIn:"root"}));var O=p;function Q(e){return e.buttons===0||e.detail===0}function Z(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var A;try{A=typeof Intl<"u"&&Intl.v8BreakIterator}catch(e){A=!1}var it=(()=>{let t=class t{_platformId=s(w);isBrowser=this._platformId?T(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||A)&&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(){}};i(t,"\u0275fac",function(r){return new(r||t)}),i(t,"\u0275prov",f({token:t,factory:t.\u0275fac,providedIn:"root"}));let e=t;return e})();var R=new WeakMap,pt=(()=>{let t=class t{_appRef;_injector=s(B);_environmentInjector=s(g);load(a){let r=this._appRef=this._appRef||this._injector.get(D),n=R.get(r);n||(n={loaders:new Set,refs:[]},R.set(r,n),r.onDestroy(()=>{R.get(r)?.refs.forEach(h=>h.destroy()),R.delete(r)})),n.loaders.has(a)||(n.loaders.add(a),n.refs.push(j(a,{environmentInjector:this._environmentInjector})))}};i(t,"\u0275fac",function(r){return new(r||t)}),i(t,"\u0275prov",f({token:t,factory:t.\u0275fac,providedIn:"root"}));let e=t;return e})();function ht(e){return Array.isArray(e)?e:[e]}export{Q as a,Z as b,it as c,pt as d,ht as e,y as f,O as g};
/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*/
//# sourceMappingURL=chunk-YFOK5KLE.js.map
