1"use strict";(self.webpackChunkPeerTube=self.webpackChunkPeerTube||[]).push([[505],{50505:(Fn,w,s)=>{s.r(w),s.d(w,{MyAccountModule:()=>vn});var x=s(49927),W=s(24058),P=s(74262),q=s(92881),K=s(85283),H=s(65526),m=s(84099),V=s(95498),v=s(83473),h=s(72584),j=s(88318),ee=s(75836),Y=s(49100),ne=s(19019),I=s(19952),C=s(19868),e=s(51197),E=s(15311),te=s(62707);let oe=(()=>{var o;class r{}return(o=r).\u0275fac=function(n){return new(n||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-abuses-list"]],decls:5,vars:0,consts:function(){let _;return _="Reports",[["iconName","flag","aria-hidden","true"],_,["viewType","user"]]},template:function(n,t){1&n&&(e.TgZ(0,"h1"),e._UZ(1,"my-global-icon",0),e.ynx(2),e.SDv(3,1),e.BQk(),e.qZA(),e._UZ(4,"my-abuse-list-table",2))},dependencies:[E.$,te.M],encapsulation:2}),r})();var R=s(80151),N=s(27258),_e=s(20553),U=s(35557);let ie=(()=>{var o;class r{constructor(n,t,i,c,a){this.authService=n,this.scopedTokensService=t,this.videoService=i,this.notifier=c,this.confirmService=a,this.baseURL=_e.N.originServerUrl||window.location.origin}ngOnInit(){this.feedUrl=this.baseURL,this.scopedTokensService.getScopedTokens().subscribe({next:n=>this.regenApplications(n),error:n=>this.notifier.error(n.message)})}renewToken(){var n=this;return(0,R.Z)(function*(){!1!==(yield n.confirmService.confirm("Renewing the token will disallow previously configured clients from retrieving the feed until they use the new token. Proceed?","Renew token"))&&n.scopedTokensService.renewScopedTokens().subscribe({next:i=>{n.regenApplications(i),n.notifier.success("Token renewed. Update your client configuration accordingly.")},error:i=>n.notifier.error(i.message)})})()}regenApplications(n){const t=this.authService.getUser(),i=this.videoService.getVideoSubscriptionFeedUrls(t.account.id,n.feedToken);this.feedUrl=this.baseURL+i.find(c=>c.format===N.E1.RSS).url,this.feedToken=n.feedToken}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(C.e8),e.Y36(C.pI),e.Y36(v.kI),e.Y36(C.d4),e.Y36(C.zM))},o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-applications"]],decls:25,vars:8,consts:function(){let _,n,t,i,c,a,u;return _="Applications",n="SUBSCRIPTION FEED",t=" Use third-party feed aggregators to retrieve the list of videos from channels you subscribed to. ",i="Feed URL",c="Feed Token",a="\u26A0\uFE0F Never share your feed token with anyone.",u="Renew token",[["iconName","codesandbox","aria-hidden","true"],_,[1,"row"],[1,"group","col-12","col-lg-4","col-xl-3"],[1,"applications-title"],n,[1,"applications-description"],t,[1,"col-12","col-lg-8","col-xl-9"],[1,"form-group"],["for","feed-url"],i,[3,"value","withToggle","withCopy","show","readonly"],["for","feed-token"],c,[3,"value","withCopy","readonly"],[1,"form-group-description"],a,[1,"row","mt-4"],[1,"col-md-7","col-xl-5"],[1,"col-md-5","col-xl-5"],["type","submit","value",u,3,"click"]]},template:function(n,t){1&n&&(e.TgZ(0,"h1"),e._UZ(1,"my-global-icon",0),e.ynx(2),e.SDv(3,1),e.BQk(),e.qZA(),e.TgZ(4,"div",2)(5,"div",3)(6,"h2",4),e.SDv(7,5),e.qZA(),e.TgZ(8,"div",6),e.SDv(9,7),e.qZA()(),e.TgZ(10,"div",8)(11,"div",9)(12,"label",10),e.SDv(13,11),e.qZA(),e._UZ(14,"my-input-text",12),e.qZA(),e.TgZ(15,"div",9)(16,"label",13),e.SDv(17,14),e.qZA(),e._UZ(18,"my-input-text",15),e.TgZ(19,"div",16),e.SDv(20,17),e.qZA()()()(),e.TgZ(21,"div",18),e._UZ(22,"div",19),e.TgZ(23,"div",20)(24,"input",21),e.NdJ("click",function(){return t.renewToken()}),e.qZA()()()),2&n&&(e.xp6(14),e.Q6J("value",t.feedUrl)("withToggle",!1)("withCopy",!0)("show",!0)("readonly",!0),e.xp6(4),e.Q6J("value",t.feedToken)("withCopy",!0)("readonly",!0))},dependencies:[U.m,E.$],styles:[".applications-title[_ngcontent-%COMP%]{text-transform:uppercase;color:var(--mainColor);font-weight:700;font-size:1rem;margin-bottom:10px}.form-group[_ngcontent-%COMP%]{max-width:500px}input[type=submit][_ngcontent-%COMP%]{line-height:23px;padding:4px 13px;border:0;font-weight:600;border-radius:3px!important;text-align:center;cursor:pointer;font-size:15px;margin-inline-start:auto;display:flex}input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-inline-end:.25rem;margin-inline-start:.25rem}input[type=submit][_ngcontent-%COMP%]:focus, input[type=submit].focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem var(--mainColorLightest)}input[type=submit][_ngcontent-%COMP%], input[type=submit][_ngcontent-%COMP%]:active, input[type=submit][_ngcontent-%COMP%]:focus{color:#fff;background-color:var(--mainColor)}input[type=submit][_ngcontent-%COMP%]:hover{color:#fff;background-color:var(--mainHoverColor)}input[type=submit][disabled][_ngcontent-%COMP%], input[type=submit].disabled[_ngcontent-%COMP%]{cursor:default;color:#fff;background-color:var(--inputBorderColor)}input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:#fff}input[type=submit][_ngcontent-%COMP%] + .form-error[_ngcontent-%COMP%]{margin-inline-start:.3125rem;display:inline}"]}),r})();var G=s(55397),O=s(89650),Z=s(64806),k=s(32311),D=s(61290),re=s(20532);function ce(o,r){if(1&o){const _=e.EpF();e.TgZ(0,"div",7)(1,"div",8)(2,"my-advanced-input-filter",9),e.NdJ("search",function(t){e.CHM(_);const i=e.oxw();return e.KtG(i.onSearch(t))}),e.qZA()()()}}function ae(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"th",10),e.SDv(2,11),e.qZA(),e.TgZ(3,"th",12),e.SDv(4,13),e.qZA(),e.TgZ(5,"th",14),e.tHW(6,15),e._UZ(7,"p-sortIcon",16),e.N_p(),e.qZA()()),2&o){const _=e.oxw();e.xp6(5),e.Q6J("ngbTooltip",_.sortTooltip)}}function se(o,r){if(1&o){const _=e.EpF();e.TgZ(0,"tr")(1,"td",17)(2,"button",18),e.NdJ("click",function(){const i=e.CHM(_).$implicit,c=e.oxw();return e.KtG(c.unblockAccount(i))}),e.SDv(3,19),e.qZA()(),e.TgZ(4,"td")(5,"a",20)(6,"div",21),e._UZ(7,"my-actor-avatar",22),e.TgZ(8,"div"),e._uU(9),e.TgZ(10,"span",23),e._uU(11),e.qZA()()()()(),e.TgZ(12,"td"),e._uU(13),e.ALo(14,"date"),e.qZA()()}if(2&o){const _=r.$implicit;
1e.xp6(5),e.Q6J("href",_.blockedAccount.url,e.LSH),e.xp6(2),e.Q6J("actor",_.blockedAccount),e.xp6(2),e.hij(" ",_.blockedAccount.displayName," "),e.xp6(2),e.Oqu(_.blockedAccount.nameWithHost),e.xp6(2),e.Oqu(e.xi3(14,5,_.createdAt,"short"))}}function le(o,r){1&o&&(e.ynx(0),e.SDv(1,27),e.BQk())}function Ce(o,r){1&o&&(e.ynx(0),e.SDv(1,28),e.BQk())}function ue(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td",24)(2,"div",25),e.YNc(3,le,2,0,"ng-container",26),e.YNc(4,Ce,2,0,"ng-container",26),e.qZA()()()),2&o){const _=e.oxw();e.xp6(3),e.Q6J("ngIf",_.search),e.xp6(1),e.Q6J("ngIf",!_.search)}}let Te=(()=>{var o;class r extends h.hl{constructor(){super(...arguments),this.mode=h.OI.Account}getIdentifier(){return"MyAccountBlocklistComponent"}}return(o=r).\u0275fac=function(){let _;return function(t){return(_||(_=e.n5z(o)))(t||o)}}(),o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-blocklist"]],features:[e.qOj],decls:9,vars:11,consts:function(){let _,n,t,i,c,a,u,T;return _="Muted accounts",n="Action",t="Account",i="Muted at " + "\ufffd#7\ufffd" + "" + "\ufffd/#7\ufffd" + "",c="Unmute",a="Open account in a new tab",u="No account found matching current filters.",T="No account found.",[["iconName","user-x","aria-hidden","true"],_,[3,"value","lazy","paginator","totalRecords","rows","rowsPerPageOptions","first","sortField","sortOrder","showCurrentPageReport","currentPageReportTemplate","onLazyLoad"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[1,"caption"],[1,"ms-auto"],[3,"search"],["scope","col",2,"width","150px"],n,["scope","col"],t,["scope","col","container","body","pSortableColumn","createdAt",2,"width","150px",3,"ngbTooltip"],i,["field","createdAt"],[1,"action-cell"],[1,"unblock-button",3,"click"],c,["title",a,"target","_blank","rel","noopener noreferrer",3,"href"],[1,"chip","two-lines"],["actorType","account","size","32",3,"actor"],[1,"muted"],["myAutoColspan",""],[1,"no-results"],[4,"ngIf"],u,T]},template:function(n,t){1&n&&(e.TgZ(0,"h1"),e._UZ(1,"my-global-icon",0),e.ynx(2),e.SDv(3,1),e.BQk(),e.qZA(),e.TgZ(4,"p-table",2),e.NdJ("onLazyLoad",function(c){return t.loadLazy(c)}),e.YNc(5,ce,3,0,"ng-template",3),e.YNc(6,ae,8,1,"ng-template",4),e.YNc(7,se,15,8,"ng-template",5),e.YNc(8,ue,5,2,"ng-template",6),e.qZA()),2&n&&(e.xp6(4),e.Q6J("value",t.blockedAccounts)("lazy",!0)("paginator",t.totalRecords>0)("totalRecords",t.totalRecords)("rows",t.rowsPerPage)("rowsPerPageOptions",t.rowsPerPageOptions)("first",t.pagination.start)("sortField",t.sort.field)("sortOrder",t.sort.order)("showCurrentPageReport",!0)("currentPageReportTemplate",t.getPaginationTemplate()))},dependencies:[G.jx,P.iA,P.lQ,P.fz,O.O5,Z._L,k.A,D.F,E.$,re.b,O.uU],encapsulation:2}),r})();var de=s(66196);function Me(o,r){if(1&o){const _=e.EpF();e.TgZ(0,"div",9)(1,"div",10)(2,"button",11),e.NdJ("click",function(){e.CHM(_);const t=e.oxw();return e.KtG(t.addServersToBlock())})("key.enter",function(){e.CHM(_);const t=e.oxw();return e.KtG(t.addServersToBlock())}),e._UZ(3,"my-global-icon",12),e.ynx(4),e.SDv(5,13),e.BQk(),e.qZA()(),e.TgZ(6,"div",14)(7,"my-advanced-input-filter",15),e.NdJ("search",function(t){e.CHM(_);const i=e.oxw();return e.KtG(i.onSearch(t))}),e.qZA()()()}}function ge(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"th",16),e.SDv(2,17),e.qZA(),e.TgZ(3,"th",18),e.SDv(4,19),e.qZA(),e.TgZ(5,"th",20),e.tHW(6,21),e._UZ(7,"p-sortIcon",22),e.N_p(),e.qZA()()),2&o){const _=e.oxw();e.xp6(5),e.Q6J("ngbTooltip",_.sortTooltip)}}function Oe(o,r){if(1&o){const _=e.EpF();e.TgZ(0,"tr")(1,"td",23)(2,"button",24),e.NdJ("click",function(){const i=e.CHM(_).$implicit,c=e.oxw();return e.KtG(c.unblockServer(i))}),e.SDv(3,25),e.qZA()(),e.TgZ(4,"td")(5,"a",26),e._uU(6),e._UZ(7,"my-global-icon",27),e.qZA()(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"date"),e.qZA()()}if(2&o){const _=r.$implicit;e.xp6(5),e.Q6J("href","https://"+_.blockedServer.host,e.LSH),e.xp6(1),e.hij(" ",_.blockedServer.host," "),e.xp6(3),e.Oqu(e.xi3(10,3,_.createdAt,"short"))}}function Ne(o,r){1&o&&(e.ynx(0),e.SDv(1,31),e.BQk())}function Ae(o,r){1&o&&(e.ynx(0),e.SDv(1,32),e.BQk())}function pe(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td",28)(2,"div",29),e.YNc(3,Ne,2,0,"ng-container",30),e.YNc(4,Ae,2,0,"ng-container",30),e.qZA()()()),2&o){const _=e.oxw();e.xp6(3),e.Q6J("ngIf",_.search),e.xp6(1),e.Q6J("ngIf",!_.search)}}let me=(()=>{var o;class r extends h.DJ{constructor(){super(...arguments),this.mode=h.OI.Account}getIdentifier(){return"MyAccountServerBlocklistComponent"}}return(o=r).\u0275fac=function(){let _;return function(t){return(_||(_=e.n5z(o)))(t||o)}}(),o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-server-blocklist"]],features:[e.qOj],decls:11,vars:12,consts:function(){let _,n,t,i,c,a,u,T,M,d;return _="Muted servers",n="Mute domains",t="Mute domain",i="Action",c="Instance",a="Muted at " + "\ufffd#7\ufffd" + "" + "\ufffd/#7\ufffd" + "",u="Unmute",T="Open instance in a new tab",M="No server found matching current filters.",d="No server found.",[["iconName","peertube-x","aria-hidden","true"],_,[3,"value","paginator","totalRecords","rows","rowsPerPageOptions","first","sortField","
1sortOrder","lazy","lazyLoadOnInit","showCurrentPageReport","currentPageReportTemplate","onLazyLoad"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["action",n,3,"domains"],["batchDomainsModal",""],[1,"caption"],[1,"left-buttons"],[1,"peertube-create-button",3,"click","key.enter"],["iconName","add","aria-hidden","true"],t,[1,"ms-auto"],[3,"search"],["scope","col",2,"width","150px"],i,["scope","col"],c,["scope","col","container","body","pSortableColumn","createdAt",2,"width","150px",3,"ngbTooltip"],a,["field","createdAt"],[1,"action-cell"],[1,"unblock-button",3,"click"],u,["title",T,"target","_blank","rel","noopener noreferrer",3,"href"],["iconName","external-link"],["myAutoColspan",""],[1,"no-results"],[4,"ngIf"],M,d]},template:function(n,t){1&n&&(e.TgZ(0,"h1"),e._UZ(1,"my-global-icon",0),e.ynx(2),e.SDv(3,1),e.BQk(),e.qZA(),e.TgZ(4,"p-table",2),e.NdJ("onLazyLoad",function(c){return t.loadLazy(c)}),e.YNc(5,Me,8,0,"ng-template",3),e.YNc(6,ge,8,1,"ng-template",4),e.YNc(7,Oe,11,6,"ng-template",5),e.YNc(8,pe,5,2,"ng-template",6),e.qZA(),e.TgZ(9,"my-batch-domains-modal",7,8),e.NdJ("domains",function(c){return t.onDomainsToBlock(c)}),e.qZA()),2&n&&(e.xp6(4),e.Q6J("value",t.blockedServers)("paginator",t.totalRecords>0)("totalRecords",t.totalRecords)("rows",t.rowsPerPage)("rowsPerPageOptions",t.rowsPerPageOptions)("first",t.pagination.start)("sortField",t.sort.field)("sortOrder",t.sort.order)("lazy",!0)("lazyLoadOnInit",!1)("showCurrentPageReport",!0)("currentPageReportTemplate",t.getPaginationTemplate()))},dependencies:[G.jx,P.iA,P.lQ,P.fz,O.O5,Z._L,k.A,D.F,de.F,E.$,O.uU],styles:[".moderation-expanded[_ngcontent-%COMP%]{font-size:90%;display:flex;flex-wrap:wrap;justify-content:space-between}.moderation-expanded[_ngcontent-%COMP%] .moderation-expanded-label[_ngcontent-%COMP%]{margin-inline-end:.3125rem;font-weight:600;display:inline-block;vertical-align:top;text-align:end;min-width:100px}.moderation-expanded[_ngcontent-%COMP%] .moderation-expanded-text[_ngcontent-%COMP%]{display:inline-flex;word-wrap:break-word}.moderation-expanded[_ngcontent-%COMP%] .moderation-expanded-text[_ngcontent-%COMP%] p:last-child{margin-bottom:0!important}.moderation-expanded[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{width:50%;max-width:500px}@media screen and (max-width: 960px){.moderation-expanded[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{width:100%}}my-action-dropdown.show[_ngcontent-%COMP%] .dropdown-root{display:block!important}.table-comment-link[_ngcontent-%COMP%], .table-account-link[_ngcontent-%COMP%]{color:var(--mainForegroundColor)}.table-comment-link[_ngcontent-%COMP%]:focus:not(.focus-visible), .table-account-link[_ngcontent-%COMP%]:focus:not(.focus-visible){outline:none!important}.table-comment-link[_ngcontent-%COMP%] p:last-child, .table-account-link[_ngcontent-%COMP%] p:last-child{margin:0}.table-account-link[_ngcontent-%COMP%]{display:flex;flex-direction:column}my-abuse-details[_ngcontent-%COMP%]{width:100%}@media screen and (max-width: 960px){.abuse-messages[_ngcontent-%COMP%]{justify-content:flex-start!important}}","a[_ngcontent-%COMP%]{display:inline-block}a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:focus, a[_ngcontent-%COMP%]:active{text-decoration:none!important}a[_ngcontent-%COMP%]:focus:not(.focus-visible){outline:none!important}a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover{color:var(--mainForegroundColor)}a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:80%;color:var(--inputPlaceholderColor)}.unblock-button[_ngcontent-%COMP%]{line-height:23px;padding:4px 13px;border:0;font-weight:600;border-radius:3px!important;text-align:center;cursor:pointer;font-size:15px;background-color:var(--greyBackgroundColor);color:var(--greyForegroundColor)}.unblock-button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-inline-end:.25rem;margin-inline-start:.25rem}.unblock-button[_ngcontent-%COMP%]:focus, .unblock-button.focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem #5858580d}.unblock-button[_ngcontent-%COMP%]:hover, .unblock-button[_ngcontent-%COMP%]:active, .unblock-button[_ngcontent-%COMP%]:focus, .unblock-button[disabled][_ngcontent-%COMP%], .unblock-button.disabled[_ngcontent-%COMP%]{color:var(--greyForegroundColor);
1background-color:var(--greySecondaryBackgroundColor)}.unblock-button[disabled][_ngcontent-%COMP%], .unblock-button.disabled[_ngcontent-%COMP%]{cursor:default}.unblock-button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, .unblock-button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, .unblock-button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:var(--greyForegroundColor)}"]}),r})();var l=s(70997),fe=s(17265);const Se=["userNotification"];function Pe(o,r){1&o&&(e.ynx(0),e._UZ(1,"my-global-icon",17),e.TgZ(2,"span"),e.SDv(3,18),e.qZA(),e.BQk())}function Ee(o,r){1&o&&(e.ynx(0),e._UZ(1,"my-global-icon",19),e.TgZ(2,"span"),e.SDv(3,20),e.qZA(),e.BQk())}let he=(()=>{var o;class r{constructor(){this._notificationSortType="createdAt"}get notificationSortType(){return this.hasUnreadNotifications()?this._notificationSortType:"createdAt"}set notificationSortType(n){this._notificationSortType=n}markAllAsRead(){this.userNotification.markAllAsRead()}hasUnreadNotifications(){return 0!==this.userNotification.notifications.filter(n=>!1===n.read).length}onChangeSortColumn(){this.userNotification.changeSortColumn(this.notificationSortType)}}return(o=r).\u0275fac=function(n){return new(n||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["ng-component"]],viewQuery:function(n,t){if(1&n&&e.Gf(Se,7),2&n){let i;e.iGM(i=e.CRH())&&(t.userNotification=i.first)}},decls:20,vars:5,consts:function(){let _,n,t,i,c,a,u;return _="Notifications",n="Notification preferences",t="Sort by",i="Newest first",c="Unread first",a="Mark all as read",u="All read",[[1,"visually-hidden"],_,[1,"header"],["routerLink","/my-account/settings","fragment","notifications",1,"peertube-button-link","grey-button"],["iconName","cog","aria-hidden","true"],n,[1,"peertube-select-container","peertube-select-button","ms-2","me-2"],[1,"form-control",3,"ngModel","ngModelChange"],["value","undefined","disabled",""],t,["value","createdAt"],i,["value","read",3,"disabled"],c,[1,"ms-auto","peertube-button","grey-button",3,"disabled","click"],[4,"ngIf"],["userNotification",""],["iconName","tick","aria-hidden","true"],a,["iconName","circle-tick","aria-hidden","true"],u]},template:function(n,t){1&n&&(e.TgZ(0,"h1",0),e.SDv(1,1),e.qZA(),e.TgZ(2,"div",2)(3,"a",3),e._UZ(4,"my-global-icon",4),e.TgZ(5,"span"),e.SDv(6,5),e.qZA()(),e.TgZ(7,"div",6)(8,"select",7),e.NdJ("ngModelChange",function(c){return t.notificationSortType=c})("ngModelChange",function(){return t.onChangeSortColumn()}),e.TgZ(9,"option",8),e.SDv(10,9),e.qZA(),e.TgZ(11,"option",10),e.SDv(12,11),e.qZA(),e.TgZ(13,"option",12),e.SDv(14,13),e.qZA()()(),e.TgZ(15,"button",14),e.NdJ("click",function(){return t.markAllAsRead()}),e.YNc(16,Pe,4,0,"ng-container",15),e.YNc(17,Ee,4,0,"ng-container",15),e.qZA()(),e._UZ(18,"my-user-notifications",null,16)),2&n&&(e.xp6(8),e.Q6J("ngModel",t.notificationSortType),e.xp6(5),e.Q6J("disabled",!t.hasUnreadNotifications()),e.xp6(2),e.Q6J("disabled",!t.hasUnreadNotifications()),e.xp6(1),e.Q6J("ngIf",t.hasUnreadNotifications()),e.xp6(1),e.Q6J("ngIf",!t.hasUnreadNotifications()))},dependencies:[I.rH,O.O5,l.YN,l.Kr,l.EJ,l.JJ,l.On,fe.c,E.$],styles:['.header[_ngcontent-%COMP%]{display:flex;margin-bottom:1.25rem}.header[_ngcontent-%COMP%] a[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%]{margin-inline-end:.1875rem;position:relative;width:18px;top:-1px}.header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%]{margin-inline-end:.1875rem;position:relative;width:20px;top:-1px}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%]{padding:0;margin:0;width:auto;border-radius:3px;color:var(--inputForegroundColor);background:var(--inputBackgroundColor);position:relative;height:-webkit-min-content;height:min-content}.header[_ngcontent-%COMP%] .peertube-select-container.disabled[_ngcontent-%COMP%]{background-color:#e5e5e5}.header[_ngcontent-%COMP%] .peertube-select-container.disabled[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{cursor:default}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%] select[disabled][_ngcontent-%COMP%]{background-color:#f9f9f9}@media screen and (max-width: auto){.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%]{width:100%}}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%]:after{top:50%;right:calc(0% + 15px);content:" ";height:0;width:0;position:absolute;pointer-events:none;border:5px solid rgba(0,0,0,0);border-top-color:var(--mainForegroundColor);margin-top:-2px;z-index:100}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{line-height:23px;font-size:15px;padding:3px 35px 3px 12px;position:relative;border:1px solid var(--inputBorderColor);background:transparent none;-webkit-appearance:none;appearance:none;text-overflow:ellipsis;color:var(--mainForegroundColor)}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{color:#000}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%] option[value=undefined][_ngcontent-%COMP%]{font-weight:600}.header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%]{background-color:var(--greyBackgroun
1dColor);color:var(--greyForegroundColor)}.header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%]:focus, .header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button.focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem #5858580d}.header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%]:hover, .header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%]:active, .header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%]:focus, .header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[disabled][_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button.disabled[_ngcontent-%COMP%]{color:var(--greyForegroundColor);background-color:var(--greySecondaryBackgroundColor)}.header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[disabled][_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button.disabled[_ngcontent-%COMP%]{cursor:default}.header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, .header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, .header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:var(--greyForegroundColor)}.header[_ngcontent-%COMP%] .peertube-select-container.peertube-select-button[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{font-weight:600;color:var(--greyForegroundColor);border:0;padding:4px 35px 4px 12px}@media screen and (max-width: 500px){.header[_ngcontent-%COMP%]{flex-direction:column}.header[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child, .header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%]{margin-bottom:15px}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%]{margin-inline-start:0!important}}@media screen and (min-width: 500px) and (max-width: 800px){.header[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:0;padding:0 13px}.header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%]{width:auto!important}}@media screen and (min-width: 500px) and (max-width: 1040px){.main-col:not(.expanded)[_nghost-%COMP%] .header[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .main-col:not(.expanded) [_nghost-%COMP%] .header[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:0;padding:0 13px}.main-col:not(.expanded)[_nghost-%COMP%] .header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%], .main-col:not(.expanded) [_nghost-%COMP%] .header[_ngcontent-%COMP%] .peertube-select-container[_ngcontent-%COMP%]{width:auto!important}}']}),r})();var Ie=s(5914),$=s(20961),ye=s(456),Ue=s(93379),be=s(64123),ve=s(19566),Ye=s(37574),f=s(85036);function Re(o,r){if(1&o&&(e.TgZ(0,"div",8),e._uU(1),e.qZA()),2&o){const _=e.oxw();e.xp6(1),e.Oqu(_.error)}}let $e=(()=>{var o;class r extends m.OI{constructor(n,t,i,c){super(),this.formReactiveService=n,this.notifier=t,this.authService=i,this.userService=c,this.error=null,this.user=null}ngOnInit(){this.buildForm({"current-password":f.v2,"new-password":f.$T,"new-confirmed-password":f._8}),this.user=this.authService.getUser();const n=this.form.get("new-confirmed-password");n.valueChanges.pipe((0,Ye.h)(t=>t!==this.form.value["new-password"])).subscribe(()=>n.setErrors({matchPassword:!0}))}changePassword(){this.userService.changePassword(this.form.value["current-password"],this.form.value["new-password"]).subscribe({next:()=>{this.notifier.success("Password updated."),this.form.reset(),this.error=null},error:i=>{this.error=i.status!==N.WE.UNAUTHORIZED_401?i.message:"You current password is invalid."}})}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(m.RL),e.Y36(C.d4),e.Y36(C.e8),e.Y36(C.KD))},o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-change-password"]],features:[e.qOj],decls:8,vars:6,consts:function(){let _,n,t,i,c;return _="Change password",n="Current password",t="New password",i="Confirm new password",c="Change password",[["class","alert alert-danger",4,"ngIf"],["role","form",3,"formGroup","ngSubmit"],["for","current-password"],_,["formControlName","current-password","inputId","current-password","placeholder",n,"autocomplete","current-password",3,"formError"],["formControlName","new-password","inputId","new-password","placeholder",t,"autocomplete","new-password",3,"formError"],["formControlName","new-confirmed-password","inputId","new-confirmed-password","placeholder",i,"autocomplete","new-password",3,"formError"],["type","submit","value",c,3,"disabled"],[1,"alert","alert-danger"]]},template:function(n,t){1&n&&(e.YNc(0,Re,2,1,"div",0),e.TgZ(1,"form",1),e.NdJ("ngSubmit",function(){return t.changePassword()}),e.TgZ(2,"label",2),e.SDv(3,3),e.qZA(),e._UZ(4,"my-input-text",4)(5,"my-input-text",5)(6,"my-input-text",6)(7,"input",7),e.qZA()),2&n&&(e.Q6J("ngIf",t.error),e.xp6(1),e.Q6J("formGroup",t.form),e.xp6(3),e.Q6J("formError",t.formErrors["current-password"]),e.xp6(1),e.Q6J("formError",t.formErrors["new-password"]),e.xp6(1),e.Q6J("formError",t.formErrors["new-confirmed-password"]),e.xp6(1),e.Q6J("disabled",!t.form.valid))},dependencies:[O.O5,l._Y,l.JJ,l.JL,l.sg,l.u,U.m],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}input[type=submit][_ngcontent-%COMP%]{line-height:23px;padding:4px 13px;border:0;font-weight:600;border-radius:3px!important;text-align:center;cursor:pointer;font-size:15px;margin-top:15px}input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-inline-end:.25rem;margin-inline-start:.25rem}input[type=submit][_ngcontent-%COMP%]:focus, input[type=submit].focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem var(--mainColorLightest)}input[type=submit][_ngcontent-%COMP%], input[type=submit][_ngcontent-%COMP%]:active, input[type=submit][_ngcontent-%COMP%]:focus{color:#fff;background-color:var(--mainColor)}input[type=submit][_ngcontent-%COMP%]:hover{color:#fff;background-color:var(--mainHoverColor)}input[type=submit][disabled][_ngcontent-%COMP%], input[type=submit].disabled[_ngcontent-%COMP%]{cursor:default;color:#fff;background-color:var(--inputBorderColor)}input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:#fff}"]}),r})();function Le(o,r){if(1&o&&(e.TgZ(0,"div",16),e._uU(1),e.qZA()),2&o){const _=e.oxw();e.xp6(1),e.Oqu(_.error)}}function Fe(o,r){if(1&o&&(e.TgZ(0,"div",17),e._uU(1),e.qZA()),2&o){const _=e.oxw();
1e.xp6(1),e.hij(" ",_.formErrors["display-name"]," ")}}function we(o,r){if(1&o&&(e.TgZ(0,"div",17),e._uU(1),e.qZA()),2&o){const _=e.oxw();e.xp6(1),e.hij(" ",_.formErrors.description," ")}}const z=function(o){return{"input-error":o}};let xe=(()=>{var o;class r extends m.OI{constructor(n,t,i){super(),this.formReactiveService=n,this.notifier=t,this.userService=i,this.user=null,this.error=null}ngOnInit(){this.buildForm({username:null,"display-name":f.bX,description:f.D4}),this.form.controls.username.disable(),this.userInformationLoaded.subscribe(()=>{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(){const n=this.form.value["display-name"],t=this.form.value.description||null;this.error=null,this.userService.updateMyProfile({displayName:n,description:t}).subscribe({next:()=>{this.user.account.displayName=n,this.user.account.description=t,this.notifier.success("Profile updated.")},error:i=>this.error=i.message})}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(m.RL),e.Y36(C.d4),e.Y36(C.KD))},o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-profile"]],inputs:{user:"user",userInformationLoaded:"userInformationLoaded"},features:[e.qOj],decls:19,vars:13,consts:function(){let _,n,t,i,c;return _="Username",n=" People can find you using @" + "\ufffd0\ufffd" + "@" + "\ufffd1\ufffd" + " ",t="Display name",i="Description",c="Save",[["class","alert alert-danger",4,"ngIf"],["role","form",3,"formGroup","ngSubmit"],[1,"form-group"],["for","username"],_,["type","text","id","username","formControlName","username","readonly","",1,"form-control"],[1,"form-group-description"],n,["for","display-name"],t,["type","text","id","display-name","formControlName","display-name",1,"form-control",3,"ngClass"],["class","form-error","role","alert",4,"ngIf"],["for","description"],i,["id","description","formControlName","description",1,"form-control",3,"ngClass"],["type","submit","value",c,3,"disabled"],[1,"alert","alert-danger"],["role","alert",1,"form-error"]]},template:function(n,t){1&n&&(e.YNc(0,Le,2,1,"div",0),e.TgZ(1,"form",1),e.NdJ("ngSubmit",function(){return t.updateMyProfile()}),e.TgZ(2,"div",2)(3,"label",3),e.SDv(4,4),e.qZA(),e._UZ(5,"input",5),e.TgZ(6,"div",6),e.SDv(7,7),e.qZA()(),e.TgZ(8,"div",2)(9,"label",8),e.SDv(10,9),e.qZA(),e._UZ(11,"input",10),e.YNc(12,Fe,2,1,"div",11),e.qZA(),e.TgZ(13,"div",2)(14,"label",12),e.SDv(15,13),e.qZA(),e._UZ(16,"textarea",14),e.YNc(17,we,2,1,"div",11),e.qZA(),e._UZ(18,"input",15),e.qZA()),2&n&&(e.Q6J("ngIf",t.error),e.xp6(1),e.Q6J("formGroup",t.form),e.xp6(6),e.pQV(t.user.username)(t.instanceHost),e.QtT(7),e.xp6(4),e.Q6J("ngClass",e.VKq(9,z,t.formErrors["display-name"])),e.xp6(1),e.Q6J("ngIf",t.formErrors["display-name"]),e.xp6(4),e.Q6J("ngClass",e.VKq(11,z,t.formErrors.description)),e.xp6(1),e.Q6J("ngIf",t.formErrors.description),e.xp6(1),e.Q6J("disabled",!t.form.valid))},dependencies:[O.mk,O.O5,l._Y,l.Fj,l.JJ,l.JL,l.sg,l.u],styles:["input#username[_ngcontent-%COMP%] + .muted[_ngcontent-%COMP%]{margin-top:5px}input[type=text][_ngcontent-%COMP%]{line-height:23px;font-size:15px;padding:3px 15px;display:inline-block;width:340px;max-width:340px;color:var(--inputForegroundColor);background-color:var(--inputBackgroundColor);border:1px solid var(--inputBorderColor);border-radius:3px;display:block}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--inputPlaceholderColor)}input[type=text][readonly][_ngcontent-%COMP%]{opacity:.7}@media screen and (max-width: 380px){input[type=text][_ngcontent-%COMP%]{width:100%}}input[type=submit][_ngcontent-%COMP%]{line-height:23px;padding:4px 13px;border:0;font-weight:600;border-radius:3px!important;text-align:center;cursor:pointer;font-size:15px;margin-top:15px}input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-inline-end:.25rem;margin-inline-start:.25rem}input[type=submit][_ngcontent-%COMP%]:focus, input[type=submit].focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem var(--mainColorLightest)}input[type=submit][_ngcontent-%COMP%], input[type=submit][_ngcontent-%COMP%]:active, input[type=submit][_ngcontent-%COMP%]:focus{color:#fff;background-color:var(--mainColor)}input[type=submit][_ngcontent-%COMP%]:hover{color:#fff;background-color:var(--mainHoverColor)}input[type=submit][disabled][_ngcontent-%COMP%], input[type=submit].disabled[_ngcontent-%COMP%]{cursor:default;color:#fff;background-color:var(--inputBorderColor)}input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:#fff}textarea[_ngcontent-%COMP%]{line-height:23px;font-size:15px;
1display:inline-block;width:100%;color:var(--inputForegroundColor);background-color:var(--inputBackgroundColor);border:1px solid var(--inputBorderColor);border-radius:3px;color:var(--textareaForegroundColor)!important;background-color:var(--textareaBackgroundColor)!important;height:150px;padding:5px 15px;max-width:100%;display:block}textarea[_ngcontent-%COMP%]::placeholder{color:var(--inputPlaceholderColor)}textarea[readonly][_ngcontent-%COMP%]{opacity:.7}@media screen and (max-width: calc(100% + 40px)){textarea[_ngcontent-%COMP%]{width:100%}}"]}),r})();var Ge=s(80928),Ze=s(7218);function ke(o,r){if(1&o&&(e.TgZ(0,"div",13),e._uU(1),e.qZA()),2&o){const _=e.oxw();e.xp6(1),e.Oqu(_.error)}}function De(o,r){if(1&o&&(e.TgZ(0,"div",14),e._uU(1),e.qZA()),2&o){const _=e.oxw();e.xp6(1),e.Oqu(_.success)}}function ze(o,r){if(1&o&&(e.TgZ(0,"div",15),e.tHW(1,16),e._UZ(2,"strong"),e.N_p(),e.qZA()),2&o){const _=e.oxw();e.xp6(2),e.pQV(_.user.pendingEmail),e.QtT(1)}}function Be(o,r){if(1&o&&(e.TgZ(0,"div",17),e._uU(1),e.qZA()),2&o){const _=e.oxw();e.xp6(1),e.hij(" ",_.formErrors["new-email"]," ")}}const Xe=function(o){return{"input-error":o}};let Je=(()=>{var o;class r extends m.OI{constructor(n,t,i,c,a){super(),this.formReactiveService=n,this.authService=t,this.userService=i,this.serverService=c,this.notifier=a,this.error=null,this.success=null,this.user=null}ngOnInit(){this.buildForm({"new-email":f.oo,password:f.$T}),this.user=this.authService.getUser()}changeEmail(){this.error=null,this.success=null;const n=this.form.value.password,t=this.form.value["new-email"];(0,Ge.D)([this.serverService.getConfig(),this.userService.changeEmail(n,t)]).pipe((0,Ze.b)(()=>this.authService.refreshUserInformation())).subscribe({next:([i])=>{this.form.reset(),this.success=i.signup.requiresEmailVerification?"Please check your emails to verify your new email.":"Email updated."},error:i=>{this.error=i.status!==N.WE.UNAUTHORIZED_401?i.message:"You current password is invalid."}})}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(m.RL),e.Y36(C.e8),e.Y36(C.KD),e.Y36(C.NG),e.Y36(C.d4))},o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-change-email"]],features:[e.qOj],decls:15,vars:11,consts:function(){let _,n,t,i,c,a;return _="Change your email",n=" Your current email is " + "\ufffd#9\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#9\ufffd" + ". It is never shown to the public. ",t="New email",i="Current password",c="Change email",a="" + "\ufffd#2\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#2\ufffd" + " is awaiting email verification\n",[["class","alert alert-danger",4,"ngIf"],["class","alert alert-success",4,"ngIf"],["class","pending-email",4,"ngIf"],["role","form",1,"change-email",3,"formGroup","ngSubmit"],[1,"form-group"],["for","new-email"],_,[1,"form-group-description"],n,["type","email","id","new-email","placeholder",t,"formControlName","new-email",1,"form-control",3,"ngClass"],["class","form-error","role","alert",4,"ngIf"],["formControlName","password","id","password","placeholder",i,"autocomplete","current-password",3,"formError"],["type","submit","value",c,3,"disabled"],[1,"alert","alert-danger"],[1,"alert","alert-success"],[1,"pending-email"],a,["role","alert",1,"form-error"]]},template:function(n,t){1&n&&(e.YNc(0,ke,2,1,"div",0),e.YNc(1,De,2,1,"div",1),e.YNc(2,ze,3,1,"div",2),e.TgZ(3,"form",3),e.NdJ("ngSubmit",function(){return t.changeEmail()}),e.TgZ(4,"div",4)(5,"label",5),e.SDv(6,6),e.qZA(),e.TgZ(7,"div",7),e.tHW(8,8),e._UZ(9,"strong"),e.N_p(),e.qZA(),e._UZ(10,"input",9),e.YNc(11,Be,2,1,"div",10),e.qZA(),e.TgZ(12,"div",4),e._UZ(13,"my-input-text",11),e.qZA(),e._UZ(14,"input",12),e.qZA()),2&n&&(e.Q6J("ngIf",t.error),e.xp6(1),e.Q6J("ngIf",t.success),e.xp6(1),e.Q6J("ngIf",t.user.pendingEmail),e.xp6(1),e.Q6J("formGroup",t.form),e.xp6(6),e.pQV(t.user.email),e.QtT(8),e.xp6(1),e.Q6J("ngClass",e.VKq(9,Xe,t.formErrors["new-email"])),e.xp6(1),e.Q6J("ngIf",t.formErrors["new-email"]),e.xp6(2),e.Q6J("formError",t.formErrors.password),e.xp6(1),e.Q6J("disabled",!t.form.valid))},dependencies:[O.mk,O.O5,l._Y,l.Fj,l.JJ,l.JL,l.sg,l.u,U.m],styles:["form[_ngcontent-%COMP%]{max-width:340px}my-input-text[_ngcontent-%COMP%]{display:block;width:100%}input[type=email][_ngcontent-%COMP%]{line-height:23px;font-size:15px;padding:3px 15px;display:inline-block;width:100%;max-width:100%;color:var(--inputForegroundColor);
1background-color:var(--inputBackgroundColor);border:1px solid var(--inputBorderColor);border-radius:3px;display:block}input[type=email][_ngcontent-%COMP%]::placeholder{color:var(--inputPlaceholderColor)}input[type=email][readonly][_ngcontent-%COMP%]{opacity:.7}@media screen and (max-width: calc(100% + 40px)){input[type=email][_ngcontent-%COMP%]{width:100%}}input[type=submit][_ngcontent-%COMP%]{line-height:23px;padding:4px 13px;border:0;font-weight:600;border-radius:3px!important;text-align:center;cursor:pointer;font-size:15px}input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-inline-end:.25rem;margin-inline-start:.25rem}input[type=submit][_ngcontent-%COMP%]:focus, input[type=submit].focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem var(--mainColorLightest)}input[type=submit][_ngcontent-%COMP%], input[type=submit][_ngcontent-%COMP%]:active, input[type=submit][_ngcontent-%COMP%]:focus{color:#fff;background-color:var(--mainColor)}input[type=submit][_ngcontent-%COMP%]:hover{color:#fff;background-color:var(--mainHoverColor)}input[type=submit][disabled][_ngcontent-%COMP%], input[type=submit].disabled[_ngcontent-%COMP%]{cursor:default;color:#fff;background-color:var(--inputBorderColor)}input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, input[type=submit][_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:#fff}.pending-email[_ngcontent-%COMP%]{margin-bottom:15px}"]}),r})();var Qe=s(32818);const We=function(){return["/my-account/two-factor-auth"]};function qe(o,r){1&o&&(e.ynx(0),e.TgZ(1,"p"),e.SDv(2,2),e.qZA(),e.TgZ(3,"my-button",3),e.SDv(4,4),e.qZA(),e.BQk()),2&o&&(e.xp6(3),e.Q6J("ptRouterLink",e.DdM(1,We)))}function Ke(o,r){if(1&o){const _=e.EpF();e.ynx(0),e.TgZ(1,"my-button",5),e.NdJ("click",function(){e.CHM(_);const t=e.oxw();return e.KtG(t.disableTwoFactor())}),e.SDv(2,6),e.qZA(),e.BQk()}}let He=(()=>{var o;class r{constructor(n,t,i,c){this.notifier=n,this.twoFactorService=t,this.confirmService=i,this.auth=c,this.user=null,this.twoFactorEnabled=!1}ngOnInit(){this.userInformationLoaded.subscribe(()=>{this.twoFactorEnabled=this.user.twoFactorEnabled})}disableTwoFactor(){var n=this;return(0,R.Z)(function*(){const t="Are you sure you want to disable two factor authentication of your account?",{confirmed:i,password:c}=yield n.confirmService.confirmWithPassword({message:t,title:"Disable two factor"});!1!==i&&n.twoFactorService.disableTwoFactor({userId:n.user.id,currentPassword:c}).subscribe({next:()=>{n.twoFactorEnabled=!1,n.auth.refreshUserInformation(),n.notifier.success("Two factor authentication disabled")},error:a=>n.notifier.error(a.message)})})()}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(C.d4),e.Y36(Y.Sz),e.Y36(C.zM),e.Y36(C.e8))}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-two-factor-button"]],inputs:{user:"user",userInformationLoaded:"userInformationLoaded"},decls:3,vars:2,consts:function(){let _,n,t;return _="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.",n="Enable two-factor authentication",t="Disable two-factor authentication",[[1,"two-factor"],[4,"ngIf"],_,["className","orange-button-link",3,"ptRouterLink"],n,["className","orange-button",3,"click"],t]},template:function(n,t){1&n&&(e.TgZ(0,"div",0),e.YNc(1,qe,5,2,"ng-container",1),e.YNc(2,Ke,3,0,"ng-container",1),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",!t.twoFactorEnabled),e.xp6(1),e.Q6J("ngIf",t.twoFactorEnabled))},dependencies:[O.O5,Qe.r],encapsulation:2}),r})(),Ve=(()=>{var o;class r{constructor(n,t,i,c,a){this.authService=n,this.notifier=t,this.userService=i,this.confirmService=c,this.redirectService=a,this.user=null}deleteMe(){var n=this;return(0,R.Z)(function*(){!1!==(yield n.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 \"" + n.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",n.user.username,"Delete your account","Delete my account"))&&n.userService.deleteMe().subscribe({next:()=>{n.notifier.success("Your account is deleted."),n.authService.logout(),n.redirectService.redirectToHomepage()},error:i=>n.notifier.error(i.message)})})()}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(C.e8),e.Y36(C.d4),e.Y36(C.KD),e.Y36(C.zM),e.Y36(C.VH))},o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-danger-zone"]],inputs:{user:"user"},decls:5,vars:0,consts:function(){let _,n;return _="Once you delete your account, there is no going back. You will be asked to confirm this action.",n="Delete your account",[[1,"delete-me"],_,[3,"click"],n]},template:function(n,t){1&n&&(e.TgZ(0,"div",0)(1,"p"),e.SDv(2,1),e.qZA(),e.TgZ(3,"button",2),e.NdJ("click",function(){return t.deleteMe()}),e.SDv(4,3),e.qZA()())},styles:[".delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{line-height:23px;padding:4px 13px;border:0;font-weight:600;border-radius:3px!important;text-align:center;cursor:pointer;font-size:15px;background-color:#d56253;color:#fff6f5}.delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-inline-end:.25rem;margin-inline-start:.25rem}.delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus, .delete-me[_ngcontent-%COMP%] button.focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem #d562530d}.delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active, .delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus, .delete-me[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%], .delete-me[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{background-color:#df877c}.delete-me[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%], .delete-me[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{cursor:default}.delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, .delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, .delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:#fff6f5}.delete-me[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus:not(.focus-visible){outline:none!important}"]}),r})();var je=s(76430),en=s(32836);const L=function(){return en.Z.Date.now()};var B=s(62441),on=Math.max,_n=Math.min;var an=s(98931);function sn(o,r){1&o&&(e.TgZ(0,"div"),e.SDv(1,5),e.qZA())}function ln(o,r){if(1&o){const _=e.EpF();e.TgZ(0,"div")(1,"my-input-switch",8),e.NdJ("ngModelChange",function(t){e.CHM(_);const i=e.oxw(2).$implicit,c=e.oxw(3);return e.KtG(c.emailNotifications[i]=t)})("ngModelChange",function(){e.CHM(_);const t=e.oxw(2).$implicit,i=e.oxw(3);
1return e.KtG(i.updateEmailSetting(t,i.emailNotifications[t]))}),e.qZA()()}if(2&o){const _=e.oxw(2).$implicit,n=e.oxw(3);e.xp6(1),e.Q6J("label",n.getEmailLabel(_))("inputName","email-notification-"+_)("ngModel",n.emailNotifications[_])}}function Cn(o,r){if(1&o){const _=e.EpF();e.TgZ(0,"div",7)(1,"div"),e._uU(2),e.qZA(),e.TgZ(3,"div")(4,"my-input-switch",8),e.NdJ("ngModelChange",function(t){e.CHM(_);const i=e.oxw().$implicit,c=e.oxw(3);return e.KtG(c.webNotifications[i]=t)})("ngModelChange",function(){e.CHM(_);const t=e.oxw().$implicit,i=e.oxw(3);return e.KtG(i.updateWebSetting(t,i.webNotifications[t]))}),e.qZA()(),e.YNc(5,ln,2,3,"div",0),e.qZA()}if(2&o){const _=e.oxw().$implicit,n=e.oxw(3);e.xp6(2),e.Oqu(n.labelNotifications[_]),e.xp6(2),e.Q6J("label",n.getWebLabel(_))("inputName","web-notification-"+_)("ngModel",n.webNotifications[_]),e.xp6(1),e.Q6J("ngIf",n.emailEnabled)}}function un(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Cn,6,5,"div",6),e.BQk()),2&o){const _=r.$implicit,n=e.oxw(3);e.xp6(1),e.Q6J("ngIf",n.hasUserRight(_))}}function Tn(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"div",2)(2,"div"),e.SDv(3,3),e.qZA(),e.TgZ(4,"div"),e.SDv(5,4),e.qZA(),e.YNc(6,sn,2,0,"div",0),e.qZA(),e.YNc(7,un,2,1,"ng-container",1),e.BQk()),2&o){const _=r.$implicit,n=e.oxw(2);e.xp6(3),e.pQV(_.label),e.QtT(3),e.xp6(3),e.Q6J("ngIf",n.emailEnabled),e.xp6(1),e.Q6J("ngForOf",_.keys)}}function dn(o,r){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,Tn,8,3,"ng-container",1),e.qZA()),2&o){const _=e.oxw();e.xp6(1),e.Q6J("ngForOf",_.notificationSettingGroups)}}let Mn=(()=>{var o;class r{constructor(n,t,i){this.userNotificationService=n,this.serverService=t,this.notifier=i,this.notificationSettingGroups=[],this.emailNotifications={},this.webNotifications={},this.labelNotifications={},this.rightNotifications={},this.emailEnabled=!1,this.savePreferences=function rn(o,r,_){var n,t,i,c,a,u,T=0,M=!1,d=!1,A=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(g){var S=n,y=t;return n=t=void 0,T=g,c=o.apply(y,S)}function X(g){var S=g-u;return void 0===u||S>=r||S<0||d&&g-T>=i}function b(){var g=L();if(X(g))return J(g);a=setTimeout(b,function Rn(g){var Q=r-(g-u);return d?_n(Q,i-(g-T)):Q}(g))}function J(g){return a=void 0,A&&n?p(g):(n=t=void 0,c)}function F(){var g=L(),S=X(g);if(n=arguments,t=this,u=g,S){if(void 0===a)return function Yn(g){return T=g,a=setTimeout(b,r),M?p(g):c}(u);if(d)return clearTimeout(a),a=setTimeout(b,r),p(u)}return void 0===a&&(a=setTimeout(b,r)),c}return r=(0,B.Z)(r)||0,(0,je.Z)(_)&&(M=!!_.leading,i=(d="maxWait"in _)?on((0,B.Z)(_.maxWait)||0,r):i,A="trailing"in _?!!_.trailing:A),F.cancel=function $n(){void 0!==a&&clearTimeout(a),T=0,n=u=t=a=void 0},F.flush=function Ln(){return void 0===a?c:J(L())},F}(this.savePreferencesImpl.bind(this),500),this.labelNotifications={newVideoFromSubscription:"New video 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 your instance",newFollow:"You or one of your channels has a new follower",commentMention:"Someone mentioned you in video comments",newInstanceFollower:"Your instance has a new follower",autoInstanceFollowing:"Your instance automatically followed another instance",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:"Video studio edition has finished"},this.notificationSettingGroups=[{label:"Social",keys:["newVideoFromSubscription","newFollow","commentMention"]},{label:"Your videos",keys:["newCommentOnMyVideo","blacklistOnMyVideo","myVideoPublished","myVideoImportFinished","myVideoStudioEditionFinished"]},{label:"Moderation",keys:["abuseStateChange","abuseNewMessage","abuseAsModerator","videoAutoBlacklistAsModerator"]},{label:"Administration",keys:["newUserRegistration","newInstanceFollower","autoInstanceFollowing","newPeerTubeVersion","newPluginVersion"]}],this.rightNotifications={abuseAsModerator:N.Lu.MANAGE_ABUSES,videoAutoBlacklistAsModerator:N.Lu.MANAGE_VIDEO_BLACKLIST,newUserRegistration:N.Lu.MANAGE_USERS,newInstanceFollower:N.Lu.MANAGE_SERVER_FOLLOW,autoInstanceFollowing:N.Lu.MANAGE_CONFIGURATION,newPeerTubeVersion:N.Lu.MANAGE_DEBUG,newPluginVersion:N.Lu.MANAGE_DEBUG}}ngOnInit(){const n=this.serverService.getHTMLConfig();this.emailEnabled=n.email.enabled,this.userInformationLoaded.subscribe(()=>this.loadNotificationSettings())}hasUserRight(n){const t=this.rightNotifications[n];return!t||this.user.hasRight(t)}getWebLabel(n){return`Toggle web notification for "${this.labelNotifications[n]}"`}getEmailLabel(n){return`Toggle email notification for "${this.labelNotifications[n]}"`}updateEmailSetting(n,t){!0===t?this.user.notificationSettings[n]|=N.U7.EMAIL:this.user.notificationSettings[n]&=~N.U7.EMAIL,this.savePreferences()}updateWebSetting(n,t){!0===t?this.user.notificationSettings[n]|=N.U7.WEB:this.user.notificationSettings[n]&=~N.U7.WEB,this.savePreferences()}savePreferencesImpl(){this.userNotificationService.updateNotificationSettings(this.user.notificationSettings).subscribe({next:()=>{this.notifier.success("Preferences saved",void 0,2e3)},error:n=>this.notifier.error(n.message)})}loadNotificationSettings(){for(const n of(0,$.eJ)(this.user.notificationSettings)){const t=this.user.notificationSettings[n];this.emailNotifications[n]=!!(t&N.U7.EMAIL),this.webNotifications[n]=!!(t&N.U7.WEB)}}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(v.wU),e.Y36(C.NG),e.Y36(C.d4))}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-notification-preferences"]],inputs:{user:"user",userInformationLoaded:"userInformationLoaded"},decls:1,vars:1,consts:function(){let _,n,t;return _="" + "\ufffd0\ufffd" + "",n="Web",t="Email",[[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"header","notification-row"],_,n,t,["class","small notification-row",4,"ngIf"],[1,"small","notification-row"],[3,"label","inputName","ngModel","ngModelChange"]]},template:function(n,t){1&n&&e.YNc(0,dn,2,1,"div",0),2&n&&e.Q6J("ngIf",t.webNotifications)},dependencies:[O.sg,O.O5,l.JJ,l.On,an.a],styles:[".notification-row[_ngcontent-%COMP%]{display:flex;align-items:center;border-bottom:1px solid rgba(0,0,0,.1)}.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: breakpoint(sm)){.notification-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:auto;flex-grow:1}}"]}),r})();var gn=s(22198);let On=(()=>{var o;class r extends m.OI{constructor(n,t,i){super(),this.formReactiveService=n,this.userService=t,this.notifier=i,this.user=null}ngOnInit(){this.buildForm({"email-public":null}),this.userInformationLoaded.subscribe(()=>{this.form.patchValue({"email-public":this.user.emailPublic})})}updateEmailPublic(){const n={emailPublic:this.form.value["email-public"]};this.userService.updateMyProfile(n).subscribe({next:()=>{this.notifier.success(n.emailPublic?"Email is now public":"Email is now private"),this.user.emailPublic=n.emailPublic},error:t=>this.notifier.error(t.message)})}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(m.RL),e.Y36(C.KD),e.Y36(C.d4))},o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-email-preferences"]],inputs:{user:"user",userInformationLoaded:"userInformationLoaded"},features:[e.qOj],decls:7,vars:2,consts:function(){let _,n,t;return _="Allow email to be publicly displayed",n="Necessary to claim podcast RSS feeds.",t="Save",[["role","form",3,"formGroup","ngSubmit"],[1,"form-group"],["inputName","email-public","formControlName","email-public","labelText",_],["ngProjectAs","description",5,["description"]],n,["type","submit","value",t,1,"peertube-button","orange-button",3,"disabled"]]},template:function(n,t){1&n&&(e.TgZ(0,"form",0),e.NdJ("ngSubmit",function(){return t.updateEmailPublic()}),e.TgZ(1,"div",1)(2,"my-peertube-checkbox",2),e.ynx(3,3),e.TgZ(4,"span"),e.SDv(5,4),e.qZA(),e.BQk(),e.qZA()(),e._UZ(6,"input",5),e.qZA()),2&n&&(e.Q6J("formGroup",t.form),e.xp6(6),e.Q6J("disabled",!t.form.valid))},dependencies:[l._Y,l.JJ,l.JL,l.sg,l.u,gn.P]}),r})();function Nn(o,r){1&o&&(e.TgZ(0,"div",10)(1,"div",3)(2,"h2",7),e.SDv(3,20),e.qZA()(),e.TgZ(4,"div",4),e._UZ(5,"my-account-change-password"),e.qZA()())}function An(o,r){if(1&o&&(e.TgZ(0,"div",10)(1,"div",3)(2,"h2",7),e.SDv(3,21),e.qZA()(),e.TgZ(4,"div",4),e._UZ(5,"my-account-two-factor-button",9),e.qZA()()),2&o){const _=e.oxw();e.xp6(5),e.Q6J("user",_.user)("userInformationLoaded",_.userInformationLoaded)}}function pn(o,r){if(1&o&&(e.TgZ(0,"div",10)(1,"div",3)(2,"h2",7),e.SDv(3,22),e.qZA()(),e.TgZ(4,"div",4),e._UZ(5,"my-account-email-preferences",23)(6,"my-account-change-email"),e.qZA()()),2&o){const _=e.oxw();e.xp6(5),e.Q6J("user",_.user)("userInformationLoaded",_.userInformationLoaded)}}let mn=(()=>{var o;class r{constructor(n,t,i,c){this.viewportScroller=n,this.userService=t,this.authService=i,this.notifier=c,this.user=null}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(n){this.userService.changeAvatar(n).subscribe({next:t=>{this.notifier.success("Avatar changed."),this.user.updateAccountAvatar(t.avatars),this.user.account=(0,$.DC)(this.user.account)},error:t=>(0,Ie.qV)({err:t,name:"avatar",notifier:this.notifier})})}onAvatarDelete(){this.userService.deleteAvatar().subscribe({next:()=>{this.notifier.success("Avatar deleted."),this.user.updateAccountAvatar(),this.user.account=(0,$.DC)(this.user.account)},error:n=>this.notifier.error(n.message)})}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(O.EM),e.Y36(C.KD),e.Y36(C.e8),e.Y36(C.d4))}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-settings"]],decls:42,vars:15,consts:function(){let _,n,t,i,c,a,u,T,M;return _="Settings",n="PROFILE SETTINGS",t="INTERFACE",i="VIDEO SETTINGS",c="NOTIFICATIONS",a="DANGER ZONE",u="PASSWORD",T="Two-factor authentication",M="EMAIL",[[1,"visually-hidden"],_,[1,"row"],[1,"col-12","col-lg-4","col-xl-3"],[1,"col-12","col-lg-8","col-xl-9"],[3,"actor","avatarChange","avatarDelete"],[1,"row","mt-3"],[1,"account-title"],n,[3,"user","userInformationLoaded"],[1,"row","mt-5"],t,["id","video-settings",1,"anchor"],i,["id","notifications",1,"anchor"],c,["class","row mt-5",4,"ngIf"],[1,"account-title","account-title-danger"],a,[3,"user"],u,T,M,[1,"d-block","mb-5",3,"user","userInformationLoaded"]]},template:function(n,t){1&n&&(e.TgZ(0,"h1",0),e.SDv(1,1),e.qZA(),e.TgZ(2,"div",2),e._UZ(3,"div",3),e.TgZ(4,"div",4)(5,"my-actor-avatar-edit",5),e.NdJ("avatarChange",function(c){return t.onAvatarChange(c)})("avatarDelete",function(){return t.onAvatarDelete()}),e.qZA()()(),e.TgZ(6,"div",6)(7,"div",3)(8,"h2",7),e.SDv(9,8),e.qZA()(),e.TgZ(10,"div",4),e._UZ(11,"my-user-quota",9)(12,"my-account-profile",9),e.qZA()(),e.TgZ(13,"div",10)(14,"div",3)(15,"h2",7),e.SDv(16,11),e.qZA()(),e.TgZ(17,"div",4),e._UZ(18,"my-user-interface-settings",9),e.qZA()(),e.TgZ(19,"div",10)(20,"div",3),e._UZ(21,"div",12),e.TgZ(22,"h2",7),e.SDv(23,13),e.qZA()(),e.TgZ(24,"div",4),e._UZ(25,"my-user-video-settings",9),e.qZA()(),e.TgZ(26,"div",10)(27,"div",3),e._UZ(28,"div",14),e.TgZ(29,"h2",7),e.SDv(30,15),e.qZA()(),e.TgZ(31,"div",4),e._UZ(32,"my-account-notification-preferences",9),e.qZA()(),e.YNc(33,Nn,6,0,"div",16),e.YNc(34,An,6,2,"div",16),e.YNc(35,pn,7,2,"div",16),e.TgZ(36,"div",10)(37,"div",3)(38,"h2",17),e.SDv(39,18),e.qZA()(),e.TgZ(40,"div",4),e._UZ(41,"my-account-danger-zone",19),e.qZA()()),2&n&&(e.xp6(5),e.Q6J("actor",t.user.account),e.xp6(6),e.Q6J("user",t.user)("userInformationLoaded",t.userInformationLoaded),e.xp6(1),e.Q6J("user",t.user)("userInformationLoaded",t.userInformationLoaded),e.xp6(6),e.Q6J("user",t.user)("userInformationLoaded",t.userInformationLoaded),e.xp6(7),e.Q6J("user",t.user)("userInformationLoaded",t.userInformationLoaded),e.xp6(7),e.Q6J("user",t.user)("userInformationLoaded",t.userInformationLoaded),e.xp6(1),e.Q6J("ngIf",null===t.user.pluginAuth),e.xp6(1),e.Q6J("ngIf",null===t.user.pluginAuth),e.xp6(1),e.Q6J("ngIf",null===t.user.pluginAuth),e.xp6(6),e.Q6J("user",t.user))},dependencies:[O.O5,ye.h,Ue.Q,be.a,ve.v,$e,xe,Je,He,Ve,Mn,On],styles:[".account-title[_ngcontent-%COMP%]{text-transform:uppercase;color:var(--mainColor);font-weight:700;font-size:1rem;margin-bottom:10px}.account-title.account-title-danger[_ngcontent-%COMP%]{color:#d56253}.row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{max-width:500px}"]}),r})();function fn(o,r){1&o&&(e.TgZ(0,"div",4),e.SDv(1,5),e.qZA())}function Sn(o,r){if(1&o){const _=e.EpF();e.ynx(0),e.TgZ(1,"form",8),e.NdJ("ngSubmit",function(){e.CHM(_);const t=e.oxw(2);return e.KtG(t.requestTwoFactor())}),e.TgZ(2,"label",9),e.SDv(3,10),e.qZA(),e.TgZ(4,"div",11),e.SDv(5,12),e.qZA(),e._UZ(6,"my-input-text",13)(7,"input",14),e.qZA(),e.BQk()}if(2&o){const _=e.oxw(2);e.xp6(1),e.Q6J("formGroup",_.formPassword),e.xp6(5),e.Q6J("formError",_.formErrorsPassword["current-password"]),e.xp6(1),e.Q6J("disabled",!_.formPassword.valid)}}function Pn(o,r){if(1&o){const _=e.EpF();e.ynx(0),e.TgZ(1,"p"),e.SDv(2,15),e.qZA(),e._UZ(3,"qrcode",16),e.TgZ(4,"div"),e.SDv(5,17),e.qZA(),e.TgZ(6,"div",18),e._uU(7),e.qZA(),e.TgZ(8,"form",19),e.NdJ("ngSubmit",function(){e.CHM(_);const t=e.oxw(2);return e.KtG(t.confirmTwoFactor())}),e.TgZ(9,"label",20),e.SDv(10,21),e.qZA(),e.TgZ(11,"div",11),e.SDv(12,22),e.qZA(),e._UZ(13,"my-input-text",23)(14,"input",24),e.qZA(),e.BQk()}if(2&o){const _=e.oxw(2);e.xp6(3),e.Q6J("qrdata",_.twoFactorURI)("width",256),e.xp6(4),e.Oqu(_.twoFactorSecret),e.xp6(1),e.Q6J("formGroup",_.formOTP),e.xp6(5),e.Q6J("show",!0)("formError",_.formErrorsOTP["otp-token"]),e.xp6(1),e.Q6J("disabled",!_.formOTP.valid)}}function En(o,r){if(1&o&&(e.TgZ(0,"div",6),e.YNc(1,Sn,8,3,"ng-container",7),e.YNc(2,Pn,15,7,"ng-container",7),e.qZA()),2&o){const _=e.oxw();e.xp6(1),e.Q6J("ngIf","request"===_.step),e.xp6(1),e.Q6J("ngIf","confirm"===_.step)}}let hn=(()=>{var o;
1class r{constructor(n,t,i,c,a){this.notifier=n,this.twoFactorService=t,this.formReactiveService=i,this.auth=c,this.router=a,this.step="request",this.inPasswordStep=!0}ngOnInit(){this.buildPasswordForm(),this.buildOTPForm(),this.auth.userInformationLoaded.subscribe(()=>{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:n})=>{this.requestToken=n.requestToken,this.twoFactorURI=n.uri,this.twoFactorSecret=n.secret.replace(/(.{4})/g,"$1 ").trim(),this.step="confirm"},error:n=>this.notifier.error(n.message)})}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:n=>this.notifier.error(n.message)})}buildPasswordForm(){const{form:n,formErrors:t}=this.formReactiveService.buildForm({"current-password":f.v2});this.formPassword=n,this.formErrorsPassword=t}buildOTPForm(){const{form:n,formErrors:t}=this.formReactiveService.buildForm({"otp-token":f.$5});this.formOTP=n,this.formErrorsOTP=t}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(C.d4),e.Y36(Y.Sz),e.Y36(m.RL),e.Y36(C.e8),e.Y36(I.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["my-account-two-factor"]],decls:6,vars:2,consts:function(){let _,n,t,i,c,a,u,T,M,d,A;return _="Two factor authentication",n=" Two factor authentication is already enabled.\n",t="Your password",i="Confirm your password to enable two factor authentication",c="Current password",a="Confirm",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. ",T=" If you can't scan the QR code and need to enter it manually, here is the plain-text secret: ",M="Two-factor code",d="Enter the code generated by your authenticator app to confirm",A="Confirm",[["iconName","cog","aria-hidden","true"],_,["class","root already-enabled",4,"ngIf"],["class","root",4,"ngIf"],[1,"root","already-enabled"],n,[1,"root"],[4,"ngIf"],["role","form",3,"formGroup","ngSubmit"],["for","current-password"],t,[1,"form-group-description"],i,["formControlName","current-password","inputId","current-password","placeholder",c,"autocomplete","current-password",3,"formError"],["type","submit","value",a,1,"peertube-button","orange-button","mt-3",3,"disabled"],u,["level","Q",3,"qrdata","width"],T,[1,"secret-plain-text"],["role","form",1,"mt-3",3,"formGroup","ngSubmit"],["for","otp-token"],M,d,["formControlName","otp-token","inputId","otp-token","autocomplete","otp-token",3,"show","formError"],["type","submit","value",A,1,"peertube-button","orange-button","mt-3",3,"disabled"]]},template:function(n,t){1&n&&(e.TgZ(0,"h1"),e._UZ(1,"my-global-icon",0),e.ynx(2),e.SDv(3,1),e.BQk(),e.qZA(),e.YNc(4,fn,2,0,"div",2),e.YNc(5,En,3,2,"div",3)),2&n&&(e.xp6(4),e.Q6J("ngIf",!0===t.twoFactorAlreadyEnabled),e.xp6(1),e.Q6J("ngIf",!1===t.twoFactorAlreadyEnabled))},dependencies:[x.V,O.O5,l._Y,l.JJ,l.JL,l.sg,l.u,U.m,E.$],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}"]}),r})();var In=s(47443);const yn=function(o){return{"offset-content":o}},Un=[{path:"",component:(()=>{var o;class r{constructor(n){this.screenService=n,this.menuEntries=[]}get isBroadcastMessageDisplayed(){return this.screenService.isBroadcastMessageDisplayed}ngOnInit(){this.buildMenu()}buildMenu(){const n={label:"Moderation",children:[{label:"Muted accounts",routerLink:"/my-account/blocklist/accounts",iconName:"user-x"},{label:"Muted servers",routerLink:"/my-account/blocklist/servers",iconName:"peertube-x"},{label:"Abuse reports",routerLink:"/my-account/abuses",iconName:"flag"}]};this.menuEntries=[{label:"Settings",routerLink:"/my-account/settings"},{label:"Notifications",routerLink:"/my-account/notifications"},{label:"Applications",routerLink:"/my-account/applications"},n]}}return(o=r).\u0275fac=function(n){return new(n||o)(e.Y36(C.H2))}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["my-my-account"]],decls:4,vars:4,consts:[[1,"root"],[3,"menuEntries"],[1,"margin-content","pb-5",3,"ngClass"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0),e._UZ(1,"my-top-menu-dropdown",1),e.TgZ(2,"div",2),e._UZ(3,"router-outlet"),e.qZA()()),2&n&&(e.xp6(1),e.Q6J("menuEntries",t.menuEntries),e.xp6(1),e.Q6J("ngClass",e.VKq(2,yn,!t.isBroadcastMessageDisplayed)))},dependencies:[I.lC,O.mk,In.L],styles:[".root[_ngcontent-%COMP%]{flex-direction:column;width:100%}.root[_ngcontent-%COMP%] h1{font-size:1.3rem;border-bottom:2px solid #E5E5E5;padding-bottom:15px;margin-bottom:30px}.root[_ngcontent-%COMP%] h1>span>my-global-icon, .root[_ngcontent-%COMP%] h1>my-global-icon{margin-inline-end:.625rem;width:24px;height:24px;vertical-align:top}.root[_ngcontent-%COMP%] h1 .pt-badge{margin-inline-start:.4375rem;vertical-align:top}.root[_ngcontent-%COMP%] > my-top-menu-dropdown[_ngcontent-%COMP%]:nth-child(1){flex-grow:1}"]}),r})(),canActivateChild:[C.ie],children:[{path:"",redirectTo:"settings",pathMatch:"full"},{path:"settings",component:mn,data:{meta:{title:"Account settings"}}},{path:"two-factor-auth",component:hn,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:Te,data:{meta:{title:"Muted accounts"}}},{path:"blocklist/servers",component:me,data:{meta:{title:"Muted servers"}}},{path:"history/videos",redirectTo:"/my-library/history/videos",pathMatch:"full"},{path:"notifications",component:he,data:{meta:{title:"Notifications"}}},{path:"abuses",component:oe,data:{meta:{title:"My abuse reports"}}}
1,{path:"applications",component:ie,data:{meta:{title:"Applications"}}}]}];let bn=(()=>{var o;class r{}return(o=r).\u0275fac=function(n){return new(n||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[I.Bz.forChild(Un),I.Bz]}),r})(),vn=(()=>{var o;class r{}return(o=r).\u0275fac=function(n){return new(n||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[bn,x.N,W.WN,P.U$,q._t,v.nC,m.hA,h.DA,ee.zB,Y.PP,V.Y,K.jr,j.a,ne.v,H.s]}),r})()}}]); 2//# sourceMappingURL=505.f022e6bf2e7aeb1e.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.