@duplicati/ngclient 0.0.210 → 0.0.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-DJJ3VITJ.js → chunk-2TGB7FK7.js} +1 -1
- package/{chunk-AQWULDGL.js → chunk-36J3WTHV.js} +1 -1
- package/{chunk-JIJGVYNW.js → chunk-3DFXRSFL.js} +1 -1
- package/{chunk-V43VAZTT.js → chunk-5MOLXRIQ.js} +1 -1
- package/{chunk-TDEVA3XM.js → chunk-5N2VOOTZ.js} +1 -1
- package/{chunk-LSIAE7ZL.js → chunk-64W3VKAP.js} +1 -1
- package/{chunk-NYX7YT7G.js → chunk-6FBNKISB.js} +1 -1
- package/{chunk-KXBEW3N2.js → chunk-7HXPIZN6.js} +1 -1
- package/{chunk-PRBKV7LX.js → chunk-A7BE7GAK.js} +1 -1
- package/{chunk-FG4GOBKA.js → chunk-ANLSBAWJ.js} +1 -1
- package/{chunk-IGEX5B3E.js → chunk-AXBVBB2B.js} +1 -1
- package/{chunk-PUBEHQ4W.js → chunk-BKEVAAWN.js} +1 -1
- package/{chunk-M3JOG5RD.js → chunk-CCUGG5E4.js} +1 -1
- package/{chunk-GVXQIOKE.js → chunk-COT66FJB.js} +1 -1
- package/chunk-CVTB53TL.js +1 -0
- package/{chunk-I2BAH6NC.js → chunk-DGPSGSEP.js} +1 -1
- package/{chunk-76USHURS.js → chunk-DV7RWC4G.js} +1 -1
- package/{chunk-I7U3XXJD.js → chunk-EGJL4XXZ.js} +1 -1
- package/chunk-FCVVFGU2.js +1 -0
- package/{chunk-DJAQY2GM.js → chunk-FXZ3K2FU.js} +1 -1
- package/{chunk-LP2DMTA7.js → chunk-GCFBX62M.js} +1 -1
- package/{chunk-XHUQYWAM.js → chunk-GSDHTV3P.js} +1 -1
- package/{chunk-LTVI3WYF.js → chunk-HDJL2F2F.js} +1 -1
- package/{chunk-DWFQAX4H.js → chunk-HUJGWHH6.js} +1 -1
- package/chunk-I7HI454U.js +1 -0
- package/chunk-IHB6NRMQ.js +1 -0
- package/chunk-IV3M3Q6B.js +1 -0
- package/{chunk-YE7IXREK.js → chunk-JTO22TJU.js} +1 -1
- package/{chunk-M7QNSQM2.js → chunk-KAZ3YMHR.js} +1 -1
- package/chunk-KEHA3UWS.js +1 -0
- package/{chunk-ZVTMKBV5.js → chunk-KQZRDX7C.js} +1 -1
- package/{chunk-UQLHXE6V.js → chunk-LIDIFLHF.js} +1 -1
- package/{chunk-IUJGDYFS.js → chunk-MI32HHLT.js} +1 -1
- package/{chunk-CKVJ36E5.js → chunk-MNK3XRJD.js} +1 -1
- package/{chunk-DMMZWQEZ.js → chunk-N35VE3MO.js} +1 -1
- package/{chunk-3ULPLOSF.js → chunk-NQIZGFSO.js} +1 -1
- package/{chunk-T3YMO3FB.js → chunk-PSRISEFO.js} +1 -1
- package/{chunk-BDC5JQVQ.js → chunk-SA6PEMWL.js} +1 -1
- package/{chunk-INI4AJEU.js → chunk-SP3KG7FO.js} +1 -1
- package/{chunk-VOJGEOOO.js → chunk-SSUCTZ3H.js} +1 -1
- package/{chunk-FKYRYVJD.js → chunk-UY2WEUKC.js} +1 -1
- package/{chunk-YF6ULZXZ.js → chunk-WBTDGQME.js} +1 -1
- package/{chunk-2FD4SR65.js → chunk-WSFAOFM3.js} +1 -1
- package/chunk-XE42CXGY.js +1 -0
- package/{chunk-23BFPX3M.js → chunk-XRSDTFDU.js} +1 -1
- package/{chunk-EVMEYZB7.js → chunk-YIKPWYEP.js} +1 -1
- package/{chunk-JFUWTLM7.js → chunk-YIM56S4M.js} +1 -1
- package/{chunk-S2F2BNOG.js → chunk-Z772CHAB.js} +1 -1
- package/{chunk-KNB7LCAL.js → chunk-ZVWTSTR6.js} +1 -1
- package/{chunk-FZQEPDIF.js → chunk-ZY64T3CX.js} +1 -1
- package/index.html +1 -1
- package/main-4RMOPKNF.js +1 -0
- package/package.json +1 -1
- package/chunk-562BU33Q.js +0 -1
- package/chunk-DKA7IP53.js +0 -1
- package/chunk-F3TYSZ53.js +0 -1
- package/chunk-I6Y22V2Q.js +0 -1
- package/chunk-MYHC4Y56.js +0 -1
- package/chunk-VUABEJRL.js +0 -1
- package/chunk-ZOOFKMMI.js +0 -1
- package/main-IO5OKXBW.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as fe}from"./chunk-WQVQC2MC.js";import"./chunk-YQD4QIGG.js";import{a as Ce}from"./chunk-W4HWOC3K.js";import{a as pe,b as z}from"./chunk-XHUQYWAM.js";import"./chunk-YF6ULZXZ.js";import{a as ue}from"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import{a as me}from"./chunk-I4XRVBRQ.js";import"./chunk-RFB5A3B7.js";import"./chunk-DWFQAX4H.js";import{b as ge}from"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{B as se,C as le,J as ce,L as de,v as oe,z as re}from"./chunk-YCLTQEU6.js";import{d as _e}from"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import{T as ee,U as te,ha as ne,ma as ie,qa as ae}from"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as p,Bb as e,Cb as t,Db as I,Ec as _,Fc as C,Gc as E,Hb as Y,Ib as Z,Kb as B,Pc as L,Ra as r,Tb as S,U as X,Xb as h,Z as x,Zb as g,ca as y,da as b,ea as V,eb as H,fa as j,ic as G,jb as P,lc as o,mc as m,nc as u,oa as N,oc as $,qa as W,ub as D,vb as F,wb as q,yb as K,zb as Q}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var U=class s{#e=x(z);#n=x(ge);#i=N([]);recentFiles=this.#i.asReadonly();#r=5;#s=N(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=W(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#l(i.CurrentFilename,i.CurrentFilesize)});#l(i,n){let a=new Date;this.#i.update(l=>l.length>0&&l[0].filename===i?l:[{filename:i,filesize:n,timestamp:a},...l].slice(0,this.#r))}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#c()},1e3)}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null)}#c(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let n=new Date,a=(n.getTime()-this.#a.getTime())/1e3;if(a<5)return;let l=i.ProcessedFileCount||0,d=i.ProcessedFileSize||0,c=l-this.#t.files,k=d-this.#t.bytes,M=c/a,O=k/a,A=(i.TotalFileCount||0)-l,f=(i.TotalFileSize||0)-d,T=null,v=null;M>0&&(T=A/M),O>0&&(v=f/O);let R=null,w="bytes";if(T!==null&&v!==null){let Se=Math.max(T,v);R=new Date(n.getTime()+Se*1e3),w=T>v?"files":"bytes"}else T!==null?(R=new Date(n.getTime()+T*1e3),w="files"):v!==null&&(R=new Date(n.getTime()+v*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:M,currentBytesPerSecond:O,estimatedCompletion:R,metric:w})}static \u0275fac=function(n){return new(n||s)};static \u0275prov=X({token:s,factory:s.\u0275fac,providedIn:"root"})};function xe(s,i){if(s&1&&(e(0,"div",42)(1,"span",20),o(2,"Processing"),t(),e(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),o(6,"file"),t(),e(7,"div",45)(8,"span",46),o(9),t(),e(10,"span",47),o(11),_(12,"bytes"),t()()()()()),s&2){let n,a,l,d=g(2);r(8),p("title",(n=d.statusData())==null?null:n.CurrentFilename),r(),u(" ",(a=d.statusData())==null?null:a.CurrentFilename," "),r(2),m(C(12,3,(l=d.statusData())==null?null:l.CurrentFilesize))}}function Me(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function Oe(s,i){s&1&&(e(0,"div",36),S(1,2),t())}function Te(s,i){if(s&1&&(e(0,"sh-list")(1,"div",48)(2,"span",20),o(3,"ETA"),t(),e(4,"span",21),o(5),_(6,"date"),e(7,"span",49),o(8),_(9,"relativeTime"),t()()(),e(10,"div",50)(11,"span",20),o(12,"Files/s"),t(),e(13,"span",21),o(14),_(15,"number"),t()(),e(16,"div",50)(17,"span",20),o(18,"Upload Speed"),t(),e(19,"span",21),o(20),_(21,"bytes"),t()()()),s&2){let n,a,l,d,c=g(2);r(5),u(" ",E(6,4,(n=c.etaData())==null?null:n.estimatedCompletion,"mediumTime")," "),r(3),u("(",C(9,7,(a=c.etaData())==null?null:a.estimatedCompletion),")"),r(6),m(E(15,9,(l=c.etaData())==null?null:l.currentFilesPerSecond,"1.1-1")),r(6),u("",C(21,12,(d=c.etaData())==null?null:d.currentBytesPerSecond),"/s")}}function ve(s,i){if(s&1&&(e(0,"div",53)(1,"div",54)(2,"span",55),o(3),t(),e(4,"span",56),o(5),_(6,"bytes"),t()(),I(7,"sh-progress-bar",57),t()),s&2){let n=i.$implicit;r(2),p("title",n.BackendPath),r(),m(n.BackendPath),r(2),u("",C(6,4,n.BackendSpeed),"/s"),r(2),p("value",(n.BackendFileProgress||0)/(n.BackendFileSize||1)*100)}}function he(s,i){if(s&1&&(e(0,"div",51)(1,"sh-list"),P(2,ve,8,6,"div",52),t()()),s&2){let n,a=g(2);r(2),p("ngForOf",(n=a.statusData())==null?null:n.ActiveTransfers)}}function Ee(s,i){if(s&1){let n=B();e(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock"),t(),e(5,"h2"),o(6),t()()(),e(7,"div",26)(8,"div",27)(9,"span",28),o(10),_(11,"number"),t()(),I(12,"sh-progress-bar",29),e(13,"sh-list")(14,"div",30)(15,"span",20),o(16,"Files"),t(),e(17,"span",21),o(18),t()(),e(19,"div",30)(20,"span",20),o(21,"Size"),t(),e(22,"span",21),o(23),_(24,"bytes"),_(25,"bytes"),t()()()()(),e(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),o(30,"file"),t(),e(31,"h3"),o(32,"Activity"),t()()(),e(33,"div",31),P(34,xe,13,5,"div",32),e(35,"div",33)(36,"span",20),S(37,1),t(),e(38,"sh-list",34),K(39,Me,6,5,"div",35,q),D(41,Oe,2,0,"div",36),t()()()(),e(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),o(46,"gauge"),t(),e(47,"h3"),o(48,"Performance"),t()(),e(49,"div",37),o(50),_(51,"bytes"),t()(),e(52,"div",38),P(53,Te,22,14,"sh-list",25),e(54,"div",39)(55,"button",40),h("click",function(){y(n);let l=g();return b(l.toggleTransfers())}),o(56),t(),P(57,he,3,1,"div",41),t()()()}if(s&2){let n,a,l,d,c=g();r(6),m(c.statusText()),r(4),u("",E(11,13,c.progress(),"1.0-0"),"%"),r(2),p("value",c.progress()),r(6),$("",(n=c.statusData())==null?null:n.ProcessedFileCount," / ",(n=c.statusData())==null?null:n.TotalFileCount),r(5),$(" ",C(24,16,(a=c.statusData())==null?null:a.ProcessedFileSize)," / ",C(25,18,(a=c.statusData())==null?null:a.TotalFileSize)," "),r(11),p("ngIf",(l=c.statusData())==null?null:l.CurrentFilename),r(5),Q(c.recentFiles()),r(2),F(c.recentFiles().length===0?41:-1),r(9),u("",C(51,20,(d=c.statusData())==null?null:d.BackendSpeed),"/s"),r(3),p("ngIf",c.etaData()),r(3),u(" ",c.transfersExpanded()?"Hide Details":"Show Details"," "),r(),p("ngIf",c.transfersExpanded())}}function ye(s,i){if(s&1&&(e(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"calendar"),t(),e(5,"h3"),S(6,7),t()()(),e(7,"div",76)(8,"div",77)(9,"span",78),o(10),t(),e(11,"div",79)(12,"span",80),o(13),_(14,"date"),t(),e(15,"span",81),o(16),_(17,"relativeTime"),t()()(),e(18,"sh-icon",82),o(19,"caret-right"),t()()()),s&2){let n,a=g(2);r(10),m((n=a.nextBackup().backup)==null?null:n.Name),r(3),m(E(14,3,a.nextBackup().time,"medium")),r(3),u("(",C(17,6,a.nextBackup().time),")")}}function be(s,i){s&1&&(e(0,"span",74),S(1,8),t())}function Ne(s,i){if(s&1){let n=B();e(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),V(),e(4,"svg",62),I(5,"circle",63),t(),j(),e(6,"sh-icon",64),S(7,3),t()()(),e(8,"div",65)(9,"h2"),S(10,4),t(),e(11,"p",66),S(12,5),t()(),e(13,"div",67)(14,"button",68),h("click",function(){y(n);let l=g();return b(l.pauseResume())}),e(15,"sh-icon"),o(16),t(),o(17),t()()()(),P(18,ye,20,8,"sh-card",69),e(19,"sh-card",70)(20,"div",71)(21,"span",20),S(22,6),t(),e(23,"div",72)(24,"span",73),o(25),t(),D(26,be,2,0,"span",74),t()()()}if(s&2){let n,a=g();r(14),p("variant",a.clientIsRunning()?"primary":"secondary"),r(2),m(a.clientIsRunning()?"pause":"play"),r(),u(" ",a.clientIsRunning()?"Pause Execution":"Resume Execution"," "),r(),p("ngIf",a.nextBackup()),r(6),G("running",a.clientIsRunning()),r(),m((n=a.serverState())==null?null:n.ProgramState),r(),F(a.clientIsRunning()?-1:26)}}function Ie(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function ke(s,i){if(s&1&&(e(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock-counter-clockwise"),t(),e(5,"h3"),S(6,9),t()()(),e(7,"sh-list"),P(8,Ie,6,5,"div",84),t()()),s&2){let n=g();r(8),p("ngForOf",n.recentFiles())}}function Ae(s,i){if(s&1&&(e(0,"div",19)(1,"span",20),o(2,"Next Task:"),t(),e(3,"div",21)(4,"div"),o(5),t(),e(6,"div",49),o(7),_(8,"date"),_(9,"relativeTime"),t()()()),s&2){let n,a=g();r(5),m((n=a.nextBackup().backup)==null?null:n.Name),r(2),$(" ",E(8,3,a.nextBackup().time,"medium")," (",C(9,6,a.nextBackup().time),") ")}}function Re(s,i){if(s&1){let n=B();Y(0),e(1,"button",85),h("click",function(){y(n);let l=g();return b(l.stop())}),e(2,"sh-icon"),o(3,"stop"),t(),o(4," Stop "),t(),e(5,"button",85),h("click",function(){y(n);let l=g();return b(l.abort())}),e(6,"sh-icon"),o(7,"x-circle"),t(),o(8," Abort "),t(),Z()}}var J=class s{#e=x(z);#n=x(U);#i=x(_e);#r=x(re);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=N(!1);clientIsRunning=this.#e.clientIsRunning;statusText=L(()=>{let i=this.statusData()?.Phase;return i?pe[i]||i:""});progress=L(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=L(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView()}ngOnDestroy(){this.#n.deactivateView()}toggleTransfers(){this.transfersExpanded.update(i=>!i)}isTaskRunning(){return!!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(Ce,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe()}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe()}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=H({type:s,selectors:[["app-status"]],decls:29,vars:13,consts:()=>{let i;i=$localize`Live Logs`;let n;n=$localize`Recently Processed`;let a;a=$localize`No recent files`;let l;l=$localize`check-bold`;let d;d=$localize`System Ready`;let c;c=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let M;M=$localize`Next Scheduled Task`;let O;O=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,n,a,l,d,c,k,M,O,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small","variant","ghost",1,"toggle-btn",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","variant"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(n,a){if(n&1&&(e(0,"div",10),D(1,Ee,58,22)(2,Ne,27,8),P(3,ke,9,1,"sh-card",11),e(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),o(8,"list"),t(),e(9,"h3"),S(10,0),t()()(),e(11,"div",16),I(12,"app-logs-live",17),t()(),e(13,"sh-card")(14,"div",18)(15,"h3"),o(16,"Server Status"),t(),e(17,"div",19)(18,"span",20),o(19,"State:"),t(),e(20,"span",21),o(21),t()(),P(22,Ae,10,8,"div",22),e(23,"div",23)(24,"button",24),h("click",function(){return a.pauseResume()}),e(25,"sh-icon"),o(26),t(),o(27),t(),P(28,Re,9,0,"ng-container",25),t()()()()),n&2){let l,d;G("idle",!a.isTaskRunning()),r(),F(a.isTaskRunning()?1:2),r(2),p("ngIf",!a.isTaskRunning()&&a.recentFiles().length>0),r(9),p("asSimpleList",!0)("polling",a.isTaskRunning())("whenFilter",(l=a.taskStartTime())==null?null:l.getTime())("backupIdFilter",a.currentBackupId()),r(9),m((d=a.serverState())==null?null:d.ProgramState),r(),p("ngIf",a.nextBackup()),r(4),m(a.clientIsRunning()?"pause":"play_arrow"),r(),u(" ",a.clientIsRunning()?"Pause":"Resume"," "),r(),p("ngIf",a.isTaskRunning())}},dependencies:[ae,ee,te,le,de,se,oe,fe,ce,ie,ne,me,ue],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"],changeDetection:0})};export{J as default};
|
|
1
|
+
import{a as fe}from"./chunk-WQVQC2MC.js";import"./chunk-YQD4QIGG.js";import{a as Ce}from"./chunk-W4HWOC3K.js";import{a as pe,b as z}from"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import{a as ue}from"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import{a as me}from"./chunk-I4XRVBRQ.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import{b as ge}from"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as se,C as le,J as ce,L as de,v as oe,z as re}from"./chunk-YCLTQEU6.js";import{d as _e}from"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import{T as ee,U as te,ha as ne,ma as ie,qa as ae}from"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as p,Bb as e,Cb as t,Db as I,Ec as _,Fc as C,Gc as E,Hb as Y,Ib as Z,Kb as B,Pc as L,Ra as r,Tb as S,U as X,Xb as h,Z as x,Zb as g,ca as y,da as b,ea as V,eb as H,fa as j,ic as G,jb as P,lc as o,mc as m,nc as u,oa as N,oc as $,qa as W,ub as D,vb as F,wb as q,yb as K,zb as Q}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var U=class s{#e=x(z);#n=x(ge);#i=N([]);recentFiles=this.#i.asReadonly();#r=5;#s=N(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=W(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#l(i.CurrentFilename,i.CurrentFilesize)});#l(i,n){let a=new Date;this.#i.update(l=>l.length>0&&l[0].filename===i?l:[{filename:i,filesize:n,timestamp:a},...l].slice(0,this.#r))}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#c()},1e3)}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null)}#c(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let n=new Date,a=(n.getTime()-this.#a.getTime())/1e3;if(a<5)return;let l=i.ProcessedFileCount||0,d=i.ProcessedFileSize||0,c=l-this.#t.files,k=d-this.#t.bytes,M=c/a,O=k/a,A=(i.TotalFileCount||0)-l,f=(i.TotalFileSize||0)-d,T=null,v=null;M>0&&(T=A/M),O>0&&(v=f/O);let R=null,w="bytes";if(T!==null&&v!==null){let Se=Math.max(T,v);R=new Date(n.getTime()+Se*1e3),w=T>v?"files":"bytes"}else T!==null?(R=new Date(n.getTime()+T*1e3),w="files"):v!==null&&(R=new Date(n.getTime()+v*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:M,currentBytesPerSecond:O,estimatedCompletion:R,metric:w})}static \u0275fac=function(n){return new(n||s)};static \u0275prov=X({token:s,factory:s.\u0275fac,providedIn:"root"})};function xe(s,i){if(s&1&&(e(0,"div",42)(1,"span",20),o(2,"Processing"),t(),e(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),o(6,"file"),t(),e(7,"div",45)(8,"span",46),o(9),t(),e(10,"span",47),o(11),_(12,"bytes"),t()()()()()),s&2){let n,a,l,d=g(2);r(8),p("title",(n=d.statusData())==null?null:n.CurrentFilename),r(),u(" ",(a=d.statusData())==null?null:a.CurrentFilename," "),r(2),m(C(12,3,(l=d.statusData())==null?null:l.CurrentFilesize))}}function Me(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function Oe(s,i){s&1&&(e(0,"div",36),S(1,2),t())}function Te(s,i){if(s&1&&(e(0,"sh-list")(1,"div",48)(2,"span",20),o(3,"ETA"),t(),e(4,"span",21),o(5),_(6,"date"),e(7,"span",49),o(8),_(9,"relativeTime"),t()()(),e(10,"div",50)(11,"span",20),o(12,"Files/s"),t(),e(13,"span",21),o(14),_(15,"number"),t()(),e(16,"div",50)(17,"span",20),o(18,"Upload Speed"),t(),e(19,"span",21),o(20),_(21,"bytes"),t()()()),s&2){let n,a,l,d,c=g(2);r(5),u(" ",E(6,4,(n=c.etaData())==null?null:n.estimatedCompletion,"mediumTime")," "),r(3),u("(",C(9,7,(a=c.etaData())==null?null:a.estimatedCompletion),")"),r(6),m(E(15,9,(l=c.etaData())==null?null:l.currentFilesPerSecond,"1.1-1")),r(6),u("",C(21,12,(d=c.etaData())==null?null:d.currentBytesPerSecond),"/s")}}function ve(s,i){if(s&1&&(e(0,"div",53)(1,"div",54)(2,"span",55),o(3),t(),e(4,"span",56),o(5),_(6,"bytes"),t()(),I(7,"sh-progress-bar",57),t()),s&2){let n=i.$implicit;r(2),p("title",n.BackendPath),r(),m(n.BackendPath),r(2),u("",C(6,4,n.BackendSpeed),"/s"),r(2),p("value",(n.BackendFileProgress||0)/(n.BackendFileSize||1)*100)}}function he(s,i){if(s&1&&(e(0,"div",51)(1,"sh-list"),P(2,ve,8,6,"div",52),t()()),s&2){let n,a=g(2);r(2),p("ngForOf",(n=a.statusData())==null?null:n.ActiveTransfers)}}function Ee(s,i){if(s&1){let n=B();e(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock"),t(),e(5,"h2"),o(6),t()()(),e(7,"div",26)(8,"div",27)(9,"span",28),o(10),_(11,"number"),t()(),I(12,"sh-progress-bar",29),e(13,"sh-list")(14,"div",30)(15,"span",20),o(16,"Files"),t(),e(17,"span",21),o(18),t()(),e(19,"div",30)(20,"span",20),o(21,"Size"),t(),e(22,"span",21),o(23),_(24,"bytes"),_(25,"bytes"),t()()()()(),e(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),o(30,"file"),t(),e(31,"h3"),o(32,"Activity"),t()()(),e(33,"div",31),P(34,xe,13,5,"div",32),e(35,"div",33)(36,"span",20),S(37,1),t(),e(38,"sh-list",34),K(39,Me,6,5,"div",35,q),D(41,Oe,2,0,"div",36),t()()()(),e(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),o(46,"gauge"),t(),e(47,"h3"),o(48,"Performance"),t()(),e(49,"div",37),o(50),_(51,"bytes"),t()(),e(52,"div",38),P(53,Te,22,14,"sh-list",25),e(54,"div",39)(55,"button",40),h("click",function(){y(n);let l=g();return b(l.toggleTransfers())}),o(56),t(),P(57,he,3,1,"div",41),t()()()}if(s&2){let n,a,l,d,c=g();r(6),m(c.statusText()),r(4),u("",E(11,13,c.progress(),"1.0-0"),"%"),r(2),p("value",c.progress()),r(6),$("",(n=c.statusData())==null?null:n.ProcessedFileCount," / ",(n=c.statusData())==null?null:n.TotalFileCount),r(5),$(" ",C(24,16,(a=c.statusData())==null?null:a.ProcessedFileSize)," / ",C(25,18,(a=c.statusData())==null?null:a.TotalFileSize)," "),r(11),p("ngIf",(l=c.statusData())==null?null:l.CurrentFilename),r(5),Q(c.recentFiles()),r(2),F(c.recentFiles().length===0?41:-1),r(9),u("",C(51,20,(d=c.statusData())==null?null:d.BackendSpeed),"/s"),r(3),p("ngIf",c.etaData()),r(3),u(" ",c.transfersExpanded()?"Hide Details":"Show Details"," "),r(),p("ngIf",c.transfersExpanded())}}function ye(s,i){if(s&1&&(e(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"calendar"),t(),e(5,"h3"),S(6,7),t()()(),e(7,"div",76)(8,"div",77)(9,"span",78),o(10),t(),e(11,"div",79)(12,"span",80),o(13),_(14,"date"),t(),e(15,"span",81),o(16),_(17,"relativeTime"),t()()(),e(18,"sh-icon",82),o(19,"caret-right"),t()()()),s&2){let n,a=g(2);r(10),m((n=a.nextBackup().backup)==null?null:n.Name),r(3),m(E(14,3,a.nextBackup().time,"medium")),r(3),u("(",C(17,6,a.nextBackup().time),")")}}function be(s,i){s&1&&(e(0,"span",74),S(1,8),t())}function Ne(s,i){if(s&1){let n=B();e(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),V(),e(4,"svg",62),I(5,"circle",63),t(),j(),e(6,"sh-icon",64),S(7,3),t()()(),e(8,"div",65)(9,"h2"),S(10,4),t(),e(11,"p",66),S(12,5),t()(),e(13,"div",67)(14,"button",68),h("click",function(){y(n);let l=g();return b(l.pauseResume())}),e(15,"sh-icon"),o(16),t(),o(17),t()()()(),P(18,ye,20,8,"sh-card",69),e(19,"sh-card",70)(20,"div",71)(21,"span",20),S(22,6),t(),e(23,"div",72)(24,"span",73),o(25),t(),D(26,be,2,0,"span",74),t()()()}if(s&2){let n,a=g();r(14),p("variant",a.clientIsRunning()?"primary":"secondary"),r(2),m(a.clientIsRunning()?"pause":"play"),r(),u(" ",a.clientIsRunning()?"Pause Execution":"Resume Execution"," "),r(),p("ngIf",a.nextBackup()),r(6),G("running",a.clientIsRunning()),r(),m((n=a.serverState())==null?null:n.ProgramState),r(),F(a.clientIsRunning()?-1:26)}}function Ie(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function ke(s,i){if(s&1&&(e(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock-counter-clockwise"),t(),e(5,"h3"),S(6,9),t()()(),e(7,"sh-list"),P(8,Ie,6,5,"div",84),t()()),s&2){let n=g();r(8),p("ngForOf",n.recentFiles())}}function Ae(s,i){if(s&1&&(e(0,"div",19)(1,"span",20),o(2,"Next Task:"),t(),e(3,"div",21)(4,"div"),o(5),t(),e(6,"div",49),o(7),_(8,"date"),_(9,"relativeTime"),t()()()),s&2){let n,a=g();r(5),m((n=a.nextBackup().backup)==null?null:n.Name),r(2),$(" ",E(8,3,a.nextBackup().time,"medium")," (",C(9,6,a.nextBackup().time),") ")}}function Re(s,i){if(s&1){let n=B();Y(0),e(1,"button",85),h("click",function(){y(n);let l=g();return b(l.stop())}),e(2,"sh-icon"),o(3,"stop"),t(),o(4," Stop "),t(),e(5,"button",85),h("click",function(){y(n);let l=g();return b(l.abort())}),e(6,"sh-icon"),o(7,"x-circle"),t(),o(8," Abort "),t(),Z()}}var J=class s{#e=x(z);#n=x(U);#i=x(_e);#r=x(re);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=N(!1);clientIsRunning=this.#e.clientIsRunning;statusText=L(()=>{let i=this.statusData()?.Phase;return i?pe[i]||i:""});progress=L(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=L(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView()}ngOnDestroy(){this.#n.deactivateView()}toggleTransfers(){this.transfersExpanded.update(i=>!i)}isTaskRunning(){return!!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(Ce,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe()}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe()}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=H({type:s,selectors:[["app-status"]],decls:29,vars:13,consts:()=>{let i;i=$localize`Live Logs`;let n;n=$localize`Recently Processed`;let a;a=$localize`No recent files`;let l;l=$localize`check-bold`;let d;d=$localize`System Ready`;let c;c=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let M;M=$localize`Next Scheduled Task`;let O;O=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,n,a,l,d,c,k,M,O,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small","variant","ghost",1,"toggle-btn",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","variant"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(n,a){if(n&1&&(e(0,"div",10),D(1,Ee,58,22)(2,Ne,27,8),P(3,ke,9,1,"sh-card",11),e(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),o(8,"list"),t(),e(9,"h3"),S(10,0),t()()(),e(11,"div",16),I(12,"app-logs-live",17),t()(),e(13,"sh-card")(14,"div",18)(15,"h3"),o(16,"Server Status"),t(),e(17,"div",19)(18,"span",20),o(19,"State:"),t(),e(20,"span",21),o(21),t()(),P(22,Ae,10,8,"div",22),e(23,"div",23)(24,"button",24),h("click",function(){return a.pauseResume()}),e(25,"sh-icon"),o(26),t(),o(27),t(),P(28,Re,9,0,"ng-container",25),t()()()()),n&2){let l,d;G("idle",!a.isTaskRunning()),r(),F(a.isTaskRunning()?1:2),r(2),p("ngIf",!a.isTaskRunning()&&a.recentFiles().length>0),r(9),p("asSimpleList",!0)("polling",a.isTaskRunning())("whenFilter",(l=a.taskStartTime())==null?null:l.getTime())("backupIdFilter",a.currentBackupId()),r(9),m((d=a.serverState())==null?null:d.ProgramState),r(),p("ngIf",a.nextBackup()),r(4),m(a.clientIsRunning()?"pause":"play_arrow"),r(),u(" ",a.clientIsRunning()?"Pause":"Resume"," "),r(),p("ngIf",a.isTaskRunning())}},dependencies:[ae,ee,te,le,de,se,oe,fe,ce,ie,ne,me,ue],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"],changeDetection:0})};export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as q}from"./chunk-
|
|
1
|
+
import{g as q}from"./chunk-JTO22TJU.js";import{a as K}from"./chunk-WQVQC2MC.js";import"./chunk-YQD4QIGG.js";import"./chunk-NBPZDFGF.js";import{b as Z}from"./chunk-GCFBX62M.js";import"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-Z772CHAB.js";import{b as V}from"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import"./chunk-6Q6SSTBK.js";import{a as j}from"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import{b as H}from"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{C as W,L as X,O as z,v as J}from"./chunk-YCLTQEU6.js";import{d as B}from"./chunk-2LSZ2I43.js";import{b as w}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import{ma as k}from"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as C,Bb as o,Cb as s,Db as R,Ec as T,Fc as d,Hb as P,Ib as m,Pc as b,Ra as a,Rb as y,Sb as D,Tb as r,Ub as v,Vb as x,Z as c,Zb as g,ea as u,eb as A,fa as f,lc as M,oa as I,oc as N,ub as O,vb as p}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";function Q(n,t){n&1&&(o(0,"div",17),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(o(0,"div",18),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(o(0,"sh-card",10),P(1,16),r(2,2),m(),O(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();a(3),p(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),T(1,"number"),T(2,"number")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileCount)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(P(0),r(1,8),m())}function ne(n,t){if(n&1&&(M(0),T(1,"bytes"),T(2,"bytes")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileSize)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileSize)," ")}}function ie(n,t){n&1&&(P(0),r(1,9),m())}function oe(n,t){if(n&1&&(o(0,"sh-card",10)(1,"h3"),y(2,5),R(3,"sh-spinner",23),D(),s(),o(4,"div",24),R(5,"sh-progress-bar",25),o(6,"p")(7,"span"),r(8,6),s(),O(9,ee,3,6)(10,te,2,0,"ng-container"),s(),o(11,"p")(12,"span"),r(13,7),s(),O(14,ne,3,6)(15,ie,2,0,"ng-container"),s()()()),n&2){let e,i,l,E,S=g();a(3),v((e=S.statusData())==null?null:e.statusText),x(2),a(2),C("value",(i=S.statusData())==null?null:i.OverallProgress),a(4),p((l=S.statusData())!=null&&l.ProcessedFileCount?9:10),a(5),p((E=S.statusData())!=null&&E.ProcessedFileSize?14:15)}}var G=class n{#o=c(B);#s=c(H);#t=c(V);#n=c(q);#r=c(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=I("");#e=null;lastRestoreStarted=b(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#o.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#i(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#_(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#i(e)})}#i(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let i;i=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let S;S=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let $;return $=$localize`N/A`,[t,e,i,l,E,S,h,F,L,$,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,i){if(e&1&&(o(0,"section"),O(1,Y,5,1,"sh-card",10)(2,oe,16,4,"sh-card",10),o(3,"sh-card",11)(4,"h3"),r(5,0),s(),o(6,"div",12),R(7,"app-notifications",13),s()(),o(8,"sh-card",14)(9,"h3"),r(10,1),s(),R(11,"app-logs-live",15),s()()),e&2){let l;a(),p(i.restoreResult()!=""?1:2),a(6),C("notificationFilterPredicate",i.notificationFilterPredicate()),a(4),C("asSimpleList",!0)("polling",i.restoreResult()=="")("whenFilter",(l=i.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",i.backupId())}},dependencies:[K,X,z,J,W,Z,j,k],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
1
|
+
import{a as A}from"./chunk-COT66FJB.js";import"./chunk-W4HWOC3K.js";import"./chunk-YIM56S4M.js";import"./chunk-MNK3XRJD.js";import"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{U as S}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{c as u,e as N,f as c}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Bb as e,Cb as t,Db as T,Tb as n,eb as g}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as De}from"./chunk-W4HWOC3K.js";import{a as Oe}from"./chunk-JFUWTLM7.js";import{a as fe}from"./chunk-CKVJ36E5.js";import{b as me}from"./chunk-XHUQYWAM.js";import{a as Ee}from"./chunk-IUJGDYFS.js";import{a as Fe}from"./chunk-FKYRYVJD.js";import{b as Ce}from"./chunk-LTVI3WYF.js";import{a as pe}from"./chunk-BEXYTIOL.js";import{c as se}from"./chunk-DKA7IP53.js";import{B as A,H as ue,K as Se,P as de,Y as ge,c as ae,e as le,i as _e,k as re,s as ce,v as P,z as Te}from"./chunk-YCLTQEU6.js";import{d as x}from"./chunk-2LSZ2I43.js";import{e as oe}from"./chunk-BMWZYMK6.js";import{Ab as R,Bb as a,Cb as l,Db as T,E as Q,Hb as te,Ib as ne,Kb as D,Pc as Y,Ra as r,Rb as C,Sb as m,Tb as I,Uc as ie,Wb as v,Xb as c,Z as d,Zb as S,ca as E,da as O,eb as N,ic as G,lc as F,mc as w,nc as V,oa as f,qa as ee,qc as b,rc as y,sc as B,ub as g,vb as p,zc as H}from"./chunk-ERITO7WM.js";function Pe(o,t){o&1&&(a(0,"sh-icon",2),F(1,"x-bold"),l())}function Ae(o,t){o&1&&(a(0,"sh-icon",3),F(1,"list-bold"),l())}function he(o,t){if(o&1){let n=D();a(0,"button",1),c("click",function(){E(n);let i=S();return O(i.toggleNav())}),g(1,Pe,2,0,"sh-icon",2)(2,Ae,2,0,"sh-icon",3),l()}if(o&2){let n=S();r(),p(n.isNavOpen()?1:2)}}var $=class o{#e=d(Oe);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&g(0,he,3,1,"button",0),n&2&&p(e.isMobile()?0:-1)},dependencies:[A,P],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0})};var Ne=()=>["/connect/logon"];function ve(o,t){o&1&&(C(0,0,1),T(1,"div",9),m())}function be(o,t){o&1&&(C(0,0,2),T(1,"div",10),m())}function ye(o,t){if(o&1){let n=D();a(0,"div",8),c("click",function(){E(n);let i=S();return O(i.resetAndRetry())}),C(1,0),g(2,ve,2,0)(3,be,2,0),m(),l()}if(o&2){let n=S();r(2),p(n.resetting()?2:3)}}function Be(o,t){o&1&&(a(0,"div",6),C(1,1),T(2,"div",11),m(),l()),o&2&&R("routerLink",H(1,Ne))}function ke(o,t){o&1&&(a(0,"div",6),C(1,2),T(2,"div",10),m(),l()),o&2&&R("routerLink",H(1,Ne))}function Le(o,t){if(o&1){let n=D();a(0,"div",7),C(1,3),a(2,"sh-icon",12),c("click",function(){E(n);let i=S();return O(i.cancel())}),l(),a(3,"div",13),c("click",function(){E(n);let i=S();return O(i.claim())}),l(),T(4,"div",14),m(),l()}}function Ge(o,t){if(o&1){let n=D();a(0,"div",8),c("click",function(){E(n);let i=S();return O(i.openConsole())}),C(1,4),T(2,"div",15),m(),l()}}var k=class o{#e=d(Ee);state=this.#e.state;resetting=f(!1);stateEffect=ee(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(!1),this.#e.beginRemoteRegistration())});ngOnInit(){this.#e.refreshRemoteControlStatus()}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank")}cancel(){this.#e.cancelRemoteRegistration()}resetAndRetry(){this.resetting.set(!0),this.#e.cancelRemoteRegistration()}openConsole(){this.#e.openConsole()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,s=v(s);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,s,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&g(0,ye,4,1,"div",5)(1,Be,3,2,"div",6)(2,ke,3,2,"div",6)(3,Le,5,0,"div",7)(4,Ge,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",s=e.state()==="registeringfaulted",u=e.state()==="registering",_=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";p(s?0:u?1:i?2:_?3:M?4:-1)}},dependencies:[oe,P,ge],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"],changeDetection:0})};var Me={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},xe=["mbps","gbps"],Ie=8,W=1024,U=W*1024,j=U*1024,Z=j*1024,Re=Z*1024,$e={B:1,KB:W,MB:U,GB:j,TB:Z,PB:Re},Ue=1e3,K=Ue*1e3,X=K*1e3,we=[{threshold:Re,unitPrefix:"PByte"},{threshold:Z,unitPrefix:"TByte"},{threshold:j,unitPrefix:"GByte"},{threshold:U,unitPrefix:"MByte"},{threshold:W,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],L=class o{#e=d(x);closed=ie();isSubmitting=f(!1);sizeOptions=f([...xe]);maxUpload=f(0);maxDownload=f(0);maxUploadUnit=f("mbps");maxDownloadUnit=f("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(t,n){let i=t*($e[n.toUpperCase()]||U)*Ie;return i===0?{value:0,unit:"mbps"}:i>=X?{value:parseFloat((i/X).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/K).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case"gbps":e=t*X;break;case"mbps":e=t*K;break}let i=e/Ie;if(i===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:s,unitPrefix:u}of we)if(i>=s)return{valueForApi:Math.round(i/s),unitPrefixForApi:u};return{valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),u=i[2],_=this.convertToBitsPerSecondUnits(s,u);this.maxUpload.set(_.value),this.maxUploadUnit.set(_.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),u=i[2],_=this.convertToBitsPerSecondUnits(s,u);this.maxDownload.set(_.value),this.maxDownloadUnit.set(_.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e}submit(){this.isSubmitting.set(!0);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),s=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:_,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),h=Me[M];h?t=`${_}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`)}if(s){let{valueForApi:_,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(s,u),h=Me[M];h?n=`${_}${h}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(Q(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:_=>{console.error("Failed to submit throttle settings:",_)}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let s;s=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,s,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),I(2,0),l(),a(3,"p"),I(4,1),l()(),a(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),I(9,2),l(),a(10,"sh-form-field")(11,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),B("ngModelChange",function(s){return y(e.maxUpload,s)||(e.maxUpload=s),s}),l()(),a(12,"sh-select",10)(13,"input",11),B("ngModelChange",function(s){return y(e.maxUploadUnit,s)||(e.maxUploadUnit=s),s}),l()()(),a(14,"div",8)(15,"label"),I(16,3),l(),a(17,"sh-form-field")(18,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),B("ngModelChange",function(s){return y(e.maxDownload,s)||(e.maxDownload=s),s}),l()(),a(19,"sh-select",10)(20,"input",11),B("ngModelChange",function(s){return y(e.maxDownloadUnit,s)||(e.maxDownloadUnit=s),s}),l()()()()(),a(21,"footer",12)(22,"button",13),c("click",function(){return e.closed.emit(!1)}),I(23,4),l(),a(24,"button",14),c("click",function(){return e.submit()}),I(25,5),l()()),n&2&&(r(11),b("ngModel",e.maxUpload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),b("ngModel",e.maxUploadUnit),r(5),b("ngModel",e.maxDownload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),b("ngModel",e.maxDownloadUnit),r(4),G("loading",e.isSubmitting()))},dependencies:[ce,ae,re,le,_e,ue,de,A],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Ve(o,t){o&1&&T(0,"app-remote-connectivity-status")}function He(o,t){if(o&1){let n=D();a(0,"button",7),c("click",function(){E(n);let i=S(2);return O(i.abort())}),C(1,1),T(2,"sh-icon"),m(),l()}}function Ye(o,t){if(o&1){let n=D();a(0,"button",7),c("click",function(){E(n);let i=S(2);return O(i.stop())}),C(1,2),T(2,"sh-icon"),m(),l()}}function ze(o,t){if(o&1&&g(0,He,3,0,"button",14)(1,Ye,3,0,"button",14),o&2){let n=S();p(n.isStopping()?0:1)}}function Je(o,t){o&1&&(C(0,0,1),T(1,"sh-icon"),m())}function Xe(o,t){o&1&&(C(0,0,2),T(1,"sh-icon"),m())}function Ke(o,t){o&1&&T(0,"app-remote-connectivity-status",10)}function We(o,t){o&1&&T(0,"app-remote-connectivity-status",12)}function je(o,t){if(o&1){let n=D();a(0,"button",13),c("click",function(){E(n);let i=S();return O(i.isStopping()?i.abort():i.stop())}),a(1,"sh-icon"),F(2),l(),F(3),l()}if(o&2){let n=S();r(2),w(n.isStopping()?"skull":"stop"),r(),V(" ",n.isStopping()?"Abort":"Stop"," ")}}var q=class o{#e=d(x);#t=d(me);#n=d(Te);#s=d(Ce);#i=d(se);#a=d(pe);#l=d(Fe);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Y(()=>this.#s.serverState()?.ActiveTask?.Item1);isStopping=Y(()=>this.runningTask()==this.#o());#o=f(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open(L,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(De,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#a.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(a(0,"div",3),T(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),a(3,"div",5)(4,"div",6),g(5,Ve,1,0,"app-remote-connectivity-status"),g(6,ze,2,1),a(7,"button",7),c("click",function(){return e.pauseResume()}),C(8,0),g(9,Je,2,0)(10,Xe,2,0),m(),l(),a(11,"button",7),c("click",function(){return e.openThrottleSettingsDialog()}),a(12,"sh-icon"),F(13,"speedometer"),l()()(),a(14,"div",8)(15,"sh-menu")(16,"button",9),g(17,Ke,1,0,"app-remote-connectivity-status",10),a(18,"sh-icon"),F(19,"dots-three-vertical-bold"),l()(),te(20,11),g(21,We,1,0,"app-remote-connectivity-status",12),g(22,je,4,2,"button"),a(23,"button",13),c("click",function(){return e.pauseResume()}),a(24,"sh-icon"),F(25),l(),F(26),l(),a(27,"button",13),c("click",function(){return e.openThrottleSettingsDialog()}),a(28,"sh-icon"),F(29,"speedometer"),l(),F(30," Throttle Settings "),l(),ne(),l()()()()),n&2&&(r(5),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),r(),p(e.runningTask()?6:-1),r(),G("loading",e.isResuming()),r(2),p(e.clientIsRunning()?9:10),r(8),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),r(4),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),r(),p(e.runningTask()?22:-1),r(3),w(e.clientIsRunning()?"pause":"play"),r(),V(" ",e.clientIsRunning()?"Pause":"Resume"," "))},dependencies:[k,P,A,Se,$,fe],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"],changeDetection:0})};export{q as a};
|
|
1
|
+
import{a as De}from"./chunk-W4HWOC3K.js";import{a as Oe}from"./chunk-YIM56S4M.js";import{a as fe}from"./chunk-MNK3XRJD.js";import{b as me}from"./chunk-GSDHTV3P.js";import{a as Ee}from"./chunk-MI32HHLT.js";import{a as Fe}from"./chunk-UY2WEUKC.js";import{b as Ce}from"./chunk-HDJL2F2F.js";import{a as pe}from"./chunk-BEXYTIOL.js";import{c as se}from"./chunk-I7HI454U.js";import{B as A,H as ue,K as Se,P as de,Y as ge,c as ae,e as le,i as _e,k as re,s as ce,v as P,z as Te}from"./chunk-YCLTQEU6.js";import{d as x}from"./chunk-2LSZ2I43.js";import{e as oe}from"./chunk-BMWZYMK6.js";import{Ab as R,Bb as a,Cb as l,Db as T,E as Q,Hb as te,Ib as ne,Kb as D,Pc as Y,Ra as r,Rb as C,Sb as m,Tb as I,Uc as ie,Wb as v,Xb as c,Z as d,Zb as S,ca as E,da as O,eb as N,ic as G,lc as F,mc as w,nc as V,oa as f,qa as ee,qc as b,rc as y,sc as B,ub as g,vb as p,zc as H}from"./chunk-ERITO7WM.js";function Pe(o,t){o&1&&(a(0,"sh-icon",2),F(1,"x-bold"),l())}function Ae(o,t){o&1&&(a(0,"sh-icon",3),F(1,"list-bold"),l())}function he(o,t){if(o&1){let n=D();a(0,"button",1),c("click",function(){E(n);let i=S();return O(i.toggleNav())}),g(1,Pe,2,0,"sh-icon",2)(2,Ae,2,0,"sh-icon",3),l()}if(o&2){let n=S();r(),p(n.isNavOpen()?1:2)}}var $=class o{#e=d(Oe);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&g(0,he,3,1,"button",0),n&2&&p(e.isMobile()?0:-1)},dependencies:[A,P],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0})};var Ne=()=>["/connect/logon"];function ve(o,t){o&1&&(C(0,0,1),T(1,"div",9),m())}function be(o,t){o&1&&(C(0,0,2),T(1,"div",10),m())}function ye(o,t){if(o&1){let n=D();a(0,"div",8),c("click",function(){E(n);let i=S();return O(i.resetAndRetry())}),C(1,0),g(2,ve,2,0)(3,be,2,0),m(),l()}if(o&2){let n=S();r(2),p(n.resetting()?2:3)}}function Be(o,t){o&1&&(a(0,"div",6),C(1,1),T(2,"div",11),m(),l()),o&2&&R("routerLink",H(1,Ne))}function ke(o,t){o&1&&(a(0,"div",6),C(1,2),T(2,"div",10),m(),l()),o&2&&R("routerLink",H(1,Ne))}function Le(o,t){if(o&1){let n=D();a(0,"div",7),C(1,3),a(2,"sh-icon",12),c("click",function(){E(n);let i=S();return O(i.cancel())}),l(),a(3,"div",13),c("click",function(){E(n);let i=S();return O(i.claim())}),l(),T(4,"div",14),m(),l()}}function Ge(o,t){if(o&1){let n=D();a(0,"div",8),c("click",function(){E(n);let i=S();return O(i.openConsole())}),C(1,4),T(2,"div",15),m(),l()}}var k=class o{#e=d(Ee);state=this.#e.state;resetting=f(!1);stateEffect=ee(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(!1),this.#e.beginRemoteRegistration())});ngOnInit(){this.#e.refreshRemoteControlStatus()}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank")}cancel(){this.#e.cancelRemoteRegistration()}resetAndRetry(){this.resetting.set(!0),this.#e.cancelRemoteRegistration()}openConsole(){this.#e.openConsole()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,s=v(s);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,s,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&g(0,ye,4,1,"div",5)(1,Be,3,2,"div",6)(2,ke,3,2,"div",6)(3,Le,5,0,"div",7)(4,Ge,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",s=e.state()==="registeringfaulted",u=e.state()==="registering",_=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";p(s?0:u?1:i?2:_?3:M?4:-1)}},dependencies:[oe,P,ge],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"],changeDetection:0})};var Me={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},xe=["mbps","gbps"],Ie=8,W=1024,U=W*1024,j=U*1024,Z=j*1024,Re=Z*1024,$e={B:1,KB:W,MB:U,GB:j,TB:Z,PB:Re},Ue=1e3,K=Ue*1e3,X=K*1e3,we=[{threshold:Re,unitPrefix:"PByte"},{threshold:Z,unitPrefix:"TByte"},{threshold:j,unitPrefix:"GByte"},{threshold:U,unitPrefix:"MByte"},{threshold:W,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],L=class o{#e=d(x);closed=ie();isSubmitting=f(!1);sizeOptions=f([...xe]);maxUpload=f(0);maxDownload=f(0);maxUploadUnit=f("mbps");maxDownloadUnit=f("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(t,n){let i=t*($e[n.toUpperCase()]||U)*Ie;return i===0?{value:0,unit:"mbps"}:i>=X?{value:parseFloat((i/X).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/K).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case"gbps":e=t*X;break;case"mbps":e=t*K;break}let i=e/Ie;if(i===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:s,unitPrefix:u}of we)if(i>=s)return{valueForApi:Math.round(i/s),unitPrefixForApi:u};return{valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),u=i[2],_=this.convertToBitsPerSecondUnits(s,u);this.maxUpload.set(_.value),this.maxUploadUnit.set(_.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),u=i[2],_=this.convertToBitsPerSecondUnits(s,u);this.maxDownload.set(_.value),this.maxDownloadUnit.set(_.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e}submit(){this.isSubmitting.set(!0);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),s=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:_,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),h=Me[M];h?t=`${_}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`)}if(s){let{valueForApi:_,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(s,u),h=Me[M];h?n=`${_}${h}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(Q(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:_=>{console.error("Failed to submit throttle settings:",_)}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let s;s=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,s,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),I(2,0),l(),a(3,"p"),I(4,1),l()(),a(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),I(9,2),l(),a(10,"sh-form-field")(11,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),B("ngModelChange",function(s){return y(e.maxUpload,s)||(e.maxUpload=s),s}),l()(),a(12,"sh-select",10)(13,"input",11),B("ngModelChange",function(s){return y(e.maxUploadUnit,s)||(e.maxUploadUnit=s),s}),l()()(),a(14,"div",8)(15,"label"),I(16,3),l(),a(17,"sh-form-field")(18,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),B("ngModelChange",function(s){return y(e.maxDownload,s)||(e.maxDownload=s),s}),l()(),a(19,"sh-select",10)(20,"input",11),B("ngModelChange",function(s){return y(e.maxDownloadUnit,s)||(e.maxDownloadUnit=s),s}),l()()()()(),a(21,"footer",12)(22,"button",13),c("click",function(){return e.closed.emit(!1)}),I(23,4),l(),a(24,"button",14),c("click",function(){return e.submit()}),I(25,5),l()()),n&2&&(r(11),b("ngModel",e.maxUpload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),b("ngModel",e.maxUploadUnit),r(5),b("ngModel",e.maxDownload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),b("ngModel",e.maxDownloadUnit),r(4),G("loading",e.isSubmitting()))},dependencies:[ce,ae,re,le,_e,ue,de,A],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Ve(o,t){o&1&&T(0,"app-remote-connectivity-status")}function He(o,t){if(o&1){let n=D();a(0,"button",7),c("click",function(){E(n);let i=S(2);return O(i.abort())}),C(1,1),T(2,"sh-icon"),m(),l()}}function Ye(o,t){if(o&1){let n=D();a(0,"button",7),c("click",function(){E(n);let i=S(2);return O(i.stop())}),C(1,2),T(2,"sh-icon"),m(),l()}}function ze(o,t){if(o&1&&g(0,He,3,0,"button",14)(1,Ye,3,0,"button",14),o&2){let n=S();p(n.isStopping()?0:1)}}function Je(o,t){o&1&&(C(0,0,1),T(1,"sh-icon"),m())}function Xe(o,t){o&1&&(C(0,0,2),T(1,"sh-icon"),m())}function Ke(o,t){o&1&&T(0,"app-remote-connectivity-status",10)}function We(o,t){o&1&&T(0,"app-remote-connectivity-status",12)}function je(o,t){if(o&1){let n=D();a(0,"button",13),c("click",function(){E(n);let i=S();return O(i.isStopping()?i.abort():i.stop())}),a(1,"sh-icon"),F(2),l(),F(3),l()}if(o&2){let n=S();r(2),w(n.isStopping()?"skull":"stop"),r(),V(" ",n.isStopping()?"Abort":"Stop"," ")}}var q=class o{#e=d(x);#t=d(me);#n=d(Te);#s=d(Ce);#i=d(se);#a=d(pe);#l=d(Fe);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Y(()=>this.#s.serverState()?.ActiveTask?.Item1);isStopping=Y(()=>this.runningTask()==this.#o());#o=f(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open(L,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(De,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#a.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=N({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(a(0,"div",3),T(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),a(3,"div",5)(4,"div",6),g(5,Ve,1,0,"app-remote-connectivity-status"),g(6,ze,2,1),a(7,"button",7),c("click",function(){return e.pauseResume()}),C(8,0),g(9,Je,2,0)(10,Xe,2,0),m(),l(),a(11,"button",7),c("click",function(){return e.openThrottleSettingsDialog()}),a(12,"sh-icon"),F(13,"speedometer"),l()()(),a(14,"div",8)(15,"sh-menu")(16,"button",9),g(17,Ke,1,0,"app-remote-connectivity-status",10),a(18,"sh-icon"),F(19,"dots-three-vertical-bold"),l()(),te(20,11),g(21,We,1,0,"app-remote-connectivity-status",12),g(22,je,4,2,"button"),a(23,"button",13),c("click",function(){return e.pauseResume()}),a(24,"sh-icon"),F(25),l(),F(26),l(),a(27,"button",13),c("click",function(){return e.openThrottleSettingsDialog()}),a(28,"sh-icon"),F(29,"speedometer"),l(),F(30," Throttle Settings "),l(),ne(),l()()()()),n&2&&(r(5),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),r(),p(e.runningTask()?6:-1),r(),G("loading",e.isResuming()),r(2),p(e.clientIsRunning()?9:10),r(8),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),r(4),p(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),r(),p(e.runningTask()?22:-1),r(3),w(e.clientIsRunning()?"pause":"play"),r(),V(" ",e.clientIsRunning()?"Pause":"Resume"," "))},dependencies:[k,P,A,Se,$,fe],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"],changeDetection:0})};export{q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as a,h as b,i as c,j as d}from"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-WBTDGQME.js";import"./chunk-6Q6SSTBK.js";import{a as ae}from"./chunk-I4XRVBRQ.js";import{a as _e}from"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import{c as re}from"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as ne,D as ie,b as H,e as Q,i as Y,s as Z,v as ee,z as te}from"./chunk-YCLTQEU6.js";import{d as oe}from"./chunk-2LSZ2I43.js";import{d as j,e as q}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as f,Ac as X,Bb as i,Cb as o,E as K,Ec as z,Hc as V,Kb as N,Pc as M,Ra as r,Tb as c,Ub as A,Vb as L,Vc as W,Wb as F,Xb as $,Z as u,Zb as C,ca as P,da as T,eb as y,ic as x,l as k,lc as E,oa as p,p as U,qc as S,rc as D,sc as h,tc as G,ub as g,uc as w,vb as m,vc as v,z as I,zc as J}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(l,_){if(l&1){let e=N();i(0,"section")(1,"h4"),c(2,4),o(),i(3,"p"),c(4,5),o(),i(5,"sh-checkbox",11),E(6," Delete local database "),i(7,"input",12),h("ngModelChange",function(t){P(e);let a=C();return D(a.deleteLocalDb,t)||(a.deleteLocalDb=t),T(t)}),o()()()}if(l&2){let e=C();r(7),S("ngModel",e.deleteLocalDb)}}function ue(l,_){if(l&1){let e=N();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),z(5,"bytes"),o(),i(6,"sh-checkbox",11),E(7," Delete remote files "),i(8,"input",12),h("ngModelChange",function(t){P(e);let a=C();return D(a.deleteRemoteFiles,t)||(a.deleteRemoteFiles=t),T(t)}),o()()()}if(l&2){let e=C(),n=v(0),t=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)??0;r(5),A(e.fileCount())(e.fileCount())(V(5,4,t,!0,!0)),L(4),r(3),S("ngModel",e.deleteRemoteFiles)}}var B=class l{#t=u(oe);#n=u(te);#e=u(le);#i=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=p(!1);deleteRemoteFiles=p(!1);isDeleting=p(!1);deleteBackup(){let _=this.id(),e=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(_e,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#e.deleteBackup({id:_,deleteLocalDb:e,deleteRemoteFiles:n}).pipe(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=y({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`Export configuration`;let n;n=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let t;t=$localize`Cancel`;let a;a=$localize`Delete local database`;let b;b=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,e,n,t,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(e,n){if(e&1&&(G(0),i(1,"h3"),c(2,0),o(),g(3,Ee,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),E(10," Export configuration "),i(11,"sh-icon"),E(12,"caret-right"),o()()(),g(13,ue,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),$("click",function(){return n.deleteBackup()}),E(18,"Delete backup"),o()()),e&2){let t=w(n.backup()),a=n.noLocalDbResource.value();r(2),A(t==null||t.Backup==null?null:t.Backup.Name),L(2),r(),m(a?3:-1),r(6),f("routerLink",X(8,ce,n.id())),r(4),m(a?13:-1),r(2),f("routerLink",J(10,se)),r(2),x("loading",n.isDeleting())}},dependencies:[ie,ne,ee,Z,H,Q,Y,q,ae],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk-
|
|
1
|
+
import{a as T}from"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as f,G as M}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{d as p,e as h}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Bb as e,Cb as t,Db as _,Ra as E,Tb as r,Xb as c,Z as a,eb as u,ic as S,lc as g,oa as d}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var m=class C{#e=a(T);#n=a(p);hoveringConnect=d(!1);setWelcomeShown(){this.#e.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})}static \u0275fac=function(o){return new(o||C)};static \u0275cmp=u({type:C,selectors:[["app-select"]],decls:21,vars:2,consts:()=>{let l;l=$localize`Connect to console`;let o;o=$localize`Consolidate all your backup reports in one place.`;let n;n=$localize`Connection link`;let i;return i=$localize`For enterprises that are onboarding many machines.`,[l,o,n,i,[1,"left"],[1,"actionables"],["shButton","","routerLink","/welcome/connect/logon",1,"connect","outlined","primary",3,"mouseenter","mouseleave"],[1,"action"],["shButton","","routerLink","/welcome/connect/link",1,"connect","outlined",3,"mouseenter","mouseleave"],[1,"space"],[1,"without-connecting",3,"click"],[1,"right"],["src","/assets/images/console.avif","alt",""]]},template:function(o,n){o&1&&(e(0,"section",4)(1,"div",5)(2,"button",6),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(3,"div",7)(4,"h2"),r(5,0),t(),e(6,"p"),r(7,1),t()()(),e(8,"sh-divider"),g(9,"or"),t(),e(10,"button",8),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(11,"div",7)(12,"h2"),r(13,2),t(),e(14,"p"),r(15,3),t()()(),_(16,"div",9),e(17,"p",10),c("click",function(){return n.setWelcomeShown()}),g(18,"Proceed without connecting to console"),t()()(),e(19,"section",11),_(20,"img",12),t()),o&2&&(E(19),S("hovering",n.hoveringConnect()))},dependencies:[h,M,f],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{width:100%;height:2.5rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}"],changeDetection:0})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as a,o as b}from"./chunk-
|
|
1
|
+
import{n as a,o as b}from"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-A7BE7GAK.js")},{path:"destination",loadComponent:()=>import("./chunk-ZVWTSTR6.js")},{path:"source-data",loadComponent:()=>import("./chunk-EGJL4XXZ.js")},{path:"schedule",loadComponent:()=>import("./chunk-CVTB53TL.js")},{path:"options",loadComponent:()=>import("./chunk-PSRISEFO.js")}];export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as W}from"./chunk-
|
|
1
|
+
import{a as W}from"./chunk-COT66FJB.js";import"./chunk-W4HWOC3K.js";import"./chunk-YIM56S4M.js";import"./chunk-MNK3XRJD.js";import"./chunk-GSDHTV3P.js";import{a as j}from"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as m,C as N,G as w,L as z,v as O}from"./chunk-YCLTQEU6.js";import{d as H}from"./chunk-2LSZ2I43.js";import{e as g}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as l,Ac as X,Bb as n,Cb as o,Db as r,Ra as s,Rb as E,Sb as S,Tb as a,Ub as v,Vb as B,Z as T,Zb as u,eb as A,kb as D,lc as p,oc as J,rb as G,sb as k,ub as R,vb as d,wb as y,yb as b,zb as x,zc as C}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var q=()=>[N,m,O,g],V=()=>["/restore-from-files"],K=()=>["/restore/from-config"],Q=t=>["/restore",t];function U(t,i){if(t&1&&(n(0,"sh-card",10),r(1,"img",15),n(2,"div",12)(3,"h3"),a(4,7),o(),n(5,"p"),p(6),o()(),n(7,"button",13),E(8,8),r(9,"sh-icon"),S(),o()()),t&2){let e=i.$implicit;l("routerLink",X(4,Q,e.Backup.ID)),s(4),v(e.Backup.Name??"Backup name missing"),B(4),s(2),J(" ",(e.Backup.Metadata==null?null:e.Backup.Metadata.SourceSizeString)??"-"," / ",(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount)??"-"," ")}}function Y(t,i){if(t&1&&b(0,U,10,6,"sh-card",10,y),t&2){let e=u(2);x(e.backups())}}function Z(t,i){if(t&1&&R(0,Y,2,0),t&2){let e=u();d(e.backups().length?0:-1)}}function ee(t,i){t&1&&(n(0,"div",16),r(1,"sh-progress-bar",17),n(2,"div",12)(3,"h3"),a(4,9),o()()())}function te(t,i){t&1&&(n(0,"sh-divider"),p(1,"Or without a local configuration"),o())}var P=class t{#e=T(j);#t=T(H);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(i){this.#t.postApiV1BackupByIdRestore({id:i.Backup?.ID,requestBody:{}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["app-restore"]],decls:29,vars:6,consts:()=>{let i;i=$localize`Where do you want to restore from?`;let e;e=$localize`Direct restore from backup files`;let c;c=$localize`Point to your backup files and restore from there.`;let f;f=$localize` Start ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restore from configuration`;let M;M=$localize`Load destination from an exported job`;let h;h=$localize` Start ${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $;$=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let L;return L=$localize`Loading backups...`,[i,e,c,f,F,M,h,I,$,L,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["shButton",""],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(e,c){e&1&&(r(0,"app-status-bar"),n(1,"section")(2,"h2"),a(3,0),o(),D(4,Z,1,1)(5,ee,5,0),G(6,4,q,null,5),R(8,te,2,0,"sh-divider"),n(9,"sh-card",10),r(10,"img",11),n(11,"div",12)(12,"h3"),a(13,1),o(),n(14,"p"),a(15,2),o()(),n(16,"button",13),E(17,3),r(18,"sh-icon"),S(),o()(),n(19,"sh-card",10),r(20,"img",14),n(21,"div",12)(22,"h3"),a(23,4),o(),n(24,"p"),a(25,5),o()(),n(26,"button",13),E(27,6),r(28,"sh-icon"),S(),o()()()),e&2&&(s(6),k(!c.backupsLoading()),s(2),d(c.backups().length?8:-1),s(),l("routerLink",C(4,V)),s(10),l("routerLink",C(5,K)))},dependencies:[W,N,m,w,O,z,g],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}sh-divider[_ngcontent-%COMP%]{color:var(--base-8)}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-Z772CHAB.js";import{a as te}from"./chunk-RFB5A3B7.js";import{e as ee}from"./chunk-I7HI454U.js";import{B as Q,L as Y,w as K,x as W,z as q}from"./chunk-YCLTQEU6.js";import{a as H,d as Z}from"./chunk-2LSZ2I43.js";import{b as U,d as j}from"./chunk-BMWZYMK6.js";import{Ab as m,Bb as a,Cb as l,Db as S,Hb as y,Ib as D,Kb as u,Oa as x,Pc as h,Ra as r,Rb as G,Sb as z,Tb as _,Vc as A,Xb as p,Z as d,Zb as s,ca as I,da as f,eb as E,kc as V,lc as P,mc as L,nc as J,oa as v,tc as X,ub as N,uc as B,vb as T,vc as g,yb as b,zb as k}from"./chunk-ERITO7WM.js";function ae(i,t){if(i&1&&(a(0,"div",11),P(1),l()),i&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function re(i,t){if(i&1&&(a(0,"div"),G(1,1),S(2,"a",15),z(),l()),i&2){let e=s();r(2),m("href",e.downloadLink(),x)}}function le(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return f(n.doRepair(c.BackupID))}),_(1,2),l()}}function ce(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return f(n.doDownloadBugreport(c))}),_(1,3),l()}}function _e(i,t){if(i&1&&S(0,"sh-progress-bar",17),i&2){let e,o=s(2);m("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function se(i,t){if(i&1){let e=u();a(0,"div",11),y(1),_(2,4),D(),a(3,"a",16),P(4),l(),N(5,_e,1,1,"sh-progress-bar",17),a(6,"button",14),p("click",function(){I(e);let n=s();return f(n.doShowUpdate())}),_(7,5),l()()}if(i&2){let e,o,n=s(),c=g(0);r(3),m("href",(e=n.serverState())==null?null:e.UpdateDownloadLink,x),r(),L(c.Message),r(),T(((o=n.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function de(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return f(n.doShowLog(c.BackupID))}),_(1,6),l()}}function Ne(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s();return f(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function Te(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s();return f(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var Ce={Error:"error",Warning:"warn",Information:"primary"},M=class i{#e=d(j);#a=d(U);#r=d(q);#t=d(W);#i=d(F);#n=d(Z);#l=d(ee);#o=v(null);serverState=this.#i.serverState;index=A.required();notification=A.required();downloadLink=h(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ce[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(te,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let n=H.BASE||"",c=this.#l.xsrfQueryParam(),O=`${location.origin}${n}/api/v1/bugreport/${e}?token=${o.Token}${c?`&${c}`:""}`;t.DownloadLink=O,this.#o.set(O),this.triggerDownload(O)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let n;n=$localize`Download`;let c;c=$localize`New update found:`;let O;O=$localize`Show Update`;let $;$=$localize`Show Log`;let w;w=$localize` Show Help `;let R;return R=$localize` Show Help `,[t,e,o,n,c,O,$,w,R,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1&&(X(0),a(1,"sh-alert")(2,"div",9),P(3),l(),a(4,"div",10),N(5,ae,2,1,"div",11),N(6,re,3,1,"div"),a(7,"div",12),N(8,le,2,0,"button",13),N(9,ce,2,0,"button",13),N(10,se,8,3,"div",11),N(11,de,2,0,"button",13),N(12,Ne,2,0,"button",13),N(13,Te,2,0,"button",13),a(14,"button",14),p("click",function(){return o.deleteNotificationByIndex()}),_(15,0),l()()()()),e&2){let n=B(o.notification());r(),V(o.getAlertType(n.Type)),r(2),L(n.Title),r(2),T(n.Action!=="update:new"&&n.Action!=="update:manual"?5:-1),r(),T(o.downloadLink()?6:-1),r(2),T(n.Message!=null&&n.Message.includes("please run repair")?8:-1),r(),T(n.Action!=null&&n.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),T(n.Action==="update:new"?10:-1),r(),T(n.Action==="backup:show-log"?11:-1),r(),T(n.Action==="config:issue:unencrypted-database"?12:-1),r(),T(n.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,Q,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}"],changeDetection:0})};var pe=(i,t)=>t.ID;function Ie(i,t){if(i&1&&S(0,"app-notification",1),i&2){let e=t.$implicit,o=t.$index;m("index",o)("notification",e)}}function fe(i,t){i&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var ie=class i{#e=d(F);notificationFilterPredicate=A();notifications=h(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&b(0,Ie,1,2,"app-notification",1,pe,!1,fe,3,0,"div",2),e&2&&k(o.notifications())},dependencies:[M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{M as a,ie as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-WBTDGQME.js";import{a as z}from"./chunk-I4XRVBRQ.js";import{a as R}from"./chunk-RFB5A3B7.js";import{b as _}from"./chunk-HDJL2F2F.js";import{a as $}from"./chunk-BEXYTIOL.js";import{z as S}from"./chunk-YCLTQEU6.js";import{d as P}from"./chunk-2LSZ2I43.js";import{E as u,K as k,Pc as n,U as h,Z as l,l as d,oa as c,p as m,qa as f}from"./chunk-ERITO7WM.js";import{a as s,b as r}from"./chunk-7CGTOI24.js";var F={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Lock:$localize`Locking remote data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_Download:$localize`Downloading files …`,Restore_PatchWithRemoteFiles:$localize`Patching files with remote data …`,Restore_VerifyRestoredFiles:$localize`Verifying restored files …`,Restore_Finaluze:$localize`Finalizing restore …`,Restore_Complete:$localize`Restore complete!`,Recreate_Begin:$localize`Starting database recreate …`,Recreate_Delete:$localize`Deleting old database …`,Recreate_Create:$localize`Creating new database …`,Recreate_Download:$localize`Downloading files …`,Recreate_Process:$localize`Processing files …`,Recreate_Complete:$localize`Database recreate complete!`,Verify_Begin:$localize`Starting verification …`,Verify_Download:$localize`Downloading files …`,Verify_Process:$localize`Processing files …`,Verify_Complete:$localize`Verification complete!`,BugReport_Begin:$localize`Starting bug report …`,BugReport_Gathering:$localize`Gathering information …`,BugReport_Complete:$localize`Bug report complete!`,List_Begin:$localize`Starting list …`,List_Download:$localize`Downloading files …`,List_Process:$localize`Processing files …`,List_Complete:$localize`List complete!`,Delete_Begin:$localize`Starting delete …`,Delete_Download:$localize`Downloading files …`,Delete_Process:$localize`Processing files …`,Delete_Complete:$localize`Delete complete!`,Compact_Begin:$localize`Starting compact …`,Compact_Download:$localize`Downloading files …`,Compact_Process:$localize`Processing files …`,Compact_Complete:$localize`Compact complete!`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,ReadLockInfo_Running:$localize`Reading lock info …`,Error:$localize`Error!`};var C=class g{#i=l(z);#t=l(P);#o=l(B);#e=l(_);#c=l(S);#g=l($);#l=c(!1);#a=c(null);statusData=this.#a.asReadonly();lastState=null;serverState=n(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(s({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=n(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=n(()=>this.serverState()?.ProgramState==="Running");runningBackupId=n(()=>{let e=this.statusData();return!!(this.serverState()?.ActiveTask&&e?.task?.Status&&e?.task?.Status!=="Completed")?e?.BackupID??null:null});isResuming=c(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#m=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#k=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#r(r(s({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#s()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#s()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(R,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#s(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?d(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(m(t=>r(s({},e),{task:t??null})))}),u(()=>this.#l.set(!1))).subscribe({next:e=>{this.#r(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#r(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(r(s({},e),{progress:this.#p(e),statusText:this.#d(e),fileStatusText:this.#u(e),fileCountProgressText:this.#f(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,a=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,a)=>(o??0)+(a??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileProgress:e.CurrentFileoffset)??0,t=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileSize:e.CurrentFilesize)??0;if(!e.CurrentFilename)return"";let o=e.CurrentFilename.length>42?"..."+e.CurrentFilename.slice(-42):e.CurrentFilename,a=(i/t*100).toFixed(1);return $localize`${o} | File processed: ${this.#i.transform(i)}/${this.#i.transform(t)} - ${a}%`}#f(e){return $localize`Files processed ${e.ProcessedFileCount}/${e.TotalFileCount}`}#d(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?F[e.Phase]??e.Phase:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,a=e.TotalFileSize-e.ProcessedFileSize-t,b=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",p=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${p}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${p}`:i=`${b}${o} files (${this.#i.transform(a)}) to go ${p}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||g)};static \u0275prov=h({token:g,factory:g.\u0275fac,providedIn:"root"})};export{F as a,C as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-BEXYTIOL.js";import{c as j,e as q}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-BEXYTIOL.js";import{c as j,e as q}from"./chunk-I7HI454U.js";import{z as b}from"./chunk-YCLTQEU6.js";import{a as x,d as v}from"./chunk-2LSZ2I43.js";import{ma as L}from"./chunk-OQ6BKP5N.js";import{Eb as N,Ec as W,Fb as C,Gb as _,Gc as $,L as O,Pc as p,Ra as M,Rb as A,Sb as w,Tb as P,U as h,Ub as F,Vb as G,Z as c,eb as I,f as m,g as y,oa as n,qa as R}from"./chunk-ERITO7WM.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=R(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),W(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),G(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var T=class r{dialog=c(b);#e=c(v);#i=n("disconnected");#s=n(null);#t=n(-1);#r=n(0);#l=n(!1);#u=new y;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=c(j).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new y,this.#c()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#c(){this.#i.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(O(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,l=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(l),setTimeout(()=>{this.#c()},l)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,k=class r{#e=c(q);#i=c(D);dialog=c(b);#s=null;#t=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#o=n(null);#c=n(null);#a=void 0;#n=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#n.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#c.asReadonly();#h=null;taskCompleted=new m(e=>{this.#h=e});#d=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let l=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#i.hasWebSocketAuth()?`${t}//${l}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${l}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#S()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let o=JSON.parse(d.data);if(o.Success){u&&console.log("WebSocket authentication successful"),this.#S();return}else if(o?.Type==="legacystatus")u&&console.log("WebSocket authentication successful"),this.#S();else{console.error("WebSocket authentication failed:",o.Message),this.#t.set("disconnected");return}}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#t.set("disconnected");return}try{let o=JSON.parse(d.data),a=o?.Type;if(a==="legacystatus"||a==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(a==="reply"){let i=o;i.Success||console.error("WebSocket reply error:",i.Message)}else if(a==="progress"){let i=o;u&&console.log("Received progress update:",i.Data),this.#l.set(i.Data)}else if(a==="serversettings"){let i=o;u&&console.log("Received server settings update:",i.Data),this.#u.set(i.Data)}else if(a==="taskqueue"){let i=o;u&&console.log("Received task update:",i.Data),this.#o.set(i.Data)}else if(a==="taskcompleted"){let i=o;u&&console.log("Received task completed:",i.Data),this.#h?.next(i.Data)}else if(a==="backuplist"){let i=o;u&&console.log("Received backup list update:",i.Data),this.#c.set(i.Data)}else console.warn("Unknown WebSocket message type:",a)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var o=d.code===4401;o&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:a=>{console.error("Error refreshing token",a)}}),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#S(){this.#t.set("connected");let e=this.#n();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#a&&this.#a.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),l=s[e];(!l||JSON.stringify(l)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var V=10,J=class r{#e=c(k);#i=c(T);#s=c(v);#t=c(D);#r=n("longpoll");#l=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>V&&this.#n.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#r()==="websocket"?this.#e.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#r()==="websocket"?this.#e.serverState():this.#i.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#r()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#e.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(l=>l.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#a||this.#u()||(this.#a=!0,this.#d())}#d(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#p();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>V&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#d()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#d()},3e3)}})}#p(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{k as a,J as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-I7HI454U.js";import{Z as m,a as S,b as i,oa as c}from"./chunk-ERITO7WM.js";function u(...a){let e=c(...a);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}function A(a,e,o=!1,s){let l=m(f);e=l.getItemParsed(a,o)??e;let n=u(e),r=n[S];s?.equal&&(r.equal=s.equal);function g(t){t==null?l.removeItem(a):l.setItemParsed(a,t,o)}return n.set=t=>{g(t),i(r,t)},n.update=t=>{let T=t(n());g(T),i(r,T)},n}export{A as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l,d as w}from"./chunk-2LSZ2I43.js";import{d as k}from"./chunk-BMWZYMK6.js";import{a as b,d as O}from"./chunk-NBTTYKXH.js";import{xa as T,ya as s}from"./chunk-OQ6BKP5N.js";import{C as u,E as p,I as P,M as f,U as c,Z as i,f as R,i as E,l as y,oa as a,p as m,ya as v,z as N}from"./chunk-ERITO7WM.js";import{a as A}from"./chunk-7CGTOI24.js";var h=class r{platformId=i(v);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return s(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,o=!1){if(!s(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${o?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return T(this.platformId)?localStorage.length:0}getItem(e){return s(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!s(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){s(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!s(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){s(this.platformId)||localStorage.clear()}clear(){if(!s(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return s(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac})};function V(){try{let r=document.querySelector('meta[name="duplicati-proxy-config"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.startsWith("/"))return e}}catch(r){console.warn("Failed to read proxy configuration from meta tag:",r)}return null}function L(){try{let r=document.querySelector('meta[name="duplicati-enable-iframe-hosting"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.length>0)return e.toLowerCase()!=="true"}}catch(r){console.warn("Failed to read disable relay support configuration from meta tag:",r)}return!0}function $(){try{let r=document.querySelector('meta[name="duplicati-xsrf-config"]');if(r){let e=(r.getAttribute("data-header-name")||"").trim(),t=(r.getAttribute("data-query-name")||"").trim();if(e&&t&&e.length>0&&t.length>0){let n=new URLSearchParams(window.location.search).get(t);if(n)return{headerName:e,queryName:t,headerValue:n}}}}catch(r){console.warn("Failed to read XSRF configuration from meta tags:",r)}return null}function x(){let r=$();return r?`${r.queryName}=${encodeURIComponent(r.headerValue)}`:null}function X(){let r=V();if(r&&r.length>0){let t=r;t.startsWith("/")||(t=`/${t}`),t.endsWith("/")&&(t=t.slice(0,-1)),l.BASE=t}else l.BASE="";let e=$();e&&(l.HEADERS={[e.headerName]:e.headerValue})}var g=class r{#i=i(h);#o=a(null);#t=window.self!==window.top&&L();#r=a(this.#t);relayIsEnabled=this.#r.asReadonly();config=this.#o.asReadonly();configLoaded=this.#t?new E:null;isLoading=a(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#s(),this.#t&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),o=JSON.parse(t);if(!o?.accessToken||!o?.clientId||!o?.machineServerUrl){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.clientId!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.accessToken!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.machineServerUrl!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}let n=this.#i.getItem("locale")??"en-US",I=o.locale??"en-US";n!==I&&(this.#i.setItem("locale",I),window.location.reload()),this.#o.set(o),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#s(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};var D="PROXY_AUTHED_FAKE_TOKEN",d="refreshNonce",S="v1:persist:duplicati:refreshNonce",M=class r{#i=i(k);#o=i(O);#t=i(w);#r=i(g);#e=a(null);#s=a(!1);#a=a(!1);#l=a(x());xsrfQueryParam=this.#l.asReadonly();token=this.#e.asReadonly();isLoggingOut=this.#s.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(d);return}t?localStorage.setItem(S,e||""):sessionStorage.setItem(d,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(d),t=localStorage.getItem(S),o=e||t;return{requestBody:o?{requestBody:{Nonce:o}}:void 0,local:o===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(u(1),f(o=>{o.AccessToken?(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t)):this.#e.set(null)}))}#n=null;refreshToken(){if(this.#r.relayIsEnabled())return this.#e.set(D),new R(o=>{o.next({AccessToken:D}),o.complete()});if(this.#a())return this.#t.postApiV1AuthIssuetokenByOperation({operation:"websocket"}).pipe(u(1),f(o=>{o.Token&&this.#e.set(o.Token)}),m(o=>({AccessToken:o.Token})));if(this.#n)return this.#n;let{requestBody:e,local:t}=this.getRefreshNonceBody();return this.#n=this.#t.postApiV1AuthRefresh(e).pipe(u(1),f(o=>{o.AccessToken&&(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t))}),p(()=>{this.#n=null}),P(1)),this.#n}checkProxyAuthed(){let e=new b(A({"custom-proxy-check":"true"},l.HEADERS??{})),t=l.BASE||"";return this.#o.post(`${t}/api/v1/auth/status`,null,{headers:e}).pipe(m(o=>{let n=o;return n?.authorized&&n?.socketToken?(this.#e.set(n.socketToken),this.#a.set(!0),!0):!1}),N(()=>y(!1)))}logout(){this.#s.set(!0);let{requestBody:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(d),t&&localStorage.removeItem(S),this.#t.postApiV1AuthRefreshLogout(e).pipe(u(1),p(()=>{this.#s.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};export{h as a,X as b,g as c,D as d,M as e};
|