@duplicati/ngclient 0.0.231 → 0.0.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-SycSMD-r.js → chunk-B52v_pjw.js} +1 -1
- package/{chunk-CI8lsvKT.js → chunk-B53Wj4F9.js} +1 -1
- package/chunk-B73LRsqH.js +1 -0
- package/{chunk-PONAC1Ya.js → chunk-B8uF0dom.js} +1 -1
- package/{chunk-D3SUPUQT.js → chunk-B9maI7Xa.js} +1 -1
- package/{chunk-DfcHtA-G.js → chunk-BBU0vswn.js} +1 -1
- package/{chunk-DPpQ_8VM.js → chunk-BBsBaTWO.js} +1 -1
- package/{chunk--kVw-BwM.js → chunk-BEhUV7oX.js} +1 -1
- package/{chunk-B1FMMTzB.js → chunk-BI14DMeb.js} +1 -1
- package/{chunk-DoYGADYB.js → chunk-BO2GlieG.js} +1 -1
- package/{chunk-Bfak-Gjv.js → chunk-BS8PXjJJ.js} +1 -1
- package/{chunk-C5p3bQwH.js → chunk-BTgf5lfZ.js} +1 -1
- package/{chunk-BYJ0fSUP.js → chunk-BVEyeg9y.js} +1 -1
- package/{chunk-DlqfMbsZ.js → chunk-BYWmNy-_.js} +1 -1
- package/{chunk-d4cdVCUg.js → chunk-BaxM-kGV.js} +1 -1
- package/{chunk-DuTbfCdT.js → chunk-Bb6BmVO4.js} +1 -1
- package/{chunk-C3KPTLNN.js → chunk-Bja52qI7.js} +1 -1
- package/{chunk-5Ay2I6OJ.js → chunk-BkIXk6uR.js} +1 -1
- package/{chunk-B6VmpM-T.js → chunk-BkUa7yBI.js} +1 -1
- package/chunk-BlTnmRGU.js +1 -0
- package/{chunk-B7vxwDBG.js → chunk-Bo1yB-fQ.js} +1 -1
- package/{chunk-D3d-eReU.js → chunk-Box6Lckh.js} +1 -1
- package/{chunk-CQv4eyEK.js → chunk-BpRWdcC8.js} +1 -1
- package/chunk-BqN36tfl.js +1 -0
- package/{chunk-Baizh2Dx.js → chunk-Brvxo-yI.js} +1 -1
- package/{chunk-BjSSXg5V.js → chunk-Bt_Ie-F3.js} +1 -1
- package/chunk-BvGGBIy7.js +1 -0
- package/{chunk-CzJ3-6Pu.js → chunk-C4GeR7BF.js} +1 -1
- package/{chunk-BFfFD-XE.js → chunk-C80zvTbO.js} +1 -1
- package/{chunk-gaP3Sx_C.js → chunk-CAwTsBqQ.js} +1 -1
- package/chunk-CGArETYn.js +1 -0
- package/{chunk-CwKxis_6.js → chunk-CHzwXmsn.js} +1 -1
- package/{chunk-BRJ93eei.js → chunk-CIcBoEH1.js} +1 -1
- package/{chunk-Crs56mDy.js → chunk-CKnRcyHZ.js} +1 -1
- package/{chunk-DlTsXgG2.js → chunk-CTRzgLM9.js} +2 -2
- package/{chunk-DNUCXG8E.js → chunk-CTm37hI-.js} +1 -1
- package/{chunk-Bnu5Zyue.js → chunk-CTwO6j97.js} +1 -1
- package/{chunk-oTpkLrqH.js → chunk-CUaRQ2FJ.js} +1 -1
- package/{chunk-PGDvGDW-.js → chunk-CUuyy9Er.js} +1 -1
- package/{chunk-D5031IDL.js → chunk-CVQPUpDQ.js} +1 -1
- package/{chunk-JMkz2RrF.js → chunk-CX26gEKv.js} +1 -1
- package/{chunk-DAM-4k69.js → chunk-CZoVeRAG.js} +1 -1
- package/{chunk-7qu0Yols.js → chunk-CartdZy-.js} +1 -1
- package/{chunk-CxjTj8X0.js → chunk-Cg09iQR5.js} +1 -1
- package/{chunk-CDEvMQA2.js → chunk-CgyaUJSI.js} +1 -1
- package/{chunk-CmexLvf7.js → chunk-Cjb79u3p.js} +1 -1
- package/{chunk-CTwvkMrj.js → chunk-CkrxdjhU.js} +1 -1
- package/chunk-CtEMAj2d.js +2 -0
- package/{chunk-U0VOUPLl.js → chunk-Cu2bh6aQ.js} +1 -1
- package/{chunk-BlfsmSZO.js → chunk-Cu4siB3B.js} +3 -3
- package/{chunk-Bcxzhjj8.js → chunk-CwKy8pxa.js} +1 -1
- package/{chunk-Cng2PWKw.js → chunk-Cz0KuBHB.js} +1 -1
- package/{chunk-DA5X-TzJ.js → chunk-D5tms-6w.js} +1 -1
- package/{chunk-BAVJD-p4.js → chunk-DI7suso2.js} +1 -1
- package/{chunk-Bgx4dtaL.js → chunk-DJJ8GbYi.js} +1 -1
- package/{chunk-C6beMvkJ.js → chunk-DKZlKdfB.js} +1 -1
- package/chunk-DTu0ZYnR.js +1 -0
- package/{chunk-D7AP6g7S.js → chunk-DUYvFN8m.js} +1 -1
- package/{chunk-DH6L3nQP.js → chunk-DY3nK3tu.js} +1 -1
- package/{chunk-B_iekvt6.js → chunk-DYnVzNxt.js} +1 -1
- package/{chunk-C2H72Zk8.js → chunk-DZm4l28A.js} +1 -1
- package/{chunk-BhGD1_v8.js → chunk-Da_-7L7P.js} +1 -1
- package/{chunk-DKacf9Tj.js → chunk-DmDqcC4A.js} +1 -1
- package/{chunk-CP3edE1P.js → chunk-Dn8nZWLd.js} +1 -1
- package/{chunk-EwTTC1EW.js → chunk-DoQHDPZg.js} +1 -1
- package/{chunk-D2aWqPl_.js → chunk-DqIU7ViF.js} +1 -1
- package/{chunk-Bj1ToKwz.js → chunk-Dum38U6w.js} +1 -1
- package/{chunk-C1BwGQgo.js → chunk-DvyGZpE4.js} +1 -1
- package/{chunk-DuHXCtrV.js → chunk-DzmZd524.js} +1 -1
- package/{chunk-CqwyTVd3.js → chunk-Rp7-yjlz.js} +1 -1
- package/{chunk-RqvNv7T_.js → chunk-Saq2s7Ep.js} +1 -1
- package/{chunk-dCFVYHva.js → chunk-aOMoAKYY.js} +1 -1
- package/{chunk-DH6iiZWc.js → chunk-ihUnHtR7.js} +1 -1
- package/{chunk-BhPCHFyT.js → chunk-ivwxSoND.js} +1 -1
- package/{chunk-BC2-YuwH.js → chunk-kU0H989B.js} +2 -2
- package/{chunk-BIAFFPb6.js → chunk-mby7fvmj.js} +1 -1
- package/{chunk-DKwqdnLJ.js → chunk-umW-K0Ca.js} +1 -1
- package/{chunk-mnaJWx8D.js → chunk-vPGrgL1U.js} +1 -1
- package/{chunk-D2MSuPzM.js → chunk-vnqcxg-9.js} +1 -1
- package/index.html +1 -1
- package/{main-QLXVXD6E.js → main-VVQP2YE7.js} +4 -4
- package/package.json +1 -1
- package/chunk-6bHATzM2.js +0 -1
- package/chunk-BHERv_y8.js +0 -1
- package/chunk-CAgfvBGI.js +0 -2
- package/chunk-D9O-afXN.js +0 -1
- package/chunk-Da2vs6ff.js +0 -1
- package/chunk-Z5fN6CGR.js +0 -1
- package/chunk-tpJJunhQ.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {OptionsListComponent as Oe$1}from'./chunk-DAM-4k69.js';import {O}from'./chunk-dCFVYHva.js';import {T as Tt$1,Z as Ze$1}from'./chunk-BC2-YuwH.js';import'./chunk-BFfFD-XE.js';import {N as Ne$1}from'./chunk-CmexLvf7.js';import {I}from'./chunk-Bgx4dtaL.js';import {J}from'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import'./chunk-DH6iiZWc.js';import {N as Nt$2}from'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,ab as C,e as ee,aw as W,G as Ge,N as Nt$1,H as qu,h as hw,d as N,v,Q as Qi,V as Vg,f as aT,aP as ql,n as nC,aQ as Gl,p as cm,$ as $l,L as Lg,j as vg,F as Fg,A as yg,C as CE,i as cT,x as am,bh as Q,m,aJ as ci,z as za,cl as zu,aE as jo,bJ as fe,aH as m$1,au as jg,av as rC,aD as YC,a6 as be,at as h,Y as Yg,b0 as Hs,cm as cy,c5 as $s,ay as Gu,bK as Dy,cn as Sy,aZ as ee$1,U as UC,s as CD,y as _D,l as vT,r as kd,k as iC,O as Od,bg as ag,a3 as KC,w as jC,aM as ob,aB as im,aN as ab,aa as Ql,aR as sb}from'./main-QLXVXD6E.js';import'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import {F as Fe}from'./chunk-D3SUPUQT.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn,B as Bn,J as Jt,y as yt$1,r as rn}from'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import {O as O$1}from'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import {L}from'./chunk-D3d-eReU.js';var _e={handleExisting:"saveTimestamp",permissions:false,includeMetadata:true},Tt=new Set(["true","1","yes","on"]),Ce=i=>(i??"").trim().replace(/^--/,"").toLowerCase(),at=i=>Tt.has((i??"").trim().toLowerCase()),lt=(i,t,e,o)=>{let n=Ce(i),r=t.find(u=>Ce(u.Name)===n);if(r)return at(r.Value);let l=Object.keys(e).find(u=>Ce(u)===n);return l?at(e[l]):o},_t=(i,t)=>{let e=i??[],o=lt("restore-permissions",e,t,_e.permissions),n=lt("skip-metadata",e,t,false);return {permissions:o,includeMetadata:!n}};function gt(i,t){i&1&&(Qi(0,"p"),nC(1,3),$l());}function Ft(i,t){i&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,4),$l(),vg(3,"input",12),CD(),$l()),i&2&&(CE(3),_D());}var ct=new jn,pt=()=>ct.group({passphrase:ct.control("")}),Oe=class i{#e=T(C);#t=T(k);#i=T(ee);#n=T(W);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=Ge(false);settings=Ge([]);hasEncryptedBackup=Nt$1(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?true:t?.containsEncryptedBackupFiles??true});showEncryptionField=Ge(false);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(n=>{let r=n.Name?.trim();r&&r!=="--"&&(r.startsWith("--")||(r=`--${r}`),o.push({Name:r,Value:n.Value??""}));}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:true}).pipe(qu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:n=>{let r=n.ID;this.#i.navigate([`/restore-draft/${r}`]);},error:n=>{console.error(n);}});}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`The backup does not contain encrypted files.`;let r;r=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,n,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",r,"formControlName","passphrase"]]},template:function(e,o){e&1&&(Qi(0,"form",5),Vg("submit",function(){return o.next()}),aT(1,gt,2,0,"p"),aT(2,Ft,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),ql(4,6),nC(5,0),Gl(),Qi(6,"app-options-list",7),cm("optionsChange",function(r){return UC(o.settings,r)||(o.settings=r),r}),$l()(),Qi(7,"div",8)(8,"button",9),Vg("click",function(){return o.back()}),Lg(9,1),vg(10,"sh-icon"),Fg(),$l(),Qi(11,"button",10),Lg(12,2),vg(13,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.encryptionForm),CE(),cT(o.hasEncryptedBackup()?-1:1),CE(),cT(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),CE(4),am("options",o.settings),yg("hasFreeTextSettings",true));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe$1],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var mt=()=>({standalone:true});function Ct(i,t){i&1&&vg(0,"sh-progress-bar",13);}function Ot(i,t){if(i&1&&(jC(0),ob(1,"bytes")),i&2){let e=iC().$implicit;Ql(" (",sb(1,1,e.FileSizes),") ");}}function ft(i,t){i&1&&(Qi(0,"span",20),nC(1,4),$l());}function Nt(i,t){if(i&1&&(Qi(0,"div",19),jC(1),ob(2,"date"),aT(3,Ot,2,3),aT(4,ft,2,0,"span",20),$l()),i&2){let e=t.$implicit;CE(),im(" ",e.Version,": ",ab(2,4,e.Time,"medium")," "),CE(2),cT(e.FileSizes?3:-1),CE(),cT(e.IsFullBackup===false?4:-1);}}function ht(i,t){i&1&&vg(0,"sh-progress-bar",13);}function Rt(i,t){i&1&&(Qi(0,"sh-icon",28),jC(1,"spinner"),$l());}function Pt(i,t){i&1&&(Qi(0,"sh-icon"),jC(1,"magnifying-glass"),$l());}function It(i,t){if(i&1){let e=vT();Qi(0,"button",31),Vg("click",function(){kd(e);let n=iC(4);return Od(n.clearSearch())}),Qi(1,"sh-icon"),jC(2,"x-circle"),$l(),Qi(3,"span"),nC(4,8),$l()();}}function Mt(i,t){i&1&&(Qi(0,"span"),nC(1,9),$l());}function Lt(i,t){if(i&1&&(Qi(0,"span"),nC(1,10),$l()),i&2){let e=iC(5);CE(),jg(e.searchResults().length),rC(1);}}function yt(i,t){if(i&1&&(Qi(0,"div",30),aT(1,Mt,2,0,"span")(2,Lt,2,1,"span"),$l()),i&2){let e=iC(4);CE(),cT(e.searchResults().length===0?1:2);}}function Dt(i,t){if(i&1){let e=vT();Qi(0,"div",24)(1,"sh-form-field")(2,"label",25),nC(3,6),$l(),Qi(4,"input",26),cm("ngModelChange",function(n){kd(e);let r=iC(3);return UC(r.searchQuery,n)||(r.searchQuery=n),Od(n)}),Vg("keydown.enter",function(n){kd(e);let r=iC(3);return n.preventDefault(),Od(r.performSearch())}),$l(),CD(),$l(),Qi(5,"button",27),Vg("click",function(){kd(e);let n=iC(3);return Od(n.performSearch())}),aT(6,Rt,2,0,"sh-icon",28)(7,Pt,2,0,"sh-icon"),Qi(8,"span"),nC(9,7),$l()(),aT(10,It,5,0,"button",29),$l(),aT(11,yt,3,1,"div",30);}if(i&2){let e=iC(3);CE(4),am("ngModel",e.searchQuery),yg("ngModelOptions",KC(6,mt)),_D(),CE(),yg("disabled",e.isSearching()||!e.searchQuery().trim()),CE(),cT(e.isSearching()?6:7),CE(4),cT(e.isSearchMode()?10:-1),CE(),cT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function bt(i,t){if(i&1){let e=vT();aT(0,Dt,12,7),Qi(1,"app-file-tree",21),Vg("hasExtendedData",function(n){kd(e);let r=iC(2);return Od(r.extendedDataType.set(n))}),Qi(2,"label",22),nC(3,5),$l(),vg(4,"input",23),CD(),$l();}if(i&2){let e=iC(2);cT(e.canSearch()?0:-1),CE(),yg("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("loadExtendedData",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),CE(3),_D();}}function $t(i,t){if(i&1){let e=vT();Qi(0,"sh-select",17),Vg("cleared",function(){kd(e);let n=iC();return Od(n.abortLoading())}),Qi(1,"input",18),cm("ngModelChange",function(n){kd(e);let r=iC();return UC(r.selectOption,n)||(r.selectOption=n),Od(n)}),$l(),CD(),ag(2,Nt,5,7,"ng-template"),$l(),aT(3,ht,1,0,"sh-progress-bar",13),aT(4,bt,5,9);}if(i&2){let e=iC();yg("options",e.versionOptions())("isClearable",false),CE(),am("ngModel",e.selectOption),yg("ngModelOptions",KC(6,mt)),_D(),CE(2),cT(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),CE(),cT(e.showFileTree()?4:-1);}}var Ne=new jn,St=()=>Ne.group({filesToRestore:Ne.control(""),passphrase:Ne.control(null)}),he=class i{#e=T(C);#t=T(k);#i=T(Q);#n=T(m);#o=T(ee);#a=T(W);#l=T(ci);#_=null;#r=null;#s=Ge([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=Nt$1(()=>this.#t.backup()?.Backup?.IsTemporary??true);showFileTree=Ge(false);backupSettings=Ge(null);rootPaths=Ge([]);initialNodes=Ge([]);loadingRootPath=Ge(false);isRepairing=Nt$1(()=>this.#s().length>0);loadedVersions=Ge({});canSearch=Nt$1(()=>this.#n.hasV2ListOperations());searchQuery=Ge("");isSearching=Ge(false);searchResults=Ge([]);hasSearched=Ge(false);isSearchMode=Nt$1(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=za(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString());}});backupSettingsEffect=za(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),n=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(w=>w.Version===parseInt(e))?.Time??null;if(!l)return;let u=`${t}+${l}`,I=n[u];if(this.needsDatabaseRepair()&&(!I||o))return;let D={id:t+"",time:l};this.backupSettings.set(D),this.getRootPath(D);});repairEffect=za(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let n=this.backupId(),r=`${n}+${o.Time}`;if(this.#r===r||(this.#r=r,this.#s().includes(r)))return;this.#s.update(l=>[...l,r]),this.#e.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:true,time:o.Time}}).pipe(zu(this.abortLoading$),qu(()=>{this.#r=null;})).subscribe(l=>{let u=l.ID;this.#i.waitForTaskToComplete(u).pipe(jo(1)).subscribe(()=>{this.#s.update(I=>I.filter(D=>D!==r)),this.loadedVersions.update(I=>(I[r]=true,I));});});}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:true,folderContents:false},o=t.id+"";this.isRepairing()||this.#_===o||(this.#_=o,this.loadingRootPath.set(true),this.showFileTree.set(false),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}}).pipe(zu(this.abortLoading$),qu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false),this.#_=null;})).subscribe({next:n=>{let r=(n.Data??[]).find(u=>u.Metadata&&u.Metadata.ExtType&&u.Metadata.ExtType.length>0);r&&this.extendedDataType.set(r.Metadata.ExtType);let l=(n.Data??[]).map(u=>u.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}):this.#e.getApiV1BackupByIdFiles(e).pipe(zu(this.abortLoading$),qu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false);})).subscribe({next:n=>{let r=n.Files.map(l=>l.Path??"");r.length>0?(this.initialNodes.set([]),this.rootPaths.set(r)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}));}abortLoading$=new fe;abortLoading(){this.showFileTree.set(false),this.loadingRootPath.set(false),this.abortLoading$.next(true);}displayFn(){let t=this.versionOptions();return e=>{if(!e)return "";let o=t?.find(n=>typeof n.Version=="number"&&n.Version.toString()===e);return o?`${o.Version}: ${this.#l.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#a.parent});}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#a.parent}):this.#t.exit();}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings(),o=(this.#t.extendedDataType()??"").length>0;if(!t||!e)return;let r=this.versionOptions()?.find(l=>l.Version===parseInt(this.selectOption()??""))?.Version;r!=null&&(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[r],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:o,SearchMetadata:o}}).pipe(zu(this.abortLoading$),qu(()=>this.isSearching.set(false))).subscribe({next:l=>{this.searchResults.set(l.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-select-files"]],features:[YC([ci])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Select an option...`;let r;r=$localize`(partial)`;let l;l=$localize`Path`;let u;u=$localize`Enter search term...`;let I;I=$localize`Search files`;let D;D=$localize`Search`;let w;w=$localize`Clear`;let oe;oe=$localize`0 results found`;let ne;return ne=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,o,r,l,I,D,w,oe,ne,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",u,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,o){e&1&&(Qi(0,"form",11,0),Vg("submit",function(){return o.next()}),Qi(2,"h3",12),nC(3,1),$l(),aT(4,Ct,1,0,"sh-progress-bar",13)(5,$t,5,7),Qi(6,"div",14)(7,"button",15),Vg("click",function(){return o.back()}),Lg(8,2),vg(9,"sh-icon"),Fg(),$l(),Qi(10,"button",16),Lg(11,3),vg(12,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.selectFilesForm),CE(4),cT(o.versionOptionsLoading()?4:5),CE(5),jg(o.isFileRestore()?"Back":"Exit"),rC(8));},dependencies:[Bn,Tn,Ze,Rn,Pn,Jt,Gn,gn,hn,Ne$1,v,Fe,N,Nt$2,d,ci,m$1],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"]})};var k=class i{#e=T(ee);#t=T(W);#i=T(m);#n=T(be);#o=T(C);#a=T(O$1);#l=null;backupId=Ge(null);backup=Ge(null);destinationTargetUrl=Ge(null);destinationTestSignal=Ge(null);selectFilesForm=St();optionsForm=Et();encryptionForm=pt();optionsFormSignal=L(this.optionsForm.valueChanges);selectFilesFormSignal=L(this.selectFilesForm.valueChanges);selectOption=Ge(null);versionOptionsLoading=Ge(false);versionOptions=Ge([]);isSubmitting=Ge(false);isFileRestore=Ge(false);isFullWidthPage=Ge(false);extendedDataType=Ge(null);alternateRestorePath=Ge(null);alternateRestorePathSourcePrefix=Ge(null);#_=za(()=>{let t=this.backupId(),e=this.backup()?.Backup,o=this.#a.serverSettings();!t||!e||o===void 0||e.ID!==null&&e.ID!==t||this.#l!==t&&(this.#l=t,this.optionsForm.patchValue(_t(e.Settings,o)));});init(t,e=false){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup();}updateTargetUrl(t){this.destinationTargetUrl.set(t);}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e);}submit(){this.isSubmitting.set(true);let t=this.backupId();this.backup()?.Backup?.IsTemporary??false?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#r(o.ID??"");},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#r(t??"");}showErrorDialog(t){this.#n.open(h,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}});}#r(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,n=this.selectOption(),r=this.versionOptions()?.find(l=>l.Version===(n&&parseInt(n)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:r?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t});},error:l=>{console.error("restore error",l);}});}exit(){this.#n.open(h,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#s(),this.#e.navigate(["/"]));}});}getVersionOptions(){this.versionOptions();}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Hs(o=>{let n=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return n==="EncryptedStorageNoPassphrase"||n==="FolderMissing"||n==="EmptyRemoteFolder"||e===0?cy(()=>o):$s(1e3).pipe(Gu(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(true),this.#i.hasV2ListOperations()?Dy([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(jo(1),qu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??true)&&e?.Backup?.DBPathExists===false){this.#n.open(h,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:r=>{this.#e.navigate(["/backup",t,"database"]);}});return}this.versionOptions.set((o.Data??[]).map(r=>({Version:r.Version??-1,IsFullBackup:r.IsFullBackup??void 0,Time:r.Time??"<missing>",FileCount:r.FileCount??void 0,FileSizes:r.FileSizes??void 0}))),this.backup.set(e);},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,n=o==="EncryptedStorageNoPassphrase",r=o==="FolderMissing",l=o==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;n&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),r&&(u=$localize`The backup storage folder was not found.`),l&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(h,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:I=>{this.#e.navigate([n?"/restore-from-files/encryption":"/restore-from-files/destination"]);}});}}):Dy([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(Sy(3))]).pipe(jo(1),qu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e);}});}#s(){this.selectFilesForm.reset(),this.optionsForm.reset();}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function vt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",27),Lg(1,6),vg(2,"input",31),CD(),Fg(),$l(),Qi(3,"sh-radio",27),Lg(4,7),Qi(5,"input",32),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseCustomRemoteDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function At(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",27),Lg(1,8),vg(2,"input",31),CD(),Fg(),$l(),Qi(3,"sh-radio",27),Lg(4,9),Qi(5,"input",32),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseCustomRemoteDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function xt(i,t){if(i&1&&(Qi(0,"app-file-tree",29)(1,"label",33),jC(2,"Path"),$l(),vg(3,"input",34),CD(),$l()),i&2){let e=iC(2);yg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function Gt(i,t){if(i&1&&(Qi(0,"app-file-tree",30)(1,"label",33),jC(2,"Path"),$l(),vg(3,"input",34),CD(),$l()),i&2){let e=iC(2);yg("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl()),CE(3),_D();}}function kt(i,t){if(i&1&&(aT(0,vt,6,0)(1,At,6,0),Qi(2,"sh-radio",27),Lg(3,5),vg(4,"input",28),CD(),Fg(),$l(),aT(5,xt,4,3,"app-file-tree",29),aT(6,Gt,4,4,"app-file-tree",30)),i&2){let e=iC();cT(e.extendedDataType()==="o365"?0:e.extendedDataType()==="gsuite"?1:-1),CE(4),_D(),CE(),cT(e.optionsFormSignal()?.restoreFrom==="pickLocation"?5:-1),CE(),cT(e.showCustomRemoteRestoreTree()?6:-1);}}function wt(i,t){if(i&1&&(Qi(0,"sh-radio",27),Lg(1,10),vg(2,"input",35),CD(),Fg(),$l(),Qi(3,"sh-radio",27),Lg(4,11),vg(5,"input",28),CD(),Fg(),$l(),Qi(6,"app-file-tree",29)(7,"label",33),jC(8,"Path"),$l(),vg(9,"input",34),CD(),$l()),i&2){let e=iC();CE(2),_D(),CE(3),_D(),CE(),yg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function Wt(i,t){i&1&&(Qi(0,"app-toggle-card",22),ql(1,23),nC(2,12),Gl(),Qi(3,"sh-toggle",27),Lg(4,13),vg(5,"input",36),CD(),Fg(),$l()()),i&2&&(yg("disableToggle",true),CE(5),_D());}function Bt(i,t){i&1&&(Qi(0,"app-toggle-card",22),ql(1,23),nC(2,14),Gl(),Qi(3,"sh-radio",27),Lg(4,15),vg(5,"input",37),CD(),Fg(),$l(),Qi(6,"sh-radio",27),Lg(7,16),vg(8,"input",38),CD(),Fg(),$l()(),Qi(9,"app-toggle-card"),ql(10,23),nC(11,17),Gl(),Qi(12,"sh-toggle",39),Lg(13,18),vg(14,"input",40),CD(),Fg(),$l(),Qi(15,"sh-toggle",39),Lg(16,19),vg(17,"input",41),CD(),Fg(),$l()()),i&2&&(yg("disableToggle",true),CE(5),_D(),CE(3),_D(),CE(6),_D(),CE(3),_D());}var V=new jn,Et=()=>V.group({restoreFrom:V.control("original"),restoreFromPath:V.control(""),handleExisting:V.control(_e.handleExisting),permissions:V.control(_e.permissions),includeMetadata:V.control(_e.includeMetadata),customRemoteIgnoreExisting:V.control(false)}),Re=class i{#e=T(k);#t=T(ee);#i=T(W);#n=T(m);#o=T(be);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=Ge(null);backupId=Nt$1(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=Nt$1(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=Nt$1(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=Nt$1(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(Tt$1,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:true,expectedResult:"any",suppressErrorDialogs:true,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"));}),false}#a=za(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"));});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent});}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(h,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.submit();}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let n=this.optionsFormSignal()?.customRemoteIgnoreExisting,r=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),l=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${r}&google-ignore-existing=${n?"true":"false"}`:`@office365://${encodeURIComponent(o)}${r}&office365-ignore-existing=${n?"true":"false"}`;this.#e.setAlternateRestorePath(l,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else this.#e.setAlternateRestorePath(null,null);this.#e.submit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let r;r=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let D;D=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize`Restore settings`;let P;P=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Pe;Pe=$localize`How do you want to handle existing files?`;let Ie;Ie=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Me;Me=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Le;Le=$localize`Metadata settings`;let ye;ye=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let De;return De=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,n,r,l,u,I,D,w,oe,ne,P,Pe,Ie,Me,Le,ye,De,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(Qi(0,"form",20,0),Vg("submit",function(){return o.submit()}),Qi(2,"h3",21),nC(3,1),$l(),Qi(4,"app-toggle-card",22),ql(5,23),nC(6,2),Gl(),aT(7,kt,7,3)(8,wt,10,3),$l(),aT(9,Wt,6,1,"app-toggle-card",22)(10,Bt,18,1),Qi(11,"div",24)(12,"button",25),Vg("click",function(){return o.goBack()}),Lg(13,3),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",26),Lg(16,4),vg(17,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.optionsForm),CE(4),yg("disableToggle",true),CE(3),cT(o.extendedDataType()!==null?7:8),CE(2),cT(o.isCustomRemoteRestore()?9:10),CE(6),Yg("loading",o.isSubmitting()));},dependencies:[Gn,Tn,Ze,yt$1,rn,Rn,Pn,gn,hn,Ze$1,Ne$1,J,O,v,N],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};
|
|
2
|
-
var
|
|
1
|
+
import {OptionsListComponent as Oe$1}from'./chunk-CZoVeRAG.js';import {O}from'./chunk-aOMoAKYY.js';import {T as Tt$1,Z as Ze$1}from'./chunk-kU0H989B.js';import'./chunk-C80zvTbO.js';import {N as Ne$1}from'./chunk-Cjb79u3p.js';import {I}from'./chunk-DJJ8GbYi.js';import {J}from'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import'./chunk-ihUnHtR7.js';import {N as Nt$2}from'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {T,ab as C,e as ee,aw as W,G as Ge,N as Nt$1,H as qu,h as hw,d as N,v,Q as Qi,V as Vg,f as aT,aP as ql,n as nC,aQ as Gl,p as cm,$ as $l,L as Lg,j as vg,F as Fg,A as yg,C as CE,i as cT,x as am,bh as Q,m,aJ as ci,z as za,cl as zu,aE as jo,bJ as fe,aH as m$1,au as jg,av as rC,aD as YC,a6 as be,at as h,Y as Yg,b0 as Hs,cm as cy,c5 as $s,ay as Gu,bK as Dy,cn as Sy,aZ as ee$1,U as UC,s as CD,y as _D,l as vT,r as kd,k as iC,O as Od,bg as ag,a3 as KC,w as jC,aM as ob,aB as im,aN as ab,aa as Ql,aR as sb}from'./main-VVQP2YE7.js';import'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn,B as Bn,J as Jt,y as yt$1,r as rn}from'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import {O as O$1}from'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import {L}from'./chunk-Box6Lckh.js';var _e={handleExisting:"saveTimestamp",permissions:false,includeMetadata:true},gt=new Set(["true","1","yes","on"]),Ce=i=>(i??"").trim().replace(/^--/,"").toLowerCase(),lt=i=>gt.has((i??"").trim().toLowerCase()),_t=(i,t,e,o)=>{let n=Ce(i),r=t.find(c=>Ce(c.Name)===n);if(r)return lt(r.Value);let l=Object.keys(e).find(c=>Ce(c)===n);return l?lt(e[l]):o},ct=(i,t)=>{let e=i??[],o=_t("restore-permissions",e,t,_e.permissions),n=_t("skip-metadata",e,t,false);return {permissions:o,includeMetadata:!n}};function Ft(i,t){i&1&&(Qi(0,"p"),nC(1,3),$l());}function Ct(i,t){i&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,4),$l(),vg(3,"input",12),CD(),$l()),i&2&&(CE(3),_D());}var ut=new jn,mt=()=>ut.group({passphrase:ut.control("")}),Oe=class i{#e=T(C);#t=T(G);#i=T(ee);#n=T(W);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=Ge(false);settings=Ge([]);hasEncryptedBackup=Nt$1(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?true:t?.containsEncryptedBackupFiles??true});showEncryptionField=Ge(false);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(n=>{let r=n.Name?.trim();r&&r!=="--"&&(r.startsWith("--")||(r=`--${r}`),o.push({Name:r,Value:n.Value??""}));}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:true}).pipe(qu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:n=>{let r=n.ID;this.#i.navigate([`/restore-draft/${r}`]);},error:n=>{console.error(n);}});}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`The backup does not contain encrypted files.`;let r;r=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,n,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",r,"formControlName","passphrase"]]},template:function(e,o){e&1&&(Qi(0,"form",5),Vg("submit",function(){return o.next()}),aT(1,Ft,2,0,"p"),aT(2,Ct,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),ql(4,6),nC(5,0),Gl(),Qi(6,"app-options-list",7),cm("optionsChange",function(r){return UC(o.settings,r)||(o.settings=r),r}),$l()(),Qi(7,"div",8)(8,"button",9),Vg("click",function(){return o.back()}),Lg(9,1),vg(10,"sh-icon"),Fg(),$l(),Qi(11,"button",10),Lg(12,2),vg(13,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.encryptionForm),CE(),cT(o.hasEncryptedBackup()?-1:1),CE(),cT(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),CE(4),am("options",o.settings),yg("hasFreeTextSettings",true));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe$1],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var St=()=>({standalone:true});function Ot(i,t){i&1&&vg(0,"sh-progress-bar",13);}function ft(i,t){if(i&1&&(jC(0),ob(1,"bytes")),i&2){let e=iC().$implicit;Ql(" (",sb(1,1,e.FileSizes),") ");}}function Nt(i,t){i&1&&(Qi(0,"span",20),nC(1,4),$l());}function ht(i,t){if(i&1&&(Qi(0,"div",19),jC(1),ob(2,"date"),aT(3,ft,2,3),aT(4,Nt,2,0,"span",20),$l()),i&2){let e=t.$implicit;CE(),im(" ",e.Version,": ",ab(2,4,e.Time,"medium")," "),CE(2),cT(e.FileSizes?3:-1),CE(),cT(e.IsFullBackup===false?4:-1);}}function Rt(i,t){i&1&&vg(0,"sh-progress-bar",13);}function Pt(i,t){i&1&&(Qi(0,"sh-icon",28),jC(1,"spinner"),$l());}function It(i,t){i&1&&(Qi(0,"sh-icon"),jC(1,"magnifying-glass"),$l());}function Mt(i,t){if(i&1){let e=vT();Qi(0,"button",31),Vg("click",function(){kd(e);let n=iC(4);return Od(n.clearSearch())}),Qi(1,"sh-icon"),jC(2,"x-circle"),$l(),Qi(3,"span"),nC(4,8),$l()();}}function Lt(i,t){i&1&&(Qi(0,"span"),nC(1,9),$l());}function yt(i,t){if(i&1&&(Qi(0,"span"),nC(1,10),$l()),i&2){let e=iC(5);CE(),jg(e.searchResults().length),rC(1);}}function Dt(i,t){if(i&1&&(Qi(0,"div",30),aT(1,Lt,2,0,"span")(2,yt,2,1,"span"),$l()),i&2){let e=iC(4);CE(),cT(e.searchResults().length===0?1:2);}}function $t(i,t){if(i&1){let e=vT();Qi(0,"div",24)(1,"sh-form-field")(2,"label",25),nC(3,6),$l(),Qi(4,"input",26),cm("ngModelChange",function(n){kd(e);let r=iC(3);return UC(r.searchQuery,n)||(r.searchQuery=n),Od(n)}),Vg("keydown.enter",function(n){kd(e);let r=iC(3);return n.preventDefault(),Od(r.performSearch())}),$l(),CD(),$l(),Qi(5,"button",27),Vg("click",function(){kd(e);let n=iC(3);return Od(n.performSearch())}),aT(6,Pt,2,0,"sh-icon",28)(7,It,2,0,"sh-icon"),Qi(8,"span"),nC(9,7),$l()(),aT(10,Mt,5,0,"button",29),$l(),aT(11,Dt,3,1,"div",30);}if(i&2){let e=iC(3);CE(4),am("ngModel",e.searchQuery),yg("ngModelOptions",KC(6,St)),_D(),CE(),yg("disabled",e.isSearching()||!e.searchQuery().trim()),CE(),cT(e.isSearching()?6:7),CE(4),cT(e.isSearchMode()?10:-1),CE(),cT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function bt(i,t){if(i&1){let e=vT();aT(0,$t,12,7),Qi(1,"app-file-tree",21),Vg("hasExtendedData",function(n){kd(e);let r=iC(2);return Od(r.extendedDataType.set(n))}),Qi(2,"label",22),nC(3,5),$l(),vg(4,"input",23),CD(),$l();}if(i&2){let e=iC(2);cT(e.canSearch()?0:-1),CE(),yg("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("loadExtendedData",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),CE(3),_D();}}function vt(i,t){if(i&1){let e=vT();Qi(0,"sh-select",17),Vg("cleared",function(){kd(e);let n=iC();return Od(n.abortLoading())}),Qi(1,"input",18),cm("ngModelChange",function(n){kd(e);let r=iC();return UC(r.selectOption,n)||(r.selectOption=n),Od(n)}),$l(),CD(),ag(2,ht,5,7,"ng-template"),$l(),aT(3,Rt,1,0,"sh-progress-bar",13),aT(4,bt,5,9);}if(i&2){let e=iC();yg("options",e.versionOptions())("isClearable",false),CE(),am("ngModel",e.selectOption),yg("ngModelOptions",KC(6,St)),_D(),CE(2),cT(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),CE(),cT(e.showFileTree()?4:-1);}}var Ne=new jn,Et=()=>Ne.group({filesToRestore:Ne.control(""),passphrase:Ne.control(null)}),he=class i{#e=T(C);#t=T(G);#i=T(Q);#n=T(m);#o=T(ee);#a=T(W);#l=T(ci);#_=null;#r=null;#s=Ge([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=Nt$1(()=>this.#t.backup()?.Backup?.IsTemporary??true);showFileTree=Ge(false);backupSettings=Ge(null);rootPaths=Ge([]);initialNodes=Ge([]);loadingRootPath=Ge(false);isRepairing=Nt$1(()=>this.#s().length>0);loadedVersions=Ge({});canSearch=Nt$1(()=>this.#n.hasV2ListOperations());searchQuery=Ge("");isSearching=Ge(false);searchResults=Ge([]);hasSearched=Ge(false);isSearchMode=Nt$1(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=za(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString());}});backupSettingsEffect=za(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),n=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(w=>w.Version===parseInt(e))?.Time??null;if(!l)return;let c=`${t}+${l}`,I=n[c];if(this.needsDatabaseRepair()&&(!I||o))return;let D={id:t+"",time:l};this.backupSettings.set(D),this.getRootPath(D);});repairEffect=za(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let n=this.backupId(),r=`${n}+${o.Time}`;if(this.#r===r||(this.#r=r,this.#s().includes(r)))return;this.#s.update(l=>[...l,r]),this.#e.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:true,time:o.Time}}).pipe(zu(this.abortLoading$),qu(()=>{this.#r=null;})).subscribe(l=>{let c=l.ID;this.#i.waitForTaskToComplete(c).pipe(jo(1)).subscribe(()=>{this.#s.update(I=>I.filter(D=>D!==r)),this.loadedVersions.update(I=>(I[r]=true,I));});});}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:true,folderContents:false},o=t.id+"";this.isRepairing()||this.#_===o||(this.#_=o,this.loadingRootPath.set(true),this.showFileTree.set(false),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}}).pipe(zu(this.abortLoading$),qu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false),this.#_=null;})).subscribe({next:n=>{let r=(n.Data??[]).find(c=>c.Metadata&&c.Metadata.ExtType&&c.Metadata.ExtType.length>0);r&&this.extendedDataType.set(r.Metadata.ExtType);let l=(n.Data??[]).map(c=>c.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}):this.#e.getApiV1BackupByIdFiles(e).pipe(zu(this.abortLoading$),qu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false);})).subscribe({next:n=>{let r=n.Files.map(l=>l.Path??"");r.length>0?(this.initialNodes.set([]),this.rootPaths.set(r)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}));}abortLoading$=new fe;abortLoading(){this.showFileTree.set(false),this.loadingRootPath.set(false),this.abortLoading$.next(true);}displayFn(){let t=this.versionOptions();return e=>{if(!e)return "";let o=t?.find(n=>typeof n.Version=="number"&&n.Version.toString()===e);return o?`${o.Version}: ${this.#l.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#a.parent});}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#a.parent}):this.#t.exit();}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings(),o=(this.#t.extendedDataType()??"").length>0;if(!t||!e)return;let r=this.versionOptions()?.find(l=>l.Version===parseInt(this.selectOption()??""))?.Version;r!=null&&(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[r],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:o,SearchMetadata:o}}).pipe(zu(this.abortLoading$),qu(()=>this.isSearching.set(false))).subscribe({next:l=>{this.searchResults.set(l.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-select-files"]],features:[YC([ci])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Select an option...`;let r;r=$localize`(partial)`;let l;l=$localize`Path`;let c;c=$localize`Enter search term...`;let I;I=$localize`Search files`;let D;D=$localize`Search`;let w;w=$localize`Clear`;let oe;oe=$localize`0 results found`;let ne;return ne=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,o,r,l,I,D,w,oe,ne,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",c,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,o){e&1&&(Qi(0,"form",11,0),Vg("submit",function(){return o.next()}),Qi(2,"h3",12),nC(3,1),$l(),aT(4,Ot,1,0,"sh-progress-bar",13)(5,vt,5,7),Qi(6,"div",14)(7,"button",15),Vg("click",function(){return o.back()}),Lg(8,2),vg(9,"sh-icon"),Fg(),$l(),Qi(10,"button",16),Lg(11,3),vg(12,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.selectFilesForm),CE(4),cT(o.versionOptionsLoading()?4:5),CE(5),jg(o.isFileRestore()?"Back":"Exit"),rC(8));},dependencies:[Bn,Tn,Ze,Rn,Pn,Jt,Gn,gn,hn,Ne$1,v,Fe,N,Nt$2,d,ci,m$1],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"]})};var G=class i{#e=T(ee);#t=T(W);#i=T(m);#n=T(be);#o=T(C);#a=T(O$1);#l=null;backupId=Ge(null);backup=Ge(null);destinationTargetUrl=Ge(null);destinationTestSignal=Ge(null);selectFilesForm=Et();optionsForm=Tt();encryptionForm=mt();optionsFormSignal=L(this.optionsForm.valueChanges);selectFilesFormSignal=L(this.selectFilesForm.valueChanges);selectOption=Ge(null);versionOptionsLoading=Ge(false);versionOptions=Ge([]);isSubmitting=Ge(false);isFileRestore=Ge(false);isFullWidthPage=Ge(false);extendedDataType=Ge(null);alternateRestorePath=Ge(null);alternateRestorePathSourcePrefix=Ge(null);#_=za(()=>{let t=this.backupId(),e=this.backup()?.Backup,o=this.#a.serverSettings();!t||!e||o===void 0||e.ID!==null&&e.ID!==t||this.#l!==t&&(this.#l=t,this.optionsForm.patchValue(ct(e.Settings,o)));});init(t,e=false){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup();}updateTargetUrl(t){this.destinationTargetUrl.set(t);}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e);}submit(){this.isSubmitting.set(true);let t=this.backupId();this.backup()?.Backup?.IsTemporary??false?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#r(o.ID??"");},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#r(t??"");}showErrorDialog(t){this.#n.open(h,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}});}#r(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,n=this.selectOption(),r=this.versionOptions()?.find(l=>l.Version===(n&&parseInt(n)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:r?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t});},error:l=>{console.error("restore error",l);}});}exit(){this.#n.open(h,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#s(),this.#e.navigate(["/"]));}});}getVersionOptions(){this.versionOptions();}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Hs(o=>{let n=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return n==="EncryptedStorageNoPassphrase"||n==="FolderMissing"||n==="EmptyRemoteFolder"||e===0?cy(()=>o):$s(1e3).pipe(Gu(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(true),this.#i.hasV2ListOperations()?Dy([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(jo(1),qu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??true)&&e?.Backup?.DBPathExists===false){this.#n.open(h,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:r=>{this.#e.navigate(["/backup",t,"database"]);}});return}this.versionOptions.set((o.Data??[]).map(r=>({Version:r.Version??-1,IsFullBackup:r.IsFullBackup??void 0,Time:r.Time??"<missing>",FileCount:r.FileCount??void 0,FileSizes:r.FileSizes??void 0}))),this.backup.set(e);},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,n=o==="EncryptedStorageNoPassphrase",r=o==="FolderMissing",l=o==="EmptyRemoteFolder",c=$localize`An error occurred while loading the backup filesets: ${e.message}`;n&&(c=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),r&&(c=$localize`The backup storage folder was not found.`),l&&(c=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(h,{data:{title:$localize`Failed to load backup filesets`,message:c,confirmText:$localize`OK`,cancelText:void 0},closed:I=>{this.#e.navigate([n?"/restore-from-files/encryption":"/restore-from-files/destination"]);}});}}):Dy([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(Sy(3))]).pipe(jo(1),qu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e);}});}#s(){this.selectFilesForm.reset(),this.optionsForm.reset();}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function At(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Lg(1,6),vg(2,"input",32),CD(),Fg(),$l(),Qi(3,"sh-radio",28),Lg(4,7),Qi(5,"input",33),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseCustomRemoteDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function xt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Lg(1,8),vg(2,"input",32),CD(),Fg(),$l(),Qi(3,"sh-radio",28),Lg(4,9),Qi(5,"input",33),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseCustomRemoteDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function kt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Lg(1,10),Qi(2,"input",34),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseDiskDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D());}function Gt(i,t){if(i&1&&(Qi(0,"app-file-tree",30)(1,"label",35),jC(2,"Path"),$l(),vg(3,"input",36),CD(),$l()),i&2){let e=iC(2);yg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function wt(i,t){if(i&1&&(Qi(0,"app-file-tree",31)(1,"label",35),jC(2,"Path"),$l(),vg(3,"input",36),CD(),$l()),i&2){let e=iC(2);yg("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl()),CE(3),_D();}}function Wt(i,t){if(i&1&&(aT(0,At,6,0)(1,xt,6,0)(2,kt,3,0,"sh-radio",28),Qi(3,"sh-radio",28),Lg(4,5),vg(5,"input",29),CD(),Fg(),$l(),aT(6,Gt,4,3,"app-file-tree",30),aT(7,wt,4,4,"app-file-tree",31)),i&2){let e=iC();cT(e.extendedDataType()==="o365"?0:e.extendedDataType()==="gsuite"?1:e.extendedDataType()==="diskimage"?2:-1),CE(5),_D(),CE(),cT(e.optionsFormSignal()?.restoreFrom==="pickLocation"?6:-1),CE(),cT(e.showCustomRemoteRestoreTree()?7:-1);}}function Vt(i,t){if(i&1&&(Qi(0,"sh-radio",28),Lg(1,11),vg(2,"input",37),CD(),Fg(),$l(),Qi(3,"sh-radio",28),Lg(4,12),vg(5,"input",29),CD(),Fg(),$l(),Qi(6,"app-file-tree",30)(7,"label",35),jC(8,"Path"),$l(),vg(9,"input",36),CD(),$l()),i&2){let e=iC();CE(2),_D(),CE(3),_D(),CE(),yg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function Bt(i,t){i&1&&(Qi(0,"app-toggle-card",23),ql(1,24),nC(2,13),Gl(),Qi(3,"sh-toggle",28),Lg(4,14),vg(5,"input",38),CD(),Fg(),$l()()),i&2&&(yg("disableToggle",true),CE(5),_D());}function zt(i,t){i&1&&(Qi(0,"app-toggle-card",23),ql(1,24),nC(2,15),Gl(),Qi(3,"sh-radio",28),Lg(4,16),vg(5,"input",39),CD(),Fg(),$l(),Qi(6,"sh-radio",28),Lg(7,17),vg(8,"input",40),CD(),Fg(),$l()(),Qi(9,"app-toggle-card"),ql(10,24),nC(11,18),Gl(),Qi(12,"sh-toggle",41),Lg(13,19),vg(14,"input",42),CD(),Fg(),$l(),Qi(15,"sh-toggle",41),Lg(16,20),vg(17,"input",43),CD(),Fg(),$l()()),i&2&&(yg("disableToggle",true),CE(5),_D(),CE(3),_D(),CE(6),_D(),CE(3),_D());}var B=new jn,Tt=()=>B.group({restoreFrom:B.control("original"),restoreFromPath:B.control(""),handleExisting:B.control(_e.handleExisting),permissions:B.control(_e.permissions),includeMetadata:B.control(_e.includeMetadata),customRemoteIgnoreExisting:B.control(false)}),Re=class i{#e=T(G);#t=T(ee);#i=T(W);#n=T(m);#o=T(be);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=Ge(null);backupId=Nt$1(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=Nt$1(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":t==="diskimage"?"diskimage":null});remoteCustomSourceEntry=Nt$1(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():t==="diskimage"?"diskimage://":null});showCustomRemoteRestoreTree=Nt$1(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()||this.optionsFormSignal()?.restoreFrom==="diskimage"));isCustomRemoteRestore=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(Tt$1,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:true,expectedResult:"any",suppressErrorDialogs:true,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"));}),false}chooseDiskDestination(){return true}#a=za(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"));});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent});}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(h,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:r=>{r&&this.#e.submit();}});return}let e=this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom",o=this.optionsFormSignal()?.restoreFrom==="diskimage";if(e){let n=this.optionsFormSignal()?.restoreFromPath;if(n&&n.startsWith("/")&&(n=n.substring(1)),!n||n.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let r=this.optionsFormSignal()?.customRemoteIgnoreExisting,l=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),c=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(n)}${l}&google-ignore-existing=${r?"true":"false"}`:`@office365://${encodeURIComponent(n)}${l}&office365-ignore-existing=${r?"true":"false"}`;this.#e.setAlternateRestorePath(c,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else if(o){let n=this.optionsFormSignal()?.restoreFromPath;if(!n||n.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:$localize`Please choose a target disk to restore to.`,confirmText:$localize`OK`,cancelText:void 0}});return}n.startsWith("@diskimage://")||(n=`@diskimage://${n}`),this.#e.setAlternateRestorePath(n,null),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else this.#e.setAlternateRestorePath(null,null);this.#e.submit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let r;r=$localize` Local file system ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let c;c=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let D;D=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Target disk ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let P;P=$localize`Restore settings`;let Pe;Pe=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Ie;Ie=$localize`How do you want to handle existing files?`;let Me;Me=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Le;Le=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let ye;ye=$localize`Metadata settings`;let De;De=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let $e;return $e=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,n,r,l,c,I,D,w,oe,ne,P,Pe,Ie,Me,Le,ye,De,$e,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["type","radio","name","restoreFrom","value","diskimage","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(Qi(0,"form",21,0),Vg("submit",function(){return o.submit()}),Qi(2,"h3",22),nC(3,1),$l(),Qi(4,"app-toggle-card",23),ql(5,24),nC(6,2),Gl(),aT(7,Wt,8,3)(8,Vt,10,3),$l(),aT(9,Bt,6,1,"app-toggle-card",23)(10,zt,18,1),Qi(11,"div",25)(12,"button",26),Vg("click",function(){return o.goBack()}),Lg(13,3),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",27),Lg(16,4),vg(17,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.optionsForm),CE(4),yg("disableToggle",true),CE(3),cT(o.extendedDataType()!==null?7:8),CE(2),cT(o.isCustomRemoteRestore()&&o.optionsFormSignal()?.restoreFrom!=="diskimage"?9:o.optionsFormSignal()?.restoreFrom!=="diskimage"?10:-1),CE(6),Yg("loading",o.isSubmitting()));},dependencies:[Gn,Tn,Ze,yt$1,rn,Rn,Pn,gn,hn,Ze$1,Ne$1,J,O,v,N],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};
|
|
2
|
+
var chunk3ZPV5XW7=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:mt,default:Oe});var chunk2Z6G3TRC=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreSelectFilesForm:Et,default:he});var chunkW2TUY3B6=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreOptionsForm:Tt,default:Re});export{G,chunk2Z6G3TRC as a,chunkW2TUY3B6 as b,chunk3ZPV5XW7 as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import v$1 from'./chunk-Cng2PWKw.js';import'./chunk-BRJ93eei.js';import'./chunk-SycSMD-r.js';import {k}from'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import {c}from'./chunk-CQv4eyEK.js';import'./chunk-C5p3bQwH.js';import {T,aX as y,ab as C,a6 as be$1,G as Ge,N as Nt,bb as h,h as hw,bc as Fi,bd as Jt,be as Kn,v,d as N,bf as pi,aJ as ci,aH as m,b2 as m$1,Q as Qi,f as aT,bg as ag,w as jC,$ as $l,n as nC,j as vg,V as Vg,Y as Yg,C as CE,i as cT,A as yg,J as om,aa as Ql,bh as Q,z as za,aZ as ee,l as vT,aM as ob,a1 as dT,r as kd,k as iC,O as Od,aN as ab,aB as im,aR as sb,a2 as fT,as as Wd,bi as qd,aP as ql,aQ as Gl,ap as lT}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import'./chunk-DoYGADYB.js';import'./chunk-D2aWqPl_.js';var U=class r{#e=T(y);#n=T(Q);#i=Ge([]);recentFiles=this.#i.asReadonly();#r=5;#s=Ge(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=za(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#c(i.CurrentFilename,i.CurrentFilesize);});#c(i,e){let s=new Date;this.#i.update(c=>c.length>0&&c[0].filename===i?c:[{filename:i,filesize:e,timestamp:s},...c].slice(0,this.#r));}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#l();},1e3);}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null);}#l(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let e=new Date,s=(e.getTime()-this.#a.getTime())/1e3;if(s<5)return;let c=i.ProcessedFileCount||0,P=i.ProcessedFileSize||0,I=c-this.#t.files,k=P-this.#t.bytes,x=I/s,M=k/s,A=(i.TotalFileCount||0)-c,u=(i.TotalFileSize||0)-P,O=null,T=null;x>0&&(O=A/x),M>0&&(T=u/M);let R=null,w="bytes";if(O!==null&&T!==null){let Se=Math.max(O,T);R=new Date(e.getTime()+Se*1e3),w=O>T?"files":"bytes";}else O!==null?(R=new Date(e.getTime()+O*1e3),w="files"):T!==null&&(R=new Date(e.getTime()+T*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:x,currentBytesPerSecond:M,estimatedCompletion:R,metric:w});}static \u0275fac=function(e){return new(e||r)};static \u0275prov=ee({token:r,factory:r.\u0275fac,providedIn:"root"})};function xe(r,i){if(r&1&&(Qi(0,"div",42)(1,"span",20),jC(2,"Processing"),$l(),Qi(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),jC(6,"file"),$l(),Qi(7,"div",45)(8,"span",46),jC(9),$l(),Qi(10,"span",47),jC(11),ob(12,"bytes"),$l()()()()()),r&2){let e=iC(2);CE(8),yg("title",e.statusData()?.CurrentFilename),CE(),Ql(" ",e.statusData()?.CurrentFilename," "),CE(2),om(sb(12,3,e.statusData()?.CurrentFilesize));}}function Me(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),jC(2),$l(),Qi(3,"span",47),jC(4),ob(5,"bytes"),$l()()),r&2){let e=i.$implicit;CE(),yg("title",e.filename),CE(),om(e.filename),CE(2),om(sb(5,3,e.filesize));}}function Oe(r,i){r&1&&(Qi(0,"div",36),nC(1,2),$l());}function Te(r,i){if(r&1&&(Qi(0,"sh-list")(1,"div",48)(2,"span",20),jC(3,"ETA"),$l(),Qi(4,"span",21),jC(5),ob(6,"date"),Qi(7,"span",49),jC(8),ob(9,"relativeTime"),$l()()(),Qi(10,"div",50)(11,"span",20),jC(12,"Files/s"),$l(),Qi(13,"span",21),jC(14),ob(15,"number"),$l()(),Qi(16,"div",50)(17,"span",20),jC(18,"Upload Speed"),$l(),Qi(19,"span",21),jC(20),ob(21,"bytes"),$l()()()),r&2){let e=iC(2);CE(5),Ql(" ",ab(6,4,e.etaData()?.estimatedCompletion,"mediumTime")," "),CE(3),Ql(" (",sb(9,7,e.etaData()?.estimatedCompletion),") "),CE(6),Ql(" ",ab(15,9,e.etaData()?.currentFilesPerSecond,"1.1-1")," "),CE(6),Ql("",sb(21,12,e.etaData()?.currentBytesPerSecond),"/s");}}function ve(r,i){if(r&1&&(Qi(0,"div",53)(1,"div",54)(2,"span",55),jC(3),$l(),Qi(4,"span",56),jC(5),ob(6,"bytes"),$l()(),vg(7,"sh-progress-bar",57),$l()),r&2){let e=i.$implicit;CE(2),yg("title",e.BackendPath),CE(),om(e.BackendPath),CE(2),Ql("",sb(6,4,e.BackendSpeed),"/s"),CE(2),yg("value",(e.BackendFileProgress||0)/(e.BackendFileSize||1)*100);}}function he(r,i){if(r&1&&(Qi(0,"div",51)(1,"sh-list"),ag(2,ve,8,6,"div",52),$l()()),r&2){let e=iC(2);CE(2),yg("ngForOf",e.statusData()?.ActiveTransfers);}}function ye(r,i){if(r&1){let e=vT();Qi(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"clock"),$l(),Qi(5,"h2"),jC(6),$l()()(),Qi(7,"div",26)(8,"div",27)(9,"span",28),jC(10),ob(11,"number"),$l()(),vg(12,"sh-progress-bar",29),Qi(13,"sh-list")(14,"div",30)(15,"span",20),jC(16,"Files"),$l(),Qi(17,"span",21),jC(18),$l()(),Qi(19,"div",30)(20,"span",20),jC(21,"Size"),$l(),Qi(22,"span",21),jC(23),ob(24,"bytes"),ob(25,"bytes"),$l()()()()(),Qi(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),jC(30,"file"),$l(),Qi(31,"h3"),jC(32,"Activity"),$l()()(),Qi(33,"div",31),ag(34,xe,13,5,"div",32),Qi(35,"div",33)(36,"span",20),nC(37,1),$l(),Qi(38,"sh-list",34),dT(39,Me,6,5,"div",35,lT),aT(41,Oe,2,0,"div",36),$l()()()(),Qi(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),jC(46,"gauge"),$l(),Qi(47,"h3"),jC(48,"Performance"),$l()(),Qi(49,"div",37),jC(50),ob(51,"bytes"),$l()(),Qi(52,"div",38),ag(53,Te,22,14,"sh-list",25),Qi(54,"div",39)(55,"button",40),Vg("click",function(){kd(e);let c=iC();return Od(c.toggleTransfers())}),jC(56),$l(),ag(57,he,3,1,"div",41),$l()()();}if(r&2){let e=iC();CE(6),om(e.statusText()),CE(4),Ql("",ab(11,13,e.progress(),"1.0-0"),"%"),CE(2),yg("value",e.progress()),CE(6),im("",e.statusData()?.ProcessedFileCount," / ",e.statusData()?.TotalFileCount),CE(5),im(" ",sb(24,16,e.statusData()?.ProcessedFileSize)," / ",sb(25,18,e.statusData()?.TotalFileSize)," "),CE(11),yg("ngIf",e.statusData()?.CurrentFilename),CE(5),fT(e.recentFiles()),CE(2),cT(e.recentFiles().length===0?41:-1),CE(9),Ql("",sb(51,20,e.statusData()?.BackendSpeed),"/s"),CE(3),yg("ngIf",e.etaData()),CE(3),Ql(" ",e.transfersExpanded()?"Hide Details":"Show Details"," "),CE(),yg("ngIf",e.transfersExpanded());}}function Ee(r,i){if(r&1&&(Qi(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"calendar"),$l(),Qi(5,"h3"),nC(6,7),$l()()(),Qi(7,"div",76)(8,"div",77)(9,"span",78),jC(10),$l(),Qi(11,"div",79)(12,"span",80),jC(13),ob(14,"date"),$l(),Qi(15,"span",81),jC(16),ob(17,"relativeTime"),$l()()(),Qi(18,"sh-icon",82),jC(19,"caret-right"),$l()()()),r&2){let e=iC(2);CE(10),om(e.nextBackup().backup?.Name),CE(3),om(ab(14,3,e.nextBackup().time,"medium")),CE(3),Ql("(",sb(17,6,e.nextBackup().time),")");}}function be(r,i){r&1&&(Qi(0,"span",74),nC(1,8),$l());}function Ne(r,i){if(r&1){let e=vT();Qi(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),Wd(),Qi(4,"svg",62),vg(5,"circle",63),$l(),qd(),Qi(6,"sh-icon",64),nC(7,3),$l()()(),Qi(8,"div",65)(9,"h2"),nC(10,4),$l(),Qi(11,"p",66),nC(12,5),$l()(),Qi(13,"div",67)(14,"button",68),Vg("click",function(){kd(e);let c=iC();return Od(c.pauseResume())}),Qi(15,"sh-icon"),jC(16),$l(),jC(17),$l()()()(),ag(18,Ee,20,8,"sh-card",69),Qi(19,"sh-card",70)(20,"div",71)(21,"span",20),nC(22,6),$l(),Qi(23,"div",72)(24,"span",73),jC(25),$l(),aT(26,be,2,0,"span",74),$l()()();}if(r&2){let e=iC();CE(14),yg("color",e.clientIsRunning()?"primary":"accent"),CE(2),om(e.clientIsRunning()?"pause":"play"),CE(),Ql(" ",e.clientIsRunning()?"Pause Execution":"Resume Execution"," "),CE(),yg("ngIf",e.nextBackup()),CE(6),Yg("running",e.clientIsRunning()),CE(),om(e.serverState()?.ProgramState),CE(),cT(e.clientIsRunning()?-1:26);}}function Ie(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),jC(2),$l(),Qi(3,"span",47),jC(4),ob(5,"bytes"),$l()()),r&2){let e=i.$implicit;CE(),yg("title",e.filename),CE(),om(e.filename),CE(2),om(sb(5,3,e.filesize));}}function ke(r,i){if(r&1&&(Qi(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"clock-counter-clockwise"),$l(),Qi(5,"h3"),nC(6,9),$l()()(),Qi(7,"sh-list"),ag(8,Ie,6,5,"div",84),$l()()),r&2){let e=iC();CE(8),yg("ngForOf",e.recentFiles());}}function Ae(r,i){if(r&1&&(Qi(0,"div",19)(1,"span",20),jC(2,"Next Task:"),$l(),Qi(3,"div",21)(4,"div"),jC(5),$l(),Qi(6,"div",49),jC(7),ob(8,"date"),ob(9,"relativeTime"),$l()()()),r&2){let e=iC();CE(5),om(e.nextBackup().backup?.Name),CE(2),im(" ",ab(8,3,e.nextBackup().time,"medium")," (",sb(9,6,e.nextBackup().time),") ");}}function Re(r,i){if(r&1){let e=vT();ql(0),Qi(1,"button",85),Vg("click",function(){kd(e);let c=iC();return Od(c.stop())}),Qi(2,"sh-icon"),jC(3,"stop"),$l(),jC(4," Stop "),$l(),Qi(5,"button",85),Vg("click",function(){kd(e);let c=iC();return Od(c.abort())}),Qi(6,"sh-icon"),jC(7,"x-circle"),$l(),jC(8," Abort "),$l(),Gl();}}var J=class r{#e=T(y);#n=T(U);#i=T(C);#r=T(be$1);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=Ge(false);clientIsRunning=this.#e.clientIsRunning;statusText=Nt(()=>{let i=this.statusData()?.Phase;return i?h[i]||i:""});progress=Nt(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=Nt(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView();}ngOnDestroy(){this.#n.deactivateView();}toggleTransfers(){this.transfersExpanded.update(i=>!i);}isTaskRunning(){return !!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(k,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe();}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe();}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe();}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=hw({type:r,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let e;e=$localize`Recently Processed`;let s;s=$localize`No recent files`;let c;c=$localize`check-bold`;let P;P=$localize`System Ready`;let I;I=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let x;x=$localize`Next Scheduled Task`;let M;M=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,e,s,c,P,I,k,x,M,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small",1,"toggle-btn","ghost",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","color"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(e,s){e&1&&(Qi(0,"div",10),aT(1,ye,58,22)(2,Ne,27,8),ag(3,ke,9,1,"sh-card",11),Qi(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),jC(8,"list"),$l(),Qi(9,"h3"),nC(10,0),$l()()(),Qi(11,"div",16),vg(12,"app-logs-live",17),$l()(),Qi(13,"sh-card")(14,"div",18)(15,"h3"),jC(16,"Server Status"),$l(),Qi(17,"div",19)(18,"span",20),jC(19,"State:"),$l(),Qi(20,"span",21),jC(21),$l()(),ag(22,Ae,10,8,"div",22),Qi(23,"div",23)(24,"button",24),Vg("click",function(){return s.pauseResume()}),Qi(25,"sh-icon"),jC(26),$l(),jC(27),$l(),ag(28,Re,9,0,"ng-container",25),$l()()()()),e&2&&(Yg("idle",!s.isTaskRunning()),CE(),cT(s.isTaskRunning()?1:2),CE(2),yg("ngIf",!s.isTaskRunning()&&s.recentFiles().length>0),CE(9),yg("polling",s.isTaskRunning())("whenFilter",s.taskStartTime()?.getTime())("backupIdFilter",s.currentBackupId()),CE(9),om(s.serverState()?.ProgramState),CE(),yg("ngIf",s.nextBackup()),CE(4),om(s.clientIsRunning()?"pause":"play_arrow"),CE(),Ql(" ",s.clientIsRunning()?"Pause":"Resume"," "),CE(),yg("ngIf",s.isTaskRunning()));},dependencies:[Fi,Jt,Kn,f,d,v,N,v$1,c,pi,ci,m,m$1],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"]})};export{J as default};
|
|
1
|
+
import v$1 from'./chunk-Cz0KuBHB.js';import'./chunk-CIcBoEH1.js';import'./chunk-B52v_pjw.js';import {k}from'./chunk-CUaRQ2FJ.js';import'./chunk-aOMoAKYY.js';import {c}from'./chunk-BpRWdcC8.js';import'./chunk-BTgf5lfZ.js';import {T,aX as y,ab as C,a6 as be$1,G as Ge,N as Nt,bb as h,h as hw,bc as Fi,bd as Jt,be as Kn,v,d as N,bf as pi,aJ as ci,aH as m,b2 as m$1,Q as Qi,f as aT,bg as ag,w as jC,$ as $l,n as nC,j as vg,V as Vg,Y as Yg,C as CE,i as cT,A as yg,J as om,aa as Ql,bh as Q,z as za,aZ as ee,l as vT,aM as ob,a1 as dT,r as kd,k as iC,O as Od,aN as ab,aB as im,aR as sb,a2 as fT,as as Wd,bi as qd,aP as ql,aQ as Gl,ap as lT}from'./main-VVQP2YE7.js';import {f}from'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import'./chunk-BO2GlieG.js';import'./chunk-DqIU7ViF.js';var U=class r{#e=T(y);#n=T(Q);#i=Ge([]);recentFiles=this.#i.asReadonly();#r=5;#s=Ge(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=za(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#c(i.CurrentFilename,i.CurrentFilesize);});#c(i,e){let s=new Date;this.#i.update(c=>c.length>0&&c[0].filename===i?c:[{filename:i,filesize:e,timestamp:s},...c].slice(0,this.#r));}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#l();},1e3);}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null);}#l(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let e=new Date,s=(e.getTime()-this.#a.getTime())/1e3;if(s<5)return;let c=i.ProcessedFileCount||0,P=i.ProcessedFileSize||0,I=c-this.#t.files,k=P-this.#t.bytes,x=I/s,M=k/s,A=(i.TotalFileCount||0)-c,u=(i.TotalFileSize||0)-P,O=null,T=null;x>0&&(O=A/x),M>0&&(T=u/M);let R=null,w="bytes";if(O!==null&&T!==null){let Se=Math.max(O,T);R=new Date(e.getTime()+Se*1e3),w=O>T?"files":"bytes";}else O!==null?(R=new Date(e.getTime()+O*1e3),w="files"):T!==null&&(R=new Date(e.getTime()+T*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:x,currentBytesPerSecond:M,estimatedCompletion:R,metric:w});}static \u0275fac=function(e){return new(e||r)};static \u0275prov=ee({token:r,factory:r.\u0275fac,providedIn:"root"})};function xe(r,i){if(r&1&&(Qi(0,"div",42)(1,"span",20),jC(2,"Processing"),$l(),Qi(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),jC(6,"file"),$l(),Qi(7,"div",45)(8,"span",46),jC(9),$l(),Qi(10,"span",47),jC(11),ob(12,"bytes"),$l()()()()()),r&2){let e=iC(2);CE(8),yg("title",e.statusData()?.CurrentFilename),CE(),Ql(" ",e.statusData()?.CurrentFilename," "),CE(2),om(sb(12,3,e.statusData()?.CurrentFilesize));}}function Me(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),jC(2),$l(),Qi(3,"span",47),jC(4),ob(5,"bytes"),$l()()),r&2){let e=i.$implicit;CE(),yg("title",e.filename),CE(),om(e.filename),CE(2),om(sb(5,3,e.filesize));}}function Oe(r,i){r&1&&(Qi(0,"div",36),nC(1,2),$l());}function Te(r,i){if(r&1&&(Qi(0,"sh-list")(1,"div",48)(2,"span",20),jC(3,"ETA"),$l(),Qi(4,"span",21),jC(5),ob(6,"date"),Qi(7,"span",49),jC(8),ob(9,"relativeTime"),$l()()(),Qi(10,"div",50)(11,"span",20),jC(12,"Files/s"),$l(),Qi(13,"span",21),jC(14),ob(15,"number"),$l()(),Qi(16,"div",50)(17,"span",20),jC(18,"Upload Speed"),$l(),Qi(19,"span",21),jC(20),ob(21,"bytes"),$l()()()),r&2){let e=iC(2);CE(5),Ql(" ",ab(6,4,e.etaData()?.estimatedCompletion,"mediumTime")," "),CE(3),Ql(" (",sb(9,7,e.etaData()?.estimatedCompletion),") "),CE(6),Ql(" ",ab(15,9,e.etaData()?.currentFilesPerSecond,"1.1-1")," "),CE(6),Ql("",sb(21,12,e.etaData()?.currentBytesPerSecond),"/s");}}function ve(r,i){if(r&1&&(Qi(0,"div",53)(1,"div",54)(2,"span",55),jC(3),$l(),Qi(4,"span",56),jC(5),ob(6,"bytes"),$l()(),vg(7,"sh-progress-bar",57),$l()),r&2){let e=i.$implicit;CE(2),yg("title",e.BackendPath),CE(),om(e.BackendPath),CE(2),Ql("",sb(6,4,e.BackendSpeed),"/s"),CE(2),yg("value",(e.BackendFileProgress||0)/(e.BackendFileSize||1)*100);}}function he(r,i){if(r&1&&(Qi(0,"div",51)(1,"sh-list"),ag(2,ve,8,6,"div",52),$l()()),r&2){let e=iC(2);CE(2),yg("ngForOf",e.statusData()?.ActiveTransfers);}}function ye(r,i){if(r&1){let e=vT();Qi(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"clock"),$l(),Qi(5,"h2"),jC(6),$l()()(),Qi(7,"div",26)(8,"div",27)(9,"span",28),jC(10),ob(11,"number"),$l()(),vg(12,"sh-progress-bar",29),Qi(13,"sh-list")(14,"div",30)(15,"span",20),jC(16,"Files"),$l(),Qi(17,"span",21),jC(18),$l()(),Qi(19,"div",30)(20,"span",20),jC(21,"Size"),$l(),Qi(22,"span",21),jC(23),ob(24,"bytes"),ob(25,"bytes"),$l()()()()(),Qi(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),jC(30,"file"),$l(),Qi(31,"h3"),jC(32,"Activity"),$l()()(),Qi(33,"div",31),ag(34,xe,13,5,"div",32),Qi(35,"div",33)(36,"span",20),nC(37,1),$l(),Qi(38,"sh-list",34),dT(39,Me,6,5,"div",35,lT),aT(41,Oe,2,0,"div",36),$l()()()(),Qi(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),jC(46,"gauge"),$l(),Qi(47,"h3"),jC(48,"Performance"),$l()(),Qi(49,"div",37),jC(50),ob(51,"bytes"),$l()(),Qi(52,"div",38),ag(53,Te,22,14,"sh-list",25),Qi(54,"div",39)(55,"button",40),Vg("click",function(){kd(e);let c=iC();return Od(c.toggleTransfers())}),jC(56),$l(),ag(57,he,3,1,"div",41),$l()()();}if(r&2){let e=iC();CE(6),om(e.statusText()),CE(4),Ql("",ab(11,13,e.progress(),"1.0-0"),"%"),CE(2),yg("value",e.progress()),CE(6),im("",e.statusData()?.ProcessedFileCount," / ",e.statusData()?.TotalFileCount),CE(5),im(" ",sb(24,16,e.statusData()?.ProcessedFileSize)," / ",sb(25,18,e.statusData()?.TotalFileSize)," "),CE(11),yg("ngIf",e.statusData()?.CurrentFilename),CE(5),fT(e.recentFiles()),CE(2),cT(e.recentFiles().length===0?41:-1),CE(9),Ql("",sb(51,20,e.statusData()?.BackendSpeed),"/s"),CE(3),yg("ngIf",e.etaData()),CE(3),Ql(" ",e.transfersExpanded()?"Hide Details":"Show Details"," "),CE(),yg("ngIf",e.transfersExpanded());}}function Ee(r,i){if(r&1&&(Qi(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"calendar"),$l(),Qi(5,"h3"),nC(6,7),$l()()(),Qi(7,"div",76)(8,"div",77)(9,"span",78),jC(10),$l(),Qi(11,"div",79)(12,"span",80),jC(13),ob(14,"date"),$l(),Qi(15,"span",81),jC(16),ob(17,"relativeTime"),$l()()(),Qi(18,"sh-icon",82),jC(19,"caret-right"),$l()()()),r&2){let e=iC(2);CE(10),om(e.nextBackup().backup?.Name),CE(3),om(ab(14,3,e.nextBackup().time,"medium")),CE(3),Ql("(",sb(17,6,e.nextBackup().time),")");}}function be(r,i){r&1&&(Qi(0,"span",74),nC(1,8),$l());}function Ne(r,i){if(r&1){let e=vT();Qi(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),Wd(),Qi(4,"svg",62),vg(5,"circle",63),$l(),qd(),Qi(6,"sh-icon",64),nC(7,3),$l()()(),Qi(8,"div",65)(9,"h2"),nC(10,4),$l(),Qi(11,"p",66),nC(12,5),$l()(),Qi(13,"div",67)(14,"button",68),Vg("click",function(){kd(e);let c=iC();return Od(c.pauseResume())}),Qi(15,"sh-icon"),jC(16),$l(),jC(17),$l()()()(),ag(18,Ee,20,8,"sh-card",69),Qi(19,"sh-card",70)(20,"div",71)(21,"span",20),nC(22,6),$l(),Qi(23,"div",72)(24,"span",73),jC(25),$l(),aT(26,be,2,0,"span",74),$l()()();}if(r&2){let e=iC();CE(14),yg("color",e.clientIsRunning()?"primary":"accent"),CE(2),om(e.clientIsRunning()?"pause":"play"),CE(),Ql(" ",e.clientIsRunning()?"Pause Execution":"Resume Execution"," "),CE(),yg("ngIf",e.nextBackup()),CE(6),Yg("running",e.clientIsRunning()),CE(),om(e.serverState()?.ProgramState),CE(),cT(e.clientIsRunning()?-1:26);}}function Ie(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),jC(2),$l(),Qi(3,"span",47),jC(4),ob(5,"bytes"),$l()()),r&2){let e=i.$implicit;CE(),yg("title",e.filename),CE(),om(e.filename),CE(2),om(sb(5,3,e.filesize));}}function ke(r,i){if(r&1&&(Qi(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"clock-counter-clockwise"),$l(),Qi(5,"h3"),nC(6,9),$l()()(),Qi(7,"sh-list"),ag(8,Ie,6,5,"div",84),$l()()),r&2){let e=iC();CE(8),yg("ngForOf",e.recentFiles());}}function Ae(r,i){if(r&1&&(Qi(0,"div",19)(1,"span",20),jC(2,"Next Task:"),$l(),Qi(3,"div",21)(4,"div"),jC(5),$l(),Qi(6,"div",49),jC(7),ob(8,"date"),ob(9,"relativeTime"),$l()()()),r&2){let e=iC();CE(5),om(e.nextBackup().backup?.Name),CE(2),im(" ",ab(8,3,e.nextBackup().time,"medium")," (",sb(9,6,e.nextBackup().time),") ");}}function Re(r,i){if(r&1){let e=vT();ql(0),Qi(1,"button",85),Vg("click",function(){kd(e);let c=iC();return Od(c.stop())}),Qi(2,"sh-icon"),jC(3,"stop"),$l(),jC(4," Stop "),$l(),Qi(5,"button",85),Vg("click",function(){kd(e);let c=iC();return Od(c.abort())}),Qi(6,"sh-icon"),jC(7,"x-circle"),$l(),jC(8," Abort "),$l(),Gl();}}var J=class r{#e=T(y);#n=T(U);#i=T(C);#r=T(be$1);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=Ge(false);clientIsRunning=this.#e.clientIsRunning;statusText=Nt(()=>{let i=this.statusData()?.Phase;return i?h[i]||i:""});progress=Nt(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=Nt(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView();}ngOnDestroy(){this.#n.deactivateView();}toggleTransfers(){this.transfersExpanded.update(i=>!i);}isTaskRunning(){return !!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(k,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe();}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe();}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe();}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=hw({type:r,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let e;e=$localize`Recently Processed`;let s;s=$localize`No recent files`;let c;c=$localize`check-bold`;let P;P=$localize`System Ready`;let I;I=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let x;x=$localize`Next Scheduled Task`;let M;M=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,e,s,c,P,I,k,x,M,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small",1,"toggle-btn","ghost",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","color"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(e,s){e&1&&(Qi(0,"div",10),aT(1,ye,58,22)(2,Ne,27,8),ag(3,ke,9,1,"sh-card",11),Qi(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),jC(8,"list"),$l(),Qi(9,"h3"),nC(10,0),$l()()(),Qi(11,"div",16),vg(12,"app-logs-live",17),$l()(),Qi(13,"sh-card")(14,"div",18)(15,"h3"),jC(16,"Server Status"),$l(),Qi(17,"div",19)(18,"span",20),jC(19,"State:"),$l(),Qi(20,"span",21),jC(21),$l()(),ag(22,Ae,10,8,"div",22),Qi(23,"div",23)(24,"button",24),Vg("click",function(){return s.pauseResume()}),Qi(25,"sh-icon"),jC(26),$l(),jC(27),$l(),ag(28,Re,9,0,"ng-container",25),$l()()()()),e&2&&(Yg("idle",!s.isTaskRunning()),CE(),cT(s.isTaskRunning()?1:2),CE(2),yg("ngIf",!s.isTaskRunning()&&s.recentFiles().length>0),CE(9),yg("polling",s.isTaskRunning())("whenFilter",s.taskStartTime()?.getTime())("backupIdFilter",s.currentBackupId()),CE(9),om(s.serverState()?.ProgramState),CE(),yg("ngIf",s.nextBackup()),CE(4),om(s.clientIsRunning()?"pause":"play_arrow"),CE(),Ql(" ",s.clientIsRunning()?"Pause":"Resume"," "),CE(),yg("ngIf",s.isTaskRunning()));},dependencies:[Fi,Jt,Kn,f,d,v,N,v$1,c,pi,ci,m,m$1],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"]})};export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e as ee,W}from'./chunk-CzJ3-6Pu.js';import {k}from'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import {N as Ne,E as Ee}from'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import {v as ve}from'./chunk-DKacf9Tj.js';import {x}from'./chunk-gaP3Sx_C.js';import {c}from'./chunk-CI8lsvKT.js';import {D}from'./chunk-C5p3bQwH.js';import {T,ab as C,aX as y,a5 as g,bh as Q,a6 as be,m,N as Nt$1,G as Ge,D as A,z as za,H as qu,h as hw,_ as _t$1,v,d as N,j as vg,Q as Qi,V as Vg,n as nC,$ as $l,L as Lg,F as Fg,aP as ql,aQ as Gl,f as aT,b3 as cg,b4 as oT,bg as ag,c6 as lb,C as CE,A as yg,a3 as KC,i as cT,b5 as iT,o as oC,l as vT,p as cm,r as kd,k as iC,U as UC,O as Od,x as am,w as jC,au as jg,av as rC,a1 as dT,ap as lT,a2 as fT,Y as Yg,c4 as pC,a$ as JC,b$ as Dg,ak as um,aa as Ql,ar as Qp,al as WC,aM as ob,aN as ab,ao as qC,aR as sb,b_ as ei$1,co as ce,cp as y$1,bc as Fi,cq as tn,cr as en,ad as Mr,aJ as ci,bf as pi,cs as A$1,ct as I,cu as fv,cv as Je,aL as hi,cw as Ne$1,cx as U,bd as Jt$1,cy as Ce,be as Kn$1,cz as ye,cA as qt$1,cB as Ee$1,cC as Qt$1,cD as Ze,cE as ne,cF as m$1,cG as de,cH as g$1,cI as nn,cJ as j,cK as d$1,cL as Rt$1,cM as Zt$1,cN as Gt$1,cO as Kt$1,cP as Yt$1,cQ as zt$1,cR as q,cS as Q$1,cT as Bt$1,cU as Pt$1,cV as kt$1,cW as Ut$1,cX as jt$1,cY as Ot$1,cZ as Nt$2,c_ as Fe,c$ as M,d0 as xt$1,d1 as J,d2 as Vt$1,bq as Rr,d3 as Or,d4 as Tr,d5 as f$1,d6 as wi,d7 as Ai,bL as s,d8 as L,d9 as k$1,da as _,aI as c$1,aH as m$2,b2 as m$3}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import'./chunk-D3SUPUQT.js';import'./chunk-DoYGADYB.js';import {a as at$1}from'./chunk-Crs56mDy.js';import {C as C$1}from'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var Dn=()=>[_t$1,Promise.resolve().then(function(){return chunkXA5RWQQ5}).then(e=>e.NgTemplateOutlet),v,N,Promise.resolve().then(function(){return chunkBEVA4HT2}).then(e=>e.ShipChip),import('./chunk-SycSMD-r.js').then(e=>e.ShipTable),import('./chunk-SycSMD-r.js').then(e=>e.ShipSort),at$1,Promise.resolve().then(function(){return chunkQICO34G3}).then(e=>e.BackupProgressComponent),Promise.resolve().then(function(){return chunkCORTKH64}).then(e=>e.DurationFormatPipe),Promise.resolve().then(function(){return chunkCHQM3PCJ}).then(e=>e.BytesPipe),Promise.resolve().then(function(){return chunkKDVMMWQR}).then(e=>e.RelativeTimePipe)],fn=()=>["/add-backup"],hn=()=>["/restore"],Pn=e=>({$implicit:e}),$n=()=>["/backup/new"],Rn=e=>["/restore",e],yn=e=>["/backup",e,"export"],An=e=>["/backup",e,"delete"],xn=e=>["/backup",e,"database"],Hn=e=>["/backup",e,"commandline"],Ln=e=>["/backup",e,"log"],kn=e=>["/backup",e],Gn=e=>["/backup",e,"delete-versions"],bn=e=>["/backup",e,"broken-files"];function Bn(e,t){e&1&&nC(0,11,1);}function vn(e,t){e&1&&nC(0,11,2);}function Jn(e,t){if(e&1&&nC(0,11,3),e&2){let n=iC(2);jg(n.timeType()),rC(0);}}function Xn(e,t){if(e&1){let n=vT();Qi(0,"button",70),Vg("click",function(){let c=kd(n).$implicit,C=iC(3);return Od(C.sortByColumn.set(c.value))}),nC(1,15),$l();}if(e&2){let n=t.$implicit,_=iC(3);Yg("active",_.orderBy()===n.value),CE(),jg(n.label),rC(1);}}function wn(e,t){if(e&1&&(Qi(0,"sh-menu",67)(1,"button",68),Lg(2,14),vg(3,"strong")(4,"sh-icon"),Fg(),$l(),ql(5,69),dT(6,Xn,2,3,"button",71,lT),Gl(),$l()),e&2){let n=iC(2);CE(4),jg(n.orderBy()),rC(2),CE(2),fT(n.sortOrderOptions());}}function zn(e,t){if(e&1){let n=vT();Qi(0,"div",63)(1,"sh-button-group",64),cm("valueChange",function(c){kd(n);let C=iC();return UC(C.viewMode,c)||(C.viewMode=c),Od(c)}),Qi(2,"button",65),Lg(3,9),vg(4,"sh-icon"),Fg(),$l(),Qi(5,"button",66),Lg(6,10),vg(7,"sh-icon"),Fg(),$l()(),Qi(8,"sh-menu",67)(9,"button",68),Lg(10,11),Qi(11,"strong"),aT(12,Bn,1,0)(13,vn,1,0)(14,Jn,1,1),$l(),vg(15,"sh-icon"),Fg(),$l(),ql(16,69),Qi(17,"button",70),Vg("click",function(){kd(n);let c=iC();return Od(c.setTimeType("relative"))}),nC(18,12),$l(),Qi(19,"button",70),Vg("click",function(){kd(n);let c=iC();return Od(c.setTimeType("actual"))}),nC(20,13),$l(),Gl(),$l(),aT(21,wn,8,1,"sh-menu",67),$l();}if(e&2){let n=iC();CE(),am("value",n.viewMode),CE(11),cT(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),CE(9),cT(n.viewMode()==="list"?21:-1);}}function Vn(e,t){e&1&&(Qi(0,"sh-chip",78),Lg(1,19),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function Un(e,t){if(e&1){let n=vT();Qi(0,"div",76)(1,"div",59)(2,"h3"),jC(3),aT(4,Vn,3,1,"sh-chip",78),Qi(5,"sh-chip"),vg(6,"img",79),jC(7),$l()()(),Qi(8,"div",80)(9,"sh-chip",81),nC(10,16),$l()(),Qi(11,"div",63)(12,"button",82),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC(4);return Od(C.startBackup(c.Backup.ID))}),Lg(13,17),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",83),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC(4);return Od(C.openInConsole(c))}),Lg(16,18),vg(17,"sh-icon"),Fg(),$l()(),vg(18,"app-backup-progress",84),$l();}if(e&2){let n=iC().$implicit,_=iC(4);CE(3),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?4:-1),CE(2),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(5),Yg("loading",_.startingBackup()===n.Backup.ID),CE(6),yg("backupId",n.Backup.ID);}}function Kn(e,t){e&1&&(Qi(0,"sh-chip",78),Lg(1,21),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function jn(e,t){if(e&1&&(Qi(0,"sh-chip"),vg(1,"img",79),jC(2),$l()),e&2){let n=t.$implicit,_=iC(7);CE(),yg("src",_.getBackendIcon(n.TargetUrl),Qp),CE(),Ql(" ",_.getBackendType(n.TargetUrl)," ");}}function Wn(e,t){if(e&1&&dT(0,jn,3,2,"sh-chip",null,lT),e&2){let n=iC(2).$implicit;fT(n.Backup.AdditionalTargetURLs);}}function qn(e,t){if(e&1&&(Qi(0,"p")(1,"span"),nC(2,26),$l(),jC(3),ob(4,"relativeTime"),$l()),e&2){iC();let n=qC(5),_=iC(6);CE(3),Ql(" ",ab(4,1,n,_.timeType()==="actual")," ");}}function Qn(e,t){if(e&1&&(jC(0),ob(1,"durationFormat")),e&2){let n=iC(3).$implicit,_=iC(4);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupDuration,_.timeType()==="actual")," ");}}function Yn(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Zn(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC(3).$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.SourceFilesSize)," ");}}function et(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function nt(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC(3).$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.TargetFilesSize)," ");}}function tt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function it(e,t){if(e&1&&(Qi(0,"p")(1,"span"),nC(2,22),$l(),jC(3),ob(4,"relativeTime"),$l(),um(5),aT(6,qn,5,4,"p"),Qi(7,"p")(8,"span"),nC(9,23),$l(),aT(10,Qn,2,4)(11,Yn,2,0,"ng-container"),$l(),Qi(12,"p")(13,"span"),nC(14,24),$l(),aT(15,Zn,2,3)(16,et,2,0,"ng-container"),$l(),Qi(17,"p")(18,"span"),nC(19,25),$l(),aT(20,nt,2,3)(21,tt,2,0,"ng-container"),$l()),e&2){let n=iC(2).$implicit,_=iC(4);CE(3),Ql(" ",ab(4,5,n.Backup.Metadata?.LastBackupFinished,_.timeType()==="actual")," "),CE(2);let c=WC(_.scheduledTimes()[n.Backup.ID??""]);CE(),cT(c?6:-1),CE(4),cT(n.Backup.Metadata?.LastBackupDuration?10:11),CE(5),cT(n.Backup.Metadata?.SourceFilesSize?15:16),CE(5),cT(n.Backup.Metadata?.TargetFilesSize?20:21);}}function ot(e,t){if(e&1&&vg(0,"app-backup-progress",84),e&2){let n=iC(2).$implicit;yg("backupId",n.Backup.ID);}}function _t(e,t){e&1&&(Qi(0,"sh-chip",81),nC(1,27),$l());}function at(e,t){e&1&&Dg(0);}function lt(e,t){if(e&1&&(Qi(0,"div",77)(1,"div",59)(2,"h3"),jC(3),aT(4,Kn,3,1,"sh-chip",78),Qi(5,"sh-chip"),vg(6,"img",79),jC(7),$l(),aT(8,Wn,2,0),$l(),aT(9,it,22,9)(10,ot,1,1,"app-backup-progress",84),$l(),Qi(11,"div",80)(12,"sh-chip",85),nC(13,20),$l(),aT(14,_t,2,0,"sh-chip",81),$l(),Qi(15,"div",63),ag(16,at,1,0,"ng-container",86),$l()()),e&2){let n=iC().$implicit,_=iC(4),c=pC(33);CE(3),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?4:-1),CE(2),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(),cT(n.Backup.AdditionalTargetURLs?.length?8:-1),CE(),cT(_.runningBackupId()!==n.Backup.ID?9:10);let C=_.getBackupVersionCount(n);CE(4),jg(C)(C),rC(13),CE(),cT(n.Backup.ExternalID?14:-1),CE(2),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,Pn,n));}}function rt(e,t){if(e&1&&aT(0,Un,19,7,"div",76)(1,lt,17,13,"div",77),e&2){let n=t.$implicit;cT(n.Backup.ExternalID?0:1);}}function ct(e,t){if(e&1&&dT(0,rt,2,1,null,null,lT),e&2){let n=iC(3);fT(n.backups());}}function st(e,t){e&1&&(Qi(0,"div",75),Lg(1,28),Qi(2,"button",87),vg(3,"sh-icon"),$l(),Fg(),$l()),e&2&&(CE(2),yg("routerLink",KC(1,$n)));}function ut(e,t){if(e&1&&(Qi(0,"div",74),aT(1,ct,2,0)(2,st,4,2,"div",75),$l()),e&2){let n=iC(2);Yg("fallback",n.backups().length===0),CE(),cT(n.backups().length?1:2);}}function Ft(e,t){e&1&&(Lg(0,29,1),Dg(1),Fg());}function Ct(e,t){e&1&&(Lg(0,30,1),Dg(1),Fg());}function Tt(e,t){e&1&&(Lg(0,31,1),Dg(1),Fg());}function dt(e,t){e&1&&(Lg(0,32,1),Dg(1),Fg());}function Et(e,t){e&1&&(Lg(0,33,1),Dg(1),Fg());}function pt(e,t){e&1&&(Lg(0,34,1),Dg(1),Fg());}function gt(e,t){e&1&&(Lg(0,35,1),Dg(1),Fg());}function St(e,t){e&1&&(Qi(0,"sh-chip",98),Lg(1,39),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function mt(e,t){if(e&1&&(Qi(0,"sh-chip"),vg(1,"img",79),jC(2),$l()),e&2){let n=t.$implicit,_=iC(5);CE(),yg("src",_.getBackendIcon(n.TargetUrl),Qp),CE(),Ql(" ",_.getBackendType(n.TargetUrl)," ");}}function Ot(e,t){if(e&1&&dT(0,mt,3,2,"sh-chip",null,lT),e&2){let n=iC().$implicit;fT(n.Backup.AdditionalTargetURLs);}}function Nt(e,t){if(e&1&&(jC(0),ob(1,"relativeTime")),e&2){let n=iC().$implicit,_=iC(3);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupFinished,_.timeType()==="actual")," ");}}function Mt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function It(e,t){if(e&1&&(jC(0),ob(1,"relativeTime")),e&2){iC();let n=qC(13),_=iC(3);Ql(" ",ab(1,1,n,_.timeType()==="actual")," ");}}function Pt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Dt(e,t){if(e&1&&(jC(0),ob(1,"durationFormat")),e&2){let n=iC().$implicit,_=iC(3);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupDuration,_.timeType()==="actual")," ");}}function ft(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function ht(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC().$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.SourceFilesSize)," ");}}function $t(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Rt(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC().$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.TargetFilesSize)," ");}}function yt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function At(e,t){e&1&&Dg(0);}function xt(e,t){if(e&1&&(Qi(0,"tr")(1,"td"),jC(2),aT(3,St,3,1,"sh-chip",98),$l(),Qi(4,"td")(5,"sh-chip",99),vg(6,"img",79),jC(7),$l(),aT(8,Ot,2,0),$l(),Qi(9,"td"),aT(10,Nt,2,4)(11,Mt,2,0,"ng-container"),$l(),Qi(12,"td"),um(13),aT(14,It,2,4)(15,Pt,2,0,"ng-container"),$l(),Qi(16,"td"),aT(17,Dt,2,4)(18,ft,2,0,"ng-container"),$l(),Qi(19,"td"),aT(20,ht,2,3)(21,$t,2,0,"ng-container"),$l(),Qi(22,"td"),aT(23,Rt,2,3)(24,yt,2,0,"ng-container"),$l(),Qi(25,"td")(26,"span"),nC(27,38),$l()(),Qi(28,"td"),ag(29,At,1,0,"ng-container",86),$l()()),e&2){let n=t.$implicit,_=iC(3),c=pC(33);CE(2),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?3:-1),CE(3),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(),cT(n.Backup.AdditionalTargetURLs?.length?8:-1),CE(2),cT(n.Backup.Metadata?.LastBackupFinished?10:11),CE(3);let C=WC(_.scheduledTimes()[n.Backup.ID??""]);CE(),cT(C?14:15),CE(3),cT(n.Backup.Metadata?.LastBackupDuration?17:18),CE(3),cT(n.Backup.Metadata?.SourceFilesSize?20:21),CE(3),cT(n.Backup.Metadata?.TargetFilesSize?23:24);let y=_.getBackupVersionCount(n);CE(4),jg(y)(y),rC(27),CE(2),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(15,Pn,n));}}function Ht(e,t){if(e&1){let n=vT();Qi(0,"sh-table",88),cm("sortByColumnChange",function(c){kd(n);let C=iC(2);return UC(C.sortByColumn,c)||(C.sortByColumn=c),Od(c)}),Qi(1,"tr",89)(2,"th",90),Lg(3,29),ag(4,Ft,2,0,"ng-container",91),Fg(),$l(),Qi(5,"th",92),Lg(6,30),ag(7,Ct,2,0,"ng-container",91),Fg(),$l(),Qi(8,"th",93),Lg(9,31),ag(10,Tt,2,0,"ng-container",91),Fg(),$l(),Qi(11,"th",94),Lg(12,32),ag(13,dt,2,0,"ng-container",91),Fg(),$l(),Qi(14,"th",95),Lg(15,33),ag(16,Et,2,0,"ng-container",91),Fg(),$l(),Qi(17,"th",96),Lg(18,34),ag(19,pt,2,0,"ng-container",91),Fg(),$l(),Qi(20,"th",97),Lg(21,35),ag(22,gt,2,0,"ng-container",91),Fg(),$l(),Qi(23,"th"),nC(24,36),$l(),Qi(25,"th"),nC(26,37),$l()(),dT(27,xt,30,17,"tr",null,lT),$l();}if(e&2){let n=iC(2),_=pC(35);yg("data",n.backups())("loading",n.backupsLoading()),am("sortByColumn",n.sortByColumn),CE(4),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(5),fT(n.backups());}}function Lt(e,t){if(e&1&&aT(0,ut,3,3,"div",72)(1,Ht,29,10,"sh-table",73),e&2){let n=iC();cT(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1);}}function kt(e,t){e&1&&(Qi(0,"div",100),vg(1,"sh-progress-bar",101),Qi(2,"div",59)(3,"h3"),nC(4,40),$l()()());}function Gt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC(3);return Od(c.abort())}),Lg(1,42),vg(2,"sh-icon"),Fg(),$l();}if(e&2){let n=iC(3);Yg("small",n.viewMode()==="details");}}function bt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC(3);return Od(c.stop())}),Lg(1,43),vg(2,"sh-icon"),Fg(),$l();}if(e&2){let n=iC(3);Yg("small",n.viewMode()==="details");}}function Bt(e,t){e&1&&(Lg(0,41,1),vg(1,"sh-icon"),Fg());}function vt(e,t){e&1&&(Lg(0,41,2),vg(1,"sh-icon"),Fg());}function Jt(e,t){if(e&1){let n=vT();aT(0,Gt,3,2,"button",102)(1,bt,3,2,"button",102),Qi(2,"button",82),Vg("click",function(){kd(n);let c=iC(2);return Od(c.pauseResume())}),Lg(3,41),aT(4,Bt,2,0)(5,vt,2,0),Fg(),$l();}if(e&2){let n=iC(2);cT(n.isStopping()?0:1),CE(2),Yg("small",n.viewMode()==="details")("loading",n.isResuming()),CE(2),cT(n.clientIsRunning()?4:5);}}function Xt(e,t){e&1&&nC(0,44,1);}function wt(e,t){e&1&&(Qi(0,"button",103)(1,"sh-icon"),jC(2,"pencil-simple"),$l()()),e&2&&yg("shTooltip","Externally managed")("disabled",true);}function zt(e,t){if(e&1&&(Qi(0,"button",104)(1,"sh-icon"),jC(2,"pencil-simple"),$l()()),e&2){let n=iC(2).$implicit;yg("routerLink",JC(1,kn,n.Backup.ID));}}function Vt(e,t){e&1&&(Qi(0,"button",103)(1,"sh-icon"),jC(2,"dots-three-vertical"),$l()()),e&2&&yg("shTooltip","Externally managed")("disabled",true);}function Ut(e,t){e&1&&(Qi(0,"sh-icon"),jC(1,"check"),$l());}function Kt(e,t){e&1&&(Qi(0,"sh-icon"),jC(1,"dots-three-vertical"),$l());}function jt(e,t){if(e&1&&(Qi(0,"button",108),aT(1,Ut,2,0,"sh-icon")(2,Kt,2,0,"sh-icon"),$l()),e&2){let n=iC(2).$implicit,_=iC();Yg("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),CE(),cT(_.successId()===n.Backup.ID?1:2);}}function Wt(e,t){if(e&1&&(Qi(0,"button",107),Lg(1,55),vg(2,"sh-icon"),Fg(),$l()),e&2){let n=iC(3).$implicit;yg("routerLink",JC(1,Gn,n.Backup.ID));}}function qt(e,t){if(e&1&&(Qi(0,"button",107),Lg(1,56),vg(2,"sh-icon"),Fg(),$l()),e&2){let n=iC(3).$implicit;yg("routerLink",JC(1,bn,n.Backup.ID));}}function Qt(e,t){if(e&1&&(vg(0,"sh-divider"),Qi(1,"h3",106),nC(2,54),$l(),aT(3,Wt,3,3,"button",107),aT(4,qt,3,3,"button",107)),e&2){let n=iC(3);CE(3),cT(n.hasDeleteVersions()?3:-1),CE(),cT(n.hasBrokenFiles()?4:-1);}}function Yt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC();return Od(C.startBackup(c.Backup.ID))}),Lg(1,44),vg(2,"sh-icon"),aT(3,Xt,1,0),Fg(),$l(),aT(4,wt,3,2,"button",103)(5,zt,3,3,"button",104),Qi(6,"sh-menu"),aT(7,Vt,3,2,"button",103)(8,jt,3,5,"button",105),ql(9,69),Qi(10,"h3",106),jC(11,"Operations"),$l(),Qi(12,"button",107),Lg(13,45),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",107),Lg(16,46),vg(17,"sh-icon"),Fg(),$l(),Qi(18,"button",107),Lg(19,47),vg(20,"sh-icon"),Fg(),$l(),vg(21,"sh-divider"),Qi(22,"h3",106),nC(23,48),$l(),Qi(24,"button",107),Lg(25,49),vg(26,"sh-icon"),Fg(),$l(),Qi(27,"button",70),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC();return Od(C.verifyFiles(c.Backup.ID))}),Lg(28,50),vg(29,"sh-icon"),Fg(),$l(),Qi(30,"button",107),Lg(31,51),vg(32,"sh-icon"),Fg(),$l(),aT(33,Qt,5,2),vg(34,"sh-divider"),Qi(35,"h3",106),nC(36,52),$l(),Qi(37,"button",107),Lg(38,53),vg(39,"sh-icon"),Fg(),$l(),Gl(),$l();}if(e&2){let n=iC().$implicit,_=iC();Yg("loading",_.startingBackup()===n.Backup.ID),CE(3),cT(_.viewMode()==="list"?3:-1),CE(),cT(n.Backup.ExternalID?4:5),CE(3),cT(n.Backup.ExternalID?7:8),CE(5),yg("routerLink",JC(12,Rn,n.Backup.ID)),CE(3),yg("routerLink",JC(14,yn,n.Backup.ID)),CE(3),yg("routerLink",JC(16,An,n.Backup.ID)),CE(6),yg("routerLink",JC(18,xn,n.Backup.ID)),CE(6),yg("routerLink",JC(20,Hn,n.Backup.ID)),CE(3),cT(_.hasDeleteVersions()||_.hasBrokenFiles()?33:-1),CE(4),yg("routerLink",JC(22,Ln,n.Backup.ID));}}function Zt(e,t){if(e&1&&aT(0,Jt,6,6)(1,Yt,40,24),e&2){let n=t.$implicit,_=iC();cT(_.runningBackupId()===n.Backup.ID?0:1);}}function ei(e,t){e&1&&(Qi(0,"sh-icon",109),jC(1,"funnel-simple"),$l(),Qi(2,"sh-icon",110),jC(3,"sort-ascending"),$l(),Qi(4,"sh-icon",111),jC(5,"sort-descending"),$l());}var le=class e{#t=T(C);#n=T(y);#e=T(g);#_=T(C$1);#a=T(Q);#l=T(be);#i=T(m);hasDeleteVersions=this.#i.hasV2DeleteVersions;hasBrokenFiles=this.#i.hasV2BrokenFiles;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;runningBackupId=this.#n.runningBackupId;getBackendType=Ne;getBackendIcon=Ee;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=Nt$1(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=Nt$1(()=>this.runningTask()==this.#o());scheduledTimes=Nt$1(()=>{let t=this.#a.serverState()?.ProposedSchedule??[],n=this.#e.backups(),_={};return n.forEach(c=>{let C=c.Backup?.ID;if(C){var y=t.find(X=>X.Item1==C);y?.Item2?_[C]=y.Item2:c.Schedule?.Time&&(_[C]=c.Schedule.Time);}}),_});#o=Ge(-1);viewMode=A("viewMode","list");sortByColumn=Ge(this.#e.orderBy());loadingId=Ge(null);successId=Ge(null);sortEffect=za(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(true);}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#_.openConsole("/app/machines/configurations/"+n);}setOrderBy(t){this.#e.setOrderBy(t);}setTimeType(t){this.#e.setTimeType(t);}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t));}openPauseDialog(){this.#l.open(k,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe());}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe();}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(qu(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3);}});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=hw({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$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 c;c=$localize`Restores`;let C;C=$localize`Recover your files from any backup set.`;let y;y=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let X;X=$localize`My backups`;let re;re=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let ce;ce=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let se;se=$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 ue;ue=$localize`Relative time`;let Fe;Fe=$localize`Actual time`;let Ce;Ce=$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 Te;Te=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let de;de=$localize`Externally managed`;let Ee;Ee=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Start `;let pe;pe=$localize` Edit in console ${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ge;ge=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let w;w=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,w=oC(w,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Se;Se=$localize` ${w}:ICU@@6502601490918455200: `;let me;me=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Oe;Oe=$localize`Last successful backup:`;let Ne;Ne=$localize`Duration:`;let Me;Me=$localize`Source:`;let Ie;Ie=$localize`Destination:`;let Pe;Pe=$localize`Next scheduled run:`;let De;De=$localize`Externally managed`;let fe;fe=$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 he;he=$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 $e;$e=$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 Re;Re=$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 ye;ye=$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 Ae;Ae=$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 xe;xe=$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 He;He=$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 Le;Le=$localize`Version`;let ke;ke=$localize`Actions`;let z;z=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,z=oC(z,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ge;Ge=$localize` ${z}:ICU@@3521773141017690117: `;let be;be=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Be;Be=$localize`Loading backups...`;let V;V=$localize`${"\uFFFD*4: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/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5: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/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,V=oC(V);let ve;ve=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let Je;Je=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Xe;Xe=$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 we;we=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let ze;ze=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ve;Ve=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Ue;Ue=$localize`Advanced`;let Ke;Ke=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let je;je=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let We;We=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let qe;qe=$localize`Reporting`;let Qe;Qe=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON: Log `;let Ye;Ye=$localize`Cleanup`;let Ze;Ze=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Delete versions `;let en;return en=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:file-x${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Purge broken files `,[["actions",""],["sortIcons",""],t,n,_,c,C,y,X,re,ce,se,ue,Fe,Ce,Te,de,Ee,pe,ge,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,he,$e,Re,ye,Ae,xe,He,Le,ke,Ge,be,Be,V,ve,Je,Xe,we,ze,Ve,Ue,Ke,je,We,qe,Qe,Ye,Ze,en,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],[1,"simple","accent",3,"shTooltip"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[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","accent",3,"shTooltip"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["type","button","shButton","",3,"shTooltip","disabled"],["type","button","shButton","",3,"routerLink"],["type","button","shButton","",3,"loading","success"],["title",""],["type","button",3,"routerLink"],["type","button","shButton",""],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"header")(3,"sh-card",57),Vg("keydown.enter",function(C){return C.target.click()})("keydown.space",function(C){return C.target.click()}),vg(4,"img",58),Qi(5,"div",59)(6,"h3"),nC(7,2),$l(),Qi(8,"p"),nC(9,3),$l()(),Qi(10,"button",60),Lg(11,4),vg(12,"sh-icon"),Fg(),$l()(),Qi(13,"sh-card",57),Vg("keydown.enter",function(C){return C.target.click()})("keydown.space",function(C){return C.target.click()}),vg(14,"img",61),Qi(15,"div",59)(16,"h3"),nC(17,5),$l(),Qi(18,"p"),nC(19,6),$l()(),Qi(20,"button",60),Lg(21,7),vg(22,"sh-icon"),Fg(),$l()()(),Qi(23,"div",62)(24,"h2"),ql(25),nC(26,8),Gl(),aT(27,zn,22,3,"div",63),$l(),cg(28,Lt,2,1)(29,kt,5,0),oT(30,28,Dn,null,29),$l()(),ag(32,Zt,2,1,"ng-template",null,0,lb)(34,ei,6,0,"ng-template",null,1,lb)),n&2&&(CE(3),yg("routerLink",KC(4,fn)),CE(10),yg("routerLink",KC(5,hn)),CE(14),cT(_.backups().length>0?27:-1),CE(3),iT(!_.backupsLoading()));},dependencies:[_t$1,ee,f,v,N,c,ve,d,x,at$1],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}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}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}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}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)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.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}"]})};var chunkXA5RWQQ5=/*#__PURE__*/Object.freeze({__proto__:null,APP_BASE_HREF:ce,BrowserPlatformLocation:y$1,CommonModule:Fi,DATE_PIPE_DEFAULT_OPTIONS:tn,DATE_PIPE_DEFAULT_TIMEZONE:en,DOCUMENT:Mr,DatePipe:ci,DecimalPipe:pi,FormStyle:A$1,FormatWidth:I,IMAGE_CONFIG:fv,IMAGE_LOADER:Je,JsonPipe:hi,Location:Ne$1,LocationStrategy:U,NgFor:Jt$1,NgForOf:Jt$1,NgForOfContext:Ce,NgIf:Kn$1,NgIfContext:ye,NgLocaleLocalization:qt$1,NgLocalization:Ee$1,NgPlural:Qt$1,NgSwitch:Ze,NgTemplateOutlet:ei$1,NumberFormatStyle:ne,NumberSymbol:m$1,PathLocationStrategy:de,PlatformLocation:g$1,PlatformNavigation:nn,Plural:j,TranslationWidth:d$1,WeekDay:Rt$1,formatCurrency:Zt$1,formatDate:Gt$1,formatNumber:Kt$1,formatPercent:Yt$1,getCurrencySymbol:zt$1,getLocaleDateFormat:q,getLocaleDateTimeFormat:Q$1,getLocaleDayNames:Bt$1,getLocaleDayPeriods:Pt$1,getLocaleEraNames:kt$1,getLocaleExtraDayPeriodRules:Ut$1,getLocaleExtraDayPeriods:jt$1,getLocaleId:Ot$1,getLocaleMonthNames:Nt$2,getLocaleNumberFormat:Fe,getLocaleNumberSymbol:M,getLocalePluralCase:xt$1,getLocaleTimeFormat:J,getNumberOfCurrencyDigits:Vt$1,isPlatformBrowser:Rr,isPlatformServer:Or,registerLocaleData:Tr,ɵDomAdapter:f$1,ɵPLATFORM_BROWSER_ID:wi,ɵPLATFORM_SERVER_ID:Ai,ɵgetDOM:s,ɵnormalizeQueryParams:L,ɵparseCookieValue:k$1,ɵsetRootDomAdapter:_});var chunkBEVA4HT2=/*#__PURE__*/Object.freeze({__proto__:null,ShipChip:D});var chunkQICO34G3=/*#__PURE__*/Object.freeze({__proto__:null,BackupProgressComponent:W});var chunkCORTKH64=/*#__PURE__*/Object.freeze({__proto__:null,DurationFormatPipe:c$1});var chunkCHQM3PCJ=/*#__PURE__*/Object.freeze({__proto__:null,BytesPipe:m$2});var chunkKDVMMWQR=/*#__PURE__*/Object.freeze({__proto__:null,RelativeTimePipe:m$3});export{le as default};
|
|
1
|
+
import {e as ee,W}from'./chunk-C4GeR7BF.js';import {k}from'./chunk-CUaRQ2FJ.js';import'./chunk-aOMoAKYY.js';import'./chunk-BEhUV7oX.js';import {N as Ne,E as Ee}from'./chunk-ihUnHtR7.js';import'./chunk-Bb6BmVO4.js';import {v as ve}from'./chunk-DmDqcC4A.js';import {x}from'./chunk-CAwTsBqQ.js';import {c}from'./chunk-B53Wj4F9.js';import {D}from'./chunk-BTgf5lfZ.js';import {T,ab as C,aX as y,a5 as g,bh as Q,a6 as be,m,N as Nt$1,G as Ge,D as A,z as za,H as qu,h as hw,_ as _t$1,v,d as N,j as vg,Q as Qi,V as Vg,n as nC,$ as $l,L as Lg,F as Fg,aP as ql,aQ as Gl,f as aT,b3 as cg,b4 as oT,bg as ag,c6 as lb,C as CE,A as yg,a3 as KC,i as cT,b5 as iT,o as oC,l as vT,p as cm,r as kd,k as iC,U as UC,O as Od,x as am,w as jC,au as jg,av as rC,a1 as dT,ap as lT,a2 as fT,Y as Yg,c4 as pC,a$ as JC,b$ as Dg,ak as um,aa as Ql,ar as Qp,al as WC,aM as ob,aN as ab,ao as qC,aR as sb,b_ as ei$1,co as ce,cp as y$1,bc as Fi,cq as tn,cr as en,ad as Mr,aJ as ci,bf as pi,cs as A$1,ct as I,cu as fv,cv as Je,aL as hi,cw as Ne$1,cx as U,bd as Jt$1,cy as Ce,be as Kn$1,cz as ye,cA as qt$1,cB as Ee$1,cC as Qt$1,cD as Ze,cE as ne,cF as m$1,cG as de,cH as g$1,cI as nn,cJ as j,cK as d$1,cL as Rt$1,cM as Zt$1,cN as Gt$1,cO as Kt$1,cP as Yt$1,cQ as zt$1,cR as q,cS as Q$1,cT as Bt$1,cU as Pt$1,cV as kt$1,cW as Ut$1,cX as jt$1,cY as Ot$1,cZ as Nt$2,c_ as Fe,c$ as M,d0 as xt$1,d1 as J,d2 as Vt$1,bq as Rr,d3 as Or,d4 as Tr,d5 as f$1,d6 as wi,d7 as Ai,bL as s,d8 as L,d9 as k$1,da as _,aI as c$1,aH as m$2,b2 as m$3}from'./main-VVQP2YE7.js';import {f}from'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import'./chunk-B9maI7Xa.js';import'./chunk-BO2GlieG.js';import {a as at$1}from'./chunk-CKnRcyHZ.js';import {C as C$1}from'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';var Dn=()=>[_t$1,Promise.resolve().then(function(){return chunkXA5RWQQ5}).then(e=>e.NgTemplateOutlet),v,N,Promise.resolve().then(function(){return chunkBEVA4HT2}).then(e=>e.ShipChip),import('./chunk-B52v_pjw.js').then(e=>e.ShipTable),import('./chunk-B52v_pjw.js').then(e=>e.ShipSort),at$1,Promise.resolve().then(function(){return chunkQICO34G3}).then(e=>e.BackupProgressComponent),Promise.resolve().then(function(){return chunkCORTKH64}).then(e=>e.DurationFormatPipe),Promise.resolve().then(function(){return chunkCHQM3PCJ}).then(e=>e.BytesPipe),Promise.resolve().then(function(){return chunkKDVMMWQR}).then(e=>e.RelativeTimePipe)],fn=()=>["/add-backup"],hn=()=>["/restore"],Pn=e=>({$implicit:e}),$n=()=>["/backup/new"],Rn=e=>["/restore",e],yn=e=>["/backup",e,"export"],An=e=>["/backup",e,"delete"],xn=e=>["/backup",e,"database"],Hn=e=>["/backup",e,"commandline"],Ln=e=>["/backup",e,"log"],kn=e=>["/backup",e],Gn=e=>["/backup",e,"delete-versions"],bn=e=>["/backup",e,"broken-files"];function Bn(e,t){e&1&&nC(0,11,1);}function vn(e,t){e&1&&nC(0,11,2);}function Jn(e,t){if(e&1&&nC(0,11,3),e&2){let n=iC(2);jg(n.timeType()),rC(0);}}function Xn(e,t){if(e&1){let n=vT();Qi(0,"button",70),Vg("click",function(){let c=kd(n).$implicit,C=iC(3);return Od(C.sortByColumn.set(c.value))}),nC(1,15),$l();}if(e&2){let n=t.$implicit,_=iC(3);Yg("active",_.orderBy()===n.value),CE(),jg(n.label),rC(1);}}function wn(e,t){if(e&1&&(Qi(0,"sh-menu",67)(1,"button",68),Lg(2,14),vg(3,"strong")(4,"sh-icon"),Fg(),$l(),ql(5,69),dT(6,Xn,2,3,"button",71,lT),Gl(),$l()),e&2){let n=iC(2);CE(4),jg(n.orderBy()),rC(2),CE(2),fT(n.sortOrderOptions());}}function zn(e,t){if(e&1){let n=vT();Qi(0,"div",63)(1,"sh-button-group",64),cm("valueChange",function(c){kd(n);let C=iC();return UC(C.viewMode,c)||(C.viewMode=c),Od(c)}),Qi(2,"button",65),Lg(3,9),vg(4,"sh-icon"),Fg(),$l(),Qi(5,"button",66),Lg(6,10),vg(7,"sh-icon"),Fg(),$l()(),Qi(8,"sh-menu",67)(9,"button",68),Lg(10,11),Qi(11,"strong"),aT(12,Bn,1,0)(13,vn,1,0)(14,Jn,1,1),$l(),vg(15,"sh-icon"),Fg(),$l(),ql(16,69),Qi(17,"button",70),Vg("click",function(){kd(n);let c=iC();return Od(c.setTimeType("relative"))}),nC(18,12),$l(),Qi(19,"button",70),Vg("click",function(){kd(n);let c=iC();return Od(c.setTimeType("actual"))}),nC(20,13),$l(),Gl(),$l(),aT(21,wn,8,1,"sh-menu",67),$l();}if(e&2){let n=iC();CE(),am("value",n.viewMode),CE(11),cT(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),CE(9),cT(n.viewMode()==="list"?21:-1);}}function Vn(e,t){e&1&&(Qi(0,"sh-chip",78),Lg(1,19),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function Un(e,t){if(e&1){let n=vT();Qi(0,"div",76)(1,"div",59)(2,"h3"),jC(3),aT(4,Vn,3,1,"sh-chip",78),Qi(5,"sh-chip"),vg(6,"img",79),jC(7),$l()()(),Qi(8,"div",80)(9,"sh-chip",81),nC(10,16),$l()(),Qi(11,"div",63)(12,"button",82),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC(4);return Od(C.startBackup(c.Backup.ID))}),Lg(13,17),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",83),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC(4);return Od(C.openInConsole(c))}),Lg(16,18),vg(17,"sh-icon"),Fg(),$l()(),vg(18,"app-backup-progress",84),$l();}if(e&2){let n=iC().$implicit,_=iC(4);CE(3),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?4:-1),CE(2),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(5),Yg("loading",_.startingBackup()===n.Backup.ID),CE(6),yg("backupId",n.Backup.ID);}}function Kn(e,t){e&1&&(Qi(0,"sh-chip",78),Lg(1,21),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function jn(e,t){if(e&1&&(Qi(0,"sh-chip"),vg(1,"img",79),jC(2),$l()),e&2){let n=t.$implicit,_=iC(7);CE(),yg("src",_.getBackendIcon(n.TargetUrl),Qp),CE(),Ql(" ",_.getBackendType(n.TargetUrl)," ");}}function Wn(e,t){if(e&1&&dT(0,jn,3,2,"sh-chip",null,lT),e&2){let n=iC(2).$implicit;fT(n.Backup.AdditionalTargetURLs);}}function qn(e,t){if(e&1&&(Qi(0,"p")(1,"span"),nC(2,26),$l(),jC(3),ob(4,"relativeTime"),$l()),e&2){iC();let n=qC(5),_=iC(6);CE(3),Ql(" ",ab(4,1,n,_.timeType()==="actual")," ");}}function Qn(e,t){if(e&1&&(jC(0),ob(1,"durationFormat")),e&2){let n=iC(3).$implicit,_=iC(4);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupDuration,_.timeType()==="actual")," ");}}function Yn(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Zn(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC(3).$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.SourceFilesSize)," ");}}function et(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function nt(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC(3).$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.TargetFilesSize)," ");}}function tt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function it(e,t){if(e&1&&(Qi(0,"p")(1,"span"),nC(2,22),$l(),jC(3),ob(4,"relativeTime"),$l(),um(5),aT(6,qn,5,4,"p"),Qi(7,"p")(8,"span"),nC(9,23),$l(),aT(10,Qn,2,4)(11,Yn,2,0,"ng-container"),$l(),Qi(12,"p")(13,"span"),nC(14,24),$l(),aT(15,Zn,2,3)(16,et,2,0,"ng-container"),$l(),Qi(17,"p")(18,"span"),nC(19,25),$l(),aT(20,nt,2,3)(21,tt,2,0,"ng-container"),$l()),e&2){let n=iC(2).$implicit,_=iC(4);CE(3),Ql(" ",ab(4,5,n.Backup.Metadata?.LastBackupFinished,_.timeType()==="actual")," "),CE(2);let c=WC(_.scheduledTimes()[n.Backup.ID??""]);CE(),cT(c?6:-1),CE(4),cT(n.Backup.Metadata?.LastBackupDuration?10:11),CE(5),cT(n.Backup.Metadata?.SourceFilesSize?15:16),CE(5),cT(n.Backup.Metadata?.TargetFilesSize?20:21);}}function ot(e,t){if(e&1&&vg(0,"app-backup-progress",84),e&2){let n=iC(2).$implicit;yg("backupId",n.Backup.ID);}}function _t(e,t){e&1&&(Qi(0,"sh-chip",81),nC(1,27),$l());}function at(e,t){e&1&&Dg(0);}function lt(e,t){if(e&1&&(Qi(0,"div",77)(1,"div",59)(2,"h3"),jC(3),aT(4,Kn,3,1,"sh-chip",78),Qi(5,"sh-chip"),vg(6,"img",79),jC(7),$l(),aT(8,Wn,2,0),$l(),aT(9,it,22,9)(10,ot,1,1,"app-backup-progress",84),$l(),Qi(11,"div",80)(12,"sh-chip",85),nC(13,20),$l(),aT(14,_t,2,0,"sh-chip",81),$l(),Qi(15,"div",63),ag(16,at,1,0,"ng-container",86),$l()()),e&2){let n=iC().$implicit,_=iC(4),c=pC(33);CE(3),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?4:-1),CE(2),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(),cT(n.Backup.AdditionalTargetURLs?.length?8:-1),CE(),cT(_.runningBackupId()!==n.Backup.ID?9:10);let C=_.getBackupVersionCount(n);CE(4),jg(C)(C),rC(13),CE(),cT(n.Backup.ExternalID?14:-1),CE(2),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,Pn,n));}}function rt(e,t){if(e&1&&aT(0,Un,19,7,"div",76)(1,lt,17,13,"div",77),e&2){let n=t.$implicit;cT(n.Backup.ExternalID?0:1);}}function ct(e,t){if(e&1&&dT(0,rt,2,1,null,null,lT),e&2){let n=iC(3);fT(n.backups());}}function st(e,t){e&1&&(Qi(0,"div",75),Lg(1,28),Qi(2,"button",87),vg(3,"sh-icon"),$l(),Fg(),$l()),e&2&&(CE(2),yg("routerLink",KC(1,$n)));}function ut(e,t){if(e&1&&(Qi(0,"div",74),aT(1,ct,2,0)(2,st,4,2,"div",75),$l()),e&2){let n=iC(2);Yg("fallback",n.backups().length===0),CE(),cT(n.backups().length?1:2);}}function Ft(e,t){e&1&&(Lg(0,29,1),Dg(1),Fg());}function Ct(e,t){e&1&&(Lg(0,30,1),Dg(1),Fg());}function Tt(e,t){e&1&&(Lg(0,31,1),Dg(1),Fg());}function dt(e,t){e&1&&(Lg(0,32,1),Dg(1),Fg());}function Et(e,t){e&1&&(Lg(0,33,1),Dg(1),Fg());}function pt(e,t){e&1&&(Lg(0,34,1),Dg(1),Fg());}function gt(e,t){e&1&&(Lg(0,35,1),Dg(1),Fg());}function St(e,t){e&1&&(Qi(0,"sh-chip",98),Lg(1,39),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function mt(e,t){if(e&1&&(Qi(0,"sh-chip"),vg(1,"img",79),jC(2),$l()),e&2){let n=t.$implicit,_=iC(5);CE(),yg("src",_.getBackendIcon(n.TargetUrl),Qp),CE(),Ql(" ",_.getBackendType(n.TargetUrl)," ");}}function Ot(e,t){if(e&1&&dT(0,mt,3,2,"sh-chip",null,lT),e&2){let n=iC().$implicit;fT(n.Backup.AdditionalTargetURLs);}}function Nt(e,t){if(e&1&&(jC(0),ob(1,"relativeTime")),e&2){let n=iC().$implicit,_=iC(3);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupFinished,_.timeType()==="actual")," ");}}function Mt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function It(e,t){if(e&1&&(jC(0),ob(1,"relativeTime")),e&2){iC();let n=qC(13),_=iC(3);Ql(" ",ab(1,1,n,_.timeType()==="actual")," ");}}function Pt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Dt(e,t){if(e&1&&(jC(0),ob(1,"durationFormat")),e&2){let n=iC().$implicit,_=iC(3);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupDuration,_.timeType()==="actual")," ");}}function ft(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function ht(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC().$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.SourceFilesSize)," ");}}function $t(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Rt(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC().$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.TargetFilesSize)," ");}}function yt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function At(e,t){e&1&&Dg(0);}function xt(e,t){if(e&1&&(Qi(0,"tr")(1,"td"),jC(2),aT(3,St,3,1,"sh-chip",98),$l(),Qi(4,"td")(5,"sh-chip",99),vg(6,"img",79),jC(7),$l(),aT(8,Ot,2,0),$l(),Qi(9,"td"),aT(10,Nt,2,4)(11,Mt,2,0,"ng-container"),$l(),Qi(12,"td"),um(13),aT(14,It,2,4)(15,Pt,2,0,"ng-container"),$l(),Qi(16,"td"),aT(17,Dt,2,4)(18,ft,2,0,"ng-container"),$l(),Qi(19,"td"),aT(20,ht,2,3)(21,$t,2,0,"ng-container"),$l(),Qi(22,"td"),aT(23,Rt,2,3)(24,yt,2,0,"ng-container"),$l(),Qi(25,"td")(26,"span"),nC(27,38),$l()(),Qi(28,"td"),ag(29,At,1,0,"ng-container",86),$l()()),e&2){let n=t.$implicit,_=iC(3),c=pC(33);CE(2),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?3:-1),CE(3),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(),cT(n.Backup.AdditionalTargetURLs?.length?8:-1),CE(2),cT(n.Backup.Metadata?.LastBackupFinished?10:11),CE(3);let C=WC(_.scheduledTimes()[n.Backup.ID??""]);CE(),cT(C?14:15),CE(3),cT(n.Backup.Metadata?.LastBackupDuration?17:18),CE(3),cT(n.Backup.Metadata?.SourceFilesSize?20:21),CE(3),cT(n.Backup.Metadata?.TargetFilesSize?23:24);let y=_.getBackupVersionCount(n);CE(4),jg(y)(y),rC(27),CE(2),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(15,Pn,n));}}function Ht(e,t){if(e&1){let n=vT();Qi(0,"sh-table",88),cm("sortByColumnChange",function(c){kd(n);let C=iC(2);return UC(C.sortByColumn,c)||(C.sortByColumn=c),Od(c)}),Qi(1,"tr",89)(2,"th",90),Lg(3,29),ag(4,Ft,2,0,"ng-container",91),Fg(),$l(),Qi(5,"th",92),Lg(6,30),ag(7,Ct,2,0,"ng-container",91),Fg(),$l(),Qi(8,"th",93),Lg(9,31),ag(10,Tt,2,0,"ng-container",91),Fg(),$l(),Qi(11,"th",94),Lg(12,32),ag(13,dt,2,0,"ng-container",91),Fg(),$l(),Qi(14,"th",95),Lg(15,33),ag(16,Et,2,0,"ng-container",91),Fg(),$l(),Qi(17,"th",96),Lg(18,34),ag(19,pt,2,0,"ng-container",91),Fg(),$l(),Qi(20,"th",97),Lg(21,35),ag(22,gt,2,0,"ng-container",91),Fg(),$l(),Qi(23,"th"),nC(24,36),$l(),Qi(25,"th"),nC(26,37),$l()(),dT(27,xt,30,17,"tr",null,lT),$l();}if(e&2){let n=iC(2),_=pC(35);yg("data",n.backups())("loading",n.backupsLoading()),am("sortByColumn",n.sortByColumn),CE(4),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(5),fT(n.backups());}}function Lt(e,t){if(e&1&&aT(0,ut,3,3,"div",72)(1,Ht,29,10,"sh-table",73),e&2){let n=iC();cT(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1);}}function kt(e,t){e&1&&(Qi(0,"div",100),vg(1,"sh-progress-bar",101),Qi(2,"div",59)(3,"h3"),nC(4,40),$l()()());}function Gt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC(3);return Od(c.abort())}),Lg(1,42),vg(2,"sh-icon"),Fg(),$l();}if(e&2){let n=iC(3);Yg("small",n.viewMode()==="details");}}function bt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC(3);return Od(c.stop())}),Lg(1,43),vg(2,"sh-icon"),Fg(),$l();}if(e&2){let n=iC(3);Yg("small",n.viewMode()==="details");}}function Bt(e,t){e&1&&(Lg(0,41,1),vg(1,"sh-icon"),Fg());}function vt(e,t){e&1&&(Lg(0,41,2),vg(1,"sh-icon"),Fg());}function Jt(e,t){if(e&1){let n=vT();aT(0,Gt,3,2,"button",102)(1,bt,3,2,"button",102),Qi(2,"button",82),Vg("click",function(){kd(n);let c=iC(2);return Od(c.pauseResume())}),Lg(3,41),aT(4,Bt,2,0)(5,vt,2,0),Fg(),$l();}if(e&2){let n=iC(2);cT(n.isStopping()?0:1),CE(2),Yg("small",n.viewMode()==="details")("loading",n.isResuming()),CE(2),cT(n.clientIsRunning()?4:5);}}function Xt(e,t){e&1&&nC(0,44,1);}function wt(e,t){e&1&&(Qi(0,"button",103)(1,"sh-icon"),jC(2,"pencil-simple"),$l()()),e&2&&yg("shTooltip","Externally managed")("disabled",true);}function zt(e,t){if(e&1&&(Qi(0,"button",104)(1,"sh-icon"),jC(2,"pencil-simple"),$l()()),e&2){let n=iC(2).$implicit;yg("routerLink",JC(1,kn,n.Backup.ID));}}function Vt(e,t){e&1&&(Qi(0,"button",103)(1,"sh-icon"),jC(2,"dots-three-vertical"),$l()()),e&2&&yg("shTooltip","Externally managed")("disabled",true);}function Ut(e,t){e&1&&(Qi(0,"sh-icon"),jC(1,"check"),$l());}function Kt(e,t){e&1&&(Qi(0,"sh-icon"),jC(1,"dots-three-vertical"),$l());}function jt(e,t){if(e&1&&(Qi(0,"button",108),aT(1,Ut,2,0,"sh-icon")(2,Kt,2,0,"sh-icon"),$l()),e&2){let n=iC(2).$implicit,_=iC();Yg("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),CE(),cT(_.successId()===n.Backup.ID?1:2);}}function Wt(e,t){if(e&1&&(Qi(0,"button",107),Lg(1,55),vg(2,"sh-icon"),Fg(),$l()),e&2){let n=iC(3).$implicit;yg("routerLink",JC(1,Gn,n.Backup.ID));}}function qt(e,t){if(e&1&&(Qi(0,"button",107),Lg(1,56),vg(2,"sh-icon"),Fg(),$l()),e&2){let n=iC(3).$implicit;yg("routerLink",JC(1,bn,n.Backup.ID));}}function Qt(e,t){if(e&1&&(vg(0,"sh-divider"),Qi(1,"h3",106),nC(2,54),$l(),aT(3,Wt,3,3,"button",107),aT(4,qt,3,3,"button",107)),e&2){let n=iC(3);CE(3),cT(n.hasDeleteVersions()?3:-1),CE(),cT(n.hasBrokenFiles()?4:-1);}}function Yt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC();return Od(C.startBackup(c.Backup.ID))}),Lg(1,44),vg(2,"sh-icon"),aT(3,Xt,1,0),Fg(),$l(),aT(4,wt,3,2,"button",103)(5,zt,3,3,"button",104),Qi(6,"sh-menu"),aT(7,Vt,3,2,"button",103)(8,jt,3,5,"button",105),ql(9,69),Qi(10,"h3",106),jC(11,"Operations"),$l(),Qi(12,"button",107),Lg(13,45),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",107),Lg(16,46),vg(17,"sh-icon"),Fg(),$l(),Qi(18,"button",107),Lg(19,47),vg(20,"sh-icon"),Fg(),$l(),vg(21,"sh-divider"),Qi(22,"h3",106),nC(23,48),$l(),Qi(24,"button",107),Lg(25,49),vg(26,"sh-icon"),Fg(),$l(),Qi(27,"button",70),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC();return Od(C.verifyFiles(c.Backup.ID))}),Lg(28,50),vg(29,"sh-icon"),Fg(),$l(),Qi(30,"button",107),Lg(31,51),vg(32,"sh-icon"),Fg(),$l(),aT(33,Qt,5,2),vg(34,"sh-divider"),Qi(35,"h3",106),nC(36,52),$l(),Qi(37,"button",107),Lg(38,53),vg(39,"sh-icon"),Fg(),$l(),Gl(),$l();}if(e&2){let n=iC().$implicit,_=iC();Yg("loading",_.startingBackup()===n.Backup.ID),CE(3),cT(_.viewMode()==="list"?3:-1),CE(),cT(n.Backup.ExternalID?4:5),CE(3),cT(n.Backup.ExternalID?7:8),CE(5),yg("routerLink",JC(12,Rn,n.Backup.ID)),CE(3),yg("routerLink",JC(14,yn,n.Backup.ID)),CE(3),yg("routerLink",JC(16,An,n.Backup.ID)),CE(6),yg("routerLink",JC(18,xn,n.Backup.ID)),CE(6),yg("routerLink",JC(20,Hn,n.Backup.ID)),CE(3),cT(_.hasDeleteVersions()||_.hasBrokenFiles()?33:-1),CE(4),yg("routerLink",JC(22,Ln,n.Backup.ID));}}function Zt(e,t){if(e&1&&aT(0,Jt,6,6)(1,Yt,40,24),e&2){let n=t.$implicit,_=iC();cT(_.runningBackupId()===n.Backup.ID?0:1);}}function ei(e,t){e&1&&(Qi(0,"sh-icon",109),jC(1,"funnel-simple"),$l(),Qi(2,"sh-icon",110),jC(3,"sort-ascending"),$l(),Qi(4,"sh-icon",111),jC(5,"sort-descending"),$l());}var le=class e{#t=T(C);#n=T(y);#e=T(g);#_=T(C$1);#a=T(Q);#l=T(be);#i=T(m);hasDeleteVersions=this.#i.hasV2DeleteVersions;hasBrokenFiles=this.#i.hasV2BrokenFiles;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;runningBackupId=this.#n.runningBackupId;getBackendType=Ne;getBackendIcon=Ee;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=Nt$1(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=Nt$1(()=>this.runningTask()==this.#o());scheduledTimes=Nt$1(()=>{let t=this.#a.serverState()?.ProposedSchedule??[],n=this.#e.backups(),_={};return n.forEach(c=>{let C=c.Backup?.ID;if(C){var y=t.find(X=>X.Item1==C);y?.Item2?_[C]=y.Item2:c.Schedule?.Time&&(_[C]=c.Schedule.Time);}}),_});#o=Ge(-1);viewMode=A("viewMode","list");sortByColumn=Ge(this.#e.orderBy());loadingId=Ge(null);successId=Ge(null);sortEffect=za(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(true);}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#_.openConsole("/app/machines/configurations/"+n);}setOrderBy(t){this.#e.setOrderBy(t);}setTimeType(t){this.#e.setTimeType(t);}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t));}openPauseDialog(){this.#l.open(k,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe());}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe();}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(qu(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3);}});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=hw({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$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 c;c=$localize`Restores`;let C;C=$localize`Recover your files from any backup set.`;let y;y=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let X;X=$localize`My backups`;let re;re=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let ce;ce=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let se;se=$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 ue;ue=$localize`Relative time`;let Fe;Fe=$localize`Actual time`;let Ce;Ce=$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 Te;Te=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let de;de=$localize`Externally managed`;let Ee;Ee=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Start `;let pe;pe=$localize` Edit in console ${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ge;ge=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let w;w=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,w=oC(w,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Se;Se=$localize` ${w}:ICU@@6502601490918455200: `;let me;me=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Oe;Oe=$localize`Last successful backup:`;let Ne;Ne=$localize`Duration:`;let Me;Me=$localize`Source:`;let Ie;Ie=$localize`Destination:`;let Pe;Pe=$localize`Next scheduled run:`;let De;De=$localize`Externally managed`;let fe;fe=$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 he;he=$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 $e;$e=$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 Re;Re=$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 ye;ye=$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 Ae;Ae=$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 xe;xe=$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 He;He=$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 Le;Le=$localize`Version`;let ke;ke=$localize`Actions`;let z;z=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,z=oC(z,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ge;Ge=$localize` ${z}:ICU@@3521773141017690117: `;let be;be=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Be;Be=$localize`Loading backups...`;let V;V=$localize`${"\uFFFD*4: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/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5: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/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,V=oC(V);let ve;ve=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let Je;Je=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Xe;Xe=$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 we;we=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let ze;ze=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ve;Ve=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Ue;Ue=$localize`Advanced`;let Ke;Ke=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let je;je=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let We;We=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let qe;qe=$localize`Reporting`;let Qe;Qe=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON: Log `;let Ye;Ye=$localize`Cleanup`;let Ze;Ze=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Delete versions `;let en;return en=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:file-x${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Purge broken files `,[["actions",""],["sortIcons",""],t,n,_,c,C,y,X,re,ce,se,ue,Fe,Ce,Te,de,Ee,pe,ge,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,he,$e,Re,ye,Ae,xe,He,Le,ke,Ge,be,Be,V,ve,Je,Xe,we,ze,Ve,Ue,Ke,je,We,qe,Qe,Ye,Ze,en,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],[1,"simple","accent",3,"shTooltip"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[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","accent",3,"shTooltip"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["type","button","shButton","",3,"shTooltip","disabled"],["type","button","shButton","",3,"routerLink"],["type","button","shButton","",3,"loading","success"],["title",""],["type","button",3,"routerLink"],["type","button","shButton",""],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"header")(3,"sh-card",57),Vg("keydown.enter",function(C){return C.target.click()})("keydown.space",function(C){return C.target.click()}),vg(4,"img",58),Qi(5,"div",59)(6,"h3"),nC(7,2),$l(),Qi(8,"p"),nC(9,3),$l()(),Qi(10,"button",60),Lg(11,4),vg(12,"sh-icon"),Fg(),$l()(),Qi(13,"sh-card",57),Vg("keydown.enter",function(C){return C.target.click()})("keydown.space",function(C){return C.target.click()}),vg(14,"img",61),Qi(15,"div",59)(16,"h3"),nC(17,5),$l(),Qi(18,"p"),nC(19,6),$l()(),Qi(20,"button",60),Lg(21,7),vg(22,"sh-icon"),Fg(),$l()()(),Qi(23,"div",62)(24,"h2"),ql(25),nC(26,8),Gl(),aT(27,zn,22,3,"div",63),$l(),cg(28,Lt,2,1)(29,kt,5,0),oT(30,28,Dn,null,29),$l()(),ag(32,Zt,2,1,"ng-template",null,0,lb)(34,ei,6,0,"ng-template",null,1,lb)),n&2&&(CE(3),yg("routerLink",KC(4,fn)),CE(10),yg("routerLink",KC(5,hn)),CE(14),cT(_.backups().length>0?27:-1),CE(3),iT(!_.backupsLoading()));},dependencies:[_t$1,ee,f,v,N,c,ve,d,x,at$1],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}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}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}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}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)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.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}"]})};var chunkXA5RWQQ5=/*#__PURE__*/Object.freeze({__proto__:null,APP_BASE_HREF:ce,BrowserPlatformLocation:y$1,CommonModule:Fi,DATE_PIPE_DEFAULT_OPTIONS:tn,DATE_PIPE_DEFAULT_TIMEZONE:en,DOCUMENT:Mr,DatePipe:ci,DecimalPipe:pi,FormStyle:A$1,FormatWidth:I,IMAGE_CONFIG:fv,IMAGE_LOADER:Je,JsonPipe:hi,Location:Ne$1,LocationStrategy:U,NgFor:Jt$1,NgForOf:Jt$1,NgForOfContext:Ce,NgIf:Kn$1,NgIfContext:ye,NgLocaleLocalization:qt$1,NgLocalization:Ee$1,NgPlural:Qt$1,NgSwitch:Ze,NgTemplateOutlet:ei$1,NumberFormatStyle:ne,NumberSymbol:m$1,PathLocationStrategy:de,PlatformLocation:g$1,PlatformNavigation:nn,Plural:j,TranslationWidth:d$1,WeekDay:Rt$1,formatCurrency:Zt$1,formatDate:Gt$1,formatNumber:Kt$1,formatPercent:Yt$1,getCurrencySymbol:zt$1,getLocaleDateFormat:q,getLocaleDateTimeFormat:Q$1,getLocaleDayNames:Bt$1,getLocaleDayPeriods:Pt$1,getLocaleEraNames:kt$1,getLocaleExtraDayPeriodRules:Ut$1,getLocaleExtraDayPeriods:jt$1,getLocaleId:Ot$1,getLocaleMonthNames:Nt$2,getLocaleNumberFormat:Fe,getLocaleNumberSymbol:M,getLocalePluralCase:xt$1,getLocaleTimeFormat:J,getNumberOfCurrencyDigits:Vt$1,isPlatformBrowser:Rr,isPlatformServer:Or,registerLocaleData:Tr,ɵDomAdapter:f$1,ɵPLATFORM_BROWSER_ID:wi,ɵPLATFORM_SERVER_ID:Ai,ɵgetDOM:s,ɵnormalizeQueryParams:L,ɵparseCookieValue:k$1,ɵsetRootDomAdapter:_});var chunkBEVA4HT2=/*#__PURE__*/Object.freeze({__proto__:null,ShipChip:D});var chunkQICO34G3=/*#__PURE__*/Object.freeze({__proto__:null,BackupProgressComponent:W});var chunkCORTKH64=/*#__PURE__*/Object.freeze({__proto__:null,DurationFormatPipe:c$1});var chunkCHQM3PCJ=/*#__PURE__*/Object.freeze({__proto__:null,BytesPipe:m$2});var chunkKDVMMWQR=/*#__PURE__*/Object.freeze({__proto__:null,RelativeTimePipe:m$3});export{le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {O}from'./chunk-
|
|
1
|
+
import {O}from'./chunk-aOMoAKYY.js';import {B as Bn}from'./chunk-BO2GlieG.js';import {T,ab as C,G as Ge,ac as v1,H as qu,h as hw,u as ue,v,Q as Qi,n as nC,$ as $l,a1 as dT,p as cm,U as UC,V as Vg,C as CE,a2 as fT,x as am,Y as Yg,ap as lT,l as vT,r as kd,k as iC,O as Od,w as jC,A as yg,aa as Ql}from'./main-VVQP2YE7.js';import {U}from'./chunk-DqIU7ViF.js';function z(l,t){if(l&1){let e=vT();Qi(0,"sh-radio",10),Vg("checkedChange",function(){let a=kd(e).$implicit,i=iC();return Od(i.pauseOption.set(a.value))}),jC(1),$l();}if(l&2){let e=t.$implicit,n=iC();yg("checked",n.pauseOption()===e.value),CE(),Ql(" ",e.label," ");}}var B=[{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}],k=class l{#e=T(C);pauseOptions=Ge(B);closed=v1();isSubmitting=Ge(false);pauseTransfers=Ge(false);pauseOption=Ge(void 0);submit(){this.isSubmitting.set(true);let t=this.pauseTransfers()||null,e=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:e,pauseTransfers:t}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:n=>{this.closed.emit();}});}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=hw({type:l,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:3,consts:()=>{let t;t=$localize`Pause settings`;let e;e=$localize`Also pause transfers`;let n;n=$localize`If you pause transfers they could time out and cause retries or failures.`;let a;a=$localize`Cancel`;let i;return i=$localize` Update settings `,[t,e,n,a,i,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"checked"],[1,"check-wrap"],[1,"primary","raised",3,"checkedChange","checked"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(Qi(0,"header",5)(1,"h3"),nC(2,0),$l()(),Qi(3,"div",6)(4,"div",7),dT(5,z,2,2,"sh-radio",8,lT),$l(),Qi(7,"div",9)(8,"sh-checkbox",10),cm("checkedChange",function(i){return UC(n.pauseTransfers,i)||(n.pauseTransfers=i),i}),nC(9,1),$l(),Qi(10,"sh-alert",11),nC(11,2),$l()()(),Qi(12,"footer",12)(13,"button",13),Vg("click",function(){return n.closed.emit()}),nC(14,3),$l(),Qi(15,"button",14),Vg("click",function(){return n.submit()}),nC(16,4),$l()()),e&2&&(CE(5),fT(n.pauseOptions()),CE(3),am("checked",n.pauseTransfers),CE(7),Yg("loading",n.isSubmitting()));},dependencies:[Bn,O,U,ue,v],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}"]})};export{k};
|