PageSourceSearch

https://skeptikon.fr/client/en-US/chunk-Y7HAI34L.js

js skeptikon.fr collected 2026-09-24 10:20:36 UTC 63,415 bytes, 11 lines download raw bytes

1import{b as bo}from"./chunk-VKTNG452.js";import{a as $o}from"./chunk-CXN4WJY6.js";import{b as yo,c as vo,d as Yo}from"./chunk-64N5RJ22.js";import{a as Io}from"./chunk-U6BPFSFB.js";import{a as Fo,b as wo}from"./chunk-42ZMKOHZ.js";import{a as ho}from"./chunk-P33Y3QZ5.js";import{a as So,b as fo,c as go,d as ge,e as Ro}from"./chunk-EFAUYUQU.js";import"./chunk-V5K6NVAV.js";import"./chunk-AI76OAWD.js";import"./chunk-3XIMEKOZ.js";import"./chunk-3VVCFCGV.js";import"./chunk-6TRWHIGK.js";import{c as Eo}from"./chunk-NEFFGRXL.js";import{a as ot}from"./chunk-7SKD4YPG.js";import"./chunk-S3LMNGBP.js";import{a as Po}from"./chunk-UM6EIAV5.js";import{b as tt,c as Oo,g as po,h as Ao}from"./chunk-BC7MAKMD.js";import"./chunk-IULRDVRP.js";import{a as Ke}from"./chunk-L2X7GKGR.js";import{a as Uo}from"./chunk-HUD5PPJE.js";import"./chunk-OBD3PIUT.js";import{a as No}from"./chunk-WT7UUPYM.js";import"./chunk-B7BTPFQN.js";import"./chunk-DS3UIQKK.js";import"./chunk-ND4GMJSI.js";import{a as ae}from"./chunk-7WRF56BE.js";import{a as io,b as ao}from"./chunk-BFNP4PC4.js";import"./chunk-BNV6OI2D.js";import"./chunk-72XXIMS2.js";import"./chunk-WPEUD6AH.js";import"./chunk-GXA3YMKZ.js";import"./chunk-OUOKBMBO.js";import{a as Mo}from"./chunk-4GLBH6AP.js";import"./chunk-NMUB7GCN.js";import{b as re}from"./chunk-CJIFKH3B.js";import"./chunk-YMDPP36B.js";import"./chunk-JOD7WP4C.js";import{c as mo}from"./chunk-RG7KH4LA.js";import{a as K}from"./chunk-IK6BG7XB.js";import{d as lo,f as et,g as so,h as Co,j as co,n as To,o as uo}from"./chunk-ZIIFBYGX.js";import"./chunk-SPEPIGSN.js";import"./chunk-DXPZKAMP.js";import"./chunk-CL3DZCLS.js";import{b as J}from"./chunk-PFFSH6Z6.js";import{a as no}from"./chunk-B32D74FA.js";import"./chunk-WV6GPQZG.js";import"./chunk-HKEI7JPP.js";import"./chunk-CLJSFRFP.js";import"./chunk-DLT7LQRW.js";import{a as oo}from"./chunk-YUVXFZQR.js";import"./chunk-LRMYJ7C7.js";import"./chunk-XPG25PO3.js";import"./chunk-KBWWUUW5.js";import"./chunk-L4DRGTAY.js";import"./chunk-K7HMHW3L.js";import{c as to}from"./chunk-ZIOGCVJC.js";import"./chunk-636JIKZA.js";import{a as ro,b as Je}from"./chunk-NFMVL5C6.js";import{a as _o}from"./chunk-KFLEEQUN.js";import{A as Lt,E as x,F as Z,c as qe,g as G,h as B,o as Se,p as q,w as Q,x as j,y as Gt,z as xt}from"./chunk-P7U3FVME.js";import{G as qt,u as Bt}from"./chunk-CZUQPOUG.js";import{a as Ze}from"./chunk-WACTU4HM.js";import{Aa as Ut,Bb as k,Bf as De,C as we,Cb as V,D as St,Da as l,Db as s,E as ft,Eb as W,Ec as ie,Fb as H,Fc as Ae,Ff as Vt,Hb as E,Hd as bt,Ib as It,Jb as c,Jc as Ee,Kd as Ft,Ld as wt,Na as A,Nh as eo,Qh as L,R as gt,Rb as Ne,Sb as Oe,T as Pt,Ta as ne,Tb as ht,Te as zt,Tg as h,Ua as Ve,Ud as Qe,Ue as at,Vd as rt,Wc as He,Wd as Xt,Yb as R,Yd as ee,Z as Rt,Zb as Y,_b as pe,ae as Dt,ag as je,ba as C,bg as Wt,cc as Ce,cg as Ht,dc as ce,ec as Te,fd as Be,fe as ue,ga as f,gb as m,ha as g,hb as N,he as _e,hf as kt,ih as Qt,j as pt,jb as Ge,jd as Yt,jh as $,k as ze,kb as xe,lb as Le,lc as yt,mb as T,mc as We,nb as r,o as At,ob as _,oh as jt,pb as u,ph as fe,qb as nt,qd as $t,rb as it,s as ke,sa as oe,sh as Zt,tb as le,tc as de,ub as se,uc as _t,vc as Xe,vh as D,xc as vt,y as Et,yh as Jt,zb as I,zh as Kt}from"./chunk-RB2SGB4Z.js";import{a as Nt,b as Ot,i as M,j as me}from"./chunk-IQVXR75E.js";var Go=(()=>{let i=class i{};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-abuses-list"]],decls:1,vars:0,consts:[["viewType","user"]],template:function(e,n){e&1&&u(0,"my-abuse-list-table",0);},dependencies:[So],encapsulation:2}));let o=i;return o;})();var xo=(()=>{let i=class i{authService=C($);scopedTokensService=C(jt);videoService=C(mo);notifier=C(h);confirmService=C(fe);feedUrl;feedToken;baseURL=De.originServerUrl||window.location.origin;ngOnInit(){this.feedUrl=this.baseURL,this.scopedTokensService.getScopedTokens().subscribe({next:t=>this.regenApplications(t),error:t=>this.notifier.handleError(t)});}renewToken(){return me(this,null,function*(){(yield this.confirmService.confirm("Renewing the token will disallow previously configured clients from retrieving the feed until they use the new token. Proceed?","Renew token"))!==!1&&this.scopedTokensService.renewScopedTokens().subscribe({next:e=>{this.regenApplications(e),this.notifier.success("Token renewed. Update your client configuration accordingly.");},error:e=>this.notifier.handleError(e)});});}regenApplications(t){let e=this.authService.getUser(),n=this.videoService.getVideoSubscriptionFeedUrls(e.account.id,t.feedToken);this.feedUrl=this.baseURL+n.find(d=>d.format===Xt.RSS).url,this.feedToken=t.feedToken;}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-applications"]],decls:18,vars:8,consts:()=>{let t;t="Renew token";let e;e="SUBSCRIPTION FEED";let n;n=" Use third-party feed aggregators to retrieve the list of videos from channels you subscribed to. ";let d;d="Feed URL";let p;p="Feed Token";let O;return O="\u26A0\uFE0F Never share your feed token with anyone.",[e,n,d,p,O,[1,"pt-two-cols"],[1,"title-col"],[1,"applications-description"],[1,"content-col"],[1,"form-group"],["for","feed-url"],["inputId","feed-url",3,"value","withToggle","withCopy","
1show","readonly"],["for","feed-token"],["inputId","feed-token",3,"value","withCopy","readonly"],[1,"form-group-description"],["type","submit","value",t,1,"peertube-button","primary-button","mt-4",3,"click"]];},template:function(e,n){e&1&&(r(0,"div",5)(1,"div",6)(2,"h2"),s(3,0),_(),r(4,"div",7),s(5,1),_()(),r(6,"div",8)(7,"div",9)(8,"label",10),s(9,2),_(),u(10,"my-input-text",11),_(),r(11,"div",9)(12,"label",12),s(13,3),_(),u(14,"my-input-text",13),r(15,"div",14),s(16,4),_()(),r(17,"input",15),E("click",function(){return n.renewToken();}),_()()()),e&2&&(l(10),T("value",n.feedUrl)("withToggle",!1)("withCopy",!0)("show",!0)("readonly",!0),l(4),T("value",n.feedToken)("withCopy",!0)("readonly",!0));},dependencies:[re],styles:[`.pt-two-cols[_ngcontent-%COMP%]   .content-col[_ngcontent-%COMP%]{max-width:500px}
2/*# sourceMappingURL=my-account-applications.component-MRPQZQ4P.css.map */`]}));let o=i;return o;})();var Lo=(()=>{let i=class i{mode=tt.Account;};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-blocklist"]],decls:1,vars:1,consts:[["key","MyAccountBlocklistComponent",3,"mode"]],template:function(e,n){e&1&&u(0,"my-generic-account-blocklist",0),e&2&&T("mode",n.mode);},dependencies:[fo],encapsulation:2}));let o=i;return o;})();var Xo=(()=>{let i=class i{mode=tt.Account;};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-server-blocklist"]],decls:1,vars:1,consts:[["key","MyAccountServerBlocklistComponent",3,"mode"]],template:function(e,n){e&1&&u(0,"my-generic-server-blocklist",0),e&2&&T("mode",n.mode);},dependencies:[go],encapsulation:2}));let o=i;return o;})();var X=class X{authHttp=C($t);restExtractor=C(Qt);server=C(D);listUserExports(i){let{userId:a}=i,t=X.BASE_USER_EXPORTS_URL+a+"/exports";return this.authHttp.get(t).pipe(we(e=>this.restExtractor.handleError(e)));}requestNewUserExport(i){let{userId:a,withVideoFiles:t}=i,e=X.BASE_USER_EXPORTS_URL+a+"/exports/request";return this.authHttp.post(e,{withVideoFiles:t}).pipe(we(n=>this.restExtractor.handleError(n)));}deleteUserExport(i){let{userId:a,userExportId:t}=i,e=X.BASE_USER_EXPORTS_URL+a+"/exports/"+t;return this.authHttp.delete(e).pipe(we(n=>this.restExtractor.handleError(n)));}getLatestImport(i){let{userId:a}=i,t=X.BASE_USER_IMPORTS_URL+a+"/imports/latest";return ke([this.authHttp.get(t),this.server.getServerLocale()]).pipe(At(([e,n])=>(e.state.label=kt(e.state.label,n),e)),we(e=>e.status===ee.NOT_FOUND_404?ze(void 0):this.restExtractor.handleError(e)));}};M(X,"BASE_USER_EXPORTS_URL",De.apiUrl+"/api/v1/users/"),M(X,"BASE_USER_IMPORTS_URL",De.apiUrl+"/api/v1/users/"),M(X,"\u0275fac",function(a){return new(a||X)();}),M(X,"\u0275prov",Rt({token:X,factory:X.ɵfac}));var te=X;function tn(o,i){o&1&&(r(0,"p"),s(1,16),_());}function on(o,i){if(o&1&&(r(0,"div",24)(1,"div")(2,"strong"),R(3,"Latest import on:"),_(),R(4),de(5,"ptDate"),_(),r(6,"div")(7,"strong"),R(8,"Latest import state:"),_(),R(9),_()()),o&2){let a=c(2);l(4),pe(" ",Xe(5,2,a.latestImport.createdAt,"medium")," "),l(5),pe(" ",a.latestImport.state.label," ");}}function nn(o,i){o&1&&(r(0,"my-alert",25),s(1,17),_());}function _n(o,i){o&1&&(r(0,"my-alert",25),s(1,19),_());}function rn(o,i){if(o&1){let a=I();r(0,"my-upload-progress",26),E("cancelUpload",function(){f(a);let e=c(2);return g(e.cancelUpload());})("retry",function(){f(a);let e=c(2);return g(e.retryUpload());}),_(),m(1,_n,2,0,"my-alert",25),r(2,"div",27)(3,"span"),s(4,18),_(),r(5,"input",28),E("change",function(e){f(a);let n=c(2);return g(n.onFileChange(e));}),_()();}if(o&2){let a=c(2);T("isUploading",a.uploadingArchive)("uploadPercents",a.uploadPercents)("error",a.error)("uploaded",a.archiveUploadFinished)("enableRetryAfterError",a.enableRetryAfterError),l(),N(a.archiveUploadFinished&&!a.error?1:-1),l(),T("hidden",a.uploadingArchive||a.archiveUploadFinished);}}function an(o,i){if(o&1&&(r(0,"p"),s(1,1),_(),r(2,"p"),k(3,2),u(4,"strong"),V(),_(),r(5,"p"),s(6,3),_(),r(7,"ul")(8,"li"),s(9,4),_(),r(10,"li"),s(11,5),_(),r(12,"li"),s(13,6),_(),r(14,"li"),s(15,7),_(),r(16,"li"),s(17,8),_(),r(18,"li"),s(19,9),_(),r(20,"li"),s(21,10),_(),r(22,"li"),s(23,11),_(),r(24,"li"),k(25,12),u(26,"strong"),V(),_()(),r(27,"p"),s(28,13),_(),r(29,"ul")(30,"li"),s(31,14),_(),r(32,"li"),s(33,15),_()(),m(34,tn,2,0,"p"),m(35,on,10,5,"div",24),m(36,nn,2,0,"my-alert",25)(37,rn,6,7)),o&2){let a=c();l(34),N(a.isEmailEnabled()?34:-1),l(),N(a.latestImport?35:-1),l(),N(a.hasPendingImport()?36:37);}}function ln(o,i){o&1&&(r(0,"p"),s(1,20),_());}var Do=(()=>{let i=class i{authService=C($);server=C(D);userImportExportService=C(te);resumableUploadService=C(vo);
2notifier=C(h);videoQuotaUsed=ie(void 0);uploadingArchive=!1;archiveUploadFinished=!1;error;enableRetryAfterError;uploadPercents=0;latestImport;fileToUpload;uploadServiceSubscription;alreadyRefreshedToken=!1;ngOnInit(){this.userImportExportService.getLatestImport({userId:this.authService.getUser().id}).subscribe(t=>this.latestImport=t),this.uploadServiceSubscription=this.resumableUploadService.events.subscribe(t=>this.onUploadOngoing(t));}ngOnDestroy(){this.resumableUploadService.disconnect(),this.uploadServiceSubscription&&this.uploadServiceSubscription.unsubscribe();}canDeactivate(){return{canDeactivate:!this.uploadingArchive,text:"Your archive file is not uploaded yet, are you sure you want to leave this page?"};}isImportEnabled(){return this.server.getHTMLConfig().import.users.enabled;}isEmailEnabled(){return this.server.getHTMLConfig().email.enabled;}onUploadOngoing(t){switch(t.status){case"error":{if(!this.alreadyRefreshedToken&&t.responseStatus===ee.UNAUTHORIZED_401)return this.alreadyRefreshedToken=!0,this.refreshTokenAndRetryUpload();this.handleUploadError(Ht(t));break;}case"cancelled":this.uploadingArchive=!1,this.uploadPercents=0,this.enableRetryAfterError=!1,this.error="";break;case"uploading":this.uploadPercents=t.progress;break;case"complete":this.archiveUploadFinished=!0,this.uploadPercents=100,this.uploadingArchive=!1;break;}}onFileChange(t){let e=t.target,n=e.files[0];if(!n)return;let d=this.authService.getUser();if(d.videoQuota!==-1&&this.videoQuotaUsed()+n.size>d.videoQuota){let p=new Ke(),O=p.transform(n.size,0),U=p.transform(this.videoQuotaUsed(),0),F=p.transform(d.videoQuota,0);this.notifier.error("Cannot import this file as your video quota would be exceeded (import size: "+O+", used: "+U+", quota: "+F+")"),e.value="";return;}this.fileToUpload=n,this.uploadFile(n);}cancelUpload(){this.resumableUploadService.control({action:"cancel"});}retryUpload(){this.enableRetryAfterError=!1,this.error="",this.uploadFile(this.fileToUpload);}hasPendingImport(){if(!this.latestImport)return!1;let t=this.latestImport.state.id;return t===rt.PENDING||t===rt.PROCESSING;}uploadFile(t){this.resumableUploadService.handleFiles(t,{endpoint:`${te.BASE_USER_IMPORTS_URL}${this.authService.getUser().id}/imports/import-resumable`,multiple:!1,maxChunkSize:this.server.getHTMLConfig().client.videos.resumableUpload.maxChunkSize,token:this.authService.getAccessToken(),uploaderClass:yo,retryConfig:Wt(),metadata:{filename:t.name}}),this.uploadingArchive=!0;}handleUploadError(t){this.uploadPercents=0,this.enableRetryAfterError=!0,this.error=je({err:t,name:"archive",notifier:this.notifier,sticky:!1}),t.status===ee.UNSUPPORTED_MEDIA_TYPE_415&&this.cancelUpload();}refreshTokenAndRetryUpload(){this.authService.refreshAccessToken().subscribe(()=>this.retryUpload());}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-import"]],inputs:{videoQuotaUsed:[1,"videoQuotaUsed"]},decls:7,vars:1,consts:()=>{let t;t="IMPORT";let e;e="You can import an archive created by another PeerTube website.";let n;n=" This is an "+"\uFFFD#4\uFFFD"+"import"+"\uFFFD/#4\uFFFD"+" tool and not a migration tool. It's the reason why data (like channels or videos) is duplicated and not moved from your previous PeerTube website. ";let d;d="The import process will automatically:";let p;p="Update your account metadata (display name, description, avatar...)";let O;O="Update your user settings (autoplay or P2P policy, notification settings...). It does not update your user email, username or password.";let U;U="Add accounts/servers in your mute list";let F;F="Add likes/dislikes";let y;y="Send a follow request to your subscriptions";let z;z="Create channels if they do not already exist";let v;v="Create playlists if they do not already exist";let w;w="Add watched videos in your video history";let Pe;Pe=""+"\uFFFD#26\uFFFD"+"If the archive contains video files"+"\uFFFD/#26\uFFFD"+", create videos if they do not already exist";let Re;Re="The following data objects are not imported:";let Ue;Ue="Comments";let Ie;Ie="Followers (accounts will need to re-follow your channels)";let he;he="An email will be sent when the import process is complete.";let ye;ye=" You can't re-import an archive because you already have an import that is currently being processed by PeerTube. ";let ve;ve="(extension: .zip)";let Ye;Ye="Select the file to import";let $e;$e="Select the archive file to import";let be;be="Upload completed. Your archive import will be processed as soon as possible.";let Fe;return Fe="User import is not enabled by your administrator.",[t,e,n,d,p,O,U,F,y,z,v,w,Pe,Re,Ue,Ie,he,ye,$e,be,Fe,[1,"pt-two-cols"],[1,"title-col"],[1,"content-col"],[1,"mb-3"],["type","primary"],[1,"d-block","mt-3","mb-3",3,"cancelUpload","retry","isUploading","uploadPercents","error","uploaded","enableRetryAfterError"],["ngbTooltip",ve,1,"button-file","primary-button","form-control",3,"hidden"],["aria-label",Ye,"accept",".zip","id","importfile","type","file",3,"change"]];},template:function(e,n){e&1&&(r(0,"div",21)(1,"div",22)(2,"h2"),s(3,0),_()(),r(4,"div",23),m(5,an,38,3)(6,ln,2,0,"p"),_()()),e&2&&(l(5),N(n.isImportEnabled()?5:6));},dependencies:[Yo,qt,K,ot],styles:[`.button-file[_ngcontent-%COMP%]{width:max-content}my-alert[_ngcontent-%COMP%]{display:block;width:fit-content}
3/*# sourceMappingURL=my-account-import.component-2VXUC654.css.map */`]}));let o=i;return o;})();var sn=["exportModal"];function Cn(o,i){o&1&&(r(0,"p"),s(1,18),_());}function cn(o,i){if(o&1&&(R(0),de(1,"bytes")),o&2){let a=c().$implicit;pe(" ",_t(1,1,a.size)," ");}}function Tn(o,i){if(o&1&&(R(0),de(1,"ptDate")),o&2){let a=c().$implicit;pe(" ",Xe(1,1,a.expiresOn,"medium")," ");}}
3function dn(o,i){if(o&1&&(r(0,"a",35),s(1,23),_()),o&2){let a=c().$implicit;T("href",a.privateDownloadUrl,Ut);}}function un(o,i){if(o&1&&(r(0,"tr")(1,"td"),R(2),de(3,"ptDate"),_(),r(4,"td"),R(5),_(),r(6,"td"),m(7,cn,2,3),_(),r(8,"td"),m(9,Tn,2,4),_(),r(10,"td"),m(11,dn,2,1,"a",35),_()()),o&2){let a=i.$implicit;l(2),Y(Xe(3,5,a.createdAt,"medium")),l(3),Y(a.state.label),l(2),N(a.size?7:-1),l(2),N(a.expiresOn?9:-1),l(2),N(a.privateDownloadUrl?11:-1);}}function Mn(o,i){if(o&1&&(r(0,"table")(1,"tr")(2,"th",34),s(3,19),_(),r(4,"th",34),s(5,20),_(),r(6,"th",34),s(7,21),_(),r(8,"th",34),s(9,22),_(),u(10,"th"),_(),xe(11,un,12,8,"tr",null,Ge),_()),o&2){let a=c(2);l(11),Le(a.userExports);}}function mn(o,i){if(o&1){let a=I();r(0,"p"),s(1,2),_(),r(2,"ul")(3,"li"),s(4,3),_(),r(5,"li"),s(6,4),_(),r(7,"li"),s(8,5),_(),r(9,"li"),s(10,6),_(),r(11,"li"),s(12,7),_(),r(13,"li"),s(14,8),_(),r(15,"li"),s(16,9),_(),r(17,"li"),s(18,10),_(),r(19,"li"),s(20,11),_()(),r(21,"p"),s(22,12),_(),r(23,"ul")(24,"li"),s(25,13),_(),r(26,"li"),s(27,14),_(),r(28,"li"),s(29,15),_()(),r(30,"p"),k(31,16),u(32,"strong"),V(),_(),r(33,"p"),s(34,17),_(),m(35,Cn,2,0,"p"),m(36,Mn,13,0,"table"),r(37,"div",32)(38,"input",33),E("click",function(){f(a);let e=c();return g(e.openNewArchiveModal());}),_()();}if(o&2){let a=c();l(35),N(a.isEmailEnabled()?35:-1),l(),N(a.userExports&&a.userExports.length!==0?36:-1),l(2),T("disabled",a.isRequestArchiveDisabled());}}function Nn(o,i){o&1&&(r(0,"p"),s(1,24),_());}function On(o,i){o&1&&(r(0,"my-alert",41),s(1,27),_());}function pn(o,i){if(o&1&&(r(0,"my-alert",42),R(1),_()),o&2){let a=c(2);l(),Y(a.errorInModal);}}function An(o,i){if(o&1&&(r(0,"div"),k(1,28),u(2,"strong"),de(3,"bytes"),V(),_()),o&2){let a=c(2);l(3),W(_t(3,1,a.archiveWeightEstimation)),H(1);}}function En(o,i){if(o&1){let a=I();r(0,"div",36)(1,"h4",37),s(2,25),_(),r(3,"button",38),E("click",function(){let e=f(a).close;return g(e());}),u(4,"my-global-icon",39),_()(),r(5,"div",40),m(6,On,2,0,"my-alert",41),m(7,pn,2,1,"my-alert",42),r(8,"my-peertube-checkbox",43),Te("ngModelChange",function(e){f(a);let n=c();return ce(n.exportWithVideosFiles,e)||(n.exportWithVideosFiles=e),g(e);}),le(9,44),r(10,"div"),s(11,26),_(),m(12,An,4,3,"div"),se(),_()(),r(13,"div",45)(14,"input",46),E("click",function(){let e=f(a).close;return g(e());})("key.enter",function(){let e=f(a).close;return g(e());}),_(),r(15,"input",47),E("click",function(){f(a);let e=c();return g(e.requestNewArchive());}),_()();}if(o&2){let a=c();l(6),N(a.hasAlreadyACompletedArchive()?6:-1),l(),N(a.errorInModal?7:-1),l(),Ce("ngModel",a.exportWithVideosFiles),l(4),N(a.archiveWeightEstimation?12:-1);}}var zo=(()=>{let i=class i{authService=C($);server=C(D);userImportExportService=C(te);modalService=C(Bt);exportModal=Ae("exportModal");videoQuotaUsed=ie(void 0);userExports=[];exportWithVideosFiles;errorInModal;archiveWeightEstimation;exportModalOpened;requestingArchive=!1;ngOnInit(){this.archiveWeightEstimation=this.videoQuotaUsed(),this.reloadUserExports();}isExportEnabled(){return this.server.getHTMLConfig().export.users.enabled;}isEmailEnabled(){return this.server.getHTMLConfig().email.enabled;}isRequestArchiveDisabled(){return this.userExports.some(t=>{let e=t.state.id;return e===Qe.PENDING||e===Qe.PROCESSING;});}hasAlreadyACompletedArchive(){return this.userExports.some(t=>t.state.id===Qe.COMPLETED);}openNewArchiveModal(){this.exportWithVideosFiles=!1,this.errorInModal=void 0,this.exportModalOpened=this.modalService.open(this.exportModal(),{centered:!0});}requestNewArchive(){if(this.requestingArchive)return;this.requestingArchive=!0;let t=ze(!0);this.userExports.length!==0&&(t=pt(this.userExports.map(e=>e.id)).pipe(ft(e=>this.userImportExportService.deleteUserExport({userId:this.getUserId(),userExportId:e})),St())),t.pipe(gt(()=>this.userImportExportService.requestNewUserExport({withVideoFiles:this.exportWithVideosFiles,userId:this.getUserId()}))).subscribe({next:()=>{this.reloadUserExports(),this.exportModalOpened.close(),this.requestingArchive=!1;},error:e=>{if(this.requestingArchive=!1,e.body.code===Dt.MAX_USER_VIDEO_QUOTA_EXCEEDED_FOR_USER_EXPORT){this.errorInModal="Video files cannot be included in the export because you have exceeded the maximum video quota allowed by your administrator to export this archive.";return;}this.errorInModal=e.message;}});}reloadUserExports(){this.isExportEnabled()&&this.userImportExportService.listUserExports({userId:this.authService.getUser().id}).subscribe(({data:t})=>this.userExports=t);}
3getUserId(){return this.authService.getUser().id;}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-export"]],viewQuery:function(e,n){e&1&&Ne(n.exportModal,sn,5),e&2&&Oe();},inputs:{videoQuotaUsed:[1,"videoQuotaUsed"]},decls:9,vars:1,consts:()=>{let t;t="EXPORT";let e;e="Request a new archive";let n;n="You can request an archive of your account containing:";let d;d="Your account settings with avatar file";let p;p="Your channels with banner and avatar files";let O;O="Your muted accounts and servers";let U;U="Your comments";let F;F="Your likes and dislikes";let y;y="Your subscriptions and followers";let z;z="Your video playlists with thumbnail files";let v;v="Your videos with thumbnail, caption files. Video files can also be included in the archive";let w;w="Your video history";let Pe;Pe="The exported data will contain multiple directories:";let Re;Re="A directory containing an export in ActivityPub format, readable by any compliant software";let Ue;Ue="A directory containing an export in custom PeerTube JSON format that can be used to re-import your account on another PeerTube instance";let Ie;Ie="A directory containing static files (thumbnails, avatars, video files etc.)";let he;he="Videos and playlists from collaborated channels, as well as your channel collaborators, "+"\uFFFD#32\uFFFD"+"will not"+"\uFFFD/#32\uFFFD"+" be included in the archive.";let ye;ye="You can only request one archive at a time.";let ve;ve="An email will be sent when the export archive is available.";let Ye;Ye="Date";let $e;$e="State";let be;be="Size";let Fe;Fe="Expires on";let P;P="Download your archive";let lt;lt="User export is not enabled by your administrator.";let st;st="Close this modal";let Ct;Ct="Include video files in archive file";let ct;ct="Cancel";let Tt;Tt="Request an archive";let dt;dt="Archive settings";let ut;ut="Including video files is required if you want to re-import your videos on another PeerTube website";let Mt;Mt=" You already have an active archive. Requesting a new export archive will remove the current one. ";let mt;return mt="If you include video files, the archive file will weigh "+"\uFFFD#2\uFFFD"+"approximately "+"\uFFFD0\uFFFD"+""+"\uFFFD/#2\uFFFD"+"",[["exportModal",""],t,n,d,p,O,U,F,y,z,v,w,Pe,Re,Ue,Ie,he,ye,ve,Ye,$e,be,Fe,P,lt,dt,ut,Mt,mt,[1,"pt-two-cols"],[1,"title-col"],[1,"content-col"],[1,"mt-3"],["type","submit","value",e,1,"peertube-button","primary-button",3,"click","disabled"],["scope","column"],[1,"peertube-button-link","secondary-button",3,"href"],[1,"modal-header"],[1,"modal-title"],["title",st,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["type","warning"],["type","danger"],["inputName","exportWithVideos","labelText",Ct,3,"ngModelChange","ngModel"],["ngProjectAs","description",5,["description"]],[1,"modal-footer","inputs"],["type","button","role","button","value",ct,1,"peertube-button","secondary-button",3,"click","key.enter"],["type","submit","value",Tt,1,"peertube-button","primary-button",3,"click"]];},template:function(e,n){e&1&&(r(0,"div",29)(1,"div",30)(2,"h2"),s(3,1),_()(),r(4,"div",31),m(5,mn,39,3)(6,Nn,2,0,"p"),_()(),Ve(7,En,16,4,"ng-template",null,0,vt)),e&2&&(l(5),N(n.isExportEnabled()?5:6));},dependencies:[Ze,Je,x,G,Se,K,ot,Ke],styles:[`table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding-inline-end:1rem}
4/*# sourceMappingURL=my-account-export.component-QHMIAEKB.css.map */`]}));let o=i;return o;})();var Sn=["accountImport"],ko=(()=>{let i=class i{userService=C(L);accountImport=Ae("accountImport");videoQuotaUsed;ngOnInit(){this.userService.getMyVideoQuotaUsed().subscribe(t=>this.videoQuotaUsed=t.videoQuotaUsed);}canDeactivate(){return this.accountImport()?.canDeactivate()||{canDeactivate:!0};}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-import-export"]],viewQuery:function(e,n){e&1&&Ne(n.accountImport,Sn,5),e&2&&Oe();},decls:3,vars:2,consts:[["accountImport",""],[1,"d-block","mb-5",3,"videoQuotaUsed"],[3,"videoQuotaUsed"]],template:function(e,n){e&1&&u(0,"my-account-import",1,0)(2,"my-account-export",2),e&2&&(T("videoQuotaUsed",n.videoQuotaUsed),l(2),T("videoQuotaUsed",n.videoQuotaUsed));},dependencies:[Do,zo],encapsulation:2}));let o=i;return o;})();var fn=["userNotification"];function gn(o,i){o&1&&(u(0,"my-global-icon",15),r(1,"span"),s(2,4),_());}function Pn(o,i){o&1&&(u(0,"my-global-icon",16),r(1,"span"),s(2,5),_());}var Vo=(()=>{let i=class i{userNotification=Ae("userNotification");_notificationSortType="createdAt";get notificationSortType(){return this.hasUnreadNotifications()?this._notificationSortType:"createdAt";}set notificationSortType(t){this._notificationSortType=t;}markAllAsRead(){this.userNotification().markAllAsRead();}hasUnreadNotifications(){return this.userNotification().notifications.filter(t=>t.payload.read===!1).length!==0;}onChangeSortColumn(){this.userNotification().changeSortColumn(this.notificationSortType);}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&Ne(n.userNotification,fn,5),e&2&&Oe();},decls:17,vars:5,consts:()=>{let t;t="Newest first";let e;e="Unread first";let n;n="Notification preferences";let d;d="Mark all as read";let p;return p="All read",[["userNotification",""],t,e,n,d,p,[1,"header"],[1,"peertube-select-container","me-auto"],["aria-label","Sort by",1,"form-control",3,"ngModelChange","ngModel"],["value","createdAt"],["value","read",3,"disabled"],["routerLink","/my-account/settings","fragment","notifications",1,"peertube-button-link","secondary-button"],["
4iconName","cog","aria-hidden","true"],[1,"peertube-button","secondary-button",3,"click","disabled"],["inPopup","false"],["iconName","tick","aria-hidden","true"],["iconName","circle-tick","aria-hidden","true"]];},template:function(e,n){if(e&1){let d=I();r(0,"div",6)(1,"div",7)(2,"select",8),Te("ngModelChange",function(O){return f(d),ce(n.notificationSortType,O)||(n.notificationSortType=O),g(O);}),E("ngModelChange",function(){return n.onChangeSortColumn();}),r(3,"option",9),s(4,1),_(),r(5,"option",10),s(6,2),_()()(),r(7,"a",11),u(8,"my-global-icon",12),r(9,"span"),s(10,3),_()(),r(11,"button",13),E("click",function(){return n.markAllAsRead();}),m(12,gn,3,0),m(13,Pn,3,0),_()(),r(14,"div"),u(15,"my-user-notifications",14,0),_();}e&2&&(l(2),Ce("ngModel",n.notificationSortType),l(3),T("disabled",!n.hasUnreadNotifications()),l(6),T("disabled",!n.hasUnreadNotifications()),l(),N(n.hasUnreadNotifications()?12:-1),l(),N(n.hasUnreadNotifications()?-1:13));},dependencies:[Be,wt,Ze,x,xt,Lt,Gt,G,Se,no],styles:[`.header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.5rem}
5/*# sourceMappingURL=my-account-notifications.component-R6MNMCLB.css.map */`]}));let o=i;return o;})();var Rn=o=>({"input-error":o});function Un(o,i){if(o&1&&(r(0,"my-alert",5),R(1),_()),o&2){let a=c();l(),Y(a.error);}}function In(o,i){if(o&1&&(r(0,"my-alert",6),R(1),_()),o&2){let a=c();l(),Y(a.success);}}function hn(o,i){o&1&&(r(0,"div"),s(1,3),_());}function yn(o,i){if(o&1){let a=I();r(0,"button",17),E("click",function(){f(a);let e=c(2);return g(e.resendVerificationEmail());}),s(1,4),_();}}function vn(o,i){if(o&1&&(r(0,"div",7)(1,"div"),k(2,2),u(3,"strong"),V(),_(),m(4,hn,2,0,"div")(5,yn,2,0,"button",16),_()),o&2){let a=c();l(3),W(a.user.pendingEmail),H(2),l(),N(a.verificationEmailSent?4:5);}}function Yn(o,i){if(o&1&&(r(0,"div",13),R(1),_()),o&2){let a=c();l(),Y(a.formErrors["new-email"]);}}var Wo=(()=>{let i=class i extends ae{formReactiveService=C(J);authService=C($);userService=C(L);serverService=C(D);verificationEmailSent=!1;error;success;user;ngOnInit(){this.buildForm({"new-email":lo,password:bo}),this.user=this.authService.getUser();}changeEmail(){this.error=null,this.success=null;let t=this.form.value.password,e=this.form.value["new-email"];ke([this.serverService.getConfig(),this.userService.changeEmail(t,e)]).pipe(Pt(()=>this.authService.refreshUserInformation())).subscribe({next:([n])=>{this.form.reset(),n.signup.requiresEmailVerification?this.success="Please check your emails to verify your new email.":this.success="Email updated.";},error:n=>{if(n.status===ee.UNAUTHORIZED_401){this.error="You current password is invalid.";return;}this.error=n.message;}});}resendVerificationEmail(){this.userService.askSendVerifyEmail(this.user.pendingEmail).subscribe({next:()=>{this.verificationEmailSent=!0;},error:t=>{this.error=t.message;}});}};M(i,"\u0275fac",(()=>{let t;return function(n){return(t||(t=oe(i)))(n||i);};})()),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-change-email"]],features:[ne],decls:15,vars:11,consts:()=>{let t;t="New email";let e;e="Current password";let n;n="Change email";let d;d="Change your email";let p;p=" Your current email is "+"\uFFFD#9\uFFFD"+""+"\uFFFD0\uFFFD"+""+"\uFFFD/#9\uFFFD"+"";let O;O=""+"\uFFFD#3\uFFFD"+""+"\uFFFD0\uFFFD"+""+"\uFFFD/#3\uFFFD"+" is awaiting email verification. ";let U;U="Email verification sent!";let F;return F="Resend your verification email",[d,p,O,U,F,["type","danger"],["type","success"],[1,"pending-email"],[1,"change-email",3,"ngSubmit","formGroup"],[1,"form-group"],["for","new-email"],[1,"form-group-description"],["type","email","id","new-email","placeholder",t,"formControlName","new-email",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["formControlName","password","inputId","password","placeholder",e,"autocomplete","current-password",3,"formError"],["type","submit","value",n,1,"peertube-button","primary-button",3,"disabled"],["type","button",1,"peertube-button-like-link"],["type","button",1,"peertube-button-like-link",3,"click"]];},template:function(e,n){e&1&&(m(0,Un,2,1,"my-alert",5),m(1,In,2,1,"my-alert",6),m(2,vn,6,2,"div",7),r(3,"form",8),E("ngSubmit",function(){return n.changeEmail();}),r(4,"div",9)(5,"label",10),s(6,0),_(),r(7,"div",11),k(8,1),u(9,"strong"),V(),_(),u(10,"input",12),m(11,Yn,2,1,"div",13),_(),r(12,"div",9),u(13,"my-input-text",14),_(),u(14,"input",15),_()),e&2&&(N(n.error?0:-1),l(),N(n.success?1:-1),l(),N(n.user.pendingEmail?2:-1),l(),T("formGroup",n.form),l(6),W(n.user.email),H(8),l(),T("ngClass",We(9,Rn,n.formErrors["new-email"])),l(),N(n.formErrors["new-email"]?11:-1),l(2),T("formError",n.formErrors.password),l(),T("disabled",!n.form.valid));},dependencies:[Be,He,x,q,qe,G,B,Z,j,Q,re,K],styles:[`form[_ngcontent-%COMP%]{max-width:340px}my-input-text[_ngcontent-%COMP%]{display:block;width:100%}input[type=email][_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}input[type=email][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=email][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=email][_ngcontent-%COMP%]:focus, input[type=email][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=email][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){input[type=email][_ngcontent-%COMP%]{width:100%}}.pending-email[_ngcontent-%COMP%]{margin-bottom:15px}
6/*# sourceMappingURL=my-account-change-email.component-AON2LJI5.css.map */`]}));let o=i;return o;})();function $n(o,i){if(o&1&&(r(0,"my-alert",1),R(1),_()),o&2){let a=c();l(),Y(a.error);}}var Ho=(()=>{let i=class i extends ae{formReactiveService=C(J);notifier=C(h);authService=C($);userService=C(L);serverService=C(D);error;user;ngOnInit(){let{minLength:t,maxLength:e}=this.serverService.getHTMLConfig().fieldsConstraints.users.password;this.buildForm({"current-password":et,"new-password":Co(t,e),"new-confirmed-password":co}),this.user=this.authService.getUser();let n=this.form.get("new-confirmed-password");n.valueChanges.pipe(Et(d=>d!==this.form.value["new-password"])).subscribe(()=>n.setErrors({matchPassword:!0}));}changePassword(){let t=this.form.value["current-password"],e=this.form.value["new-password"];this.userService.changePassword(t,e).subscribe({next:()=>{this.notifier.success("Password updated."),this.form.reset(),this.error=null;},error:n=>{if(n.status===ee.UNAUTHORIZED_401){this.error="You current password is invali
6d.";return;}this.error=n.message;}});}};M(i,"\u0275fac",(()=>{let t;return function(n){return(t||(t=oe(i)))(n||i);};})()),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-change-password"]],features:[ne],decls:8,vars:6,consts:()=>{let t;t="Current password";let e;e="New password";let n;n="Confirm new password";let d;d="Change password";let p;return p="Change password",[p,["type","danger"],[3,"ngSubmit","formGroup"],["for","current-password"],["formControlName","current-password","inputId","current-password","placeholder",t,"autocomplete","current-password",3,"formError"],["formControlName","new-password","inputId","new-password","placeholder",e,"autocomplete","new-password",3,"formError"],["formControlName","new-confirmed-password","inputId","new-confirmed-password","placeholder",n,"autocomplete","new-password",3,"formError"],["type","submit","value",d,1,"mt-3","peertube-button","primary-button",3,"disabled"]];},template:function(e,n){e&1&&(m(0,$n,2,1,"my-alert",1),r(1,"form",2),E("ngSubmit",function(){return n.changePassword();}),r(2,"label",3),s(3,0),_(),u(4,"my-input-text",4)(5,"my-input-text",5)(6,"my-input-text",6)(7,"input",7),_()),e&2&&(N(n.error?0:-1),l(),T("formGroup",n.form),l(3),T("formError",n.formErrors["current-password"]),l(),T("formError",n.formErrors["new-password"]),l(),T("formError",n.formErrors["new-confirmed-password"]),l(),T("disabled",!n.form.valid));},dependencies:[x,q,G,B,Z,j,Q,re,K],styles:[`form[_ngcontent-%COMP%]{max-width:340px}my-input-text[_ngcontent-%COMP%]{display:block;width:100%}my-input-text[_ngcontent-%COMP%] + my-input-text[_ngcontent-%COMP%]{margin-top:15px}
7/*# sourceMappingURL=my-account-change-password.component-ZMXNQOT2.css.map */`]}));let o=i;return o;})();var Bo=(()=>{let i=class i{authService=C($);notifier=C(h);userService=C(L);confirmService=C(fe);redirectService=C(Jt);user=ie(void 0);deleteMe(){return me(this,null,function*(){(yield this.confirmService.confirmWithExpectedInput("Are you sure you want to delete your account?"+"<br /><br />"+("This will delete all your data, including channels, videos, comments and you won't be able to create another user on this instance with \""+this.user().username+"\" username.")+"<br /><br />"+"Content cached by other servers and other third-parties might make longer to be deleted.","Type your username to confirm",this.user().username,"Delete your account","Delete my account"))!==!1&&this.userService.deleteMe().subscribe({next:()=>{this.notifier.success("Your account is deleted."),this.authService.logout(),this.redirectService.redirectToHomepage();},error:e=>this.notifier.handleError(e)});});}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-danger-zone"]],inputs:{user:[1,"user"]},decls:5,vars:0,consts:()=>{let t;t="Once you delete your account, there is no going back. You will be asked to confirm this action.";let e;return e="Delete your account",[t,e,[1,"delete-me"],[1,"peertube-button","danger-button",3,"click"]];},template:function(e,n){e&1&&(nt(0,"div",2)(1,"p"),s(2,0),it(),nt(3,"button",3),It("click",function(){return n.deleteMe();}),s(4,1),it()());},encapsulation:2}));let o=i;return o;})();function bn(o,i){if(o&1&&(le(0),k(1,0),u(2,"strong"),V(),se()),o&2){let a=c();l(2),W(a.user().email),H(1);}}function Fn(o,i){o&1&&(le(0),s(1,1),se());}function wn(o,i){o&1&&(le(0),s(1,2),se());}var qo=(()=>{let i=class i extends ae{formReactiveService=C(J);userService=C(L);notifier=C(h);user=Ee(void 0);checkboxLabel;ngOnInit(){this.buildForm({"email-public":null}),this.form.patchValue({"email-public":this.user().emailPublic}),this.checkboxLabel="";}updateEmailPublic(){let t={emailPublic:this.form.value["email-public"]};this.userService.updateMyProfile(t).subscribe({next:()=>{t.emailPublic?this.notifier.success("Email is now public"):this.notifier.success("Email is now private"),this.user.update(e=>Ot(Nt({},e),{emailPublic:t.emailPublic}));},error:e=>this.notifier.handleError(e)});}};M(i,"\u0275fac",(()=>{let t;return function(n){return(t||(t=oe(i)))(n||i);};})()),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-email-preferences"]],inputs:{user:[1,"user"]},outputs:{user:"userChange"},features:[ne],decls:9,vars:3,consts:()=>{let t;t="Save email settings";let e;e="Allow email "+"\uFFFD#2\uFFFD"+""+"\uFFFD0\uFFFD"+""+"\uFFFD/#2\uFFFD"+" to be publicly displayed";let n;n="Necessary to claim podcast RSS feeds.";let d;return d="\u26A0\uFE0F Your email cannot be used in podcast RSS feeds because it has not yet been verified.",[e,n,d,[3,"ngSubmit","formGroup"],[1,"form-group"],["inputName","email-public","formControlName","email-public"],["ptTemplate","label"],["ngProjectAs","de
7scription",5,["description"]],[1,"mb-0"],["type","submit","value",t,1,"peertube-button","primary-button",3,"disabled"]];},template:function(e,n){e&1&&(r(0,"form",3),E("ngSubmit",function(){return n.updateEmailPublic();}),r(1,"div",4)(2,"my-peertube-checkbox",5),Ve(3,bn,3,1,"ng-template",6),le(4,7),r(5,"p",8),m(6,Fn,2,0,"ng-container")(7,wn,2,0,"ng-container"),_(),se(),_()(),u(8,"input",9),_()),e&2&&(T("formGroup",n.form),l(6),N(n.user().emailVerified?6:7),l(2),T("disabled",!n.form.valid));},dependencies:[x,q,G,B,Z,j,Q,Je,ro],encapsulation:2}));let o=i;return o;})();function Gn(o,i){o&1&&(r(0,"div"),s(1,2),_());}function xn(o,i){if(o&1){let a=I();r(0,"div")(1,"my-input-switch",5),Te("ngModelChange",function(e){f(a);let n=c(2).$implicit,d=c(4);return ce(d.emailNotifications[n],e)||(d.emailNotifications[n]=e),g(e);}),E("ngModelChange",function(){f(a);let e=c(2).$implicit,n=c(4);return g(n.updateEmailSetting(e,n.emailNotifications[e]));}),_()();}if(o&2){let a=c(2).$implicit,t=c(4);l(),T("label",t.getEmailLabel(a))("inputName","email-notification-"+a),Ce("ngModel",t.emailNotifications[a]);}}function Ln(o,i){if(o&1){let a=I();r(0,"div",4)(1,"div"),R(2),_(),r(3,"div")(4,"my-input-switch",5),Te("ngModelChange",function(e){f(a);let n=c().$implicit,d=c(4);return ce(d.webNotifications[n],e)||(d.webNotifications[n]=e),g(e);}),E("ngModelChange",function(){f(a);let e=c().$implicit,n=c(4);return g(n.updateWebSetting(e,n.webNotifications[e]));}),_()(),m(5,xn,2,3,"div"),_();}if(o&2){let a=c().$implicit,t=c(4);l(2),Y(t.labelNotifications[a]),l(2),T("label",t.getWebLabel(a))("inputName","web-notification-"+a),Ce("ngModel",t.webNotifications[a]),l(),N(t.emailEnabled?5:-1);}}function Xn(o,i){if(o&1&&m(0,Ln,6,5,"div",4),o&2){let a=i.$implicit,t=c(4);N(t.hasUserRight(a)?0:-1);}}function Dn(o,i){if(o&1&&(r(0,"div",3)(1,"div"),s(2,0),_(),r(3,"div"),s(4,1),_(),m(5,Gn,2,0,"div"),_(),xe(6,Xn,1,1,null,null,Ge)),o&2){let a=c().$implicit,t=c(2);l(2),W(a.label),H(2),l(3),N(t.emailEnabled?5:-1),l(),Le(a.keys);}}function zn(o,i){if(o&1&&m(0,Dn,8,2),o&2){let a=i.$implicit,t=c(2);N(t.hasNotificationsInGroup(a)?0:-1);}}function kn(o,i){if(o&1&&(r(0,"div"),xe(1,zn,1,1,null,null,Ge),_()),o&2){let a=c();l(),Le(a.notificationSettingGroups);}}var Qo=(()=>{let i=class i{userNotificationService=C(oo);serverService=C(D);notifier=C(h);user=Ee(void 0);notificationSettingGroups=[];emailNotifications={};webNotifications={};labelNotifications={};rightNotifications={};emailEnabled=!1;savePreferences=Vt(this.savePreferencesImpl.bind(this),500);constructor(){this.notificationSettingGroups=[{label:"Social",keys:["newVideoFromSubscription","newFollow","commentMention"]},{label:"Your videos",keys:["newCommentOnMyVideo","blacklistOnMyVideo","myVideoPublished","myVideoImportFinished","myVideoStudioEditionFinished","myVideoTranscriptionGenerated"]},{label:"Moderation",keys:["abuseStateChange","abuseNewMessage","abuseAsModerator","videoAutoBlacklistAsModerator","newUserRegistration"]},{label:"Administration",keys:["newInstanceFollower","autoInstanceFollowing","newPeerTubeVersion","newPluginVersion"]}],this.rightNotifications={abuseAsModerator:_e.MANAGE_ABUSES,videoAutoBlacklistAsModerator:_e.MANAGE_VIDEO_BLACKLIST,newUserRegistration:_e.MANAGE_USERS,newInstanceFollower:_e.MANAGE_SERVER_FOLLOW,autoInstanceFollowing:_e.MANAGE_CONFIGURATION,newPeerTubeVersion:_e.MANAGE_DEBUG,newPluginVersion:_e.MANAGE_DEBUG};}ngOnInit(){let t=this.serverService.getHTMLConfig();this.emailEnabled=t.email.enabled,this.labelNotifications={newVideoFromSubscription:"New video or live from your subscriptions",newCommentOnMyVideo:"New comment on your video",abuseAsModerator:"New abuse",videoAutoBlacklistAsModerator:"An automatically blocked video is awaiting review",blacklistOnMyVideo:"One of your video is blocked/unblocked",myVideoPublished:"Video published (after transcoding/scheduled update)",myVideoImportFinished:"Video import finished",newUserRegistration:"A new user registered on "+t.instance.name+"",newFollow:"You or one of your channels has a new follower",commentMention:"Someone mentioned you in video comments",newInstanceFollower:""+t.instance.name+" has a new follower",autoInstanceFollowing:""+t.instance.name+" automatically followed another platform",abuseNewMessage:"An abuse report received a new message",abuseStateChange:"One of your abuse reports has been accepted or rejected by moderators",newPeerTubeVersion:"A new PeerTube version is available",newPluginVersion:"One of your plugin/theme has a new available version",myVideoStudioEditionFinished:"Processing of edits has finished",myVideoTranscriptionGenerated:"The transcription of your video has been generated"},this.loadNotificationSettings();}hasUserRight(t){let e=this.rightNotifications[t];return e?this.user().hasRight(e):!0;}hasNotificationsInGroup(t){return t.keys.some(e=>this.hasUserRight(e));}getWebLabel(t){return`Toggle web notification for "${this.labelNotifications[t]}"`;}getEmailLabel(t){return`Toggle email notification for "${this.labelNotifications[t]}"`;}updateEmailSetting(t,e){this.user.update(n=>(n.notificationSettings[t]=e===!0?n.notificationSettings[t]|ue.EMAIL:n.notificationSettings[t]&~ue.EMAIL,n)),this.savePreferences();}updateWebSetting(t,e){this.user.update(n=>(n.notificationSettings[t]=e===!0?n.notificationSettings[t]|ue.WEB:n.notificationSettings[t]&~ue.WEB,n)),this.savePreferences();}savePreferencesImpl(){this.userNotificationService.updateNotificationSettings(this.user().notificationSettings).subscribe({next:()=>{this.notifier.success("Preferences saved",void 0,2e3);},error:t=>this.notifier.handleError(t)});}loadNotificationSettings(){for(let t of zt(this.user().notificationSettings)){let e=this.user().notificationSettings[t];this.emailNotifications[t]=!!(e&ue.EMAIL),this.webNotifications[t]=!!(e&ue.WEB);}}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-notification-preferences"]],inputs:{user:[1,"user"]},outputs:{user:"userChange"},decls:1,vars:1,consts:()=>{let t;t=""+"\uFFFD0\uFFFD"+"";let e;e="Web";let n;return n="Email",[t,e,n,[1,"header","notification-row"],[1,"small","notification-row"],[3,"ngModelChange","label","inputName","ngModel"]];},template:function(e,n){e&1&&m(0,kn,3,0,"div"),e&2&&N(n.webNotifications?0:-1);},dependencies:[Fo,x,G,Se],styles:[`.notification-row[_ngcontent-%COMP%]{display:flex;align-items:center;border-bottom:1px solid var(--bg-secondary-400)}.notification-row.header[_ngcontent-%COMP%]{font-weight:600;margin-top:10px}.notification-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:10px}.notification-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:350px}@media screen and (max-width:500px){.notification-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:auto;flex-grow:1}}
8/*# sourceMappingURL=my-account-notification-preferences.component-JTGD54W7.css.map */`]}));let o=i;return o;})();var Vn=o=>({"input-error":o});function Wn(o,i){if(o&1&&(r(0,"my-alert",4),R(1),_()),o&2){let a=c();l(),Y(a.error);}}function Hn(o,i){if(o&1&&(r(0,"div",12),R(1),_()),o&2){let a=c();
8l(),Y(a.formErrors["display-name"]);}}function Bn(o,i){if(o&1&&(r(0,"div",12),R(1),_()),o&2){let a=c();l(),Y(a.formErrors.description);}}var jo=(()=>{let i=class i extends ae{formReactiveService=C(J);notifier=C(h);userService=C(L);user=Ee();error=null;ngOnInit(){this.buildForm({username:null,"display-name":To,description:uo}),this.form.controls.username.disable(),this.form.patchValue({username:this.user().username,"display-name":this.user().account.displayName,description:this.user().account.description});}get instanceHost(){return window.location.host;}updateMyProfile(){let t=this.form.value["display-name"],e=this.form.value.description||null;this.error=null,this.userService.updateMyProfile({displayName:t,description:e}).subscribe({next:()=>{this.user.update(n=>(n.account.displayName=t,n.account.description=e,n)),this.notifier.success("Profile updated.");},error:n=>this.error=n.message});}};M(i,"\u0275fac",(()=>{let t;return function(n){return(t||(t=oe(i)))(n||i);};})()),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-profile"]],inputs:{user:[1,"user"]},outputs:{user:"userChange"},features:[ne],decls:20,vars:11,consts:()=>{let t;t="Save profile";let e;e="Username";let n;n=" People can find you using @"+"\uFFFD0\uFFFD"+"@"+"\uFFFD1\uFFFD"+" ";let d;d="Display name";let p;return p="Description",[e,n,d,p,["type","danger"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","username"],["type","text","id","username","formControlName","username","readonly","",1,"form-control"],[1,"form-group-description"],["for","display-name"],["type","text","id","display-name","formControlName","display-name",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","description"],["helpType","markdownText","supportRelMe","true"],["inputId","description","formControlName","description","markdownType","enhanced","withEmoji","true","withHtml","true",3,"formError"],["type","submit","value",t,1,"mt-3","peertube-button","primary-button",3,"disabled"]];},template:function(e,n){e&1&&(m(0,Wn,2,1,"my-alert",4),r(1,"form",5),E("ngSubmit",function(){return n.updateMyProfile();}),r(2,"div",6)(3,"label",7),s(4,0),_(),u(5,"input",8),r(6,"div",9),s(7,1),_()(),r(8,"div",6)(9,"label",10),s(10,2),_(),u(11,"input",11),m(12,Hn,2,1,"div",12),_(),r(13,"div",6)(14,"label",13),s(15,3),_(),u(16,"my-help",14)(17,"my-markdown-textarea",15),m(18,Bn,2,1,"div",12),_(),u(19,"input",16),_()),e&2&&(N(n.error?0:-1),l(),T("formGroup",n.form),l(6),W(n.user().username)(n.instanceHost),H(7),l(4),T("ngClass",We(9,Vn,n.formErrors["display-name"])),l(),N(n.formErrors["display-name"]?12:-1),l(5),T("formError",n.formErrors.description),l(),N(n.formErrors.description?18:-1),l(),T("disabled",!n.form.valid));},dependencies:[x,q,qe,G,B,Z,j,Q,He,K,_o,No],styles:[`input#username[_ngcontent-%COMP%] + .muted[_ngcontent-%COMP%]{margin-top:5px}input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:340px;max-width:340px;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}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:380px){input[type=text][_ngcontent-%COMP%]{width:100%}}textarea[_ngcontent-%COMP%]{display:block;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:150px;padding:var(--textarea-y-padding) var(--textarea-x-padding)}
9/*# sourceMappingURL=my-account-profile.component-C4RNDRUW.css.map */`]}));let o=i;return o;})();var qn=()=>["/my-account/two-factor-auth"];function Qn(o,i){o&1&&(r(0,"p"),s(1,0),_(),r(2,"my-button",5),s(3,1),_()),o&2&&(l(2),T("ptRouterLink",yt(1,qn)));}function jn(o,i){if(o&1){let a=I();r(0,"my-button",6),E("click",function(){f(a);let e=c();return g(e.disableTwoFactor());}),s(1,2),_();}}var Zo=(()=>{let i=class i{notifier=C(h);twoFactorService=C(ge);confirmService=C(fe);auth=C($);user=ie(void 0);twoFactorEnabled=!1;ngOnInit(){this.twoFactorEnabled=this.user().twoFactorEnabled;}disableTwoFactor(){return me(this,null,function*(){let t="Are you sure you want to disable two factor authentication of your account?",{confirmed:e,password:n}=yield this.confirmService.confirmWithPassword({message:t,title:"Disable two factor"});e!==!1&&this.twoFactorService.disableTwoFactor({userId:this.user().id,currentPassword:n}).subscribe({next:()=>{this.twoFactorEnabled=!1,this.auth.refreshUserInformation(),this.notifier.success("Two factor authentication disabled");},error:d=>this.notifier.handleError(d)});});}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-two-factor-button"]],inputs:{user:[1,"user"]},decls:3,vars:2,consts:()=>{let t;t="Two factor authentication adds an additional layer of security to your account by requiring a numeric code from another device (most commonly mobile phones) when you log in.";let e;e="Enable two-factor authentication";let n;return n="Disable two-factor authentication",[t,e,n,[1,"two-factor"],["theme","primary"],["theme","primary",3,"ptRouterLink"],["theme","primary",3,"click"]];},template:function(e,n){e&1&&(r(0,"div",3),m(1,Qn,4,2),m(2,jn,2,0,"my-button",4),_()),e&2&&(l(),N(n.twoFactorEnabled?-1:1),l(),N(n.twoFactorEnabled?2:-1));},dependencies:[to],encapsulation:2}));let o=i;return o;})();function Zn(o,i){if(o&1){let a=I();r(0,"my-actor-avatar-edit",24),E("avatarChange",function(e){f(a);let n=c();return g(n.onAvatarChange(e));})("avatarDelete",function(){f(a);let e=c();return g(e.onAvatarDelete());}),_();}if(o&2){let a=c();T("avatars",a.user.account.avatars)("displayName",a.user.account.displayName)("username",a.user.username)("subscribers",a.user.account.followersCount);}}function Jn(o,i){o&1&&(r(0,"div",17)(1,"div",13)(2,"h2"),s(3,9),_()(),r(4,"div",14),u(5,"my-account-change-password"),_()());}function Kn(o,i){if(o&1&&(r(0,"div",17)(1,"div",13)(2,"h2"),s(3,10),_()(),r(4,"div",14),u(5,"my-account-two-factor-button",16),_()()),o&2){let a=c();l(5),T("user",a.user);}}function ei(o,i){o&1&&u(0,"my-account-change-email");}var Jo=(()=>{let i=class i{viewportScroller=C(Yt);userService=C(L);authService=C($);notifier=C(h);user;lastScrollHash;get userInformationLoaded(){return this.authService.userInformationLoaded;}ngOnInit(){this.user=this.authService.getUser();}ngAfterViewChecked(){window.location.hash&&window.location.hash!==this.lastScrollHash&&(this.viewportScroller.scrollToAnchor(window.location.hash.replace("#","")),this.lastScrollHash=window.location.hash);}onAvatarChange(t){this.userService.changeAvatar(t).subscribe({next:e=>{this.notifier.success("Avatar changed."),this.user.updateAccountAvatar(e.avatars),this.user.account=at(this.user.account);},error:e=>je({err:e,name:"avatar",notifier:this.notifier})});}onAvatarDelete(){this.userService.deleteAvatar().subscribe({next:()=>{this.notifier.success("Avatar deleted."),this.user.updateAccountAvatar(),this.user.account=at(this.user.account);},error:t=>this.notifier.error(t.message)});}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-settings"]],decls:54,vars:13,consts:()=>{let t;t="Settings";let e;e="PROFILE SETTINGS";let n;n="INTERFACE";let d;d="VIDEO SETTINGS";let p;p="NOTIFICATIONS";let O;O="ACCOUNT SESSIONS";let U;U="These are the devices currently logged in to your account.";let F;F="EMAIL";let y;y="DANGER ZONE";let z;z="PASSWORD";let v;return v="TWO-FACTOR AUTHENTICATION",[t,e,n,d,p,O,U,F,y,z,v,[1,"visually-hidden"],[1,"pt-two-cols","mt-3"],[1,"title-col"],[1,"content-col"],["actorType","account",1,"d-block","mb-3",3,"avatars","displayName","username","subscribers"],[3,"user"],[1,"pt-two-cols","mt-5"],["id","interface-settings",1,"anchor"],[3,"user","userInformationLoaded"],["id","video-settings",1,"anchor"],["id","notifications",1,"anchor"],[1,"d-block","mb-5",3,"user"],[1,"pt-title-danger"],["actorType","account",1,"d-block","mb-3",3,"avatarChange","avatarDelete","avatars","displayName","username","subscribers"]];},template:function(e,n){e&1&&(r(0,"h1",11),s(1,0),_(),r(2,"div",12)(3,"div",13)(4,"h2"),s(5,1),_()(),r(6,"div",14),m(7,Zn,1,4,"my-actor-avatar-edit",15),u(8,"my-user-quota")(9,"my-account-profile",16),_()(),r(10,"div",17)(11,"div",13),u(12,"div",18),r(13,"h2"),s(14,2),_()(),r(15,"div",14),u(16,"my-user-interface-settings",19),_()(),r(17,"div",17)(18,"div",13),u(19,"div",20),r(20,"h2"),s(21,3),_()(),r(22,"div",14),u(23,"my-user-video-settings",19),_()(),r(24,"div",17)(25,"div",13),u(26,"div",21),r(27,"h2"),s(28,4),_()(),r(29,"div",14),u(30,"my-account-notification-preferences",16),_()(),m(31,Jn,6,0,"div",17),m(32,Kn,6,1,"div",17),r(33,"div",17)(34,"div",13)(35,"h2"),s(36,5),_()(),r(37,"div",14)(38,"p"),s(39,6),_(),u(40,"my-account-token-sessions",16),_()(),r(41,"div",17)(42,"div",13)(43,"h2"),s(44,7),_()(),r(45,"div",14),u(46,"my-account-email-preferences",22),m(47,ei,1,0,"my-account-change-email"),_()(),r(48,"div",17)(49,"div",13)(50,"h2",23),s(51,8),_()(),r(52,"div",14),u(53,"my-account-danger-zone",16),_()()),e&2&&(l(7),N(n.user!=null&&n.user.account?7:-1),l(2),T("user",n.user),l(7),T("user",n.user)("userInformationLoaded",n.userInformationLoaded),l(7),T("user",n.user)("userInformationLoaded",n.userInformationLoaded),l(7),T("user",n.user),l(),N(n.user.pluginAuth===null?31:-1),l(),N(n.user.pluginAuth===null?32:-1),l(8),T("user",n.user),l(6),T("user",n.user),l(),N(n.user.pluginAuth===null?47:-1),l(6),T("user",n.user));},dependencies:[Uo,$o,jo,io,ao,Qo,Ho,Zo,qo,Wo,Bo,Ro],styles:[`.content-col[_ngcontent-%COMP%]{max-width:800px}
10/*# sourceMappingURL=my-account-settings.component-ARBYZFVY.css.map */`]}));let o=i;return o;})();function ti(o,i){o&1&&(r(0,"div",7),s(1,0),_());}function oi(o,i){if(o&1){let a=I();r(0,"form",10),E("ngSubmit",function(){f(a);let e=c(2);return g(e.requestTwoFactor());}),r(1,"label",11),s(2,1),_(),r(3,"div",12),s(4,2),_(),u(5,"my-input-text",13)(6,"input",14),_();}if(o&2){let a=c(2);T("formGroup",a.formPassword),l(5),T("formError",a.formErrorsPassword["current-password"]),l(),T("disabled",!a.formPassword.valid);}}function ni(o,i){if(o&1){let a=I();r(0,"p"),s(1,3),_(),u(2,"qrcode",15),r(3,"div"),s(4,4),_(),r(5,"div",16),R(6),_(),r(7,"form",17),E("ngSubmit",function(){f(a);let e=c(2);return g(e.confirmTwoFactor());}),r(8,"label",18),s(9,5),_(),r(10,"div",12),s(11,6),_(),u(12,"my-input-text",19)(13,"input",20),_();}if(o&2){let a=c(2);l(2),T("qrdata",a.twoFactorURI)("width",256),l(4),Y(a.twoFactorSecret),l(),T("formGroup",a.formOTP),l(5),T("show",!0)("formError",a.formErrorsOTP["otp-token"]),l(),T("disabled",!a.formOTP.valid);}}function ii(o,i){if(o&1&&(r(0,"div",8),m(1,oi,7,3,"form",9)(2,ni,14,7),_()),o&2){let a=c();l(),N(a.step==="request"?1:a.step==="confirm"?2:-1);}}var Ko=(()=>{let i=class i{notifier=C(h);twoFactorService=C(ge);formReactiveService=C(J);auth=C($);router=C(Ft);twoFactorAlreadyEnabled;step="request";twoFactorSecret;twoFactorURI;inPasswordStep=!0;formPassword;formErrorsPassword;formOTP;formErrorsOTP;user;requestToken;ngOnInit(){this.buildPasswordForm(),this.buildOTPForm(),this.user=this.auth.getUser(),this.twoFactorAlreadyEnabled=this.user.twoFactorEnabled;}requestTwoFactor(){this.twoFactorService.requestTwoFactor({userId:this.user.id,currentPassword:this.formPassword.value["current-password"]}).subscribe({next:({otpRequest:t})=>{this.requestToken=t.requestToken,this.twoFactorURI=t.uri,this.twoFactorSecret=t.secret.replace(/(.{4})/g,"$1 ").trim(),this.step="confirm";},error:t=>this.notifier.handleError(t)});}confirmTwoFactor(){this.twoFactorService.confirmTwoFactorRequest({userId:this.user.id,requestToken:this.requestToken,otpToken:this.formOTP.value["otp-token"]}).subscribe({next:()=>{this.notifier.success("Two factor authentication has been enabled."),this.auth.refreshUserInformation(),this.router.navigateByUrl("/my-account/settings");},error:t=>this.notifier.handleError(t)});}buildPasswordForm(){let{form:t,formErrors:e}=this.formReactiveService.buildForm({"current-password":et});this.formPassword=t,this.formErrorsPassword=e;}buildOTPForm(){let{form:t,formErrors:e}=this.formReactiveService.buildForm({"otp-token":so});this.formOTP=t,this.formErrorsOTP=e;}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account-two-factor"]],decls:2,vars:2,consts:()=>{let t;t="Two factor authentication is already enabled.";let e;e="Current password";let n;n="Confirm";let d;d="Your password";let p;p="Confirm your password to enable two factor authentication";let O;O="Confirm";let U;U=" Scan this QR code into a TOTP app on your phone. This app will generate tokens that you will have to enter when logging in. ";let F;F="If you can't scan the QR code and need to enter it manually, here is the plain-text secret:";let y;y="Two-factor code";let z;return z="Enter the code generated by your authenticator app to confirm",[t,d,p,U,F,y,z,[1,"root","already-enabled"],[1,"root"],[3,"formGroup"],[3,"ngSubmit","formGroup"],["for","current-password"],[1,"form-group-description"],["formControlName","current-password","inputId","current-password","placeholder",e,"autocomplete","current-password",3,"formError"],["type","submit","value",n,1,"peertube-button","primary-button","mt-3",3,"disabled"],["level","Q",3,"qrdata","width"],[1,"secret-plain-text"],[1,"mt-3",3,"ngSubmit","formGroup"],["for","otp-token"],["formControlName","otp-token","inputId","otp-token","autocomplete","otp-token",3,"show","formError"],["type","submit","value",O,1,"peertube-button","primary-button","mt-3",3,"disabled"]];},template:function(e,n){e&1&&(m(0,ti,2,0,"div",7),m(1,ii,3,1,"div",8)),e&2&&(N(n.twoFactorAlreadyEnabled===!0?0:-1),l(),N(n.twoFactorAlreadyEnabled===!1?1:-1));},dependencies:[x,q,G,B,Z,j,Q,re,wo],styles:[`.root[_ngcontent-%COMP%]{max-width:600px}.secret-plain-text[_ngcontent-%COMP%]{font-family:monospace;font-size:.9rem}qrcode[_ngcontent-%COMP%]{display:inline-block;margin:auto}
11/*# sourceMappingURL=my-account-two-factor.component-6KXOK7Z6.css.map */`]}));let o=i;return o;})();var en=(()=>{let i=class i{pluginService=C(eo);menuEntries=[];user;ngOnInit(){this.pluginService.ensurePluginsAreLoaded("my-account").then(()=>this.buildMenu());}buildMenu(){let t=this.pluginService.getAllRegisteredClientRoutesForParent("/my-account")||{};this.menuEntries=[{label:"Settings",routerLink:"/my-account/settings"},{label:"Notifications",routerLink:"/my-account/notifications"},{label:"Import/Export",routerLink:"/my-account/import-export"},{label:"Applications",routerLink:"/my-account/applications"},{label:"Moderation",routerLink:"/my-account/blocklist/accounts",children:[{label:"Muted accounts",routerLink:"/my-account/blocklist/accounts"},{label:"Muted servers",routerLink:"/my-account/blocklist/servers"},{label:"Abuse reports",routerLink:"/my-account/abuses"}]},...Object.values(t).map(e=>({label:e.menuItem?.label,routerLink:"/my-account/p/"+e.route}))];}};M(i,"\u0275fac",function(e){return new(e||i)();}),M(i,"\u0275cmp",A({type:i,selectors:[["my-account"]],decls:8,vars:1,consts:()=>{let t;t="My account";let e;return e="Skip the sub menu",[["myAccountContent",""],e,[1,"root"],[1,"margin-content"],["href","#my-account-content",1,"visually-hidden-focusable
11","skip-to-content-sub-menu",3,"click"],["h1",t,"h1Icon","cog",3,"menuEntries"],["tabindex","-1","id","my-account-content",1,"margin-content","pb-5","outline-0"]];},template:function(e,n){if(e&1){let d=I();r(0,"div",2)(1,"div",3)(2,"a",4),E("click",function(O){f(d);let U=ht(6);return O.preventDefault(),g(U.focus());}),s(3,1),_(),u(4,"my-horizontal-menu",5),_(),r(5,"div",6,0),u(7,"router-outlet"),_()();}e&2&&(l(4),T("menuEntries",n.menuEntries));},dependencies:[Mo,bt],encapsulation:2}));let o=i;return o;})();var il=[{path:"",component:en,providers:[te,ge,Oo,po,Ao,Po,Eo],resolve:{user:Io},canActivateChild:[Kt],children:[{path:"",redirectTo:"settings",pathMatch:"full"},{path:"settings",component:Jo,data:{meta:{title:"Account settings"}}},{path:"two-factor-auth",component:Ko,data:{meta:{title:"Two factor authentication"}}},{path:"video-channels",redirectTo:"/my-library/video-channels",pathMatch:"full"},{path:"video-playlists",redirectTo:"/my-library/video-playlists",pathMatch:"full"},{path:"video-playlists/create",redirectTo:"/my-library/video-playlists/create",pathMatch:"full"},{path:"video-playlists/:videoPlaylistId",redirectTo:"/my-library/video-playlists/:videoPlaylistId",pathMatch:"full"},{path:"video-playlists/update/:videoPlaylistId",redirectTo:"/my-library/video-playlists/update/:videoPlaylistId",pathMatch:"full"},{path:"videos",redirectTo:"/my-library/videos",pathMatch:"full"},{path:"video-imports",redirectTo:"/my-library/video-imports",pathMatch:"full"},{path:"subscriptions",redirectTo:"/my-library/subscriptions",pathMatch:"full"},{path:"ownership",redirectTo:"/my-library/ownership",pathMatch:"full"},{path:"blocklist/accounts",component:Lo,data:{meta:{title:"Muted accounts"}}},{path:"blocklist/servers",component:Xo,data:{meta:{title:"Muted servers"}}},{path:"history/videos",redirectTo:"/my-library/history/videos",pathMatch:"full"},{path:"notifications",component:Vo,data:{meta:{title:"Notifications"}}},{path:"abuses",component:Go,data:{meta:{title:"My abuse reports"}}}
11,{path:"applications",component:xo,data:{meta:{title:"Applications"}}},{path:"videos/comments",redirectTo:"/my-library/videos/comments"},{path:"import-export",component:ko,canDeactivate:[Zt],data:{meta:{title:"Import/Export"}}},{path:"watched-words/list",redirectTo:"/my-library/watched-words/list",pathMatch:"full"},{path:"auto-tag-policies",redirectTo:"/my-library/auto-tag-policies",pathMatch:"full"},{path:"p",children:[{path:"**",component:ho,data:{parentRoute:"/my-account",pluginScope:"my-account"}}]}]}];export{il as default};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-Y7HAI34L.js.map

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.