1import{b as y,c as x}from"./chunk-Q6I3NOHV.js";import{Af as g,B as s,C as R,S as E,Y as c,aa as p,gh as u,j as f,lh as V,md as v,n as h,pd as m,q as l}from"./chunk-HVCWS4IF.js";import{j as n}from"./chunk-KJ7W2O2B.js";var i=class i{authHttp=p(m);restService=p(V);restExtractor=p(u);updateRedundancy(t,e){let r=i.BASE_REDUNDANCY_URL+"/"+t,o={redundancyAllowed:e};return this.authHttp.put(r,o).pipe(s(a=>this.restExtractor.handleError(a)))}listVideoRedundancies(t){let{pagination:e,sort:r,target:o}=t,a=new v;return a=this.restService.addRestGetParams(a,e,r),o&&(a=a.append("target",o)),this.authHttp.get(i.BASE_REDUNDANCY_URL+"/videos",{params:a}).pipe(s(D=>this.restExtractor.handleError(D)))}addVideoRedundancy(t){return this.authHttp.post(i.BASE_REDUNDANCY_URL+"/videos",{videoId:t.id}).pipe(s(e=>this.restExtractor.handleError(e)))}removeVideoRedundancies(t){let e=t.redundancies.streamingPlaylists.map(r=>r.id).map(r=>this.removeRedundancy(r));return l(...e).pipe(R())}removeRedundancy(t){return this.authHttp.delete(i.BASE_REDUNDANCY_URL+"/videos/"+t).pipe(s(e=>this.restExtractor.handleError(e)))}};n(i,"BASE_REDUNDANCY_URL",g.apiUrl+"/api/v1/server/redundancy"),n(i,"\u0275fac",function(e){return new(e||i)}),n(i,"\u0275prov",c({token:i,factory:i.\u0275fac}));var b=i;var d=class d{authHttp=p(m);restExtractor=p(u);store=new Map;getVideoFileToken({videoUUID:t,videoPassword:e}){let r=this.store.get(t);return r?f(r):this.createVideoFileToken(t,e).pipe(E(o=>this.store.set(t,{token:o.token,expires:new Date(o.expires)})))}createVideoFileToken(t,e){let r=y.buildVideoPasswordHeader(e);return this.authHttp.post(`${x.BASE_VIDEO_URL}/${t}/token`,{},{headers:r}).pipe(h(({files:o})=>o),s(o=>this.restExtractor.handleError(o)))}};n(d,"\u0275fac",function(e){return new(e||d)}),n(d,"\u0275prov",c({token:d,factory:d.\u0275fac}));var A=d;export{b as a,A as b}; 2/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.