@duplicati/ngclient 0.0.178 → 0.0.179
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/assets/dest-icons/dincloud.png +0 -0
- package/assets/dest-icons/dreamhost.png +0 -0
- package/assets/dest-icons/dunkel.png +0 -0
- package/assets/dest-icons/duplicati.png +0 -0
- package/assets/dest-icons/hosteurope.png +0 -0
- package/assets/dest-icons/ibmcos.png +0 -0
- package/assets/dest-icons/impossiblecloud.png +0 -0
- package/assets/dest-icons/infomaniak.png +0 -0
- package/assets/dest-icons/polisystems.png +0 -0
- package/assets/dest-icons/rabata.png +0 -0
- package/assets/dest-icons/sakuracloud.png +0 -0
- package/assets/dest-icons/scaleway.png +0 -0
- package/assets/dest-icons/seagatelyve.png +0 -0
- package/assets/dest-icons/storadera.png +0 -0
- package/assets/dest-icons/wasabi.png +0 -0
- package/assets/sh.woff2 +0 -0
- package/chunk-2HZ7VZ3D.js +1 -0
- package/{chunk-AJMSZFGR.js → chunk-2LAZMIL4.js} +1 -1
- package/{chunk-M7SLT3MF.js → chunk-2U23BDRP.js} +1 -1
- package/chunk-3CCAGUTG.js +1 -0
- package/{chunk-MIUFEQ3S.js → chunk-4F7BBMQ2.js} +1 -1
- package/{chunk-WNOXOC4X.js → chunk-4JVBYGOM.js} +1 -1
- package/{chunk-PW55LN2T.js → chunk-55RRXYNB.js} +1 -1
- package/{chunk-Y4IW22ZU.js → chunk-6AX4L2U5.js} +1 -1
- package/chunk-6GJYSOXJ.js +1 -0
- package/{chunk-JTZ2JEV4.js → chunk-6WVN2KRC.js} +1 -1
- package/{chunk-6CYY2QG6.js → chunk-7XLQX4B6.js} +1 -1
- package/{chunk-G4FG3YUE.js → chunk-C6LHWLWL.js} +1 -1
- package/chunk-CM6KCZ6Q.js +1 -0
- package/{chunk-JTQDY6AH.js → chunk-D47P7LFF.js} +1 -1
- package/{chunk-WHLIHNEE.js → chunk-DNNNVTJK.js} +1 -1
- package/chunk-DV67LYLW.js +2 -0
- package/{chunk-YQSTMC2K.js → chunk-FEBDZE5A.js} +1 -1
- package/{chunk-NEQW3H7F.js → chunk-FHO4PDLK.js} +1 -1
- package/{chunk-PNECF7JS.js → chunk-HC6NRM4H.js} +1 -1
- package/chunk-HDM6ELAR.js +1 -0
- package/chunk-HEV3WHAH.js +1 -0
- package/{chunk-VSLN6R7K.js → chunk-HGZYRAXZ.js} +1 -1
- package/chunk-HPU4SX5Z.js +1 -0
- package/chunk-I77LGXJN.js +2 -0
- package/{chunk-76LEHUPM.js → chunk-IE7RK4YW.js} +1 -1
- package/chunk-IQI7X3JY.js +2 -0
- package/chunk-JKDYRSAH.js +1 -0
- package/{chunk-N4ADMNNU.js → chunk-JRFX5D6S.js} +1 -1
- package/chunk-JRMY6F6W.js +1 -0
- package/chunk-JSYVSJJU.js +1 -0
- package/{chunk-UT542KNO.js → chunk-L37SKX3M.js} +1 -1
- package/chunk-LVPZTSKG.js +1 -0
- package/{chunk-5HQJVUNE.js → chunk-MVPMVVRC.js} +1 -1
- package/chunk-PNYEL323.js +1 -0
- package/{chunk-AO4ZIHUL.js → chunk-QNZTEY37.js} +1 -1
- package/chunk-RIVMPP47.js +1 -0
- package/chunk-SYMBRSKN.js +7 -0
- package/{chunk-WLXOWWZB.js → chunk-T7XH5JIZ.js} +1 -1
- package/chunk-TOB4ESNO.js +1 -0
- package/{chunk-5MXXIFJM.js → chunk-U5GRFEV3.js} +1 -1
- package/chunk-UTLK72CH.js +1 -0
- package/{chunk-U4T4BSPF.js → chunk-VYIUFXYO.js} +1 -1
- package/chunk-WGXHTY3T.js +1 -0
- package/{chunk-PJLZ7V22.js → chunk-WPT4ETG3.js} +1 -1
- package/chunk-XECFWVLT.js +1 -0
- package/index.html +42 -1
- package/main-CMSRKMLS.js +1 -0
- package/package.json +1 -1
- package/assets/favicon.ico +0 -0
- package/chunk-27UON6YV.js +0 -2
- package/chunk-4IUPBI2K.js +0 -1
- package/chunk-5UXRNNTT.js +0 -1
- package/chunk-6O5DBV6Y.js +0 -1
- package/chunk-7IQ5FSGI.js +0 -1
- package/chunk-EBKB4YCL.js +0 -1
- package/chunk-F3RWB4I6.js +0 -1
- package/chunk-H6UYYWCU.js +0 -1
- package/chunk-J5LEAYPL.js +0 -1
- package/chunk-KR56GPXG.js +0 -2
- package/chunk-PCLJOXMF.js +0 -1
- package/chunk-PUOOECEB.js +0 -1
- package/chunk-QZJ7QZZ4.js +0 -1
- package/chunk-R6XDJFPE.js +0 -1
- package/chunk-SS7TCWY5.js +0 -1
- package/chunk-TXPM764C.js +0 -1
- package/chunk-WS7QWRRY.js +0 -1
- package/chunk-WWIKIIGV.js +0 -7
- package/chunk-WWIXPGSZ.js +0 -1
- package/chunk-XRXXVFJ4.js +0 -1
- package/chunk-XZZDJCRM.js +0 -1
- package/main-OOXK65IC.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-QNZTEY37.js";import{a as R}from"./chunk-U63HBLGG.js";import{a as $}from"./chunk-WILUKPQ3.js";import{b as z}from"./chunk-PNYEL323.js";import{a as b}from"./chunk-NEV6JB5M.js";import{z as S}from"./chunk-RYXU2QDS.js";import{b as P}from"./chunk-BKANUILG.js";import{E as u,K as k,Mc as c,R as m,W as s,l as d,la as n,na as f,p as h}from"./chunk-XYHHESIX.js";import{a,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_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_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,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!`,Error:$localize`Error!`},_=class g{#i=s(R);#t=s(P);#o=s(B);#e=s(z);#c=s(S);#g=s(b);#s=n(!1);#a=n(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(a({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#s.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=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()});#d=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#l(r(a({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open($,{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()}#r(){this.#s.set(!0),this.#t.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?d(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(h(t=>r(a({},e),{task:t??null})))}),u(()=>this.#s.set(!1))).subscribe({next:e=>{this.#l(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#l(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(r(a({},e),{progress:this.#p(e),statusText:this.#u(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,l=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,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?F[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,l=e.TotalFileSize-e.ProcessedFileSize-t,v=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=`${v}${o} files (${this.#i.transform(l)}) 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=m({token:g,factory:g.\u0275fac,providedIn:"root"})};export{_ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-HEV3WHAH.js";import"./chunk-7XLQX4B6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-QNZTEY37.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-LVPZTSKG.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-CGKL2MHM.js";import"./chunk-RIVMPP47.js";import{b as h}from"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{B,u as R}from"./chunk-RYXU2QDS.js";import{b as A}from"./chunk-BKANUILG.js";import{b as M,e as O}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as a,Bb as _,Mc as L,Pa as i,Pb as c,Qb as d,Rb as l,Ub as p,Vb as I,W as C,cb as f,jc as E,la as r,lc as N,sb as s,tb as u,ub as S,wb as T,xb as g,zb as F}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";function $(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function k(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;N(" ",n," ")}}var D=class e{#t=C(A);#e=C(M);#n=h(this.#e.params);runId=L(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=f({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=p(o),[t,n,o,[1,"back"],["type","button","shButton","","routerLink","../",1,"small"],["type","button","shButton","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"sh-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,$,1,0),s(12,P,1,0),s(13,k,1,0),s(14,v,1,0),d(),a(),F(15,"code"),T(16,U,2,1,null,null,S),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[b,R,B,O],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-HDM6ELAR.js")},{path:"destination",loadComponent:()=>import("./chunk-JSYVSJJU.js")},{path:"source-data",loadComponent:()=>import("./chunk-UTLK72CH.js")},{path:"schedule",loadComponent:()=>import("./chunk-6GJYSOXJ.js")},{path:"options",loadComponent:()=>import("./chunk-JKDYRSAH.js")}];export{o as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Me}from"./chunk-
|
|
1
|
+
import{a as Me}from"./chunk-I77LGXJN.js";import"./chunk-T5LLH46J.js";import"./chunk-DV67LYLW.js";import{a as ge}from"./chunk-HEV3WHAH.js";import{j as F}from"./chunk-3CCAGUTG.js";import{a as Ee}from"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import{a as Ne}from"./chunk-7XLQX4B6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-QNZTEY37.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-LVPZTSKG.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-CGKL2MHM.js";import"./chunk-RIVMPP47.js";import{b as A}from"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{B as me,G as _e,H as de,L as ce,P as Ce,c as Q,e as Y,f as Z,j as ee,n as te,o as ne,p as oe,q as ie,r as ae,s as re,t as se,u as le}from"./chunk-RYXU2QDS.js";import{a as pe,b as ue}from"./chunk-BKANUILG.js";import{b as j,d as H,e as q}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as E,Ab as n,Bb as r,Fb as S,Gb as T,Ib as y,Pa as m,Pb as f,Qb as O,Rb as c,Sb as v,Tb as U,Vb as x,W as p,Xb as g,aa as M,cb as R,gc as w,la as L,na as D,oc as K,pc as J,qc as X,sb as $,tb as b,ub as B,vc as V,wb as G,wc as z,xb as k,xc as W,yb as u,zb as a}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var Se=()=>["backup"];function Te(s,t){s&1&&r(0,"sh-progress-bar",11)}function fe(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",30),n()),s&2){let e=t.$implicit,l=t.$index;m(),u("id",V("filter-",l))("formControl",e)}}function Oe(s,t){if(s&1){let e=y();a(0,"form",12)(1,"sh-select",13)(2,"label",14),c(3,1),n(),r(4,"input",15),n(),a(5,"sh-form-field")(6,"label",16),c(7,2),n(),r(8,"textarea",17),n(),a(9,"sh-form-field")(10,"label",18),c(11,3),n(),r(12,"textarea",19),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",12)(16,"sh-form-field")(17,"label",20),c(18,5),n(),r(19,"input",21),n(),a(20,"sh-form-field")(21,"label",22),c(22,6),n(),r(23,"input",23),n(),a(24,"app-toggle-card",24),S(25,25),c(26,7),T(),S(27,26),G(28,fe,2,3,"sh-form-field",null,B),T(),n()(),a(30,"app-options-list",27),X("optionsChange",function(i){E(e);let C=g();return J(C.settings,i)||(C.settings=i),M(i)}),n(),a(31,"div",28)(32,"button",29),x("click",function(){E(e);let i=g();return M(i.submit())}),f(33,8),r(34,"sh-icon"),O(),n()()}if(s&2){let e=g();u("formGroup",e.baseCmdForm),m(),u("options",e.commandOptions()??W(10,Se))("inlineSearch",!0),m(14),u("formGroup",e.standardFields),m(9),u("disallowToggle",!0),m(4),k(e.standardFields.controls.filters.controls),m(2),K("options",e.settings),u("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),v(e.baseCmdForm.value.command),U(33)}}var _=new ae,P=class s{#e=p(F);#t=p(ue);#n=p(H);#o=p(j);#i=p(pe);#a=p(Ne);#r=A(this.#o.params);commandOptions=A(this.#i.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#l=D(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
|
|
2
2
|
`).filter(o=>o.length>0)??[],i=this.standardFields.value,C=i.filters??[],N=[t.command,e,...l,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...C.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:N}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
3
|
`)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=R({type:s,selectors:[["app-commandline"]],features:[z([F])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let l;l=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let C;C=$localize`Advanced options`;let N;N=$localize`Backup ID`;let o;o=$localize`Backup Name`;let I;I=$localize`Filters`;let h;return h=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,l,i,C,N,o,I,h,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,l){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",9)(3,"button",10),f(4,0),r(5,"sh-icon"),O(),n()(),$(6,Te,1,0,"sh-progress-bar",11)(7,Oe,35,11),n()),e&2&&(m(6),b(l.finishedLoading()?7:6))},dependencies:[re,ee,Q,Y,Z,ge,Me,Ee,se,te,ie,oe,ne,q,de,me,_e,Ce,ce,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-
|
|
1
|
+
import{a as _e}from"./chunk-HEV3WHAH.js";import"./chunk-7XLQX4B6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as se}from"./chunk-QNZTEY37.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-LVPZTSKG.js";import"./chunk-AGPZBYW6.js";import{a as b}from"./chunk-WILUKPQ3.js";import"./chunk-CGKL2MHM.js";import"./chunk-RIVMPP47.js";import{a as le,b as m}from"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-RYXU2QDS.js";import{b as oe}from"./chunk-BKANUILG.js";import{b as q,e as j}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as i,B as G,Bb as c,C as g,D as L,E as p,Mc as E,Pa as _,Pb as u,Qb as h,Rb as A,Sb as H,Tb as J,Vb as T,W as F,cb as V,gc as C,ic as K,jc as D,la as s,na as P,oc as X,p as y,pc as z,qc as W,sb as w,tb as U,yb as d,zb as n}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as P,r as O}from"./chunk-RYXU2QDS.js";import{b as B}from"./chunk-BKANUILG.js";import{E as L,Mc as w,R as N,W as I,la as b,p as f}from"./chunk-XYHHESIX.js";import{a,b as D}from"./chunk-7CGTOI24.js";var y=class{constructor(t){this.loader=t}_data=b(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(L(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var d=class e{#e=I(B);#o=new y(()=>this.getS3Config("Providers"));#n=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#s=new y(()=>this.getS3Config("StorageClasses"));#i=w(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new y(()=>this.getStorjConfig("Satellites"));#l=new y(()=>this.getStorjConfig("AuthenticationMethods"));#c=new y(()=>this.getOpenstackConfig("Providers"));#p=new y(()=>this.getOpenstackConfig("Versions"));#u=new y(()=>this.getGcsConfig("Locations"));#m=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3ProvidersFiltered(t){return w(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(f(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(f(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(f(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(f(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(f(o=>this.#t(o)),f(o=>o.find(r=>r.key==="folders")?.value),f(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(f(r=>this.#t(r)),f(r=>r.find(n=>n.key==="api-key")?.value))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=N({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new O,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},U={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return a({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},v={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},F=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return a({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:-2,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:!0,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>a({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[P.required,P.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??!1}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>b([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0,validate:e=>{function t(o){if(!o)return!1;let r=o.length;return!(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[P.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return M(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:i,path:u}=m(t);return a({destinationType:e,dynamic:a({"rclone-remote-repository":i,"rclone-remote-path":u},n)},r)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return M(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],a({destinationType:e,custom:{path:h(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,E(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),i=n.split("/")[0],u=n.split("/").slice(1).join("/");return a({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:U.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${V([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${V([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],a({destinationType:e,custom:{path:h(t),bucket:n}},r)}}},g("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),g("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),g("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),g("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),g("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),g("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),g("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),g("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),g("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),g("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),g("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),g("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),g("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),g("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"])],ge={".amazonaws.com":"Amazon S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3",".rabata.io":"Rabata S3"};var x=new O,$=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?([^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return M(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function M(e,t,o,r,n){let i=V(n),u=encodeURIComponent(R(t)),k=u==""?"":u+H(o),S=r??"",A=S.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,z=E(k,W(S));return`${A}${z}${i}`}function T(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function E(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function W(e){return e.split("/").map(encodeURIComponent).join("/")}function h(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new $(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function R(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function H(e){return e==null||e===""?"":":"+e.toString()}function _(e){try{let o=new $(e),r=F.find(n=>n.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return C(t)}function C(e){return F.find(o=>o.key===e||o.customKey===e)??F.find(o=>`${o.key}s`===e)??null??a({key:e,displayName:e},U)}function ve(e){return F.filter(t=>t.key===e||t.customKey===e)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.hostname),port:e.port,path:T(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=C(e);return t.searchParams.forEach((i,u)=>{n?.dynamicFields?.some(S=>S===u||S?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i)}),{advanced:o,dynamic:r}}function V(e,t=!1){let o=e.map(([n,i])=>`${n}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Fe(e){let t=e.destinationType??"";return C(t)?.mapper.to(e)??""}function Pe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return C(t).mapper.from(t,new $("http://localhost"),e);let n=_(e),i="";`${n.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??"");try{let u=new $(r+i);if(u.host==="undefined")return null;let k=o.split("?")[0].split("/")[0],S=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),G=k.split("."),A=G.length===4&&G.every(z=>z.length&&z.length<=3&&!isNaN(Number(z))&&parseInt(z)<=255);return S&&!A?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function j(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
2
|
+
`).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function Oe(e){return j(e).map(([t,o])=>({Name:t,Value:o}))}function Me(e){return Object.fromEntries(j(e))}function Ve(e){if(!e)return!1;let t=e.length;return!(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function Ce(e){if(!e||e.length>253)return!1;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}function g(e,t,o,r,n){return D(a({},v),{customKey:`s3-${e}`,icon:r??v.icon,displayName:$localize`${t} (S3)`,description:o??$localize`Store backups in ${t} storage.`,dynamicFields:[...(v.dynamicFields??[]).filter(i=>i?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:i=>i.get(d).getS3ProvidersFiltered(u=>n.some(k=>u.value.endsWith(k))),isMandatory:!0,formElement:i=>x.control(i??"")}],mapper:D(a({},v.mapper),{to:i=>{let{bucket:u,path:k}=i.custom;return n.some(S=>i.dynamic["s3-server-name"]?.endsWith(S))&&(i.destinationType="s3"),c(i,u,null,k)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>n.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??!1})})}export{d as a,_ as b,C as c,ve as d,Fe as e,Pe as f,Oe as g,Me as h,Ve as i,Ce as j,ge as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as W}from"./chunk-
|
|
1
|
+
import{a as W}from"./chunk-HEV3WHAH.js";import"./chunk-7XLQX4B6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as j}from"./chunk-QNZTEY37.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-LVPZTSKG.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-CGKL2MHM.js";import"./chunk-RIVMPP47.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{B as m,C as N,G as w,L as z,u as O}from"./chunk-RYXU2QDS.js";import{b as H}from"./chunk-BKANUILG.js";import{e as g}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as o,Bb as r,Pa as s,Pb as E,Qb as S,Rb as a,Sb as v,Tb as B,W as T,Xb as u,cb as A,ib as D,jc as p,mc as J,pb as G,qb as k,sb as R,tb as d,ub as y,wb as b,xb as x,xc as C,yb as l,yc as X,zb as n}from"./chunk-XYHHESIX.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 K}from"./chunk-FXF5TO2Q.js";import"./chunk-SD4AWG7T.js";import{g as q}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-FXF5TO2Q.js";import"./chunk-SD4AWG7T.js";import{g as q}from"./chunk-MVPMVVRC.js";import"./chunk-I77LGXJN.js";import"./chunk-T5LLH46J.js";import{b as Z}from"./chunk-HGZYRAXZ.js";import"./chunk-DV67LYLW.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-6AX4L2U5.js";import{a as V}from"./chunk-7XLQX4B6.js";import"./chunk-QNZTEY37.js";import"./chunk-6Q6SSTBK.js";import{a as j}from"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import"./chunk-CGKL2MHM.js";import"./chunk-FBWFZMGL.js";import{b as H}from"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{C as W,L as X,O as z,u as J}from"./chunk-RYXU2QDS.js";import{b as B}from"./chunk-BKANUILG.js";import{b as w}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import{qa as k}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as s,Bb as R,Cc as T,Dc as d,Fb as P,Gb as m,Mc as b,Pa as a,Pb as y,Qb as D,Rb as r,Sb as v,Tb as x,W as c,Xb as g,ba as u,ca as f,cb as A,jc as M,la as I,mc as N,sb as O,tb as p,yb as C,zb as o}from"./chunk-XYHHESIX.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{c as a,d as b}from"./chunk-
|
|
1
|
+
import{c as a,d as b}from"./chunk-MVPMVVRC.js";import"./chunk-I77LGXJN.js";import"./chunk-T5LLH46J.js";import"./chunk-DV67LYLW.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-3CCAGUTG.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-6Q6SSTBK.js";import"./chunk-WILUKPQ3.js";import"./chunk-RIVMPP47.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ve}from"./chunk-7XLQX4B6.js";import{a as be}from"./chunk-AJXTVI3H.js";import{a as he}from"./chunk-QNZTEY37.js";import{a as ye}from"./chunk-LVPZTSKG.js";import{a as Le}from"./chunk-RIVMPP47.js";import{b as Me}from"./chunk-PNYEL323.js";import{a as Ie}from"./chunk-NEV6JB5M.js";import{b as de}from"./chunk-QWNOPLJC.js";import{B as I,D as Oe,H as Ne,L as Ae,M as De,O as Pe,P as fe,Y as Re,c as pe,e as Ce,i as ge,k as Ee,s as w,u as V,w as Fe,z as me}from"./chunk-RYXU2QDS.js";import{b as M}from"./chunk-BKANUILG.js";import{e as Se}from"./chunk-GO4NSDR6.js";import{la as ue}from"./chunk-RMOTUTEQ.js";import{$ as F,Ab as _,Bb as S,Cc as H,Dc as Te,E as U,Ec as ce,Ib as A,Mc as G,Pa as r,Pb as d,Qb as p,Qc as x,Rb as g,Sb as se,Tb as ae,Ub as v,Vb as c,W as C,Xb as E,aa as m,cb as D,fc as _e,gc as f,jc as L,la as u,lc as le,mc as re,na as te,oc as y,pc as b,qc as $,sb as O,tb as N,ub as ne,wb as ie,xb as oe,xc as X,yb as P,zb as a}from"./chunk-XYHHESIX.js";function xe(o,t){if(o&1){let n=A();a(0,"sh-radio",10),c("click",function(){let i=F(n).$implicit,s=E();return m(s.pauseOption.set(i.value))}),L(1),_()}if(o&2){let n=t.$implicit,e=E();f("active",e.pauseOption()===n.value),r(),le(" ",n.label," ")}}var we=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],z=class o{#e=C(M);pauseOptions=u(we);closed=x();isSubmitting=u(!1);pauseTransfers=u(!1);pauseOption=u(void 0);submit(){this.isSubmitting.set(!0);let t=this.pauseTransfers()||null,n=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:n,pauseTransfers:t}).pipe(U(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let t;t=$localize`Pause settings`;let n;n=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let s;return s=$localize` Update settings `,[t,n,e,i,s,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header",5)(1,"h3"),g(2,0),_()(),a(3,"div",6)(4,"div",7),ie(5,xe,2,3,"sh-radio",8,ne),_(),a(7,"div",9)(8,"sh-checkbox",10),c("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),g(9,1),_(),a(10,"sh-alert",11),g(11,2),_()()(),a(12,"footer",12)(13,"button",13),c("click",function(){return e.closed.emit()}),g(14,3),_(),a(15,"button",14),c("click",function(){return e.submit()}),g(16,4),_()()),n&2&&(r(5),oe(e.pauseOptions()),r(3),f("active",e.pauseTransfers()),r(7),f("loader",e.isSubmitting()))},dependencies:[w,De,Oe,Fe,I],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var $e=()=>["/connect/logon"];function Ve(o,t){o&1&&(d(0,0,1),S(1,"div",9),p())}function ze(o,t){o&1&&(d(0,0,2),S(1,"div",10),p())}function Je(o,t){if(o&1){let n=A();a(0,"div",8),c("click",function(){F(n);let i=E();return m(i.resetAndRetry())}),d(1,0),O(2,Ve,2,0)(3,ze,2,0),p(),_()}if(o&2){let n=E();r(2),N(n.resetting()?2:3)}}function Xe(o,t){o&1&&(a(0,"div",6),d(1,1),S(2,"div",11),p(),_()),o&2&&P("routerLink",X(1,$e))}function He(o,t){o&1&&(a(0,"div",6),d(1,2),S(2,"div",10),p(),_()),o&2&&P("routerLink",X(1,$e))}function Ye(o,t){if(o&1){let n=A();a(0,"div",7),d(1,3),a(2,"sh-icon",12),c("click",function(){F(n);let i=E();return m(i.cancel())}),_(),a(3,"div",13),c("click",function(){F(n);let i=E();return m(i.claim())}),_(),S(4,"div",14),p(),_()}}function Ke(o,t){if(o&1){let n=A();a(0,"div",8),c("click",function(){F(n);let i=E();return m(i.openConsole())}),d(1,4),S(2,"div",15),p(),_()}}var B=class o{#e=C(ye);state=this.#e.state;resetting=u(!1);stateEffect=te(()=>{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=D({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 T;return T=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,s,T,[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&&O(0,Je,4,1,"div",5)(1,Xe,3,2,"div",6)(2,He,3,2,"div",6)(3,Ye,5,0,"div",7)(4,Ke,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",s=e.state()==="registeringfaulted",T=e.state()==="registering",l=e.state()==="registered",R=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";N(s?0:T?1:i?2:l?3:R?4:-1)}},dependencies:[Se,V,Re],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}.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 Ge={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},We=["mbps","gbps"],Be=8,Z=1024,J=Z*1024,q=J*1024,Q=q*1024,ke=Q*1024,je={B:1,KB:Z,MB:J,GB:q,TB:Q,PB:ke},Ze=1e3,j=Ze*1e3,W=j*1e3,qe=[{threshold:ke,unitPrefix:"PByte"},{threshold:Q,unitPrefix:"TByte"},{threshold:q,unitPrefix:"GByte"},{threshold:J,unitPrefix:"MByte"},{threshold:Z,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],k=class o{#e=C(M);closed=x();isSubmitting=u(!1);sizeOptions=u([...We]);maxUpload=u(0);maxDownload=u(0);maxUploadUnit=u("mbps");maxDownloadUnit=u("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(t,n){let i=t*(je[n.toUpperCase()]||J)*Be;return i===0?{value:0,unit:"mbps"}:i>=W?{value:parseFloat((i/W).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/j).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case"gbps":e=t*W;break;case"mbps":e=t*j;break}let i=e/Be;if(i===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:s,unitPrefix:T}of qe)if(i>=s)return{valueForApi:Math.round(i/s),unitPrefixForApi:T};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]),T=i[2],l=this.convertToBitsPerSecondUnits(s,T);this.maxUpload.set(l.value),this.maxUploadUnit.set(l.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]),T=i[2],l=this.convertToBitsPerSecondUnits(s,T);this.maxDownload.set(l.value),this.maxDownloadUnit.set(l.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,T=this.maxDownloadUnit();if(e>0){let{valueForApi:l,unitPrefixForApi:R}=this.convertFromBitsPerSecondUnits(e,i),h=Ge[R];h?t=`${l}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${R}. Defaulting to empty string.`)}if(s){let{valueForApi:l,unitPrefixForApi:R}=this.convertFromBitsPerSecondUnits(s,T),h=Ge[R];h?n=`${l}${h}`:console.error(`Invalid unit prefix for API submission (download): ${R}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(U(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:l=>{console.error("Failed to submit throttle settings:",l)}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({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 T;return T=$localize` Update settings `,[t,n,e,i,s,T,["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"),g(2,0),_(),a(3,"p"),g(4,1),_()(),a(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),g(9,2),_(),a(10,"sh-form-field")(11,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),$("ngModelChange",function(s){return b(e.maxUpload,s)||(e.maxUpload=s),s}),_()(),a(12,"sh-select",10)(13,"input",11),$("ngModelChange",function(s){return b(e.maxUploadUnit,s)||(e.maxUploadUnit=s),s}),_()()(),a(14,"div",8)(15,"label"),g(16,3),_(),a(17,"sh-form-field")(18,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),$("ngModelChange",function(s){return b(e.maxDownload,s)||(e.maxDownload=s),s}),_()(),a(19,"sh-select",10)(20,"input",11),$("ngModelChange",function(s){return b(e.maxDownloadUnit,s)||(e.maxDownloadUnit=s),s}),_()()()()(),a(21,"footer",12)(22,"button",13),c("click",function(){return e.closed.emit(!1)}),g(23,4),_(),a(24,"button",14),c("click",function(){return e.submit()}),g(25,5),_()()),n&2&&(r(11),y("ngModel",e.maxUpload),r(),P("isClearable",!1)("options",e.sizeOptions()),r(),y("ngModel",e.maxUploadUnit),r(5),y("ngModel",e.maxDownload),r(),P("isClearable",!1)("options",e.sizeOptions()),r(),y("ngModel",e.maxDownloadUnit),r(4),f("loader",e.isSubmitting()))},dependencies:[w,pe,Ee,Ce,ge,Ne,fe,I],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 Qe(o,t){if(o&1&&(a(0,"div"),L(1),_(),S(2,"sh-progress-bar",12)),o&2){let n=E();r(),re("",n.statusData().actionText," - ",n.statusData().statusText),r(),P("value",n.statusData().progress*100)}}function et(o,t){if(o&1&&(a(0,"div",8),d(1,1),S(2,"sh-icon"),H(3,"relativeTime"),H(4,"date"),p(),_()),o&2){let n,e=E();r(4),se((n=e.nextBackup().backup)==null||n.Backup==null?null:n.Backup.Name)(Te(3,3,e.nextBackup().time))(ce(4,5,e.nextBackup().time,"shortTime")),ae(1)}}function tt(o,t){o&1&&(a(0,"div",8),g(1,2),_())}function nt(o,t){o&1&&(a(0,"div",9),d(1,3),S(2,"sh-spinner"),p(),_()),o&2&&(r(2),_e("--spinner-size","12px")("--spinner-thickness","2px"))}function it(o,t){o&1&&S(0,"app-remote-connectivity-status")}function ot(o,t){if(o&1){let n=A();a(0,"button",11),c("click",function(){F(n);let i=E(2);return m(i.abort())}),d(1,4),S(2,"sh-icon"),p(),_()}}function st(o,t){if(o&1){let n=A();a(0,"button",11),c("click",function(){F(n);let i=E(2);return m(i.stop())}),d(1,5),S(2,"sh-icon"),p(),_()}}function at(o,t){if(o&1&&O(0,ot,3,0,"button",13)(1,st,3,0,"button",13),o&2){let n=E();N(n.isStopping()?0:1)}}function _t(o,t){o&1&&(d(0,0,1),S(1,"sh-icon"),p())}function lt(o,t){o&1&&(d(0,0,2),S(1,"sh-icon"),p())}var Ue=new Date,ee=class o{#e=C(M);#t=C(ve);#n=C(me);#a=C(he);#i=C(de);#_=C(Ie);#o=C(Me);#l=C(Le);minsAgo=Ue.setMinutes(Ue.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=G(()=>this.#o.serverState()?.ActiveTask?.Item1);isStopping=G(()=>this.runningTask()==this.#s());#s=u(-1);pgState=G(()=>this.#o.serverState());isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;nextBackup=G(()=>{let t=this.#a.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});openThrottleSettingsDialog(){this.#n.open(k,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(z,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#s.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.#_.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-status-bar"]],decls:16,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD*11: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/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12: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/*12:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let i;i=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let T;return T=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,i,s,T,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["shButton","",3,"click"],[1,"raised","primary",3,"value"],["shButton",""]]},template:function(n,e){if(n&1&&(a(0,"div",6)(1,"div",7),O(2,Qe,3,3)(3,et,5,8,"div",8)(4,tt,2,0,"div",8)(5,nt,3,4,"div",9),_(),a(6,"div",10),O(7,it,1,0,"app-remote-connectivity-status"),O(8,at,2,1),a(9,"button",11),c("click",function(){return e.pauseResume()}),d(10,0),O(11,_t,2,0)(12,lt,2,0),p(),_(),a(13,"button",11),c("click",function(){return e.openThrottleSettingsDialog()}),a(14,"sh-icon"),L(15,"speedometer"),_()()()()),n&2){let i;r(2),N((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),r(5),N(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?7:-1),r(),N(e.runningTask()?8:-1),r(),f("loader",e.isResuming()),r(2),N(e.clientIsRunning()?11:12)}},dependencies:[B,V,I,Pe,Ae,be,ue],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)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem;flex:1 0}.current-backup-progress[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{max-width:18.75rem;width:100%}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{ee as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-6AX4L2U5.js";import{a as Z}from"./chunk-WILUKPQ3.js";import{B as q,L as Y,w as H,x as K,z as W}from"./chunk-RYXU2QDS.js";import{b as Q}from"./chunk-BKANUILG.js";import{b as U,d as j}from"./chunk-GO4NSDR6.js";import{$ as p,Ab as l,Bb as m,Fb as y,Gb as D,Ib as f,Ma as M,Mc as P,Pa as r,Pb as G,Qb as V,Rb as _,Rc as S,Vb as u,W as T,Xb as s,aa as I,cb as E,ic as z,jc as A,kc as x,la as v,lc as J,rc as X,sb as d,sc as B,tb as N,tc as g,wb as b,xb as k,yb as O,zb as a}from"./chunk-XYHHESIX.js";function ne(n,t){if(n&1&&(a(0,"div",11),A(1),l()),n&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function oe(n,t){if(n&1&&(a(0,"div"),G(1,1),m(2,"a",15),V(),l()),n&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function ae(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),c=g(0);return I(i.doRepair(c.BackupID))}),_(1,2),l()}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),c=g(0);return I(i.doDownloadBugreport(c))}),_(1,3),l()}}function le(n,t){if(n&1&&m(0,"sh-progress-bar",17),n&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function ce(n,t){if(n&1){let e=f();a(0,"div",11),y(1),_(2,4),D(),a(3,"a",16),A(4),l(),d(5,le,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowUpdate())}),_(7,5),l()()}if(n&2){let e,o,i=s(),c=g(0);r(3),O("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),r(),x(c.Message),r(),N(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function _e(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),c=g(0);return I(i.doShowLog(c.BackupID))}),_(1,6),l()}}function se(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var Ne={Error:"error",Warning:"warn",Information:"primary"},h=class n{#e=T(j);#a=T(U);#r=T(W);#t=T(K);#i=T(F);#n=T(Q);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=P(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ne[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(Z,{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 i=`${location.origin}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=i,this.#o.set(i),this.triggerDownload(i)},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||n)};static \u0275cmp=E({type:n,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 i;i=$localize`Download`;let c;c=$localize`New update found:`;let L;L=$localize`Show Update`;let w;w=$localize`Show Log`;let R;R=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,i,c,L,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){let i=f();X(0),a(1,"sh-alert")(2,"div",9),A(3),l(),a(4,"div",10),d(5,ne,2,1,"div",11),d(6,oe,3,1,"div"),a(7,"div",12),d(8,ae,2,0,"button",13),d(9,re,2,0,"button",13),d(10,ce,8,3,"div",11),d(11,_e,2,0,"button",13),d(12,se,2,0,"button",13),d(13,de,2,0,"button",13),a(14,"button",14),u("click",function(){return p(i),I(o.deleteNotificationByIndex())}),_(15,0),l()()()()}if(e&2){let i=B(o.notification());r(),z(o.getAlertType(i.Type)),r(2),x(i.Title),r(2),N(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),N(o.downloadLink()?6:-1),r(2),N(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),N(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),N(i.Action==="update:new"?10:-1),r(),N(i.Action==="backup:show-log"?11:-1),r(),N(i.Action==="config:issue:unencrypted-database"?12:-1),r(),N(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,q,H],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 Te=(n,t)=>t.ID;function Ce(n,t){if(n&1&&m(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function pe(n,t){n&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var ee=class n{#e=T(F);notificationFilterPredicate=S();notifications=P(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,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,Ce,1,2,"app-notification",1,Te,!1,pe,3,0,"div",2),e&2&&k(o.notifications())},dependencies:[h],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{h as a,ee as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as ee,k as _n}from"./chunk-DV67LYLW.js";import{a as an}from"./chunk-HEV3WHAH.js";import{a as on}from"./chunk-7XLQX4B6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as tn}from"./chunk-QNZTEY37.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-LVPZTSKG.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import{a as nn}from"./chunk-CGKL2MHM.js";import"./chunk-RIVMPP47.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{A as Ue,B as Z,C as Ke,E as je,G as We,K as qe,L as Qe,S as Ye,T as Ze,u as Y}from"./chunk-RYXU2QDS.js";import{b as en}from"./chunk-BKANUILG.js";import{e as Q}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as I,Ab as t,Bb as T,Cc as M,Dc as G,E as K,Ec as A,Fb as O,Gb as m,Gc as q,Hb as f,Ib as H,Ma as j,Pa as a,Pb as c,Qb as s,Rb as C,Sb as h,Tb as L,Ub as W,Vb as $,W as v,Xb as r,aa as P,cb as be,ec as V,gc as R,hb as N,ib as ve,jc as u,la as X,lc as S,na as Be,oc as we,pb as Xe,pc as ze,qb as Je,qc as Ve,sb as g,tb as p,ub as J,wb as w,xb as z,xc as U,yb as E,yc as D,zb as o}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var rn=()=>[Q,import("./chunk-3CJTIOP4.js").then(e=>e.NgTemplateOutlet),Z,Y,je,Ze,Ye,import("./chunk-PF2QQ2YW.js").then(e=>e.DurationFormatPipe),import("./chunk-AYN5EDSZ.js").then(e=>e.BytesPipe),import("./chunk-BUO6CCKF.js").then(e=>e.RelativeTimePipe)],cn=()=>["/add-backup"],sn=()=>["/restore"],ln=e=>({$implicit:e}),un=()=>["/backup/new"],Fn=e=>["/backup",e],Cn=e=>["/restore",e],Tn=e=>["/backup",e,"export"],En=e=>["/backup",e,"delete"],dn=e=>["/backup",e,"database"],gn=e=>["/backup",e,"commandline"],pn=e=>["/backup",e,"log"];function Sn(e,i){e&1&&C(0,11,1)}function On(e,i){e&1&&C(0,11,2)}function mn(e,i){if(e&1&&C(0,11,3),e&2){let n=r(2);h(n.timeType()),L(0)}}function Nn(e,i){if(e&1){let n=H();o(0,"button",54),$("click",function(){let F=I(n).$implicit,d=r(3);return P(d.sortByColumn.set(F.value))}),C(1,15),t()}if(e&2){let n=i.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),h(n.label),L(1)}}function Mn(e,i){if(e&1&&(o(0,"sh-menu",55)(1,"button",56),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,57),w(6,Nn,2,3,"button",58,J),m(),t()),e&2){let n=r(2);a(4),h(n.orderBy()),L(2),a(2),z(n.sortOrderOptions())}}function In(e,i){if(e&1){let n=H();o(0,"div",52)(1,"sh-button-group",53)(2,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("list"))}),c(3,9),T(4,"sh-icon"),s(),t(),o(5,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("details"))}),c(6,10),T(7,"sh-icon"),s(),t()(),o(8,"sh-menu",55)(9,"button",56),c(10,11),o(11,"strong"),g(12,Sn,1,0)(13,On,1,0)(14,mn,1,1),t(),T(15,"sh-icon"),s(),t(),O(16,57),o(17,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("relative"))}),C(18,12),t(),o(19,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("actual"))}),C(20,13),t(),m(),t(),g(21,Mn,8,1,"sh-menu",55),t()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function Pn(e,i){if(e&1&&(o(0,"p")(1,"span"),C(2,21),t(),u(3),M(4,"relativeTime"),t()),e&2){let n=r().$implicit,_=r(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function fn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Dn(e,i){e&1&&(O(0),u(1,"-"),m())}function $n(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Rn(e,i){e&1&&(O(0),u(1,"-"),m())}function An(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function hn(e,i){e&1&&(O(0),u(1,"-"),m())}function Ln(e,i){e&1&&(o(0,"sh-chip",67),C(1,22),t())}function Hn(e,i){e&1&&f(0)}function Gn(e,i){if(e&1&&(o(0,"div",63)(1,"div",48)(2,"h3"),u(3),o(4,"sh-chip"),T(5,"img",64),u(6),t()(),o(7,"p")(8,"span"),C(9,16),t(),u(10),M(11,"relativeTime"),t(),g(12,Pn,5,4,"p"),o(13,"p")(14,"span"),C(15,17),t(),g(16,fn,2,4)(17,Dn,2,0,"ng-container"),t(),o(18,"p")(19,"span"),C(20,18),t(),g(21,$n,2,3)(22,Rn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),C(25,19),t(),g(26,An,2,3)(27,hn,2,0,"ng-container"),t()(),o(28,"div",65)(29,"sh-chip",66),C(30,20),t(),g(31,Ln,2,0,"sh-chip",67),t(),o(32,"div",52),N(33,Hn,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(4),F=V(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",A(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,ln,n))}}function xn(e,i){if(e&1&&w(0,Gn,34,18,"div",63,J),e&2){let n=r(3);z(n.backups())}}function kn(e,i){e&1&&(o(0,"div",62),c(1,23),o(2,"button",69),T(3,"sh-icon"),t(),s(),t()),e&2&&(a(2),E("routerLink",U(1,un)))}function yn(e,i){if(e&1&&(o(0,"div",61),g(1,xn,2,0)(2,kn,4,2,"div",62),t()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function Bn(e,i){e&1&&(c(0,24,1),f(1),s())}function bn(e,i){e&1&&(c(0,25,1),f(1),s())}function vn(e,i){e&1&&(c(0,26,1),f(1),s())}function Xn(e,i){e&1&&(c(0,27,1),f(1),s())}function Jn(e,i){e&1&&(c(0,28,1),f(1),s())}function wn(e,i){e&1&&(c(0,29,1),f(1),s())}function zn(e,i){e&1&&(c(0,30,1),f(1),s())}function Vn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Un(e,i){e&1&&(O(0),u(1,"-"),m())}function Kn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function jn(e,i){e&1&&(O(0),u(1,"-"),m())}function Wn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function qn(e,i){e&1&&(O(0),u(1,"-"),m())}function Qn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Yn(e,i){e&1&&(O(0),u(1,"-"),m())}function Zn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function et(e,i){e&1&&(O(0),u(1,"-"),m())}function nt(e,i){e&1&&f(0)}function tt(e,i){if(e&1&&(o(0,"tr")(1,"td"),u(2),t(),o(3,"td")(4,"sh-chip",80),T(5,"img",64),u(6),t()(),o(7,"td"),g(8,Vn,2,4)(9,Un,2,0,"ng-container"),t(),o(10,"td"),g(11,Kn,2,4)(12,jn,2,0,"ng-container"),t(),o(13,"td"),g(14,Wn,2,4)(15,qn,2,0,"ng-container"),t(),o(16,"td"),g(17,Qn,2,3)(18,Yn,2,0,"ng-container"),t(),o(19,"td"),g(20,Zn,2,3)(21,et,2,0,"ng-container"),t(),o(22,"td")(23,"span"),C(24,33),t()(),o(25,"td"),N(26,nt,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(3),F=V(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,ln,n))}}function it(e,i){if(e&1){let n=H();o(0,"sh-table",70),Ve("sortByColumnChange",function(F){I(n);let d=r(2);return ze(d.sortByColumn,F)||(d.sortByColumn=F),P(F)}),o(1,"tr",71)(2,"th",72),c(3,24),N(4,Bn,2,0,"ng-container",73),s(),t(),o(5,"th",74),c(6,25),N(7,bn,2,0,"ng-container",73),s(),t(),o(8,"th",75),c(9,26),N(10,vn,2,0,"ng-container",73),s(),t(),o(11,"th",76),c(12,27),N(13,Xn,2,0,"ng-container",73),s(),t(),o(14,"th",77),c(15,28),N(16,Jn,2,0,"ng-container",73),s(),t(),o(17,"th",78),c(18,29),N(19,wn,2,0,"ng-container",73),s(),t(),o(20,"th",79),c(21,30),N(22,zn,2,0,"ng-container",73),s(),t(),o(23,"th"),C(24,31),t(),o(25,"th"),C(26,32),t()(),w(27,tt,27,14,"tr",null,J),t()}if(e&2){let n=r(2),_=V(35);E("data",n.backups())("loading",n.backupsLoading()),we("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),z(n.backups())}}function ot(e,i){if(e&1&&g(0,yn,3,3,"div",59)(1,it,29,10,"sh-table",60),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function _t(e,i){e&1&&(o(0,"div",81),T(1,"sh-progress-bar",82),o(2,"div",48)(3,"h3"),C(4,34),t()()())}function at(e,i){e&1&&C(0,35,1)}function lt(e,i){e&1&&(o(0,"sh-icon"),u(1,"check"),t())}function rt(e,i){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),t())}function ct(e,i){if(e&1){let n=H();o(0,"button",83),$("click",function(){let F=I(n).$implicit,d=r();return P(d.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,at,1,0),s(),t(),o(4,"button",84)(5,"sh-icon"),u(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",49),g(9,lt,2,0,"sh-icon")(10,rt,2,0,"sh-icon"),t(),O(11,57),o(12,"h3",85),u(13,"Operations"),t(),o(14,"button",86),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",86),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",86),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",85),C(25,39),t(),o(26,"button",86),c(27,40),T(28,"sh-icon"),s(),t(),o(29,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.verifyFiles(F.Backup.ID))}),c(30,41),T(31,"sh-icon"),s(),t(),o(32,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.compressBackup(F.Backup.ID))}),c(33,42),T(34,"sh-icon"),s(),t(),o(35,"button",86),c(36,43),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",85),C(40,44),t(),o(41,"button",86),c(42,45),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,Fn,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,Cn,n.Backup.ID)),a(3),E("routerLink",D(19,Tn,n.Backup.ID)),a(3),E("routerLink",D(21,En,n.Backup.ID)),a(6),E("routerLink",D(23,dn,n.Backup.ID)),a(9),E("routerLink",D(25,gn,n.Backup.ID)),a(6),E("routerLink",D(27,pn,n.Backup.ID))}}function st(e,i){e&1&&(o(0,"sh-icon",87),u(1,"funnel-simple"),t(),o(2,"sh-icon",88),u(3,"sort-ascending"),t(),o(4,"sh-icon",89),u(5,"sort-descending"),t())}var ut={file:{Display:$localize`Local`,Icon:null}},ne=class e{#n=v(en);#t=v(on);#e=v(tn);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=nn("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=Be(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){return i?ee(i).icon??"database":""}getBackendType(i){if(!i)return"";let n=ee(i);if(!n)return"";let _=ut[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let F="http://null?"+i.split("?")[1],x=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(_n))if(x.endsWith(k))return y}return n.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let x;x=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let k;k=$localize`My backups`;let y;y=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let te;te=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Last successful backup:`;let ce;ce=$localize`Duration:`;let se;se=$localize`Source:`;let ue;ue=$localize`Destination:`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=W(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Fe;Fe=$localize` ${B}:ICU@@6502601490918455200: `;let Ce;Ce=$localize`Next scheduled run:`;let Te;Te=$localize`Externally managed`;let Ee;Ee=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ne;Ne=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize`Version`;let Ie;Ie=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Pe;Pe=$localize` ${b}:ICU@@3521773141017690117: `;let fe;fe=$localize`Loading backups...`;let De;De=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let $e;$e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ae;Ae=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let he;he=$localize`Advanced`;let Le;Le=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let He;He=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ge;Ge=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let xe;xe=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let ke;ke=$localize`Reporting`;let ye;return ye=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,d,x,k,y,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,Ae,he,Le,He,Ge,xe,ke,ye,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",46),T(4,"img",47),o(5,"div",48)(6,"h3"),C(7,2),t(),o(8,"p"),C(9,3),t()(),o(10,"button",49),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",46),T(14,"img",50),o(15,"div",48)(16,"h3"),C(17,5),t(),o(18,"p"),C(19,6),t()(),o(20,"button",49),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",51)(24,"h2"),O(25),C(26,8),m(),g(27,In,22,6,"div",52),t(),ve(28,ot,2,1)(29,_t,5,0),Xe(30,28,rn,null,29),t()(),N(32,ct,44,29,"ng-template",null,0,q)(34,st,6,0,"ng-template",null,1,q)),n&2&&(a(3),E("routerLink",U(4,cn)),a(10),E("routerLink",U(5,sn)),a(14),p(_.backups().length>0?27:-1),a(3),Je(!_.backupsLoading()))},dependencies:[Q,an,Ke,Z,Y,We,qe,Qe,Ue],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ne as default};
|