1import{b as Li}from"./chunk-LYSJ47UW.js";import{a as zi}from"./chunk-ARBLAW36.js";import{a as Fi,b as Bi,c as We,f as Ge,g as Ot}from"./chunk-QMQZZIR5.js";import{a as Wi}from"./chunk-XGC7JZAU.js";import{a as ft}from"./chunk-MBPSVMMT.js";import{a as $i}from"./chunk-62ATBB34.js";import{a as Et}from"./chunk-PVOHGV2Y.js";import{a as he}from"./chunk-LQVRZI54.js";import{a as Hi,b as Gi}from"./chunk-WOBKXJK4.js";import{a as xi}from"./chunk-BWH75TCH.js";import{a as ki}from"./chunk-SSETSBQT.js";import{b as vt}from"./chunk-EO7FPGTW.js";import{a as $t,c as le}from"./chunk-Q6I3NOHV.js";import{a as Vi}from"./chunk-KIVJRE4O.js";import{b as Ee}from"./chunk-OR7MKCZD.js";import{a as Ii,b as wi}from"./chunk-KLT2ZASF.js";import{a as Pi}from"./chunk-V3JZPFOE.js";import{c as Ni}from"./chunk-PG4F5PSG.js";import{a as ze,b as re}from"./chunk-FZFWY5Y6.js";import{A as pi,E as U,F as fe,c as q,d as Lt,g as G,h as ue,o as Ve,p as ge,r as rt,u as xe,w as Ce,x as ve,y as ci,z as mi}from"./chunk-EBOVR5NW.js";import{A as pt,B as Di,C as Ri,D as ut,E as gt,G as ke,H as Mi,a as Ei,d as Oi,n as dt,o as hi,p as Si,q as st,r as Ai,u as oe,w as _t,x as yi,y as ct,z as mt}from"./chunk-UME7L37K.js";import{a as L}from"./chunk-R76LZEZS.js";import{$a as ei,$b as ni,B as Gt,Be as Le,Ca as a,Cb as g,Cc as T,Db as P,Dc as f,Df as tt,Eb as I,Ec as x,Ee as Ci,Fb as Vt,Gb as O,Gh as Ct,Hb as ti,Hf as se,Ib as d,Ic as ai,Jb as Pe,K as Ut,Kb as Ie,Kc as ri,Kd as _i,Kf as $e,Lc as Ae,Ma as M,Mc as li,Mh as bi,Q as Xt,Qb as z,Qe as Ft,Rb as W,Rg as ae,S as jt,Sa as pe,Sb as w,Se as vi,Ta as y,Ua as Zt,Vc as Q,Xb as D,Yb as F,Zb as j,Zc as we,_a as Jt,_b as ii,aa as p,bb as it,bc as J,bd as di,cc as ee,ch as He,dc as te,ed as si,fa as C,fb as c,ga as v,gb as m,ha as Kt,hh as Oe,ia as Qt,ib as ie,j as be,jb as H,kb as B,la as qt,lb as _,lc as V,m as Wt,mb as r,mc as oi,nb as l,nh as Ti,ob as u,oe as ui,pb as nt,qa as Ne,qb as ot,ra as me,sb as S,sc as ne,se as gi,tb as A,tc as Se,tf as fi,th as Be,ub as Pt,uc as xt,vb as It,wb as wt,wc as $,xe as lt,ya as de,yb as R,za as Yt,zb as at,zf as Fe}from"./chunk-HVCWS4IF.js";import{j as h,k as Te}from"./chunk-KJ7W2O2B.js";var Ue=class Ue{fromNowPipe=p(wi);date=f(void 0);toggled=ai(!1);dateRelative;dateAbsolute;ngOnChanges(){this.updateDates();}toggle(){this.toggled.update(t=>!t);}getTitle(){let t=this.toggled()?this.dateRelative:this.dateAbsolute;return"Toggle this date format to \""+t+"\"";}getContent(){return this.toggled()?this.dateAbsolute:this.dateRelative;}updateDates(){this.dateRelative=this.fromNowPipe.transform(this.date()),this.dateAbsolute=this.date().toLocaleString();}};h(Ue,"\u0275fac",function(e){return new(e||Ue)();}),h(Ue,"\u0275cmp",M({type:Ue,selectors:[["my-date-toggle"]],inputs:{date:[1,"date"],toggled:[1,"toggled"]},outputs:{toggled:"toggledChange"},features:[Ne],decls:2,vars:3,consts:[["role","button","tabindex","0",1,"date-toggle",3,"click","keyup.enter","title","ariaLabel"]],template:function(e,n){e&1&&(nt(0,"span",0),ti("click",function(){return n.toggle();})("keyup.enter",function(){return n.toggle();}),D(1),ot()),e&2&&(at("title",n.getTitle())("ariaLabel",n.getTitle()),a(),j(" ",n.getContent(),` 2`));},styles:[".date-toggle[_ngcontent-%COMP%]:hover{cursor:default}"],changeDetection:0}));var ht=Ue;function qi(i,t){if(i&1&&(It(0),g(1,0),ne(2,"myNumberFormatter"),wt()),i&2){let e=d();a(2),P(e.viewers())(Se(2,2,e.viewers())),I(1);}}function Yi(i,t){if(i&1&&(It(0),g(1,1),ne(2,"myNumberFormatter"),wt()),i&2){let e=d();a(2),P(e.views())(Se(2,2,e.views())),I(1);}}var Xe=class Xe{isLive=f.required({transform:Ae});viewers=f.required();views=f.required();getExactNumberOfViews(){return this.isLive()?tt("{viewers, plural, =0 {No viewers} =1 {1 viewer} other {{viewers} viewers}}",{viewers:this.viewers()}):tt("{views, plural, =0 {No view} =1 {1 view} other {{views} views}}",{views:this.views()});}};h(Xe,"\u0275fac",function(e){return new(e||Xe)();}),h(Xe,"\u0275cmp",M({type:Xe,selectors:[["my-video-views-counter"]],inputs:{isLive:[1,"isLive"],viewers:[1,"viewers"],views:[1,"views"]},decls:3,vars:2,consts:()=>{let t;t="{VAR_PLURAL, plural, =1 {1 viewer}
2 other {{INTERPOLATION} viewers}}",t=Vt(t,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let e;e=" "+t+" ";let n;n="{VAR_PLURAL, plural, =1 {1 view} other {{INTERPOLATION} views}}",n=Vt(n,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let o;return o=" "+n+" ",[e,o,[3,"title"]];},template:function(e,n){e&1&&(nt(0,"span",2),c(1,qi,3,4,"ng-container")(2,Yi,3,4,"ng-container"),ot()),e&2&&(at("title",n.getExactNumberOfViews()),a(),m(n.isLive()?1:2));},dependencies:[Et],encapsulation:2,changeDetection:0}));var St=Xe;var Zi=["modal"],Ji=i=>({"input-error":i});function en(i,t){if(i&1&&u(0,"div",26),i&2){let e=d(2).$implicit;_("innerHTML",e.help,de);}}function tn(i,t){i&1&&y(0,en,1,1,"ng-template",24);}function nn(i,t){if(i&1&&(S(0,25),u(1,"div",26),A()),i&2){let e=d().$implicit;a(),_("innerHTML",e.description,de);}}function on(i,t){if(i&1&&(r(0,"div",15)(1,"my-peertube-checkbox",23),c(2,tn,1,0,null,24),c(3,nn,2,1,"ng-container",25),l()()),i&2){let e=t.$implicit;a(),_("inputName",e.id)("formControlName",e.id)("labelText",e.label),a(),m(e.help?2:-1),a(),m(e.description?3:-1);}}function an(i,t){if(i&1&&(S(0),g(1,3),A()),i&2){let e=d(2);a(),P(e.originHost),I(1);}}function rn(i,t){if(i&1&&(r(0,"div",19),D(1),l()),i&2){let e=d(2);a(),F(e.formErrors.reason);}}function ln(i,t){if(i&1){let e=R();r(0,"div",4)(1,"h4",5),D(2),l(),r(3,"button",6),O("click",function(){C(e);let o=d();return v(o.hide());}),u(4,"my-global-icon",7),l()(),r(5,"div",8)(6,"form",9),O("ngSubmit",function(){C(e);let o=d();return v(o.report());}),r(7,"div",10)(8,"div",11)(9,"label",12),g(10,1),l(),r(11,"div",13),S(12,14),H(13,on,4,5,"div",15,ie),A(),l()(),r(15,"div",16)(16,"div",17),S(17),g(18,2),A(),c(19,an,2,1,"ng-container"),l(),r(20,"div",15),u(21,"textarea",18),c(22,rn,2,1,"div",19),l()()(),r(23,"div",20)(24,"input",21),O("click",function(){C(e);let o=d();return v(o.hide());})("key.enter",function(){C(e);let o=d();return v(o.hide());}),l(),u(25,"input",22),l()()();}if(i&2){let e=d();a(2),F(e.modalTitle),a(4),_("formGroup",e.form),a(7),B(e.predefinedReasons),a(5),P(e.currentHost),I(18),a(),m(e.isRemote()?19:-1),a(2),_("ngClass",V(7,Ji,e.formErrors.reason)),a(),m(e.formErrors.reason?22:-1),a(3),_("disabled",!e.form.valid);}}var ye=class ye extends he{formReactiveService=p(Ee);modalService=p(oe);abuseService=p(Ge);notifier=p(ae);modal=x("modal");error=null;predefinedReasons=[];modalTitle;account=null;openedModal;get currentHost(){return window.location.host;}get originHost(){return this.isRemote()?this.account.host:"";}ngOnInit(){this.buildForm({reason:We,predefinedReasons:se(Le,t=>null)}),this.predefinedReasons=this.abuseService.getPredefinedReasons("account");}show(t){this.account=t,this.modalTitle="Report "+this.account.displayName+"",this.openedModal=this.modalService.open(this.modal(),{centered:!0,keyboard:!1,size:"lg"});}hide(){this.openedModal.close(),this.openedModal=null;}report(){let t=this.form.get("reason").value,e=Object.keys($e(this.form.get("predefinedReasons").value));this.abuseService.reportVideo({reason:t,predefinedReasons:e,account:{id:this.account.id}}).subscribe({next:()=>{this.notifier.success("Account reported."),this.hide();},error:n=>this.notifier.handleError(n)});}isRemote(){return!this.account.isLocal;}};h(ye,"\u0275fac",(()=>{let t;return function(n){return(t||(t=me(ye)))(n||ye);};})()),h(ye,"\u0275cmp",M({type:ye,selectors:[["my-account-report"]],viewQuery:function(e,n){e&1&&z(n.modal,Zi,5),e&2&&W();},features:[pe],decls:2,vars:0,consts:()=>{let t;t="Close this modal";let e;e="Please describe the issue...";let n;n="Cancel";let o;o="Submit";let s;s="What is the issue?";let E;E="Your report will be sent to moderators of "+"\uFFFD0\uFFFD"+".";let b;return b="It will be forwarded to the comment origin ("+"\uFFFD0\uFFFD"+") too.",[["modal",""],s,E,b,[1,"modal-header"],[1,"modal-title"],["title",t,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["novalidate","",3,"ngSubmit","formGroup"],[1,"row"],[1,"col-5"],["for","reportPredefinedReasons"],[1,"ms-2","mt-2","d-flex","flex-column"],["formGroupName","predefinedReasons"],[1,"form-group"],[1,"col-7"],[1,"information"],["placeholder",e,"formControlName","reason","ngbAutofocus","",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],[1,"form-group","inputs"],["type","button","role","button","value",n,1,"peertube-button","secondary-button",3,"click","key.enter"],["type","submit","value",o,1,"peertube-button","primary-button",3,"disabled"],[3,"inputName","formControlName","labelText"],["ptTemplate","help"],["ngProjectAs","de
2scription",5,["description"]],[3,"innerHTML"]];},template:function(e,n){e&1&&y(0,ln,26,9,"ng-template",null,0,$);},dependencies:[L,U,ge,q,G,ue,fe,ve,Ce,xe,re,ze,Q],styles:["my-timestamp-input[_ngcontent-%COMP%]{width:100px}.information[_ngcontent-%COMP%]{margin-bottom:20px}textarea[_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:100%;max-width:100%;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}textarea[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}textarea[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}textarea[_ngcontent-%COMP%]:focus, textarea[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}textarea[disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){textarea[_ngcontent-%COMP%]{width:100%}}textarea[_ngcontent-%COMP%]{color:var(--textarea-fg)!important;background-color:var(--textarea-bg)!important;height:100px;padding:var(--textarea-y-padding) var(--textarea-x-padding)}.start-at[_ngcontent-%COMP%], .stop-at[_ngcontent-%COMP%]{width:300px;display:flex;align-items:center}.start-at[_ngcontent-%COMP%] my-timestamp-input[_ngcontent-%COMP%], .stop-at[_ngcontent-%COMP%] my-timestamp-input[_ngcontent-%COMP%]{margin-inline-start:.625rem}"]}));var Ui=ye;var dn=["modal"],sn=i=>({"input-error":i});function _n(i,t){if(i&1&&u(0,"div",26),i&2){let e=d(2).$implicit;_("innerHTML",e.help,de);}}function cn(i,t){i&1&&y(0,_n,1,1,"ng-template",24);}function mn(i,t){if(i&1&&(S(0,25),u(1,"div",26),A()),i&2){let e=d().$implicit;a(),_("innerHTML",e.description,de);}}function pn(i,t){if(i&1&&(r(0,"div",15)(1,"my-peertube-checkbox",23),c(2,cn,1,0,null,24),c(3,mn,2,1,"ng-container",25),l()()),i&2){let e=t.$implicit;a(),_("inputName",e.id)("formControlName",e.id)("labelText",e.label),a(),m(e.help?2:-1),a(),m(e.description?3:-1);}}function un(i,t){if(i&1&&(S(0),g(1,3),A()),i&2){let e=d(2);a(),P(e.originHost),I(1);}}function gn(i,t){if(i&1&&(r(0,"div",19),D(1),l()),i&2){let e=d(2);a(),F(e.formErrors.reason);}}function Cn(i,t){if(i&1){let e=R();r(0,"div",4)(1,"h4",5),D(2),l(),r(3,"button",6),O("click",function(){C(e);let o=d();return v(o.hide());}),u(4,"my-global-icon",7),l()(),r(5,"div",8)(6,"form",9),O("ngSubmit",function(){C(e);let o=d();return v(o.report());}),r(7,"div",10)(8,"div",11)(9,"label",12),g(10,1),l(),r(11,"div",13),S(12,14),H(13,pn,4,5,"div",15,ie),A(),l()(),r(15,"div",16)(16,"div",17),S(17),g(18,2),A(),c(19,un,2,1,"ng-container"),l(),r(20,"div",15),u(21,"textarea",18),c(22,gn,2,1,"div",19),l()()(),r(23,"div",20)(24,"input",21),O("click",function(){C(e);let o=d();return v(o.hide());})("key.enter",function(){C(e);let o=d();return v(o.hide());}),l(),u(25,"input",22),l()()();}if(i&2){let e=d();a(2),F(e.modalTitle),a(4),_("formGroup",e.form),a(7),B(e.predefinedReasons),a(5),P(e.currentHost),I(18),a(),m(e.isRemote()?19:-1),a(2),_("ngClass",V(7,sn,e.formErrors.reason)),a(),m(e.formErrors.reason?22:-1),a(3),_("disabled",!e.form.valid);}}var De=class De extends he{formReactiveService=p(Ee);modalService=p(oe);abuseService=p(Ge);notifier=p(ae);comment=f(null);modal=x("modal");modalTitle;error=null;predefinedReasons=[];openedModal;get currentHost(){return window.location.host;}get originHost(){return this.isRemote()?this.comment().account.host:"";}ngOnInit(){this.modalTitle="Report comment",this.buildForm({reason:We,predefinedReasons:se(Le,t=>null)}),this.predefinedReasons=this.abuseService.getPredefinedReasons("comment");}show(){this.openedModal=this.modalService.open(this.modal(),{centered:!0,keyboard:!1,size:"lg"});}hide(){this.openedModal.close(),this.openedModal=null;}report(){let t=this.form.get("reason").value,e=Object.keys($e(this.form.get("predefinedReasons").value));this.abuseService.reportVideo({reason:t,predefinedReasons:e,comment:{id:this.comment().id}}).subscribe({next:()=>{this.notifier.success("Comment reported."),this.hide();},error:n=>this.notifier.handleError(n)});}isRemote(){return!this.comment().isLocal;}};h(De,"\u0275fac",(()=>{let t;return function(n){return(t||(t=me(De)))(n||De);};})()),h(De,"\u0275cmp",M({type:De,selectors:[["my-comment-report"]],viewQuery:function(e,n){e&1&&z(n.modal,dn,5),e&2&&W();},inputs:{comment:[1,"comment"]},features:[pe],decls:2,vars:0,consts:()=>{let t;t="Close this modal";let e;e="Please describe the issue...";let n;n="Cancel";let o;o="Submit";let s;s="What is the issue?";let E;E="Your report will be sent to moderators of "+"\uFFFD0\uFFFD"+".";let b;return b="It will be forwarded to the comment origin ("+"\uFFFD0\uFFFD"+") too.",[["modal",""],s,E,b,[1,"modal-header"],[1,"modal-title"],["title",t,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["novalidate","",3,"ngSubmit","formGroup"],[1,"row"],[1,"col-5"],["for","reportPredefinedReasons"],[1,"ms-2","mt-2","d-flex","flex-column"],["formGroupName","predefinedReasons"],[1,"form-group"],[1,"col-7"],[1,"information"],["placeholder",e,"formControlName","reason","ngbAutofocus","",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],[1,"form-group","inputs"],["type","button","role","button","value",n,1,"peertube-button","secondary-button",3,"click","key.enter"],["type","submit","value",o,1,"peertube-button","primary-button",3,"disabled"],[3,"inputName","formControlName","labelText"],["ptTemplate","help"],["ngProjectAs","de
2scription",5,["description"]],[3,"innerHTML"]];},template:function(e,n){e&1&&y(0,Cn,26,9,"ng-template",null,0,$);},dependencies:[L,U,ge,q,G,ue,fe,ve,Ce,xe,re,ze,Q],styles:["my-timestamp-input[_ngcontent-%COMP%]{width:100px}.information[_ngcontent-%COMP%]{margin-bottom:20px}textarea[_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:100%;max-width:100%;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}textarea[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}textarea[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}textarea[_ngcontent-%COMP%]:focus, textarea[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}textarea[disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){textarea[_ngcontent-%COMP%]{width:100%}}textarea[_ngcontent-%COMP%]{color:var(--textarea-fg)!important;background-color:var(--textarea-bg)!important;height:100px;padding:var(--textarea-y-padding) var(--textarea-x-padding)}.start-at[_ngcontent-%COMP%], .stop-at[_ngcontent-%COMP%]{width:300px;display:flex;align-items:center}.start-at[_ngcontent-%COMP%] my-timestamp-input[_ngcontent-%COMP%], .stop-at[_ngcontent-%COMP%] my-timestamp-input[_ngcontent-%COMP%]{margin-inline-start:.625rem}"]}));var Xi=De;var vn=["modal"],fn=i=>({"input-error":i});function En(i,t){if(i&1&&u(0,"div",32),i&2){let e=d(2).$implicit;_("innerHTML",e.help,de);}}function On(i,t){i&1&&y(0,En,1,1,"ng-template",30);}function hn(i,t){if(i&1&&(S(0,31),u(1,"div",32),A()),i&2){let e=d().$implicit;a(),_("innerHTML",e.description,de);}}function Sn(i,t){if(i&1&&(r(0,"div",16)(1,"my-peertube-checkbox",29),c(2,On,1,0,null,30),c(3,hn,2,1,"ng-container",31),l()()),i&2){let e=t.$implicit;a(),_("inputName",e.id)("formControlName",e.id)("labelText",e.label),a(),m(e.help?2:-1),a(),m(e.description?3:-1);}}function An(i,t){if(i&1&&(r(0,"div",22),u(1,"my-peertube-checkbox",33)(2,"my-timestamp-input",34),l()),i&2){let e=d(2);a(2),_("timestamp",e.timestamp.endAt)("maxTimestamp",e.video().duration);}}function yn(i,t){if(i&1&&(S(0),g(1,4),A()),i&2){let e=d(2);a(),P(e.originHost),I(1);}}function Dn(i,t){if(i&1&&(r(0,"div",25),D(1),l()),i&2){let e=d(2);a(),F(e.formErrors.reason);}}function Rn(i,t){if(i&1){let e=R();r(0,"div",5)(1,"h4",6),g(2,1),l(),r(3,"button",7),O("click",function(){C(e);let o=d();return v(o.hide());}),u(4,"my-global-icon",8),l()(),r(5,"div",9)(6,"form",10),O("ngSubmit",function(){C(e);let o=d();return v(o.report());}),r(7,"div",11)(8,"div",12)(9,"label",13),g(10,2),l(),r(11,"div",14),S(12,15),H(13,Sn,4,5,"div",16,ie),A(),l()(),r(15,"div",17),u(16,"my-embed",18),r(17,"div",19),u(18,"my-peertube-checkbox",20)(19,"my-timestamp-input",21),l(),c(20,An,3,2,"div",22),r(21,"div",23),S(22),g(23,3),A(),c(24,yn,2,1,"ng-container"),l(),r(25,"div",16),u(26,"textarea",24),c(27,Dn,2,1,"div",25),l()()(),r(28,"div",26)(29,"input",27),O("click",function(){C(e);let o=d();return v(o.hide());})("key.enter",function(){C(e);let o=d();return v(o.hide());}),l(),u(30,"input",28),l()()();}if(i&2){let e=d();a(2),P(e.video().name),I(2),a(4),_("formGroup",e.form),a(7),B(e.predefinedReasons),a(3),_("video",e.video()),a(3),_("timestamp",e.timestamp.startAt)("maxTimestamp",e.video().duration),a(),m(e.timestamp.hasStart?20:-1),a(3),P(e.currentHost),I(23),a(),m(e.isRemote()?24:-1),a(2),_("ngClass",V(11,fn,e.formErrors.reason)),a(),m(e.formErrors.reason?27:-1),a(3),_("disabled",!e.form.valid);}}var Re=class Re extends he{formReactiveService=p(Ee);modalService=p(oe);abuseService=p(Ge);notifier=p(ae);video=f(null);modal=x("modal");error=null;predefinedReasons=[];openedModal;get currentHost(){return window.location.host;}get originHost(){return this.isRemote()?this.video().account.host:"";}get timestamp(){return this.form.get("timestamp").value;}ngOnInit(){this.buildForm({reason:We,predefinedReasons:se(Le,t=>null),timestamp:{hasStart:null,startAt:null,hasEnd:null,endAt:null}}),this.predefinedReasons=this.abuseService.getPredefinedReasons("video");}show(){this.openedModal=this.modalService.open(this.modal(),{centered:!0,keyboard:!1,size:"lg"});}hide(){this.openedModal.close(),this.openedModal=null;}report(){let t=this.form.get("reason").value,e=Object.keys($e(this.form.get("predefinedReasons").value)),{hasStart:n,startAt:o,hasEnd:s,endAt:E}=this.form.get("timestamp").value;this.abuseService.reportVideo({reason:t,predefinedReasons:e,video:{id:this.video().id,startAt:n&&o?o:void 0,endAt:s&&E?E:void 0}}).subscribe({next:()=>{this.notifier.success("Video reported."),this.hide();},error:b=>this.notifier.handleError(b)});}isRemote(){return!this.video().isLocal;}};h(Re,"\u0275fac",(()=>{let t;return function(n){return(t||(t=me(Re)))(n||Re);};})()),h(Re,"\u0275cmp",M({type:Re,selectors:[["my-video-report"]],viewQuery:function(e,n){e&1&&z(n.modal,vn,5),e&2&&W();},inputs:{video:[1,"video"]},features:[pe],decls:2,vars:0,consts:()=>{let t;t="Close this modal";let e;e="Start at";let n;n="Please describe the issue...";let o;o="Cancel";let s;s="Submit";let E;E="Report video \""+"\uFFFD0\uFFFD"+"\"";let b;b="What is the issue?";let N;N="Your report will be sent to moderators of "+"\uFFFD0\uFFFD"+".";let _e;_e="Stop at";let ce;return ce="It will be forwarded to the comment origin ("+"\uFFFD0\uFFFD"+") too.",[["modal",""],E,b,N,ce,[1,"modal-header"],[1,"modal-title"],["title",t,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["novalidate","",3,"ngSubmit","formGroup"],[1,"row"],[1,"col-12","col-md-5"],["for","reportPredefinedReasons"],[1,"ms-2","mt-2","d-flex","flex-column"],["formGroupName","predefinedReasons"],[1,"form-group"],[1,"col-12","col-md-7"],[3,"video"],["formGroupName","timestamp",1,"mb-1","mt-3","start-at"],["formControlName","hasStart","labelText",e],["formControlName","startAt","inputName","startAt",3,"timestamp","maxTimestamp"],["formGroupName","timestamp",1,"mb-3","stop-at"],[1,"information"],["placeholder",n,"formControlName","reason","ngbAutofocus","",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],[1,"form-group","inputs"],["type","button","role","button","value",o,1,"peertube-button","secondary-button",3,"click","key.enter"],["type","submit","value",s,1,"peertube-button","primary-button",3,"disabled"],[3,"inputName","formControlName","labelText"],["ptTemplate","help"],["ngProjectAs","de
2scription",5,["description"]],[3,"innerHTML"],["formControlName","hasEnd","labelText",_e],["formControlName","endAt","inputName","endAt",3,"timestamp","maxTimestamp"]];},template:function(e,n){e&1&&y(0,Rn,31,13,"ng-template",null,0,$);},dependencies:[L,U,ge,q,G,ue,fe,ve,Ce,xe,re,ze,Wi,zi,Q],styles:["my-timestamp-input[_ngcontent-%COMP%]{width:100px}.information[_ngcontent-%COMP%]{margin-bottom:20px}textarea[_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:100%;max-width:100%;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}textarea[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}textarea[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}textarea[_ngcontent-%COMP%]:focus, textarea[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}textarea[disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){textarea[_ngcontent-%COMP%]{width:100%}}textarea[_ngcontent-%COMP%]{color:var(--textarea-fg)!important;background-color:var(--textarea-bg)!important;height:100px;padding:var(--textarea-y-padding) var(--textarea-x-padding)}.start-at[_ngcontent-%COMP%], .stop-at[_ngcontent-%COMP%]{width:300px;display:flex;align-items:center}.start-at[_ngcontent-%COMP%] my-timestamp-input[_ngcontent-%COMP%], .stop-at[_ngcontent-%COMP%] my-timestamp-input[_ngcontent-%COMP%]{margin-inline-start:.625rem}"]}));var At=Re;var ji={VALIDATORS:[Lt.minLength(2),Lt.maxLength(300)],MESSAGES:{minlength:"Block reason must be at least 2 characters long.",maxlength:"Block reason cannot be more than 300 characters long."}};var Mn=["modal"],Tn=i=>({"input-error":i});function bn(i,t){if(i&1&&(r(0,"h4",8),g(1,1),l()),i&2){let e=d(2);a(),P(e.videos.length),I(1);}}function Nn(i,t){if(i&1&&(r(0,"h4",8),g(1,2),l()),i&2){let e=d(3);a(),P(e.getSingleVideo().name),I(1);}}function Pn(i,t){if(i&1&&(r(0,"h4",8),g(1,3),l()),i&2){let e=d(3);a(),P(e.getSingleVideo().name),I(1);}}function In(i,t){if(i&1&&(c(0,Nn,2,1,"h4",8),c(1,Pn,2,1,"h4",8)),i&2){let e=d(2);m(e.getSingleVideo().isLive?-1:0),a(),m(e.getSingleVideo().isLive?1:-1);}}function wn(i,t){if(i&1&&(r(0,"div",15),D(1),l()),i&2){let e=d(2);a(),F(e.formErrors.reason);}}function Vn(i,t){i&1&&(r(0,"span"),g(1,4),l());}function xn(i,t){i&1&&(r(0,"span"),g(1,5),l());}function Ln(i,t){if(i&1&&(r(0,"div",13)(1,"my-peertube-checkbox",20),S(2,21),c(3,Vn,2,0,"span")(4,xn,2,0,"span"),A(),l()()),i&2){let e=d(2);a(3),m(e.isMultiple()?3:4);}}function Fn(i,t){i&1&&(r(0,"strong",16),g(1,6),l());}function $n(i,t){if(i&1){let e=R();r(0,"div",7),c(1,bn,2,1,"h4",8),c(2,In,2,2),r(3,"button",9),O("click",function(){C(e);let o=d();return v(o.hide());}),u(4,"my-global-icon",10),l()(),r(5,"div",11)(6,"form",12),O("ngSubmit",function(){C(e);let o=d();return v(o.block());}),r(7,"div",13),u(8,"textarea",14),c(9,wn,2,1,"div",15),l(),c(10,Ln,5,1,"div",13),c(11,Fn,2,0,"strong",16),r(12,"div",17)(13,"input",18),O("click",function(){C(e);let o=d();return v(o.hide());})("key.enter",function(){C(e);let o=d();return v(o.hide());}),l(),u(14,"input",19),l()()();}if(i&2){let e=d();a(),m(e.isMultiple()?1:-1),a(),m(e.isMultiple()?-1:2),a(4),_("formGroup",e.form),a(2),_("ngClass",V(8,Tn,e.formErrors.reason)),a(),m(e.formErrors.reason?9:-1),a(),m(e.hasLocal()?10:-1),a(),m(e.hasLive()?11:-1),a(3),_("disabled",!e.form.valid);}}var Me=class Me extends he{formReactiveService=p(Ee);modalService=p(oe);videoBlocklistService=p(Ot);notifier=p(ae);modal=x("modal");videoBlocked=T();videos;error=null;openedModal;ngOnInit(){let t={unfederate:"true"};this.buildForm({reason:ji,unfederate:null},t);}isMultiple(){return this.videos.length>1;}getSingleVideo(){return this.videos[0];}hasLive(){return this.videos.some(t=>t.isLive);}hasLocal(){return this.videos.some(t=>t.isLocal);}show(t){this.videos=t,this.openedModal=this.modalService.open(this.modal(),{centered:!0,keyboard:!1});}hide(){this.openedModal.close(),this.openedModal=null;}block(){let t=this.videos.map(e=>({videoId:e.id,reason:this.form.value.reason||void 0,unfederate:e.isLocal?this.form.value.unfederate:void 0}));this.videoBlocklistService.blockVideos(t).subscribe({next:()=>{let e=tt("{count, plural, =1 {Blocked {videoName}.} other {Blocked {count} videos.}}",{count:this.videos.length,videoName:this.getSingleVideo().name});this.notifier.success(e),this.hide();for(let n of t){let o=this.videos.find(s=>s.id===n.videoId);
2o.blacklisted=!0,o.blacklistedReason=n.reason;}this.videoBlocked.emit();},error:e=>this.notifier.handleError(e)});}};h(Me,"\u0275fac",(()=>{let t;return function(n){return(t||(t=me(Me)))(n||Me);};})()),h(Me,"\u0275cmp",M({type:Me,selectors:[["my-video-block"]],viewQuery:function(e,n){e&1&&z(n.modal,Mn,5),e&2&&W();},outputs:{videoBlocked:"videoBlocked"},features:[pe],decls:2,vars:0,consts:()=>{let t;t="Close this modal";let e;e="Please describe the reason...";let n;n="Cancel";let o;o="Block";let s;s="Block "+"\uFFFD0\uFFFD"+" videos";let E;E="Block video \""+"\uFFFD0\uFFFD"+"\"";let b;b="Block live \""+"\uFFFD0\uFFFD"+"\"";let N;N="Unfederate";let _e;_e="This will ask remote instances to delete local videos";let ce;ce="This will ask remote instances to delete this video";let k;return k="Blocking a live will automatically terminate the live stream.",[["modal",""],s,E,b,_e,ce,k,[1,"modal-header"],[1,"modal-title"],["title",t,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["novalidate","",3,"ngSubmit","formGroup"],[1,"form-group"],["placeholder",e,"formControlName","reason",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],[1,"live-info"],[1,"form-group","inputs"],["type","button","role","button","value",n,1,"peertube-button","secondary-button",3,"click","key.enter"],["type","submit","value",o,1,"peertube-button","primary-button",3,"disabled"],["inputName","unfederate","formControlName","unfederate","labelText",N],["ngProjectAs","description",5,["description"]]];},template:function(e,n){e&1&&y(0,$n,15,10,"ng-template",null,0,$);},dependencies:[L,U,ge,q,G,ue,fe,ve,Ce,Q,re],styles:["textarea[_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:100%;max-width:100%;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}textarea[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}textarea[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}textarea[_ngcontent-%COMP%]:focus, textarea[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}textarea[disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){textarea[_ngcontent-%COMP%]{width:100%}}textarea[_ngcontent-%COMP%]{color:var(--textarea-fg)!important;background-color:var(--textarea-bg)!important;height:100px;padding:var(--textarea-y-padding) var(--textarea-x-padding)}.live-info[_ngcontent-%COMP%]{margin:40px 0 20px}"]}));var yt=Me;var kn=[[["cancel-button"]]],Hn=["cancel-button"];function Bn(i,t){i&1&&(S(0),g(1,1),A());}function zn(i,t){if(i&1&&(r(0,"div",9),u(1,"my-input-text",10),l()),i&2){let e=d(2);a(),_("show",!0)("readonly",!0)("withCopy",!0)("withToggle",!1)("value",e.getCaptionLink());}}function Wn(i,t){if(i&1&&(r(0,"li",3)(1,"button",7),D(2),c(3,Bn,2,0,"ng-container"),l(),y(4,zn,2,5,"ng-template",8),l()),i&2){let e=t.$implicit;_("ngbNavItem",e.language.id),a(2),j(" ",e.language.label," "),a(),m(e.automaticallyGenerated?3:-1);}}var Ke=class Ke{videoCaptions=f.required();downloaded=T();activeNavId;getCaptions(){let t=this.videoCaptions();return t||[];}ngOnInit(){this.hasCaptions()&&(this.activeNavId=this.videoCaptions()[0].language.id);}download(){window.location.assign(this.getCaptionLink()),this.downloaded.emit();}hasCaptions(){return this.getCaptions().length!==0;}getCaption(){let t=this.getCaptions().find(e=>e.language.id===this.activeNavId);if(!t){Fe.error(`Cannot find caption ${this.activeNavId}`);return;}return t;}getCaptionLink(){let t=this.getCaption();return t?t.fileUrl:"";}};h(Ke,"\u0275fac",function(e){return new(e||Ke)();}),h(Ke,"\u0275cmp",M({type:Ke,selectors:[["my-subtitle-files-download"]],inputs:{videoCaptions:[1,"videoCaptions"]},outputs:{downloaded:"downloaded"},ngContentSelectors:Hn,decls:8,vars:2,consts:()=>{let t;t="Download";let e;e="(auto-generated)";let n;return n="Subtitle URL",[["nav","ngbNav"],e,["ngbNav","",1,"nav-tabs",3,"activeIdChange","activeId"],[3,"ngbNavItem"],[1,"mt-2",3,"ngbNavOutlet"],[1,"modal-footer","inputs"],["type","submit","value",t,1,"peertube-button","primary-button",3,"click"],["ngbNavLink",""],["ngbNavContent",""],[1,"nav-content"],["inputId","subtitle-url","ariaLabel",n,3,"show","readonly","withCopy","withToggle","value"]];},template:function(e,n){if(e&1){let o=R();Pe(kn),r(0,"ul",2,0),te("activeIdChange",function(E){return C(o),ee(n.activeNavId,E)||(n.activeNavId=E),v(E);}),H(2,Wn,5,3,"li",3,ie),l(),u(4,"div",4),r(5,"div",5),Ie(6),r(7,"input",6),O("click",function(){return n.download();}),l()();}if(e&2){let o=w(1);J("activeId",n.activeNavId),a(2),B(n.getCaptions()),a(2),_("ngbNavOutlet",o);}},dependencies:[vt,gt,_t,mt,ct,yi,Di,pt,ut],encapsulation:2}));var Dt=Ke;var Gn=[[["cancel-button"]]],Un=["cancel-button"],Ht=i=>({$implicit:i}),Bt=(i,t)=>t.key;function Xn(i,t){i&1&&(r(0,"my-alert",14),g(1,7),l());}function jn(i,t){if(i&1&&(r(0,"div",33),u(1,"my-input-text",34),l()),i&2){let e=d();a(),_("show",!0)("readonly",!0)("withCopy",!0)("withToggle",!1)("value",e.getVideoFileLink());}}function Kn(i,t){}function Qn(i,t){if(i&1&&y(0,Kn,0,0,"ng-template",36),i&2){d(2);let e=w(4);_("ngTemplateOutlet",e);}}function qn(i,t){i&1&&(S(0,16),r(1,"a",22),S(2),g(3,8),A(),u(4,"my-global-icon",35),l(),y(5,Qn,1,1,"ng-template",23),A());}function Yn(i,t){}function Zn(i,t){if(i&1&&y(0,Yn,0,0,"ng-template",36),i&2){d(2);let e=w(4);_("ngTemplateOutlet",e);}}function Jn(i,t){if(i&1&&(S(0,17),r(1,"a",22),D(2),l(),y(3,Zn,1,1,"ng-template",23),A()),i&2){let e=t.$implicit;_("ngbNavItem",e.resolution.id),a(2),F(e.resolution.label);}}function eo(i,t){if(i&1&&(r(0,"span"),D(1),l()),i&2){let e=d().$implicit;a(),F(e.value.value);}}function to(i,t){i&1&&(r(0,"span"),g(1,9),l());}function io(i,t){if(i&1&&(r(0,"div",37)(1,"span"),D(2),l(),c(3,eo,2,1,"span")(4,to,2,0,"span"),l()),i&2){let e=t.$implicit;a(2),F(e.value.label),a(),m(e.value.value?3:4);}}function no(i,t){}function oo(i,t){if(i&1&&y(0,no,0,0,"ng-template",39),i&2){let e=t.$implicit;d(2);let n=w(13);_("ngTemplateOutlet",n)("ngTemplateOutletContext",V(2,Ht,e));}}function ao(i,t){if(i&1&&(r(0,"div",38),H(1,oo,1,4,null,39,Bt),ne(3,"keyvalue"),l()),i&2){let e=d();a(),B(Se(3,0,e.videoFileMetadataFormat));}}function ro(i,t){}function lo(i,t){if(i&1&&y(0,ro,0,0,"ng-template",39),i&2){let e=t.$implicit;d(3);let n=w(13);_("ngTemplateOutlet",n)("ngTemplateOutletContext",V(2,Ht,e));}}function so(i,t){if(i&1&&(r(0,"div",38),H(1,lo,1,4,null,39,Bt),ne(3,"keyvalue"),l()),i&2){let e=d(2);a(),B(Se(3,0,e.videoFileMetadataVideoStream));}}function _o(i,t){i&1&&(S(0,21),r(1,"a",22),g(2,10),l(),y(3,so,4,2,"ng-template",23),A());}function co(i,t){}function mo(i,t){if(i&1&&y(0,co,0,0,"ng-template",39),i&2){let e=t.$implicit;d(3);let n=w(13);_("ngTemplateOutlet",n)("ngTemplateOutletContext",V(2,Ht,e));}}function po(i,t){if(i&1&&(r(0,"div",38),H(1,mo,1,4,null,39,Bt),ne(3,"keyvalue"),l()),i&2){let e=d(2);a(),B(Se(3,0,e.videoFileMetadataAudioStream));}}function uo(i,t){i&1&&(S(0,21),r(1,"a",22),g(2,11),l(),y(3,po,4,2,"ng-template",23),A());}function go(i,t){if(i&1&&u(0,"div",18),i&2){d();let e=w(11);_("ngbNavOutlet",e);}}function Co(i,t){i&1&&(u(0,"span",40),S(1),g(2,12),A());}function vo(i,t){i&1&&(u(0,"span",41),S(1),g(2,13),A());}var Qe=class Qe{videoService=p(le);video=f.required();originalVideoFile=f(void 0);videoFileToken=f(void 0);downloaded=T();downloadType="direct";activeResolutionId=-1;videoFileMetadataFormat;videoFileMetadataVideoStream;videoFileMetadataAudioStream;isAdvancedCustomizationCollapsed=!0;bytesPipe;numbersPipe;constructor(){this.bytesPipe=new ft(),this.numbersPipe=new Et();}ngOnInit(){this.hasFiles()&&this.onResolutionIdChange(this.video().getFilesForDownload()[0].resolution.id);}download(){window.location.assign(this.getVideoFileLink()),this.downloaded.emit();}onResolutionIdChange(t){return Te(this,null,function*(){this.activeResolutionId=t;let e;if(this.activeResolutionId==="original")e=this.originalVideoFile().metadata;else{let n=this.getVideoFile();if(!n)return;!n.metadata&&n.metadataUrl&&(yield this.hydrateMetadataFromMetadataUrl(n)),e=n.metadata;}e&&(this.videoFileMetadataFormat=this.getMetadataFormat(e.format),this.videoFileMetadataVideoStream
2=this.getMetadataStream(e.streams,"video"),this.videoFileMetadataAudioStream=this.getMetadataStream(e.streams,"audio"));});}hasFiles(){return this.video().getFilesForDownload().length!==0;}getVideoFile(){if(this.activeResolutionId==="original")return;let t=this.video().getFilesForDownload().find(e=>e.resolution.id===this.activeResolutionId);if(!t){Fe.error(`Could not find file with resolution ${this.activeResolutionId}`);return;}return t;}getVideoFileLink(){let t=this.activeResolutionId==="original"||this.isConfidentialVideo()?"?videoFileToken="+this.videoFileToken():"";if(this.activeResolutionId==="original")return this.originalVideoFile().fileDownloadUrl+t;let e=this.getVideoFile();if(!e)return"";switch(this.downloadType){case"direct":return e.fileDownloadUrl+t;case"torrent":return e.torrentDownloadUrl+t;}}isConfidentialVideo(){return this.activeResolutionId==="original"||He(this.video());}hasMetadata(){return!!this.videoFileMetadataFormat;}getMetadataFormat(t){let e={encoder:o=>({label:"Encoder",value:o}),format_long_name:o=>({label:"Format name",value:o}),size:o=>({label:"Size",value:this.bytesPipe.transform(+o,2)}
2),bit_rate:o=>({label:"Bitrate",value:`${this.numbersPipe.transform(+o)}bps`})},n=Object.assign(t,t.tags);return delete n.tags,se(Ft(n,vi(e)),(o,s)=>e[s](o));}getMetadataStream(t,e){let n=t.find(s=>s.codec_type===e);if(!n)return;let o={codec_long_name:s=>({label:"Codec",value:s}),profile:s=>({label:"Profile",value:s}),bit_rate:s=>({label:"Bitrate",value:isNaN(+s)?void 0:`${this.numbersPipe.transform(+s)}bps`})};return e==="video"?o=Object.assign(o,{width:s=>({label:"Resolution",value:`${s}x${n.height}`}),display_aspect_ratio:s=>({label:"Aspect ratio",value:s}),avg_frame_rate:s=>({label:"Average frame rate",value:s}),pix_fmt:s=>({label:"Pixel format",value:s})}):o=Object.assign(o,{sample_rate:s=>({label:"Sample rate",value:s}),channel_layout:s=>({label:"Channel Layout",value:s})}),se(Ft(n,Object.keys(o)),(s,E)=>o[E](s));}hydrateMetadataFromMetadataUrl(t){let e=this.videoService.getVideoFileMetadata(t.metadataUrl).pipe(jt(n=>t.metadata=n));return Wt(e);}};h(Qe,"\u0275fac",function(e){return new(e||Qe)();}),h(Qe,"\u0275cmp",M({type:Qe,selectors:[["my-video-files-download"]],inputs:{video:[1,"video"],originalVideoFile:[1,"originalVideoFile"],videoFileToken:[1,"videoFileToken"]},outputs:{downloaded:"downloaded"},ngContentSelectors:Un,decls:36,vars:14,consts:()=>{let t;t="Download";let e;e="Format";let n;n="Direct download";let o;o="Torrent (.torrent file)";let s;s=" The following link contains a private token and should not be shared with anyone.\n";let E;E="Video file link";let b;b="Other users cannot download the original file";let N;N="Original file";let _e;_e="Unknown";let ce;ce="Video stream";let k;k="Audio stream";let X;X="More information/options";let zt;return zt="Less information/options",[["resolutionNav","ngbNav"],["rootNavContent",""],["navMetadata","ngbNav"],["metadataInfo",""],e,n,o,s,N,_e,ce,k,X,zt,["type","warning"],["ngbNav","",1,"nav-tabs",3,"activeIdChange","activeId"],["ngbNavItem","original"],[3,"ngbNavItem"],[3,"ngbNavOutlet"],[1,"advanced-filters",3,"ngbCollapse","animation"],["ngbNav","",1,"nav-tabs","nav-metadata"],["ngbNavItem",""],["ngbNavLink",""],["ngbNavContent",""],[1,"download-type",3,"hidden"],[1,"peertube-radio-container"],["type","radio","name","download","id","download-direct","value","direct",3,"ngModelChange","ngModel"],["for","download-direct"],["type","radio","name","download","id","download-torrent","value","torrent",3,"ngModelChange","ngModel"],["for","download-torrent"],["aria-controls","collapseBasic",1,"advanced-filters-button","button-unstyle",3,"click"],[1,"modal-footer","inputs"],["type","submit","value",t,1,"peertube-button","primary-button",3,"click"],[1,"nav-content"],["inputId","video-file-link","ariaLabel",E,3,"show","readonly","withCopy","withToggle","value"],["ngbTooltip",b,"iconName","shield"],[3,"ngTemplateOutlet"],[1,"metadata-attribute"],[1,"file-metadata"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"chevron-down"],[1,"chevron-up"]];},template:function(e,n){if(e&1){let o=R();Pe(Gn),c(0,Xn,2,0,"my-alert",14),r(1,"div",15,0),O("activeIdChange",function(E){return n.onResolutionIdChange(E);}),y(3,jn,2,5,"ng-template",null,1,$),c(5,qn,6,0,"ng-container",16),H(6,Jn,4,2,"ng-container",17,ie),l(),u(8,"div",18),r(9,"div",19)(10,"div",20,2),y(12,io,5,2,"ng-template",null,3,$),S(14,21),r(15,"a",22),g(16,4),l(),y(17,ao,4,2,"ng-template",23),A(),c(18,_o,4,0,"ng-container",21),c(19,uo,4,0,"ng-container",21),l(),c(20,go,1,1,"div",18),r(21,"div",24)(22,"div",25)(23,"input",26),te("ngModelChange",function(E){return C(o),ee(n.downloadType,E)||(n.downloadType=E),v(E);}),l(),r(24,"label",27),g(25,5),l()(),r(26,"div",25)(27,"input",28),te("ngModelChange",function(E){return C(o),ee(n.downloadType,E)||(n.downloadType=E),v(E);}),l(),r(28,"label",29),g(29,6),l()()()(),r(30,"button",30),O("click",function(){return n.isAdvancedCustomizationCollapsed=!n.isAdvancedCustomizationCollapsed;}),c(31,Co,3,0)(32,vo,3,0),l(),r(33,"div",31),Ie(34),r(35,"input",32),O("click",function(){return n.download();}),l()();}if(e&2){let o,s=w(2);m(n.isConfidentialVideo()?0:-1),a(),_("activeId",n.activeResolutionId),a(4),m(n.originalVideoFile()?5:-1),a(),B(n.video().getFilesForDownload()),a(2),_("ngbNavOutlet",s),a(),_("ngbCollapse",n.isAdvancedCustomizationCollapsed)("animation",!0),a(9),m(n.videoFileMetadataVideoStream!==void 0?18:-1),a(),m(n.videoFileMetadataAudioStream!==void 0?19:-1),a(),m(n.hasMetadata()?20:-1),a(),_("hidden",n.originalVideoFile()||!((o=n.getVideoFile())!=null&&o.torrentDownloadUrl)),a(2),J("ngModel",n.downloadType),a(4),J("ngModel",n.downloadType),a(3),it("aria-expanded",!n.isAdvancedCustomizationCollapsed),a(),m(n.isAdvancedCustomizationCollapsed?31:32);}},dependencies:[U,q,rt,G,Ve,L,gt,_t,mt,ct,Ri,pt,ut,vt,Oi,ke,we,Vi,di],styles:[".advanced-filters-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin-top:20px;font-weight:600;cursor:pointer}.advanced-filters-button[_ngcontent-%COMP%] .nav-tabs[_ngcontent-%COMP%]{margin-top:10x}.nav-metadata[_ngcontent-%COMP%]{margin-top:20px}.file-metadata[_ngcontent-%COMP%]{padding:1rem}
2.file-metadata[_ngcontent-%COMP%] .metadata-attribute[_ngcontent-%COMP%]{font-size:13px;display:block;margin-bottom:12px}.file-metadata[_ngcontent-%COMP%] .metadata-attribute[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:first-child{min-width:142px;display:inline-block;color:var(--fg-300);font-weight:700;padding-inline-end:.3125rem}.download-type[_ngcontent-%COMP%]{margin-top:20px}.download-type[_ngcontent-%COMP%] .peertube-radio-container[_ngcontent-%COMP%]{display:inline-block;margin-inline-end:calc(1.3125rem + .75vw)}@media(min-width:1200px){.download-type[_ngcontent-%COMP%] .peertube-radio-container[_ngcontent-%COMP%]{margin-inline-end:1.875rem}}"]}));var Rt=Qe;var fo=[[["cancel-button"]]],Eo=["cancel-button"],Oo=(i,t)=>t.id;function ho(i,t){if(i&1){let e=R();r(0,"div",3)(1,"input",6),te("ngModelChange",function(o){C(e);let s=d();return ee(s.videoFileChosen,o)||(s.videoFileChosen=o),v(o);}),l(),r(2,"label",7)(3,"strong"),g(4,0),l(),r(5,"span",8),D(6),ne(7,"bytes"),l(),u(8,"my-global-icon",9),l()();}if(i&2){let e=d();a(),J("ngModel",e.videoFileChosen),a(5),ni("",xt(7,4,e.originalVideoFile().size,1)," | ",e.originalVideoFile().width,"x",e.originalVideoFile().height);}}function So(i,t){if(i&1&&D(0),i&2){let e=d().$implicit;ii(" | ",e.width,"x",e.height," ");}}function Ao(i,t){if(i&1&&(D(0," | "),S(1),g(2,1),A()),i&2){let e=d().$implicit;a(2),P(e.fps),I(2);}}function yo(i,t){if(i&1){let e=R();r(0,"div",3)(1,"input",10),te("ngModelChange",function(o){C(e);let s=d();return ee(s.videoFileChosen,o)||(s.videoFileChosen=o),v(o);}),l(),r(2,"label",11)(3,"strong"),D(4),l(),r(5,"span",8),D(6),ne(7,"bytes"),c(8,So,1,2),c(9,Ao,3,1),l()()();}if(i&2){let e=t.$implicit,n=d();a(),_("id","file-"+e.id),J("ngModel",n.videoFileChosen),_("value","file-"+e.id),a(),_("for","file-"+e.id),a(2),F(n.getLabel(e)),a(2),j(" ",xt(7,8,n.getFileSize(e),1)," "),a(2),m(e.width?8:-1),a(),m(e.fps&&e.fps>=50?9:-1);}}function Do(i,t){if(i&1){let e=R();r(0,"div",2)(1,"my-peertube-checkbox",12),te("ngModelChange",function(o){C(e);let s=d();return ee(s.includeAudio,o)||(s.includeAudio=o),v(o);}),l()();}if(i&2){let e=d();a(),J("ngModel",e.includeAudio);}}var qe=class qe{videoService=p(le);video=f.required();originalVideoFile=f(void 0);videoFileToken=f(void 0);downloaded=T();includeAudio=!0;videoFileChosen="";videoFiles;ngOnInit(){this.videoFiles=this.video().getFilesForDownload(),this.videoFiles.length!==0&&(this.videoFileChosen="file-"+Ci(this.videoFiles,"resolution").id);}getLabel(t){return fi(t.resolution.label,t.fps);}getFileSize(t){if(t.hasAudio&&t.hasVideo||t.hasAudio)return t.size;if(this.includeAudio){let e=this.findAudioFileOnly();return t.size+(e?.size||0);}return t.size;}hasAudioSplitted(){return this.videoFileChosen==="file-original"?!1:this.findCurrentFile().hasAudio===!1&&this.videoFiles.some(t=>t.hasVideo===!1&&t.hasAudio===!0);}download(){window.location.assign(this.getVideoFileLink()),this.downloaded.emit();}getVideoFileLink(){let t=this.videoFileChosen==="file-original"||this.isConfidentialVideo()?"?videoFileToken="+this.videoFileToken():"";if(this.videoFileChosen==="file-original")return this.originalVideoFile().fileDownloadUrl+t;let e=this.findCurrentFile();if(!e)return"";let n=[e];return this.hasAudioSplitted()&&this.includeAudio&&n.push(this.findAudioFileOnly()),this.videoService.generateDownloadUrl({video:this.video(),videoFileToken:this.videoFileToken(),files:n});}isConfidentialVideo(){return this.videoFileChosen==="file-original"||He(this.video());}findCurrentFile(){return this.videoFiles.find(t=>this.videoFileChosen==="file-"+t.id);}findAudioFileOnly(){return this.videoFiles.find(t=>t.resolution.id===ui.H_NOVIDEO);}};h(qe,"\u0275fac",function(e){return new(e||qe)();}),h(qe,"\u0275cmp",M({type:qe,selectors:[["my-video-generate-download"]],inputs:{video:[1,"video"],originalVideoFile:[1,"originalVideoFile"],videoFileToken:[1,"videoFileToken"]},outputs:{downloaded:"downloaded"},ngContentSelectors:Eo,decls:8,vars:2,consts:()=>{let t;t="Download";let e;e="Other users cannot download the original file";let n;n="Original file";let o;o=""+"\uFFFD0\uFFFD"+"fps";let s;return s="Include audio",[n,o,[1,"form-group"],[1,"peertube-radio-container"],[1,"modal-footer","inputs"],["type","submit","value",t,1,"peertube-button","primary-button",3,"click"],["type","radio","name","video-file","id","original-file","value","file-original",3,"ngModelChange","ngModel"],["for","original-file"],[1,"muted"],["ngbTooltip",e,"iconName","shield"],["type","radio","name","video-file",3,"ngModelChange","id","ngModel","value"],[3,"for"],["inputName","includeAudio","labelText",s,3,"ngModelChange","ngModel"]];},template:function(e,n){e&1&&(Pe(fo),r(0,"div",2),c(1,ho,9,7,"div",3),H(2,yo,10,11,"div",3,Oo),l(),c(4,Do,2,1,"div",2),r(5,"div",4),Ie(6),r(7,"input",5),O("click",function(){return n.download();}),l()()),e&2&&(a(),m(n.originalVideoFile()?1:-1),a(),B(n.videoFiles),a(2),m(n.hasAudioSplitted()?4:-1));},dependencies:[U,q,rt,G,Ve,L,re,ke,ft],styles:[".peertube-radio-container[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:inline-block;min-width:80px;margin-inline-end:.5rem}"]}));var Mt=qe;var Ro=["modal"],Mo=i=>({"opacity-0":i});function To(i,t){i&1&&(r(0,"option",13),g(1,5),l());}function bo(i,t){if(i&1){let e=R();r(0,"input",19),O("click",function(){C(e);let o=d().close;return v(o());}
2)("key.enter",function(){C(e);let o=d().close;return v(o());}),l();}}function No(i,t){}function Po(i,t){if(i&1){let e=R();r(0,"my-video-generate-download",20),O("downloaded",function(){C(e);let o=d(2);return v(o.onDownloaded());}),S(1,21),y(2,No,0,0,"ng-template",22),A(),l();}if(i&2){d();let e=w(15),n=d();_("video",n.video)("originalVideoFile",n.originalVideoFile)("videoFileToken",n.videoFileToken),a(2),_("ngTemplateOutlet",e);}}function Io(i,t){}function wo(i,t){if(i&1){let e=R();r(0,"my-video-files-download",20),O("downloaded",function(){C(e);let o=d(2);return v(o.onDownloaded());}),S(1,21),y(2,Io,0,0,"ng-template",22),A(),l();}if(i&2){d();let e=w(15),n=d();_("video",n.video)("originalVideoFile",n.originalVideoFile)("videoFileToken",n.videoFileToken),a(2),_("ngTemplateOutlet",e);}}function Vo(i,t){}function xo(i,t){if(i&1){let e=R();r(0,"my-subtitle-files-download",23),O("downloaded",function(){C(e);let o=d(2);return v(o.onDownloaded());}),S(1,21),y(2,Vo,0,0,"ng-template",22),A(),l();}if(i&2){d();let e=w(15),n=d();_("videoCaptions",n.getCaptions()),a(2),_("ngTemplateOutlet",e);}}function Lo(i,t){if(i&1){let e=R();r(0,"div",6)(1,"div",7)(2,"h4",8),g(3,2),l(),r(4,"div",9)(5,"select",10),te("ngModelChange",function(o){C(e);let s=d();return ee(s.type,o)||(s.type=o),v(o);}),r(6,"option",11),g(7,3),l(),r(8,"option",12),g(9,4),l(),c(10,To,2,0,"option",13),l()()(),r(11,"button",14),O("click",function(){let o=C(e).close;return v(o());}),u(12,"my-global-icon",15),l()(),r(13,"div",16),y(14,bo,1,0,"ng-template",null,1,$),c(16,Po,3,4,"my-video-generate-download",17)(17,wo,3,4,"my-video-files-download",17)(18,xo,3,2,"my-subtitle-files-download",18),l();}if(i&2){let e,n=d();a(5),J("ngModel",n.type),a(5),m(n.hasCaptions()?10:-1),a(3),_("ngClass",V(4,Mo,!n.loaded)),a(3),m((e=n.type)==="video-generate"?16:e==="video-files"?17:e==="subtitle-files"?18:-1);}}var Ye=class Ye{modalService=p(oe);authService=p(Oe);videoService=p(le);videoFileTokenService=p(Gi);hooks=p(bi);modal=x("modal");videoPassword=f(void 0);video;type="video-generate";videoFileToken;originalVideoFile;loaded=!1;videoCaptions;activeModal;getCaptions(){return this.videoCaptions?this.videoCaptions:[];}show(t,e){this.loaded=!1,this.videoFileToken=void 0,this.originalVideoFile=void 0,this.video=t,this.videoCaptions=e,this.activeModal=this.modalService.open(this.modal(),{centered:!0}),this.getOriginalVideoFileObs().subscribe(n=>{n?.fileDownloadUrl&&(this.originalVideoFile=n),this.originalVideoFile||He(this.video)?this.videoFileTokenService.getVideoFileToken({videoUUID:this.video.uuid,videoPassword:this.videoPassword()}).subscribe(({token:o})=>{this.videoFileToken=o,this.loaded=!0;}):this.loaded=!0;}),this.activeModal.shown.subscribe(()=>{this.hooks.runAction("action:modal.video-download.shown","common");});}getOriginalVideoFileObs(){if(!this.video.isLocal||!this.authService.isLoggedIn())return be(void 0);let t=this.authService.getUser();return this.video.isUpdatableBy(t)?this.videoService.getSource(this.video.id).pipe(Gt(e=>(Fe.error("Cannot get source file",e),be(void 0)))):be(void 0);}onDownloaded(){this.activeModal.close();}hasCaptions(){return this.getCaptions().length!==0;}};h(Ye,"\u0275fac",function(e){return new(e||Ye)();}),h(Ye,"\u0275cmp",M({type:Ye,selectors:[["my-video-download"]],viewQuery:function(e,n){e&1&&z(n.modal,Ro,5),e&2&&W();},inputs:{videoPassword:[1,"videoPassword"]},decls:2,vars:0,consts:()=>{let t;t="Close this modal";let e;e="Download";let n;n="Video";let o;o="Video files";let s;s="Subtitle files";let E;return E="Cancel",[["modal",""],["cancelBlock",""],e,n,o,s,[1,"modal-header"],[1,"d-flex","align-items-center","me-auto"],[1,"modal-title"],[1,"peertube-select-container","title-select","ms-2"],["id","type","name","type",1,"form-control",3,"ngModelChange","ngModel"],["value","video-generate"],["value","video-files"],["value","subtitle-files"],["title",t,1,"border-0","p-0","align-self-start",3,"click"],["iconName","cross"],[1,"modal-body",3,"ngClass"],[3,"video","originalVideoFile","videoFileToken"],[3,"videoCaptions"],["type","button","role","button","value",E,1,"peertube-button","secondary-button",3,"click","key.enter"],[3,"downloaded","video","originalVideoFile","videoFileToken"],["ngProjectAs","cancel-button",5,["cancel-button"]],[3,"ngTemplateOutlet"],[3,"downloaded","videoCaptions"]];},template:function(e,n){e&1&&y(0,Lo,19,6,"ng-template",null,0,$);},dependencies:[Dt,Rt,Mt,L,U,mi,pi,ci,G,Ve,Q,we],styles:[".modal-body[_ngcontent-%COMP%] .nav-content{margin-top:30px}.modal-body[_ngcontent-%COMP%] my-global-icon[iconName=shield]{position:relative;top:-1px;display:inline-block;width:16px;height:16px;line-height:16px;margin-inline-start:.625rem}
2.modal-body[_ngcontent-%COMP%] .modal-footer{padding-inline-end:0;margin-top:1rem}.modal-body[_ngcontent-%COMP%] .modal-footer>*:last-child{margin-inline-end:0}#dropdown-download-type[_ngcontent-%COMP%]{cursor:pointer}"]}));var Tt=Ye;var Fo=["playlistDropdown"],$o=["playlistAdd"],ko=["videoDownloadModal"],Ho=["videoReportModal"],Bo=["videoBlockModal"],zo=()=>[import("./chunk-IH5VOTZS.js").then(i=>i.VideoAddToPlaylistComponent)],Wo=i=>({video:i});function Go(i,t){if(i&1){let e=R();r(0,"my-video-add-to-playlist",11,4),O("videoExistsInPlaylistChange",function(){C(e);let o=d(3);return v(o.videoExistsInPlaylistChange.emit());}),l();}if(i&2){let e=d(3);_("video",e.video());}}function Uo(i,t){if(i&1&&(r(0,"div",5,3),u(2,"span",9),r(3,"div",10),Zt(4,Go,2,1),Jt(5,4,zo),l()()),i&2){let e=d(2);_("placement",e.getPlaylistDropdownPlacement()),a(5),ei(e.dropdownOpened);}}function Xo(i,t){if(i&1){let e=R();c(0,Uo,7,2,"div",5),r(1,"my-action-dropdown",6),O("openChange",function(){C(e);let o=d();return v(o.dropdownOpened=!0);}),l(),u(2,"my-video-download",null,0)(4,"my-video-report",7,1),r(6,"my-video-block",8,2),O("videoBlocked",function(){C(e);let o=d();return v(o.onVideoBlocked());}),l();}if(i&2){let e=d();m(e.isUserLoggedIn()&&e.displayOptions().playlist?0:-1),a(),_("actions",e.videoActions)("label",e.label())("entry",V(9,Wo,e.video()))("buttonSize",e.buttonSize())("placement",e.placement())("buttonIcon",e.buttonIcon())("buttonStyled",e.buttonStyled()),a(3),_("video",e.video());}}var Ze=class Ze{authService=p(Oe);notifier=p(ae);confirmService=p(Ti);blocklistService=p(Bi);videoBlocklistService=p(Ot);screenService=p(Ct);videoService=p(le);videoCaptionService=p(ki);redundancyService=p(Hi);serverService=p(Be);playlistDropdown=x("playlistDropdown");playlistAdd=x("playlistAdd");videoDownloadModal=x("videoDownloadModal");videoReportModal=x("videoReportModal");videoBlockModal=x("videoBlockModal");video=f();videoCaptions=f([]);muteStatus=f();displayOptions=f({playlist:!1,download:!0,update:!0,blacklist:!0,delete:!0,report:!0,duplicate:!0,muteByUser:!0,muteByServer:!0,liveInfo:!1,removeFiles:!1,transcoding:!1,generateTranscription:!1,transcriptionWidget:!1});placement=f("auto");moreActions=f([]);actionAvailabilityHint=f(!1,{transform:Ae});label=f(void 0);buttonStyled=f(!1,{transform:Ae});buttonSize=f("normal");buttonIcon=f("more-vertical");transcriptionWidgetOpened=f(void 0);videoFilesRemoved=T();videoRemoved=T();videoUnblocked=T();videoBlocked=T();muted=T();unmuted=T();transcodingCreated=T();modalOpened=T();videoExistsInPlaylistChange=T();showTranscriptionWidget=T();hideTranscriptionWidget=T();videoActions=[];dropdownOpened=!1;get user(){return this.authService.getUser();}ngOnChanges(){let t=this.playlistAdd();t&&t.reload(),this.buildActions();}isUserLoggedIn(){return this.authService.isLoggedIn();}showDownloadModal(){this.modalOpened.emit();let t=this.video();(t instanceof $t?be(t):this.videoService.getVideo({videoId:t.uuid})).subscribe(n=>{this.videoDownloadModal().show(n,this.videoCaptions());});}showReportModal(){this.modalOpened.emit(),this.videoReportModal().show();}showBlockModal(){this.modalOpened.emit(),this.videoBlockModal().show([this.video()]);}isVideoUpdatable(){return this.user?this.video().isUpdatableBy(this.user):!1;}isVideoEditable(){return this.user?this.video().isStudioEditableBy({user:this.user,studioEnabled:this.serverService.getHTMLConfig().videoStudio.enabled}):!1;}isVideoStatsAvailable(){return this.user?this.video().isUpdatableBy(this.user):!1;}isVideoRemovable(){return this.user?this.video().isRemovableBy(this.user):!1;}isVideoBlockable(){return this.user?this.video().isBlockableBy(this.user):!1;}isVideoUnblockable(){return this.user?this.video().isUnblockableBy(this.user):!1;}isVideoLiveInfoAvailable(){return this.user?this.video().isLiveInfoAvailableBy(this.user):!1;}canGenerateTranscription(){return this.user?this.video().canGenerateTranscription(this.user,this.serverService.getHTMLConfig().videoTranscription.enabled):!1;}isVideoDownloadableByAnonymous(){let t=this.video();return t&&t.isLive!==!0&&t instanceof $t&&t.downloadEnabled;}isVideoDownloadableByUser(){if(!this.user)return!1;let t=this.video();return t&&t.isLive!==!0&&t.isUpdatableBy(this.user);}canVideoBeDuplicated(){if(!this.user)return!1;let t=this.video();return!t.isLive&&t.canBeDuplicatedBy(this.user);}canRemoveVideoFiles(){return this.user?this.video().canRemoveAllHLSOrWebFiles(this.user):!1;}canRunTranscoding(){return this.user?this.video().canRunTranscoding(this.user):!1;}unblockVideo(){return Te(this,null,function*(){let t="Do you really want to unblock "+this.video().name+"? It will be available again in the videos list.";(yield this.confirmService.confirm(t,"Unblock "+this.video().name+""))!==!1&&this.videoBlocklistService.unblockVideos(this.video().id).subscribe({next:()=>{let n=this.video();this.notifier.success("Video "+n.name+" unblocked."),n.blacklisted=!1,n.blacklistedReason=null,this.videoUnblocked.emit
2();},error:n=>this.notifier.handleError(n)});});}removeVideo(){return Te(this,null,function*(){this.modalOpened.emit();let t="Do you really want to delete "+this.video().name+"?",e=this.video();e.isLive&&(t+=" "+"The live stream will be automatically terminated and replays won't be saved."),(yield this.confirmService.confirm(t,"Delete "+e.name+""))!==!1&&this.videoService.removeVideo(e.id).subscribe({next:()=>{this.notifier.success("Video "+this.video().name+" deleted."),this.videoRemoved.emit();},error:o=>this.notifier.handleError(o)});});}duplicateVideo(){this.redundancyService.addVideoRedundancy(this.video()).subscribe({next:()=>{let t=""+this.video().name+" will be duplicated by your platform.";this.notifier.success(t);},error:t=>this.notifier.handleError(t)});}muteAccount(){let t={nameWithHost:this.video().account.name+"@"+this.video().account.host};this.blocklistService.blockAccountByUser(t).subscribe({next:()=>{this.notifier.success("Account "+t.nameWithHost+" muted."),this.muted.emit();},error:e=>this.notifier.handleError(e)});}unmuteAccount(){let t={nameWithHost:this.video().account.name+"@"+this.video().account.host};this.blocklistService.unblockAccountByUser(t).subscribe({next:()=>{this.unmuted.emit(),this.notifier.success("Account "+t.nameWithHost+" unmuted.");},error:e=>this.notifier.handleError(e)});}muteServer(){let t=this.video().account.host;this.blocklistService.blockServerByUser(t).subscribe({next:()=>{this.notifier.success("Server "+t+" muted."),this.muted.emit();},error:e=>this.notifier.handleError(e)});}unmuteServer(){let t=this.video().account.host;this.blocklistService.unblockServerByUser(t).subscribe({next:()=>{this.unmuted.emit(),this.notifier.success("Server "+t+" unmuted.");},error:e=>this.notifier.handleError(e)});}muteAccountByServer(){let t={nameWithHost:this.video().account.name+"@"+this.video().account.host};this.blocklistService.blockAccountByInstanceAndNotify(t).subscribe({next:()=>{this.muted.emit();},error:e=>this.notifier.handleError(e)});}unmuteAccountByServer(){let t={nameWithHost:this.video().account.name+"@"+this.video().account.host};this.blocklistService.unblockAccountByInstanceAndNotify(t).subscribe({next:()=>{this.unmuted.emit();},error:e=>this.notifier.handleError(e)});}muteServerByServer(){let t=this.video().account.host;this.blocklistService.blockServerByInstanceAndNotify(t).subscribe({next:()=>{this.muted.emit();},error:e=>this.notifier.handleError(e)});}unmuteServerByServer(){let t=this.video().account.host;this.blocklistService.unblockServerByInstanceAndNotify(t).subscribe({next:()=>{this.unmuted.emit();},error:e=>this.notifier.handleError(e)});}removeVideoFiles(t,e){return Te(this,null,function*(){let n="Do you really want to remove \""+this.video().name+"\" files?";(yield this.confirmService.confirm(n,"Remove \""+this.video().name+"\" files"))!==!1&&this.videoService.removeVideoFiles([t.id],e).subscribe({next:()=>{this.notifier.success("Removed files of "+t.name+"."),this.videoFilesRemoved.emit();},error:s=>this.notifier.handleError(s)});});}runTranscoding(t,e){this.videoService.runTranscoding({videos:[t],type:e}).subscribe({next:()=>{this.notifier.success("Transcoding job created for \""+t.name+"\"."),this.transcodingCreated.emit();},error:n=>this.notifier.handleError(n)});}generateCaption(t){this.videoCaptionService.generateCaption({videos:[t]}).subscribe({next:e=>{e.success?this.notifier.success("Transcription job created for \""+t.name+"\"."):e.alreadyBeingTranscribed?this.notifier.info("This video is already being transcribed."):e.alreadyHasCaptions&&this.notifier.info("This video already has captions.");},error:e=>this.notifier.handleError(e)});}onVideoBlocked(){this.videoBlocked.emit();}getPlaylistDropdownPlacement(){return this.screenService.isInSmallView()?"bottom-right auto":"bottom-left bottom-right auto";}buildActions(){this.videoActions=[[{label:"Save to playlist",handler:()=>this.playlistDropdown().toggle(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().playlist,iconName:"playlist-add"}],[{label:"Download",handler:()=>this.showDownloadModal(),isDisplayed:()=>this.displayOptions().download?this.isVideoDownloadableByAnonymous()||this.isVideoDownloadableByUser():!1,iconName:"download",ownerOrModeratorPrivilege:()=>
2{if(this.actionAvailabilityHint()&&!this.isVideoDownloadableByAnonymous())return"This option is visible only to you";}},{label:"Show transcription",handler:()=>this.showTranscriptionWidget.emit(),isDisplayed:()=>{if(!this.displayOptions().transcriptionWidget||this.transcriptionWidgetOpened())return!1;let t=this.videoCaptions();return Array.isArray(t)&&t.length!==0;},iconName:"video-lang"},{label:"Hide transcription",handler:()=>this.hideTranscriptionWidget.emit(),isDisplayed:()=>this.displayOptions().transcriptionWidget?this.transcriptionWidgetOpened()===!0:!1,iconName:"video-lang"}],[{label:"Live information",linkBuilder:({video:t})=>["/videos/manage",t.shortUUID,"live-settings"],isDisplayed:()=>this.displayOptions().liveInfo&&this.isVideoLiveInfoAvailable(),iconName:"live"},{label:"Manage",linkBuilder:({video:t})=>["/videos/manage",t.shortUUID],iconName:"film",isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().update&&this.isVideoUpdatable()},{label:"Block",handler:()=>this.showBlockModal(),iconName:"no",isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().blacklist&&this.isVideoBlockable()},{label:"Unblock",handler:()=>this.unblockVideo(),iconName:"undo",isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().blacklist&&this.isVideoUnblockable()},{label:"Mirror",handler:()=>this.duplicateVideo(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().duplicate&&this.canVideoBeDuplicated(),iconName:"cloud-download"},{label:"Delete",handler:()=>this.removeVideo(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().delete&&this.isVideoRemovable(),iconName:"delete"},{label:"Report",handler:()=>this.showReportModal(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().report,iconName:"flag"}],[{label:"Run HLS transcoding",handler:({video:t})=>this.runTranscoding(t,"hls"),isDisplayed:()=>this.displayOptions().transcoding&&this.canRunTranscoding(),iconName:"cog"},{label:"Run Web Video transcoding",handler:({video:t})=>this.runTranscoding(t,"web-video"),isDisplayed:()=>this.displayOptions().transcoding&&this.canRunTranscoding(),iconName:"cog"},{label:"Delete HLS files",handler:({video:t})=>this.removeVideoFiles(t,"hls"),isDisplayed:()=>this.displayOptions().removeFiles&&this.canRemoveVideoFiles(),iconName:"delete"},{label:"Delete Web Video files",handler:({video:t})=>this.removeVideoFiles(t,"web-videos"),isDisplayed:()=>this.displayOptions().removeFiles&&this.canRemoveVideoFiles(),iconName:"delete"}],[{label:"Generate caption",handler:({video:t})=>this.generateCaption(t),isDisplayed:()=>this.displayOptions().generateTranscription&&this.canGenerateTranscription(),iconName:"video-lang"}],[{label:"Mute account",handler:()=>this.muteAccount(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().muteByUser&&this.muteStatus()?.mutedByUser===!1&&this.blocklistService.canMuteAccountByAccount(this.user,this.video().account),iconName:"no"},{label:"Unmute account",handler:()=>this.unmuteAccount(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().muteByUser&&this.muteStatus()?.mutedByUser===!0&&this.blocklistService.canMuteAccountByAccount(this.user,this.video().account),iconName:"undo"},{label:"Mute platform",handler:()=>this.muteServer(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().muteByUser&&this.muteStatus()?.mutedServerByUser===!1&&this.blocklistService.canMutePlatformByAccount(this.user,this.video().account),iconName:"no"},{label:"Unmute platform",handler:()=>this.unmuteServer(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().muteByUser&&this.muteStatus()?.mutedServerByUser===!0&&this.blocklistService.canMutePlatformByAccount(this.user,this.video().account),iconName:"undo"}],[{label:"Mute account by your platform",handler:()=>this.muteAccountByServer(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().muteByServer&&this.muteStatus()?.mutedByInstance===!1&&this.blocklistService.canMuteAccountByInstance(this.user,this.video().account),iconName:"no"},{label:"Unmute account by your platform",handler:()=>this.unmuteAccountByServer(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().muteByServer&&this.muteStatus()?.mutedByInstance===!0&&this.blocklistService.canMuteAccountByInstance(this.user,this.video().account),iconName:"undo"},{label:"Mute platform by your platform",handler:()=>this.muteServerByServer(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().muteByServer&&this.muteStatus()?.mutedServerByInstance===!1&&this.blocklistService.canMutePlatformByInstance(this.user,this.video().account),iconName:"no"},{label:"Unmute platform by your platform",handler:()=>this.unmuteServerByServer(),isDisplayed:()=>this.authService.isLoggedIn()&&this.displayOptions().muteByServer&&this.muteStatus()?.mutedServerByInstance===!0&&this.blocklistService.canMutePlatformByInstance(this.user,this.video().account),iconName:"undo"}]],this.videoActions=this.videoActions.concat(this.moreActions());}};h(Ze,"\u0275fac",function(e){return new(e||Ze)();}),h(Ze,"\u0275cmp",M({type:Ze,selectors:[["my-video-actions-dropdown"]],viewQuery:function(e,n){e&1&&z(n.playlistDropdown,Fo,5)(n.playlistAdd,$o,5)(n.videoDownloadModal,ko,5)(n.videoReportModal,Ho,5)(n.videoBlockModal,Bo,5),e&2&&W(5);},inputs:{video:[1,"video"],videoCaptions:[1,"videoCaptions"],muteStatus:[1,"muteStatus"],displayOptions:[1,"displayOptions"],placement:[1,"placement"],moreActions:[1,"moreActions"],actionAvailabilityHint:[1,"actionAvailabilityHint"],label:[1,"label"],buttonStyled:[1,"buttonStyled"],buttonSize:[1,"buttonSize"],buttonIcon:[1,"buttonIcon"],transcriptionWidgetOpened:[1,"transcriptionWidgetOpened"]},outputs:{videoFilesRemoved:"videoFilesRemoved",videoRemoved:"videoRemoved",videoUnblocked:"videoUnblocked",videoBlocked:"videoBlocked",muted:"muted",unmuted:"unmuted",transcodingCreated:"transcodingCreated",modalOpened:"modalOpened",videoExists
2InPlaylistChange:"videoExistsInPlaylistChange",showTranscriptionWidget:"showTranscriptionWidget",hideTranscriptionWidget:"hideTranscriptionWidget"},features:[Ne],decls:1,vars:1,consts:()=>{let t;return t="Open video actions",[["videoDownloadModal",""],["videoReportModal",""],["videoBlockModal",""],["playlistDropdown","ngbDropdown"],["playlistAdd",""],["role","button","aria-label",t,"ngbDropdown","","autoClose","outside","container","body",1,"playlist-dropdown",3,"placement"],["container","body",3,"openChange","actions","label","entry","buttonSize","placement","buttonIcon","buttonStyled"],[3,"video"],[3,"videoBlocked"],["ngbDropdownAnchor","",1,"anchor"],["ngbDropdownMenu",""],[3,"videoExistsInPlaylistChange","video"]];},template:function(e,n){e&1&&c(0,Xo,8,11),e&2&&m(n.videoActions.length!==0?0:-1);},dependencies:[st,hi,dt,$i,Tt,At,yt],styles:["[_nghost-%COMP%]{position:relative}.playlist-dropdown[_ngcontent-%COMP%]{position:absolute}.playlist-dropdown[_ngcontent-%COMP%] .anchor[_ngcontent-%COMP%]{display:block;opacity:0}[_nghost-%COMP%] .icon-playlist-add{left:2px}"]}));var bt=Ze;var jo=["dropdown"],Ko=(i,t)=>({host:i,searchTarget:t}),Je=class Je{auth=p(Oe);server=p(Be);dropdown=x("dropdown");host=f.required();title;searchTarget;ngOnChanges(){this.title="Get more information on "+this.host()+"";let t=this.server.getHTMLConfig();this.searchTarget=t.search.searchIndex.enabled?"search-index":"local";}};h(Je,"\u0275fac",function(e){return new(e||Je)();}),h(Je,"\u0275cmp",M({type:Je,selectors:[["my-actor-host"]],viewQuery:function(e,n){e&1&&z(n.dropdown,jo,5),e&2&&W();},inputs:{host:[1,"host"]},features:[Ne],decls:21,vars:9,consts:()=>{let t;t="What is it?";let e;e="Show all our subscriptions";let n;return n="More "+"\uFFFD0\uFFFD"+" content",[["dropdown","ngbDropdown"],t,e,n,["ngbDropdown","","autoClose","outside","placement","bottom-end auto","container","body"],["ngbDropdownToggle","","type","button",1,"host","button-unstyle","ellipsis",3,"title"],["width","8","height","19","viewBox","0 0 8 19","fill","none","xmlns","http://www.w3.org/2000/svg",1,"left"],["d","M0 19V0L7.45757 8.85586C7.77102 9.22809 7.77102 9.77191 7.45757 10.1441L0 19Z"],["width","9","height","19","viewBox","0 0 9 19","xmlns","http://www.w3.org/2000/svg",1,"right"],["d","m 8.0900763,0 h -7.08835 C 0.19446632,0 -0.28009268,0.907181 0.18029632,1.5703 L 5.4485063,9.15841 c 0.24316,0.35023 0.23751,0.81611 -0.01406,1.16039 L 0.25209632,17.41 c -0.482855,0.6607 -0.01097,1.59 0.80737998,1.59 h 7.0306 z"],["ngbDropdownMenu","",1,"content"],[1,"question","mb-3"],[1,"answer","mb-3"],["target","_blank","rel","noopener noreferrer",3,"href"],["iconName","external-link"],["routerLink","/about/follows",1,"mt-3","mb-3","d-block","peertube-button-link","secondary-button",3,"click"],["theme","primary","ptRouterLink","/search",1,"d-block",3,"click","ptQueryParams"]];},template:function(e,n){if(e&1){let o=R();r(0,"div",4,0)(2,"button",5),Kt(),r(3,"svg",6),u(4,"path",7),l(),D(5),r(6,"svg",8),u(7,"path",9),l()(),Qt(),r(8,"div",10)(9,"strong",11),g(10,1),l(),r(11,"div",12),D(12," This video comes from "),r(13,"a",13),D(14),u(15,"my-global-icon",14),l(),D(16," platform, to which we have subscribed. "),l(),r(17,"a",15),O("click",function(){C(o);let E=w(1);return v(E.close());}),g(18,2),l(),r(19,"my-button",16),O("click",function(){C(o);let E=w(1);return v(E.close());}),g(20,3),l()()();}e&2&&(a(2),_("title",n.title),a(3),j(" ",n.host()," "),a(8),_("href","https://"+n.host(),Yt),a(),j("",n.host()," "),a(5),_("ptQueryParams",oi(6,Ko,n.host(),n.searchTarget)),a(),P(n.host()),I(20));},dependencies:[Ai,st,Si,dt,L,Ni,_i],styles:[".content[_ngcontent-%COMP%]{background-color:var(--bg-secondary-450);border-radius:14px;max-width:400px;border:0;padding-inline-start:calc(1.275rem + .3vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{padding-inline-start:1.5rem}}.content[_ngcontent-%COMP%]{padding-inline-end:calc(1.275rem + .3vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{padding-inline-end:1.5rem}}.content[_ngcontent-%COMP%]{padding-top:calc(1.275rem + .3vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{padding-top:1.5rem}}.content[_ngcontent-%COMP%]{padding-bottom:calc(1.275rem + .3vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{padding-bottom:1.5rem}}.question[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:1.25rem}.secondary-button[_ngcontent-%COMP%]{border-color:var(--secondary-icon-color)!important}.answer[_ngcontent-%COMP%]{color:var(--fg-300)}.answer[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--fg-400);font-weight:700;text-decoration:underline}.answer[_ngcontent-%COMP%] a[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%]{color:var(--fg-400);top:0}.host[_ngcontent-%COMP%]{position:relative;max-width:100%}.host[_ngcontent-%COMP%]:hover{opacity:.8}
2.host[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:var(--bg);z-index:2;width:auto;height:calc(100% + 2px);top:-1px;position:absolute}.host[_ngcontent-%COMP%] svg.left[_ngcontent-%COMP%]{left:-2px}.host[_ngcontent-%COMP%] svg.right[_ngcontent-%COMP%]{right:-2px}.host[_ngcontent-%COMP%]{color:var(--fg-450);font-weight:700;background:linear-gradient(to right,var(--bg-secondary-400),var(--bg-secondary-500));position:relative;padding:4px 12px;font-size:.625rem}.host[_ngcontent-%COMP%]:after{display:none}"]}));var Nt=Je;var Qi=i=>["/c",i];function Qo(i,t){i&1&&(S(0,6),g(1,1),A());}function qo(i,t){i&1&&(S(0,7),g(1,2),A());}function Yo(i,t){i&1&&(S(0,7),g(1,3),A());}function Zo(i,t){if(i&1&&(r(0,"button",18),u(1,"my-global-icon",19),l()),i&2){let e=d(2);_("ngbTooltip",e.nsfwTooltip),it("aria-label",e.nsfwTooltip);}}function Jo(i,t){if(i&1&&c(0,Zo,2,2,"button",18),i&2){let e=d();m(e.hasNSFWWarning()?0:-1);}}function ea(i,t){if(i&1&&u(0,"my-actor-avatar",21),i&2){let e=d(3);_("title",e.channelLinkTitle)("size",e.actorImageSize())("actor",e.video().channel)("internalHref",V(4,Qi,e.video().byVideoChannel));}}function ta(i,t){if(i&1&&u(0,"my-actor-avatar",22),i&2){let e=d(3);_("title",e.channelLinkTitle)("size",e.actorImageSize())("actor",e.video().account)("internalHref",V(4,Qi,e.video().byVideoChannel));}}function ia(i,t){if(i&1&&c(0,ea,1,6,"my-actor-avatar",21)(1,ta,1,6,"my-actor-avatar",22),i&2){let e=d(2);m(e.displayOwnerVideoChannel()?0:e.displayOwnerAccount()?1:-1);}}function na(i,t){if(i&1&&D(0),i&2){let e=d(3);j(" ",e.authorAccount," ");}}function oa(i,t){if(i&1&&D(0),i&2){let e=d(3);j(" ",e.authorChannel," ");}}function aa(i,t){if(i&1&&u(0,"my-actor-host",24),i&2){let e=d(3);_("host",e.video().account.host);}}function ra(i,t){i&1&&Pt(0);}function la(i,t){if(i&1&&y(0,ra,1,0,"ng-container",25),i&2){d(3);let e=w(6);_("ngTemplateOutlet",e);}}function da(i,t){if(i&1&&(r(0,"div",20)(1,"my-link",23),c(2,na,1,1)(3,oa,1,1),l(),c(4,aa,1,1,"my-actor-host",24),c(5,la,1,1,"ng-container"),l()),i&2){let e=d(2);a(),_("internalLink",e.ownerRouterLink)("href",e.ownerHref)("target",e.ownerTarget)("ariaLabel",e.getAriaLabel())("title",e.displayOwnerAccount()?e.authorAccount:e.authorChannel),a(),m(e.displayOwnerAccount()?2:e.displayOwnerVideoChannel()?3:-1),a(2),m(e.video().isLocal?-1:4),a(),m(e.displayAsRow()?-1:5);}}function sa(i,t){if(i&1&&(r(0,"div",9),c(1,ia,2,1),c(2,da,6,8,"div",20),l()),i&2){let e=d();a(),m(e.displayOptions().avatar?1:-1),a(),m(e.displayOptions().by?2:-1);}}function _a(i,t){if(i&1){let e=R();r(0,"my-video-actions-dropdown",26),O("videoRemoved",function(){C(e);let o=d();return v(o.onVideoRemoved());})("videoBlocked",function(){C(e);let o=d();return v(o.onVideoBlocked());})("videoUnblocked",function(){C(e);let o=d();return v(o.onVideoUnblocked());})("muted",function(){C(e);let o=d();return v(o.onMuted());}),l();}if(i&2){let e=d();_("video",e.video())("displayOptions",e.videoActionsDisplayOptions());}}function ca(i,t){i&1&&Pt(0);}function ma(i,t){if(i&1&&y(0,ca,1,0,"ng-container",25),i&2){d();let e=w(6);_("ngTemplateOutlet",e);}}function pa(i,t){if(i&1&&u(0,"my-date-toggle",15),i&2){let e=d();_("date",e.video().publishedAt);}}function ua(i,t){i&1&&D(0," \u2022 ");}function ga(i,t){if(i&1&&u(0,"my-video-views-counter",17),i&2){let e=d();_("isLive",e.video().isLive)("viewers",e.video().viewers)("views",e.video().views);}}var et=class et{destroyRef=p(qt);screenService=p(Ct);serverService=p(Be);authService=p(Oe);videoPlaylistService=p(Li);videoService=p(le);cd=p(ri);user=f.required();video=f.required();thumbnailSizes=f("");displayOptions=f({date:!0,views:!0,by:!0,avatar:!0,privacyLabel:!1,forceChannelInBy:!1});displayVideoActions=f(!0);videoActionsDisplayOptions=f({playlist:!0,download:!1,update:!0,blacklist:!0,delete:!0,report:!0,duplicate:!0,muteByUser:!0,muteByServer:!0});actorImageSize=f(34,{transform:li});displayAsRow=f(!1,{transform:Ae});videoLinkType=f("internal");videoBlocked=T();videoUnblocked=T();videoRemoved=T();muted=T();showActions=!1;serverConfig;addToWatchLaterText;addedToWatchLaterText;inWatchLaterPlaylist;channelLinkTitle="";watchLaterPlaylist;videoRouterLink=[];videoHref;videoTarget;ownerRouterLink=[];ownerHref;ownerTarget;nsfwTooltip;defaultThumbnailSizes;ownerDisplayType;actionsLoaded=!1;get preferAuthorDisplayName(){return this.serverConfig.client.videos.miniature.preferAuthorDisplayName;}get authorAccount(){return this.preferAuthorDisplayName?this.video().account.displayName:this.video().account.name;}get authorChannel(){return this.preferAuthorDisplayName?this.video().channel.displayName:this.video().channel.name;}ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.displayAsRow()?this.defaultThumbnailSizes="280px":this.defaultThumbnailSizes="(width <= 800px) 800px, 280px",this.buildVideoLink(),this.buildOwnerLink(),this.setUpBy(),this.nsfwTooltip=this.videoService.buildNSFWTooltip(this.video()),this.channelLinkTitle=""+this.video().channel.name+" (channel page)",this.screenService.isInTouchScreen()&&this.loadActions();}buildVideoLink(){let t=this.videoLinkType(),e=this.video();if(t==="internal"||!e.url){this.videoRouterLink=Pi.buildWatchUrl(e);return;}if(t==="external"){this.videoRouterLink=null,this.videoHref=e.url,this.videoTarget="_blank";return;}this.videoRouterLink=["/search/lazy-load-video",{url:e.url}];}buildOwnerLink(){let t=this.video(),e=this.videoLinkType();if(e==="internal"||!t.channel.url){this.ownerRouterLink=`/c/${t.byVideoChannel}`;return;}if(e==="external"){this.ownerRouterLink=null,this.ownerHref=t.channel.url,this.ownerTarget="_blank";return;}this.ownerRouterLink=["/search/lazy-load-channel",{url:t.channel.url}];}displayOwnerAccount(){return this.ownerDisplayType==="account";}
2displayOwnerVideoChannel(){return this.ownerDisplayType==="videoChannel";}isUnlistedVideo(){return this.video().privacy.id===lt.UNLISTED;}isPrivateVideo(){return this.video().privacy.id===lt.PRIVATE;}isPasswordProtectedVideo(){return this.video().privacy.id===lt.PASSWORD_PROTECTED;}getAriaLabel(){return"Watch video "+this.video().name+"";}loadActions(){this.actionsLoaded||(this.displayVideoActions()&&(this.showActions=!0),this.loadWatchLater(),this.actionsLoaded=!0);}onVideoBlocked(){this.videoBlocked.emit();}onVideoUnblocked(){this.videoUnblocked.emit();}onVideoRemoved(){this.videoRemoved.emit();}onMuted(){this.muted.emit();}isUserLoggedIn(){return this.authService.isLoggedIn();}onWatchLaterClick(t){t===!0?this.removeFromWatchLater():this.addToWatchLater(),this.inWatchLaterPlaylist=!t;}addToWatchLater(){let t={videoId:this.video().id};this.videoPlaylistService.addVideoInPlaylist(this.watchLaterPlaylist.id,t).subscribe(e=>{this.watchLaterPlaylist.playlistElementId=e.videoPlaylistElement.id;});}removeFromWatchLater(){this.videoPlaylistService.removeVideoFromPlaylist(this.watchLaterPlaylist.id,this.watchLaterPlaylist.playlistElementId,this.video().id).subscribe(t=>{});}isWatchLaterPlaylistDisplayed(){return!this.screenService.isInTouchScreen()&&this.displayVideoActions()&&this.isUserLoggedIn()&&this.inWatchLaterPlaylist!==void 0;}getClasses(){return{"display-as-row":this.displayAsRow(),"has-avatar":this.displayOptions().avatar};}hasNSFWWarning(){return this.video().isNSFWWarnedForUser(this.user(),this.serverConfig);}hasNSFWBlur(){return this.video().isNSFWBlurForUser(this.user(),this.serverConfig);}setUpBy(){if(this.displayOptions().forceChannelInBy){this.ownerDisplayType="videoChannel";return;}this.ownerDisplayType=this.videoService.buildDefaultOwnerDisplayType(this.video());}loadWatchLater(){this.screenService.isInTouchScreen()||!this.displayVideoActions()||!this.isUserLoggedIn()||(this.authService.userInformationLoaded.pipe(Ut(),Xt(()=>this.videoPlaylistService.listenToVideoPlaylistChange(this.video().id)),Ei(this.destroyRef)).subscribe(t=>{let e=this.authService.getUser().specialPlaylists.find(o=>o.type===gi.WATCH_LATER),n=t.find(o=>o.playlistId===e.id);this.inWatchLaterPlaylist=!1,this.watchLaterPlaylist={id:e.id},n&&(this.inWatchLaterPlaylist=!0,this.watchLaterPlaylist.playlistElementId=n.playlistElementId),this.cd.markForCheck();}),this.videoPlaylistService.runVideoExistsInPlaylistCheck(this.video().id));}};h(et,"\u0275fac",function(e){return new(e||et)();}),h(et,"\u0275cmp",M({type:et,selectors:[["my-video-miniature"]],inputs:{user:[1,"user"],video:[1,"video"],thumbnailSizes:[1,"thumbnailSizes"],displayOptions:[1,"displayOptions"],displayVideoActions:[1,"displayVideoActions"],videoActionsDisplayOptions:[1,"videoActionsDisplayOptions"],actorImageSize:[1,"actorImageSize"],displayAsRow:[1,"displayAsRow"],videoLinkType:[1,"videoLinkType"]},outputs:{videoBlocked:"videoBlocked",videoUnblocked:"videoUnblocked",videoRemoved:"videoRemoved",muted:"muted"},decls:20,vars:25,consts:()=>{let t;t="Unlisted";let e;e="Private";let n;return n="Password protected",[["nsfwWarningButton",""],t,e,n,[1,"video-miniature",3,"mouseenter","focusin","ngClass"],[3,"watchLaterClick","ariaLabel","blur","video","videoRouterLink","videoHref","videoTarget","displayWatchLaterPlaylist","inWatchLaterPlaylist","sizes"],["ngProjectAs","label-warning",5,["label-warning"]],["ngProjectAs","label-danger",5,["label-danger"]],[1,"video-info"],[1,"owner","min-width-0"],[1,"video-name-container"],["inheritParentStyle","true","className","ellipsis-multiline-2",1,"video-name",3,"internalLink","href","target","ariaLabel","title"],[1,"video-actions"],["placement","bottom-left bottom-right left auto",3,"video","displayOptions"],[1,"date-and-views"],[3,"date"],[1,"views"],[3,"isLive","viewers","views"],["type","button",1,"nsfw-warning","button-unstyle","ms-auto","ps-1",3,"ngbTooltip"],["iconName","eye-close"],[1,"owner-container"],["actorType","channel",3,"title","size","actor","internalHref"],["actorType","account",3,"title","size","actor","internalHref"],["inheritParentStyle","true",1,"owner-label","ellipsis",3,"internalLink","href","target","ariaLabel","title"],[3,"host"],[4,"ngTemplateOutlet"],["placement","bottom-left bottom-right left auto",3,"videoRemoved","videoBlocked","videoUnblocked","muted","video","displayOptions"]];},template:function(e,n){e&1&&(r(0,"div",4),O("mouseenter",function(){return n.loadActions();})("focusin",function(){return n.loadActions();}),r(1,"my-video-thumbnail",5),O("watchLaterClick",function(s){return n.onWatchLaterClick(s);}),c(2,Qo,2,0,"ng-container",6),c(3,qo,2,0,"ng-container",7),c(4,Yo,2,0,"ng-container",7),l(),y(5,Jo,1,1,"ng-template",null,0,$),r(7,"div",8),c(8,sa,3,2,"div",9),r(9,"div",10)(10,"my-link",11),D(11),l(),r(12,"div",12),c(13,_a,1,2,"my-video-actions-dropdown",13),l(),c(14,ma,1,1,"ng-container"),l(),r(15,"div",14),c(16,pa,1,1,"my-date-toggle",15),r(17,"span",16),c(18,ua,1,0),c(19,ga,1,3,"my-video-views-counter",17),l()()()()),e&2&&(_("ngClass",n.getClasses()),a(),_("ariaLabel",n.getAriaLabel())("blur",n.hasNSFWBlur())("video",n.video())("videoRouterLink",n.videoRouterLink)("videoHref",n.videoHref)("videoTarget",n.videoTarget)("displayWatchLaterPlaylist",n.isWatchLaterPlaylistDisplayed())("inWatchLaterPlaylist",n.inWatchLaterPlaylist)("sizes",n.thumbnailSizes()||"280px"),a(),m(n.displayOptions().privacyLabel&&n.isUnlistedVideo()?2:-1),a(),m(n.displayOptions().privacyLabel&&n.isPrivateVideo()?3:-1),a(),m(n.displayOptions().privacyLabel&&n.isPasswordProtectedVideo()?4:-1),a(4),m(n.displayOptions().avatar||n.displayOptions().by?8:-1),a(2),_("internalLink",n.videoRouterLink)("href",n.videoHref)("target",n.videoTarget)("ariaLabel",n.getAriaLabel())("title",n.video().name),a(),j(" ",n.video().name," "),a(2),m(n.showActions?13:-1),a(),m(n.displayAsRow()||!n.displayOptions().avatar&&!n.displayOptions().by?14:-1),a(2),m(n.displayOptions().date?16:-1),a(2),m(n.displayOptions().date&&n.displayOptions().views?18:-1),a(),m(n.displayOptions().views?19:-1));},dependencies:[si,Q,we,Fi,Ii,xi,ht,St,bt,Nt,L,Mi,ke],styles:[".video-miniature[_ngcontent-%COMP%]{--co-fs-small: .75rem;--co-fs-medium: .875rem;--co-fs-big: 1rem}.video-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:1px}
2.video-name[_ngcontent-%COMP%]{font-size:var(--co-fs-big);transition:color .2s;font-weight:700;color:var(--fg);word-break:break-word;word-wrap:break-word;overflow-wrap:break-word}.video-name[_ngcontent-%COMP%]:hover{text-decoration:none}.video-info[_ngcontent-%COMP%]{display:grid}.owner[_ngcontent-%COMP%]{display:flex;position:relative;font-size:var(--co-fs-medium)}.date-and-views[_ngcontent-%COMP%]{font-size:var(--co-fs-small);color:var(--fg-200)}.nsfw-warning[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%]{display:inline-block;width:18px;height:18px;line-height:18px}.owner-container[_ngcontent-%COMP%]{display:flex;min-width:1px;width:100%}my-actor-host[_ngcontent-%COMP%]{flex-shrink:1;min-width:1px;margin-inline-start:.25rem}.owner-label[_ngcontent-%COMP%]{flex-shrink:1;color:var(--fg-300)}.owner-label[_ngcontent-%COMP%], .owner-label[_ngcontent-%COMP%]:hover, .owner-label[_ngcontent-%COMP%]:focus, .owner-label[_ngcontent-%COMP%]:active{text-decoration:none}.owner-label[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.owner-label[_ngcontent-%COMP%]:hover{color:var(--fg);opacity:1}.video-actions[_ngcontent-%COMP%]{width:30px;text-align:end}.video-actions[_ngcontent-%COMP%] .dropdown-root:not(.show){opacity:0}.video-actions[_ngcontent-%COMP%] .playlist-dropdown.show+my-action-dropdown .dropdown-root{opacity:1}.video-actions[_ngcontent-%COMP%] .dropdown-root>.dropdown-toggle{--input-y-padding: 0}.video-miniature[_ngcontent-%COMP%]:hover my-video-thumbnail[_ngcontent-%COMP%] .actions-overlay, .video-miniature[_ngcontent-%COMP%]:hover .video-actions[_ngcontent-%COMP%] .dropdown-root, .video-miniature[_ngcontent-%COMP%]:focus-within my-video-thumbnail[_ngcontent-%COMP%] .actions-overlay, .video-miniature[_ngcontent-%COMP%]:focus-within .video-actions[_ngcontent-%COMP%] .dropdown-root{opacity:1!important}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row){display:flex;flex-direction:column;padding-bottom:1rem;width:100%}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) .video-name[_ngcontent-%COMP%]{width:calc(100% - 30px)}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) my-video-thumbnail[_ngcontent-%COMP%]{margin-bottom:.35rem;position:relative;height:0;width:100%;padding-top:56.25%}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) my-video-thumbnail[_ngcontent-%COMP%] .video-thumbnail{position:absolute;width:100%;height:100%;top:0}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row).has-avatar .video-info[_ngcontent-%COMP%]{padding-inline-start:.75rem}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) my-actor-avatar[_ngcontent-%COMP%]{border:2px solid var(--bg);position:absolute;top:-20px;background:var(--bg);z-index:10}@supports (inset-inline-start: -2px){.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) my-actor-avatar[_ngcontent-%COMP%]{inset-inline-start:-2px}}@supports not (inset-inline-start: -2px){.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) my-actor-avatar[_ngcontent-%COMP%]{left:-2px}}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) my-actor-avatar[actorType=account][_ngcontent-%COMP%]{border-radius:50%}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) my-actor-avatar[actorType=channel][_ngcontent-%COMP%]{border-radius:5px}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) my-actor-avatar[_ngcontent-%COMP%] + .owner-container[_ngcontent-%COMP%]{margin-inline-start:calc(.5rem + 34px)}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) .date-and-views[_ngcontent-%COMP%]{margin-top:3px}@media screen and (max-width:800px){.video-miniature[_ngcontent-%COMP%]:not(.display-as-row){width:100%;margin-bottom:25px}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) .video-info[_ngcontent-%COMP%]{width:100%;text-align:left}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) .video-actions[_ngcontent-%COMP%]{top:-3px;width:auto}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) .video-actions[_ngcontent-%COMP%] .dropdown-root{opacity:1!important}.video-miniature[_ngcontent-%COMP%]:not(.display-as-row) .video-thumbnail{border-radius:0}}.video-miniature.display-as-row[_ngcontent-%COMP%]{--co-fs-small: .875rem;--co-fs-medium: 1rem;--co-fs-big: 1.25rem;--co-row-thumbnail-width: 280px;--co-row-thumbnail-height: 153px;display:flex;flex-direction:row}.video-miniature.display-as-row[_ngcontent-%COMP%] my-video-thumbnail[_ngcontent-%COMP%]{min-width:var(--co-row-thumbnail-width);max-width:var(--co-row-thumbnail-width);height:var(--co-row-thumbnail-height);margin-inline-end:1rem}.video-miniature.display-as-row[_ngcontent-%COMP%] .video-info[_ngcontent-%COMP%]{grid-template-rows:auto;height:min-content}.video-miniature.display-as-row[_ngcontent-%COMP%] .video-name[_ng
2content-%COMP%]{grid-row:1}.video-miniature.display-as-row[_ngcontent-%COMP%] .date-and-views[_ngcontent-%COMP%]{grid-row:2}.video-miniature.display-as-row[_ngcontent-%COMP%] .owner[_ngcontent-%COMP%]{grid-row:3;align-items:center;margin-top:.5rem;margin-bottom:.5rem}.video-miniature.display-as-row[_ngcontent-%COMP%] my-actor-avatar[_ngcontent-%COMP%]{margin-inline-end:.5rem}@media screen and (max-width:800px){.video-miniature.display-as-row[_ngcontent-%COMP%]{--co-row-thumbnail-width: 201px;--co-row-thumbnail-height: 114px}}@media screen and (max-width:500px){.video-miniature.display-as-row[_ngcontent-%COMP%]{--co-row-thumbnail-width: 125px;--co-row-thumbnail-height: 71px;--co-fs-small: .875rem;--co-fs-medium: .875rem;--co-fs-big: 1rem}.video-miniature.display-as-row[_ngcontent-%COMP%] my-actor-avatar[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}));var Ki=et;export{ht as a,St as b,Ui as c,Xi as d,yt as e,Tt as f,bt as g,Ki as h};/**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.