import{b as m,c as p}from"./chunk-K6LRUFYU.js";import{$ as c,B as s,Nc as d,Xf as u,Y as n,j as h}from"./chunk-QXV2GR6R.js";import{i as o}from"./chunk-JJ4RDTEF.js";var v=(()=>{let r=class r{constructor(e,t){o(this,"authHttp");o(this,"restExtractor");this.authHttp=e,this.restExtractor=t}getChapters(e){let t=m.buildVideoPasswordHeader(e.videoPassword);return this.authHttp.get(`${p.BASE_VIDEO_URL}/${e.videoId}/chapters`,{headers:t}).pipe(s(i=>this.restExtractor.handleError(i)))}updateChapters(e,t){if(t.shouldUpdateAPI()!==!0)return h(!0);let i={chapters:t.getChaptersForUpdate()};return this.authHttp.put(`${p.BASE_VIDEO_URL}/${e}/chapters`,i).pipe(s(f=>this.restExtractor.handleError(f)))}};o(r,"\u0275fac",function(t){return new(t||r)(c(d),c(u))}),o(r,"\u0275prov",n({token:r,factory:r.\u0275fac}));let a=r;return a})();export{v as a};
/**i18n:224bcada6943fe8b17ea60808c2d370cec9507c3bd670ebe71692d099a3befa1*/
//# sourceMappingURL=chunk-GXVHYOY5.js.map
